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

:root {
    --g: #15803d; --gdk: #166534; --glite: #f0fdf4;
    --ink: #0f172a; --ink2: #374151; --mute: #6b7280;
    --line: #e5e7eb; --card: #fff; --bg: #f8fafc;
    --shadow: 0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
    --rg: 12px;
}

html, body { height: 100%; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* LEFT — branding panel */
.login-left {
    width: 42%;
    background: linear-gradient(160deg, #14532d 0%, #166534 50%, #15803d 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 3.5rem;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    top: -80px; right: -80px;
}
.login-left::after {
    content: '';
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
    bottom: -60px; left: -40px;
}

.login-brand {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.04em;
    margin-bottom: .4rem;
    position: relative; z-index: 1;
}
.login-brand span { color: #86efac; }

.login-tagline {
    color: #bbf7d0;
    font-size: .9rem;
    font-weight: 400;
    margin-bottom: 3rem;
    position: relative; z-index: 1;
}

.login-features {
    list-style: none;
    position: relative; z-index: 1;
}
.login-features li {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #d1fae5;
    font-size: .85rem;
    margin-bottom: .9rem;
}
.login-features li::before {
    content: '';
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(134,239,172,.25);
    border: 1.5px solid #86efac;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' fill='none' stroke='%2386efac' stroke-width='2.5' viewBox='0 0 24 24'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.login-footer-note {
    position: relative; z-index: 1;
    margin-top: auto;
    padding-top: 2.5rem;
    color: rgba(255,255,255,.7);
    font-size: .75rem;
}

/* RIGHT — form panel */
.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: var(--card);
}

.login-form-box {
    width: 100%;
    max-width: 380px;
}

.login-form-box h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: .3rem;
}
.login-form-box .login-sub {
    font-size: .85rem;
    color: var(--mute);
    margin-bottom: 2rem;
}

.form-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink2);
    margin-bottom: .35rem;
}
.form-control {
    border: 1.5px solid var(--line);
    border-radius: 8px;
    padding: .55rem .85rem;
    font-size: .9rem;
    font-family: 'Outfit', sans-serif;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    border-color: var(--g);
    box-shadow: 0 0 0 3px rgba(34,197,94,.12);
    outline: none;
}
.form-control.is-invalid { border-color: #ef4444; }
.invalid-feedback { font-size: .78rem; }

.btn-login {
    width: 100%;
    background: var(--g);
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: .95rem;
    font-weight: 600;
    padding: .65rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-top: .5rem;
}
.btn-login:hover { background: var(--gdk); }
.btn-login:active { transform: scale(.99); }

.form-check-input:checked { background-color: var(--g); border-color: var(--g); }
.form-check-label { font-size: .83rem; color: var(--mute); }

.forgot-link {
    font-size: .82rem;
    color: var(--mute);
    text-decoration: none;
    transition: color .15s;
}
.forgot-link:hover { color: var(--gdk); }

.divider {
    display: flex; align-items: center; gap: .8rem;
    margin: 1.5rem 0 1rem;
}
.divider hr { flex: 1; border-color: var(--line); }
.divider span { font-size: .75rem; color: var(--mute); white-space: nowrap; }

.register-link {
    text-align: center;
    font-size: .83rem;
    color: var(--mute);
    margin-top: 1.2rem;
}
.register-link a { color: var(--gdk); font-weight: 600; text-decoration: none; }
.register-link a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .login-left { display: none; }
    .login-right { padding: 2rem 1.25rem; background: var(--bg); }
    .login-form-box { max-width: 420px; }
}

/* Shared authentication states and compact-screen branding. */
.auth-mobile-brand { display: none; color: var(--ink); font-size: 1rem; font-weight: 800; margin-bottom: 2rem; }
.auth-mobile-brand span { color: var(--g); }
.login-form-box { max-width: 420px; }
.login-form-box .login-sub { line-height: 1.6; }
.login-form-box .form-control { min-height: 46px; }
.login-form-box .btn-login { min-height: 46px; }
.login-form-box .form-control.is-invalid:focus { border-color: #dc2626; box-shadow: 0 0 0 3px #fee2e2; }
.login-form-box .code-input { font-size: 1.5rem; font-variant-numeric: tabular-nums; letter-spacing: .35em; text-align: center; }
.login-form-box .auth-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.login-form-box .auth-actions form { flex: 1 1 100%; }
.login-form-box .auth-actions .btn { width: 100%; min-height: 44px; }
.login-form-box .alert { font-size: .875rem; line-height: 1.6; }
.login-form-box .auth-steps { padding-left: 1.25rem; color: var(--ink2); font-size: .9rem; line-height: 1.8; }
.login-form-box :where(a, button, input:not(.form-control)):focus-visible { outline: 2px solid var(--g); outline-offset: 3px; }
@media (max-width: 768px) {
    .auth-mobile-brand { display: block; }
    .login-form-box { padding: 1.5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
    .login-form-box .form-control { font-size: 16px; }
    .login-right { min-height: 100dvh; padding: 1.5rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
}
