/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1a4f8b;
    --primary-hover: #143d6b;
    --secondary-color: #6c757d;
    --background-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-color: #333333;
    --sidebar-width: 250px;
    --header-height: 60px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--primary-color);
    color: white;
    padding-top: 20px;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header img {
    max-width: 80%;
    height: auto;
    margin-bottom: 10px;
}

.sidebar-menu {
    padding: 20px 0;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

/* Quick actions - hidden on desktop, shown at top on mobile */
.sidebar-quick-actions {
    display: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 4px solid #fff;
}

.sidebar-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    transition: all 0.3s;
}

/* Cards */
.card-custom {
    background: var(--card-bg);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.card-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.card-header-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    font-weight: 600;
}

.table-custom {
    background: white;
}

.table-custom th {
    background-color: #f8f9fa;
    color: var(--text-color);
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 79, 139, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

/* Hamburger Menu Button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 1.5rem;
}

.menu-toggle:hover {
    background-color: var(--primary-hover);
}

/* Overlay para cerrar menú en móvil */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .menu-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 70px 15px 15px 15px;
    }

    /* Dashboard: botones verticales en móvil */
    .dashboard-actions {
        flex-direction: column !important;
        gap: 8px !important;
        width: 100%;
    }

    .dashboard-actions .btn {
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
        width: 100%;
    }

    /* Mostrar acciones rápidas arriba en móvil */
    .sidebar-quick-actions {
        display: block !important;
    }

    /* Ocultar footer links en móvil (duplicado arriba) */
    .sidebar-footer-links {
        display: none !important;
    }

    /* 🔧 OPTIMIZACIONES MÓVIL PARA VER ADMINISTRACIÓN */
    .sidebar-header {
        padding: 10px !important;
    }

    .sidebar-header img {
        max-width: 55% !important;
        margin-bottom: 3px !important;
    }

    .sidebar-header h5 {
        font-size: 0.7rem !important;
        margin: 0 !important;
    }

    .sidebar-menu {
        padding: 8px 0 !important;
        max-height: calc(100vh - 85px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .sidebar-link {
        padding: 9px 18px !important;
        font-size: 0.88rem !important;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
        padding: 20px;
    }
}