/* Signed-in pages and the login / register forms. Loaded after home.css, which owns the tokens, .btn, .nav and .wrap.
   House rules: hierarchy from type size and space, hairlines instead of boxes, the accent only on the one
   main action and the current page, sentence-case labels, no glow, no icon tiles. */

.panel { min-height: 100vh; display: flex; flex-direction: column; }
.panel a:not(.btn) { color: #d8d8ff; text-decoration: underline; text-decoration-color: rgba(216, 216, 255, .35); text-underline-offset: 3px; }
.panel a:not(.btn):hover { text-decoration-color: currentColor; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; padding: 8px 12px; background: var(--bg); }

/* top bar additions */
.panel .nav-links a, .panel .nav a:has(img) { text-decoration: none; }
.panel .nav-links a { color: var(--muted); }
.panel .nav-links a.on { color: var(--text); }
.who { align-self: center; margin-right: 6px; color: var(--muted); font-size: 15px; }

/* ---- Page frame ---- */
.page { flex: 1; padding: 72px 0 96px; }
.page h1 { font-size: clamp(40px, 4.4vw, 52px); line-height: 1; }
.page h2 { font: 600 18px/1.4 "Bai Jamjuree", sans-serif; margin-bottom: 4px; }
.lede { margin-top: 12px; color: var(--muted); font-size: 17px; }
.page-head { margin-bottom: 48px; }
@media (prefers-reduced-motion: no-preference) {      /* each page settles in once, like the home page's hero */
    .page > *, .auth-form { animation: rise .55s var(--ease) both; }
    .page > :nth-child(2) { animation-delay: .06s; }
    .page > :nth-child(n+3) { animation-delay: .12s; }
    .auth-art { animation: fly 1.1s var(--ease) both; }
}
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 96px; align-items: start; }
.stack > * + * { margin-top: 48px; }

.note { margin-bottom: 32px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; }

/* label / value rows on hairlines */
.facts div { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { text-align: right; overflow-wrap: anywhere; }
.facts + .btn, .facts + form { margin-top: 28px; }
.ok { color: #86efac; }
.bad { color: #f0868c; }
.ok::before, .bad::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: currentColor; }

/* ---- Forms ---- */
.field { margin-top: 18px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14.5px; }
.field input {
    width: 100%; height: 48px; padding: 0 14px;
    background: var(--card); border: 1px solid var(--line-2); border-radius: 10px;
    color: var(--text); font: 400 16px "Bai Jamjuree", sans-serif;
    transition: border-color .15s;
}
.field input:hover { border-color: #4a4466; }
.field input:focus { border-color: var(--accent); outline: none; }
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field small { display: block; margin-top: 6px; color: var(--dim); font-size: 13.5px; }
.agree { display: flex; gap: 10px; margin-top: 20px; color: var(--muted); font-size: 14.5px; line-height: 22px; cursor: pointer; }
.agree input { flex: none; width: 18px; height: 18px; margin-top: 2px; }
form > .btn { margin-top: 24px; }
.inline { display: flex; align-items: flex-end; gap: 10px; max-width: 420px; }
.inline .field { flex: 1; margin-top: 0; }
.inline .btn { height: 48px; margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.actions form > .btn { margin-top: 0; }

/* ---- Login / register ---- */
.auth { flex: 1; display: flex; align-items: center; padding: 64px 0; min-height: 720px; }
.auth-form { position: relative; width: min(400px, 100%); }
.auth h1 { font-size: clamp(40px, 4.4vw, 52px); line-height: 1; }
.auth-art { position: absolute; left: 588px; top: 50%; translate: 0 -50%; mix-blend-mode: screen; pointer-events: none; max-width: none; }
.alt { margin-top: 20px; color: var(--muted); font-size: 15px; }

/* ---- Admin ---- */
.tabs { display: flex; gap: 28px; margin-bottom: 48px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.panel .tabs a { padding: 12px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; white-space: nowrap; }
.panel .tabs a:hover { color: var(--text); }
.panel .tabs a[aria-current] { color: var(--text); border-color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats div { padding: 4px 28px; border-left: 1px solid var(--line); }
.stats div:first-child { padding-left: 0; border: 0; }
.stats b { display: block; font: italic 800 48px/52px var(--display); overflow-wrap: anywhere; }
.stats b.word { font-size: 30px; }
.stats span { display: block; margin-top: 6px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 0 24px 12px 0; color: var(--muted); font-size: 14px; font-weight: 500; text-align: left; white-space: nowrap; }
td { padding: 12px 24px 12px 0; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }
tbody th { padding: 12px 24px 12px 0; border-top: 1px solid var(--line); color: var(--text); font-size: 16px; font-weight: 600; }
tbody tr:hover th { background: rgba(255, 255, 255, .02); }
td.idc, th.idc { width: 1%; color: var(--muted); font-variant-numeric: tabular-nums; }
td code { font: 500 15px ui-monospace, Consolas, monospace; letter-spacing: .03em; }
td form { display: flex; gap: 8px; }
td .btn { height: 36px; padding: 0 12px; font-size: 14px; font-weight: 500; }
.btn-danger:hover { border-color: #f0868c; color: #f0868c; background: rgba(240, 134, 140, .08); }
.empty { padding: 32px 0; color: var(--muted); border-top: 1px solid var(--line); }
.toolbar { margin-bottom: 32px; }
.toolbar .btn { margin-top: 0; }

/* ---- Footer ---- */
.pfoot { border-top: 1px solid var(--line); color: var(--dim); font-size: 13.5px; }
.pfoot .wrap { display: flex; justify-content: space-between; gap: 12px; padding: 22px 0; }

/* ---- Small screens ---- */
@media (max-width: 1100px) {
    .auth-art { display: none; }
    .auth { justify-content: center; min-height: 0; }
}
@media (max-width: 760px) {
    .who { display: none; }
    .page { padding: 48px 0 72px; }
    .cols { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; gap: 28px 0; }
    .stats div:nth-child(odd) { padding-left: 0; border: 0; }
    .inline { flex-direction: column; align-items: stretch; }
    td .btn { height: 44px; }
}
