@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&family=Lexend:wght@100..900&display=swap');

:root {
    /* ── Global Brand Tokens (Premium Redesign) ── */

    /* Primary: Azul Acero Premium para Modo Oscuro */
    --obsidian-primary:           #38bdf8;
    --obsidian-primary-deep:      #0284c7;
    --obsidian-primary-gradient:  linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    --obsidian-on-primary:        #ffffff;

    /* Secondary: Cyan tonal para datos técnicos */
    --obsidian-secondary:         #67e8f9;
    --obsidian-secondary-muted:   rgba(103, 232, 249, 0.15);

    /* Semáforos funcionales (Suavizados y desaturados para modo oscuro) */
    --color-success:  #34d399;
    --color-warning:  #fbbf24;
    --color-danger:   #f87171;
    --color-info:     #38bdf8;

    /* Transitions & Blur */
    --theme-transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    --obsidian-glass-blur: blur(24px);
    --obsidian-glass-blur-heavy: blur(40px);

    /* Border radius escalonado */
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   20px;
    --radius-2xl:  24px;
    --radius-full: 9999px;
}

/* ────────────────────────────────────────────────────────────────────────── */
/* --- Tema OSCURO (Obsidian Deep — Modo Cockpit Premium) --- */
/* ────────────────────────────────────────────────────────────────────────── */
[data-theme="dark"], :root:not([data-theme="light"]) {
    /* Superficies de profundidad slate desaturadas (Reducción de fatiga visual) */
    --obsidian-bg:                #0b0f19;
    --obsidian-surface:           rgba(22, 30, 49, 0.75);
    --obsidian-surface-lowest:    #050811;
    --obsidian-surface-low:       #0a0d16;
    --obsidian-surface-container: rgba(22, 30, 49, 0.75);
    --obsidian-surface-high:      #161e2e;
    --obsidian-surface-highest:   #1e293b;
    --obsidian-surface-bright:    #334155;

    /* Bordes "Ghost" ultra-sutiles de acero */
    --obsidian-outline-variant:   rgba(148, 163, 184, 0.06);
    --obsidian-outline-accent:    rgba(56, 189, 248, 0.2);
    --obsidian-outline-strong:    rgba(148, 163, 184, 0.12);

    /* Tipografía Slate suave (Sin destello cegador de blanco puro) */
    --obsidian-text-primary:      #cbd5e1;
    --obsidian-text-secondary:    #94a3b8;
    --obsidian-text-muted:        #5e708a;
    --obsidian-text-tertiary:     #334155;

    /* Glassmorphism */
    --obsidian-glass-bg:          rgba(15, 23, 42, 0.75);
    --obsidian-glass-bg-heavy:    rgba(11, 15, 25, 0.9);
    --obsidian-shadow-ambient:    0 20px 50px rgba(0, 0, 0, 0.55);
    --obsidian-shadow-card:       0 8px 32px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255,255,255,0.02) inset;
    --obsidian-shadow-glow:       0 0 32px rgba(56, 189, 248, 0.08);

    /* Scrollbar */
    --scrollbar-track:            transparent;
    --scrollbar-thumb:            rgba(148, 163, 184, 0.08);
    --scrollbar-thumb-hover:      rgba(56, 189, 248, 0.25);

    /* Tabla */
    --table-header-bg:            rgba(15, 23, 42, 0.85);
    --table-header-text:          #94a3b8;
    --table-row-border:           rgba(255, 255, 255, 0.03);
    --table-hover:                rgba(56, 189, 248, 0.04);
    --text-table:                 #b4c6e4;

    /* Input & Form */
    --input-bg:                   rgba(5, 8, 15, 0.55);
    --input-border:               rgba(148, 163, 184, 0.1);
    --input-bg-focus:             rgba(11, 15, 25, 0.75);
    --text-muted:                 var(--obsidian-text-muted);

    /* Detalle sidebar */
    --detail-bg:                  rgba(15, 23, 42, 0.8);
    --detail-border:              rgba(255, 255, 255, 0.04);
    --detail-divider:             rgba(255, 255, 255, 0.04);
    --contact-bg:                 rgba(11, 15, 25, 0.6);
    --contact-card-bg:            rgba(15, 23, 42, 0.7);
    --contact-title:              var(--obsidian-text-primary);

    /* Legacy Map */
    --body-bg:     var(--obsidian-bg);
    --panel-bg:    var(--obsidian-surface-container);
    --panel-border: var(--obsidian-outline-variant);
    --text-primary: var(--obsidian-text-primary);
    --text-secondary: var(--obsidian-text-secondary);

    /* Dropdown */
    --dd-bg:          var(--obsidian-surface-lowest);
    --dd-list-bg:     var(--obsidian-surface-highest);
    --dd-hover-bg:    var(--obsidian-surface-bright);
    --dd-hover-text:  var(--obsidian-primary);
    --dd-selected-bg: var(--obsidian-surface-highest);
    --dd-selected-text: var(--obsidian-primary);
}

