:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --secondary: #c9a227;
    --accent: #38b2ac;
    --dark: #1a202c;
    --light: #f7fafc;
    --gray: #718096;
    --border: #e2e8f0;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--dark);
}

/* ── Layout ──────────────────────────────── */
.login-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Left Panel ──────────────────────────── */
.login-panel-left {
    flex: 1 1 45%;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 3.5rem;
    position: relative;
    overflow: hidden;
}

.login-panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(201,162,39,0.12) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(56,178,172,0.10) 0%, transparent 50%);
    pointer-events: none;
}

.login-panel-left::after {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
}

.left-logo { position: relative; z-index: 1; }

.left-logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.left-logo img { height: 44px; border-radius: 50%; }

.left-logo span { font-size: 1.4rem; font-weight: 800; color: white; }

.left-logo span em { font-style: normal; color: var(--secondary); }

.left-body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}

.left-body h2 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.left-body p {
    color: rgba(255,255,255,0.70);
    font-size: 0.975rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 380px;
}

.left-features { list-style: none; padding: 0; margin: 0 0 2rem; }

.left-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1.1rem;
}

.left-features li .feat-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,0.10);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px;
}

.left-features li .feat-icon i { font-size: 1rem; color: var(--secondary); }

.left-features li .feat-text strong {
    display: block; color: white; font-size: 0.9rem; font-weight: 600;
}

.left-features li .feat-text span { color: rgba(255,255,255,0.60); font-size: 0.82rem; }

.left-footer { position: relative; z-index: 1; }

.security-badges { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.security-badge {
    display: flex; align-items: center; gap: 0.4rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50px;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem; color: rgba(255,255,255,0.80); font-weight: 500;
}

.security-badge i { color: #48bb78; font-size: 0.85rem; }

/* ── Right Panel ─────────────────────────── */
.login-panel-right {
    flex: 1 1 55%;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
}

.login-form-wrap { width: 100%; max-width: 440px; }

.form-heading { margin-bottom: 2rem; }

.form-heading h1 {
    font-size: 1.85rem; font-weight: 800; color: var(--dark); margin-bottom: 0.4rem;
}

.form-heading p { color: var(--gray); font-size: 0.95rem; }

.form-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    border: 1px solid var(--border);
}

.form-label {
    font-weight: 600; font-size: 0.875rem; color: var(--dark); margin-bottom: 0.4rem;
}

.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
    background: #fafafa;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,54,93,0.10);
    background: white;
    outline: none;
}

.input-group .form-control { border-right: none; border-radius: 8px 0 0 8px; }

.input-group-text {
    border-radius: 0 8px 8px 0;
    border: 1.5px solid var(--border);
    border-left: none;
    background: #fafafa;
    cursor: pointer;
    transition: background 0.2s ease;
}

.input-group-text:hover { background: #edf2f7; }

.input-group:focus-within .form-control,
.input-group:focus-within .input-group-text { border-color: var(--primary); }

.input-group:focus-within .input-group-text {
    box-shadow: 3px 0 0 3px rgba(26,54,93,0.10) inset;
}

.btn-signin {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-weight: 700;
    font-size: 0.975rem;
    width: 100%;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}

.btn-signin:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26,54,93,0.22);
    color: white;
}

.btn-signin:disabled { opacity: 0.75; }

.form-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.form-footer-links a { color: var(--primary); text-decoration: none; font-weight: 500; }
.form-footer-links a:hover { text-decoration: underline; }

.secure-note {
    margin-top: 1.5rem;
    display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    font-size: 0.78rem; color: var(--gray);
}

.secure-note i { color: #48bb78; }

/* ── Honeypot ── */
.hp-field {
    position: absolute;
    left: -9999px; top: -9999px;
    opacity: 0; height: 0; width: 0; overflow: hidden;
}

/* ── Step transitions ── */
.login-step { transition: opacity 0.35s ease, transform 0.35s ease; }
.login-step.hidden { display: none; }

/* ── MFA OTP boxes ── */
.otp-wrap {
    display: flex; gap: 0.6rem; justify-content: center; margin: 1.5rem 0;
}

.otp-box {
    width: 48px; height: 56px;
    text-align: center;
    font-size: 1.5rem; font-weight: 800;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: #fafafa; color: var(--dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none; caret-color: transparent;
}

.otp-box:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,54,93,0.10);
    background: white;
}

.otp-box.filled { border-color: var(--primary); background: #f0f4ff; }

.mfa-sent-notice {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    display: flex; align-items: flex-start; gap: 0.6rem;
    font-size: 0.875rem; color: #166534;
}

.mfa-sent-notice i { margin-top: 1px; flex-shrink: 0; font-size: 1rem; }

.btn-back {
    background: none; border: none;
    color: var(--gray); font-size: 0.875rem; font-weight: 500;
    cursor: pointer; padding: 0;
    display: flex; align-items: center; gap: 0.3rem;
    transition: color 0.2s ease;
}

.btn-back:hover { color: var(--dark); }

.resend-row {
    display: flex; justify-content: center;
    margin-top: 1rem;
    font-size: 0.85rem; color: var(--gray); gap: 0.3rem;
}

.btn-resend {
    background: none; border: none;
    color: var(--primary); font-weight: 600; font-size: 0.85rem;
    cursor: pointer; padding: 0;
    transition: opacity 0.2s;
}

.btn-resend:disabled { opacity: 0.5; cursor: default; }

/* ── Responsive ──────────────────────────── */
@media (max-width: 900px) {
    .login-panel-left { display: none; }
    .login-panel-right { flex: 1; background: white; padding: 2rem 1.25rem; }
}
