/* opnkit dashboard — dense app shell on the "Mosaic" brand (see the general design canvas). */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url("/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url("/fonts/space-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --teal: #0e7c6b; --teal-hover: #0a6457; --teal-ink: #0a6457; --teal-soft: rgba(14,124,107,.12);
  --deep: #03110f; --mint: #7fd9c4; --mint-ink: #0a2f2a;
  --ink: #17201e; --ink-2: #3c4846; --muted: #5b6866;
  --stone: #f6f4ef; --stone-2: #f1eee7; --stone-3: #ece8df;
  --line: #e2ded5; --line-2: #ece8e0; --line-3: #f0ece4; --field: #c9c4ba;
  --warn: #c98a1a; --warn-ink: #7a4a00; --warn-bg: #fdf6ea; --warn-line: #f3e2c3; --warn-badge: #fbe7c4;
  --bad: #a3261b; --bad-bg: #fdf0ee;
  --code: #0f1f1c;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--stone); line-height: 1.45; font-size: 14px; }
a { color: var(--teal); } a:hover { color: var(--teal-hover); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(14,124,107,.35); outline-offset: 2px; }
.mut { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.small { font-size: 12px; }

/* ---------- shell */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.top { position: relative; background: var(--deep) url("/img/mosaic.svg") center 30% / cover no-repeat; color: #fff; flex: none; }
.top::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,17,15,.88), rgba(3,17,15,.62) 60%, rgba(3,17,15,.45)); }
.top-in { position: relative; display: flex; align-items: center; gap: 16px; padding: 0 16px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; width: 184px; }
.brand:hover { color: #fff; }
.brand b { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.ws { font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 0 10px; min-height: 36px; display: flex; align-items: center; gap: 8px; }
.cmdbar { flex: 1 1 320px; max-width: 560px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: 0 10px; min-height: 36px; }
.cmdbar:focus-within { border-color: var(--mint); }
.cmdbar input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; background: transparent; color: #fff; }
.cmdbar input::placeholder { color: #9fb8b2; }
.cmdbar kbd { font: inherit; font-size: 12px; color: #b9d8d1; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 0 6px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-link { color: #d6ebe6; text-decoration: none; font-weight: 500; padding: 8px 10px; background: none; border: 0; font: inherit; cursor: pointer; }
.top-link:hover { color: #fff; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }

.body { flex: 1; display: flex; flex-wrap: wrap; align-items: stretch; }
.side { flex: 1 1 200px; max-width: 216px; background: var(--stone-2); border-right: 1px solid var(--line); padding: 10px 10px 16px; display: flex; flex-direction: column; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 0 10px; min-height: 40px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:hover { background: #e9e5dc; color: var(--ink); }
.nav a[aria-current="page"] { background: #fff; color: var(--teal-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(23,32,30,.08); }
.nav .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.cap { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.kit { margin-top: auto; padding: 14px 10px 0; display: flex; flex-direction: column; gap: 8px; }
.kit-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.kit-grid span { aspect-ratio: 1; background: rgba(14,124,107,.14); }
.kit-grid span.lit { background: var(--mint); }
.main { flex: 999 1 640px; min-width: 0; padding: 18px 24px 40px; display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 860px) {
  .side { max-width: none; flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px 10px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .side .cap, .side .kit { display: none; }
  .brand { width: auto; }
  .main { padding: 14px 14px 32px; }
}

/* facets (clip only on icons and small markers, never on text blocks) */
.f1 { clip-path: polygon(0 6%, 100% 0, 94% 100%, 4% 94%); }
.f2 { clip-path: polygon(4% 0, 100% 8%, 96% 92%, 0 100%); }
.f3 { clip-path: polygon(0 0, 92% 4%, 100% 100%, 8% 96%); }
.f4 { clip-path: polygon(6% 4%, 100% 0, 100% 96%, 0 100%); }
.fac { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--teal-soft); color: var(--teal); flex: none; }
.fac.lg { width: 40px; height: 40px; background: var(--mint); color: var(--mint-ink); }

/* ---------- page head */
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
h1 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- controls */
.btn { font: inherit; font-weight: 600; border: 1px solid var(--field); background: #fff; color: var(--teal); padding: 0 12px; min-height: 36px; border-radius: 10px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn:hover { border-color: var(--teal); color: var(--teal-hover); }
.btn.pri { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.pri:hover { background: var(--teal-hover); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--stone-2); }
.btn.xs { min-height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--bad); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.lnk { font-size: 13px; font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; color: var(--teal); font-family: inherit; }
.seg-group { display: flex; background: var(--stone-3); border-radius: 8px; padding: 2px; }
.seg { font: inherit; font-weight: 600; font-size: 13px; border: 0; border-radius: 6px; padding: 0 10px; min-height: 30px; cursor: pointer; background: transparent; color: var(--muted); }
.seg[aria-pressed="true"] { background: #fff; color: var(--ink); }
.chip { font: inherit; font-size: 13px; color: var(--ink); background: var(--stone-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 10px; min-height: 30px; cursor: pointer; }
.chip:hover { border-color: var(--teal); }
.field { font: inherit; border: 1px solid var(--field); border-radius: 10px; padding: 0 10px; min-height: 36px; background: #fff; color: var(--ink); outline: none; min-width: 0; }
.field:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,124,107,.18); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--field); border-radius: 10px; padding: 0 10px; min-height: 36px; background: #fff; }
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,124,107,.18); }
.search input { border: 0; outline: none; font: inherit; flex: 1; min-width: 0; background: transparent; color: var(--ink); }
label.stack { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }

/* ---------- badges, dots */
.badge { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.inst { background: var(--mint); color: var(--mint-ink); }
.badge.upd { background: var(--warn-badge); color: var(--warn-ink); }
.badge.muted { background: var(--stone-3); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.dot.ok { background: var(--teal); } .dot.warn { background: var(--warn); } .dot.critical { background: var(--bad); } .dot.unknown { background: #9aa5a3; }
.st-ok { color: var(--teal-ink); } .st-warn { color: var(--warn-ink); } .st-critical { color: var(--bad); } .st-unknown { color: var(--muted); }

/* ---------- cards, layout */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.card.clip { overflow: hidden; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.card-h h2 { margin: 0; font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card-b { padding: 12px 16px; }
.row { display: flex; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line-3); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.empty { padding: 18px 16px; color: var(--muted); }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col-main { flex: 999 1 620px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.kpi { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line-2); }
.kpi:last-child { border-right: 0; }
.kpi b { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi .d { font-size: 12px; color: var(--muted); }
.strip { display: flex; flex-wrap: wrap; }
.strip > div { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; flex: 1 1 240px; min-width: 0; border-right: 1px solid var(--line-2); }
.strip > div:last-child { border-right: 0; }
.strip > div.warn { background: var(--warn-bg); }
.strip > div.critical { background: var(--bad-bg); }
.strip .dot { margin-top: 6px; }
.tag { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--teal-ink); background: var(--teal-soft); padding: 1px 5px; border-radius: 5px; margin-left: 6px; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-weight: 500; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="true"] { color: var(--teal-ink); font-weight: 600; border-bottom-color: var(--teal); }
.note { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.code { font-family: var(--mono); font-size: 12px; line-height: 1.7; background: var(--code); color: #d6ebe6; border-radius: 10px; padding: 10px 12px; overflow-x: auto; white-space: pre; }
.code .k { color: var(--mint); } .code .c { color: #9fb8b2; }

/* ---------- tables */
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 8px 12px; background: #faf8f4; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl th.c, .tbl td.c { text-align: center; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-3); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #faf8f4; }
.tbl td.r { text-align: right; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who strong { display: block; font-weight: 600; }
.av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; background: var(--stone-3); color: var(--ink); }
.av.owner { background: var(--mint); color: var(--mint-ink); } .av.admin { background: var(--teal); color: #fff; } .av.member { background: #092623; color: #fff; }
.bar { flex: 1; height: 6px; border-radius: 999px; background: var(--stone-3); overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--teal); }
.bar.warn > span { background: var(--warn); }

/* access grid */
.cell { font: inherit; width: 34px; height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; display: inline-grid; place-items: center; color: #9aa5a3; }
.cell:hover { border-color: var(--field); }
.cell > span { width: 22px; height: 22px; display: grid; place-items: center; }
.cell.on { color: var(--mint-ink); } .cell.on > span { background: var(--mint); }
.cell.pending > span { background: transparent; outline: 2px dashed var(--mint); outline-offset: -3px; color: var(--teal-ink); }
.cell.chg { border-color: var(--warn); background: var(--warn-bg); }
.planbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--warn-bg); }
.planbar ul { margin: 0; padding-left: 18px; flex: 1 1 280px; font-size: 13px; }

/* plan box (people, assistant) */
.plan { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.plan-h { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-weight: 600; background: var(--stone); }
.plan ul { margin: 0; padding: 10px 12px 10px 30px; display: flex; flex-direction: column; gap: 4px; }
.plan-f { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; align-items: center; }
.ok-box { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; background: rgba(127,217,196,.3); font-size: 13px; }
.err-box { padding: 8px 10px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-size: 13px; }

/* dialog */
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(23,32,30,.25); color: var(--ink); }
dialog::backdrop { background: rgba(3,17,15,.45); }
dialog form { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
dialog h2 { margin: 0; font-family: var(--display); font-size: 20px; }
.checks { display: flex; flex-direction: column; gap: 6px; }
.checks label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.checks input { accent-color: var(--teal); width: 16px; height: 16px; }

/* login gate */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--deep) url("/img/mosaic.svg") center / cover no-repeat; }
.gate-card { width: min(420px, 100%); background: #fff; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.gate-card h1 { font-size: 26px; }
.gate-card .field { min-height: 44px; font-size: 16px; }
.gate-card .btn { min-height: 44px; font-size: 15px; }
#code-input { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.skeleton { color: var(--muted); padding: 40px; text-align: center; }
