/* Equipment Monitor — the custom dashboard's one stylesheet (2026-11-05).
   Palette (kept after the logo itself was dropped, 11-10): navy wordmark #083763, frame blue #154e7b,
   steel #718699, orange accents #f77b21, grey byline #595959. */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --border: #dfe5ec;
  --border-strong: #c3ccd7;
  --text: #0f2a44;
  --text-muted: #4f6478;
  --text-faint: #8d9cab;
  --steel: #718699;
  --accent: #154e7b;
  --accent-soft: #e6eef6;
  --accent-ink: #083763;
  --orange: #f77b21;
  --orange-soft: #fdebdc;
  --mark: #ffd9b8;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -16px rgba(15, 23, 42, .25);
  --font: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
a { color: inherit; }
button { font: inherit; }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1720px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font-weight: 700; letter-spacing: -.01em; color: var(--accent-ink); font-size: 15px; text-transform: uppercase; }
.brand-by { font-size: 11px; color: var(--text-muted); }
.topbar { border-top: 3px solid var(--orange); }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; color: var(--text-muted); padding: 6px 12px; border-radius: 8px; font-weight: 500; }
.nav a.active, .nav a:hover { color: var(--text); background: var(--surface-2); }
.signout { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who { color: var(--text-muted); font-size: 13px; }

/* 1720: the grid's nine columns with their filter row need ≈1,440px; at 1480 a
   wide screen still showed a sideways scrollbar (Avraham, 11-11). */
.page { max-width: 1720px; margin: 0 auto; padding: 28px 24px 64px; }
.muted { color: var(--text-muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-block { width: 100%; }
.btn.disabled { pointer-events: none; opacity: .4; }

/* Your alert — the panel at the top of the overview */
.alert-panel { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: center;
  background: linear-gradient(135deg, var(--accent-ink) 0%, var(--accent) 70%, #2b6a9c 100%); color: #fff;
  border-radius: 16px; padding: 28px 32px; margin-bottom: 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.alert-panel::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--orange); }
.alert-panel.paused { background: linear-gradient(135deg, #3b4a5a, #5a6b7c); }
.alert-panel.setup { grid-template-columns: 1fr; }
.alert-panel.setup .alert-title { max-width: 26ch; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; display: flex; align-items: center; gap: 10px; }
.alert-title { margin: 8px 0 6px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.alert-title .sep { margin: 0 10px; opacity: .5; }
.alert-sub { margin: 0 0 16px; opacity: .85; max-width: 60ch; }
.alert-note { margin: 16px 0 0; font-size: 12px; opacity: .7; max-width: 64ch; line-height: 1.4; }
.alert-actions { display: flex; gap: 10px; align-items: center; }
.alert-panel .btn { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #fff; }
.alert-panel .btn:hover { background: rgba(255,255,255,.16); }
.alert-panel .btn-primary { background: var(--orange); border-color: var(--orange); color: #1a1a1a; font-weight: 600; }
.alert-panel .btn-primary:hover { background: #ff8c3a; }
.btn-lg { padding: 11px 18px; font-size: 15px; }
.alert-stats { display: grid; gap: 10px; }
.alert-stats .stat { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 12px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 10px 14px; }
.alert-stats .n { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; text-align: right; }
.alert-stats .l { font-size: 13px; opacity: .9; line-height: 1.3; }
.pill { font-size: 11px; font-weight: 600; letter-spacing: .04em; border-radius: 999px; padding: 2px 9px; text-transform: none; }
.pill-on { background: var(--orange); color: #1a1a1a; }
.pill-off { background: rgba(255,255,255,.2); color: #fff; }

/* Tabs */
.tabs { display: flex; gap: 4px; }
.tab { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 9px; font-weight: 500; color: var(--text-muted); }
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.active { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 -2px 0 var(--orange); }

/* Metric cards (buttons) — inside the market panel, above the grid */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 18px 20px 4px; }
.metric { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; cursor: pointer; display: grid; gap: 4px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.metric:hover { border-color: var(--accent); }
.metric.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 3px 0 var(--orange); }
.metric .label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.metric.active .label { color: var(--accent-ink); }
.metric .value { font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.metric .hint { font-size: 11px; color: var(--text-faint); }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.filters { display: none; }  /* hidden state only; the controls live in the table's filter row */
select, input[type=search], input[type=email], input[type=password], input[type=text] {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px 10px; min-width: 160px; }
select:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=search] { min-width: 220px; }

.count { padding: 12px 20px; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.count strong { color: var(--text); font-weight: 600; }
.empty { padding: 48px 24px; text-align: center; color: var(--text-faint); }

/* Table */
.table-wrap { overflow-x: auto; }
table.lots { width: 100%; border-collapse: collapse; font-size: 13px; }
table.lots th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-muted); padding: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
table.lots th button.sort { all: unset; cursor: pointer; display: flex; gap: 4px; align-items: center; padding: 8px 12px; width: 100%; box-sizing: border-box; }
table.lots th.num button.sort { justify-content: flex-end; }
table.lots th button.sort:hover, table.lots th.sorted button.sort { color: var(--text); }
table.lots th button.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.btn:disabled { opacity: .4; cursor: default; }
.sort-mark { font-size: 9px; width: 10px; display: inline-block; }
table.lots td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
/* The filter row: one control per column, inside the column, under its name. */
table.lots tr.filter-row th { padding: 6px 8px 8px; background: var(--surface); border-top: 0; }
table.lots tr.filter-row select, table.lots tr.filter-row input[type=search] {
  min-width: 0; width: 100%; box-sizing: border-box; padding: 5px 8px; font-size: 12px; border-radius: 7px; }
table.lots tr.filter-row th:nth-child(1) select, table.lots tr.filter-row th:nth-child(2) select { min-width: 110px; }
table.lots tr.filter-row th:nth-child(3) select { min-width: 130px; }
table.lots tr.filter-row th:nth-child(4) select { min-width: 150px; }
table.lots tr.filter-row th:nth-child(5) input { min-width: 220px; }
table.lots td.empty { padding: 48px 24px; text-align: center; color: var(--text-faint); }
table.lots tbody tr:hover td { background: var(--surface-2); }
/* Long text is held to one line and cut with an ellipsis; the full text is the
   cell's title attribute, so hovering shows it (David, 11-05 meeting). */
table.lots td.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.lots td.title { max-width: 420px; }
table.lots td.loc { max-width: 170px; }
table.lots td.title a { text-decoration: none; font-weight: 500; }
table.lots td.title a:hover { text-decoration: underline; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sub { color: var(--text-muted); font-size: 12px; }
.also { display: inline-block; margin-left: 6px; font-size: 11px; color: #9a4a0e; background: var(--orange-soft); border-radius: 999px; padding: 1px 7px; }
mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 2px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 14px; border-top: 1px solid var(--border); }

/* Admin */
.admin-head h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; color: var(--accent-ink); }
.admin-head p { margin: 0 0 18px; }
.banner { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 13px; }
.banner-warn { background: #fff4e8; border: 1px solid #f7c59a; color: #7a3a07; }
.banner-ok { background: #ecf7ef; border: 1px solid #b7e0c2; color: #1f5a30; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin: 18px 0; }
.panel + .panel { margin-top: 18px; }
table.admin th { padding: 8px 12px; }
table.admin td { padding: 8px 12px; }
.status { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .03em; border-radius: 999px; padding: 2px 9px; text-transform: lowercase; }
.status-healthy, .status-success { background: #e3f3e8; color: #1f5a30; }
.status-no_targets, .status-partial { background: #eef1f5; color: var(--text-muted); }
.status-stale, .status-zero_yield, .status-running { background: #fff1e2; color: #8a4b0f; }
.status-failing, .status-fail, .status-no_runs { background: var(--danger-soft); color: var(--danger); }
code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* Alert form */
.form-panel { max-width: 960px; }
.alert-form { padding: 20px 24px 28px; display: grid; gap: 22px; }
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px 18px; margin: 0; }
legend { font-weight: 600; padding: 0 6px; color: var(--accent-ink); }
.scope { display: flex; gap: 18px; margin-bottom: 10px; }
.scope label, .check-grid label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 18px; }
.check-grid.three { grid-template-columns: repeat(3, 1fr); }
.check-h { margin: 14px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.check-h:first-child { margin-top: 4px; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 6px; }
.family { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); display: grid; gap: 8px; align-content: start; }
.family-head { font-weight: 600; color: var(--accent-ink); }
/* Sub-brands start under the family name's text (checkbox 15px + 8px gap). */
.family-subs { display: grid; gap: 5px; margin-left: 23px; padding-left: 10px; border-left: 2px solid var(--border); }
.family-subs label { font-size: 13px; color: var(--text-muted); }
.family.covered { border-color: var(--accent); }
.family.covered .family-subs label { opacity: .55; }
.small { font-size: 12px; margin: 0 0 10px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 15px; height: 15px; }
.form-actions { display: flex; gap: 10px; align-items: center; }

/* Login */
.login-wrap { min-height: calc(100vh - 92px); display: grid; place-items: center; }
.login-card { width: 400px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--orange); border-radius: 16px; padding: 28px 32px 32px; box-shadow: var(--shadow); text-align: center; }
.login-wordmark { display: grid; gap: 2px; margin: 4px 0 14px; }
.login-wordmark .brand-name { font-size: 22px; }
.login-wordmark .brand-by { font-size: 12px; }
.login-tagline { margin: 0 0 6px; font-size: 13px; }
.login-card .stack { text-align: left; }
.login-help { margin: 16px 0 0; font-size: 13px; }
.login-help a { color: var(--accent); text-decoration: none; }
.login-help a:hover { text-decoration: underline; }
.login-h { margin: 4px 0 8px; font-size: 18px; color: var(--accent-ink); }
.stack { display: grid; gap: 14px; margin-top: 18px; }
.stack label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-muted); }
.stack input { min-width: 0; }
.alert { padding: 10px 12px; border-radius: 9px; font-size: 13px; margin-top: 14px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }

@media (max-width: 900px) {
  .metrics { grid-template-columns: 1fr; }
  .alert-panel, .alert-panel.setup { grid-template-columns: 1fr; }
  .check-grid, .check-grid.three { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  select, input[type=search] { min-width: 0; flex: 1 1 140px; }
}
