/* Extraído de Areas/Identity/Pages/Account/Login.cshtml (sep-2026). El CSS escrito dentro de una vista se compila en
   smmc.dll y ese texto tiene tope (error CS8103): acá no suma. Ver docs/contexto/vistas-y-compilacion.md. */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, var(--lapis-lazuli) 0%, var(--oxford-blue) 50%, var(--space-cadet) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}



/* Login Container */
.login-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    min-height: 500px;
}

/* Dark Theme - Login Card */
[data-bs-theme="dark"] .login-card {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Left Side - Brand */
.login-brand {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    flex: 1;
}
.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.brand-logo i {
    font-size: 2.75rem;
}

.brand-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.brand-features {
    text-align: left;
    margin-top: 1.25rem;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
}

.brand-feature i {
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.6rem;
    border-radius: 8px;
}

/* Right Side - Form */
.login-form-container {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-header h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--oxford-blue);
    margin-bottom: 0.4rem;
}

.login-header p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Dark Theme - Login Header */
[data-bs-theme="dark"] .login-header h1 {
    color: #F5F5F5;
}

[data-bs-theme="dark"] .login-header p {
    color: #BDBDBD;
}

/* Form Styles */
.form-floating-custom {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-floating-custom .form-control {
    height: 48px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.85rem 0.85rem 0.85rem 3rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-floating-custom .form-control:focus {
    border-color: var(--lapis-lazuli);
    box-shadow: 0 0 0 4px rgba(var(--lapis-lazuli-rgb), 0.1);
    background: white;
}

/* Dark Theme - Form Control */
[data-bs-theme="dark"] .form-floating-custom .form-control {
    border-color: rgba(255, 255, 255, 0.15);
    background: #2a2a2a;
    color: #F5F5F5;
}

[data-bs-theme="dark"] .form-floating-custom .form-control:focus {
    border-color: #386593;
    background: #2a2a2a;
    box-shadow: 0 0 0 4px rgba(56, 101, 147, 0.25);
    color: #F5F5F5;
}

[data-bs-theme="dark"] .form-floating-custom .form-control::placeholder {
    color: #BDBDBD;
}

.form-floating-custom .form-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 1;
}

.form-floating-custom .form-control:focus ~ .form-icon {
    color: var(--lapis-lazuli);
}

.form-floating-custom label {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 0.25rem;
}

.form-floating-custom .form-control:focus ~ label,
.form-floating-custom .form-control:not(:placeholder-shown) ~ label {
    top: -0.5rem;
    left: 2.75rem;
    font-size: 0.7rem;
    color: var(--lapis-lazuli);
    background: white;
    padding: 0 0.5rem;
}

/* Dark Theme - Form Icon and Label */
[data-bs-theme="dark"] .form-floating-custom .form-icon {
    color: #BDBDBD;
}

[data-bs-theme="dark"] .form-floating-custom .form-control:focus ~ .form-icon {
    color: #5893c5;
}

[data-bs-theme="dark"] .form-floating-custom label {
    color: #BDBDBD;
}

[data-bs-theme="dark"] .form-floating-custom .form-control:focus ~ label,
[data-bs-theme="dark"] .form-floating-custom .form-control:not(:placeholder-shown) ~ label {
    color: #5893c5;
    background: #2a2a2a;
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.remember-me .form-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.remember-me .form-check-input {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid #dee2e6;
    cursor: pointer;
}

.remember-me .form-check-input:checked {
    background-color: var(--lapis-lazuli);
    border-color: var(--lapis-lazuli);
}

.forgot-password {
    color: var(--lapis-lazuli);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--oxford-blue);
    text-decoration: underline;
}

/* Dark Theme - Remember Me & Forgot Password */
[data-bs-theme="dark"] .remember-me {
    color: #F5F5F5;
}

[data-bs-theme="dark"] .remember-me .form-check-label {
    color: #F5F5F5;
}

[data-bs-theme="dark"] .remember-me .form-check-input {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: #2a2a2a;
}

[data-bs-theme="dark"] .remember-me .form-check-input:checked {
    background-color: #386593;
    border-color: #386593;
}

[data-bs-theme="dark"] .forgot-password {
    color: #5893c5;
}

[data-bs-theme="dark"] .forgot-password:hover {
    color: #7ab5ff;
}

/* Submit Button */
.btn-login {
    height: 48px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--lapis-lazuli-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--lapis-lazuli-rgb), 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* Register Link */
.register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.register-link p {
    color: #6c757d;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.register-link a {
    color: var(--lapis-lazuli);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: var(--oxford-blue);
    text-decoration: underline;
}

/* Dark Theme - Register Link */
[data-bs-theme="dark"] .register-link {
    border-top-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .register-link p {
    color: #BDBDBD;
}

[data-bs-theme="dark"] .register-link a {
    color: #5893c5;
}

[data-bs-theme="dark"] .register-link a:hover {
    color: #7ab5ff;
}

/* Validation */
.text-danger {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.validation-summary-errors {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.5rem;
}

/* Dark Theme - Validation */
[data-bs-theme="dark"] .validation-summary-errors {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #ff8a9b;
}

[data-bs-theme="dark"] .validation-summary-errors li {
    color: #ff8a9b;
}

/* Responsive */
/* Pantallas grandes (1600px+) */
@media (min-width: 1600px) {
    .login-container {
        max-width: 1000px;
    }

    .login-card {
        min-height: 620px;
    }

    .login-brand {
        padding: 3rem;
    }

    .brand-logo {
        width: 110px;
        height: 110px;
        margin-bottom: 1.5rem;
    }

    .brand-logo i {
        font-size: 3.25rem;
    }

    .brand-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .brand-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .brand-features {
        margin-top: 2rem;
    }

    .brand-feature {
        gap: 1rem;
        margin-bottom: 1rem;
        padding: 0.75rem;
        font-size: 1rem;
    }

    .brand-feature i {
        font-size: 1.5rem;
        padding: 0.75rem;
    }

    .login-form-container {
        padding: 3rem;
    }

    .login-header {
        margin-bottom: 2.5rem;
    }

    .login-header h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .login-header p {
        font-size: 1rem;
    }

    .form-floating-custom {
        margin-bottom: 1.5rem;
    }

    .form-floating-custom .form-control {
        height: 56px;
        padding: 1rem 1rem 1rem 3.5rem;
        font-size: 1rem;
    }

    .form-floating-custom .form-icon {
        left: 1rem;
        font-size: 1.25rem;
    }

    .form-floating-custom label {
        left: 3.5rem;
        font-size: 1rem;
    }

    .form-floating-custom .form-control:focus ~ label,
    .form-floating-custom .form-control:not(:placeholder-shown) ~ label {
        left: 3rem;
        font-size: 0.75rem;
    }

    .remember-me {
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }

    .remember-me .form-check {
        gap: 0.5rem;
    }

    .remember-me .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
    }

    .btn-login {
        height: 56px;
        font-size: 1.125rem;
    }

    .register-link {
        margin-top: 2rem;
        padding-top: 2rem;
    }

    .register-link p {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .register-link a {
        font-size: 1rem;
    }

    .theme-toggle-login {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Pantallas medianas-grandes (1400px - 1599px) */
@media (min-width: 1400px) and (max-width: 1599px) {
    .login-container {
        max-width: 900px;
    }

    .login-card {
        min-height: 560px;
    }

    .login-brand {
        padding: 2.5rem;
    }

    .brand-logo {
        width: 100px;
        height: 100px;
    }

    .brand-logo i {
        font-size: 3rem;
    }

    .brand-title {
        font-size: 2.25rem;
    }

    .brand-subtitle {
        font-size: 1.05rem;
    }

    .login-form-container {
        padding: 2.5rem;
    }

    .login-header h1 {
        font-size: 1.85rem;
    }

    .login-header p {
        font-size: 0.95rem;
    }

    .form-floating-custom .form-control {
        height: 52px;
        font-size: 0.975rem;
    }

    .btn-login {
        height: 52px;
        font-size: 1.05rem;
    }
}

/* Tablets y pantallas medianas (769px - 1399px) - valores base ya definidos */

/* Mobile */
@media (max-width: 768px) {
    .login-card {
        flex-direction: column;
        min-height: auto;
    }

    .login-brand {
        padding: 2rem;
        min-height: 280px;
    }

    .brand-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }

    .brand-logo i {
        font-size: 2.25rem;
    }

    .brand-features {
        display: none;
    }

    .login-form-container {
        padding: 1.5rem;
    }

    .login-header {
        margin-bottom: 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-header p {
        font-size: 0.85rem;
    }

    .brand-title {
        font-size: 1.75rem;
    }

    .brand-subtitle {
        font-size: 0.875rem;
    }

    .form-floating-custom .form-control {
        height: 44px;
        font-size: 0.9rem;
    }

    .btn-login {
        height: 44px;
        font-size: 0.95rem;
    }

    .theme-toggle-login {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
        top: 0.75rem;
        right: 0.75rem;
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-brand {
        padding: 1.5rem;
        min-height: 220px;
    }

    .brand-logo {
        width: 60px;
        height: 60px;
    }

    .brand-logo i {
        font-size: 2rem;
    }

    .brand-title {
        font-size: 1.5rem;
    }

    .brand-subtitle {
        font-size: 0.8rem;
    }

    .login-form-container {
        padding: 1.25rem;
    }

    .login-header h1 {
        font-size: 1.35rem;
    }

    .register-link {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }
}

/* Loading Animation */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Theme Toggle Button */
.theme-toggle-login {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(56, 101, 147, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #386593;
    font-size: 1.1rem;
}

.theme-toggle-login:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #386593;
    box-shadow: 0 4px 12px rgba(56, 101, 147, 0.2);
    transform: rotate(20deg);
}

/* Dark Theme - Theme Toggle */
[data-bs-theme="dark"] .theme-toggle-login {
    background: rgba(42, 42, 42, 0.9);
    border-color: rgba(88, 147, 197, 0.3);
    color: #5893c5;
}

[data-bs-theme="dark"] .theme-toggle-login:hover {
    background: rgba(42, 42, 42, 1);
    border-color: #5893c5;
    box-shadow: 0 4px 12px rgba(88, 147, 197, 0.3);
}

/* ════════════════════════════════════════════════════════════
   DARK MODE — REDISEÑO COMPLETO (glassmorphism neutro)
   Reemplaza los estilos previos de modo oscuro con una
   paleta zinc neutra + azul vibrante para CTA.
   Zinc: 950=#09090b 900=#18181b 800=#27272a 700=#3f3f46
         600=#52525b 400=#a1a1aa 300=#d4d4d8
   Blue: 600=#2563eb 500=#3b82f6 400=#60a5fa 300=#93c5fd
   ════════════════════════════════════════════════════════════ */

/* 1. Fondo: gradiente radial neutro puro */
[data-bs-theme="dark"] body {
    background: radial-gradient(ellipse at top,
        #27272a 0%, #09090b 55%, #000000 100%);
    color: #d4d4d8;
}

/* 2a. Brand lateral — mismo fondo neutro que el form en dark */
[data-bs-theme="dark"] .login-brand {
    background: rgba(24, 24, 27, 0.96);
    border-right: 1px solid rgba(63, 63, 70, 0.40);
    border-bottom: 1px solid rgba(63, 63, 70, 0.40);
}

/* 2b. Card: glassmorphism oscuro neutro */
[data-bs-theme="dark"] .login-card {
    background: rgba(24, 24, 27, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(63, 63, 70, 0.50);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65),
                0 0 0 1px rgba(63, 63, 70, 0.20);
}

/* 3. Encabezado */
[data-bs-theme="dark"] .login-header h1 { color: #ffffff; }
[data-bs-theme="dark"] .login-header p  { color: #a1a1aa; }

/* 4. Inputs — fondo zinc-950, sin blanco */
[data-bs-theme="dark"] .form-floating-custom .form-control {
    border-color: #3f3f46;
    background: #09090b;
    color: #ffffff;
}
[data-bs-theme="dark"] .form-floating-custom .form-control:focus {
    border-color: #3b82f6;
    background: #09090b;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.20);
    color: #ffffff;
}
[data-bs-theme="dark"] .form-floating-custom .form-control::placeholder {
    color: #52525b;
}

/* Iconos del input */
[data-bs-theme="dark"] .form-floating-custom .form-icon {
    color: #71717a;
}
[data-bs-theme="dark"] .form-floating-custom .form-control:focus ~ .form-icon {
    color: #60a5fa;
}

/* Labels flotantes — fondo zinc-900 para tapar el borde */
[data-bs-theme="dark"] .form-floating-custom label {
    color: #a1a1aa;
}
[data-bs-theme="dark"] .form-floating-custom .form-control:focus ~ label,
[data-bs-theme="dark"] .form-floating-custom .form-control:not(:placeholder-shown) ~ label {
    color: #60a5fa;
    background: #18181b;
}

/* 5. Recordarme y olvidé contraseña */
[data-bs-theme="dark"] .remember-me,
[data-bs-theme="dark"] .remember-me .form-check-label { color: #d4d4d8; }

[data-bs-theme="dark"] .remember-me .form-check-input {
    border-color: #52525b;
    background-color: #09090b;
}
[data-bs-theme="dark"] .remember-me .form-check-input:hover {
    border-color: #60a5fa;
}
[data-bs-theme="dark"] .remember-me .form-check-input:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

[data-bs-theme="dark"] .forgot-password       { color: #60a5fa; }
[data-bs-theme="dark"] .forgot-password:hover { color: #93c5fd; }

/* 6. Botón CTA — azul vibrante con glow */
[data-bs-theme="dark"] .btn-login {
    background: #2563eb;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}
[data-bs-theme="dark"] .btn-login:hover {
    background: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}
[data-bs-theme="dark"] .btn-login:active { transform: translateY(0); }

/* 7. Pie / Crear cuenta */
[data-bs-theme="dark"] .register-link {
    border-top-color: rgba(39, 39, 42, 0.60);
}
[data-bs-theme="dark"] .register-link p         { color: #a1a1aa; }
[data-bs-theme="dark"] .register-link a         { color: #60a5fa; }
[data-bs-theme="dark"] .register-link a:hover   { color: #93c5fd; }

/* 8. Validación */
[data-bs-theme="dark"] .validation-summary-errors {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.40);
    color: #fca5a5;
}
[data-bs-theme="dark"] .validation-summary-errors li { color: #fca5a5; }

/* 9. Theme toggle */
[data-bs-theme="dark"] .theme-toggle-login {
    background: rgba(24, 24, 27, 0.92);
    border-color: rgba(63, 63, 70, 0.50);
    color: #60a5fa;
}
[data-bs-theme="dark"] .theme-toggle-login:hover {
    background: rgba(39, 39, 42, 1);
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.25);
}
