@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

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

html, body { height: 100%; }

body {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #071B49;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }

/* ── Design tokens ──────────────────────────────────────────── */
:root {
    --navy:         #03153D;
    --primary-dark: #071B49;
    --accent:       #F5B400;
    --accent-hover: #d9a000;
    --border:       #e5e7eb;
    --text-muted:   #6b7280;
    --text-light:   rgba(255,255,255,0.65);
    --red:          #dc2626;
    --green:        #15803d;
    --radius:       10px;
}

/* ── Shell ──────────────────────────────────────────────────── */
.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ── Left panel ─────────────────────────────────────────────── */
.auth-panel {
    background: var(--navy);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 48px 52px;
}

/* decorative blobs */
.auth-panel::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,180,0,0.15) 0%, transparent 70%);
    top: -80px;
    right: -100px;
    pointer-events: none;
}
.auth-panel::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    bottom: 60px;
    left: -60px;
    pointer-events: none;
}

.auth-panel-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.5px;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.auth-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-panel-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 16px;
}

.auth-panel-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 20px;
}

.auth-panel-title span {
    color: var(--accent);
}

.auth-panel-sub {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.75;
    max-width: 320px;
}

.auth-panel-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 36px;
}

.auth-panel-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.auth-panel-features li::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(245,180,0,0.15);
    border: 1.5px solid rgba(245,180,0,0.4);
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23F5B400' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}

.auth-panel-footer {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    position: relative;
    z-index: 1;
}

.auth-panel-footer a {
    color: rgba(255,255,255,0.45);
    transition: color 150ms ease;
}

.auth-panel-footer a:hover {
    color: rgba(255,255,255,0.7);
}

/* ── Right panel (form side) ────────────────────────────────── */
.auth-form-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 52px;
    background: #fff;
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 380px;
}

/* Back to home link */
.auth-home-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 36px;
    transition: color 150ms ease;
}

.auth-home-link:hover {
    color: var(--primary-dark);
}

.auth-home-link svg {
    display: inline-block;
}

/* Form heading */
.auth-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
    margin-bottom: 6px;
}

.auth-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Form groups */
.auth-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 18px;
}

.auth-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--primary-dark);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    line-height: 1.5;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    appearance: none;
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,180,0,0.15);
}

.auth-input.is-error {
    border-color: var(--red);
}

.auth-input.is-error:focus {
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.auth-error {
    font-size: 12px;
    color: var(--red);
}

/* Row layout for remember + forgot */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.auth-link {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 150ms ease;
}

.auth-link:hover {
    color: var(--primary-dark);
}

.auth-link-accent {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    transition: color 150ms ease;
}

.auth-link-accent:hover {
    color: var(--accent-hover);
}

/* Submit button */
.auth-btn {
    width: 100%;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    color: var(--primary-dark);
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 150ms ease, transform 100ms ease;
    margin-bottom: 20px;
}

.auth-btn:hover {
    background: var(--accent-hover);
}

.auth-btn:active {
    transform: scale(0.99);
}

/* Footer switch-page link */
.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--green);
}

.auth-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--red);
}

/* 2FA toggle button */
.auth-toggle-btn {
    background: none;
    border: none;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: color 150ms ease;
    display: block;
    margin: 12px auto 0;
}

.auth-toggle-btn:hover {
    color: var(--primary-dark);
}

/* Logout link (verify page) */
.auth-logout-btn {
    display: block;
    background: none;
    border: none;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    margin: 12px auto 0;
    font-family: inherit;
    transition: color 150ms ease;
}

.auth-logout-btn:hover {
    color: var(--primary-dark);
}

/* ── Account type toggle (register pages) ───────────────────── */
.auth-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 28px;
}

.auth-type-opt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
    white-space: nowrap;
}

.auth-type-opt.is-active {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 1px 4px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.04);
    cursor: default;
}

.auth-type-opt.is-inactive {
    background: transparent;
    color: var(--text-muted);
}

.auth-type-opt.is-inactive:hover {
    color: var(--primary-dark);
    background: rgba(0,0,0,0.03);
}

.auth-type-opt svg {
    flex-shrink: 0;
}

/* ── Mobile — stack vertically ──────────────────────────────── */
@media (max-width: 768px) {
    .auth-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .auth-panel {
        padding: 28px 24px 32px;
        min-height: auto;
    }

    .auth-panel::before, .auth-panel::after { display: none; }

    .auth-panel-body { display: none; }

    .auth-panel-footer { display: none; }

    .auth-form-side {
        padding: 32px 24px 48px;
        justify-content: flex-start;
    }

    .auth-form-inner {
        max-width: 100%;
    }

    .auth-home-link {
        margin-bottom: 28px;
    }
}
