/* BIZARRO cloud portal: the /admin/fixtures palette ("Fluro Laser Day"): violet = UI/action, cyan = live/data. */
@font-face { font-family: "Michroma"; src: url("/fonts/Michroma-Regular.ttf") format("truetype"); font-display: swap; }
:root {
  --bg: #eef0f4; --panel: #fcfcfd; --slot: #e4e7ee; --border: #dbdee6; --border-strong: #b9bfcd;
  --text: #1c1430; --dim: #5b566b; --accent: #5f22d9; --accent-bg: rgba(95,34,217,0.12); --deep: #2b0f62;
  --live: #00798c; --live-deep: #00606f; --live-bg: rgba(0,121,140,0.12);
  --danger: #b3261e; --danger-bg: rgba(179,38,30,0.10);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12101a; --panel: #1b1826; --slot: #262234; --border: #2e2a3d; --border-strong: #4a4560;
    --text: #efedf6; --dim: #a29db5; --accent: #9b6bff; --accent-bg: rgba(155,107,255,0.16); --deep: #c8adff;
    --live: #3cc4d6; --live-deep: #5fd6e6; --live-bg: rgba(60,196,214,0.14);
    --danger: #ff8a80; --danger-bg: rgba(255,138,128,0.12);
  }
}
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); } a:hover { color: var(--deep); }
h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 16px; font-weight: 600; } h3 { margin: 0; }
p { margin: 0; } .mono { font-family: var(--mono); font-size: 13px; }
.skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; left: 8px; top: 8px; z-index: 30; background: var(--panel); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.legend { margin: 0; font: 400 10px/1.4 "Michroma", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.muted, .hint { color: var(--dim); } .hint { font-size: 13px; } .strong { font-weight: 600; } .grow { flex: 1 1 0; min-width: 0; }
.pre { white-space: pre-wrap; }
.boot { padding: 48px 24px; text-align: center; color: var(--dim); }

/* shell */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--border); }
.brand, .who { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; } .who { font-size: 14px; }
.who-link { color: var(--text); text-decoration: none; overflow-wrap: anywhere; } .who-link:hover { color: var(--accent); }
.wordmark { font-family: "Michroma", sans-serif; font-size: 15px; letter-spacing: 0.06em; color: var(--text); text-decoration: none; }
.big-mark { font-size: 18px; color: var(--accent); }
.org-name { font-weight: 600; padding-left: 14px; border-left: 1px solid var(--border-strong); }
.org-switch { min-height: 36px; }
.layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; padding: 24px; max-width: 1200px; margin: 0 auto; }
.layout.solo { max-width: 880px; }
nav { flex: 1 1 200px; max-width: 220px; display: flex; flex-direction: column; gap: 2px; }
nav a { display: flex; align-items: center; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; min-height: 44px; }
nav a:hover { background: var(--slot); } nav a[aria-current] { background: var(--accent-bg); color: var(--deep); font-weight: 600; }
.nav-foot { padding: 12px; }
.content { flex: 999 1 520px; min-width: 0; outline: none; display: flex; flex-direction: column; gap: 16px; }
.center { display: flex; justify-content: center; padding: 48px 16px; }
.stack { display: flex; flex-direction: column; gap: 20px; } .stack-s { display: flex; flex-direction: column; gap: 10px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; } .page-head p { margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .between { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.back { font-size: 14px; align-self: flex-start; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; text-decoration: none; align-self: flex-start; }
.btn:hover { border-color: var(--accent); color: var(--text); } .btn[disabled] { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; } .btn-primary:hover { background: var(--deep); border-color: var(--deep); color: var(--bg); }
.btn.wide { width: 100%; min-height: 48px; font-weight: 600; align-self: stretch; }
.btn.danger { border-color: var(--danger); color: var(--danger); } .btn.danger:hover { background: var(--danger-bg); }
.google { gap: 8px; }
.linklike { border: 0; background: none; padding: 6px 4px; font: inherit; color: var(--accent); cursor: pointer; text-align: left; min-height: 36px; }
.linklike:hover { color: var(--deep); text-decoration: underline; } .linklike[disabled] { opacity: 0.5; cursor: default; }
.danger-text { color: var(--danger); } .danger-text:hover { color: var(--danger); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--slot); font-size: 12px; margin: 0 6px; white-space: nowrap; vertical-align: 1px; }
.pill-warn { background: var(--accent-bg); color: var(--deep); font-weight: 600; }
.pill-staff { background: var(--live-bg); color: var(--live-deep); font: 400 9px/1.8 "Michroma", sans-serif; letter-spacing: 0.1em; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  min-height: 44px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); font: inherit; padding: 0 12px; width: 100%; min-width: 0;
}
textarea { padding: 10px 12px; resize: vertical; }
input:disabled, select:disabled { opacity: 0.65; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dim); min-width: 0; }
.field > span:first-child { font-weight: 500; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; } .check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; } .form-grid .span { grid-column: 1 / -1; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } .inline-form .field { flex: 1 1 220px; }
.slug-input { display: flex; align-items: center; gap: 4px; } .slug-input .muted { white-space: nowrap; font-family: var(--mono); font-size: 13px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* cards, rows */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
a.card { color: var(--text); text-decoration: none; } a.card:hover { border-color: var(--accent); }
.card.narrow { width: 100%; max-width: 420px; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { gap: 4px; } .stat-value { font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* D538: an admin-home number that needs a look */
.stat-warn .stat-value { color: var(--danger); }
.org-card .pill { align-self: flex-start; margin: 0; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); min-height: 52px; }
.row:first-child { border-top: 0; }
.row select { width: auto; min-width: 120px; }
.audit .row { align-items: baseline; }
.roles { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; } .roles dt { font-weight: 600; } .roles dd { margin: 0; color: var(--dim); }
.flash { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); }
.flash.ok { border-color: var(--live); background: var(--live-bg); } .flash.error { border-color: var(--danger); background: var(--danger-bg); }
.flash span { overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .topbar { padding: 10px 16px; } .layout { padding: 16px; gap: 16px; }
  nav { flex-direction: row; flex-wrap: wrap; max-width: none; flex-basis: 100%; gap: 4px; }
  nav a { min-height: 40px; padding: 8px 12px; background: var(--slot); }
  .nav-foot { display: none; }
  h1 { font-size: 24px; }
  .roles { grid-template-columns: 1fr; } .roles dd { margin-bottom: 6px; }
}

/* nodes (C2) */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 4px; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.pill-ok { background: var(--live-bg); color: var(--live-deep); font-weight: 600; }
.pill-off { background: var(--slot); color: var(--dim); }
.pill-live { background: var(--accent-bg); color: var(--deep); font-weight: 600; }
.state-done { background: var(--live-bg); color: var(--live-deep); }
.state-failed, .state-expired { background: var(--danger-bg); color: var(--danger); }
.state-pending, .state-sent, .state-running { background: var(--accent-bg); color: var(--deep); }
.live-banner { border-color: var(--accent); background: var(--accent-bg); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--dim); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.found { border: 1px dashed var(--accent); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.code-input { font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.code-input::placeholder { text-transform: none; letter-spacing: 0; }
.pin-input { font-family: var(--mono); letter-spacing: 0.08em; }
.pin-input::placeholder { font-family: inherit; letter-spacing: 0; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.btn.danger-solid:hover { filter: brightness(1.1); color: #fff; }
.logs { margin: 0; max-height: 420px; overflow: auto; padding: 12px; border-radius: 8px; background: var(--slot); font: 12px/1.45 var(--mono); white-space: pre; }
.node-card .between { align-items: center; }
.remove-row { align-items: center; border-top: 1px solid var(--border); padding-top: 12px; }
.remove-row .hint { flex: 1 1 260px; }
code { font-family: var(--mono); font-size: 13px; background: var(--slot); padding: 1px 6px; border-radius: 4px; }
.software-admin { border-top: 1px solid var(--border); padding-top: 12px; }
.software-admin .inline-form select { flex: 1 1 220px; width: auto; }

/* C5: the history tree */
.tree-wrap { display: flex; gap: 6px; align-items: flex-start; }
.tree { flex: none; overflow: visible; }
.tree .edge { fill: none; stroke-width: 2; }
.tree .dot { stroke: var(--panel); stroke-width: 2; }
.tree .dot.merge { stroke: var(--text); }
.lane-0 { stroke: var(--accent); fill: var(--accent); }
.lane-1 { stroke: var(--live); fill: var(--live); }
.lane-2 { stroke: #d9822b; fill: #d9822b; }
.lane-3 { stroke: #c2185b; fill: #c2185b; }
.lane-4 { stroke: #6a8f2a; fill: #6a8f2a; }
.lane-5 { stroke: var(--dim); fill: var(--dim); }
.tree .edge.lane-0, .tree .edge.lane-1, .tree .edge.lane-2, .tree .edge.lane-3, .tree .edge.lane-4, .tree .edge.lane-5 { fill: none; }
.tree-rows { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; }
.tree-row { height: 52px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); overflow: hidden; }
.tree-row:first-child { border-top: 0; }
.tree-row .hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill-branch { background: var(--live-bg); color: var(--live-deep); }
.pill-tag { background: var(--accent-bg); color: var(--deep); font-weight: 600; }
.rig { margin-left: 8px; font-weight: 400; }

/* C6: staff */
.staff-nav { margin-top: -6px; }
.chip.on { background: var(--accent-bg); color: var(--deep); font-weight: 600; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
a.pill-staff { text-decoration: none; }
.plan-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--slot); color: var(--text); text-decoration: none; font-size: 13px; }
.chip:hover { color: var(--accent); }

/* #3: alerts */
.bell { position: relative; text-decoration: none; font-size: 16px; padding: 4px 6px; border-radius: 8px; filter: grayscale(1); opacity: 0.7; }
.bell.has { filter: none; opacity: 1; }
.bell-count { position: absolute; top: -4px; right: -8px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--accent); color: #fff; font: 600 11px/18px -apple-system, sans-serif; text-align: center; }
.bell.critical .bell-count { background: var(--danger); }
.alert-icon { width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; background: var(--slot); color: var(--dim); }
.alert-icon.critical { background: var(--danger-bg); color: var(--danger); }
.alert-icon.warning { background: var(--accent-bg); color: var(--deep); }
.alert.unread .strong::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 4px; background: var(--accent); margin-left: 8px; vertical-align: 2px; }
.alerts .row { align-items: flex-start; }

/* #23: support */
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.message { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; margin-right: 15%; }
.message.staff { margin-right: 0; margin-left: 15%; border-color: var(--live); background: var(--live-bg); }
.check.day { min-height: 36px; padding: 0 10px; border-radius: 8px; background: var(--slot); font-size: 13px; }
input[type=datetime-local], input[type=time] { min-height: 44px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--panel); color: var(--text); font: inherit; padding: 0 12px; width: 100%; }

/* #6: post-show reports */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--dim); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--border); }
.table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.card:has(> .table) { overflow-x: auto; }
.problems { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* #17: the node's live picture */
.watch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.watch-head h2 { margin: 0; }
.grow-right { margin-left: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0; }
.tile { background: var(--slot); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile-label { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.tile-value { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.meter { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); }
.meter.live > span { background: var(--live); }

/* #8: what changed between two versions */
.changes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }

/* #18: node groups */
.group-row { align-items: flex-start; }
.followers { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.followers .pill { margin-left: 0; }
.check-list { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.check-list legend { font-size: 13px; color: var(--dim); margin-bottom: 4px; }

/* The fixture editor (docs/ofl-import-plan.md §6.5, V2). */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.notes { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.notes.warn li { color: var(--warn, #b26a00); }
.fixture-editor table.channels { width: 100%; border-collapse: collapse; font-size: 13px; }
.fixture-editor table.channels th { text-align: left; font-weight: 500; color: var(--dim); padding: 4px 6px; }
.fixture-editor table.channels td { padding: 3px 6px; vertical-align: middle; }
.fixture-editor table.channels input[type=text] { width: 100%; min-width: 90px; }
.fixture-editor table.channels input[type=number] { width: 64px; }
.fixture-editor td.actions { white-space: nowrap; }
.fixture-editor td.actions .linklike { margin-right: 8px; }
.fixture-editor .ranges { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 10px 24px; }
.fixture-editor .range-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fixture-editor .range-row input[type=number] { width: 64px; }
.fixture-editor .range-row input[type=text] { width: 120px; }
.fixture-editor .range-row .physical { display: inline-flex; gap: 4px; }
.fixture-editor h3 { font-size: 14px; margin: 14px 0 6px; }
@media (max-width: 700px) {
  .fixture-editor table.channels thead { display: none; }
  .fixture-editor table.channels tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line, #ddd); }
}
