/* ===== SISTEMA ARCA CONSTRUCCIÓN - ESTILOS PRINCIPALES ===== */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    overflow-x: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* Header del sidebar */
.sidebar-header {
    padding: 2rem 1.5rem;
    background: rgba(52, 73, 94, 0.8);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

/* Logo */
.sidebar-logo {
    margin-bottom: 1rem;
}

.logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

/* Logo de edificios */
.logo-buildings {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 100%;
}

.building {
    background: white;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.building-left {
    width: 10px;
    height: 25px;
}

.building-center {
    width: 15px;
    height: 35px;
}

.building-right {
    width: 12px;
    height: 30px;
}

.logo-text {
    text-align: center;
}

.logo-line-1, .logo-line-3 {
    font-size: 0.85rem;
    color: #bdc3c7;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo-line-2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #3498db;
    margin: 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo-ar {
    color: #ecf0f1;
}

.logo-ca {
    color: #3498db;
}

/* Navegación */
.sidebar-nav {
    padding: 1.5rem 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin: 0;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.sidebar a:hover {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.05) 100%);
    color: #3498db;
    border-left-color: #3498db;
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.sidebar a i {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
    color: #95a5a6;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.sidebar a:hover i {
    color: #3498db;
    transform: scale(1.1);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    background: #ffffff;
    transition: margin-left 0.3s ease;
}

/* Navegación superior */
.top-nav {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
}

/* Botón toggle móvil */
.sidebar-toggle-mobile {
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: none;
}

.sidebar-toggle-mobile:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Menú de usuario */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.user-menu:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.user-name {
    color: #495057;
    font-weight: 600;
    font-size: 0.95rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 0.75rem 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.user-dropdown a:hover {
    background: #f8f9fa;
    color: #495057;
    transform: translateX(5px);
}

.user-dropdown i {
    margin-right: 0.75rem;
    width: 16px;
    color: #6c757d;
}

/* Contenido de la página */
.page-content {
    padding: 2rem;
    background: #ffffff;
    min-height: calc(100vh - 80px);
}

/* ===== ESTILOS BOOTSTRAP MEJORADOS ===== */
.container-fluid {
    padding: 0 1rem;
}

.row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.col-12, .col-md-3, .col-md-6 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline-primary:hover {
    background: #3498db;
    color: white;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
}

.btn-outline-danger:hover {
    background: #e74c3c;
    color: white;
}

/* Tarjetas */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: #495057;
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

/* Alertas */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Tablas */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 1rem;
    font-weight: 700;
    color: #495057;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-primary { background: #3498db !important; }
.bg-success { background: #27ae60 !important; }
.bg-warning { background: #f39c12 !important; }
.bg-info { background: #17a2b8 !important; }
.bg-secondary { background: #6c757d !important; }

/* Paginación */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border-radius: 8px;
    border: none;
    padding: 0.75rem 1rem;
    color: #495057;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: #3498db;
    border-color: #3498db;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Espaciado */
.mb-4 { margin-bottom: 2rem !important; }
.me-2 { margin-right: 0.75rem !important; }
.mt-4 { margin-top: 2rem !important; }
.py-4 { padding: 2rem 0 !important; }

/* Texto */
.text-white { color: white !important; }
.text-primary { color: #3498db !important; }
.text-success { color: #27ae60 !important; }
.text-warning { color: #f39c12 !important; }
.text-info { color: #17a2b8 !important; }

/* Display */
.display-4 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
}

.lead {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle-mobile {
        display: block;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .top-nav {
        padding: 1rem;
    }
}

@media (min-width: 769px) {
    .sidebar-toggle-mobile {
        display: none;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .alert {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.5);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.8);
}
