/**
 * Navbar Component Styles
 * 
 * Estilos del navbar principal del sistema.
 * Incluye: navegación, dropdown de usuario, modal de perfil, responsive.
 * 
 * Uso: Incluir en el layout principal (main.php)
 * <link rel="stylesheet" href="<?php echo URL_BASE; ?>/public/css/components/navbar.css">
 */

/* ===== NAVBAR FLOTANTE Y PROMINENTE ===== */
.modern-navbar {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%);
    border: none;
    padding: 0.6rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 80px);
    max-width: 1200px;
    z-index: 1050;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.35), 
                0 4px 12px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Efecto shrink al hacer scroll */
.modern-navbar.navbar-scrolled {
    top: 6px;
    padding: 0.35rem 1rem;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3),
                0 2px 8px rgba(0, 0, 0, 0.12);
}

.modern-navbar.navbar-scrolled .brand-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
}

.modern-navbar.navbar-scrolled .nav-link-modern {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.82rem;
}

.modern-navbar.navbar-scrolled .avatar-circle-modern {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
}

.modern-navbar.navbar-scrolled .notification-circle {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
}

.modern-navbar.navbar-scrolled .wallet-badge {
    padding: 0.3rem 0.7rem !important;
    font-size: 0.78rem;
}

.modern-navbar.navbar-scrolled .logout-circle {
    width: 26px;
    height: 26px;
    font-size: 0.65rem;
}

