/* Licensing admin styles. Every value comes from the design handoff
   (spec/design/handoff/). Colors come from tokens.css only. */

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; -webkit-font-smoothing: antialiased; background: var(--bg); color: var(--fg); }
a { color: var(--ac); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Selects keep the prototype's control size (13.33px, normal line height) in DM Sans. */
select { font-size: 13.333px; line-height: normal; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--mu); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- App shell ---------- */
.app {
  position: relative; width: 100%; min-width: 1280px; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 14px; line-height: 1.45;
}

.hdr {
  background: var(--sf); border-bottom: 1px solid var(--ln); display: flex; align-items: stretch;
  gap: 28px; padding: 0 32px; height: 56px; flex: none;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 9px; color: inherit; }
.brand-lockup:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--mark-bg); display: flex; align-items: center; justify-content: center; }
.brand-mark .hub { fill: var(--mark-bg); }
.wordmark { font-size: 15px; letter-spacing: -.03em; line-height: 1; }
.wm1 { font-weight: 300; color: var(--wm1); }
.wm2 { font-weight: 700; color: var(--wm2); }
.brand-div { width: 1px; height: 20px; background: var(--ln); }
.brand-name { font-weight: 500; color: var(--fg2); }

.nav { display: flex; gap: 18px; align-items: stretch; flex: none; }
.nav-item {
  display: flex; align-items: center; white-space: nowrap; flex: none; font-weight: 500; font-size: 13.5px;
  color: var(--mu); border-bottom: 2px solid transparent; padding-top: 2px; cursor: pointer;
}
.nav-item:hover { text-decoration: none; color: var(--fg); }
.nav-item.is-active { color: var(--fg); border-bottom-color: var(--ac); }

.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; flex: 0 1 auto; }
.search { position: relative; display: flex; align-items: center; flex: 0 1 260px; min-width: 140px; }
.search-icon { position: absolute; left: 10px; color: var(--mu); pointer-events: none; }
.search input {
  width: 100%; padding: 7px 30px 7px 32px; border: 1px solid var(--ln); border-radius: 6px;
  background: var(--sk); color: var(--fg);
}
.search kbd {
  position: absolute; right: 8px; font-family: var(--mono); font-size: 10px; color: var(--mu);
  border: 1px solid var(--ln); border-radius: 4px; padding: 0 5px; background: var(--sf); pointer-events: none;
}
.search-results {
  position: absolute; top: calc(100% + 6px); right: 0; width: 380px; max-height: 420px; overflow: auto; z-index: 20;
  background: var(--sf); border: 1px solid var(--ln); border-radius: 8px; box-shadow: var(--shadow); padding: 4px 0;
}
.sr-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none;
  padding: 7px 12px; cursor: pointer;
}
.sr-item:hover, .sr-item.is-active { background: var(--hover); }
.sr-main { flex: 1; min-width: 0; }
.sr-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-sub { font-size: 12px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-type { font-size: 11px; color: var(--mu); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; flex: none; }
.sr-empty { padding: 10px 12px; color: var(--mu); font-size: 13px; }

.example-pill {
  font-size: 11.5px; color: var(--warn); background: var(--warn-s); padding: 3px 8px; border-radius: 99px;
  white-space: nowrap; flex: none;
}
.seg { display: flex; flex: none; background: var(--sk); border: 1px solid var(--ln); border-radius: 6px; padding: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--mu); border-radius: 4px; padding: 3px 10px;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.seg button.is-on { background: var(--sf); color: var(--fg); }
.signout {
  border: 0; background: none; color: var(--mu); font-size: 12.5px; font-weight: 500; padding: 3px 2px;
  cursor: pointer; white-space: nowrap; flex: none;
}
.signout:hover { color: var(--fg); }

/* ---------- Page ---------- */
.page { flex: 1; min-height: 0; padding: 20px 32px 20px; display: flex; flex-direction: column; gap: 16px; }
.page.scroll { overflow: auto; }
.summary { display: flex; align-items: flex-end; gap: 16px; flex: none; }
.stats { display: flex; gap: 28px; padding-bottom: 2px; }
.stat { display: flex; flex-direction: column; }
.stat-n { font-family: var(--mono); font-size: 17px; color: var(--fg); }
.stat-n.warn { color: var(--warn); }
.stat-n.bad { color: var(--bad); }
.stat-l { font-size: 12px; color: var(--mu); }
.lede { font-size: 13px; color: var(--mu); max-width: 80ch; }
.lede.narrow { max-width: 70ch; }
.actions { margin-left: auto; display: flex; gap: 8px; }

.btn { border: 1px solid var(--ln); background: var(--sf); color: var(--fg2); padding: 8px 14px; border-radius: 6px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-primary { border-color: var(--ac); background: var(--ac); color: var(--on-ac); font-weight: 600; }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: default; }
a.btn { display: inline-flex; align-items: center; }

.work { flex: 1; min-height: 0; display: flex; gap: 16px; }
.card {
  flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--sf);
  border: 1px solid var(--ln); border-radius: 8px; overflow: hidden;
}
.card.fit { flex: none; }

