/* ==========================================================================
   Authentication pages — masuk, daftar, pemulihan kata sandi
   Split layout: the left half carries the brand story in the same dark-teal
   language as the home hero; the right half is a plain white form column.
   Consumes tokens from design-system.css.
   ========================================================================== */

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: calc(100vh - 72px);
    /* main is .container-fluid; bleed to the viewport edges */
    margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
    background: var(--surface);
}

/* --------------------------------------------------------------------------
   Brand half
   -------------------------------------------------------------------------- */

.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.9rem;
    padding: clamp(2.5rem, 5vw, 4.5rem);
    color: #e6f4f1;
    background:
        radial-gradient(720px 440px at 92% -12%, rgba(94, 234, 212, 0.2), transparent 60%),
        radial-gradient(620px 540px at -12% 112%, rgba(16, 185, 129, 0.18), transparent 55%),
        linear-gradient(160deg, #062c28 0%, #0b3b35 100%);
}
.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(75% 70% at 40% 35%, #000 25%, transparent 100%);
    pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-eyebrow {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.95rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #99f6e4;
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.35);
    border-radius: 999px;
}
.auth-eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5eead4;
}

.auth-brand h2 {
    font-weight: 800;
    font-size: clamp(1.9rem, 3.1vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    margin: 0 0 0.9rem;
}
.auth-brand h2 .grad {
    background: linear-gradient(120deg, #10b981 0%, #5eead4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-lead {
    color: #a3c4bd;
    max-width: 30rem;
    font-size: 1.04rem;
    line-height: 1.65;
    margin: 0;
}

.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1.05rem;
    max-width: 30rem;
}
.auth-points li {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}
.auth-points .pt-icon {
    flex: 0 0 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #5eead4;
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.32);
    font-size: 1.05rem;
}
.auth-points strong {
    display: block;
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.1rem;
}
.auth-points span {
    color: #8fb3ab;
    font-size: 0.92rem;
    line-height: 1.5;
}

.auth-visual { margin-top: auto; }
.auth-visual img {
    display: block;
    width: 100%;
    max-width: 470px;
    border-radius: 14px;
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(45, 212, 191, 0.2);
}

/* --------------------------------------------------------------------------
   Form half
   -------------------------------------------------------------------------- */

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3.5rem);
    background: var(--surface);
}
.auth-form {
    width: 100%;
    max-width: 440px;
}
.auth-form.is-wide { max-width: 520px; }

.auth-kicker {
    color: var(--brand-700);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.auth-form h1 {
    font-weight: 800;
    font-size: clamp(1.6rem, 2.3vw, 2rem);
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0.35rem 0 0.45rem;
}
.auth-sub {
    color: var(--ink-muted);
    margin-bottom: 1.75rem;
    line-height: 1.55;
}

.auth-form .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 0.4rem;
}
.auth-form .form-label .req { color: var(--danger); margin-left: 0.15rem; }
.auth-form .form-control {
    padding: 0.72rem 0.9rem;
    border-color: #cbd5e1;
    background-color: #fff;
}
.auth-form .form-control::placeholder { color: #94a3b8; }
.auth-form .form-text {
    font-size: 0.82rem;
    color: var(--ink-muted);
    margin-top: 0.35rem;
}
.auth-form .input-group .btn-reveal {
    border-color: #cbd5e1;
    color: var(--ink-muted);
    background: #fff;
}
.auth-form .input-group .btn-reveal:hover { color: var(--brand-700); background: var(--brand-50); }
.auth-form .invalid-feedback { display: block; }

.auth-alert {
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}
.auth-alert .bi { margin-top: 0.15rem; }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.auth-row a { font-weight: 600; font-size: 0.9rem; }

.auth-submit {
    padding: 0.8rem 1rem;
    font-weight: 600;
    font-size: 1rem;
}

.auth-alt {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--ink-muted);
    font-size: 0.95rem;
}
.auth-alt a { font-weight: 600; }

.auth-status-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 1.7rem;
    color: var(--brand-700);
    background: var(--brand-50);
    border: 1px solid var(--brand-200);
    margin-bottom: 1.25rem;
}
.auth-status-icon.is-warn { color: var(--warn); background: var(--warn-bg); border-color: #fde68a; }

/* --------------------------------------------------------------------------
   Two-step registration
   -------------------------------------------------------------------------- */

.auth-steps {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.6rem;
    padding: 0;
    list-style: none;
}
.auth-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.62rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-sunken);
    color: var(--ink-muted);
    font-weight: 600;
    font-size: 0.88rem;
}
.auth-step .num {
    flex: 0 0 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--border);
    color: var(--ink-soft);
    font-size: 0.8rem;
}
.auth-step small {
    display: block;
    font-weight: 500;
    font-size: 0.76rem;
    color: var(--ink-muted);
}
.auth-step.is-active {
    border-color: var(--brand-300);
    background: var(--brand-50);
    color: var(--brand-800);
}
.auth-step.is-active .num,
.auth-step.is-done .num {
    background: var(--brand-600);
    color: #fff;
}
.auth-step.is-done { color: var(--brand-800); }

.auth-actions {
    display: flex;
    gap: 0.75rem;
}
.auth-actions .btn { flex: 1; }
.auth-actions .btn-back { flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   Responsive — the brand half collapses to a short banner
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .auth-brand {
        padding: 2rem 1.5rem 2.25rem;
        gap: 1.1rem;
    }
    .auth-points,
    .auth-visual { display: none; }
    .auth-brand h2 { font-size: 1.7rem; margin-bottom: 0.5rem; }
}
