/* Auth page (auth.html): card, segmented toggle, form, submit button
   Split out of the old single landing.css. Loaded by auth.html only, after base.css.
   Load order matters: base.css first. */

/* ============================================================
   AUTH PAGE (auth.html)
   ============================================================ */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    /* `dvh` keeps the card vertically centred within the visible area as the
       mobile browser chrome shows/hides. Falls back to vh on older browsers. */
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 36px 32px;
    background: var(--bg-surface2);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glass);
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.auth-card .brand-icon { width: 38px; height: 38px; border-radius: 10px; }
.auth-card .brand-icon svg,
.auth-card .brand-icon img { width: 34px; height: 34px; }
.auth-brand span { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }

.auth-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 24px;
}

/* ---------- Segmented toggle (Login / Sign up) ---------- */
.segmented {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 3px;
    margin-bottom: 24px;
}

.segmented-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: calc(var(--radius-md) - 3px);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}
.segmented.signup .segmented-thumb { transform: translateX(100%); }

.segmented button {
    position: relative;
    z-index: 1;
    padding: 9px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}
.segmented button.active { color: var(--accent); font-weight: 600; }

/* ---------- Form ---------- */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 11px 13px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    background: #fff;
}
.form-group input::placeholder { color: var(--text-muted); }

.btn-submit {
    width: 100%;
    padding: 12px 16px;
    margin-top: 4px;
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.2px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}
.btn-submit:hover:not(:disabled) { background: var(--accent-dim); box-shadow: 0 6px 22px rgba(37, 99, 235, 0.42); }
.btn-submit:active { transform: scale(0.98); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Status message ---------- */
.auth-msg {
    font-size: 13px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: none;
    line-height: 1.4;
}
.auth-msg.show { display: block; }
.auth-msg.error { background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.3); color: #b91c1c; }
.auth-msg.success { background: rgba(31, 157, 85, 0.1); border: 1px solid rgba(31, 157, 85, 0.3); color: #15803d; }

.auth-foot {
    text-align: center;
    margin-top: 22px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.auth-foot a { color: var(--text-secondary); text-decoration: none; }
.auth-foot a:hover { color: var(--accent); }

/* loading spinner on button */
.btn-submit.loading { color: transparent; position: relative; }
.btn-submit.loading::after {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    top: 50%; left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