/* ---------- Toolbar, chips, legend ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--ln); flex: none; }
.chips { display: flex; gap: 4px; }
.chip {
  border: 1px solid var(--ln); background: var(--sf); color: var(--fg); border-radius: 99px; padding: 4px 10px;
  font-size: 12.5px; display: flex; gap: 6px; cursor: pointer; white-space: nowrap;
}
.chip.is-on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip-n { opacity: .6; font-family: var(--mono); font-size: 11px; line-height: 1.7; }
.filter {
  border: 1px solid var(--ln); background: var(--in-bg); color: var(--fg); border-radius: 6px; padding: 6px 10px; width: 200px;
}
.filter.w230 { width: 230px; }
.filter.w240 { width: 240px; }
.legend { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--mu); white-space: nowrap; }
.legend span { display: flex; gap: 5px; align-items: center; }
.lg { width: 9px; height: 9px; border-radius: 50%; }
.lg.on { background: var(--ok); }
.lg.paused { border: 1.5px solid var(--warn); }
.lg.off { background: var(--ln); }
.lg.sq { border-radius: 2px; }
.lg.acc { background: var(--spark); }
.lg.bad { background: var(--bad); }

/* ---------- Bulk bar ---------- */
.bulk { display: flex; gap: 8px; align-items: center; padding: 7px 16px; background: var(--acs); border-bottom: 1px solid var(--ln); flex: none; }
.bulk b { font-weight: 600; font-size: 13px; }
.bulk-btn { border: 1px solid var(--ln); background: var(--sf); padding: 3px 10px; border-radius: 6px; font-size: 12.5px; cursor: pointer; }
.bulk-btn.bad { color: var(--bad); }
.bulk-btn:disabled { opacity: .45; cursor: default; }
.bulk-clear { border: 0; background: none; color: var(--mu); padding: 3px 6px; font-size: 12.5px; cursor: pointer; }

/* ---------- Tables ---------- */
.table-wrap { flex: 1; min-height: 0; overflow: auto; }
.card.fit .table-wrap { flex: none; }
.grid { width: 100%; table-layout: fixed; }
.grid th {
  position: sticky; top: 0; z-index: 1; padding: 9px 12px; text-align: left; font-size: 12px; font-weight: 600;
  color: var(--mu); background: var(--sf); border-bottom: 1px solid var(--ln); border-left: 1px solid transparent;
  cursor: pointer; white-space: nowrap; user-select: none;
}
.grid th.static { position: relative; }
.grid th.is-sorted { color: var(--fg); }
.grid th.right { text-align: right; }
.grid th.nosort { cursor: default; }
.grid th.tool { padding: 9px 2px; text-align: center; background: var(--th); border-left-color: var(--ln2); }
.grid th.tool.sorted-tool { color: var(--fg); }
.sort-arrow { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); font-size: 8px; line-height: 1; color: var(--ac); pointer-events: none; }
.grid th.tool .sort-arrow { top: auto; right: auto; bottom: 2px; left: 50%; transform: translateX(-50%); }
.grid td {
  padding: 8px 12px; border-bottom: 1px solid var(--ln2); border-left: 1px solid transparent; text-align: left;
  vertical-align: middle; overflow: hidden;
}
.grid td.right { text-align: right; }
.grid td.tool { padding: 8px 2px; text-align: center; background: var(--tool); border-left-color: var(--ln2); }
.grid.pad10 td { padding-top: 10px; padding-bottom: 10px; }
.grid.pad12 td { padding: 12px; }
.grid.pad12 td.tool { padding: 12px 2px; }
.grid tbody tr.clickable { cursor: pointer; }
.grid tbody tr:hover { background: var(--hover); }
.grid tbody tr.is-selected, .grid tbody tr.is-selected:hover { background: var(--sel); box-shadow: inset 3px 0 0 var(--ac); }
.grid tbody tr.is-selected td.tool { background: transparent; }
.grid tbody tr.is-revoked { opacity: .55; }
.grid input[type="checkbox"] { cursor: pointer; }

