:root {
  --ink: #071018;
  --panel: #0e1a24;
  --paper: #132230;
  --line: rgba(120, 200, 210, 0.16);
  --text: #e8f1f4;
  --muted: #7f96a3;
  --accent: #2eb8e6;
  --accent-dim: rgba(46, 184, 230, 0.16);
  --amber: #e8b86d;
  --rose: #e07a6a;
  --good: #7dcea0;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ink); color: var(--text); font-family: var(--sans); }
body { background-image:
  radial-gradient(1200px 600px at 10% -10%, rgba(46,230,200,.08), transparent 50%),
  linear-gradient(180deg, #08141c 0%, #071018 40%); }
a { color: var(--accent); }
code { font-family: ui-monospace, "Cascadia Code", monospace; font-size: .92em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select, textarea {
  width: 100%; padding: .65rem .7rem; border: 1px solid var(--line);
  background: #0a151d; border-radius: 8px; color: inherit; font: inherit;
}
input[type=radio], input[type=checkbox] {
  width: auto; min-width: 0; height: auto; padding: 0; margin: 0;
  border: 0; background: none; accent-color: var(--accent);
  flex: 0 0 auto;
}
textarea { min-height: 5.5rem; display: block; resize: vertical; line-height: 1.4; }
[hidden] { display: none !important; }
input::placeholder, textarea::placeholder {
  color: var(--muted); opacity: .75;
}
label { display: block; margin: .85rem 0 .35rem; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
button[type=submit], .primary {
  background: var(--accent); color: #04202a; border: 0; border-radius: 8px;
  padding: .7rem 1rem; font-weight: 650; width: 100%; margin-top: 1rem;
}
.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: .55rem .8rem; width: 100%;
}
.ghost:hover { color: var(--text); border-color: var(--accent); }
.ghost.on { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }
.month-nav button.nm-tab-24h {
  color: #b89048;
  border-color: rgba(232, 184, 109, .32);
}
.month-nav button.nm-tab-24h:hover {
  color: #f3d48a;
  border-color: rgba(232, 184, 109, .55);
  background: rgba(232, 184, 109, .1);
}
.month-nav button.nm-tab-24h.on {
  color: #ffe7a8;
  border-color: rgba(232, 184, 109, .85);
  background: rgba(232, 184, 109, .2);
}
tr.nm-tl-open td:nth-child(2) { color: var(--rose); font-weight: 600; }
tr.nm-tl-closed td:nth-child(2) { color: var(--good); font-weight: 600; }
tr.nm-tl-ignored td:nth-child(2) { color: var(--muted); font-weight: 600; }
tr.nm-tl-fact td:nth-child(2) { color: var(--amber); font-weight: 600; }
.muted { color: var(--muted); }
.hint { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.status { min-height: 1.2rem; color: var(--amber); }
.pw-extras { margin-top: .8rem; }
.pw-extras summary { cursor: pointer; color: var(--muted); }
.pw-extras label { display: block; margin: .7rem 0 .25rem; }
.pw-extras textarea { min-height: 4.75rem; }
.tc-extra-preview {
  margin-top: .25rem; font-size: .82rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem;
}
.tc-day-acts { margin-top: .35rem; }
.tc-clip {
  display: inline-block; max-width: 12.5rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  vertical-align: middle;
}
.tc-clip:hover, .tc-clip.is-open { color: var(--accent); }
.tc-note .tc-clip { max-width: 14rem; }
.tc-visit .tc-clip { max-width: 11rem; }
.tc-ot .tc-clip { max-width: 10rem; color: var(--amber); }
.tc-ot .tc-clip:hover, .tc-ot .tc-clip.is-open { color: var(--accent); }
.tc-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tc-extra-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
  margin: 1rem 0;
  padding: .95rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.tc-extra-form[hidden] { display: none !important; }
.tc-extra-form label { margin: 0; text-transform: uppercase; }
.tc-extra-form textarea { min-height: 5.5rem; }
.tc-extra-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: .6rem;
}
.tc-extra-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tc-extra-actions .primary, .tc-extra-actions .ghost { width: auto; margin: 0; }
.em-flag { color: var(--rose); }
.em-flag-warn { color: var(--amber); }
.fine { color: var(--muted); font-size: .85rem; }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.gate-card {
  width: min(28rem, 100%); background: #fff; color: #1a242c;
  border: 1px solid #d7e4ea; border-radius: 18px; padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: var(--shadow);
}
.gate-card .kicker { color: #2eb8e6; }
.gate-card h1 { color: #12202a; }
.gate-card .lede, .gate-card .fine, .gate-card .hint, .gate-card label { color: #5b6d78; }
.gate-card input, .gate-card select {
  background: #f4f8fa; border-color: #c9d8e0; color: #12202a;
}
.gate-card .status { color: #b58120; }
.gate-card .totp-box { border-color: #c9d8e0; }
.gate-card .secret { color: #1688b5; }
.logo-full {
  display: block; width: min(16.5rem, 100%); height: auto; margin: 0 0 1rem;
}
.logo-word {
  display: block; width: 10.6rem; max-width: 100%; height: auto;
}
.kicker { margin: 0; color: var(--accent); letter-spacing: .16em; text-transform: uppercase; font-size: .7rem; }
h1 { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; margin: .2rem 0 .6rem; font-size: 2.1rem; }
.lede { color: var(--muted); line-height: 1.45; margin: 0 0 1rem; }
.totp-box { margin-top: 1rem; padding: .8rem; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }
.qr { display: grid; place-items: center; }
.qr svg { width: 168px; height: 168px; border-radius: 8px; }
.secret { font-family: ui-monospace, monospace; letter-spacing: .12em; color: var(--accent); }

#gate[hidden], #app[hidden] { display: none !important; }
#gate:not([hidden]) { display: grid; }
#app:not([hidden]) {
  display: grid; grid-template-columns: 248px 1fr; min-height: 100vh;
}
.rail {
  border-right: 1px solid var(--line); padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: 1.2rem;
  background: rgba(8, 16, 22, .72);
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.brand-sub { color: var(--muted); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; padding-left: .1rem; }
#nav { display: flex; flex-direction: column; gap: .35rem; flex: 1; }
#nav a {
  color: var(--muted); text-decoration: none; padding: .55rem .7rem; border-radius: 8px;
  display: flex; justify-content: space-between; align-items: baseline;
}
#nav a.on, #nav a:hover { background: var(--accent-dim); color: var(--text); }
#nav .k { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
main { padding: 1.4rem 1.8rem 3rem; }
#go-top {
  position: fixed; right: 1.15rem; bottom: 1.15rem; z-index: 60;
  width: auto; margin: 0; padding: .42rem .78rem;
  background: #152636; border-color: rgba(46, 184, 230, .55);
  color: var(--text); font-size: .82rem; font-weight: 650;
  letter-spacing: .04em; text-transform: uppercase;
  box-shadow: var(--shadow);
}
#go-top:hover { color: #fff; border-color: var(--accent); background: var(--accent-dim); }
#go-top[hidden] { display: none !important; }
.nm-alert-note { width: 11.5rem; max-width: 100%; padding: .28rem .4rem; margin: 0; }
.cl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .55rem; margin: .7rem 0 1rem; }
.cl-stat, button.cl-stat {
  display: block; text-align: left; margin: 0; width: auto; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: 10px; background: #0a151d; color: inherit;
}
button.cl-stat { cursor: pointer; }
button.cl-stat:hover { border-color: var(--accent); }
.cl-stat b {
  display: block; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; margin-bottom: .15rem;
}
.cl-stat span { font-variant-numeric: tabular-nums; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.2rem; }
.who { text-align: right; }
.who #who-name { font-family: var(--serif); font-size: 1.15rem; }

.grid { display: grid; gap: 1rem; }
.cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.05rem;
}
.card h2 { margin: 0 0 .4rem; font-size: 1rem; font-weight: 600; }
.ax-job-sect {
  white-space: pre-wrap; max-height: 22rem; overflow: auto;
  margin: 0; font-size: .85rem; line-height: 1.4;
}
.ax-src-filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.ax-chunk {
  display: inline-block; margin-left: .35rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .02em; padding: .08rem .4rem; border-radius: 6px; white-space: nowrap;
  vertical-align: middle;
}
.ax-chunk-0 { background: var(--accent-dim); color: var(--accent); }
.ax-chunk-1 { background: rgba(125, 206, 160, .18); color: var(--good); }
.ax-chunk-2 { background: rgba(232, 184, 109, .2); color: var(--amber); }
.ax-chunk-3 { background: rgba(224, 122, 106, .18); color: var(--rose); }
.ax-chunk-4 { background: rgba(180, 150, 230, .2); color: #c4b0ee; }
.ax-details { margin: 1.2rem 0 0; }
.ax-details summary {
  cursor: pointer; color: var(--accent); font-weight: 650;
  list-style: none; margin: 0 0 .6rem;
}
.ax-details summary::-webkit-details-marker { display: none; }
.ax-details summary::before { content: "▸ "; }
.ax-details[open] summary::before { content: "▾ "; }
a.card.home-mod {
  display: block; color: inherit; text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
a.card.home-mod:hover, a.card.home-mod:focus-visible {
  border-color: var(--accent); background: var(--accent-dim); outline: none;
}
.home-mod .kicker {
  margin: 0 0 .15rem; font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
}
.home-mod p { margin: .25rem 0; }
.home-snap { list-style: none; margin: .45rem 0 0; padding: 0; font-size: .86rem; }
.home-snap li {
  padding: .28rem 0; border-bottom: 1px solid var(--line);
}
.home-snap li:last-child { border-bottom: 0; }
.home-go {
  margin: .75rem 0 0; color: var(--accent); font-size: .72rem;
  letter-spacing: .06em; text-transform: uppercase;
}
.pill {
  display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem;
  background: var(--accent-dim); color: var(--accent); letter-spacing: .04em;
}
.pill.on { background: rgba(125,206,160,.18); color: var(--good); }
.pill.off { background: rgba(224,122,106,.16); color: var(--rose); }
.pill.deploy {
  background: rgba(232, 241, 244, .1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(232, 241, 244, .4);
}
button.pill {
  border: 0; cursor: pointer; font: inherit; line-height: inherit;
  width: auto; margin: 0; vertical-align: baseline;
}
button.pill.deploy:hover:not(:disabled) {
  background: rgba(232, 241, 244, .18);
  color: #fff;
}
button.pill:disabled { opacity: .7; cursor: default; }
.pill.out { background: rgba(127,150,163,.16); color: var(--muted); }
.pill.warn { background: rgba(232,184,109,.18); color: var(--amber); }
.pill.clock, .pill.schedule { background: var(--accent-dim); color: var(--accent); }

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  overflow: visible;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
tbody tr:hover > td,
tbody tr:hover > th {
  background-color: rgba(46, 184, 230, 0.1);
  box-shadow: inset 0 0 0 1px rgba(46, 184, 230, 0.32);
}
td.dv-job-sent,
td.dv-job-done {
  cursor: help;
  white-space: normal;
  max-width: 16rem;
  line-height: 1.35;
}
.dv-prompt-balloon {
  position: fixed;
  z-index: 80;
  max-width: min(36rem, calc(100vw - 24px));
  max-height: min(22rem, calc(100vh - 24px));
  overflow: auto;
  padding: .7rem .85rem;
  background: #0a151d;
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 10px;
  box-shadow: var(--shadow);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .86rem;
  line-height: 1.45;
  pointer-events: none;
}
tbody tr.nm-alerted:hover > td,
tbody tr.nm-alerted:hover > th {
  background-color: rgba(224, 122, 106, 0.34);
  box-shadow: inset 0 0 0 1px rgba(224, 122, 106, 0.5);
}
tbody tr.nm-disc:hover > td {
  background-color: rgba(232, 184, 109, 0.2);
  box-shadow: inset 0 0 0 1px rgba(232, 184, 109, 0.4);
}
.cov-row:hover,
.desk-row:hover,
.em-folder-list li:hover,
.home-snap li:hover {
  background: rgba(46, 184, 230, 0.09);
  box-shadow: inset 0 0 0 1px rgba(46, 184, 230, 0.28);
  border-radius: 6px;
}
.em-folder-list li.em-folder-err:hover,
.em-mail-list tbody tr.em-mail-row.em-folder-err:hover,
.em-mail-list tbody tr.em-mail-row.em-folder-err.em-mail-on,
.em-box-row.em-folder-err:hover {
  background: rgba(224, 122, 106, 0.32);
  box-shadow: inset 3px 0 0 var(--rose), inset 0 0 0 1px rgba(224, 122, 106, 0.5);
  border-color: var(--rose);
}
.em-folder-list li.em-folder-bf:hover,
.em-mail-list tbody tr.em-mail-row.em-folder-bf:hover,
.em-mail-list tbody tr.em-mail-row.em-folder-bf.em-mail-on,
.em-box-row.em-folder-bf:hover {
  background: rgba(232, 184, 109, 0.28);
  box-shadow: inset 3px 0 0 var(--amber), inset 0 0 0 1px rgba(232, 184, 109, 0.5);
  border-color: var(--amber);
}
.em-folder-list li.em-folder-off:hover {
  background: rgba(127, 150, 163, 0.22);
  box-shadow: inset 3px 0 0 var(--muted), inset 0 0 0 1px rgba(127, 150, 163, 0.35);
}
#tc-body .tc-day {
  width: auto; min-width: 9.6rem; padding: .4rem .5rem; margin: 0;
  height: 2.25rem;
}
#tc-body td.row-actions,
#ck-body td.row-actions {
  white-space: nowrap;
  vertical-align: middle;
}
#tc-body .row-actions .ghost,
#ck-body .row-actions .ghost,
button.compact {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: 1.85rem; margin: 0 .25rem 0 0; padding: .2rem .55rem;
  line-height: 1; font-size: .75rem;
}
.tc-when { display: flex; flex-direction: column; gap: .1rem; line-height: 1.2; }
.tc-daypart { color: var(--muted); font-size: .72rem; }
.tc-time { font-variant-numeric: tabular-nums; }
.tc-open { color: #6dcc8d; font-weight: 600; }
.tc-open-for { color: var(--muted); font-size: .78rem; }
#tc-body tr.is-note-open td,
#tc-body tr.is-date-open td { background: rgba(232, 184, 109, .12); }
#tc-body tr.is-note-open .tc-extras.is-open,
#tc-body tr.is-date-open .tc-reassign {
  outline: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 4px;
}
#tc-body tr.tc-inline-edit td {
  padding: 0 0 .85rem;
  background: rgba(232, 184, 109, .08);
  border-bottom: 1px solid var(--line);
}
#tc-body tr.tc-inline-edit .tc-extra-form {
  margin: 0;
  border-radius: 0 0 10px 10px;
}
.tc-cardday { min-width: 7.5rem; }
.tc-table td, .ck-table td { vertical-align: middle; }
.pw-ot-wrap, .pw-visit-wrap { display: block; }
th { color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
tr.is-gap td { color: var(--muted); }
tr.pr-shift td { color: #ffe7a8; }
tr.pr-away-shift td {
  background: rgba(224, 122, 106, .22);
  color: #ffe7a8;
}
tr.pr-away-shift td:first-child { box-shadow: inset 3px 0 0 var(--rose); }
tbody tr.pr-away-shift:hover > td,
tbody tr.pr-away-shift:hover > th {
  background-color: rgba(224, 122, 106, 0.34);
  box-shadow: inset 3px 0 0 var(--rose), inset 0 0 0 1px rgba(224, 122, 106, 0.5);
}
.toolbar.em-wrap,
.toolbar.em-lanes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  align-items: start;
  margin-top: .35rem;
}
.toolbar.em-wrap select,
.toolbar.em-lanes select { width: 100%; min-width: 0; }
.guide {
  margin: .6rem 0 1rem;
  padding: .85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: .92rem;
  line-height: 1.45;
  color: var(--text);
}
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.toolbar label { margin: 0; }
.toolbar input:not([type=radio]):not([type=checkbox]),
.toolbar select { width: auto; min-width: 10rem; }
.toolbar label.who-pick { min-width: 16rem; }
.toolbar label.who-pick select {
  color: #fff;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  min-width: 16rem;
  padding: .55rem .9rem;
  border-color: rgba(46, 184, 230, 0.5);
  background: #0c1820;
}
.toolbar label.who-pick select option { color: #e8f1f4; background: #0c1820; }
.person-card h2 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.person-card .pe-tenants {
  display: flex; flex-wrap: wrap; gap: .25rem .35rem; align-items: center;
  margin: .15rem 0 .35rem;
}
.person-card .pe-tenants .pill { text-transform: none; letter-spacing: 0; font-weight: 650; }
.pe-sheet .pe-tenant-list { display: flex; flex-wrap: wrap; gap: .35rem .85rem; }
.cov-list { list-style: none; margin: 0; padding: 0; }
.cov-row {
  display: grid; grid-template-columns: minmax(8rem, 1.2fr) auto minmax(10rem, 1.6fr);
  gap: .5rem 1rem; align-items: baseline;
  padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .92rem;
}
.cov-row.cov-self { background: var(--accent-dim); margin: 0 -.4rem; padding-left: .4rem; padding-right: .4rem; border-radius: 8px; }
.cov-meta { color: var(--muted); font-size: .86rem; }
@media (max-width: 640px) {
  .cov-row { grid-template-columns: 1fr auto; }
  .cov-meta { grid-column: 1 / -1; }
}
.person-card.directory { opacity: .96; }
.person-card.directory h2 { font-weight: 500; }
.person-card .inline { display: inline-flex; align-items: center; gap: .35rem; margin: .25rem .7rem .25rem 0; text-transform: none; letter-spacing: 0; color: var(--text); }
.person-card .inline input { width: auto; min-width: 0; }
.desk-row { padding: .35rem 0; border-bottom: 1px solid var(--line); }
.desk-row.is-off { opacity: .55; }
#pe-q-all, #pe-q-bench, #pe-q-dir { min-width: 16rem; }
.month-nav { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.month-nav .ghost { width: auto; margin: 0; }
.month-nav strong { font-family: var(--serif); font-size: 1.15rem; min-width: 8rem; text-align: center; color: #fff; }
.cov-nav { flex-wrap: nowrap; }
.cov-nav .cov-step { width: 8.6rem; flex: 0 0 8.6rem; text-align: center; }
.cov-nav .cov-day {
  display: inline-block;
  width: 12.5rem;
  min-width: 12.5rem;
  flex: 0 0 12.5rem;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cov-nav .icon-btn {
  width: 2.2rem; height: 2.2rem; flex: 0 0 2.2rem;
  padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.cov-nav .icon-btn svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.7; }
.cov-date-input {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0;
}
.month-nav .who { color: #fff; text-align: center; }
.month-nav .sep { color: var(--muted); font-size: 1.1rem; }
.punch-card .primary, .punch-card .ghost { font-size: 1.08rem; padding: .85rem 1rem; }
.punch-choices { display: grid; gap: .55rem; margin-top: .6rem; }
.punch-choices .primary, .punch-choices .ghost { width: 100%; margin: 0; }
.punch-breaks { grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
.pw-break { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.pw-break .who-pick { display: block; max-width: 16rem; }

.hol-box { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.hol-box label { text-transform: none; letter-spacing: 0; }

.mail-desk {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.mail-rail { position: sticky; top: .75rem; }
.mail-rail label { display: block; margin: 0 0 .7rem; }
.mail-rail > .muted {
  font-size: .8rem;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.35;
}
.mail-views { display: flex; flex-direction: column; gap: .25rem; margin: 0 0 .8rem; }
.mail-views .ghost {
  width: 100%; margin: 0; text-align: left;
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem;
}
.mail-views .ghost.on { border-color: var(--accent); color: var(--text); }
.mail-n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .82rem; }
.mail-rail select optgroup { color: var(--muted); font-style: normal; }
.mail-main { min-width: 0; }
.mail-main > h2 { margin: 0 0 .15rem; font-size: 1.15rem; }
.mail-main > .muted { margin: 0 0 .7rem; }
@media (max-width: 800px) {
  .mail-desk { grid-template-columns: 1fr; }
  .mail-rail { position: static; }
  .mail-views { flex-direction: row; flex-wrap: wrap; }
  .mail-views .ghost { width: auto; }
}
.em-box-row {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--panel, transparent); color: inherit; font: inherit;
  border: 1px solid var(--line); border-radius: 8px;
  padding: .75rem 1rem; margin: 0 0 .55rem;
}
.em-box-row:hover { border-color: var(--accent); }
.em-box-row strong { display: block; font-weight: 650; margin-bottom: .2rem; }
.em-box-meta { color: var(--muted); font-size: .84rem; font-variant-numeric: tabular-nums; }
.em-mark-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .7rem; }
.em-mark-tabs .ghost { width: auto; margin: 0; }
.em-mark-tabs .ghost.on { border-color: var(--accent); color: var(--text); }
.em-back { width: auto; margin: 0 .6rem 0 0; }

.em-who { margin: 0 0 .2rem; color: var(--accent); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.card > h3.em-who { margin: 1rem 0 .45rem; }
.card > h3.em-who:first-of-type { margin-top: .35rem; }
.em-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: .7rem .9rem; margin: .85rem 0 .6rem;
}
.em-stat b {
  display: block; font-size: .68rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; margin-bottom: .15rem;
}
.em-stat span { font-variant-numeric: tabular-nums; color: var(--text); }
.em-stat i { display: block; font-style: normal; font-size: .78rem; color: var(--muted); margin-top: .1rem; }
.em-folder-list { list-style: none; margin: .4rem 0 .8rem; padding: 0; font-size: .86rem; color: var(--muted); }
.em-folder-list li {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .35rem .55rem; border-top: 1px solid var(--line);
}
.em-folder-list li.em-folder-err,
.em-mail-list tbody tr.em-mail-row.em-folder-err,
.em-box-row.em-folder-err {
  background: rgba(224, 122, 106, 0.2);
  box-shadow: inset 3px 0 0 var(--rose);
  border-color: rgba(224, 122, 106, 0.55);
  border-radius: 6px;
  color: var(--text);
}
.em-folder-list li.em-folder-bf,
.em-mail-list tbody tr.em-mail-row.em-folder-bf,
.em-box-row.em-folder-bf {
  background: rgba(232, 184, 109, 0.18);
  box-shadow: inset 3px 0 0 var(--amber);
  border-color: rgba(232, 184, 109, 0.5);
  border-radius: 6px;
  color: var(--text);
}
.em-folder-list li.em-folder-off {
  background: rgba(127, 150, 163, 0.14);
  box-shadow: inset 3px 0 0 var(--muted);
  border-radius: 6px;
  color: var(--muted);
}
.em-folder-list li.em-folder-err strong { color: var(--rose); }
.em-folder-list li.em-folder-bf strong { color: #f3d48a; }
.em-folder-list li.em-folder-off strong { color: #8aa0ac; font-weight: 500; }
.em-box-row.em-folder-err strong { color: var(--rose); }
.em-box-row.em-folder-bf strong { color: #f3d48a; }
.em-folder-list strong { color: var(--text); font-weight: 600; }
.em-folder-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem;
  margin: .8rem 0 .35rem;
}
.em-folder-head strong { font-size: .95rem; }
.em-folder-head .em-fsize { margin: 0 0 0 auto; text-transform: none; letter-spacing: 0; }
.em-folder-head .em-fsize select { min-width: 4.5rem; width: auto; }
.em-folder-hint { flex: 1 1 100%; margin: 0; }
.em-folder-row {
  display: flex; flex-wrap: wrap; gap: .45rem 1rem; width: 100%;
  align-items: flex-start; justify-content: space-between;
}
.em-folder-main { flex: 1 1 16rem; min-width: 0; }
.em-folder-main .muted { margin: .15rem 0 0; font-size: .82rem; }
.em-folder-list li.em-folder-item {
  display: block;
  padding: .4rem .55rem .45rem;
}
.em-folder-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .7rem;
  justify-content: space-between;
}
.em-folder-name {
  margin: 0;
  flex: 1 1 11rem;
  min-width: 0;
  color: var(--text);
  font-size: .9rem;
  line-height: 1.3;
}
.em-folder-name strong { font-size: .9rem; }
.em-folder-role {
  margin-left: .45rem;
  font-size: .72rem;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--muted);
  font-weight: 500;
}
.em-walk-gap { display: none; }
.em-folder-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .55rem;
  width: auto;
  flex: 0 1 auto;
  min-width: 0;
}
.em-folder-walk {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #0a151d;
}
.em-fw-label { display: none; }
.em-walk-btn {
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: .22rem .55rem;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.2;
}
.em-walk-btn:last-child { border-right: 0; }
.em-walk-btn:hover { color: var(--text); background: var(--accent-dim); }
.em-walk-btn.on {
  color: var(--text);
  background: var(--accent-dim);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.em-walk-btn[data-walk="off"].on {
  border-color: var(--muted);
  background: rgba(127, 150, 163, 0.18);
  box-shadow: inset 0 -2px 0 var(--muted);
}
.em-fw {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .3rem;
  width: auto;
  margin: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: .75rem;
  color: var(--muted);
}
.em-fw select {
  width: auto;
  min-width: 0;
  max-width: 8rem;
  flex: none;
  padding: .22rem .4rem;
  font-size: .75rem;
}
.em-folder-meta {
  margin: .18rem 0 0;
  font-size: .75rem;
  line-height: 1.35;
}
.em-folder-id {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--muted);
  cursor: text;
  user-select: all;
  -webkit-user-select: all;
}
.em-folder-lanes {
  display: inline-flex; align-items: center; gap: .3rem; margin: 0 !important;
  text-transform: none !important; letter-spacing: 0 !important;
  font-size: .75rem; color: var(--muted); width: auto;
}
.em-folder-lanes select {
  min-width: 4.6rem; width: auto; max-width: 6.5rem;
  padding: .22rem .4rem; font-size: .75rem;
}
.em-folder-nav { margin: .2rem 0 .4rem; }
.em-folder-nav .ghost { width: auto; margin: 0; }
.em-mbox-guide { margin: .45rem 0 .7rem; }
.em-sec {
  margin: .85rem 0 0;
  padding: .7rem .85rem .9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.em-sec > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem .75rem;
  cursor: pointer;
  list-style: none;
  font-weight: 650;
}
.em-sec > summary::-webkit-details-marker,
.em-sec > summary::marker { display: none; content: none; }
.em-sec-mark::before { content: "▶"; color: var(--muted); font-size: .72rem; }
.em-sec[open] > summary .em-sec-mark::before { content: "▼"; }
.em-sec-title { font-size: 1.02rem; }
.em-sec-extra { font-weight: 500; margin-left: auto; }
.em-sec > summary:hover { color: var(--accent); }
.em-sec-body { margin-top: .65rem; }
.em-mark-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .55rem;
}
.em-mark-scope { width: auto; min-width: 12rem; }
.em-mail-bar { align-items: end; }
.em-mail-bar .em-mail-folder { min-width: 16rem; max-width: min(32rem, 100%); }
.em-mail-bar .em-mail-page { min-width: 5.5rem; max-width: 8rem; }
.em-mail-scroll { overflow-x: auto; margin: .35rem 0 .6rem; }
.em-mail-list tbody tr.em-mail-row { cursor: pointer; }
.em-mail-list tbody tr.em-mail-row:hover { background: rgba(127, 196, 224, 0.1); }
.em-mail-list tbody tr.em-mail-on {
  background: rgba(127, 196, 224, 0.16);
  box-shadow: inset 3px 0 0 var(--accent);
}
.em-mail-detail td {
  padding: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  cursor: default;
}
.em-mail-detail .em-mail-open {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: inset 3px 0 0 var(--accent);
}
.em-book-list tbody tr.em-book-row { cursor: pointer; }
.em-book-list tbody tr.em-book-row:hover { background: rgba(127, 196, 224, 0.1); }
.em-book-list tbody tr.em-book-on {
  background: rgba(127, 196, 224, 0.16);
  box-shadow: inset 3px 0 0 var(--accent);
}
.em-book-list th.num, .em-book-list td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.em-book-addr { font-weight: 650; }
.em-book-names { color: var(--muted); font-size: .82rem; margin-top: .12rem; }
.em-book-bar { align-items: end; }
.em-book-bar input { min-width: 12rem; }
.em-book-nav { align-items: center; gap: .7rem; }
.em-book-share { display: flex; flex-wrap: wrap; gap: .4rem; margin: .35rem 0 .6rem; }
.em-book-share .ghost { width: auto; margin: 0; }
.em-book-detail h3 { margin: 1rem 0 .35rem; font-size: .95rem; }
.em-mail-open {
  margin: .4rem 0 1rem;
  padding: .85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.em-mail-open p { margin: .25rem 0; }
.em-mail-stamps { font-variant-numeric: tabular-nums; user-select: all; cursor: text; }
.em-mail-body {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 28rem;
  overflow: auto;
  margin: .6rem 0 0;
  font-size: .88rem;
  line-height: 1.4;
}
.pe-open {
  background: none; border: 0; padding: 0; margin: 0; width: auto;
  color: inherit; font: inherit; font-weight: 600; text-align: left;
  text-decoration: underline; text-underline-offset: .18em; cursor: pointer;
}
.pe-open:hover { color: var(--accent); }
.pe-sheet {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(4, 10, 14, .72);
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 1.6rem 1rem; overflow: auto;
}
.pe-sheet-in {
  width: min(72rem, calc(100vw - 2rem));
  min-width: min(22rem, calc(100vw - 2rem));
  max-width: 100%;
  margin-bottom: 2rem;
  background: var(--paper);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow);
}
.pe-conn { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.nm-fold {
  margin: .85rem 0 0;
  padding-top: .55rem;
  border-top: 1px solid var(--line);
}
.nm-fold > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .45rem;
  user-select: none;
  font-weight: 650;
  color: var(--text);
}
.nm-fold > summary::-webkit-details-marker,
.nm-fold > summary::marker { display: none; content: none; }
.nm-fold-mark {
  flex: 0 0 auto;
  width: 1.1rem;
  color: var(--accent);
  font-size: 1.05rem;
  line-height: 1;
}
.nm-fold-mark::before { content: "▶"; }
.nm-fold[open] > summary .nm-fold-mark::before { content: "▼"; }
.nm-fold > summary:hover { color: var(--accent); }
.nm-fold-title { font-size: 1.05rem; }
.nm-fold-extra { font-weight: 550; }
.nm-fold-body { margin-top: .55rem; }
.nm-host-attempts {
  margin: 1.2rem 0 0;
  padding-top: .7rem;
  border-top: 1px solid var(--line);
}
.nm-host-attempts h2 { margin: 0 0 .35rem; }
.nm-mixup,
.nm-fold.nm-mixup-fold {
  margin: 1rem 0;
  padding: .55rem .9rem .75rem;
  border: 1px solid rgba(224,122,106,.45);
  background: rgba(224,122,106,.12);
  border-radius: 10px;
  border-top: 1px solid rgba(224,122,106,.45);
}
.nm-fold.nm-mixup-fold > summary,
.nm-fold.nm-mixup-fold > summary .nm-fold-title,
.nm-fold.nm-mixup-fold > summary .nm-fold-mark {
  color: var(--rose, #e07a6a);
}
.nm-fold.nm-mixup-fold > summary:hover,
.nm-fold.nm-mixup-fold > summary:hover .nm-fold-title {
  color: var(--text);
}
.nm-mixup strong,
.nm-fold.nm-mixup-fold .nm-fold-title { color: var(--rose, #e07a6a); }
.nm-mixup .nm-open,
.nm-mixup-body .nm-open { margin-right: .35rem; }
.nm-run-cmd { margin: 1rem 0; padding-top: .4rem; }
.nm-run-cmd .nm-edit { max-width: none; }
.nm-run-cmd #nm-run-msg { min-height: 1.4rem; font-weight: 650; }
.nm-run-cmd textarea {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: .85rem;
  min-height: 5rem;
}
pre.nm-cmd {
  margin: .2rem 0 0;
  padding: .45rem .55rem;
  max-height: 12rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .78rem;
  line-height: 1.35;
  background: rgba(0,0,0,.22);
  border-radius: 6px;
}
.nm-cmd-stack { min-width: 16rem; }
.nm-cmd-k {
  margin: .5rem 0 .12rem;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
  display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
}
.nm-cmd-stack .nm-cmd-k:first-child { margin-top: 0; }
.nm-cmd-stack .nm-cmd { margin-top: 0; }
.nm-cmd-k .pill { text-transform: none; letter-spacing: 0; font-weight: 600; }
.nm-queue td:nth-child(3) { width: 58%; vertical-align: top; }
.nm-queue td.nm-cmd-meta { width: 21%; vertical-align: top; white-space: normal; }
.nm-queue td.nm-cmd-meta .nm-cmd-k { margin-top: .45rem; }
.nm-queue td.nm-cmd-meta .nm-cmd-k:first-child { margin-top: 0; }
.nm-cmd-path {
  margin-top: .15rem;
  font-size: .78rem;
  line-height: 1.25;
}
.nm-gops-pills { margin-top: .2rem; }
.nm-gops-pills .pill { font-size: .72rem; }
.nm-gops-open-row td { background: rgba(125, 206, 160, .06); }
button.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.pe-conn .tc-table { width: 100%; }
.pe-conn .tc-table td { vertical-align: top; }
.nm-src-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
@media (max-width: 1100px) { .nm-src-grid { grid-template-columns: 1fr; } }
.nm-src { border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: .75rem .9rem; }
.nm-src h2 { margin: 0 0 .55rem; font-size: 1rem; }
.nm-cmp th { width: 8rem; color: var(--muted); font-weight: 500; }
td.nm-conflict { background: rgba(224,122,106,.16); color: var(--rose); font-weight: 600; }
.pe-ids { font-family: ui-monospace, monospace; font-size: .82rem; word-break: break-all; }
.nm-filters { display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; margin: .6rem 0; }
.nm-filters .inline { display: inline-flex; align-items: center; gap: .35rem; margin: 0; text-transform: none; letter-spacing: 0; color: var(--text); font-size: .9rem; }
.nm-filters .inline input { width: auto; min-width: 0; }
.nm-jump { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 1rem; }
.nm-jump .ghost { width: auto; margin: 0; padding: .3rem .55rem; font-size: .82rem; }
.nm-jump .has-crit { color: var(--rose); border-color: rgba(224,122,106,.45); }
.nm-search { max-width: 28rem; margin: .4rem 0 .8rem; }
.nm-filter-chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .2rem 0 .8rem; }
.nm-filter-chip { width: auto; margin: 0; padding: .22rem .55rem; font-size: .8rem; }
.nm-ago-live { color: var(--good); font-weight: 600; }
td.nm-sc-snip { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.nm-sc-row { cursor: pointer; }
tr.nm-sc-row:hover td { background: rgba(255,255,255,.04); }
.nm-sc-text { white-space: pre-wrap; }
pre.nm-sc-raw { max-height: 18rem; overflow: auto; font-size: .8rem; background: var(--paper); padding: .7rem; border: 1px solid var(--line); }
tr.nm-crit td { color: var(--amber); }
tr.nm-crit.nm-off td { color: var(--rose); background: rgba(224,122,106,.08); }
tr.nm-off td:first-child { color: var(--muted); }
/* Offline workstations (not 24h watch): grey the facts, keep SC/Guard pills red. */
.nm-hosts tr.nm-quiet-off:not(.nm-alerted) td:nth-child(n+3),
.nm-hosts tr.nm-quiet-off:not(.nm-alerted) td:nth-child(n+3) .nm-open,
.nm-hosts tr.nm-quiet-off:not(.nm-alerted) td:nth-child(n+3) .muted {
  color: var(--muted);
}
.nm-hosts tr.nm-quiet-off:not(.nm-alerted) td:nth-child(n+3) .nm-open:hover {
  color: var(--accent);
}
tr.nm-alerted td { background: rgba(224,122,106,.22); }
tr.nm-alerted.nm-off td { color: var(--rose); }
tr.nm-alerted td:first-child { box-shadow: inset 3px 0 0 var(--rose); }
.nm-client { scroll-margin-top: 4.5rem; }
.nm-client h3 { display: flex; justify-content: space-between; gap: 1rem; margin: 1.2rem 0 .4rem; font-size: 1rem; }
.nm-hosts { table-layout: fixed; width: 100%; }
.nm-hosts col.nm-c-status { width: 18%; }
.nm-hosts col.nm-c-join { width: 5%; }
.nm-hosts col.nm-c-name { width: 18%; }
.nm-hosts col.nm-c-type { width: 7%; }
.nm-hosts col.nm-c-ip { width: 12%; }
.nm-hosts col.nm-c-lan { width: 10%; }
.nm-wan-form > label,
.nm-edit-2 > label { display: grid; gap: .2rem; }
.nm-edit { display: grid; gap: .55rem; max-width: 46rem; margin: .45rem 0 .7rem; }
.nm-edit-2 {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .45rem .7rem; align-items: end;
}
.nm-edit label { margin: 0; }
.nm-edit input:not([type=radio]):not([type=checkbox]),
.nm-edit select { padding: .4rem .55rem; }
.nm-edit-row {
  display: grid; grid-template-columns: 6.6rem minmax(0, 1fr);
  gap: .2rem .7rem; align-items: start;
}
.nm-edit-k {
  padding-top: .42rem;
  font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; line-height: 1.2;
}
.nm-edit-v { min-width: 0; }
.nm-edit-inline { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.nm-edit-inline input { flex: 1 1 12rem; min-width: 0; width: auto; }
.nm-edit-inline .ghost, .nm-edit-inline .primary { width: auto; margin: 0; padding: .4rem .7rem; }
.nm-choice { display: flex; flex-wrap: wrap; gap: .3rem; }
.nm-choice label {
  display: inline-flex; align-items: center; gap: .35rem;
  margin: 0; padding: .22rem .6rem .22rem .45rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: #0a151d; color: var(--text);
  font-size: .84rem; text-transform: none; letter-spacing: 0;
  cursor: pointer; line-height: 1.2; white-space: nowrap;
}
.nm-choice label:hover { border-color: var(--accent); color: var(--text); }
.nm-choice label:has(input:checked) {
  border-color: var(--accent); background: var(--accent-dim);
}
.nm-choice input { width: auto; min-width: 0; padding: 0; margin: 0; border: 0; background: none; flex: 0 0 auto; }
.cl-flip-k {
  margin: 1rem 0 .35rem; font-size: .82rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.cl-flip { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .35rem; }
.cl-flip button {
  width: auto; min-width: 7.5rem; margin: 0; padding: .7rem 1.15rem;
  border-radius: 10px; font-weight: 650; font-size: .95rem;
  border: 1px solid var(--line); background: #0a151d; color: var(--muted);
}
.cl-flip button.cl-flip-on.on {
  background: rgba(125,206,160,.2); color: var(--good);
  border-color: rgba(125,206,160,.55);
}
.cl-flip button.cl-flip-off.on {
  background: rgba(224,122,106,.18); color: var(--rose);
  border-color: rgba(224,122,106,.5);
}
.cl-flip button:hover { border-color: var(--accent); color: var(--text); }
.nm-edit-hint {
  margin: .22rem 0 0; font-size: .76rem; line-height: 1.35;
  color: var(--muted); text-transform: none; letter-spacing: 0;
}
.nm-attempts {
  width: 100%; max-width: 22rem; border-collapse: collapse;
  font-size: .82rem; margin: .12rem 0 .05rem;
}
.nm-attempts th {
  text-align: left; font-weight: 550; padding: .14rem .5rem .14rem 0;
  color: var(--text);
}
.nm-attempts td {
  text-align: right; padding: .14rem 0; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nm-attempts tr.nm-attempt-cap th,
.nm-attempts tr.nm-attempt-cap td { color: var(--rose); }
@media (max-width: 640px) {
  .nm-edit-2, .nm-edit-row { grid-template-columns: 1fr; }
  .nm-edit-k { padding-top: 0; }
}
.nm-wans { table-layout: fixed; width: 100%; }
.nm-wans col.nm-w-wan { width: 20%; }
.nm-wans col.nm-w-n { width: 7%; }
.nm-wans col.nm-w-nick { width: 16%; }
.nm-wans col.nm-w-client { width: 18%; }
.nm-wans col.nm-w-ips { width: 39%; }
.nm-wans td { overflow: hidden; text-overflow: ellipsis; }
.nm-wans td.nm-wan-ips { white-space: nowrap; overflow: visible; }
.nm-wan-chip { font-weight: 550; }
.nm-wan-chip .muted { font-weight: 400; }
.nm-wans tr.nm-wan-group-row td { border-top: 1px solid rgba(255,255,255,.16); }
.nm-wans tr.nm-wan-ip-row td { border-top-color: transparent; }
.nm-wans tr.nm-wan-ip-row .nm-open { font-weight: 500; }
.nm-hosts col.nm-c-seen { width: 8%; }
.nm-hosts td { overflow: hidden; text-overflow: ellipsis; }
.nm-hosts td:nth-child(n+4) { white-space: nowrap; }
.nm-hosts thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  overflow: visible;
  background: #152636;
  box-shadow: 0 1px 0 rgba(46, 184, 230, .28);
}
.nm-hosts td:first-child { overflow: visible; white-space: normal; }
.nm-hosts td.nm-join-cell { overflow: visible; white-space: nowrap; }
.nm-hosts td.nm-join-cell .nm-join { margin-left: 0; }
.nm-hosts .nm-client-row th {
  overflow: visible;
  padding: .55rem .55rem .45rem;
  font-size: 1rem;
  font-weight: 650;
  position: sticky;
  top: 2.25rem;
  z-index: 5;
  background: #173040;
  border-bottom-color: rgba(46, 184, 230, .22);
  box-shadow: inset 3px 0 0 var(--accent), 0 1px 0 rgba(46, 184, 230, .2);
}
.nm-hosts tbody tr.nm-client-row:hover > th {
  background: #1c3a4e;
  box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 1px rgba(46, 184, 230, .28);
}
.nm-hosts .nm-client-row { scroll-margin-top: 5.2rem; }
.nm-client-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.nm-host-name { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.nm-host-name .nm-open {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nm-host-name .nm-join { margin-left: 0; flex: 0 0 auto; }
.nm-open, .nm-alert-open, .nm-conn-who { background: none; border: 0; padding: 0; margin: 0; width: auto; color: inherit; font: inherit; font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.nm-open:hover, .nm-alert-open:hover, .nm-conn-who:hover { color: var(--accent); }
.nm-join {
  display: inline-block; margin-left: .45rem; padding: .06rem .45rem;
  border: 1px solid var(--accent); border-radius: 6px;
  color: var(--accent); font-size: .76rem; font-weight: 650;
  letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  vertical-align: middle;
}
.nm-join:hover { background: var(--accent-dim); }
.nm-log tr.nm-crit td { font-weight: 600; }
tr.nm-disc td { background: rgba(232,184,109,.12); }
tr.nm-maint td { color: var(--muted); }
.nm-filters select { width: auto; min-width: 10rem; }
.nm-gops-stamp { margin: .3rem 0 0; }
.nm-gops-stamp th, .nm-gops-stamp td { font-size: .82rem; }
.nm-gops-stamp .ghost { padding: .15rem .4rem; font-size: .78rem; }
.pill.maint { background: rgba(232,184,109,.18); color: var(--amber); }
.nm-maint-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .8rem 0 1rem; }
.nm-maint-bar .ghost { width: auto; margin: 0; }


.cal .hd { color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.day {
  min-height: 5.2rem; border: 1px solid var(--line); border-radius: 10px; padding: .35rem;
  background: #0c1820; cursor: pointer; display: flex; flex-direction: column; gap: .2rem;
}
.day:hover { border-color: var(--accent); }
.day.picked {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent);
}
.day.picked .n { color: var(--text); }
.day .n { font-size: .8rem; color: var(--muted); }
.day.today {
  background: #1a3846;
}
.day.today .n { color: var(--text); font-weight: 650; }
.day.today.off { background: #2a2c28; }
.day.holiday { outline: 1px solid var(--amber); }
.day.off { background: rgba(224,122,106,.08); }
.day.override { outline: 1px solid var(--accent); }
.day .slot { font-size: .68rem; color: var(--text); }
.week-scroll, .cal-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .45rem;
}
.team-cal { font-size: .78rem; border-collapse: separate; border-spacing: 0; }
.team-cal th, .team-cal td {
  border-bottom: 1px solid var(--line); padding: .28rem .35rem;
  text-align: center; white-space: nowrap;
}
.team-cal th.sticky, .team-cal td.sticky {
  position: sticky; left: 0; z-index: 1; text-align: left;
  background: var(--paper); min-width: 6.4rem;
}
.team-cal thead th { position: sticky; top: 0; background: var(--paper); z-index: 2; }
.team-cal thead th.sticky { z-index: 3; }
.team-cal tbody tr.wknd td { background: #181e24; color: #9aa8b0; }
.team-cal tbody tr.wknd td.sticky { background: #181e24; }
.team-cal tr.hol td { background: rgba(232, 184, 109, .08); }
.team-cal tbody tr.today td,
.team-cal tbody tr.today td.sticky { background: #1a3846; }
.team-cal tbody tr.today.wknd td,
.team-cal tbody tr.today.wknd td.sticky { background: #1c333c; }
.team-cal tbody tr.today.hol td,
.team-cal tbody tr.today.hol td.sticky { background: #2a3828; }
.team-cal td.is-pto { background: rgba(224, 122, 106, .22); color: var(--rose); font-weight: 600; }
.team-cal tbody tr.wknd td.is-pto { background: rgba(224, 122, 106, .22); color: var(--rose); }
.team-cal td.is-off { background: rgba(127, 150, 163, .16); color: var(--muted); }
.team-cal td.is-note { color: var(--accent); font-size: .7rem; }
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(10.6rem, 1fr));
  gap: .5rem;
  min-width: 76rem;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(6.4rem, 1fr));
  gap: .35rem;
  min-width: 48rem;
}
.week-col { background: #0c1820; border: 1px solid var(--line); border-radius: 10px; padding: .45rem; }
.week-col h3 { margin: 0 0 .4rem; font-size: .8rem; color: var(--muted); font-weight: 600; }
.slot-edit {
  display: flex; flex-direction: column; align-items: stretch;
  gap: .28rem; margin-bottom: .55rem;
}
.tod {
  display: flex; flex-wrap: nowrap; align-items: center; gap: .18rem;
  white-space: nowrap;
}
.tod-lab { font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); width: 2.2rem; flex: 0 0 auto; }
.tod select, .slot-edit select {
  width: auto; min-width: 0; max-width: 3.4rem; padding: .12rem .15rem;
  font-size: .72rem;
}
.tod select[data-k="sap"], .tod select[data-k="eap"] { max-width: 3.1rem; }
.slot-edit .dual, .home-time { font-size: .68rem; color: var(--accent); line-height: 1.3; }
.slot-edit .slot-del, .slot-add { width: auto; margin: 0; padding: .25rem .5rem; }
.day .slot { font-size: .68rem; color: var(--text); line-height: 1.35; }
.day .home-time { color: var(--accent); display: block; }
.sum { font-family: var(--serif); font-size: 1.6rem; margin: .2rem 0 0; }
.drawer { margin-top: 1rem; }
.banner {
  margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent-dim);
}
.banner.in { border-color: var(--good); background: rgba(125, 206, 160, .12); }
.banner strong { color: var(--text); }
tr.open-in td { background: rgba(125, 206, 160, .1); }
td.row-actions { white-space: nowrap; vertical-align: middle; }
.row-actions button { width: auto; margin: 0 .25rem 0 0; padding: .45rem .7rem; }

.tn-list { display: flex; flex-direction: column; gap: .55rem; margin-top: .7rem; }
.tn-row {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center;
  text-align: left; width: 100%; margin: 0; padding: .75rem .9rem;
  border: 1px solid var(--line); border-radius: 10px; background: #0a151d; color: inherit;
  cursor: pointer;
}
.tn-row:hover { border-color: var(--accent); }
.tn-row.primary { border-left: 3px solid var(--accent); }
.tn-row.paused { opacity: .7; }
.tn-row .tn-name { font-weight: 650; color: #fff; }
.tn-row .tn-slug { color: var(--muted); font-size: .82rem; margin-left: .4rem; }
.tn-chips { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }
.tn-chip {
  font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 650;
  padding: .12rem .45rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.tn-chip.on { color: #fff; border-color: var(--accent); background: var(--accent-dim); }
.tn-chip.lock { color: #f3c16e; border-color: #f3c16e; }
.tn-chip.warn { color: #e89b9b; border-color: #e89b9b; }
.tn-chip.freak { color: #d7b3ff; border-color: #9b7bd4; }
.tn-nginx {
  font-size: .78rem;
  white-space: pre-wrap;
  background: #0b1822;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .6rem .8rem;
  overflow-x: auto;
}
.tn-tabs { display: flex; gap: .35rem; margin: .8rem 0 .6rem; flex-wrap: wrap; }
.tn-tabs button { width: auto; margin: 0; }
.tn-guide { margin-top: .7rem; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: #08141c; }
.tn-guide ol { margin: .35rem 0 0; padding-left: 1.2rem; }
.tn-guide li { margin: .25rem 0; color: var(--text); }
.tn-back { width: auto; margin: 0 0 .8rem; }
.tn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.tk-bar {
  display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: end;
  margin: .75rem 0 1rem;
}
.tk-filter { margin: 0; min-width: 9rem; max-width: 16rem; flex: 1 1 9rem; }
.tk-filter input, .tk-filter select { margin-top: .2rem; max-width: 16rem; }
.tk-list { display: flex; flex-direction: column; gap: .65rem; }
.tk-row {
  display: block; width: 100%; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: .75rem .9rem; color: inherit; font: inherit;
}
.tk-row:hover { border-color: var(--accent); }
.tk-row-top { display: flex; flex-wrap: wrap; gap: .35rem .7rem; align-items: baseline; }
.tk-subj { flex: 1 1 12rem; }
.tk-st { color: var(--muted); font-size: .85rem; }
.tk-name { font-weight: 700; color: var(--accent); }
.tk-ai-n { color: var(--amber); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.tk-pager { margin: .55rem 0 .7rem; }
.tk-pager button[disabled] { opacity: .4; cursor: default; }
.tk-meta, .tk-lasts {
  display: flex; flex-wrap: wrap; gap: .25rem 1.1rem;
  margin-top: .4rem; font-size: .85rem; color: var(--muted);
}
.tk-lasts > div { flex: 1 1 16rem; }
.tk-when { font-weight: 400; color: var(--muted); }
.tk-when.last { font-weight: 700; color: var(--text); }
.tk-head { margin: .6rem 0 1rem; }
.tk-sect { font-size: .95rem; margin: 1.2rem 0 .5rem; }
.tk-msg {
  border: 1px solid var(--line); border-radius: 10px;
  padding: .8rem .9rem; margin: 0 0 .7rem; background: var(--paper);
}
.tk-msg.tk-desc { border-color: rgba(46, 184, 230, .35); }
.tk-msg-head { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: baseline; margin-bottom: .45rem; }
.tk-msg-body { white-space: pre-wrap; line-height: 1.45; }
.tk-priv {
  font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--amber);
}
.tk-ai {
  margin-top: .7rem; padding: .65rem .75rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-dim); font-size: .88rem; line-height: 1.4;
}
.tk-ai.tk-ai-wait { border-left-color: var(--amber); }
.tk-ai blockquote { margin: .35rem 0 0; color: var(--text); }
.tk-ai-former { margin-top: .55rem; font-size: .85rem; color: var(--muted); }
.tk-ai-former summary { cursor: pointer; }
.tk-ai-old { margin-top: .5rem; opacity: .88; }
.tk-ai .ghost { margin-top: .4rem; }
.tk-ai-meta { margin: 0 0 .45rem; font-size: .8rem; }
.tk-ai-rerun-tag { color: var(--amber); font-weight: 600; }
.tk-ai-tools { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.tk-ai-tools .ghost { margin-top: 0; }
.tk-ai-prompt, .tk-ai-custom { margin-top: .55rem; }
.tk-ai-prompt textarea, .tk-ai-custom textarea {
  width: 100%; min-height: 10rem; margin-top: .35rem;
  font: .8rem/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.pb-pills { display: inline-flex; flex-wrap: wrap; gap: .25rem .35rem; vertical-align: middle; }
.pb-pills .pill { text-transform: none; letter-spacing: 0; font-weight: 650; }
.pill.pb-pill-spin { background: var(--accent-dim); color: var(--accent); }
.pb-default { list-style: none; margin: 0 0 .55rem; padding: 0; }
.pb-default > details.pb-part {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: .55rem .75rem .55rem .7rem;
  border-left-width: 4px;
}
.pb-default.pb-has-spin.pb-def-on > details.pb-part {
  border-left-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--good);
}
.pb-default.pb-has-spin.pb-def-off > details.pb-part {
  border-left-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--rose);
}
.pb-default.pb-def-on:not(.pb-has-spin) > details.pb-part {
  border-left-color: var(--good);
}
.pb-default.pb-def-off:not(.pb-has-spin) > details.pb-part {
  border-left-color: var(--rose);
}
.pb-default > details.pb-part > summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  align-items: center;
}
.pb-default-orig {
  margin-top: .45rem;
  padding-left: .55rem;
  border-left: 3px solid var(--good);
}
.pb-default.pb-def-off .pb-default-orig { border-left-color: var(--rose); }
.pb-spin-list { list-style: none; margin: 0; padding: 0; }
.pb-part-btns, .pb-spin-save { margin: .55rem 0 0; }
.pb-add > summary {
  cursor: pointer;
  font-size: 1.05rem;
}
.pb-add[open] {
  border-color: var(--accent);
  background: rgba(46, 184, 230, .08);
}
.pb-add > summary .pb-add-state::before { content: "Collapsed"; }
.pb-add[open] > summary .pb-add-state::before { content: "Open"; }
.pb-add > summary .pb-add-state {
  background: rgba(127, 150, 163, .16);
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
  margin-left: auto;
}
.pb-add[open] > summary .pb-add-state {
  background: var(--accent-dim);
  color: var(--accent);
}
@media (max-width: 820px) {
  .tn-grid { grid-template-columns: 1fr; }
}

.nm-emqx-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 14rem);
  min-height: 32rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a151d;
}

@media (max-width: 820px) {
  #app:not([hidden]) { grid-template-columns: 1fr; }
  .gate { padding: 1.2rem .8rem 2rem; align-items: start; }
  .gate-card { width: 100%; }
  .rail {
    flex-direction: row; flex-wrap: wrap; align-items: center;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: .75rem .9rem; gap: .55rem .7rem;
  }
  .brand { flex: 1 1 auto; }
  .logo-word { width: 8.6rem; }
  #nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; }
  #logout { width: auto; margin: 0 0 0 auto; padding: .4rem .75rem; }
  main { padding: 1rem .9rem 2.4rem; }
  .week-grid { min-width: 76rem; }
  .cal { min-width: 48rem; }
}