/* ────────────────────────────────────────────────────────────────────────── */
/* --- Tema CLARO (Alabaster Editorial — Modo Premium Moderno) --- */
/* ────────────────────────────────────────────────────────────────────────── */
[data-theme="light"] {
    /* Superficies limpias y editoriales */
    --obsidian-bg:                #f8fafc;
    --obsidian-surface:           #ffffff;
    --obsidian-surface-lowest:    #ffffff;
    --obsidian-surface-low:       #f8fafc;
    --obsidian-surface-container: #ffffff;
    --obsidian-surface-high:      #edf1f7;
    --obsidian-surface-highest:   #e2e8f2;
    --obsidian-surface-bright:    #f1f5fb;

    /* Bordes ultra-sutiles */
    --obsidian-outline-variant:   rgba(0, 0, 0, 0.03);
    --obsidian-outline-accent:    rgba(99, 102, 241, 0.2);
    --obsidian-outline-strong:    rgba(0, 0, 0, 0.06);

    /* Tipografía */
    --obsidian-text-primary:      #0f172a;
    --obsidian-text-secondary:    #475569;
    --obsidian-text-muted:        #94a3b8;
    --obsidian-text-tertiary:     #cbd5e1;

    /* Glass & Sombras */
    --obsidian-glass-bg:          rgba(255, 255, 255, 0.95);
    --obsidian-glass-bg-heavy:    rgba(255, 255, 255, 0.98);
    --obsidian-shadow-ambient:    0 10px 30px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.01);
    --obsidian-shadow-card:       0 10px 30px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.01);
    --obsidian-shadow-glow:       0 0 24px rgba(37, 99, 235, 0.08);

    /* Primary override para modo claro */
    --obsidian-primary:           #2563eb;
    --obsidian-primary-deep:      #1d4ed8;
    --obsidian-primary-gradient:  linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --obsidian-on-primary:        #ffffff;

    /* Scrollbar */
    --scrollbar-track:            #f1f5f9;
    --scrollbar-thumb:            rgba(0, 0, 0, 0.08);
    --scrollbar-thumb-hover:      rgba(37, 99, 235, 0.3);

    /* Tabla */
    --table-header-bg:            #f8fafc;
    --table-header-text:          #64748b;
    --table-row-border:           rgba(0, 0, 0, 0.04);
    --table-hover:                rgba(37, 99, 235, 0.04);
    --text-table:                 #334155;

    /* Input & Form */
    --input-bg:                   #f8fafc;
    --input-border:               rgba(0, 0, 0, 0.1);
    --input-bg-focus:             #ffffff;
    --text-muted:                 var(--obsidian-text-muted);

    /* Detalle sidebar */
    --detail-bg:                  #ffffff;
    --detail-border:              rgba(0, 0, 0, 0.06);
    --detail-divider:             rgba(0, 0, 0, 0.06);
    --contact-bg:                 #f8fafc;
    --contact-card-bg:            #ffffff;
    --contact-title:              var(--obsidian-text-primary);

    /* Legacy Map */
    --body-bg:     var(--obsidian-bg);
    --panel-bg:    var(--obsidian-surface);
    --panel-border: var(--obsidian-outline-variant);
    --text-primary: var(--obsidian-text-primary);
    --text-secondary: var(--obsidian-text-secondary);

    /* Dropdown */
    --dd-bg:           #ffffff;
    --dd-list-bg:      #ffffff;
    --dd-hover-bg:     #f1f5f9;
    --dd-hover-text:   #6366f1;
    --dd-selected-bg:  #eef2ff;
    --dd-selected-text: #6366f1;

    /* Specific overrides */
    --notif-item-bg:     #f8fafc;
    --notif-item-border: rgba(0, 0, 0, 0.04);
}


/* ────────────────────────────────────────────────────────────────────────── */

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