.c-main { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-main.plain { white-space: normal; }
.c-holder { font-weight: 500; color: var(--ac); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sub { font-size: 12px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sub.plain { white-space: normal; }
.c-mono { font-family: var(--mono); font-size: 11px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-num { font-size: 13px; font-variant-numeric: tabular-nums; }
.c-text { font-size: 13px; }
.c-fg2 { font-size: 13px; color: var(--fg2); }
.c-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d1 { font-size: 13px; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; }
.d1.warn { color: var(--warn); }
.d2 { font-size: 12px; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--mu); }
.exp { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.exp.warn { color: var(--warn); }
.exp.none { color: var(--mu); }
.uses { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.gtag {
  display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 4px; background: var(--sk);
  border: 1px solid var(--ln); margin-right: 4px;
}
.none-text { color: var(--mu); font-size: 13px; }
.empty { padding: 48px 16px; text-align: center; color: var(--mu); }
.loading { padding: 48px 16px; text-align: center; color: var(--mu); }
.error-box { padding: 40px 16px; text-align: center; color: var(--mu); display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* Status pill: one word, with a 6px dot in the text color */
.spill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 2px 7px;
  border-radius: 99px; white-space: nowrap;
}
.spill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.spill.big { font-size: 12px; padding: 2px 8px; }
.spill.ok { color: var(--ok); background: var(--ok-s); }
.spill.warn { color: var(--warn); background: var(--warn-s); }
.spill.bad { color: var(--bad); background: var(--bad-s); }
.spill.idle { color: var(--idle); background: var(--idle-s); }

/* Access dot */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid transparent; flex: none; }
.dot.on { background: var(--ok); border-color: var(--ok); }
.dot.held { background: transparent; border-color: var(--warn); }
.dot.dead { background: var(--ln); border-color: var(--ln); }
.dot.ring { background: transparent; border-color: var(--ln); }
.dash { color: var(--dash); }

/* ---------- Pager ---------- */
.pager { display: flex; align-items: center; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--ln); flex: none; font-size: 13px; color: var(--mu); }
.pager label { display: flex; align-items: center; gap: 8px; }
.pager select { border: 1px solid var(--ln); background: var(--in-bg); color: var(--fg); border-radius: 6px; padding: 3px 6px; }
.range { font-family: var(--mono); font-size: 12px; }
.pages { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.pnav { border: 1px solid var(--ln); background: var(--sf); color: var(--fg); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.pnav:disabled { opacity: .45; cursor: default; }
.pbtn {
  min-width: 32px; border: 1px solid var(--ln); background: var(--sf); color: var(--fg); border-radius: 6px;
  padding: 4px 8px; font-family: var(--mono); font-size: 12px; cursor: pointer;
}
.pbtn.is-cur { border-color: var(--ac); background: var(--ac); color: var(--on-ac); }
.pbtn.gap { border-color: transparent; background: transparent; color: var(--mu); cursor: default; }

/* ---------- Inspector ---------- */
.insp { width: 400px; flex: none; display: flex; flex-direction: column; background: var(--sf); border: 1px solid var(--ln); border-radius: 8px; overflow: hidden; }
.insp-head { padding: 16px 18px; border-bottom: 1px solid var(--ln); display: flex; gap: 10px; align-items: flex-start; }
.insp-head-main { min-width: 0; flex: 1; }
.insp-title-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.insp-title { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.insp-sub { font-size: 12.5px; color: var(--mu); margin-top: 3px; }
.insp-sub .mono { font-size: 11.5px; }
.insp-sub .acc { color: var(--ac); font-weight: 500; }
.xbtn { background: none; border: 1px solid var(--ln); border-radius: 6px; width: 30px; height: 30px; flex: none; color: var(--mu); cursor: pointer; }
.insp-body { flex: 1; min-height: 0; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 18px; }
.ibtns { display: flex; gap: 8px; }
.ibtn { border: 1px solid var(--ln); background: var(--sk); padding: 6px 12px; border-radius: 6px; font-weight: 500; cursor: pointer; }
.ibtn.bad { color: var(--bad); }
.ibtn.primary { border-color: var(--ac); background: var(--ac); color: var(--on-ac); font-weight: 600; }
.ibtn.surface { background: var(--sf); }
.ibtn:disabled { opacity: .45; cursor: default; }
.confirm { border: 1px solid var(--bad); background: var(--bad-s); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.confirm-btns { display: flex; gap: 8px; }
.cbtn-bad { border: 1px solid var(--bad); background: var(--bad); color: #fff; padding: 5px 12px; border-radius: 6px; font-weight: 500; cursor: pointer; }
.cbtn { border: 1px solid var(--ln); background: var(--sf); padding: 5px 12px; border-radius: 6px; cursor: pointer; }
.callout { border-left: 3px solid var(--warn); background: var(--warn-s); padding: 8px 12px; border-radius: 0 6px 6px 0; font-size: 13px; }
.callout.info { border-left-color: var(--ac); background: var(--acs); padding: 9px 14px; flex: none; }
.callout.bad { border-left-color: var(--bad); background: var(--bad-s); }
.callout.wide { padding: 9px 14px; flex: none; }
.sec { display: flex; flex-direction: column; gap: 8px; }
.sec.tight { gap: 6px; }
.sec-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--mu); font-weight: 600; }
.sec-label .r { text-transform: none; letter-spacing: 0; font-weight: 500; }
.sec-label .r.mono { font-family: var(--mono); }
.sec-link { border: 0; background: none; color: var(--ac); font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer; padding: 0; }
.list { border: 1px solid var(--ln); border-radius: 6px; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--ln2); }
.list-row.clickable { cursor: pointer; }
.list-row.clickable:hover { background: var(--hover); }
.list-empty { padding: 16px 12px; color: var(--mu); font-size: 13px; }
.lr-main { flex: 1; min-width: 0; }
.lr-title { font-weight: 500; }
.lr-title.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-title.acc { color: var(--ac); }
.lr-sub { font-size: 12px; color: var(--mu); }
.lr-mono { font-family: var(--mono); font-size: 11px; color: var(--mu); }
.lr-meta { font-size: 12px; color: var(--mu); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.tags.flat { margin-top: 0; }
.tag { font-family: var(--mono); font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--sk); border: 1px solid var(--ln); }
.tag.fg2 { color: var(--fg2); }
.grant-text { font-size: 12px; white-space: nowrap; }
.grant-text.on { color: var(--ok); }
.grant-text.held { color: var(--warn); }
.grant-text.dead { color: var(--mu); }
.switch { width: 34px; height: 20px; border-radius: 99px; border: 0; background: var(--sw-off); position: relative; flex: none; cursor: pointer; padding: 0; }
.switch.is-on { background: var(--ok); }
.switch:disabled { opacity: .45; cursor: default; }
.knob { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch.is-on .knob { left: 17px; }
.note { font-size: 12px; color: var(--mu); }
.note.n125 { font-size: 12.5px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 64px; border-bottom: 1px solid var(--ln); }
.spark span { flex: 1; background: var(--spark); opacity: .8; border-radius: 2px 2px 0 0; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--mu); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin: 0; font-size: 13px; }
.dl.g6 { gap: 6px 16px; }
.dl dt { color: var(--mu); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dl dd.mono { font-family: var(--mono); font-size: 12px; }
.reach-strip { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: var(--sk); border-radius: 8px; flex-wrap: wrap; }
.reach-label { font-size: 12px; color: var(--mu); }
.reach-label.w70 { width: 70px; }
.reach-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg); }
.reach-item.off { color: var(--mu); }
.danger-zone { border-top: 1px solid var(--ln); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.btn-bad-text { border: 1px solid var(--ln); background: var(--sf); color: var(--bad); padding: 6px 12px; border-radius: 6px; font-weight: 500; cursor: pointer; }
.inline-add { display: flex; gap: 8px; align-items: center; }
.inline-add select { flex: 1; min-width: 0; border: 1px solid var(--ln); background: var(--in-bg); color: var(--fg); border-radius: 6px; padding: 5px 8px; }

/* ---------- Dialog ---------- */
.scrim { position: absolute; inset: 0; z-index: 10; background: var(--scrim); display: flex; align-items: center; justify-content: center; }
.dlg {
  width: 600px; max-height: 820px; display: flex; flex-direction: column; background: var(--sf);
  border: 1px solid var(--ln); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden;
}
.dlg.w560 { width: 560px; max-height: none; }
.dlg.w480 { width: 480px; }
.dlg-head { padding: 18px 22px; border-bottom: 1px solid var(--ln); display: flex; align-items: center; gap: 12px; }
.dlg-head-main { flex: 1; min-width: 0; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mu); }
.dlg-title { margin: 2px 0 0; font-size: 22px; font-weight: 300; letter-spacing: -.02em; }
.dlg-x { background: none; border: 1px solid var(--ln); border-radius: 6px; width: 32px; height: 32px; color: var(--mu); cursor: pointer; flex: none; }
.dlg-body { flex: 1; min-height: 0; overflow: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 18px; }
.dlg-body.g14 { gap: 14px; flex: none; }
.dlg-body p { margin: 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 500; font-size: 13px; }
.input { border: 1px solid var(--ln); background: var(--in-bg); color: var(--fg); border-radius: 6px; padding: 8px 10px; }
.input.date { padding: 7px 10px; }
.input.static { background: var(--sk); }
textarea.input { resize: vertical; min-height: 64px; }
.hint { font-size: 12px; color: var(--mu); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode {
  text-align: left; border: 1px solid var(--ln); background: var(--sf); color: var(--fg); border-radius: 8px;
  padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
}
.mode.is-on { border-color: var(--ac); background: var(--acs); }
.radio { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ln); display: grid; place-items: center; flex: none; }
.mode .radio { margin-top: 2px; }
.radio::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.is-on > .radio { border-color: var(--ac); }
.is-on > .radio::after { background: var(--ac); }
.mode-label { display: block; font-weight: 600; font-size: 13.5px; }
.mode-sub { display: block; font-size: 12px; color: var(--mu); }
.optlist { border: 1px solid var(--ln); border-radius: 8px; }
.opt {
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--ln2); background: transparent; color: var(--fg);
  padding: 10px 12px; display: flex; gap: 10px; align-items: center; cursor: pointer;
}
.opt.pick { padding: 9px 12px; }
.opt.is-on { background: var(--acs); }
.opt-name { font-weight: 500; width: 120px; flex: none; }
.opt.pick .opt-name { width: 140px; }
.opt-sub { font-size: 12.5px; color: var(--mu); }
.check {
  width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--ln); background: transparent; color: var(--on-ac);
  display: grid; place-items: center; flex: none; font-size: 10px; line-height: 1;
}
.is-on > .check { border-color: var(--ac); background: var(--ac); }
.preview { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: var(--sk); border-radius: 8px; flex-wrap: wrap; }
.dlg-foot { padding: 14px 22px; border-top: 1px solid var(--ln); display: flex; align-items: center; gap: 8px; }
.dlg-foot.end { justify-content: flex-end; }
.dlg-summary { font-size: 12.5px; color: var(--mu); margin-right: auto; }
.dlg-error { font-size: 13px; color: var(--bad); background: var(--bad-s); border-radius: 6px; padding: 8px 10px; }
.btn.fg { color: var(--fg); }
.btn.w16 { padding: 8px 16px; }
.secret-box { display: flex; gap: 10px; align-items: center; background: var(--sk); border: 1px dashed var(--ac); border-radius: 8px; padding: 12px 14px; }
.secret { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; flex: 1; min-width: 0; user-select: all; }
.copy-btn { border: 1px solid var(--ln); background: var(--sf); color: var(--fg); padding: 5px 12px; border-radius: 6px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.dlg-note { font-size: 12.5px; color: var(--mu); }
.dlg-note .mono { font-size: 12px; }
.secret-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.secret-who { font-size: 12.5px; font-weight: 500; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: flex; align-items: center; gap: 6px; font-size: 13px; }

/* ---------- Tools page ---------- */
.tools-card { background: var(--sf); border: 1px solid var(--ln); border-radius: 8px; flex: none; }
.tools-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) 150px; gap: 20px; }
.tools-head { padding: 9px 18px; border-bottom: 1px solid var(--ln); font-size: 12px; font-weight: 600; color: var(--mu); background: var(--th); border-radius: 8px 8px 0 0; }
.tools-head .right { text-align: right; }
.tool-row { padding: 16px 18px; border-bottom: 1px solid var(--ln2); align-items: start; }
.tool-row.is-flash { background: var(--acs); }
.tool-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tool-name-line { display: flex; align-items: center; gap: 8px; }
.tool-name { font-size: 15px; font-weight: 600; }
.tool-meta { font-family: var(--mono); font-size: 11.5px; color: var(--mu); }
.tool-btns { display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.tbtn { border: 1px solid var(--ln); background: var(--sf); color: var(--fg); padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tbtn.bad { color: var(--bad); }
.tbtn.acc { color: var(--ac); }
.tool-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--mu); }
.tool-line-label { margin-right: 2px; }
.prov { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--fg); margin-right: 6px; }
.prov-state { font-size: 11.5px; font-weight: 500; padding: 0 6px; border-radius: 99px; }
.prov-state.ok { color: var(--ok); background: var(--ok-s); }
.prov-state.bad { color: var(--bad); background: var(--bad-s); }
.tool-set { display: flex; flex-direction: column; gap: 6px; }
.tool-set select { border: 1px solid var(--ln); background: var(--in-bg); color: var(--fg); border-radius: 6px; padding: 7px 10px; }
.tool-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.tool-stat-n { font-size: 17px; font-family: var(--mono); }
.tool-stat-l { font-size: 12px; color: var(--mu); font-variant-numeric: tabular-nums; }

