/* =============================================================
   Login / register screens.
   Reuses the tokens from app.css.
   ============================================================= */

.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}

.auth-wrap { width: 100%; max-width: 430px; }

.auth-card {
    position: relative;
    overflow: hidden;
    padding: 32px clamp(22px, 5vw, 36px) 26px;
    border-radius: var(--r-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 26px 60px -24px rgba(70, 62, 180, .38), var(--sh-inset);
}

/* gradient band across the very top of the card */
.auth-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6 45%, #ec4899);
}

/* ---------- Brand block ---------- */
.auth-brand { text-align: center; margin-bottom: 24px; }

.auth-mark {
    position: relative;
    display: grid; place-items: center;
    width: 58px; height: 58px;
    margin: 0 auto 16px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
    box-shadow: 0 10px 24px -6px rgba(99, 102, 241, .6), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.auth-mark::after {
    content: "";
    position: absolute; inset: -12px;
    border-radius: 28px;
    background: radial-gradient(circle, rgba(99, 102, 241, .22), transparent 70%);
    z-index: -1;
}

.auth-brand h1 {
    font-size: 22px;
    font-weight: 780;
    letter-spacing: -.03em;
    margin-bottom: 6px;
}

.auth-brand p { font-size: 13px; color: var(--text-3); line-height: 1.5; }

/* ---------- Alerts ---------- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 14px;
    margin-bottom: 18px;
    border-radius: var(--r-md);
    font-size: 12.5px;
    line-height: 1.5;
}
.auth-alert svg { flex: none; margin-top: 1px; }
.auth-alert strong { display: block; font-weight: 680; font-size: 13px; margin-bottom: 1px; }

.auth-alert.ok     { background: var(--ok-soft);     border: 1px solid var(--ok-line);     color: var(--ok); }
.auth-alert.danger { background: var(--danger-soft); border: 1px solid var(--danger-line); color: var(--danger); }

/* ---------- Form ---------- */
.auth-form { display: grid; gap: 15px; }

.auth-field { display: grid; gap: 7px; }

.auth-field label {
    font-size: 11px;
    font-weight: 680;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-3);
}

.auth-input-wrap { position: relative; display: flex; align-items: center; }

.auth-input-wrap .ai-icon {
    position: absolute;
    left: 13px;
    color: var(--text-4);
    pointer-events: none;
    transition: color .18s var(--ease);
}
.auth-input-wrap:focus-within .ai-icon { color: var(--brand); }

.auth-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border-2);
    border-radius: var(--r-sm);
    box-shadow: var(--sh-1);
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
.auth-input-wrap input::placeholder { color: var(--text-4); }
.auth-input-wrap input:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 3.5px var(--brand-ring), var(--sh-1);
}

/* has a reveal button — leave room on the right */
.auth-input-wrap:has(.ai-toggle) input { padding-right: 44px; }

.ai-toggle {
    position: absolute;
    right: 8px;
    display: grid; place-items: center;
    width: 30px; height: 30px;
    padding: 0; border: none; border-radius: 7px;
    background: transparent; color: var(--text-4);
    cursor: pointer;
    transition: color .16s var(--ease), background-color .16s var(--ease);
}
.ai-toggle:hover { color: var(--text-2); background: var(--surface-3); }
.ai-toggle.on { color: var(--brand); }

/* password strength meter */
.auth-meter {
    height: 4px;
    border-radius: var(--r-pill);
    background: var(--surface-3);
    overflow: hidden;
}
.auth-meter span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: var(--r-pill);
    background: var(--danger);
    transition: width .3s var(--ease), background-color .3s var(--ease);
}
.auth-meter.s1 span { width: 25%;  background: #f43f5e; }
.auth-meter.s2 span { width: 50%;  background: #f59e0b; }
.auth-meter.s3 span { width: 75%;  background: #10b981; }
.auth-meter.s4 span { width: 100%; background: #059669; }

.auth-hint { font-size: 11.5px; font-weight: 550; min-height: 14px; }
.auth-hint.ok   { color: var(--ok); }
.auth-hint.bad  { color: var(--danger); }

/* ---------- Submit ---------- */
.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
    padding: 13px 18px;
    border: none;
    border-radius: var(--r-sm);
    font: inherit;
    font-size: 14px;
    font-weight: 660;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    box-shadow: 0 8px 20px -6px rgba(99, 102, 241, .55), inset 0 1px 0 rgba(255, 255, 255, .28);
    transition: transform .16s var(--ease), box-shadow .18s var(--ease);
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -7px rgba(99, 102, 241, .65), inset 0 1px 0 rgba(255, 255, 255, .32); }
.auth-submit:active { transform: translateY(0) scale(.99); }

/* ---------- Footer ---------- */
.auth-foot {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--text-3);
}
.auth-foot a { font-weight: 640; color: var(--brand); }
.auth-foot a:hover { text-decoration: underline; }

@media (max-width: 420px) {
    .auth-card { padding: 26px 18px 22px; border-radius: var(--r-lg); }
    .auth-brand h1 { font-size: 20px; }
}

.auth-alert.warn { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); }