.modern-navbar .brand-icon {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    transition: all 0.2s ease-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-navbar .navbar-brand {
    font-size: 1rem;
}

.modern-navbar .navbar-brand:hover .brand-icon {
    background: rgba(255, 255, 255, 0.28);
    transform: rotate(-5deg) scale(1.05);
}

.modern-navbar .version-badge {
    background: rgba(255, 255, 255, 0.22);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===== NAVEGACIÓN LINKS ===== */
.nav-link-modern {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem !important;
    border-radius: 10px;
    margin: 0 0.1rem;
    transition: all 0.2s ease-out;
}

.nav-link-modern i {
    font-size: 0.82rem;
}

.nav-link-modern:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateY(-1px);
}

.nav-link-modern.active {
    background: rgba(255, 255, 255, 0.22);
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== BADGE WALLET ===== */
.wallet-badge {
    display: flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.22);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 0.4rem 0.85rem !important;
    border-radius: 25px;
    color: #a7f3d0 !important;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

.wallet-badge:hover {
    background: rgba(16, 185, 129, 0.35);
    color: #d1fae5 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.wallet-badge i {
    font-size: 0.78rem;
}

/* ===== AVATAR CÍRCULO ===== */
.avatar-circle-modern {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    transition: all 0.15s ease-out;
    cursor: pointer;
}

.user-btn:hover .avatar-circle-modern {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.05);
}

/* ===== BOTÓN LOGOUT ===== */
.logout-circle {
    width: 30px;
    height: 30px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fca5a5;
    font-size: 0.7rem;
    transition: all 0.15s ease-out;
}

.logout-btn:hover .logout-circle {
    background: rgba(239, 68, 68, 0.35);
    color: #fecaca;
    transform: scale(1.05);
}

/* ===== DROPDOWN MEJORADO ===== */
.modern-dropdown {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 0.4rem;
    margin-top: 8px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 9999 !important;
    opacity: 0;
    transform: translateY(8px);
    animation: dropdownFadeIn 0.2s ease forwards;
}

@keyframes dropdownFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-dropdown .dropdown-header {
    background: linear-gradient(135deg, #f8f9fc 0%, #fff 100%);
    border-radius: 8px;
    margin-bottom: 0.25rem;
}

.modern-dropdown .dropdown-divider {
    margin: 0.25rem 0.5rem;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    opacity: 1;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
}

.user-name-header {
    font-weight: 600;
    font-size: 0.8rem;
    color: #333;
    line-height: 1.2;
}

.user-role-header {
    margin-top: 2px;
}

.badge-admin-sm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
}

.badge-user-sm {
    background: #e2e8f0;
    color: #64748b;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
}

.modern-dropdown .dropdown-item {
    border-radius: 8px;
    transition: all 0.15s ease-out;
    color: #4a5568;
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0;
}

.modern-dropdown .dropdown-item i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 0.72rem;
    margin: 0 0.6rem 0 0 !important;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

/* Colores por tipo de icono */
.modern-dropdown .dropdown-item .fa-users-cog { background: rgba(102,126,234,0.1); color: #667eea; }
.modern-dropdown .dropdown-item .fa-coins { background: rgba(245,158,11,0.1); color: #f59e0b; }
.modern-dropdown .dropdown-item .fa-arrow-up { background: rgba(16,185,129,0.1); color: #10b981; }
.modern-dropdown .dropdown-item .fa-cog { background: rgba(107,114,128,0.1); color: #6b7280; }
.modern-dropdown .dropdown-item .fa-shield-alt { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.modern-dropdown .dropdown-item .fa-layer-group { background: rgba(59,130,246,0.1); color: #3b82f6; }
.modern-dropdown .dropdown-item .fa-user-plus { background: rgba(16,185,129,0.1); color: #10b981; }
.modern-dropdown .dropdown-item .fa-tv { background: rgba(236,72,153,0.1); color: #ec4899; }
.modern-dropdown .dropdown-item .fa-search { background: rgba(245,158,11,0.1); color: #f59e0b; }
.modern-dropdown .dropdown-item .fa-tags { background: rgba(249,115,22,0.1); color: #f97316; }
.modern-dropdown .dropdown-item .fa-shopping-bag { background: rgba(59,130,246,0.1); color: #3b82f6; }
.modern-dropdown .dropdown-item .fa-hand-paper { background: rgba(245,158,11,0.1); color: #f59e0b; }
.modern-dropdown .dropdown-item .fa-receipt { background: rgba(16,185,129,0.1); color: #10b981; }
.modern-dropdown .dropdown-item .fa-exclamation-triangle { background: rgba(239,68,68,0.1); color: #ef4444; }
.modern-dropdown .dropdown-item .fa-comment-dots { background: rgba(99,102,241,0.1); color: #6366f1; }
.modern-dropdown .dropdown-item .fa-newspaper { background: rgba(59,130,246,0.1); color: #3b82f6; }
.modern-dropdown .dropdown-item .fa-star { background: rgba(245,158,11,0.1); color: #f59e0b; }
.modern-dropdown .dropdown-item .fa-envelope { background: rgba(16,185,129,0.1); color: #10b981; }
.modern-dropdown .dropdown-item .fa-shopping-cart { background: rgba(102,126,234,0.1); color: #667eea; }
.modern-dropdown .dropdown-item .fa-tachometer-alt { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.modern-dropdown .dropdown-item .fa-wallet { background: rgba(16,185,129,0.1); color: #10b981; }
.modern-dropdown .dropdown-item .fa-user-edit { background: rgba(59,130,246,0.1); color: #3b82f6; }
.modern-dropdown .dropdown-item .fa-user { background: rgba(99,102,241,0.1); color: #6366f1; }
.modern-dropdown .dropdown-item .fa-sign-out-alt { background: rgba(239,68,68,0.1); color: #ef4444; }

.modern-dropdown .dropdown-item:hover {
    background: rgba(102, 126, 234, 0.06);
    color: #667eea;
}

.modern-dropdown .dropdown-item:hover i {
    transform: scale(1.08);
}

.modern-dropdown .dropdown-item.text-danger {
    color: #ef4444;
}

.modern-dropdown .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}

/* Helper colors para user dropdown */
.text-purple { color: #8b5cf6 !important; }
.text-info { color: #06b6d4 !important; }

/* ===== PROFILE MODAL PREMIUM - Diseño 10/10 ===== */
#profileModal {
    z-index: 10502 !important;
}

/* Backdrop con blur para profileModal */
#profileModal.show ~ .modal-backdrop,
.modal-backdrop.show + #profileModal ~ .modal-backdrop,
body.modal-open .modal-backdrop {
    background: rgba(15, 23, 42, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

#profileModal .modal-dialog {
    max-width: 400px;
    margin: 1.75rem auto;
}

#profileModal .modal-content {
    border-radius: 24px !important;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35), 
                0 10px 30px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
    background: #ffffff;
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#profileModal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Header Premium con Gradiente */
#profileModal .modal-header,
#profileModal .profile-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f64f59 100%) !important;
    border-bottom: none !important;
    padding: 1.25rem 1.5rem !important;
    position: relative;
    overflow: hidden;
}

#profileModal .modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

#profileModal .modal-title,
#profileModal #profileModalLabel {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

#profileModal .modal-title i,
#profileModal #profileModalLabel i {
    color: #ffffff !important;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem;
    border-radius: 10px;
}

#profileModal .btn-close,
#profileModal .btn-close-white {
    filter: brightness(0) invert(1) !important;
    opacity: 0.9 !important;
    transition: all 0.2s ease;
    background-size: 0.85rem;
}

#profileModal .btn-close:hover {
    opacity: 1 !important;
    transform: rotate(90deg);
}

/* Body del Modal */
#profileModal .modal-body {
    padding: 0 !important;
    background: #f8fafc;
}

/* Secciones del formulario */
#profileModal .profile-section {
    background: #ffffff;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

#profileModal .section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #667eea;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#profileModal .section-label::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

#profileModal .form-label-sm {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
}

#profileModal .form-control {
    border-radius: 12px !important;
    border: 2px solid #e2e8f0 !important;
    padding: 0.65rem 0.9rem !important;
    font-size: 0.875rem !important;
    transition: all 0.25s ease !important;
    background: #ffffff !important;
}

#profileModal .form-control:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12) !important;
    background: #ffffff !important;
}

#profileModal .form-control::placeholder {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Password Toggle Section Premium */
#profileModal .password-toggle-section {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

#profileModal .password-toggle-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

#profileModal .password-toggle-header:hover {
    background: #f8fafc;
}

#profileModal .password-toggle-header span {
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
}

#profileModal .password-toggle-header i {
    color: #667eea !important;
}

/* Toggle Switch Premium */
#profileModal .toggle-switch {
    position: relative;
}

#profileModal .toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

#profileModal .toggle-label {
    display: block;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#profileModal .toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#profileModal .toggle-input:checked + .toggle-label {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

#profileModal .toggle-input:checked + .toggle-label::after {
    transform: translateX(20px);
}

/* Password Fields */
#profileModal .password-fields {
    padding: 0 1.5rem 1.25rem;
    display: none;
    animation: profileSlideDown 0.3s ease;
}

#profileModal .password-fields.show {
    display: block;
}

@keyframes profileSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#profileModal .input-group .btn {
    border-radius: 0 12px 12px 0 !important;
    border: 2px solid #e2e8f0 !important;
    border-left: none !important;
    background: #f8fafc;
    color: #64748b;
    transition: all 0.2s ease;
}

#profileModal .input-group .btn:hover {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea !important;
}

#profileModal .input-group .form-control {
    border-radius: 12px 0 0 12px !important;
}

/* Footer Premium */
#profileModal .modal-footer,
#profileModal .profile-modal-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 1rem 1.5rem !important;
    gap: 0.75rem !important;
    display: flex;
}

#profileModal .modal-footer .btn {
    flex: 1;
    border-radius: 14px !important;
    padding: 0.75rem 1.25rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#profileModal .btn-light {
    background: #f1f5f9 !important;
    border: 2px solid #e2e8f0 !important;
    color: #475569 !important;
}

#profileModal .btn-light:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-2px);
}

#profileModal .btn-primary-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35) !important;
}

#profileModal .btn-primary-gradient:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45) !important;
}

#profileModal .btn-primary-gradient:active {
    transform: translateY(0);
}

/* Bloquear scroll cuando profileModal está abierto */
body.profile-modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Backdrop personalizado para profile modal */
.profile-modal-backdrop {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.25) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10501;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Fallback para clases sin #profileModal */
.profile-modal-content {
    border: none;
    border-radius: 24px;
    overflow: hidden;
}

.profile-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f64f59 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border: none;
}

