/* =====================================================================================
   Base pieces every screen shares: page, buttons, boxed labels, cards, chips and status
   chips, the light/dark switch. Colors come only from look.css. Shapes and sizes are the
   ones in the first HQ's Main office.
   ===================================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-weight: 600; font-size: var(--text-md); cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent-strong); min-height: 44px; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.danger { color: var(--status-red); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.lnk {
  background: none; border: 0; padding: 0; font-weight: 600; font-size: 13px; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); cursor: pointer;
}

/* the boxed uppercase label at the top of a page: "MAIN OFFICE  Everyone's offices..." */
.label {
  display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
  font-size: 12px; letter-spacing: var(--caps-spacing); text-transform: uppercase; font-weight: var(--weight-heavy);
  border: 1px solid var(--ink); padding: 6px 12px; border-radius: var(--radius-sm);
}
.label span { letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--ink-soft); font-size: 13px; }
.cap { font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.hint { font-size: 13px; color: var(--ink-soft); }

/* cards and panels */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow-card); }
.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 12px var(--radius-xl) var(--radius-xl) var(--radius-xl); padding: 16px 24px 24px; }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 700; color: var(--ink);
}
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--badge); color: #fff; font-size: 11.5px; font-weight: var(--weight-heavy); font-style: normal;
}

/* status chips: a colored dot AND the words, always together */
.status {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; background: currentColor; }
.status.red { color: var(--status-red); background: var(--status-red-bg); }
.status.red::before { background: var(--status-red-dot); }
.status.amber { color: var(--status-amber); background: var(--status-amber-bg); }
.status.amber::before { background: var(--status-amber-dot); }
.status.green { color: var(--status-green); background: var(--status-green-bg); }
.status.green::before { background: var(--status-green-dot); }

/* "Needs your attention" (waiting, needs your OK, not sent yet, new): electric red, glowing in Night Studio.
   Use it for anything that is waiting on a person. Amber is for states that need nothing from you. */
.status.notice { color: var(--notice-ink); background: var(--notice-bg); box-shadow: var(--notice-glow); }
.status.notice::before { background: var(--notice-dot); box-shadow: var(--notice-dot-glow); }

/* "Made-up sample data" chip, on every screen that shows made-up records */
.sample-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px dashed var(--accent); border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; color: var(--ink-soft); background: var(--panel); }

/* the one-click light/dark switch */
.theme-switch {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--panel); color: var(--ink);
  font-weight: 700; font-size: 13px; cursor: pointer;
}
.theme-switch svg { width: 16px; height: 16px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
