:root {
  --bg: #0b1220; --card: #121c30; --ink: #eaf0fb; --muted: #9fb0cc;
  --accent: #2f8bff; --accent-ink: #fff; --field: #0e1728; --border: #26344f;
  --ok: #37d67a; --err: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--ink);
  background: radial-gradient(1200px 600px at 50% -10%, #16223c 0%, var(--bg) 60%);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif; }
.wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
h1 { margin: 0 0 4px; font-size: 22px; }
.sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 14px; }
input[type=email], input[type=password], input[type=text] { width: 100%; padding: 13px 14px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--field); color: var(--ink);
  outline: none; margin-bottom: 16px; font: inherit; }
input:focus { border-color: var(--accent); }
button.primary { width: 100%; padding: 14px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; }
button.primary:hover { filter: brightness(1.06); }
.msg { min-height: 20px; margin-top: 12px; font-size: 14px; }
.msg.err { color: var(--err); } .msg.ok { color: var(--ok); }
.qr { display: block; width: 200px; height: 200px; margin: 8px auto 12px; border-radius: 10px; background: #fff; }
.secret { font-family: Consolas, monospace; background: var(--field); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px; word-break: break-all; font-size: 13px; margin-bottom: 16px; text-align: center; }
.practice-btn { width: 100%; text-align: left; padding: 14px; margin-bottom: 10px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--field); color: var(--ink); cursor: pointer; font: inherit; }
.practice-btn:hover { border-color: var(--accent); }
.practice-btn .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin-right: 8px; }
.practice-btn .dot.on { background: var(--ok); }
/* ADR-011 presence: grey = no heartbeat, amber = machine up but not ready, green = ready */
.practice-btn .dot.warn { background: #e0a500; }
.practice-btn.not-ready { opacity: .78; }
.practice-btn .practice-state { float: right; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.foot { margin-top: 18px; text-align: center; }
.foot a { color: var(--muted); font-size: 13px; }

/* v2 portal: office grouping + remember-me */
.office-label { margin: 14px 0 6px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.office-label:first-child { margin-top: 0; }

/* The practice's admin-assigned 4-digit number, badged before its name in the
   picker so staff can read it off the screen on a support call. Tabular figures
   keep every badge the same width down the list. */
.practice-no { display: inline-block; margin-right: 7px; padding: 1px 6px;
  background: #26344f; color: #9fc2ff; border: 1px solid #3a4d74; border-radius: 4px;
  font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: 0; }
/* Practices table (portal connect view) */
.card-wide { max-width: 720px; }
/* The line under the heading, with the search box beside it. On a phone the
   box wraps under the line and takes the full width. */
.picker-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 22px; }
.picker-head .sub { margin: 0; flex: 1 1 220px; }
.picker-find { flex: 0 1 260px; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.app-version { color: var(--muted); font-size: 12px; }
#pickerSearch { box-sizing: border-box; min-width: 0; width: 100%; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--field); color: var(--ink);
  font: inherit; font-size: 14px; outline: none; }
#pickerSearch:focus { border-color: var(--accent); }
#pickerSearch::placeholder { color: var(--muted); }
@media (max-width: 520px) { .picker-find { flex-basis: 100%; } }
.no-match { color: var(--muted); font-size: 14px; padding: 8px 0; }
.practice-section { margin-bottom: 18px; }
.computer-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.computer-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.computer-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.computer-table tr.not-ready td { opacity: .7; }
.computer-table .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--muted); margin-right: 8px; vertical-align: middle; }
.computer-table .dot.on { background: var(--ok); }
.computer-table .dot.warn { background: #e0a500; }
.computer-table .cname { font-weight: 600; }
.computer-table .cstatus { color: var(--muted); font-size: 12.5px; }
.computer-table .access-col { text-align: right; width: 1%; white-space: nowrap; }
/* Practice-number column: shrink to the badge so the computer name keeps the room. */
.computer-table .pno-col { width: 1%; white-space: nowrap; }
.access-btn { padding: 7px 16px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; }
.access-btn:hover { filter: brightness(1.08); }
.access-btn:disabled { background: transparent; color: var(--muted); border-color: var(--border); cursor: default; }
.practice-btn .ctype { float: right; font-size: 11px; color: var(--muted); }
.remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
.remember input { width: auto; }

/* The hidden attribute must win.
   Its only backing is the browser default [hidden] { display: none }, which has
   almost no specificity -- so any rule carrying an id that sets a display beats
   it. That is how the transfer panel, once it was given display:flex to fill the
   screen, stopped responding to its own close button: el.hidden = true was set,
   and nothing happened. */
/* Offered beside Access in a browser: the same session, opened in the app, where
   file transfer can see the whole computer. Quiet -- it is an alternative, not a
   competing call to action. */
.access-app { margin-left: 8px; font-size: 12px; color: var(--accent); text-decoration: underline; white-space: nowrap; }

[hidden] { display: none !important; }


/* A practice this device may not reach: the reason sits where its computers
   would have been, so the answer is where the question was asked. */
.practice-blocked { padding: 10px 12px; border: 1px solid #5a4a1c; border-radius: 6px;
  background: #2a2412; color: #f0c674; }
