/* Shared styles for the BarbrickDesign operations pages (project status, fix queue,
   repair loop, automation overview, server health, GitHub activity …).
   Mobile-first; no horizontal scrolling at 390 px; tap targets >= 44 px. */
:root {
  --bg: #0b1220; --panel: #121a2b; --panel2: #18223a; --line: #26324d;
  --text: #e6edf7; --muted: #a9b8cf; --accent: #22d3ee; --accent2: #7dd3fc;
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171; --info: #93c5fd;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.ops {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
}
.ops a { color: var(--accent2); }
.ops a:hover { color: #fff; }
.ops :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ops .skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #000; padding: 10px 14px; z-index: 50; }
.ops .skip:focus { left: 8px; top: 8px; }

/* header + nav */
.ops-top { background: linear-gradient(180deg, #0f1a30, var(--bg)); border-bottom: 1px solid var(--line); }
.ops-top .wrap { padding-top: 14px; padding-bottom: 10px; }
.ops-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.ops-brand a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ops-brand a:hover { color: var(--text); }
.ops-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ops-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  color: var(--text); font-size: 14px; background: var(--panel);
}
.ops-nav a[aria-current="page"] { border-color: var(--accent); color: var(--accent); }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.ops h1 { font-size: 1.6rem; line-height: 1.25; margin: 18px 0 6px; }
.ops h2 { font-size: 1.2rem; margin: 0 0 10px; }
.ops h3 { font-size: 1.02rem; margin: 0 0 6px; }
.ops .lead { color: var(--muted); margin: 0 0 14px; max-width: 75ch; }
main.wrap { padding-bottom: 40px; }

/* panels + grids */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; min-width: 0; }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.c2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid.c3, .grid.c4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 980px) { .grid.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .grid.c4 { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.stat .v { font-size: 1.6rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.stat .k { color: var(--muted); font-size: 14px; }
.stat .s { color: var(--muted); font-size: 14px; margin-top: 4px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .info { color: var(--info); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 14px; border: 1px solid var(--line); background: var(--panel2); white-space: nowrap; }
.chip.ok { border-color: rgba(52,211,153,.5); } .chip.warn { border-color: rgba(251,191,36,.5); } .chip.bad { border-color: rgba(248,113,113,.55); } .chip.info { border-color: rgba(147,197,253,.5); }
.notice { border-left: 4px solid var(--warn); background: rgba(251,191,36,.08); padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.notice.err { border-left-color: var(--bad); background: rgba(248,113,113,.08); }
.notice.ok { border-left-color: var(--ok); background: rgba(52,211,153,.08); }

/* forms */
.ops label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.ops input[type=text], .ops input[type=url], .ops input[type=password], .ops input[type=search], .ops input[type=number], .ops select, .ops textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--text);
  background: #0d1526; border: 1px solid var(--line); border-radius: 10px;
}
.ops textarea { min-height: 90px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row > .f { flex: 1 1 200px; min-width: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 0 16px; font: inherit; font-size: 15px; font-weight: 600;
  color: #04111a; background: var(--accent); border: 0; border-radius: 10px; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.1); color: #04111a; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--text); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid rgba(248,113,113,.5); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.ops input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; color: var(--text) !important; font-size: 15px !important; }

/* lists / tables (cards on phone, table on desktop) */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-width: 0; overflow-wrap: anywhere; }
.item .t { font-weight: 600; }
.item .m { color: var(--muted); font-size: 14px; }
.item .links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.item .links a { display: inline-flex; align-items: center; min-height: 44px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 14px; }
.tbl a { display: inline-block; min-height: 24px; }
@media (max-width: 760px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 6px 4px; }
  .tbl td { border: 0; padding: 4px 10px; }
  .tbl td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 14px; }
  .tbl a { min-height: 44px; display: inline-flex; align-items: center; }
}
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs button { min-height: 44px; padding: 0 14px; font: inherit; font-size: 15px; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); }
details.how { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; margin: 14px 0; }
details.how summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; }
details.how[open] { padding-bottom: 12px; }
details.how li { margin: 4px 0; }
.bar { height: 10px; background: #0d1526; border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar > span { display: block; height: 100%; background: var(--accent); }
.spark { width: 100%; height: 40px; display: block; }
.ops-foot { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding: 16px 0 24px; margin-top: 24px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; overflow-wrap: anywhere; }
.hide { display: none !important; }