body {
    font-family: 'Geist', sans-serif;
    background: var(--obsidian-bg);
    color: var(--obsidian-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    transition: var(--theme-transition);
}

h1, h2, h3, h4, h5, h6, .panel-title {
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
}

.tech-font, .label, .v-tag, .badge, .status-badge, .ip-val, .label-md {
    font-family: 'Geist Mono', monospace;
}

/* Global Subtle Scrollbar */
::-webkit-scrollbar {
    width: 8px; /* Slightly wider for the main body but still subtle */
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
    border: 2px solid transparent; /* Creates padding effect if track had background */
    background-clip: content-box;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: content-box;
}

body.menu-open {
    align-items: flex-start;
    overflow-y: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Elementos de fondo decorativos eliminados */

.container {
    text-align: center;
    max-width: 800px;
    width: 90%;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    margin-bottom: 4rem;
}

.logo {
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.glitch {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
    letter-spacing: -2px;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #cbd5e1;
    margin-top: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

.intro-text {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.highlight-text {
    font-weight: 600;
    color: #fff;
    margin-top: 1.5rem;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.text-gradient {
    background: linear-gradient(135deg, #3b82f6, #0ea5e9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 1.1em;
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.3));
}

.card {
    background: rgba(255, 255, 255, 0.03);
    

    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 3rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
    transform-style: preserve-3d;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.card-content {
    transform: translateZ(30px);
}

.card-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #bfdbfe;
}

.card-content p {
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.glow-btn {
    background: linear-gradient(135deg, #3b82f6, #0ea5e9);
    border: none;
    padding: 1rem 3rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.glow-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.glow-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.6);
}

.glow-btn:hover::after {
    left: 100%;
}

.glow-btn:active {
    transform: scale(0.98);
}

.login-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    
}

.login-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.login-btn:active {
    transform: translateY(0) scale(0.95);
}

/* Form Styles */
.hidden-form {
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    transform: translateY(-20px);
    margin-top: 0;
}

.hidden-form.show {
    opacity: 1;
    visibility: visible;
    height: auto;
    transform: translateY(0);
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hidden-form h3 {
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.input-group {
    margin-bottom: 1rem;
    text-align: left;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active,
.input-group textarea:-webkit-autofill,
.input-group textarea:-webkit-autofill:hover,
.input-group textarea:-webkit-autofill:focus,
.input-group textarea:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--input-bg-focus) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: var(--input-bg-focus);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6, #3b82f6);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.submit-btn:hover {
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.5);
}

footer {
    margin-top: 4rem;
    color: #475569;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-size: 1.2rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    color: #fff;
}

.social-icon[aria-label="Instagram"]:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(214, 36, 159, 0.4);
}

.social-icon[aria-label="Facebook"]:hover {
    background: #1877f2;
    border-color: #1877f2;
    box-shadow: 0 10px 20px rgba(24, 119, 242, 0.4);
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; filter: blur(40px); }
    50% { opacity: 0.8; filter: blur(60px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

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

@keyframes fadeInSlideLeft {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes loginCardEntrance {
    from { 
        opacity: 0; 
        transform: translateY(24px) scale(0.96); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(-1.5deg); }
}

/* ────────────────────────────────────────────────────────────────────────── */
/* ── ESTILOS DEL LOGIN PREMIUM (SPLIT LAYOUT) ────────────────────────────── */
/* ────────────────────────────────────────────────────────────────────────── */

body.login-view {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 2rem;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
    
    /* Forced light variables for login content */
    --text-primary: #1e3a5f;
    --text-secondary: #3b5e8a;
    --text-muted: #6b7280;
    --input-bg: rgba(255, 255, 255, 0.7);
    --input-border: rgba(0, 0, 0, 0.1);
    --input-bg-focus: rgba(255, 255, 255, 0.9);
    --login-card-bg: rgba(255, 255, 255, 0.95);
    --login-card-border: rgba(0, 0, 0, 0.05);
    --login-card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --login-bg: #f8fafc;
}

[data-theme="dark"] body.login-view,
body.login-view[data-theme="dark"] {
    --text-primary: #e2e8f8;
    --text-secondary: #94a3b8;
    --text-muted: #4e5d75;
    --input-bg: rgba(5, 10, 20, 0.6);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-bg-focus: rgba(12, 20, 40, 0.8);
    --login-card-bg: rgba(15, 23, 42, 0.85);
    --login-card-border: rgba(255, 255, 255, 0.08);
    --login-card-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 32px rgba(30, 58, 95, 0.1);
    --login-bg: #050b18;
}

body.login-view {
    background: var(--login-bg) !important;
}

#tsparticles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    will-change: transform, opacity;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 480px;
    z-index: 10;
}



.login-card {
    background: var(--login-card-bg);
    backdrop-filter: var(--obsidian-glass-blur);
    -webkit-backdrop-filter: var(--obsidian-glass-blur);
    border: 1px solid var(--login-card-border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    box-shadow: var(--login-card-shadow);
    z-index: 10;
    animation: loginCardEntrance 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.login-card-logo {
    height: 48px;
    width: auto;
    margin-bottom: 0.6rem;
    object-fit: contain;
}

.login-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
    letter-spacing: 0.02em;
    font-weight: 500;
}

.login-description {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0.8rem 0 1.2rem;
    opacity: 0.9;
    text-align: center;
}

/* Accessibility: Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Inputs & Form tweaks */
.login-form .input-group {
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
}

.login-form .input-group i.input-icon {
    position: absolute;
    left: 1.1rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
}

.password-toggle {
    position: absolute;
    right: 1.1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.login-form input[type="password"] {
    padding-right: 3.2rem !important;
}

.login-form input,
.login-form textarea {
    padding: 0.95rem 1rem 0.95rem 3rem;
    border-radius: 12px;
    width: 100%;
    font-size: 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    transition: all 0.2s;
    font-family: inherit;
}

.login-form textarea {
    resize: none;
    min-height: 100px;
    line-height: 1.5;
}

.login-form input:focus,
.login-form textarea:focus {
    border-color: var(--text-primary);
    background: var(--input-bg-focus);
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.12);
    outline: none;
}

[data-theme="dark"] .login-form input:focus,
[data-theme="dark"] .login-form textarea:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}

.login-form input:focus~i.input-icon,
.login-form textarea:focus~i.input-icon {
    color: var(--text-primary);
}

[data-theme="dark"] .login-form input:focus~i.input-icon,
[data-theme="dark"] .login-form textarea:focus~i.input-icon {
    color: #a78bfa;
}

.login-btn-submit {
    background: linear-gradient(135deg, #2d568c 0%, #1e3a5f 100%);
    border: none;
    color: var(--obsidian-on-primary);
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 0.5rem;
}

.login-btn-submit:hover {
    background: linear-gradient(135deg, #3768aa 0%, #2d568c 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 95, 0.35);
}

.forgot-password {
    display: block;
    text-align: right;
    margin-top: -0.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.forgot-password:hover {
    color: #3b82f6;
    transform: translateX(-3px);
}

.login-form input:focus~i.input-icon {
    color: #3b82f6;
}

.auth-footer-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.auth-footer-links a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: color 0.2s;
}

.auth-footer-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 1rem;
    transition: all 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
    transform: translateX(-3px);
}

/* Footer elements */
.brand-footer {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    z-index: 5;
    transition: opacity 0.3s ease;
}

/* En pantallas de escritorio con suficiente altura, fijar al fondo */
@media (min-height: 700px) and (min-width: 1025px) {
    .brand-footer {
        position: absolute;
        bottom: 2rem;
        left: 0;
        padding: 0;
    }
}

.auth-footer-brand {
    height: 25px;
    width: auto;
    opacity: 0.8;
    transition: all 0.3s;
}

.auth-footer-brand:hover {
    opacity: 1;
}

.v-tag {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 4px;
}

.footer-meta {
    margin-top: 0.6rem;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.footer-meta a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-meta a:hover {
    color: var(--text-primary);
}

.footer-logo-img {
    height: 18px;
    width: auto;
    vertical-align: middle;
    margin: 0 4px;
    display: inline-block;
    filter: brightness(0.9);
    transition: filter 0.3s;
}

.footer-logo-img:hover {
    filter: brightness(1.1);
}

.brand-icon {
    height: 42px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: floatLogo 5s ease-in-out infinite;
}

.brand-icon:hover {
    transform: scale(1.1) rotate(-5deg);
}

/* Logo Theme Switching */
.logo-dark, .footer-logo-dark, .brand-icon.logo-dark { display: none !important; }

[data-theme="dark"] .logo-dark, 
[data-theme="dark"] .footer-logo-dark,
[data-theme="dark"] .brand-icon.logo-dark { 
    display: block !important; 
}

[data-theme="dark"] .logo-light, 
[data-theme="dark"] .footer-logo-light,
[data-theme="dark"] .brand-icon.logo-light { 
    display: none !important; 
}

.footer-logo-main {
    height: 36px;
    width: auto;
    margin-bottom: 0.8rem;
    display: inline-block;
    object-fit: contain;
}

.footer-attribution-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: transparent;
    border: none;
    padding: 0.3rem 0;
    border-radius: 0;
    box-shadow: none;
}

[data-theme="dark"] .footer-attribution-wrap {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.footer-logo-mini {
    height: 18px;
    width: auto;
    object-fit: contain;
}

.attribution-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.8;
}

.footer-enex-wrap {
    text-align: center;
    margin-bottom: 0.4rem;
}

.footer-enex-logo {
    height: 24px;
    width: auto;
    opacity: 0.7;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.footer-enex-logo:hover {
    opacity: 1;
    transform: scale(1.08);
}

/* ── UI FEEDBACK & TOASTS ──────────────────────────────────────────────────── */

.login-error {
    background: transparent !important;
    border: 1px solid transparent !important;
    padding: 1rem !important;
    border-radius: 12px !important;
    margin-bottom: 1.5rem !important;
    font-size: 0.9rem !important;
    display: none;
    align-items: center;
    gap: 0.8rem;
    backdrop-filter: blur(12px) !important;
    animation: slideDown 0.4s ease-out !important;
}

.login-error.danger {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

.login-error.success {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #10b981 !important;
}

.login-error i { font-size: 1.1rem !important; }

/* Dashboard Sidebar Footer Styles */
.dashboard-side-footer {
    margin-top: 2rem;
    padding: 1rem 0;
    text-align: center;
    color: #475569;
    font-size: 0.7rem;
    line-height: 1.5;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.dashboard-side-footer:hover {
    opacity: 1;
}

.dashboard-side-footer p {
    margin: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
}

.dashboard-side-footer .footer-links {
    margin: 0.3rem 0;
    font-size: 0.75rem;
}

.dashboard-side-footer .footer-links a {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}

.dashboard-side-footer .footer-links a:hover {
    color: #3b82f6;
}

/* Technical Typography */
.tech-font {
    font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace !important;
    letter-spacing: -0.02em;
    font-weight: 500;
}

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.01); opacity: 0.95; }
}

/* ── TOASTS (Premium Obsidian Style) ── */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 0.8rem;
    pointer-events: none;
    width: auto;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.8rem;
    border-radius: 16px;
    background: var(--obsidian-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    color: var(--obsidian-text-primary);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 90vw;
    min-width: 320px;
    border: 2px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.removing {
    opacity: 0;
    transform: translateY(-20px);
}

.toast-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.toast-accent {
    display: none;
}

/* Toast Variants */
.toast-success { border-color: rgba(16, 185, 129, 0.4); }
.toast-success .toast-icon-wrap { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.toast-error { border-color: rgba(239, 68, 68, 0.4); }
.toast-error .toast-icon-wrap { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.toast-warning { border-color: rgba(245, 158, 11, 0.4); }
.toast-warning .toast-icon-wrap { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.toast-info { border-color: rgba(59, 130, 246, 0.4); }
.toast-info .toast-icon-wrap { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

/* ── FORM VALIDATION ── */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.validation-msg {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeInDown 0.3s ease-out forwards;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

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


/* RESPONSIVIDAD */
@media (max-width: 1024px) {
    .visual-panel {
        display: none;
    }
    .auth-panel {
        flex: 1;
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .auth-panel {
        padding: 1rem;
    }
    .login-card {
        padding: 2rem 1.5rem;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .login-header {
        text-align: center;
    }
}

/* ── Login page: always light background ─────────────────────────────────── */
/* Overrides any data-theme="dark" that might bleed into the login body.     */
body.login-view,
[data-theme="dark"] body.login-view,
[data-theme="light"] body.login-view {
    background: #e8edf4 !important;
    --login-bg:          #e8edf4 !important;
    /* Light-mode CSS variables — always active on login */
    --text-primary:      #1e3a5f !important;
    --text-secondary:    #3b5e8a !important;
    --text-muted:        #64748b !important;
    /* Inputs: light-gray so they contrast against the white card */
    --input-bg:          #f1f5f9 !important;
    --input-border:      #cbd5e1 !important;
    --input-bg-focus:    #ffffff !important;
    /* Card: white with clear shadow and border */
    --login-card-bg:     #ffffff !important;
    --login-card-border: #dde3ec !important;
    --login-card-shadow: 0 8px 24px rgba(30, 58, 95, 0.10),
                         0 2px  6px rgba(30, 58, 95, 0.06) !important;
}

