/* The pages the server draws itself: sign in, your devices, and Setup,
   Partner apps. Same palette and type as the console (src/tokens.css). */
:root {
  --paper: #ffffff; --band: #f4f6f4; --field: #eef1ee; --ink: #081729; --ink2: #0f2a4a;
  --rule: #dde2dc; --rule-strong: #c7cec5; --tx: #101b28; --tx2: #485661; --accent: #0e7c74;
  --accent-ink: #ffffff; --loud: #b7412c; --ok: #2a672a; --ok-tint: #e7f4e3; --warn-tint: #fbf1dc; --warn: #6f5312;
  --onink: #ffffff; --onink-quiet: #aebdcf;
  --font: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13202e; --band: #0c1622; --field: #1a2a3b; --rule: #24384d; --rule-strong: #2e475f;
    --tx: #e6edf3; --tx2: #a9b8c6; --accent: #3fb3a8; --accent-ink: #04201d; --loud: #ef8a76;
    --ok: #9fdc95; --ok-tint: #17301c; --warn-tint: #33290f; --warn: #f2cf7a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--band); color: var(--tx); font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.bar { background: var(--ink); color: var(--onink); height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.bar .mark { width: 28px; height: 28px; border-radius: 7px; background: linear-gradient(155deg, var(--accent) 0%, var(--ink2) 115%); }
.bar .name { font-weight: 600; font-size: 16px; letter-spacing: .2px; }
.bar .sub { color: var(--onink-quiet); font-size: 13px; }
.bar .right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.bar .right a { color: var(--onink); text-decoration: none; font-size: 13px; opacity: .9; }
.bar .right a:hover { opacity: 1; text-decoration: underline; }

.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 64px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 20px 22px; margin: 0 0 16px; }
.card h2 { font-size: 17px; line-height: 24px; margin: 0 0 4px; font-weight: 600; }
.card .say { color: var(--tx2); margin: 0 0 14px; max-width: 70ch; }
h1 { font-size: 22px; line-height: 28px; margin: 4px 0 6px; font-weight: 600; }
.lead { color: var(--tx2); margin: 0 0 20px; max-width: 72ch; }

label.f { display: block; font-weight: 500; margin: 0 0 6px; }
input[type=email], input[type=text], select {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: 8px;
  background: var(--paper); color: var(--tx); font: inherit; font-size: 15px;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input.code { font-size: 26px; letter-spacing: 10px; text-align: center; height: 56px; font-variant-numeric: tabular-nums; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 8px;
  border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font: 500 14px var(--font); cursor: pointer; }
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.quiet { background: transparent; color: var(--tx); border-color: var(--rule-strong); }
.btn.quiet:hover { background: var(--field); filter: none; }
.btn.danger { background: transparent; color: var(--loud); border-color: var(--rule-strong); }
.btn.wide { width: 100%; height: 46px; font-size: 15px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.note { font-size: 13px; color: var(--tx2); }
.msg { min-height: 20px; margin: 10px 0 0; font-size: 13px; }
.msg.bad { color: var(--loud); }
.msg.good { color: var(--ok); }

/* sign in */
.signin { min-height: calc(100vh - 56px); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 40px; }
.signin .card { width: 100%; max-width: 420px; padding: 28px 28px 24px; box-shadow: 0 10px 30px rgba(8, 23, 41, .08); }
.signin h1 { margin-top: 0; }
.signin .row { margin: 14px 0 0; }
.signin .foot { margin-top: 18px; font-size: 13px; color: var(--tx2); }

/* keep me signed in (322) */
.signin label.keep { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; cursor: pointer; }
.signin label.keep input { width: 18px; height: 18px; margin: 0; }
.signin .keepnote { margin: 4px 0 0 26px; }

/* your devices (323) */
.account .ask { margin: 14px 0 0; padding: 14px 16px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--warn-tint); color: var(--tx); }
.account .ask p { margin: 0 0 10px; }
.account td .btn { height: 32px; white-space: nowrap; }

/* partner apps */
.switch { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; align-items: start; padding: 16px 0; border-top: 1px solid var(--rule); }
.switch:first-of-type { border-top: 0; padding-top: 4px; }
.switch .t { font-weight: 600; font-size: 15px; }
.switch .s { color: var(--tx2); max-width: 64ch; }
.switch .who { grid-column: 1 / -1; font-size: 13px; color: var(--tx2); }
.switch .modes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 4px; }
.switch .modes label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.toggle { position: relative; width: 52px; height: 30px; border-radius: 15px; border: 0; background: var(--rule-strong); cursor: pointer; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.toggle[aria-checked=true] { background: var(--accent); }
.toggle[aria-checked=true]::after { left: 25px; }
.toggle[disabled] { opacity: .5; cursor: default; }
.pill { display: inline-block; padding: 0 10px; height: 22px; line-height: 22px; border-radius: 11px; font-size: 12px; font-weight: 500; }
.pill.on { background: var(--ok-tint); color: var(--ok); }
.pill.off { background: var(--field); color: var(--tx2); }
.codebox { margin: 14px 0 0; padding: 16px; border-radius: 10px; background: var(--warn-tint); color: var(--warn); }
.codebox .c { font: 600 24px/32px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 2px; color: var(--tx); user-select: all; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline > div { flex: 1 1 180px; }
.scopes { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; }
.scopes label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 500; color: var(--tx2); background: var(--field); position: sticky; top: 0; }
td.f { color: var(--tx2); max-width: 340px; overflow-wrap: anywhere; }
.scroll { max-height: 440px; overflow: auto; border: 1px solid var(--rule); border-radius: 8px; }
.gap { margin-top: 16px; }
.empty { color: var(--tx2); padding: 14px 0 4px; }
.readonly { padding: 10px 14px; border-radius: 8px; background: var(--field); color: var(--tx2); margin: 0 0 14px; }
@media (max-width: 640px) {
  .wrap { padding: 16px 12px 48px; }
  .card { padding: 16px; }
  .bar .sub { display: none; }
  th:nth-child(5), td:nth-child(5) { display: none; }
  /* your devices: the Sign out button stays on a phone; the door goes */
  .account .devs th:nth-child(5), .account .devs td:nth-child(5) { display: table-cell; }
  .account .devs th:nth-child(2), .account .devs td:nth-child(2) { display: none; }
}