/* ---------- Activity page ---------- */
.chart-card { background: var(--sf); border: 1px solid var(--ln); border-radius: 8px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: none; }
.chart-head { display: flex; align-items: center; gap: 16px; }
.chart-head .legend { margin-left: auto; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 170px; border-bottom: 1px solid var(--ln); }
.chart-day { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.bar-bad { background: var(--bad); border-radius: 2px 2px 0 0; }
.bar-ok { background: var(--spark); opacity: .85; }
.chart-labels { display: flex; gap: 8px; }
.chart-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--mu); font-variant-numeric: tabular-nums; }
.two-cards { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; flex: none; }
.mini-card { background: var(--sf); border: 1px solid var(--ln); border-radius: 8px; overflow: hidden; }
.mini-head { padding: 12px 16px; border-bottom: 1px solid var(--ln); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--mu); font-weight: 600; }
.mini { width: 100%; table-layout: fixed; }
.mini th { padding: 9px 12px; font-weight: 600; border-bottom: 1px solid var(--ln); background: var(--th); font-size: 12px; color: var(--mu); text-align: left; }
.mini th.first, .mini td.first { padding-left: 16px; }
.mini th.last { padding-right: 16px; }
.mini th.right, .mini td.right { text-align: right; }
.mini td { padding: 10px 12px; border-bottom: 1px solid var(--ln2); overflow: hidden; }
.mini td.last { padding-right: 16px; }
.mini.tight td { padding-top: 7px; padding-bottom: 7px; }
.mini td.bad { color: var(--bad); }

