/* ==========================================================================
   Auth pages (login, reset-password flow)
   Layout kartu terpusat dengan latar glow halus.
   Requires theme.css.
   ========================================================================== */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 20px;
}

/* Decorative radial glow */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(ellipse 800px 400px at 15% -10%, rgba(37, 99, 235, 0.09) 0%, transparent 60%),
        radial-gradient(ellipse 600px 500px at 110% 110%, rgba(37, 99, 235, 0.07) 0%, transparent 60%);
}
[data-theme="dark"] body::after {
    background-image:
        radial-gradient(ellipse 800px 400px at 15% -10%, rgba(59, 130, 246, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 600px 500px at 110% 110%, rgba(59, 130, 246, 0.10) 0%, transparent 60%);
}

/* Top-right theme toggle anchor */
.top-bar {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 10;
    display: flex; gap: 10px; align-items: center;
}

/* Main wrapper */
.auth-wrap {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.auth-wrap.wide { max-width: 460px; }

/* Header (logo + greeting) */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}
.auth-logo {
    display: inline-flex;
    margin-bottom: 18px;
}
.auth-title {
    font-size: clamp(30px, 5vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}
.auth-title .italic { font-style: italic; color: var(--accent); }
.auth-sub {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0;
}

/* Icon hero (for non-form pages: check-email, password-changed) */
.auth-hero-ic {
    width: 72px; height: 72px;
    margin: 0 auto 18px;
    border-radius: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
    animation: iconPop 0.5s var(--ease) 0.1s both;
}
.auth-hero-ic svg { width: 34px; height: 34px; }
.auth-hero-ic.success { background: var(--success-soft); color: var(--success); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 22%, transparent); }
@keyframes iconPop {
    from { opacity: 0; transform: scale(0.75); }
    to   { opacity: 1; transform: scale(1); }
}

/* Card */
.auth-card {
    padding: 30px 28px 26px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    animation: riseIn 0.55s var(--ease) 0.05s both;
}
.auth-card.quiet {
    padding: 34px 28px 28px;
    text-align: center;
}
@keyframes riseIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

/* Meta row (forgot password link, etc.) */
.auth-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: -6px;
}
.auth-meta a {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
}
.auth-meta a:hover { color: var(--accent); }

/* Divider with centered label */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 0 -2px;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.divider span {
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-subtle);
    font-weight: 600;
}

/* Fineprint */
.auth-fineprint {
    text-align: center;
    font-size: 11.5px;
    color: var(--text-subtle);
    margin: 4px 0 0;
    line-height: 1.5;
}

/* App-level footer */
.auth-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-subtle);
}
.auth-footer a { color: var(--text-muted); }
.auth-footer a:hover { color: var(--accent); }

/* "Back to ..." inline link */
.auth-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500;
    color: var(--text-muted);
}
.auth-back:hover { color: var(--accent); }
.auth-back svg { width: 14px; height: 14px; }

/* Stack (vertical gap utility inside auth card) */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.tight { gap: 10px; }

/* Password strength meter */
.pw-strength {
    display: flex; flex-direction: column; gap: 5px;
    margin-top: 2px;
}
.pw-strength .track {
    height: 4px;
    background: var(--bg-subtle);
    border-radius: 999px;
    overflow: hidden;
}
.pw-strength .bar {
    height: 100%;
    width: 0;
    background: var(--danger);
    border-radius: 999px;
    transition: width var(--t-base) ease, background var(--t-base) ease;
}
.pw-strength .lbl {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-subtle);
    transition: color var(--t-base) ease;
}

/* Inline fallback box (check-email warning with reset link) */
.fallback-link {
    margin-top: 4px;
    padding: 14px;
    background: var(--warning-soft);
    border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
    border-radius: var(--radius);
    text-align: center;
}
.fallback-link p {
    margin: 0 0 10px;
    font-size: 12.5px;
    color: var(--warning);
    display: inline-flex; align-items: center; gap: 6px;
}
.fallback-link p svg { width: 14px; height: 14px; }
.fallback-link a.btn {
    font-size: 12.5px;
    padding: 8px 14px;
    max-width: 100%;
    overflow: hidden; text-overflow: ellipsis;
}
