/* ARKIVE auth v1: split layout. Needs v2 tokens + type scale (base.css). */
body.auth-page { margin: 0; background: var(--paper); }
body.auth-page main { max-width: none; margin: 0; padding: 0; }
.auth-split { min-height: 100vh; }

/* ── left: form pane ── */
.auth-pane { display: flex; flex-direction: column; min-height: 100vh; position: relative;
  background: radial-gradient(circle at 1px 1px, rgba(27,35,48,.07) 1px, transparent 0) 0 0/22px 22px; }
.auth-pane::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent-ink), var(--accent), #2fa88c); }
.auth-nav { display: flex; align-items: center; justify-content: space-between; max-width: var(--page); width: 100%; margin: 0 auto; padding: 1.6rem 2rem; }
.auth-brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; letter-spacing: .1em; color: var(--ink) !important; text-decoration: none !important; }
.auth-mark { width: 22px; height: 22px; display: inline-flex; } .auth-mark img { width: 100%; height: 100%; object-fit: contain; }
.auth-back { font-size: var(--fs-sm); color: var(--muted) !important; text-decoration: none !important; padding: .35rem .8rem; border-radius: 99px; transition: background var(--ease), color var(--ease); }
.auth-back:hover { background: var(--accent-soft); color: var(--accent-ink) !important; }
.auth-back .arr, .af-submit .arr { display: inline-block; transition: transform .25s; }
.auth-back:hover .arr { transform: translateX(-4px); }
.auth-center { flex: 1; padding-top: 0; display: flex; align-items: center; justify-content: center; padding: 1rem 2.6rem 2rem; }
.auth-foot { padding: 1.2rem 2.6rem; text-align: center; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ── form ── */
.af-wrap { width: 100%; max-width: 420px; animation: af-rise .8s cubic-bezier(.2,.7,.2,1) both; }
@keyframes af-rise { from { opacity: 0; transform: translateY(18px); } }
.af-kicker { font-family: var(--font-mono); font-size: var(--label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--accent); font-weight: 600; }
.af-title { font-size: var(--fs-2xl); line-height: 1.08; letter-spacing: -.02em; margin: .5rem 0 .6rem; }
.af-sub { color: var(--ink-soft); font-size: var(--fs-base); margin: 0 0 1.8rem; }

.af-alert { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .9rem; margin-bottom: 1.2rem; border: 1px solid #e0a89c; border-left: 3px solid var(--danger); background: var(--danger-soft); color: var(--danger); border-radius: var(--radius); font-size: var(--fs-sm); animation: af-shake .4s; }
.af-alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@keyframes af-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.af-note { font-size: var(--fs-xs); color: var(--muted); padding: .7rem .9rem; background: var(--panel-alt); border-radius: var(--radius); margin-bottom: 1rem; }

.af-google { display: flex; align-items: center; justify-content: center; gap: .65rem; height: 48px; width: 100%; background: var(--panel-bg); color: var(--ink) !important; border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--fs-sm); font-weight: 600; text-decoration: none !important; box-shadow: var(--shadow-sm); transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease); }
.af-google:hover { border-color: var(--ink); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.af-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.af-divider::before, .af-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.af-field { margin-bottom: 1.15rem; }
.af-field label, .af-label-row label { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); font-weight: 600; margin-bottom: .45rem; }
.af-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.af-label-row label { margin-bottom: .45rem; }
.af-forgot { font-size: var(--fs-xs); color: var(--accent) !important; text-decoration: none !important; border-bottom: 1px solid transparent; transition: border-color var(--ease); }
.af-forgot:hover { border-bottom-color: var(--accent); }
.af-input { position: relative; display: flex; align-items: center; height: 48px; background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color var(--ease), box-shadow var(--ease); }
.af-input > svg { width: 18px; height: 18px; margin-left: .85rem; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke var(--ease); }
.af-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,110,92,.13); }
.af-input:focus-within > svg { stroke: var(--accent); }
.af-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 .85rem; font: inherit; font-size: var(--fs-base); color: var(--ink); }
.af-input input::placeholder { color: #b3ad9f; }
.af-show { margin-right: .5rem; padding: .28rem .6rem; border: 0; border-radius: 99px; background: var(--panel-alt); color: var(--ink-soft); font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: background var(--ease), color var(--ease); }
.af-show:hover { background: var(--accent-soft); color: var(--accent-ink); }

.af-submit { display: flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; height: 50px; margin-top: 1.5rem; border: 0; border-radius: var(--radius); background: var(--accent); color: #fff; font: inherit; font-size: var(--fs-base); font-weight: 600; cursor: pointer; box-shadow: 0 10px 20px -12px var(--accent); transition: background var(--ease), transform var(--ease), box-shadow var(--ease); }
.af-submit:hover { background: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 14px 24px -12px var(--accent); }
.af-submit:hover .arr { transform: translateX(5px); }
.af-submit:active { transform: translateY(0); }

.af-switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-soft); }
.af-create { padding: .5rem 1rem; border: 1px solid var(--ink); border-radius: var(--radius); color: var(--ink) !important; font-weight: 600; text-decoration: none !important; transition: background var(--ease), color var(--ease); }
.af-create:hover { background: var(--ink); color: var(--paper) !important; }

