/* ═══════════════════════════════════════════════════
   LOGIN PAGE — Redesign Pro
   Style: Soft UI Evolution + Swiss Modernism
   Typography: Plus Jakarta Sans
   Palette: CRM Professional (Indigo + Trust Blue)
   ═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: #f0f2f8;
    background-image:
        radial-gradient(ellipse at 15% 50%, rgba(99,102,241,0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(139,92,246,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(59,130,246,0.04) 0%, transparent 50%);
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

/* ── Card ── */
.login-card {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 44px 40px;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.03),
        0 4px 12px rgba(0,0,0,0.04),
        0 16px 40px rgba(99,102,241,0.06);
    transition: box-shadow 0.3s;
}
.login-card:hover {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.03),
        0 4px 12px rgba(0,0,0,0.05),
        0 20px 50px rgba(99,102,241,0.08);
}

/* ── Brand ── */
.login-brand {
    text-align: center;
    margin-bottom: 36px;
}
.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(99,102,241,0.25);
}
.login-logo svg { stroke: #fff !important; }
.login-brand-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
}
.login-brand-sub {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 4px;
    font-weight: 400;
}

/* ── Alerts ── */
.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: none;
    line-height: 1.5;
}
.login-error.visible { display: block; animation: shakeSubtle 0.4s ease; }

@keyframes shakeSubtle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.login-warning {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ── Form ── */
.form-group {
    margin-bottom: 18px;
}
.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}
.form-label svg {
    color: #94a3b8;
    flex-shrink: 0;
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.88rem;
    color: #0f172a;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}
.form-input::placeholder {
    color: #94a3b8;
}
.form-input:hover {
    border-color: #cbd5e1;
    background: #fff;
}
.form-input:focus {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.08);
}

/* ── Password ── */
.password-wrap {
    position: relative;
}
.password-wrap .form-input {
    padding-right: 46px;
}
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: color 0.15s;
}
.password-toggle:hover { color: #6366f1; }

/* ── Button ── */
.login-btn {
    width: 100%;
    padding: 13px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}
.login-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #6d28d9);
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
    transform: translateY(-1px);
}
.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(99,102,241,0.2);
}

/* ── Footer ── */
.login-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 0.68rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 400;
}

/* ── Register Link ── */
.login-register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.82rem;
    color: #64748b;
}
.login-register-link a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
}
.login-register-link a:hover {
    text-decoration: underline;
}

/* ── 2FA Section ── */
.totp-section {
    text-align: center;
    padding: 8px 0 20px;
}
.totp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(99,102,241,0.2);
}
.totp-icon svg { stroke: #fff !important; }
.totp-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
}
.totp-desc {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 24px;
    line-height: 1.5;
}
.totp-input-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.totp-input {
    width: 200px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    font-family: 'SF Mono', 'Fira Code', monospace;
    transition: all 0.2s;
}
.totp-input:focus {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.totp-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0;
}
.login-back-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
}
.login-back-link:hover { color: #6366f1; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        border-radius: 16px;
    }
    .login-brand-name { font-size: 1.4rem; }
    .login-container { padding: 16px; }
}
