:root {
    --primary-color: #0ea5e9;
    --primary-dark: #0b78b8;
    --secondary-color: #38bdf8;
    --accent-color: #f97316;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #0f172a;
    --light-color: #f1f5f9;
    --white: #ffffff;
    --gray-100: #f8fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(14,165,233,0.08) 0, transparent 25%),
                radial-gradient(circle at 80% 0%, rgba(249,115,22,0.10) 0, transparent 30%),
                var(--gray-100);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
}

body.with-navbar {
    padding-top: 70px;
}

/* Navbar personalizado - Opción 5: Moderno Split */
.navbar-custom {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    z-index: 1030;
    width: 100%;
    border-bottom: 1px solid var(--gray-200);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand i {
    font-size: 1.8rem;
    -webkit-text-fill-color: var(--primary-color);
}

.nav-link {
    color: var(--gray-600) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link:hover::after {
    width: 100%;
}

.btn-login {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0ea5e9 0%, #0b78b8 45%, #0f172a 100%);
    color: var(--white);
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.22), transparent 30%),
                radial-gradient(circle at 80% 10%, rgba(6,182,212,0.20), transparent 35%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.08" d="M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,128C672,107,768,85,864,90.7C960,96,1056,128,1152,138.7C1248,149,1344,139,1392,133.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    opacity: 1;
    z-index: 0;
}

/* Premium Hero Variant */
.hero-premium .hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-section h1 {
    font-size: clamp(2.6rem, 4vw, 3.8rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    max-width: 560px;
    line-height: 1.8;
}

.hero-section p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    max-width: 560px;
}

/* Hero Features */
.hero-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.08);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.hero-photo-premium {
    animation: floatImage 3s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-photo-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 420px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    backdrop-filter: blur(6px);
}

.hero-photo-premium {
    animation: floatImage 3s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-photo {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    filter: saturate(1.05);
}

.hero-photo-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-dark);
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 16px 28px rgba(0,0,0,0.18);
}

/* Secciones */
.section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 3rem;
}

/* Cards de servicios */
.service-card {
    background: var(--white);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(14,165,233,0.12);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.18);
    border-color: var(--primary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 20px rgba(14,165,233,0.25);
}

.service-card h4 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--gray-600);
    line-height: 1.7;
}

/* Cards de enfermeros */
.nurse-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    transition: all 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
    height: 100%;
    border: 1px solid rgba(14,165,233,0.12);
    position: relative;
}

.nurse-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
}

.nurse-card:hover::before {
    transform: scaleX(1);
}

.nurse-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 28px 48px rgba(14,165,233,0.22), 0 0 40px rgba(249,115,22,0.08);
    border-color: var(--primary-color);
}

.nurse-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 4rem;
    overflow: hidden;
    position: relative;
}

.nurse-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nurse-card:hover .nurse-img::after {
    opacity: 1;
}

.nurse-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.nurse-card:hover .nurse-img img {
    transform: scale(1.08);
}

.nurse-body {
    padding: 1.5rem;
}

.nurse-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(14,165,233,0.25);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 4px 12px rgba(14,165,233,0.25); }
    50% { box-shadow: 0 4px 20px rgba(14,165,233,0.4); }
}

.nurse-card h5 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.nurse-specialty {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Botones personalizados */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: var(--white);
    padding: 0.85rem 2.3rem;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
    box-shadow: 0 12px 24px rgba(14,165,233,0.28);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
    background: transparent;
    padding: 0.85rem 2.3rem;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
}

.btn-outline-light:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.btn-outline-primary-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 0.85rem 2.3rem;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
}

.btn-outline-primary-custom:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(14,165,233,0.22);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--secondary-color);
}

/* Formularios */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
}

/* Dashboard Wrapper */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--gray-100);
}

/* Dashboard Sidebar - Estilos base movidos al bloque SIDEBAR PREMIUM abajo */

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-menu .dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.dropdown-menu .dropdown-item:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

.dropdown-menu .dropdown-item.danger {
    color: var(--danger-color);
}