/* ---------- Audit ---------- */
.action { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.sev { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--ac); }
.sev.ok { background: var(--ok); }
.sev.warn { background: var(--warn); }
.sev.bad { background: var(--bad); }
.sev.accent { background: var(--ac); }
.grid td.first { padding-left: 16px; }
.grid td.last { padding-right: 16px; }

/* ---------- Overview (System status) ---------- */
.ov-head { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ov-state { display: flex; align-items: center; gap: 10px; }
.ov-state-text { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.ov-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); }
.ov-dot.warn { background: var(--warn); }
.ov-dot.bad { background: var(--bad); }
.ov-dot.idle { background: var(--idle); }
.ov-meta { font-size: 12.5px; color: var(--mu); }
.ov-meta .mono { font-size: 11.5px; }
.ov-meta .warn { color: var(--warn); font-weight: 500; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--ln2); font-size: 13px; }
.att-row:last-child { border-bottom: 0; }
.att-text { flex: 1; min-width: 0; }
.att-link { border: 0; background: none; color: var(--ac); font-size: 12.5px; font-weight: 500; cursor: pointer; padding: 0; white-space: nowrap; }
.att-empty { padding: 12px 16px; font-size: 13px; color: var(--mu); }
.mini-head.row { display: flex; justify-content: space-between; align-items: baseline; }
.mini-head .r { text-transform: none; letter-spacing: 0; font-weight: 500; font-family: var(--mono); }
.grid th.group { position: relative; top: auto; cursor: default; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--mu); background: var(--th); padding: 7px 12px; border-left-color: var(--ln2); }
.grid th.group.first-group { border-left-color: transparent; }
.grid th.lic { border-left-color: var(--ln2); }
.grid td.lic { border-left-color: var(--ln2); }
.grid td.lic-none { color: var(--mu); font-size: 13px; border-left-color: var(--ln2); background: var(--tool); }
.checks-failed { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.cf { font-size: 12px; color: var(--fg2); }
.cf b { font-weight: 500; font-family: var(--mono); font-size: 11px; color: var(--mu); margin-right: 4px; }
.lstate { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.lstate .ov-dot { width: 8px; height: 8px; }
.mode-tag { font-family: var(--mono); font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--sk); border: 1px solid var(--ln); color: var(--fg2); }
.mode-tag.shadow { color: var(--warn); border-color: var(--warn); background: var(--warn-s); }
.ov-foot { font-size: 12px; color: var(--mu); padding: 9px 16px; border-top: 1px solid var(--ln); display: flex; gap: 16px; }
.ov-foot .r { margin-left: auto; }

/* ---------- Toasts ---------- */
.toasts { position: absolute; right: 24px; bottom: 24px; z-index: 30; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; max-width: 420px; background: var(--sf); color: var(--fg); border: 1px solid var(--ln);
  border-left: 3px solid var(--ac); border-radius: 8px; box-shadow: var(--shadow); padding: 10px 14px; font-size: 13px;
}
.toast.bad { border-left-color: var(--bad); }
.toast.ok { border-left-color: var(--ok); }

/* Provider vault, status history and Settings use the shared surface tokens. */
.g16 { gap: 16px; }
.tool-section + .tool-section { border-top: 1px solid var(--ln); }
.provider-panel { padding: 0 20px 16px; }
.provider-panel summary { color: var(--ac); cursor: pointer; font-weight: 500; padding: 8px 0; }
.provider-body { margin-top: 8px; border: 1px solid var(--ln); border-radius: 8px; overflow: hidden; }
.provider-intro { display: flex; gap: 16px; align-items: center; padding: 12px 16px; background: var(--sk); }
.provider-intro .btn { margin-left: auto; }
.provider-table { width: 100%; }
.provider-table th, .provider-table td { padding: 10px 16px; }
.provider-table th:first-child { width: 26%; }
.provider-table th:last-child { width: 220px; }
.provider-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.history-strip { display: flex; gap: 3px; margin-top: 8px; }
.history-cell { width: 12px; height: 16px; border-radius: 3px; background: var(--ln); }
.history-cell.green { background: var(--ok); }
.history-cell.amber { background: var(--warn); }
.history-cell.red { background: var(--bad); }
.history-cell:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.settings-info { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 16px; }
.settings-details { align-content: start; grid-template-columns: 160px 1fr; }
.fingerprint { overflow-wrap: anywhere; }
.credential-note { padding: 12px 16px; }
.credential-table { width: 100%; }
.credential-table th, .credential-table td { padding: 10px 16px; }
.credential-table th:first-child { width: 40%; }
.settings-credentials { align-items: start; }
@media (max-width: 1450px) {
  .hdr { padding-left: 24px; padding-right: 24px; gap: 20px; }
  .nav { gap: 12px; }
  .brand-div, .brand-name { display: none; }
}
/* Fixed table widths and chart heights avoid inline styles under the CSP. */
.col-w-40 { width: 40px; }
.col-w-64 { width: 64px; }
.col-w-70 { width: 70px; }
.col-w-72 { width: 72px; }
.col-w-76 { width: 76px; }
.col-w-84 { width: 84px; }
.col-w-92 { width: 92px; }
.col-w-96 { width: 96px; }
.col-w-100 { width: 100px; }
.col-w-104 { width: 104px; }
.col-w-110 { width: 110px; }
.col-w-120 { width: 120px; }
.col-w-128 { width: 128px; }
.col-w-132 { width: 132px; }
.col-w-150 { width: 150px; }
.col-w-170 { width: 170px; }
.col-w-180 { width: 180px; }
.col-w-210 { width: 210px; }
.col-w-250 { width: 250px; }
.col-w-260 { width: 260px; }
.col-w-320 { width: 320px; }
.table-min-900 { min-width: 900px; }
.table-min-1000 { min-width: 1000px; }
.table-min-1060 { min-width: 1060px; }
.table-min-1100 { min-width: 1100px; }
.table-min-1200 { min-width: 1200px; }
.height-0 { height: 0%; }
.height-1 { height: 1%; }
.height-2 { height: 2%; }
.height-3 { height: 3%; }
.height-4 { height: 4%; }
.height-5 { height: 5%; }
.height-6 { height: 6%; }
.height-7 { height: 7%; }
.height-8 { height: 8%; }
.height-9 { height: 9%; }
.height-10 { height: 10%; }
.height-11 { height: 11%; }
.height-12 { height: 12%; }
.height-13 { height: 13%; }
.height-14 { height: 14%; }
.height-15 { height: 15%; }
.height-16 { height: 16%; }
.height-17 { height: 17%; }
.height-18 { height: 18%; }
.height-19 { height: 19%; }
.height-20 { height: 20%; }
.height-21 { height: 21%; }
.height-22 { height: 22%; }
.height-23 { height: 23%; }
.height-24 { height: 24%; }
.height-25 { height: 25%; }
.height-26 { height: 26%; }
.height-27 { height: 27%; }
.height-28 { height: 28%; }
.height-29 { height: 29%; }
.height-30 { height: 30%; }
.height-31 { height: 31%; }
.height-32 { height: 32%; }
.height-33 { height: 33%; }
.height-34 { height: 34%; }
.height-35 { height: 35%; }
.height-36 { height: 36%; }
.height-37 { height: 37%; }
.height-38 { height: 38%; }
.height-39 { height: 39%; }
.height-40 { height: 40%; }
.height-41 { height: 41%; }
.height-42 { height: 42%; }
.height-43 { height: 43%; }
.height-44 { height: 44%; }
.height-45 { height: 45%; }
.height-46 { height: 46%; }
.height-47 { height: 47%; }
.height-48 { height: 48%; }
.height-49 { height: 49%; }
.height-50 { height: 50%; }
.height-51 { height: 51%; }
.height-52 { height: 52%; }
.height-53 { height: 53%; }
.height-54 { height: 54%; }
.height-55 { height: 55%; }
.height-56 { height: 56%; }
.height-57 { height: 57%; }
.height-58 { height: 58%; }
.height-59 { height: 59%; }
.height-60 { height: 60%; }
.height-61 { height: 61%; }
.height-62 { height: 62%; }
.height-63 { height: 63%; }
.height-64 { height: 64%; }
.height-65 { height: 65%; }
.height-66 { height: 66%; }
.height-67 { height: 67%; }
.height-68 { height: 68%; }
.height-69 { height: 69%; }
.height-70 { height: 70%; }
.height-71 { height: 71%; }
.height-72 { height: 72%; }
.height-73 { height: 73%; }
.height-74 { height: 74%; }
.height-75 { height: 75%; }
.height-76 { height: 76%; }
.height-77 { height: 77%; }
.height-78 { height: 78%; }
.height-79 { height: 79%; }
.height-80 { height: 80%; }
.height-81 { height: 81%; }
.height-82 { height: 82%; }
.height-83 { height: 83%; }
.height-84 { height: 84%; }
.height-85 { height: 85%; }
.height-86 { height: 86%; }
.height-87 { height: 87%; }
.height-88 { height: 88%; }
.height-89 { height: 89%; }
.height-90 { height: 90%; }
.height-91 { height: 91%; }
.height-92 { height: 92%; }
.height-93 { height: 93%; }
.height-94 { height: 94%; }
.height-95 { height: 95%; }
.height-96 { height: 96%; }
.height-97 { height: 97%; }
.height-98 { height: 98%; }
.height-99 { height: 99%; }
.height-100 { height: 100%; }
.credential-create { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 13px; font-family: var(--sans); }
