/* =====================================================================
   Login / Register / PIN screens - split layout
   ===================================================================== */

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- Left brand panel ---------- */
.auth-hero {
    position: relative;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(180deg, #5f7f6e 0%, #2f5443 38%, #1a3d2b 70%, #0c2417 100%);
}

.auth-hero__mountains {
    position: absolute; left: 0; bottom: 0;
    width: 100%; height: 75%;
    stroke: none;
}

.auth-hero__content {
    position: relative;
    margin: auto 0;
    text-align: center;
    display: grid; justify-items: center; gap: 8px;
}

.auth-hero__logo { width: 96px; height: 96px; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .35)); }
.auth-hero__brand { font-size: 44px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.auth-hero__tagline { font-size: 20px; line-height: 1.35; opacity: .92; margin-top: 4px; }

.auth-hero__features {
    position: relative;
    display: flex; justify-content: center; gap: 48px;
    margin: 0; padding: 0; list-style: none;
    font-size: 14px; font-weight: 500;
}
.auth-hero__features li { display: grid; justify-items: center; gap: 8px; }
.auth-hero__features svg { width: 28px; height: 28px; stroke-width: 1.6; }

/* ---------- Right form panel ---------- */
.auth-panel {
    display: grid; place-items: center;
    padding: 48px 16px;
    background: var(--bg);
}

.auth-card {
    width: 100%; max-width: 420px;
    display: grid; gap: 20px;
    padding: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-card__brand { display: none; }
.auth-card__brand,
.auth-card__brand--always {
    align-items: center; justify-content: center; gap: 10px;
    font-size: 24px; font-weight: 600; letter-spacing: -.02em;
}
.auth-card__brand--always { display: flex; }
.auth-card__brand img { width: 48px; height: 48px; }

.auth-card__title { display: grid; gap: 4px; text-align: center; }
.auth-card__title h1 { font-size: 22px; }
.auth-card__title p { font-size: 14px; color: var(--text-muted); }

.auth-card__footer { text-align: center; font-size: 14px; color: var(--text-muted); }

/* Log in / Sign up tabs */
.tabs {
    display: grid; grid-template-columns: 1fr 1fr;
    padding: 4px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}
.tabs__item {
    display: grid; place-items: center;
    height: 38px; border-radius: 6px;
    font-size: 14px; font-weight: 600; color: var(--text-muted);
}
.tabs__item:hover { text-decoration: none; color: var(--text); }
.tabs__item.is-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.form-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    font-size: 14px;
}
.form-row + .hint,
.field-pair__hint { margin-top: -8px; }

/* ---------- Forgot password ---------- */
.sent-icon {
    display: grid; place-items: center; justify-self: center;
    width: 56px; height: 56px; margin-bottom: 4px; border-radius: 50%;
    background: var(--primary-soft); color: var(--primary);
}
.sent-icon svg { width: 28px; height: 28px; }
.dev-note { font-size: 13px; word-break: break-all; }
.dev-note a { font-weight: 400; }

/* ---------- PIN mode ---------- */
.pin-head { display: grid; justify-items: center; gap: 8px; text-align: center; }
.pin-head h1 { font-size: 22px; margin-top: 4px; }
.pin-head p { font-size: 14px; }

.pin-input {
    height: 60px !important;
    text-align: center;
    font-size: 28px !important;
    letter-spacing: .5em;
    padding-left: .5em !important;   /* balance the trailing letter-spacing */
    font-variant-numeric: tabular-nums;
}

.pin-links {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
    font-size: 14px;
}
.pin-links form { margin: 0; }

/* ---------- Onboarding ---------- */
.onboarding {
    min-height: 100vh; min-height: 100dvh;
    display: grid; place-items: center;
    padding: 32px 16px;
}
.onboarding__card { max-width: 460px; }
.onboarding__title { display: grid; gap: 4px; }
.onboarding__title h1 { font-size: 20px; }
.onboarding__title p { font-size: 14px; }
.onboarding__skip { justify-self: center; color: var(--text-muted); }
.onboarding__back { justify-self: start; font-size: 14px; color: var(--text-muted); }

.stepper {
    display: grid; grid-template-columns: repeat(3, 1fr);
    margin: 0; padding: 0; list-style: none;
    counter-reset: none;
}
.stepper__item {
    position: relative;
    display: grid; justify-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted);
}
/* connecting line between dots */
.stepper__item + .stepper__item::before {
    content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px;
    background: var(--border); z-index: 0;
}
.stepper__item.is-done + .stepper__item::before,
.stepper__item.is-done + .stepper__item.is-current::before { background: var(--primary); }
.stepper__dot {
    position: relative; z-index: 1;
    display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--border);
    font-weight: 600; font-size: 14px;
}
.stepper__item.is-current { color: var(--text); font-weight: 600; }
.stepper__item.is-current .stepper__dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.stepper__item.is-done .stepper__dot { border-color: var(--primary); color: var(--primary); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .auth { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-panel { place-items: start center; padding: 32px 16px; }
    .auth-card { padding: 24px 20px; }
    .auth-card__brand { display: flex; }
}

@media (max-width: 380px) {
    .form-row { flex-direction: column; align-items: flex-start; }
}