.dropdown-menu .dropdown-item.danger:hover {
    background-color: #ffebee;
    color: var(--danger-color);
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.stat-card {
    background: var(--white);
    border-radius: 14px;
    padding: 1.8rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon.primary { 
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}
.stat-icon.success { 
    background: linear-gradient(135deg, var(--success-color), #059669);
}
.stat-icon.warning { 
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}
.stat-icon.danger { 
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

/* Tablas personalizadas */
.table-custom {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
}

.table-custom thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.table-custom thead th {
    border: none;
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.table-custom tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: background-color 0.2s ease;
}

.table-custom tbody tr:hover {
    background: var(--gray-50);
}

.table-custom tbody tr:last-child {
    border-bottom: none;
}

/* Badges personalizados */
.badge-custom {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

/* WhatsApp flotante */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
    color: #fff;
}

.whatsapp-float i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}
/* Card Improvements */
.card {
    border: none;
    border-radius: 12px;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-bottom: none;
}

.stat-card .stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* List group improvements */
.list-group-item {
    border-color: var(--gray-200);
    padding: 1rem 1.25rem;
    transition: background-color 0.2s ease;
}

.list-group-item:hover {
    background-color: var(--gray-100);
}

/* Badge pills */
.badge.rounded-pill {
    padding-left: 0.8em;
    padding-right: 0.8em;
}

/* ===== SIDEBAR PREMIUM ===== */
.dashboard-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0b3d6e 0%, #0a2e52 40%, #091e3a 70%, #0f172a 100%);
    color: var(--white);
    padding: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1050;
    top: 0;
    left: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

/* Scrollbar Premium */
.dashboard-sidebar::-webkit-scrollbar,
.sidebar-menu-scroll::-webkit-scrollbar {
    width: 8px;
}

.dashboard-sidebar::-webkit-scrollbar-track,
.sidebar-menu-scroll::-webkit-scrollbar-track {
    background: transparent;
    margin: 0.5rem 0;
}

.dashboard-sidebar::-webkit-scrollbar-thumb,
.sidebar-menu-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(56, 189, 248, 0.4) 0%, 
        rgba(14, 165, 233, 0.6) 50%, 
        rgba(14, 165, 233, 0.4) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 6px rgba(14, 165, 233, 0.2);
    transition: all 0.3s ease;
}

.dashboard-sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-menu-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(56, 189, 248, 0.8) 0%, 
        rgba(14, 165, 233, 0.9) 50%, 
        rgba(14, 165, 233, 0.7) 100%);
    box-shadow: inset 0 0 10px rgba(14, 165, 233, 0.4), 
                0 0 12px rgba(14, 165, 233, 0.3);
}

