/* Sign-in and account pages: same tokens as the app (style.css). */
body.page-plain { display: block; overflow: auto; min-height: 100%; }
.plain { max-width: 560px; margin: 0 auto; padding: 56px 20px 80px; }
.plain h1 { font-size: 26px; font-weight: 650; margin: 0 0 6px; }
.plain .muted { color: var(--muted); }
.plain-brand { font-weight: 650; letter-spacing: 0.02em; margin-bottom: 36px; display: flex; gap: 14px; align-items: center; }
.plain-brand a { color: var(--muted); font-weight: 500; text-decoration: none; margin-left: auto; font-size: 14px; }
.plain-brand a:hover { color: var(--text); }
.tabs { display: flex; gap: 6px; margin: 22px 0 18px; }
.tabs button { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; color: var(--muted); }
.tabs button.on { color: var(--text); border-color: var(--accent); }
form.stack { display: flex; flex-direction: column; gap: 12px; }
form.stack label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
form.stack input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font-size: 15px; outline: none; }
form.stack input:focus { border-color: var(--accent); }
form.stack .primary { align-self: flex-start; padding: 9px 18px; margin-top: 4px; }
.error { color: var(--warn); font-size: 14px; min-height: 1.2em; }
.okay { color: var(--edit); font-size: 14px; min-height: 1.2em; }
.card-plain { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 18px 20px; margin-top: 18px; }
.card-plain h2 { font-size: 16px; margin: 0 0 4px; }
.card-plain p { margin: 6px 0 12px; font-size: 14px; line-height: 1.55; }
.device { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.device:first-of-type { border-top: 0; }
.device .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.device .dot.on { background: var(--edit); }
.device .name { flex: 1; min-width: 0; }
.device small { color: var(--muted); display: block; }
.device .update { padding: 6px 12px; }
.device .update:disabled { opacity: 0.6; cursor: progress; }
.cmd { display: flex; gap: 8px; align-items: stretch; margin: 10px 0 6px; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 12.5px; }
.steps-plain { margin: 8px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.people { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.people td { padding: 6px 0; border-top: 1px solid var(--line); }
.people td + td { text-align: right; color: var(--muted); }
.plain a { color: var(--accent); }

/* ---- Sign-in: a few lines of the prompter beside the form ---- */
[hidden] { display: none !important; }
body.page-auth { min-height: 100vh; }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) clamp(380px, 38vw, 720px); min-height: 100vh; }
.auth-stage { position: relative; display: flex; flex-direction: column; padding: clamp(24px, 3.2vw, 64px) clamp(24px, 4.5vw, 96px); overflow: hidden;
  background: radial-gradient(120% 80% at 20% 45%, var(--accent-soft), transparent 60%), var(--bg); border-right: 1px solid var(--line); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: 0.02em; font-size: clamp(15px, 1vw, 19px); }
.auth-mark { width: 12px; height: 12px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 5px rgba(255, 122, 107, 0.18);
  animation: pulse 1.4s ease-in-out infinite; }
.auth-demo { position: relative; flex: 1; display: flex; align-items: center; }
.auth-glow { position: absolute; left: -100vw; right: -100vw; top: 50%; height: 5.2em; transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--accent-soft) 10%, var(--accent-soft) 90%, transparent); opacity: 0.18; pointer-events: none; }
.demo-col { position: relative; transition: opacity 0.5s; }
.demo-col.fade { opacity: 0; }
#demo { position: relative; font-size: clamp(24px, 2.9vw, 64px); line-height: 1.42; font-weight: 500; letter-spacing: -0.01em; max-width: 19em; }
#demoNote { position: relative; left: auto; right: auto; width: min(24em, 100%); margin-top: 1.6em; font-size: clamp(13px, 0.95vw, 18px); opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s, border-color 0.3s; }
#demoNote.show { opacity: 1; transform: none; }
#demo .w { cursor: default; }
#demo .sent { padding: 0 0.15em; margin-left: -0.15em; }
.auth-tag { color: var(--muted); font-size: clamp(14px, 1vw, 19px); line-height: 1.55; max-width: 30em; margin: 0; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: clamp(28px, 3vw, 64px) clamp(24px, 4vw, 88px); background: var(--panel); }
/* The form scales with the window: every size below is in em of this one. */
.auth-card { width: 100%; max-width: 27em; font-size: clamp(15px, 1.02vw, 20px); }
.auth-card h1 { font-size: 1.9em; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 6px; }
.auth-card .muted { color: var(--muted); margin: 0; font-size: 1em; }
.auth-card form.stack label { font-size: 0.87em; gap: 0.4em; }
.auth-card form.stack input { font-size: 1.15em; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 1.7em 0 1.4em; background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; }
.seg button { background: none; border: 0; border-radius: 7px; padding: 0.55em 0.7em; cursor: pointer; color: var(--muted); font-size: 0.93em; font-weight: 550;
  transition: background 0.2s, color 0.2s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 0 0 1px var(--line); }
.auth-card form.stack { gap: 0.95em; }
.auth-card form.stack input { background: var(--bg); padding: 0.68em 0.75em; transition: border-color 0.15s, box-shadow 0.15s; }
.auth-card form.stack input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-card form.stack input::placeholder { color: var(--read); }
.code-input { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.22em; text-transform: uppercase; }
.pw { position: relative; display: flex; }
.pw input { flex: 1; padding-right: 64px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted);
  font-size: 0.83em; font-weight: 600; padding: 0.4em 0.6em; border-radius: 6px; cursor: pointer; }
.pw-toggle:hover { color: var(--text); background: var(--panel); }
.hint { color: var(--muted); font-size: 0.92em; }
.auth-card .error { font-size: 0.93em; }
.auth-card .error:empty { min-height: 0; }
.auth-card form.stack .auth-submit { align-self: stretch; padding: 0.8em 1.2em; font-size: 1em; border-radius: 9px; margin-top: 2px;
  transition: filter 0.15s, transform 0.05s; }
.auth-submit:hover { filter: brightness(1.06); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:focus-visible, .seg button:focus-visible, .pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-submit.busy { opacity: 0.75; cursor: progress; }
.auth-foot { color: var(--muted); font-size: 0.87em; line-height: 1.55; margin: 1.6em 0 0; padding-top: 1.3em; border-top: 1px solid var(--line); }
.shake { animation: shake 0.35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-stage { padding: 22px 20px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-demo { margin: 22px 0 16px; }
  #demo { font-size: 20px; }
  #demoNote { margin-top: 14px; font-size: 13px; }
  .auth-glow { left: -20px; right: -20px; }
  .auth-tag { font-size: 14px; }
  .auth-panel { align-items: flex-start; padding: 28px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) { .auth-mark, .shake { animation: none; } }

/* Plan: hours used this month. */
.meter { height: 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin: 14px 0 6px; }
.meter-fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.4s ease; }
.meter-text { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-actions button { padding: 8px 14px; }
.plan-actions button:disabled { opacity: 0.5; cursor: default; }
.plan-note { font-size: 13px; margin: 14px 0 0; }
.auth-foot.plans { border-top: 0; padding-top: 0; margin-top: 0.8em; }
.auth-legal { font-size: 0.8em; color: var(--muted); margin: 1.2em 0 0; }
.auth-legal a { color: var(--muted); }
