/* Page-specific layout. html[data-page] is set by the router. */

html[data-page="login"], html[data-page="signup"], html[data-page="error"], html[data-page="privacy"], html[data-page="callback"] { --bg: #fff; }
#app { min-height: 100%; }
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); font-size: 14px; }

/* ---------- centred single column (signup, error, callback) ---------- */
.solo { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 28px 40px; gap: 24px; }
.solo .top img { height: 30px; display: block; }
.solo .stage { display: grid; place-items: center; padding-bottom: 6vh; }
.solo .foot { justify-content: center; }
html[data-page="signup"], html[data-page="error"] { --h1-size: 30px; }
@media (max-width: 600px) {
  .solo { padding: 20px 22px; }
  .solo .stage { place-items: start center; padding-top: 4vh; }
  html[data-page="signup"], html[data-page="error"] { --h1-size: 26px; }
}

/* ---------- login: footage on the left, form card on the right ---------- */
html[data-page="login"] { --bg: var(--navy); --h1-size: 28px; }
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--navy) url("/static/assets/hero-poster.webp") center / cover no-repeat; }
.ambient video { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; filter: blur(42px) saturate(1.1); }
.ambient::after { content: ""; position: absolute; inset: 0; background: rgba(19, 33, 60, 0.52); }
.login { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 436px; grid-template-rows: 1fr auto; column-gap: clamp(32px, 4vw, 72px); row-gap: 20px; padding: 32px clamp(32px, 4vw, 64px); }
.film { align-self: center; position: relative; aspect-ratio: 16 / 9; width: 100%; max-height: calc(100vh - 140px); margin: 0 auto; border-radius: 16px; overflow: hidden; background: var(--navy) url("/static/assets/hero-poster.webp") center / contain no-repeat; box-shadow: 0 30px 80px rgba(8, 13, 22, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.film video { width: 100%; height: 100%; object-fit: contain; display: block; }
.login .stage { display: grid; place-items: center; }
.login .foot { grid-column: 1 / -1; justify-content: space-between; align-items: center; color: rgba(255, 255, 255, 0.82); }
.login .foot a:hover { color: #fff; }
.card { width: 100%; max-width: 436px; background: #fff; border-radius: 18px; padding: 36px 36px 30px; box-shadow: 0 24px 64px rgba(8, 13, 22, 0.35), 0 2px 6px rgba(8, 13, 22, 0.12); display: flex; flex-direction: column; gap: 28px; color: var(--navy); }
.card .logo { height: 28px; align-self: flex-start; }
.card .panel { max-width: none; }
.card { --bg: #fff; --fg: var(--navy); }
.pause { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(8, 13, 22, 0.35); color: #fff; border-radius: 999px; padding: 6px 12px 6px 10px; font-size: 12px; cursor: pointer; backdrop-filter: blur(6px); }
.pause:hover { background: rgba(8, 13, 22, 0.55); }
.pause svg { width: 12px; height: 12px; }
.pause:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
@media (max-width: 1240px) {
  .login { grid-template-columns: minmax(0, 1fr) 380px; }
  .card { padding: 30px 28px 26px; }
}
@media (max-width: 980px) {
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-content: start; padding: 24px; row-gap: 24px; }
  .film { align-self: start; max-width: 640px; max-height: none; }
  .login .stage { place-items: start center; }
  .login .foot { align-self: end; }
  .card { max-width: 480px; }
}
@media (max-width: 600px) {
  .login { padding: 0 0 16px; row-gap: 0; }
  .film { border-radius: 0; box-shadow: none; }
  .login .stage { padding: 12px 12px 0; }
  .card { padding: 26px 22px 22px; border-radius: 16px; gap: 22px; }
  .login .foot { padding: 16px 16px 0; }
  html[data-page="login"] { --h1-size: 24px; }
}

/* ---------- signup ---------- */
.verified { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--ok-bg); color: var(--teal-ink); font-size: 14px; }
.verified svg { width: 18px; height: 18px; flex: none; }
.verified b { color: var(--navy); font-family: var(--font-mono); font-weight: 600; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--fg2); cursor: pointer; }
.agree input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--indigo); flex: none; }
.agree a { color: var(--link); }

/* ---------- error ---------- */
.sign { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.sign svg { width: 26px; height: 26px; }
.sign.warn { background: var(--warn-bg); color: var(--warn-ink); }
.sign.stop { background: #fdecea; color: #b42318; }
.sign.info { background: #e8eef8; color: var(--indigo); }
.detail { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--fg2); background: var(--page); border-radius: 10px; padding: 12px 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.acts-col { display: flex; flex-direction: column; gap: 10px; }

/* ---------- privacy ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 48px clamp(20px, 5vw, 32px) 96px; display: flex; flex-direction: column; gap: 32px; }
.doc-head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.doc-head h1 { font-size: 34px; }
.doc-head p { color: var(--muted); font-size: 14px; }
.doc section { display: flex; flex-direction: column; gap: 12px; }
.doc h2 { margin: 0; font-size: 19px; font-weight: 600; }
.doc p, .doc li { font-size: 16px; line-height: 1.85; color: var(--fg2); }
.doc ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.doc b { color: var(--fg); font-weight: 600; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { font-size: 13px; color: var(--fg2); text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--page); }
.toc a:hover { color: var(--fg); background: #eef1f5; }

/* ---------- admin user detail ---------- */
.who-head { display: flex; align-items: center; gap: 16px; }
.who-head .avatar { width: 56px; height: 56px; font-size: 22px; }
.who-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.head-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { display: flex; }
.crumb a { color: var(--fg2); text-decoration: none; font-size: 14px; }
.crumb a:hover { color: var(--fg); }
.mono-sm { font-family: var(--font-mono); font-size: 13px; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; background: #fdecea; color: #8a1c12; font-size: 14px; }
.log td { cursor: default; }
.log tbody tr:hover td { background: none; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--muted); }
.topbar a.me { text-decoration: none; color: inherit; }