/* Header del sidebar */
.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.sidebar-header h5 {
    margin: 0 0 0.3rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h5 i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.sidebar-header p {
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Área scrollable del menú */
.sidebar-menu {
    list-style: none;
    padding: 0.75rem 0 1rem;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-menu li {
    margin: 0;
    position: relative;
}

/* Headers de sección */
.sidebar-menu li.menu-header {
    padding: 1.25rem 1.25rem 0.5rem;
    font-size: 0.6rem;
    font-weight: 800;
    color: rgba(56, 189, 248, 0.7);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sidebar-menu li.menu-header:first-of-type {
    margin-top: 0;
}

.sidebar-menu li.menu-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
}

/* Links del sidebar */
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.15rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 2px 0.6rem;
    border-radius: 8px;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.07);
    border-left-color: var(--secondary-color);
}

/* Estado activo */
.sidebar-menu a.active {
    background: rgba(14, 165, 233, 0.15);
    color: var(--white);
    font-weight: 600;
    border-left-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
}

.sidebar-menu a.active i {
    color: var(--secondary-color);
}

/* Iconos del sidebar */
.sidebar-menu i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    transition: color 0.25s ease;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.sidebar-menu a:hover i {
    color: var(--secondary-color);
}

.sidebar-menu span {
    flex: 1;
    font-size: 0.9rem;
}

/* Footer del sidebar - dentro del flex, no fixed */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.sidebar-footer .btn-danger {
    transition: all 0.25s ease;
    background: var(--danger-color);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 8px;
}

.sidebar-footer .btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Dashboard Content */
.dashboard-content {
    margin-left: 270px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar mejorado */
.dashboard-content .navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.navbar-text {
    color: var(--dark-color);
    font-size: 1.2rem;
    font-weight: 600;
}

/* User avatar en navbar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--gray-300);
    transition: all 0.3s ease;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

/* Mejoras a botones en modales */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.5rem;
    background: var(--gray-50);
}

.modal-header .btn-close {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

/* Table mejorada */
.table {
    margin-bottom: 0;
}

.table thead th {
    vertical-align: middle;
    font-weight: 600;
}

.table td {
    vertical-align: middle;
    padding: 1rem;
}

/* Botones de acción en tablas */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cards mejoradas */
.card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: var(--white);
    border-bottom: 2px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    border-radius: 14px 14px 0 0;
    font-weight: 600;
    color: var(--dark-color);
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-bottom: none;
}

/* Badges mejorados */
.badge {
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Animación suave para transiciones */
.btn, .card, .stat-card, a {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MODO OSCURO ADMIN ===== */
html.admin-dark body.admin-panel {
    background: #0b1220;
    color: #e2e8f0;
}

html.admin-dark .dashboard-wrapper,
html.admin-dark .dashboard-content {
    background: #0f172a;
}

html.admin-dark .dashboard-content .navbar,
html.admin-dark .dashboard-content .navbar.bg-white,
html.admin-dark .dashboard-content nav.navbar,
html.admin-dark .card,
html.admin-dark .modal-content,
html.admin-dark .dropdown-menu,
html.admin-dark .list-group-item {
    background-color: #111827 !important;
    color: #e5e7eb;
    border-color: #374151;
}

html.admin-dark .card-header,
html.admin-dark .modal-header,
html.admin-dark .table thead th {
    background-color: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}

html.admin-dark .table,
html.admin-dark .table td,
html.admin-dark .table th,
html.admin-dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    color: #e5e7eb;
    border-color: #374151;
    background-color: transparent;
}

html.admin-dark .table-hover tbody tr:hover,
html.admin-dark .list-group-item:hover,
html.admin-dark .dropdown-item:hover {
    background-color: #1f2937;
    color: #93c5fd;
}

html.admin-dark .dropdown-divider,
html.admin-dark hr,
html.admin-dark .vr {
    border-color: #374151 !important;
    opacity: 1;
}

html.admin-dark .text-muted,
html.admin-dark .small.text-muted,
html.admin-dark .form-text {
    color: #94a3b8 !important;
}

html.admin-dark .navbar .text-dark,
html.admin-dark .navbar-light .navbar-text,
html.admin-dark .navbar-light .navbar-nav .nav-link,
html.admin-dark .navbar .btn-link.text-dark,
html.admin-dark .navbar .text-dark,
html.admin-dark .dropdown-item,
html.admin-dark .navbar-text,
html.admin-dark .form-label,
html.admin-dark .card-title,
html.admin-dark .card-body {
    color: #e5e7eb !important;
}

html.admin-dark .dashboard-content .navbar .border-bottom,
html.admin-dark .dashboard-content .navbar.border-bottom {
    border-color: #374151 !important;
}

html.admin-dark .form-control,
html.admin-dark .form-select {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: #374151;
}

html.admin-dark .form-control::placeholder {
    color: #94a3b8;
}

html.admin-dark .form-control:focus,
html.admin-dark .form-select:focus {
    background-color: #0f172a;
    color: #e5e7eb;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.2);
}

html.admin-dark .btn-outline-secondary,
html.admin-dark .btn-outline-primary,
html.admin-dark .btn-outline-success,
html.admin-dark .btn-outline-danger,
html.admin-dark .btn-outline-info,
html.admin-dark .btn-outline-warning {
    border-color: #4b5563;
    color: #e5e7eb;
}

html.admin-dark .btn-link.text-dark,
html.admin-dark .nav-link .text-dark {
    color: #cbd5e1 !important;
}

html.admin-dark .dashboard-sidebar {
    background: linear-gradient(180deg, #0b1220 0%, #0f172a 45%, #111827 100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
}

html.admin-dark .sidebar-header,
html.admin-dark .sidebar-footer {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

html.admin-dark .sidebar-menu a:hover,
html.admin-dark .sidebar-menu a.active {
    background: rgba(56, 189, 248, 0.18);
}

/* ===== RESPONSIVE ADMIN SIDEBAR ===== */

/* Desktop: sidebar collapsed */
.sidebar-collapsed .dashboard-sidebar {
    transform: translateX(-270px);
}
.sidebar-collapsed .dashboard-content {
    margin-left: 0;
}

@media (max-width: 1024px) {
    .dashboard-sidebar {
        width: 240px;
    }
    
    .dashboard-content {
        margin-left: 240px;
    }

    .sidebar-collapsed .dashboard-sidebar {
        transform: translateX(-240px);
    }
    .sidebar-collapsed .dashboard-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .dashboard-sidebar {
        width: 270px;
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .dashboard-sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
    }
    
    .dashboard-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .dashboard-content .navbar {
        padding: 0.75rem 1rem;
    }

    /* Sidebar collapsed no aplica en móvil */
    .sidebar-collapsed .dashboard-sidebar {
        transform: translateX(-100%);
    }
    .sidebar-collapsed .dashboard-sidebar.show {
        transform: translateX(0);
    }
    .sidebar-collapsed .dashboard-content {
        margin-left: 0;
    }
    
    /* Overlay móvil */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

/* Hover effect para tarjetas de productos */
.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}