/* legacy auth pages (signup etc.) keep working inside the new layout until redesigned */
.auth-wrap { display: flex; justify-content: center; width: 100%; }
.auth-card { box-shadow: var(--shadow-md); }
.btn-block { width: 100%; justify-content: center; }

/* 'body.auth-page main { padding: 0 }' above outranks .auth-center, which left the form
   touching the screen edges on phones; match its specificity so the padding applies. */
body.auth-page main.auth-center { padding: 1rem 2.6rem 2rem; }
@media (max-width: 960px) {
  .auth-nav, .auth-foot, body.auth-page main.auth-center { padding-left: 1.3rem; padding-right: 1.3rem; }
}
@media (max-width: 420px) { .af-switch { flex-direction: column; align-items: stretch; text-align: center; } }
.auth-foot a { color: inherit; text-decoration: underline; }

/* Signup + forgot password, in the same vocabulary as login */
.af-opt { margin-left: .35rem; font-family: var(--font-sans); font-size: .72rem; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--muted); }
.af-hint { margin: .45rem 0 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }
.af-hint-err { margin: -.6rem 0 1rem; color: var(--danger); }
.af-submit { text-decoration: none !important; }
a.af-submit { color: #fff !important; }

.af-ok { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; margin: 0 0 1.4rem; border: 1px solid #b6d4cb; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--radius); font-size: var(--fs-sm); line-height: 1.55; }
.af-ok svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.af-ok strong { color: var(--ink); }

/* the agreement checkbox: sits above both the Google link and the email form */
.af-check { position: relative; display: flex; align-items: flex-start; gap: .7rem; margin: 0 0 1.2rem; padding: .85rem 1rem; background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-soft); cursor: pointer; transition: border-color var(--ease), background var(--ease); }
.af-check:hover { border-color: #cfc8b6; }
.af-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.af-check:has(input:focus-visible) { box-shadow: 0 0 0 4px rgba(15,110,92,.13); }
.af-check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.af-box { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid #b9b2a2; border-radius: 5px; background: #fff; transition: background var(--ease), border-color var(--ease); }
.af-check input:checked + .af-box { background: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 6.8' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 14px; background-position: center; background-repeat: no-repeat; }
.af-check a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 420px) { .af-check { padding: .75rem .85rem; } }

/* ---- Email confirmation: validity countdown + quiet secondary button ---- */
.af-timer { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 .6rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-bg); }
.af-timer-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.af-timer-clock { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.af-timer.low { border-color: #e0a89c; background: var(--danger-soft); }
.af-timer.low .af-timer-clock { color: var(--danger); }
.af-timer.gone { border-style: dashed; }
.af-ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--ink); box-shadow: none; margin-top: 1rem; height: 46px; }
.af-ghost:hover { background: var(--ink); color: var(--paper) !important; box-shadow: none; }