.profile-modal-header .modal-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.profile-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.profile-section:last-of-type {
    border-bottom: none;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.85rem;
}

.section-label::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.form-label-sm {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
    display: block;
}

.profile-section .form-control {
    font-size: 0.875rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 0.65rem 0.9rem;
}

.profile-section .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.profile-section .input-group .btn {
    border: 2px solid #e2e8f0;
    border-left: none;
    border-radius: 0 12px 12px 0;
    background: #f8fafc;
    color: #64748b;
}

.profile-modal-footer {
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
    color: white;
    transform: translateY(-2px);
}

.btn-login-nav {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white !important;
    padding: 0.35rem 0.9rem !important;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: background 0.15s ease-out;
}

.btn-login-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Botón Registro en Navbar */
.btn-register-nav {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #667eea !important;
    padding: 0.35rem 0.9rem !important;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.15s ease-out;
}

.btn-register-nav:hover {
    background: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== TOGGLE CAMBIAR CONTRASEÑA ===== */
.password-toggle-section {
    border-bottom: 1px solid #f0f0f0;
}

.password-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.password-toggle-header:hover {
    background: #f8f9fc;
}

.password-toggle-header span {
    font-size: 0.75rem;
    font-weight: 500;
    color: #555;
}

.password-toggle-header i {
    font-size: 0.7rem;
}

/* Toggle Switch estilo iOS */
.toggle-switch {
    position: relative;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-label {
    display: block;
    width: 36px;
    height: 20px;
    background: #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    transition: background 0.25s ease;
    margin: 0;
}

.toggle-label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.25s ease;
}

.toggle-input:checked + .toggle-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-input:checked + .toggle-label::after {
    transform: translateX(16px);
}

/* Campos de contraseña animados */
.password-fields {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    padding: 0 1rem;
}

.password-fields.show {
    max-height: 200px;
    opacity: 1;
    padding: 0.6rem 1rem 0.85rem;
}

.password-fields .form-control {
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.password-fields .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.password-fields .input-group .btn {
    border-color: #e0e0e0;
    font-size: 0.75rem;
}

/* ===== TOAST DEL NAVBAR ===== */
.nav-toast {
    position: fixed;
    top: 60px;
    right: 20px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    z-index: 99999;
    transform: translateX(calc(100% + 20px));
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.nav-toast-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-toast-error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* ===== ESTILOS GLOBALES DEL BODY (para el navbar fijo) ===== */
body {
    padding-top: 85px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .modern-navbar {
        top: 8px;
        width: calc(100% - 16px);
        border-radius: 14px;
    }
    
    .navbar-collapse {
        background: rgba(102, 126, 234, 0.98);
        border-radius: 12px;
        padding: 0.85rem;
        margin-top: 0.6rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    
    .nav-link-modern {
        margin: 0.15rem 0;
    }
    
    .navbar-nav.align-items-center {
        flex-direction: row;
        justify-content: flex-start;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    body {
        padding-top: 75px;
    }
}

@media (max-width: 600px) {
    .modern-navbar {
        top: 6px;
        width: calc(100% - 12px);
        padding: 0.45rem 0.7rem;
        border-radius: 12px;
    }
    
    .brand-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85rem !important;
    }
    
    .navbar-brand {
        font-size: 0.88rem !important;
    }
    
    .navbar-brand span:not(.version-badge):not(.brand-icon) {
        display: none;
    }
    
    .version-badge {
        display: none !important;
    }
    
    .avatar-circle-modern,
    .logout-circle {
        width: 28px;
        height: 28px;
    }
}

/* ===== NOTIFICACIONES ===== */
.notification-circle {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notification-circle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulse-notification 2s infinite;
}

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

.notification-dropdown {
    width: 360px;
    max-width: 90vw;
    padding: 0;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
}

.notification-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.notification-header .btn-mark-all {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.notification-header .btn-mark-all:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

.notification-item:hover {
    background: #f8f9fc;
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
    border-left: 3px solid #667eea;
}

.notification-item .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.notification-item .notif-content {
    flex: 1;
    min-width: 0;
}

.notification-item .notif-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.15rem;
}

.notification-item .notif-message {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item .notif-time {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.notification-empty span {
    font-size: 0.85rem;
}

.notification-footer {
    padding: 0.6rem 1rem;
    text-align: center;
    background: #f8f9fc;
    border-top: 1px solid #e9ecef;
}

.notification-footer a {
    color: #667eea;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.notification-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .notification-dropdown {
        width: 300px;
    }
    
    .notification-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* ===== DESACTIVAR HOVER ANIMATIONS EN DISPOSITIVOS TÁCTILES ===== */
@media (hover: none) {
    .modern-navbar .navbar-brand:hover .brand-icon,
    .nav-link-modern:hover,
    .wallet-badge:hover,
    .logout-btn:hover .logout-circle,
    .notification-circle:hover {
        transform: none !important;
    }
}
