/*
 * components.css — the SHARED primitive layer. Imports nothing; assumes tokens.css is loaded first
 * (it consumes the custom properties).
 *
 * SCOPE (post-Tailwind): this file holds ONLY the primitives that the static login page
 * (public/login.html) needs — the base reset, brand/logo, surfaces, typography helpers, buttons,
 * fields, notices, and the theme toggle. The login page has no build step and cannot use Tailwind
 * utilities, so these stay as global classes shared with the React console.
 *
 * All console-COMPONENT styling (nav, meeting list/detail, transcript, frames, system health) now
 * lives as Tailwind utilities in the components themselves (see console-ui/tailwind.config.js) — do
 * NOT add page-specific rules back here; add them as utilities where the component is.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
  /* Tailwind's Preflight is OFF (this file owns the reset), so nothing else gives elements a border
   * STYLE. A width utility (`border`, `border-l-2`) on a div then sets width + colour on a border
   * whose UA style is `none` — and renders nothing. Every card hairline and rail in the console
   * was silently missing until 2026-08-27 (L-079). Mirror Preflight exactly: width 0 (the UA
   * initial width is `medium`, so style alone would draw a 3px border on EVERYTHING), solid, token
   * colour. Elements that want a border say so — `.btn`, fields, notices, and every utility. */
  border-width: 0;
  border-style: solid;
  border-color: var(--border);
}

/* Same reasoning for buttons: Preflight strips the UA button face (grey background, padding,
 * system font) and every Tailwind-styled <button> in the console assumes that. Without it a
 * link-style or text-only button renders as a grey pill. `.btn` and `.theme-toggle` set their own
 * padding/background and are unaffected. */
button {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  background-color: transparent;
  background-image: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--brand-strong);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* --- brand / logo --------------------------------------------------------- */

/* The DOT logo. Inline the SVG and set `fill: var(--brand)` on its paths, OR use the .brand-logo
 * <img>; the img can't recolour per-theme, so on dark surfaces prefer the inlined form. */
.brand-logo {
  display: block;
  width: 132px;
  height: auto;
}
.brand-logo svg,
.brand-logo path {
  fill: var(--brand);
}
.brand-logo--sm {
  width: 96px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.brand-lockup .brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.brand-lockup .brand-sub {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}

/* --- surfaces ------------------------------------------------------------- */

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  box-shadow: var(--shadow-1);
}

.panel-title {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.panel-sub {
  font-size: 12px;
  color: var(--faint);
}

/* --- typography helpers --------------------------------------------------- */

.h-title {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0;
}
.hint,
.sub {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0;
}
.faint {
  color: var(--faint);
}
.mono {
  font-family: var(--mono);
}

/* --- buttons -------------------------------------------------------------- */

.btn {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.btn:hover {
  border-color: var(--faint);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
.btn.primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn.danger {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--err) 45%, var(--border-strong));
  color: var(--err);
}
.btn.danger:hover {
  background: var(--err-bg);
}

/* subtle link-style button (e.g. "use a different account") */
.btn.ghost {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  font-size: 13px;
  padding: 6px 12px;
}

/* --- fields --------------------------------------------------------------- */

label.field {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}
input[type='text'],
input[type='email'],
select {
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

/* --- notices: the honest states (refusal / error / info / empty) ---------- */

/* Base notice; variant classes set the palette. Never a bare 500 or blank page (voice rules). */
.notice {
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13.5px;
  border: 1px solid transparent;
}
.notice .notice-title {
  display: block;
  font-weight: 700;
  margin-bottom: 3px;
}
.notice.refusal,
.notice.warn {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: var(--warn-edge);
}
.notice.error,
.notice.err {
  background: var(--err-bg);
  color: var(--err);
  border-color: color-mix(in srgb, var(--err) 40%, transparent);
}
.notice.info {
  background: var(--info-bg);
  color: var(--info);
  border-color: color-mix(in srgb, var(--info) 35%, transparent);
}
.notice.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}

/* --- theme toggle --------------------------------------------------------- */

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

