/* ============================================
   BIV LOGIN PAGE - MODERN GLASSMORPHISM
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F0F9FF 0%, #EEF2FF 50%, #F5F3FF 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative background shapes */
.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(14, 165, 233, 0.1));
    border-radius: 50%;
    top: -200px;
    right: -200px;
    filter: blur(60px);
    animation: float 20s infinite ease-in-out;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.1), rgba(99, 102, 241, 0.08));
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    filter: blur(40px);
    animation: float 25s infinite ease-in-out reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-30px, -30px) scale(1.05);
    }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 0 24px;
}

/* Card chính */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 8px 10px -6px rgba(0, 0, 0, 0.02),
        0 0 0 1px rgba(148, 163, 184, 0.1);
    padding: 48px 40px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Logo Section */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    position: relative;
}

.login-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-logo p {
    font-size: 15px;
    color: #64748B;
    margin: 0;
}

/* Form styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-input {
    padding: 14px 16px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 15px;
    color: #0F172A;
    background: #FFFFFF;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.form-input:hover {
    border-color: #CBD5E1;
}

.form-input:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: #FAFAFF;
}

.form-input::placeholder {
    color: #94A3B8;
}

/* Password field with toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #6366F1;
}

/* Options row */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-top: 4px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366F1;
    cursor: pointer;
}

.forgot-password {
    color: #6366F1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #4F46E5;
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3),
        0 10px 15px -3px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(99, 102, 241, 0.4),
        0 15px 20px -3px rgba(99, 102, 241, 0.3);
}

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

.btn-login::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: left 0.5s;
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Error message */
.login-error-msg {
    background: rgba(239, 68, 68, 0.08);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    text-align: left;
    display: none;
}

/* Security badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #F1F5F9;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748B;
}

.security-badge svg {
    width: 20px;
    height: 20px;
    color: #10B981;
    flex-shrink: 0;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: #94A3B8;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .login-logo h1 {
        font-size: 24px;
    }

    .security-badges {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
html[data-theme="dark"] .login-page {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
}

html[data-theme="dark"] .login-page::before {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(14, 165, 233, 0.15));
}

html[data-theme="dark"] .login-page::after {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(99, 102, 241, 0.12));
}

html[data-theme="dark"] .login-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .login-logo h1 {
    color: #F8FAFC;
}

html[data-theme="dark"] .login-logo p {
    color: #94A3B8;
}

html[data-theme="dark"] .form-label {
    color: #CBD5E1;
}

html[data-theme="dark"] .form-input {
    background: rgba(15, 23, 42, 0.8);
    border-color: #334155;
    color: #F8FAFC;
}

html[data-theme="dark"] .form-input:hover {
    border-color: #475569;
}

html[data-theme="dark"] .form-input:focus {
    border-color: #6366F1;
    background: rgba(15, 23, 42, 0.9);
}

html[data-theme="dark"] .form-input::placeholder {
    color: #64748B;
}

html[data-theme="dark"] .login-error-msg {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
    border-color: rgba(239, 68, 68, 0.3);
}

html[data-theme="dark"] .security-badges {
    border-top-color: #334155;
}

html[data-theme="dark"] .security-badge {
    color: #94A3B8;
}

html[data-theme="dark"] .login-footer {
    color: #64748B;
}

/* ─── SPA Login Overlay variant ────────────── */
.login-overlay.login-page {
    position: fixed;
    inset: 0;
    z-index: 10000;
}