/* =====================================================================
   AEEIW "New look" (beta) — v1.0.197
   A second shell over the same app: icon rail with customer logos (B),
   the pipeline Board for the office (C), and a map-first My Day for
   engineers (D). EVERY rule here is scoped under html.ui-next, so the
   classic app is byte-for-byte unaffected while the switch is off.
   ===================================================================== */

/* ---------- Nova type (v1.0.201): self-hosted, variable, latin + latin-ext.
   Only downloaded when a page actually uses them, i.e. in the new look. ---------- */
/* JetBrains Mono — latin-ext (variable, 400–600) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(assets/fonts/JetBrainsMono-var-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono — latin (variable, 400–600) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(assets/fonts/JetBrainsMono-var-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Manrope — latin-ext (variable, 400–800) */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/Manrope-var-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Manrope — latin (variable, 400–800) */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/Manrope-var-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Space Grotesk — latin-ext (variable, 500–700) */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(assets/fonts/SpaceGrotesk-var-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Space Grotesk — latin (variable, 500–700) */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(assets/fonts/SpaceGrotesk-var-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Nova tokens (v1.0.201) ----------
   Day (logo cyan + navy) is the base; Night (dark glass) rides the app's
   existing data-theme="dark" switch, so the topbar toggle flips between them.
   --nx-card may be translucent (Night glass); anything that floats over other
   content (sheets, drawer, palette, tab bar, map chips) uses --nx-surface. */
html.ui-next {
  --nx-bg: #f3f6fa;
  --nx-card: #ffffff;
  --nx-surface: #ffffff;
  --nx-line: #e2e8f0;
  --nx-line-2: #c4cedc;
  --nx-ink: #16233b;
  --nx-ink-2: #46536b;
  --nx-muted: #5c6880;
  --nx-soft: #edf1f7;
  --nx-soft-2: #e5ebf3;
  --nx-accent: #0b7cb3;
  --nx-accent-2: #095e88;
  --nx-tint: #e3f4fc;
  --nx-tint-line: #a8dcf4;
  --nx-track: #d9edf9;
  --nx-bar-dim: #cfe7f6;
  --nx-primary: #27326d;
  --nx-primary-ink: #ffffff;
  --nx-mark: #2b3990;          /* pack markers / THP: navy by day, violet by night */
  --nx-mark-bg: #e7e9f7;
  --nx-mark-ink: #2b3990;
  --nx-ok: #15803d;
  --nx-warn: #a16207;
  --nx-bad: #d03b3b;
  --nx-rail: #ffffff;
  --nx-rail-2: #ffffff;
  --nx-rail-ink: #5c6880;
  --nx-rail-line: #e2e8f0;
  --nx-brand: #2b3990;
  --nx-shadow: 0 1px 3px rgba(23, 42, 79, 0.06);
  --nx-shadow-lg: 0 24px 60px rgba(23, 42, 79, 0.2);
  --nx-s-sched: #5c6880;
  --nx-s-booked: #46536b;
  --nx-s-today: #0b7cb3;
  --nx-s-late: #d03b3b;
  --nx-s-rfs: #15803d;
  --nx-s-await: #a16207;
  --nx-s-paid: #15803d;
  --nx-s-hold: #2b3990;
  --nx-display: 'Montserrat', 'Space Grotesk', 'Manrope', system-ui, sans-serif;
  --nx-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nx-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --nx-rail-w: 64px;
  --nx-tabbar-h: 66px;
  /* The classic screens shown inside the new look take the same palette. */
  --bg: #f3f6fa;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-strong: #c4cedc;
  --text: #16233b;
  --text-light: #46536b;
  --muted: #5c6880;
  --bg-soft: #f6f8fb;
  --primary: #2b3990;
  --accent: #0b7cb3;
  --font-display: 'Space Grotesk', 'Manrope', sans-serif;
}
html.ui-next[data-theme="dark"] {
  --nx-bg: #080c13;
  --nx-card: rgba(255, 255, 255, 0.04);
  --nx-surface: #0f1520;
  --nx-line: rgba(255, 255, 255, 0.08);
  --nx-line-2: rgba(255, 255, 255, 0.16);
  --nx-ink: #eaf0f9;
  --nx-ink-2: #a9b4c9;
  --nx-muted: #7e8ba3;
  --nx-soft: rgba(255, 255, 255, 0.04);
  --nx-soft-2: rgba(255, 255, 255, 0.07);
  --nx-accent: #3fd8ee;
  --nx-accent-2: #8be7f5;
  --nx-tint: rgba(63, 216, 238, 0.14);
  --nx-tint-line: rgba(63, 216, 238, 0.35);
  --nx-track: #12303b;
  --nx-bar-dim: rgba(63, 216, 238, 0.22);
  --nx-primary: #3fd8ee;
  --nx-primary-ink: #06272e;
  --nx-mark: #8f7cf8;
  --nx-mark-bg: rgba(143, 124, 248, 0.12);
  --nx-mark-ink: #b0a5fa;
  --nx-ok: #35d08c;
  --nx-warn: #f5b83d;
  --nx-bad: #f87171;
  --nx-rail: #0b1019;
  --nx-rail-2: #0b1019;
  --nx-rail-ink: #7e8ba3;
  --nx-rail-line: rgba(255, 255, 255, 0.07);
  --nx-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --nx-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);
  --nx-s-sched: #7e8ba3;
  --nx-s-booked: #a9b4c9;
  --nx-s-today: #3fd8ee;
  --nx-s-late: #f87171;
  --nx-s-rfs: #35d08c;
  --nx-s-await: #f5b83d;
  --nx-s-paid: #35d08c;
  --nx-s-hold: #8f7cf8;
  --bg: #080c13;
  --card: #0f1520;
  --border: #1d2533;
  --border-strong: #2a3446;
  --text: #eaf0f9;
  --text-light: #a9b4c9;
  --muted: #7e8ba3;
  --bg-soft: #0c121c;
  --accent: #3fd8ee;
}

/* ---------- Shell: the classic sidebar, hamburger and top tabs retire ---------- */
html.ui-next body { background: var(--nx-bg); }
html.ui-next .sidebar,
html.ui-next .sidebar-backdrop,
html.ui-next .topnav,
html.ui-next .menu-toggle,
html.ui-next #export-btn { display: none !important; }
html.ui-next .app-shell { padding-left: var(--nx-rail-w); }
html.ui-next .main-area { min-height: 100vh; background: var(--nx-bg); }
html.ui-next .topbar {
  background: color-mix(in srgb, var(--nx-card) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--nx-line);
  padding: 0 24px;
  height: 64px;
  gap: 14px;
}
html.ui-next .topbar h2#page-title { display: none; }
html.ui-next .nx-crumb {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--nx-display);
}
html.ui-next .nx-crumb-logo {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--nx-line);
  overflow: hidden;
}
html.ui-next .nx-crumb-logo img { max-width: 28px; max-height: 28px; object-fit: contain; display: block; }
html.ui-next .nx-crumb-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
html.ui-next .nx-crumb-trail {
  font-family: var(--nx-body); font-size: 11.5px; font-weight: 700; color: var(--nx-muted);
  letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.ui-next .nx-crumb-title {
  font-size: 19px; font-weight: 800; color: var(--nx-ink); letter-spacing: -0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.ui-next .nx-find {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; min-width: 260px; padding: 0 10px 0 12px;
  border-radius: 12px; border: 1px solid var(--nx-line); background: var(--nx-soft);
  color: var(--nx-muted); font: 600 13px var(--nx-body); cursor: pointer;
  transition: border-color .15s, background .15s;
}
html.ui-next .nx-find:hover { border-color: var(--nx-line-2); background: var(--nx-card); }
html.ui-next .nx-find .icon { width: 17px; height: 17px; }
html.ui-next .nx-find kbd {
  margin-left: auto; font: 700 11px var(--nx-body); color: var(--nx-muted);
  border: 1px solid var(--nx-line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px;
  background: var(--nx-card);
}
html.ui-next .who-area .icon-btn { border-radius: 10px; }
/* The classic badge rule sets display, which beats the [hidden] attribute. */
html.ui-next .ws-nav-badge[hidden] { display: none !important; }
html.ui-next main#view-content { padding: 24px 28px 60px; }
html.ui-next main#view-content.nx-wide { max-width: none; padding: 18px 22px 40px; }
html.ui-next main#view-content.nx-flush { max-width: none; padding: 0; }

/* Leaflet stacks its panes at z 400-1000 in the ROOT context, so a map
   scrolled under the topbar or the tab bar would paint over them. Contain
   every map in its own stacking context while the new look is on. */
html.ui-next .leaflet-container { isolation: isolate; z-index: 0; }
html.ui-next .topbar { z-index: 1000; }

/* ---------- The rail ---------- */
#nx-rail { display: none; }
html.ui-next #nx-rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--nx-rail-w);
  background: linear-gradient(180deg, var(--nx-rail-2) 0%, var(--nx-rail) 38%);
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0 12px; z-index: 1100;
  border-right: 1px solid var(--nx-rail-line);
}
.nx-rail-brand {
  width: 48px; height: 48px; border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; border: none; cursor: pointer; padding: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.nx-rail-brand img { width: 40px; height: 40px; object-fit: contain; display: block; }
.nx-rail-scroll {
  flex: 1; min-height: 0; width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  overflow-y: auto; scrollbar-width: none;
}
.nx-rail-scroll::-webkit-scrollbar { display: none; }
.nx-rail-sep { width: 32px; height: 1px; background: var(--nx-rail-line); margin: 8px 0; flex: none; }
.nx-rail-cap {
  font: 800 8.5px var(--nx-body, sans-serif); letter-spacing: 0.14em; color: #56607e;
  text-transform: uppercase; margin: 2px 0 4px;
}
.nx-ri {
  position: relative; width: 64px; min-height: 56px; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: none; background: transparent; color: var(--nx-rail-ink);
  border-radius: 14px; cursor: pointer; padding: 6px 2px;
  font: 700 10px var(--nx-body, sans-serif); letter-spacing: 0.01em;
  transition: background .15s, color .15s;
}
.nx-ri .icon { width: 22px; height: 22px; stroke-width: 1.8; }
.nx-ri span.nx-ri-label { max-width: 62px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-ri:hover { background: rgba(255, 255, 255, 0.06); color: #dfe5f5; }
.nx-ri.active { color: #fff; background: rgba(25, 191, 239, 0.12); }
.nx-ri.active::before {
  content: ''; position: absolute; left: -6px; top: 14px; bottom: 14px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--nx-accent, #19bfef);
}
.nx-ri .ws-nav-badge {
  position: absolute; top: 4px; right: 10px; margin: 0;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #e5484d; color: #fff; font: 800 10px/18px var(--nx-body, sans-serif); text-align: center;
  box-shadow: 0 0 0 2px var(--nx-rail, #0d1222);
}
/* Customer logos: white tiles so every brand reads true on the dark rail. */
.nx-ri.nx-brand { gap: 5px; }
.nx-logo-tile {
  width: 44px; height: 44px; border-radius: 13px; background: #fff; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: visible;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform .15s, box-shadow .15s;
}
.nx-logo-tile img { max-width: 36px; max-height: 36px; object-fit: contain; display: block; border-radius: 6px; }
.nx-logo-tile.wide img { max-width: 40px; }
.nx-ri.nx-brand:hover .nx-logo-tile { transform: translateY(-1px); }
.nx-ri.nx-brand.active { background: transparent; }
.nx-ri.nx-brand.active .nx-logo-tile { box-shadow: 0 0 0 3px var(--nx-accent, #19bfef), 0 4px 14px rgba(25, 191, 239, 0.4); }
.nx-flame {
  position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; border-radius: 999px;
  background: #f28a1e; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}
.nx-flame svg { width: 12px; height: 12px; }
.nx-rail-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 8px; }
.nx-rail-me {
  width: 40px; height: 40px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #19bfef, #4a5aa3); color: #fff; cursor: pointer; padding: 0;
  font: 800 13px var(--nx-body, sans-serif); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.nx-rail-me img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nx-rail-classic {
  border: 1px solid var(--nx-rail-line); background: transparent; color: var(--nx-rail-ink);
  border-radius: 9px; font: 700 9.5px var(--nx-body, sans-serif); padding: 5px 6px; cursor: pointer; line-height: 1.15;
}
.nx-rail-classic:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }

/* ---------- Flyout (a rail group's menu) ---------- */
#nx-flyout-wrap { position: fixed; inset: 0; z-index: 1150; display: none; }
#nx-flyout-wrap.open { display: block; }
#nx-flyout-wrap .nx-fly-scrim { position: absolute; inset: 0; background: rgba(8, 12, 24, 0.18); }
.nx-fly {
  position: absolute; left: var(--nx-rail-w, 76px); top: 0; bottom: 0; width: 318px;
  background: var(--nx-card); border-right: 1px solid var(--nx-line);
  box-shadow: var(--nx-shadow-lg); display: flex; flex-direction: column;
  animation: nxFlyIn .18s ease-out;
  font-family: var(--nx-body);
}
@keyframes nxFlyIn { from { transform: translateX(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.nx-fly-head { display: flex; align-items: center; gap: 12px; padding: 20px 20px 14px; border-bottom: 1px solid var(--nx-line); }
.nx-fly-head .nx-logo-tile { width: 46px; height: 46px; box-shadow: inset 0 0 0 1px var(--nx-line); }
.nx-fly-head .nx-fly-ico {
  width: 46px; height: 46px; border-radius: 13px; background: var(--nx-soft); color: var(--nx-ink);
  display: flex; align-items: center; justify-content: center;
}
.nx-fly-head .nx-fly-ico .icon { width: 22px; height: 22px; }
.nx-fly-title { font: 800 18px var(--nx-display); color: var(--nx-ink); }
.nx-fly-sub { font-size: 12px; font-weight: 600; color: var(--nx-muted); margin-top: 1px; }
.nx-fly-body { flex: 1; overflow-y: auto; padding: 10px 12px 20px; }
.nx-fly-sec { margin-top: 12px; }
/* A section that spans the group (Hyperoptic "Claims"): set apart by a rule. */
.nx-fly-sec.split { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--nx-line, rgba(127,127,127,.25)); }
.nx-fly-item.strong span { font-weight: 800; }
.nx-fly-sec-h {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  font: 800 11px var(--nx-body); color: var(--nx-muted); text-transform: uppercase; letter-spacing: 0.08em;
}
.nx-fly-sec-h img { height: 18px; width: auto; max-width: 70px; object-fit: contain; border-radius: 4px; }
/* A customer folded into one dropdown (Hyperoptic). */
.nx-fly-fold { width: 100%; border: none; background: transparent; cursor: pointer; text-align: left; border-radius: 11px; min-height: 44px; }
@media (hover: hover) { .nx-fly-fold:hover { background: var(--nx-tint, rgba(127,127,127,.08)); } }
.nx-fly-fold > svg { margin-left: auto; width: 16px; height: 16px; flex: none; transition: transform .15s ease; }
.nx-fly-fold[aria-expanded="true"] > svg { transform: rotate(90deg); }
.nx-fly-fold-body[hidden] { display: none; }
.nx-fly-fold-body { padding-left: 6px; }
.nx-fly-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 10px 10px; border-radius: 11px; border: none; background: transparent;
  color: var(--nx-ink); font: 700 14px var(--nx-body); cursor: pointer; text-align: left;
}
.nx-fly-item .icon { width: 19px; height: 19px; color: var(--nx-muted); }
.nx-fly-item:hover { background: var(--nx-soft); }
.nx-fly-item.active { background: color-mix(in srgb, var(--nx-accent) 14%, transparent); color: var(--nx-ink); }
.nx-fly-item.active .icon { color: var(--nx-accent); }
.nx-fly-item .ws-nav-badge { margin-left: auto; }

/* ---------- Mobile: bottom tab bar + More sheet ---------- */
#nx-tabbar { display: none; }
@media (max-width: 900px) {
  html.ui-next .app-shell { padding-left: 0; }
  html.ui-next #nx-rail { display: none; }
  html.ui-next #nx-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    height: calc(var(--nx-tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--nx-card) 94%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
    border-top: 1px solid var(--nx-line);
  }
  html.ui-next .nx-tab {
    position: relative; border: none; background: transparent; color: var(--nx-muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font: 700 11px var(--nx-body); cursor: pointer; border-radius: 12px;
  }
  html.ui-next .nx-tab .icon { width: 23px; height: 23px; stroke-width: 1.9; }
  html.ui-next .nx-tab.active { color: var(--nx-ink); }
  html.ui-next .nx-tab.active .icon { color: var(--nx-accent); }
  html.ui-next .nx-tab.active::before {
    content: ''; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px;
    background: var(--nx-accent);
  }
  html.ui-next .nx-tab .ws-nav-badge {
    position: absolute; top: 2px; right: calc(50% - 22px); margin: 0;
    min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
    background: #e5484d; color: #fff; font: 800 10px/17px var(--nx-body); text-align: center;
  }
  html.ui-next main#view-content,
  html.ui-next main#view-content.nx-wide { padding: 14px 14px calc(var(--nx-tabbar-h) + 28px + env(safe-area-inset-bottom, 0px)); }
  html.ui-next main#view-content.nx-flush { padding: 0 0 calc(var(--nx-tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  html.ui-next .topbar { padding: 0 12px; height: 58px; }
  html.ui-next .nx-crumb-title { font-size: 17px; }
  html.ui-next .nx-crumb-logo { width: 30px; height: 30px; }
  html.ui-next .nx-find { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  html.ui-next .nx-find span, html.ui-next .nx-find kbd { display: none; }
  html.ui-next .who-area { gap: 6px; }
  html.ui-next #logout-btn { display: none; }
  .nx-fly {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 86vh;
    border-radius: 22px 22px 0 0; border-right: none;
    animation: nxSheetUp .22s ease-out;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  #nx-flyout-wrap .nx-fly-scrim { background: rgba(8, 12, 24, 0.45); }
}
@keyframes nxSheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.nx-sheet-grab { display: none; }
@media (max-width: 900px) {
  .nx-sheet-grab { display: block; width: 42px; height: 5px; border-radius: 999px; background: var(--nx-line-2); margin: 8px auto 0; }
}
.nx-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 6px 4px 4px; }
.nx-more-tile {
  border: 1px solid var(--nx-line); background: var(--nx-card); border-radius: 16px;
  min-height: 86px; padding: 10px 6px; cursor: pointer; color: var(--nx-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  font: 700 12px var(--nx-body); text-align: center; position: relative;
}
.nx-more-tile .icon { width: 22px; height: 22px; color: var(--nx-muted); }
.nx-more-tile .nx-logo-tile { width: 40px; height: 40px; box-shadow: inset 0 0 0 1px var(--nx-line); }
.nx-more-tile.active { border-color: var(--nx-accent); }
.nx-more-tile .ws-nav-badge {
  position: absolute; top: 8px; right: 10px; margin: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #e5484d; color: #fff; font: 800 10px/18px var(--nx-body);
}
.nx-more-foot { display: flex; gap: 8px; padding: 14px 4px 6px; }
.nx-more-foot button {
  flex: 1; height: 46px; border-radius: 13px; border: 1px solid var(--nx-line); background: var(--nx-soft);
  color: var(--nx-ink); font: 700 13px var(--nx-body); cursor: pointer;
}

/* ---------- Task hubs: Menu card, hub headings and tiles, Me sheet ---------- */
/* Who you are, at the top of the Menu — tap for My profile. */
.nx-me-card {
  width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; margin: 4px 0 2px;
  padding: 10px 14px; border-radius: 16px; border: 1px solid var(--nx-line);
  background: var(--nx-card); color: var(--nx-ink); font: inherit; text-align: left;
}
button.nx-me-card { cursor: pointer; }
button.nx-me-card:hover { background: var(--nx-soft); }
.nx-me-card.active { border-color: var(--nx-tint-line); background: var(--nx-tint); }
.nx-me-card > .icon { width: 18px; height: 18px; color: var(--nx-muted); flex: none; }
.nx-me-face {
  width: 44px; height: 44px; border-radius: 999px; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--nx-tint); color: var(--nx-accent); font: 800 15px var(--nx-body);
}
.nx-me-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
html.ui-next .nx-fly-head .nx-fly-ico.nx-me-face { border-radius: 999px; background: var(--nx-tint); color: var(--nx-accent); }
.nx-me-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nx-me-txt b { font: 800 15px var(--nx-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-me-txt small { font: 600 12px var(--nx-body); color: var(--nx-muted); }
/* A hub's heading in the Menu: its icon and name over its tiles (set like
   the flyout's section headings). */
.nx-sheet-h {
  display: flex; align-items: center; gap: 7px; padding: 14px 6px 4px;
  font: 500 10px var(--nx-mono); color: var(--nx-muted); text-transform: uppercase; letter-spacing: 0.14em;
}
.nx-sheet-h .icon { width: 14px; height: 14px; flex: none; }
/* One tile per hub when the Menu would run long: icon, name, what's in it, count. */
.nx-hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 6px 4px 4px; }
.nx-hub-tile {
  position: relative; min-height: 96px; padding: 12px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--nx-line); background: var(--nx-card); color: var(--nx-ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; font: inherit;
}
.nx-hub-tile:hover { background: var(--nx-soft); }
.nx-hub-tile.active { border-color: var(--nx-accent); }
.nx-hub-ico {
  width: 36px; height: 36px; border-radius: 11px; margin-bottom: 5px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--nx-accent) 12%, transparent); color: var(--nx-accent);
}
.nx-hub-ico .icon { width: 22px; height: 22px; }
/* The duotone glyph brings its own disc, so the chip behind it goes flat. */
.nx-hub-ico:has(.duo-ic) { background: transparent; width: 40px; height: 40px; }
.nx-hub-ico .duo-ic { width: 40px; height: 40px; }
/* Duotone discs stay visible on the dark glass surfaces. */
html[data-theme="dark"] .icon .duo { opacity: .3; }
.nx-hub-tile b { font: 800 14px var(--nx-body); }
.nx-hub-tile small { font: 600 11.5px/1.35 var(--nx-body); color: var(--nx-muted); }
.nx-hub-n {
  position: absolute; top: 12px; right: 12px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  background: var(--nx-soft-2); color: var(--nx-ink-2); font: 700 11px/22px var(--nx-mono); text-align: center;
}
.nx-hub-tile .ws-nav-badge {
  position: absolute; top: 6px; left: 38px; margin: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #e5484d; color: #fff; font: 800 10px/18px var(--nx-body); text-align: center;
}
/* A customer's logo at the head of its section in a hub's menu. */
html.ui-next .nx-fly-sec-h .nx-logo-tile { width: 26px; height: 26px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--nx-line); flex: none; }
html.ui-next .nx-fly-sec-h .nx-logo-tile img { height: auto; max-width: 20px; max-height: 20px; }
html.ui-next .nx-fly-sec-h .nx-flame { width: 13px; height: 13px; right: -4px; bottom: -4px; }
html.ui-next .nx-fly-sec-h .nx-flame svg { width: 8px; height: 8px; }
/* The Me sheet's ID card / payslips jumps land clear of the sticky header. */
html.ui-next #me-idcard, html.ui-next #me-payslips, html.ui-next #me-notifications { scroll-margin-top: 76px; }

/* ---------- Shared bits ---------- */
.nx-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px;
  font: 800 11px var(--nx-body); letter-spacing: 0.01em; white-space: nowrap;
  background: var(--nx-soft-2); color: var(--nx-ink-2);
}
.nx-chip.h250 { background: color-mix(in srgb, var(--nx-s-sched) 14%, transparent); color: var(--nx-s-sched); }
.nx-chip.hsv { background: color-mix(in srgb, var(--nx-s-paid) 16%, transparent); color: var(--nx-s-paid); }
.nx-chip.hmdu { background: color-mix(in srgb, var(--nx-s-today) 14%, transparent); color: var(--nx-s-today); }
.nx-chip.pon { background: color-mix(in srgb, #f28a1e 16%, transparent); color: #c96a0c; }
html.ui-next[data-theme="dark"] .nx-chip.pon { color: #f7a24a; }
.nx-chip.fire { background: color-mix(in srgb, #f28a1e 16%, transparent); color: #c96a0c; }
.nx-chip.late { background: color-mix(in srgb, var(--nx-s-late) 14%, transparent); color: var(--nx-s-late); }
.nx-chip.today { background: color-mix(in srgb, var(--nx-s-today) 15%, transparent); color: var(--nx-s-today); }
.nx-chip.ok { background: color-mix(in srgb, var(--nx-s-rfs) 15%, transparent); color: var(--nx-s-rfs); }
.nx-chip.hold { background: color-mix(in srgb, var(--nx-s-hold) 15%, transparent); color: var(--nx-s-hold); }
.nx-chip.warn { background: color-mix(in srgb, var(--nx-s-await) 16%, transparent); color: var(--nx-s-await); }
.nx-av {
  width: 26px; height: 26px; border-radius: 999px; flex: none; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font: 800 10.5px var(--nx-body); letter-spacing: 0.02em;
}
.nx-btn {
  height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--nx-line-2);
  background: var(--nx-card); color: var(--nx-ink); font: 800 14px var(--nx-body);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  text-decoration: none; transition: transform .08s, background .15s;
}
.nx-btn:hover { background: var(--nx-soft); }
.nx-btn:active { transform: scale(0.98); }
.nx-btn .icon { width: 18px; height: 18px; }
.nx-btn.primary { background: var(--nx-ink); border-color: var(--nx-ink); color: var(--nx-card); }
html.ui-next[data-theme="dark"] .nx-btn.primary { background: #e8edf7; color: #0a0f1d; border-color: #e8edf7; }
.nx-btn.accent { background: var(--nx-accent); border-color: var(--nx-accent); color: #04121c; }
.nx-btn.small { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; }
.nx-empty {
  padding: 18px 12px; text-align: center; color: var(--nx-muted); font: 600 12.5px var(--nx-body);
  border: 1.5px dashed var(--nx-line-2); border-radius: 12px;
}
.nx-empty-ico { display: block; margin: 0 auto 8px; color: var(--nx-accent); }
.nx-empty-ico .icon { width: 30px; height: 30px; }

/* ---------- Board (office) ---------- */
.nx-board { font-family: var(--nx-body); color: var(--nx-ink); }
.nx-bhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.nx-cust { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--nx-card); border: 1px solid var(--nx-line); }
.nx-cust button {
  height: 40px; padding: 0 14px 0 6px; border-radius: 10px; border: none; background: transparent;
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font: 800 13.5px var(--nx-body); color: var(--nx-muted);
}
.nx-cust button .nx-logo-tile { width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--nx-line); }
.nx-cust button .nx-logo-tile img { max-width: 24px; max-height: 24px; }
.nx-cust button .nx-flame { width: 14px; height: 14px; right: -4px; bottom: -4px; }
.nx-cust button .nx-flame svg { width: 9px; height: 9px; }
.nx-cust button.on { background: var(--nx-ink); color: var(--nx-card); }
html.ui-next[data-theme="dark"] .nx-cust button.on { background: #e8edf7; color: #0a0f1d; }
.nx-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.nx-seg button {
  height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--nx-line); background: var(--nx-card);
  font: 700 12.5px var(--nx-body); color: var(--nx-ink-2); cursor: pointer;
}
.nx-seg button.on { border-color: var(--nx-ink); background: var(--nx-ink); color: var(--nx-card); }
html.ui-next[data-theme="dark"] .nx-seg button.on { background: #e8edf7; color: #0a0f1d; border-color: #e8edf7; }
.nx-bsearch {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--nx-line); background: var(--nx-card); color: var(--nx-muted);
}
.nx-bsearch input { border: none; outline: none; background: transparent; color: var(--nx-ink); font: 600 13px var(--nx-body); width: 220px; padding: 0; margin: 0; }
.nx-bsearch .icon { width: 17px; height: 17px; }

.nx-money { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.nx-mtile {
  background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 16px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; box-shadow: var(--nx-shadow);
  cursor: default;
}
.nx-mtile[role="button"] { cursor: pointer; }
.nx-mtile::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--nx-accent)); }
.nx-mtile .k { font: 800 11px var(--nx-body); color: var(--nx-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.nx-mtile .v { font: 800 26px var(--nx-display); letter-spacing: -0.5px; font-variant-numeric: tabular-nums; color: var(--nx-ink); line-height: 1.15; }
.nx-mtile .s { font: 600 12.5px var(--nx-body); color: var(--nx-muted); }
.nx-mtile.locked .v { font-size: 15px; font-family: var(--nx-body); color: var(--nx-muted); }

.nx-flowbar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--nx-soft-2); margin: 0 0 14px; }
.nx-flowbar span { display: block; height: 100%; }

.nx-cols {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(238px, 1fr); gap: 12px;
  overflow-x: auto; padding-bottom: 8px; align-items: start;
  scrollbar-width: thin;
}
.nx-col {
  background: var(--nx-soft); border: 1px solid var(--nx-line); border-radius: 18px;
  display: flex; flex-direction: column; min-height: 200px; max-height: calc(100vh - 290px);
}
.nx-col-h { padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 3px; border-bottom: 1px solid var(--nx-line); }
.nx-col-h .t { display: flex; align-items: center; gap: 8px; font: 800 13.5px var(--nx-body); color: var(--nx-ink); }
.nx-col-h .t i { width: 9px; height: 9px; border-radius: 999px; background: var(--c); flex: none; }
.nx-col-h .t b { margin-left: auto; font: 800 12px var(--nx-body); color: var(--nx-muted); background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 999px; padding: 1px 8px; }
.nx-col-h .m { font: 800 17px var(--nx-display); color: var(--c); font-variant-numeric: tabular-nums; }
.nx-col-h .h { font: 600 11.5px var(--nx-body); color: var(--nx-muted); }
.nx-col-b { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; }
.nx-col-sub { font: 800 10.5px var(--nx-body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--nx-muted); margin: 6px 2px 0; display: flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; padding: 0; }
.nx-card {
  background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 13px; padding: 11px 12px;
  display: flex; flex-direction: column; gap: 6px; cursor: pointer; text-align: left; width: 100%;
  box-shadow: 0 1px 2px rgba(18, 22, 49, 0.05);
  transition: transform .12s, box-shadow .12s, border-color .12s;
  font-family: var(--nx-body); color: var(--nx-ink);
}
.nx-card:hover { transform: translateY(-1px); box-shadow: var(--nx-shadow); border-color: var(--nx-line-2); }
.nx-card:focus-visible { outline: 2px solid var(--nx-accent); outline-offset: 2px; }
.nx-card.sel { border-color: var(--nx-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--nx-accent) 35%, transparent); }
.nx-card .r1 { display: flex; align-items: center; gap: 6px; }
.nx-card .r1 .nx-chip { height: 21px; font-size: 10.5px; padding: 0 7px; }
.nx-card .r1 .d { margin-left: auto; font: 800 11px var(--nx-body); color: var(--nx-muted); white-space: nowrap; }
.nx-card .r1 .d.late { color: var(--nx-s-late); }
.nx-card .a { font: 800 14px var(--nx-body); line-height: 1.25; color: var(--nx-ink); overflow-wrap: anywhere; }
.nx-card .p { font: 600 12px var(--nx-body); color: var(--nx-muted); line-height: 1.3; overflow-wrap: anywhere; }
.nx-card .r3 { display: flex; align-items: center; gap: 7px; margin-top: 2px; font: 700 12px var(--nx-body); color: var(--nx-ink-2); }
.nx-card .r3 .nx-av { width: 22px; height: 22px; font-size: 9.5px; }
.nx-card .r3 .val { margin-left: auto; font: 800 13px var(--nx-display); color: var(--nx-s-rfs); font-variant-numeric: tabular-nums; }
.nx-card .r3 .none { color: var(--nx-muted); font-weight: 600; font-style: italic; }
.nx-card .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.nx-card .tags .nx-chip { height: 20px; font-size: 10px; padding: 0 6px; }
.nx-card.week .wk { font: 800 14px var(--nx-body); }
.nx-card.week .amt { font: 800 20px var(--nx-display); font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }
.nx-more-link { font: 700 12px var(--nx-body); color: var(--nx-muted); text-align: center; padding: 6px; border: none; background: none; cursor: pointer; }
.nx-more-link:hover { color: var(--nx-ink); }

/* Mobile board: stage chips + one list (C · office phone) */
.nx-stages { display: none; }
@media (max-width: 900px) {
  .nx-bhead { gap: 8px; }
  .nx-cust { width: 100%; }
  .nx-cust button { flex: 1; justify-content: center; padding: 0 8px 0 4px; font-size: 12.5px; }
  .nx-bsearch { margin-left: 0; width: 100%; }
  .nx-bsearch input { width: 100%; }
  .nx-money { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .nx-mtile { padding: 11px 12px; border-radius: 14px; }
  .nx-mtile .v { font-size: 20px; }
  .nx-stages {
    display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 12px; padding: 0 14px;
  }
  .nx-stages::-webkit-scrollbar { display: none; }
  .nx-stages button {
    flex: none; height: 38px; padding: 0 12px; border-radius: 12px; border: none; cursor: pointer;
    background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c); font: 800 13px var(--nx-body);
  }
  .nx-stages button.on { background: var(--c); color: #fff; }
  /* Night stage colours are light pastels: dark ink reads, white does not. */
  html.ui-next[data-theme="dark"] .nx-stages button.on { color: #0b1220; }
  .nx-cols { display: block; overflow: visible; }
  .nx-col { display: none; max-height: none; background: transparent; border: none; }
  .nx-col.on { display: flex; }
  .nx-col-h { padding: 4px 2px 10px; border: none; }
  .nx-col-b { padding: 0; overflow: visible; }
  .nx-card { padding: 13px 14px; border-radius: 16px; }
  .nx-card .a { font-size: 15.5px; }
}

/* ---------- Drawer (job detail) ---------- */
#nx-drawer-wrap { position: fixed; inset: 0; z-index: 1200; display: none; }
#nx-drawer-wrap.open { display: block; }
#nx-drawer-wrap .nx-scrim { position: absolute; inset: 0; background: rgba(8, 12, 24, 0.32); animation: nxFade .2s; }
@keyframes nxFade { from { opacity: 0; } to { opacity: 1; } }
.nx-drawer {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(600px, 100vw);
  background: var(--nx-bg); box-shadow: var(--nx-shadow-lg); display: flex; flex-direction: column;
  animation: nxDrawIn .22s ease-out; font-family: var(--nx-body); color: var(--nx-ink);
}
@keyframes nxDrawIn { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
.nx-dr-head { background: var(--nx-card); border-bottom: 1px solid var(--nx-line); padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 10px; }
.nx-dr-top { display: flex; align-items: center; gap: 10px; }
.nx-dr-top .nx-logo-tile { width: 36px; height: 36px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--nx-line); }
.nx-dr-top .nx-logo-tile img { max-width: 30px; max-height: 30px; }
.nx-dr-x { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--nx-line); background: var(--nx-card); color: var(--nx-ink); cursor: pointer; font-size: 20px; line-height: 1; }
.nx-dr-title { font: 800 22px var(--nx-display); letter-spacing: -0.3px; line-height: 1.2; overflow-wrap: anywhere; }
.nx-dr-sub { font: 600 13px var(--nx-body); color: var(--nx-muted); display: flex; gap: 6px 12px; flex-wrap: wrap; }
.nx-dr-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-dr-body { flex: 1; overflow-y: auto; padding: 16px 18px 40px; display: flex; flex-direction: column; gap: 14px; }
.nx-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nx-fact { background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 13px; padding: 10px 12px; min-width: 0; }
.nx-fact .k { font: 800 10.5px var(--nx-body); color: var(--nx-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.nx-fact .v { font: 800 15px var(--nx-body); margin-top: 3px; overflow-wrap: anywhere; }
.nx-fact .v.money { font-family: var(--nx-display); color: var(--nx-s-rfs); font-variant-numeric: tabular-nums; }
.nx-sec-t { font: 800 12px var(--nx-body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--nx-muted); margin: 4px 2px -4px; }
.nx-tl { background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 14px; padding: 4px 14px; }
.nx-tl-row { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--nx-line); align-items: flex-start; }
.nx-tl-row:last-child { border-bottom: none; }
.nx-tl-dot { width: 11px; height: 11px; border-radius: 999px; background: var(--c); margin-top: 5px; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.nx-tl-main { flex: 1; min-width: 0; }
.nx-tl-main .l1 { font: 800 14px var(--nx-body); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nx-tl-main .l2 { font: 600 12.5px var(--nx-body); color: var(--nx-muted); margin-top: 2px; overflow-wrap: anywhere; }
.nx-classic-wrap { background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 16px; padding: 14px; }
.nx-classic-wrap > .pon-row { margin: 0 !important; box-shadow: none !important; border: none !important; padding: 0 !important; background: transparent !important; }
.nx-classic-wrap > .pon-row > .pon-head { cursor: default !important; padding-bottom: 4px; }
.nx-classic-wrap > .pon-row > .pon-head .job-id,
.nx-classic-wrap > .pon-row > .pon-head .chevron { display: none !important; }
.nx-classic-wrap > .pon-row > .pon-body { margin-top: 6px !important; }
@media (max-width: 900px) {
  .nx-drawer { width: 100vw; }
  .nx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-dr-title { font-size: 20px; }
}

/* ---------- Command palette ---------- */
#nx-pal-wrap { position: fixed; inset: 0; z-index: 1300; display: none; }
#nx-pal-wrap.open { display: block; }
#nx-pal-wrap .nx-scrim { position: absolute; inset: 0; background: rgba(8, 12, 24, 0.45); animation: nxFade .15s; }
.nx-pal {
  position: absolute; left: 50%; top: 14vh; transform: translateX(-50%); width: min(660px, calc(100vw - 24px));
  background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 18px; box-shadow: var(--nx-shadow-lg);
  overflow: hidden; font-family: var(--nx-body); color: var(--nx-ink);
  animation: nxPalIn .16s ease-out;
}
@keyframes nxPalIn { from { transform: translate(-50%, -8px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
/* Anchored under the header search bar (desktop). */
.nx-pal.at-bar { transform: none; animation: nxPalDrop .14s ease-out; border-radius: 14px; }
.nx-pal.at-bar .nx-pal-in { height: 48px; }
.nx-pal.at-bar .nx-pal-list { max-height: min(62vh, 620px); }
#nx-pal-wrap .nx-pal.at-bar ~ .nx-scrim, #nx-pal-wrap:has(.at-bar) .nx-scrim { background: rgba(8, 12, 24, 0.18); }
@keyframes nxPalDrop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.nx-pal-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--nx-line); }
.nx-pal-in .icon { width: 20px; height: 20px; color: var(--nx-muted); }
.nx-pal-in input { flex: 1; border: none; outline: none; background: transparent; color: var(--nx-ink); font: 600 17px var(--nx-body); padding: 0; margin: 0; }
.nx-pal-in kbd { font: 700 11px var(--nx-body); color: var(--nx-muted); border: 1px solid var(--nx-line-2); border-radius: 6px; padding: 1px 6px; }
.nx-pal-list { max-height: 56vh; overflow-y: auto; padding: 6px; }
.nx-pal-h { font: 800 10.5px var(--nx-body); color: var(--nx-muted); text-transform: uppercase; letter-spacing: 0.1em; padding: 10px 10px 4px; }
.nx-pal-it { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 11px; cursor: pointer; }
.nx-pal-it .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--nx-soft); display: flex; align-items: center; justify-content: center; flex: none; color: var(--nx-muted); }
.nx-pal-it .ic img { max-width: 26px; max-height: 26px; object-fit: contain; }
.nx-pal-it .ic .icon { width: 18px; height: 18px; }
.nx-pal-it .tx { min-width: 0; flex: 1; }
.nx-pal-it .tx b { display: block; font: 800 14px var(--nx-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-pal-it .tx span { display: block; font: 600 12px var(--nx-body); color: var(--nx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-pal-it .go { font: 700 11px var(--nx-body); color: var(--nx-muted); }
.nx-pal-it.on { background: color-mix(in srgb, var(--nx-accent) 13%, transparent); }
.nx-pal-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--nx-line); font: 600 11.5px var(--nx-body); color: var(--nx-muted); }
@media (max-width: 900px) { .nx-pal { top: 10px; } .nx-pal-foot { display: none; } }

/* ---------- My Day (engineer, map first) ---------- */
.nx-myday {
  display: grid; grid-template-columns: minmax(0, 1fr) 440px; height: calc(100vh - 64px);
  font-family: var(--nx-body); color: var(--nx-ink); background: var(--nx-bg);
}
.nx-md-map { position: relative; min-height: 0; background: var(--nx-soft-2); isolation: isolate; z-index: 0; }
.nx-md-map .nx-map { position: absolute; inset: 0; }
.nx-map .leaflet-tile-pane { filter: saturate(0.5) contrast(0.97) brightness(1.03); }
html.ui-next[data-theme="dark"] .nx-map .leaflet-tile-pane { filter: invert(0.92) hue-rotate(180deg) saturate(0.45) brightness(0.92) contrast(0.95); }
.nx-map .leaflet-control-attribution { font-size: 9px; }
.nx-map .leaflet-top.leaflet-left { top: auto; bottom: 18px; left: 6px; }
@media (max-width: 900px) { .nx-map .leaflet-top.leaflet-left { bottom: 40px; } }
.nx-md-hud {
  position: absolute; left: 14px; top: 14px; right: 14px; z-index: 500; display: flex; align-items: center; gap: 8px;
  pointer-events: none;
}
.nx-md-hud > * { pointer-events: auto; }
.nx-md-pill {
  height: 42px; padding: 0 14px 0 6px; border-radius: 14px; background: var(--nx-rail); color: #fff;
  display: inline-flex; align-items: center; gap: 9px; box-shadow: 0 8px 22px rgba(13, 18, 34, 0.35);
  font: 800 13px var(--nx-body); letter-spacing: 0.06em; text-transform: uppercase;
}
.nx-md-pill .nx-logo-tile { width: 32px; height: 32px; border-radius: 9px; box-shadow: none; }
.nx-md-pill .nx-logo-tile img { max-width: 28px; max-height: 28px; }
.nx-md-stat {
  height: 42px; padding: 0 12px; border-radius: 14px; background: var(--nx-card); color: var(--nx-ink);
  display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--nx-shadow); font: 800 13px var(--nx-body);
  border: 1px solid var(--nx-line);
}
.nx-md-stat i { width: 8px; height: 8px; border-radius: 999px; background: var(--c); }
.nx-md-side { min-height: 0; overflow-y: auto; border-left: 1px solid var(--nx-line); background: var(--nx-bg); padding: 16px 16px 30px; display: flex; flex-direction: column; gap: 12px; }
.nx-md-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; cursor: pointer; border: none; text-align: left;
  background: linear-gradient(120deg, #27326d, #1b6fa8); color: #fff; font-family: var(--nx-body);
}
.nx-md-banner .icon { width: 24px; height: 24px; flex: none; }
.nx-md-banner b { display: block; font-size: 14.5px; font-weight: 800; }
.nx-md-banner span { display: block; font-size: 12.5px; font-weight: 600; opacity: 0.85; }
.nx-md-banner .go { margin-left: auto; font-weight: 800; font-size: 20px; }
.nx-md-banner.preview { background: linear-gradient(120deg, #5a3aa8, #27326d); cursor: default; }
.nx-hero {
  background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 22px; padding: 16px 16px 14px;
  box-shadow: var(--nx-shadow); display: flex; flex-direction: column; gap: 12px;
}
.nx-hero .lab { display: flex; align-items: center; gap: 8px; font: 800 12px var(--nx-body); letter-spacing: 0.12em; color: var(--nx-s-today); text-transform: uppercase; }
.nx-hero .lab.late { color: var(--nx-s-late); }
.nx-hero .lab .cnt { margin-left: auto; letter-spacing: 0; text-transform: none; color: var(--nx-muted); font-weight: 700; font-size: 12.5px; }
.nx-hero h1 { margin: 0; font: 800 25px var(--nx-display); line-height: 1.12; letter-spacing: -0.4px; overflow-wrap: anywhere; }
.nx-hero .pc { font: 600 15px var(--nx-body); color: var(--nx-muted); margin-top: -6px; }
.nx-hero .kv { display: flex; gap: 8px; flex-wrap: wrap; }
.nx-hero .kv span { background: var(--nx-soft); border-radius: 10px; padding: 7px 10px; font: 600 13px var(--nx-body); color: var(--nx-ink-2); }
.nx-hero .kv span b { color: var(--nx-ink); font-weight: 800; }
.nx-hero .ins { background: color-mix(in srgb, var(--nx-s-await) 13%, transparent); border-left: 4px solid var(--nx-s-await); border-radius: 10px; padding: 9px 12px; font: 600 13.5px var(--nx-body); white-space: pre-wrap; }
.nx-hero .ins b { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nx-s-await); margin-bottom: 2px; }
.nx-hero .go2 { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.nx-hero .go2 .nx-btn { height: 58px; border-radius: 16px; font-size: 15px; letter-spacing: 0.02em; }
.nx-hero .nx-btn.nav { border: 2px solid var(--nx-ink); }
.nx-hero .go3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nx-hero .go3 a, .nx-hero .go3 button {
  height: 54px; border-radius: 14px; border: 1px solid var(--nx-line); background: var(--nx-soft); color: var(--nx-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
  font: 700 12px var(--nx-body); text-decoration: none;
}
.nx-hero .go3 .icon { width: 18px; height: 18px; }
.nx-md-sec { font: 800 11.5px var(--nx-body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--nx-muted); margin: 6px 4px -4px; display: flex; align-items: center; gap: 8px; }
.nx-md-sec b { margin-left: auto; color: var(--nx-ink-2); }
.nx-stop {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 16px; background: var(--nx-card);
  border: 1px solid var(--nx-line); cursor: pointer; text-align: left; width: 100%; font-family: var(--nx-body); color: var(--nx-ink);
}
.nx-stop:hover { border-color: var(--nx-line-2); }
.nx-stop .n {
  width: 34px; height: 34px; border-radius: 999px; background: var(--c, var(--nx-s-today)); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; font: 800 14px var(--nx-body);
}
.nx-stop .n .icon { width: 17px; height: 17px; }
.nx-stop .tx { min-width: 0; flex: 1; }
.nx-stop .tx b { display: block; font-size: 14.5px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.nx-stop .tx span { display: block; font-size: 12.5px; font-weight: 600; color: var(--nx-muted); margin-top: 2px; overflow-wrap: anywhere; }
.nx-stop .chev { color: var(--nx-muted); flex: none; }
.nx-stop .tx em.late { font-style: normal; font-weight: 800; color: var(--nx-s-late); }
.nx-stop.done { opacity: 0.72; }
.nx-md-empty { text-align: center; padding: 26px 16px; background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 20px; }
.nx-md-empty .big { width: 56px; height: 56px; border-radius: 999px; margin: 0 auto 10px; background: color-mix(in srgb, var(--nx-s-rfs) 15%, transparent); color: var(--nx-s-rfs); display: flex; align-items: center; justify-content: center; }
.nx-md-empty .big .icon { width: 28px; height: 28px; }
.nx-md-empty h3 { margin: 0 0 4px; font: 800 18px var(--nx-display); }
.nx-md-empty p { margin: 0; font: 600 13px var(--nx-body); color: var(--nx-muted); }
.nx-md-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.nx-md-foot .nx-btn { flex: 1; min-width: 140px; }
.nx-pin {
  width: 30px; height: 30px; border-radius: 999px; color: #fff; border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center; font: 800 13px 'Montserrat', sans-serif;
  box-shadow: 0 3px 10px rgba(13, 18, 34, 0.4);
}
.nx-pin.next { width: 40px; height: 40px; font-size: 15px; box-shadow: 0 0 0 6px rgba(18, 167, 214, 0.25), 0 4px 14px rgba(13, 18, 34, 0.45); }
.leaflet-div-icon.nx-pin-wrap { background: transparent; border: none; }
@media (max-width: 900px) {
  .nx-myday { display: block; height: auto; }
  .nx-md-map { height: 42vh; min-height: 260px; position: sticky; top: 58px; z-index: 0; }
  .nx-md-side {
    position: relative; z-index: 2; margin-top: -26px; border-left: none; border-radius: 26px 26px 0 0;
    box-shadow: 0 -12px 30px rgba(13, 18, 34, 0.14); padding: 8px 14px 24px; overflow: visible; background: var(--nx-bg);
  }
  .nx-md-side::before { content: ''; display: block; width: 42px; height: 5px; border-radius: 999px; background: var(--nx-line-2); margin: 0 auto 6px; }
  .nx-hero h1 { font-size: 24px; }
  .nx-md-hud { left: 10px; right: 10px; top: 10px; }
  .nx-md-stat.hide-sm { display: none; }
}

/* ---------- Single job view (engineer) ---------- */
.nx-jobbar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.nx-jobbar .nx-btn { height: 40px; }
.nx-jobbar .t { font: 800 15px var(--nx-body); color: var(--nx-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Engineer picker (preview) ---------- */
.nx-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; padding: 8px 4px; }
.nx-pick button {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 13px; border: 1px solid var(--nx-line);
  background: var(--nx-card); color: var(--nx-ink); font: 700 13.5px var(--nx-body); cursor: pointer; text-align: left;
}
.nx-pick button:hover { border-color: var(--nx-accent); }
.nx-pick button small { display: block; font-size: 11.5px; color: var(--nx-muted); font-weight: 600; }

/* Classic "Try the new look" button (admins only, classic mode). */
.nx-try {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  margin-top: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(25, 191, 239, 0.45); background: rgba(25, 191, 239, 0.1); color: #bfeeff;
  font: 700 12.5px 'Montserrat', sans-serif;
}
.nx-try:hover { background: rgba(25, 191, 239, 0.18); }

/* ---------- Reset: classic's global <button> look (gradient, glow on hover,
   brightness filter, 10px 18px padding) must not leak into the new parts.
   Kept at the end so it wins ties; the two components that DO want a shadow
   (.nx-rail-brand, .nx-card) are deliberately not in the base list. ---------- */
.nx-ri, .nx-rail-me, .nx-rail-classic, .nx-fly-item, .nx-tab, .nx-more-tile, .nx-more-foot button,
.nx-cust button, .nx-seg button, .nx-stages button, .nx-more-link, .nx-col-sub, .nx-dr-x, .nx-btn,
.nx-stop, .nx-hero .go3 button, .nx-pick button, .nx-find, .nx-md-banner { box-shadow: none; }
.nx-tab, .nx-dr-x, .nx-hero .go3 button, .nx-more-foot button, .nx-rail-me { padding: 0; }
.nx-ri:hover, .nx-rail-me:hover, .nx-rail-classic:hover, .nx-fly-item:hover, .nx-tab:hover, .nx-more-tile:hover,
.nx-more-foot button:hover, .nx-cust button:hover, .nx-seg button:hover, .nx-stages button:hover, .nx-more-link:hover,
.nx-col-sub:hover, .nx-dr-x:hover, .nx-btn:hover, .nx-stop:hover, .nx-hero .go3 button:hover, .nx-pick button:hover,
.nx-find:hover, .nx-md-banner:hover { filter: none; box-shadow: none; }
.nx-card:hover { filter: none; }
.nx-rail-brand:hover { filter: none; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35); }

/* =====================================================================
   NOVA SHELL (v1.0.201) — the finalised design ("Nova", Day + Night).
   Appended last so it overrides the v1.0.197 shell on equal specificity.
   ===================================================================== */
html.ui-next body, html.ui-next .main-area { font-family: var(--nx-body); background: var(--nx-bg); color: var(--nx-ink); }
html.ui-next[data-theme="dark"] body { background: var(--nx-bg); }

/* Rail: 64px, icons only (names on hover / screen readers), lit tile for the page. */
html.ui-next #nx-rail {
  background: var(--nx-rail); border-right: 1px solid var(--nx-rail-line);
  padding: 14px 0 16px; gap: 0;
}
html.ui-next[data-theme="dark"] #nx-rail { background: rgba(255, 255, 255, 0.03); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
html.ui-next .nx-rail-brand {
  width: 42px; height: 42px; border-radius: 12px; background: #fff; margin-bottom: 12px;
  box-shadow: none; border: 1px solid var(--nx-line);
}
html.ui-next[data-theme="dark"] .nx-rail-brand { border-color: transparent; }
html.ui-next .nx-rail-brand img { width: 32px; height: 32px; }
html.ui-next .nx-rail-brand:hover { box-shadow: none; }
html.ui-next .nx-rail-scroll { gap: 8px; }
html.ui-next .nx-rail-sep { width: 28px; background: var(--nx-rail-line); margin: 4px 0; }
html.ui-next .nx-ri {
  width: 40px; min-height: 40px; height: 40px; border-radius: 12px; padding: 0; gap: 0;
  color: var(--nx-rail-ink); border: 1px solid transparent;
}
html.ui-next .nx-ri .icon { width: 18px; height: 18px; stroke-width: 1.8; }
html.ui-next .nx-ri span.nx-ri-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.ui-next .nx-ri:hover { background: var(--nx-soft); color: var(--nx-ink); }
html.ui-next .nx-ri.active { background: var(--nx-tint); border-color: var(--nx-tint-line); color: var(--nx-accent); }
html.ui-next .nx-ri.active::before { display: none; }
html.ui-next .nx-ri .ws-nav-badge { top: -4px; right: -6px; background: var(--nx-bad); box-shadow: 0 0 0 2px var(--nx-bg); }
html.ui-next .nx-ri.nx-brand { width: 44px; height: 44px; }
html.ui-next .nx-ri.nx-brand .nx-logo-tile { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 0 0 1px var(--nx-line); }
html.ui-next .nx-ri.nx-brand .nx-logo-tile img { max-width: 29px; max-height: 29px; }
html.ui-next .nx-ri.nx-brand.active { background: transparent; border-color: transparent; }
html.ui-next .nx-ri.nx-brand.active .nx-logo-tile { box-shadow: 0 0 0 2px var(--nx-accent), 0 0 12px color-mix(in srgb, var(--nx-accent) 45%, transparent); }
html.ui-next .nx-flame { width: 16px; height: 16px; right: -4px; bottom: -4px; background: #f28a1e; }
html.ui-next .nx-flame svg { width: 10px; height: 10px; }
html.ui-next .nx-rail-classic {
  font: 600 9px var(--nx-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--nx-rail-ink); border-color: var(--nx-rail-line); border-radius: 8px; padding: 4px 5px;
}
html.ui-next .nx-rail-me {
  width: 34px; height: 34px; border: none; background: var(--nx-tint); color: var(--nx-accent);
  font: 700 12px var(--nx-body);
}

/* Header: page title in Space Grotesk, mono trail, search pill, bell. */
html.ui-next .topbar {
  background: color-mix(in srgb, var(--nx-bg) 86%, transparent);
  border-bottom: 1px solid var(--nx-line); height: 62px; padding: 0 24px;
}
html.ui-next .nx-crumb { gap: 12px; }
html.ui-next .nx-crumb-logo { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px var(--nx-line); }
html.ui-next .nx-crumb-title { font: 600 20px var(--nx-display); letter-spacing: -0.01em; color: var(--nx-ink); }
html.ui-next .nx-crumb-trail {
  font: 500 10px var(--nx-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nx-muted);
}
html.ui-next .nx-find {
  height: 36px; min-width: 280px; border-radius: 10px; padding: 0 10px 0 12px;
  background: var(--nx-card); border: 1px solid var(--nx-line); color: var(--nx-muted);
  font: 500 12px var(--nx-body);
}
html.ui-next .nx-find:hover { background: var(--nx-card); border-color: var(--nx-line-2); color: var(--nx-ink-2); }
html.ui-next .nx-find .icon { width: 14px; height: 14px; stroke-width: 1.8; }
html.ui-next .nx-find kbd {
  font: 500 9.5px var(--nx-mono); color: var(--nx-ink-2); background: transparent;
  border: 1px solid var(--nx-line-2); border-bottom-width: 1px; border-radius: 5px; padding: 1px 5px;
}
html.ui-next .nx-bell {
  position: relative; width: 36px; height: 36px; border-radius: 10px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--nx-card); border: 1px solid var(--nx-line); color: var(--nx-ink-2); cursor: pointer; box-shadow: none;
}
html.ui-next .nx-bell:hover { filter: none; box-shadow: none; border-color: var(--nx-line-2); color: var(--nx-ink); }
html.ui-next .nx-bell .icon { width: 16px; height: 16px; stroke-width: 1.8; }
html.ui-next .nx-bell .ws-nav-badge {
  position: absolute; top: -5px; right: -5px; margin: 0; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--nx-bad); color: var(--nx-bg); font: 800 9px/16px var(--nx-body); text-align: center;
}
html.ui-next .who-area .icon-btn {
  width: 36px; height: 36px; border-radius: 10px; background: var(--nx-card); border: 1px solid var(--nx-line);
  color: var(--nx-ink-2); box-shadow: none;
}
html.ui-next .who-area .avatar { background: var(--nx-tint); color: var(--nx-accent); border: none; }
html.ui-next .who-area .money-toggle[aria-pressed="true"] {
  background: var(--nx-tint); color: var(--nx-accent); border-color: var(--nx-accent);
}
/* Phones: an admin's header holds one more button (Hide amounts), so it packs
   tighter, and a long title gives way with an ellipsis instead of running
   under the search button. */
@media (max-width: 900px) {
  html.ui-next .topbar:has(#money-btn) { gap: 6px; }
  html.ui-next .topbar:has(#money-btn) .nx-crumb { gap: 8px; }
  html.ui-next .topbar:has(#money-btn) .who-area { gap: 4px; }
  html.ui-next .topbar .nx-crumb > .nx-crumb-title { flex: 0 1 auto; min-width: 0; }
}
@media (max-width: 420px) {
  html.ui-next .topbar:has(#money-btn) .nx-find,
  html.ui-next .topbar:has(#money-btn) .nx-bell,
  html.ui-next .topbar:has(#money-btn) .who-area .icon-btn,
  html.ui-next .topbar:has(#money-btn) .who-area .avatar { width: 34px; height: 34px; }
}
/* Phones: a long screen title ("Departments & holidays") wraps onto a
   second, smaller line instead of being cut off under the header buttons. */
@media (max-width: 600px) {
  html.ui-next .nx-crumb-title.nx-long {
    font-size: 16px; line-height: 1.12; letter-spacing: -0.01em;
    white-space: normal; text-overflow: clip; hyphens: auto;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    overflow: hidden;
  }
}
html.ui-next .who-name { font-family: var(--nx-body); }
html.ui-next .who-role { font: 500 9.5px var(--nx-mono); letter-spacing: 0.12em; }

/* Surfaces that float over other content must be opaque. */
html.ui-next .nx-fly, html.ui-next .nx-pal, html.ui-next .nx-md-stat,
html.ui-next .nx-dr-head { background: var(--nx-surface); }
html.ui-next .nx-drawer { background: var(--nx-bg); border-left: 1px solid var(--nx-line); }
html.ui-next[data-theme="dark"] .nx-drawer { background: #0a0f18; }
@media (max-width: 900px) {
  html.ui-next #nx-tabbar { background: color-mix(in srgb, var(--nx-surface) 94%, transparent); border-top-color: var(--nx-line); }
}

/* Buttons, chips, type. */
html.ui-next .nx-btn { border-radius: 10px; border-color: var(--nx-line-2); background: var(--nx-card); color: var(--nx-ink); font: 700 13px var(--nx-body); }
html.ui-next .nx-btn:hover { background: var(--nx-soft); }
html.ui-next .nx-btn.primary, html.ui-next .nx-btn.accent,
html.ui-next[data-theme="dark"] .nx-btn.primary {
  background: var(--nx-primary); border-color: var(--nx-primary); color: var(--nx-primary-ink); font-weight: 800;
}
html.ui-next .nx-btn.primary:hover { background: var(--nx-primary); filter: brightness(1.06); }
html.ui-next .nx-chip { border-radius: 6px; font: 700 10px var(--nx-body); height: 21px; padding: 0 7px; }
html.ui-next .nx-chip.h250, html.ui-next .nx-chip.hsv, html.ui-next .nx-chip.hmdu {
  background: var(--nx-tint); color: var(--nx-accent); font: 500 9px var(--nx-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
html.ui-next .nx-chip.pon, html.ui-next .nx-chip.fire {
  background: var(--nx-mark-bg); color: var(--nx-mark-ink); font: 500 9px var(--nx-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
html.ui-next .nx-chip.late { background: color-mix(in srgb, var(--nx-bad) 14%, transparent); color: var(--nx-bad); }
html.ui-next .nx-chip.today { background: var(--nx-tint); color: var(--nx-accent); }
html.ui-next .nx-chip.ok { background: color-mix(in srgb, var(--nx-ok) 14%, transparent); color: var(--nx-ok); }
html.ui-next .nx-chip.warn { background: color-mix(in srgb, var(--nx-warn) 14%, transparent); color: var(--nx-warn); }
html.ui-next .nx-chip.hold { background: var(--nx-mark-bg); color: var(--nx-mark-ink); }
html.ui-next .nx-av { background: var(--nx-soft-2) !important; color: var(--nx-ink-2); font: 700 8.5px var(--nx-body); }

/* Flyout / sheet / palette in Nova. */
html.ui-next .nx-fly-title { font: 600 18px var(--nx-display); }
html.ui-next .nx-fly-sub, html.ui-next .nx-fly-sec-h, html.ui-next .nx-pal-h {
  font: 500 10px var(--nx-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--nx-muted);
}
html.ui-next .nx-fly-sub { text-transform: none; letter-spacing: 0.02em; font-size: 11px; }
html.ui-next .nx-fly-item { font: 600 13.5px var(--nx-body); border-radius: 10px; }
html.ui-next .nx-fly-item.active { background: var(--nx-tint); color: var(--nx-accent); }
html.ui-next .nx-fly-item.active .icon { color: var(--nx-accent); }
html.ui-next .nx-pal { border-radius: 16px; border-color: var(--nx-line-2); }
html.ui-next .nx-pal-in input { font: 500 16px var(--nx-body); }
html.ui-next .nx-pal-in kbd, html.ui-next .nx-pal-foot { font-family: var(--nx-mono); }
html.ui-next .nx-pal-it.on { background: var(--nx-tint); }
html.ui-next .nx-pal-it .ic { background: var(--nx-soft-2); }
html.ui-next .nx-more-tile { background: var(--nx-card); border-color: var(--nx-line); font: 600 12px var(--nx-body); }
html.ui-next .nx-more-tile.active { border-color: var(--nx-tint-line); background: var(--nx-tint); }

/* Classic screens inside the new look: Nova cards and inputs. */
html.ui-next .card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--nx-shadow); }
html.ui-next[data-theme="dark"] .card { background: var(--nx-card); border-color: var(--nx-line); box-shadow: none; }
html.ui-next h1, html.ui-next h2, html.ui-next h3 { font-family: var(--nx-display); font-weight: 600; }
html.ui-next input, html.ui-next select, html.ui-next textarea { font-family: var(--nx-body); }
html.ui-next[data-theme="dark"] input:not([type=checkbox]):not([type=radio]),
html.ui-next[data-theme="dark"] select, html.ui-next[data-theme="dark"] textarea {
  background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.10); color: var(--nx-ink);
}

/* =====================================================================
   NOVA SCHEDULE BOARD (v1.0.202) — the Nova-Sched Night / Day artboards.
   ===================================================================== */
/* Header: title · LIVE · mono date, then + New pack beside the bell. */
html.ui-next .nx-crumb-date {
  font: 500 12px var(--nx-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--nx-muted); white-space: nowrap;
  min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
html.ui-next .nx-crumb > .nx-crumb-title { flex: none; }
html.ui-next .nx-live {
  display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 3px 11px; border-radius: 14px;
  background: color-mix(in srgb, var(--nx-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--nx-accent) 30%, transparent);
  font: 600 10px var(--nx-mono); letter-spacing: 0.14em; color: var(--nx-accent);
}
html.ui-next .nx-live i {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 8px color-mix(in srgb, currentColor 80%, transparent); animation: nxLive 2.4s ease-in-out infinite;
}
html.ui-next .nx-live.off { color: var(--nx-muted); background: var(--nx-soft); border-color: var(--nx-line); }
html.ui-next .nx-live.off i { animation: none; box-shadow: none; }
@keyframes nxLive { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { html.ui-next .nx-live i { animation: none; } }
html.ui-next .nx-newpack {
  height: 36px; padding: 0 14px; border-radius: 10px; border: none; flex: none; white-space: nowrap; cursor: pointer;
  background: var(--nx-primary); color: var(--nx-primary-ink); font: 700 13px var(--nx-body); box-shadow: none;
}
html.ui-next .nx-newpack:hover { filter: brightness(1.06); box-shadow: none; }
html.ui-next .nx-newpack[hidden] { display: none !important; }
@media (max-width: 900px) {
  html.ui-next .nx-newpack, html.ui-next .nx-crumb .nx-live, html.ui-next .nx-crumb .nx-crumb-date { display: none; }
}

/* Filter row: customer pills | project pills ........ filter · Engineer view */
html.ui-next .nx-bhead { gap: 8px; margin-bottom: 14px; }
html.ui-next .nx-pills { display: inline-flex; gap: 8px; flex-wrap: wrap; }
html.ui-next .nx-pills button {
  height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--nx-line); background: var(--nx-card);
  color: var(--nx-ink-2); font: 600 12.5px var(--nx-body); cursor: pointer; box-shadow: none;
}
html.ui-next .nx-pills.sm button { height: 29px; padding: 0 13px; font-size: 12px; }
html.ui-next .nx-pills button:hover { filter: none; box-shadow: none; border-color: var(--nx-line-2); color: var(--nx-ink); }
html.ui-next .nx-pills button.on { background: var(--nx-tint); border-color: var(--nx-tint-line); color: var(--nx-accent); font-weight: 700; }
html.ui-next .nx-pill-sep { width: 1px; height: 22px; background: var(--nx-line-2); margin: 0 4px; }
html.ui-next .nx-bsearch { height: 34px; border-radius: 10px; background: var(--nx-card); border-color: var(--nx-line); padding: 0 12px; }
html.ui-next .nx-bsearch input { font: 500 12px var(--nx-body); width: 150px; }
html.ui-next .nx-bsearch .icon { width: 14px; height: 14px; }
html.ui-next .nx-bhead .nx-btn.small { height: 34px; border-radius: 10px; font: 700 12px var(--nx-body); border-color: var(--nx-line); }

/* Money strip: dot + mono label, Space Grotesk figure. */
html.ui-next .nx-money { gap: 14px; margin-bottom: 16px; }
html.ui-next .nx-mtile {
  border-radius: 14px; padding: 12px 16px; gap: 3px; background: var(--nx-card); border: 1px solid var(--nx-line); box-shadow: none;
}
html.ui-next .nx-mtile::after { display: none; }
html.ui-next .nx-mtile[role="button"]:hover { border-color: var(--nx-line-2); }
html.ui-next .nx-mtile .k {
  display: flex; align-items: center; gap: 6px; font: 500 10px var(--nx-mono); letter-spacing: 0.14em; color: var(--nx-muted);
}
html.ui-next .nx-mtile .k i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
html.ui-next .nx-mtile .v { font: 600 23px var(--nx-display); line-height: 1.1; letter-spacing: 0; }
html.ui-next .nx-mtile .s { font: 500 11.5px var(--nx-body); color: var(--nx-ink-2); }

/* Columns: no panel behind them; the cards float on the page. */
html.ui-next .nx-col-strip { display: none; }
html.ui-next .nx-col-h { padding: 0 2px 10px; border: none; gap: 1px; }
html.ui-next .nx-col-h .t { font: 700 13px var(--nx-body); gap: 7px; }
html.ui-next .nx-col-h .t i { width: 8px; height: 8px; }
html.ui-next .nx-col-h .t b { background: none; border: none; padding: 0; font: 500 10.5px var(--nx-mono); color: var(--nx-muted); }
html.ui-next .nx-col-h .h { font: 500 10.5px var(--nx-body); color: var(--nx-muted); padding-left: 15px; }
html.ui-next .nx-col-h .h.money { color: var(--c); font-weight: 700; }
@media (min-width: 901px) {
  html.ui-next .nx-cols { display: flex; gap: 12px; align-items: stretch; overflow-x: auto; padding-bottom: 8px; }
  html.ui-next .nx-col {
    flex: 1 0 220px; min-width: 0; background: transparent; border: none; border-radius: 0;
    min-height: 0; max-height: calc(100vh - 262px);
  }
  html.ui-next .nx-col-b { padding: 2px 2px 6px; gap: 10px; }
  /* An empty column folds into a 40px labelled strip. */
  html.ui-next .nx-col.empty {
    flex: 0 0 40px; min-height: 220px; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--nx-card) 70%, transparent); border: 1px solid var(--nx-line); border-radius: 12px;
  }
  html.ui-next .nx-col.empty > .nx-col-h, html.ui-next .nx-col.empty > .nx-col-b { display: none; }
  html.ui-next .nx-col.empty > .nx-col-strip {
    display: block; writing-mode: vertical-rl; white-space: nowrap;
    font: 500 10px var(--nx-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--nx-muted);
  }
}

/* Cards. */
html.ui-next .nx-card { border-radius: 12px; padding: 11px 12px; gap: 6px; background: var(--nx-card); border-color: var(--nx-line); box-shadow: none; }
html.ui-next[data-theme="dark"] .nx-card { background: rgba(255, 255, 255, 0.05); }
html.ui-next .nx-card:hover { transform: none; box-shadow: none; border-color: var(--nx-line-2); }
html.ui-next .nx-card.today { border-color: var(--nx-tint-line); }
html.ui-next .nx-card.sel { border-color: var(--nx-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--nx-accent) 30%, transparent); }
html.ui-next .nx-card .r1 .nx-chip { height: 19px; }
html.ui-next .nx-card .r1 .d { font: 500 9.5px var(--nx-mono); letter-spacing: 0.02em; text-transform: uppercase; color: var(--nx-muted); }
html.ui-next .nx-card .r1 .d.late { color: var(--nx-bad); }
html.ui-next .nx-card .r1 .d.now { color: var(--nx-accent); }
html.ui-next .nx-card .a { font: 700 12.5px var(--nx-body); }
html.ui-next .nx-card .p { font: 500 9.5px var(--nx-mono); letter-spacing: 0.02em; text-transform: uppercase; color: var(--nx-ink-2); }
html.ui-next .nx-card .tags .nx-chip { height: 19px; }
html.ui-next .nx-card .r3 { font: 500 11px var(--nx-body); color: var(--nx-ink-2); }
html.ui-next .nx-card .r3 .nx-av { width: 20px; height: 20px; }
html.ui-next .nx-card .r3 .val { font: 700 12px var(--nx-body); color: var(--nx-ink); }
html.ui-next .nx-card.week { gap: 5px; }
html.ui-next .nx-card.week .wk { font: 700 12px var(--nx-body); color: var(--nx-ink-2); }
html.ui-next .nx-card.week .amt { font: 600 19px var(--nx-display); line-height: 1; letter-spacing: 0; }
html.ui-next .nx-card.week .p { font: 500 10.5px var(--nx-body); text-transform: none; letter-spacing: 0; color: var(--nx-muted); }
html.ui-next .nx-more-link { text-align: left; padding: 2px; color: var(--nx-accent); font: 700 11.5px var(--nx-body); }
html.ui-next .nx-more-link:hover { color: var(--nx-accent); text-decoration: underline; }
html.ui-next .nx-chip.hsv { background: var(--nx-mark-bg); color: var(--nx-mark-ink); }

/* Phone: bigger tap targets, full-width filter. */
@media (max-width: 900px) {
  /* The v1.0.201 shell rule above out-ranked the phone one: search is an icon here. */
  html.ui-next .nx-find { min-width: 0; width: 36px; padding: 0; justify-content: center; flex: none; }
  html.ui-next .nx-pill-sep { display: none; }
  html.ui-next .nx-bsearch { width: 100%; }
  html.ui-next .nx-bsearch input { width: 100%; }
  html.ui-next .nx-money { gap: 8px; }
  html.ui-next .nx-mtile { padding: 11px 12px; }
  html.ui-next .nx-mtile .v { font-size: 20px; }
  html.ui-next .nx-col-h { padding: 4px 2px 10px; }
  html.ui-next .nx-col-b { gap: 8px; }
  html.ui-next .nx-card { padding: 13px 14px; border-radius: 14px; }
  html.ui-next .nx-card .a { font-size: 15px; }
  html.ui-next .nx-card .p { font-size: 10.5px; }
  html.ui-next .nx-card .r3 { font-size: 12px; }
}

/* =====================================================================
   NOVA MY DAY (v1.0.203) — the O3-Mobile (Night) / Nova-Day-Cyan-Mobile
   artboards. A scrolling home; the map is its own tab on a phone and a
   side panel on desktop.
   ===================================================================== */
html.ui-next .nx-myday {
  display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 22px; align-items: start;
  height: auto; background: transparent;
}
html.ui-next .nx-md-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
html.ui-next .nx-md-mapcol {
  position: sticky; top: 80px; height: calc(100vh - 110px); min-height: 360px; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--nx-line); background: var(--nx-soft-2); isolation: isolate;
}
html.ui-next .nx-md-mapcol .nx-map { position: absolute; inset: 0; }

/* Progress hero. */
html.ui-next .nx-md-progress {
  display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 20px;
  background: var(--nx-card); border: 1px solid var(--nx-line);
}
html.ui-next .nx-ring { position: relative; width: 108px; height: 108px; flex: none; }
html.ui-next .nx-ring svg { width: 108px; height: 108px; display: block; }
html.ui-next .nx-ring circle { fill: none; stroke-width: 9; }
html.ui-next .nx-ring .trk { stroke: var(--nx-track); }
html.ui-next .nx-ring .val { stroke: var(--nx-accent); stroke-linecap: round; transition: stroke-dasharray .6s ease; }
html.ui-next .nx-ring .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
html.ui-next .nx-ring .in b { font: 600 25px var(--nx-display); line-height: 1; color: var(--nx-ink); }
html.ui-next .nx-ring .in small { font-size: 15px; font-weight: 600; color: var(--nx-muted); }
html.ui-next .nx-ring .in span { font: 500 10px var(--nx-body); color: var(--nx-muted); margin-top: 3px; }
html.ui-next .nx-md-progress .tx { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
html.ui-next .nx-md-progress .tx > b { font: 700 14px var(--nx-body); color: var(--nx-ink); }
html.ui-next .nx-md-streak, html.ui-next .nx-md-late {
  display: flex; align-items: center; gap: 6px; font: 600 12px var(--nx-body); color: var(--nx-warn);
}
html.ui-next .nx-md-late { color: var(--nx-bad); }
html.ui-next .nx-md-streak[hidden] { display: none !important; }
html.ui-next .nx-md-streak .icon, html.ui-next .nx-md-late .icon { width: 13px; height: 13px; }
html.ui-next .nx-md-sync {
  display: flex; align-items: center; gap: 6px; font: 500 10px var(--nx-mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--nx-ok); min-height: 13px;
}
html.ui-next .nx-md-sync.wait { color: var(--nx-warn); }
html.ui-next .nx-md-sync .icon { width: 11px; height: 11px; stroke-width: 2.6; }

/* Day banner (start of day / vehicle check) and the office preview strip. */
html.ui-next .nx-md-alert {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; cursor: pointer;
  background: var(--nx-tint); border: 1px solid var(--nx-tint-line); color: var(--nx-ink);
}
html.ui-next .nx-md-alert .ic {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--nx-accent) 16%, transparent); color: var(--nx-accent);
}
html.ui-next .nx-md-alert .ic .icon { width: 18px; height: 18px; }
html.ui-next .nx-md-alert > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
html.ui-next .nx-md-alert > div b { font: 700 13.5px var(--nx-body); }
html.ui-next .nx-md-alert > div span { font: 500 11.5px var(--nx-body); color: var(--nx-ink-2); }
html.ui-next .nx-md-alert .go, html.ui-next .nx-md-alert .go:hover {
  flex: none; border: none; border-radius: 10px; padding: 9px 15px; cursor: pointer; box-shadow: none; filter: none;
  background: var(--nx-primary); color: var(--nx-primary-ink); font: 800 12.5px var(--nx-body);
}
html.ui-next .nx-md-alert.warn {
  background: color-mix(in srgb, var(--nx-warn) 8%, transparent); border-color: color-mix(in srgb, var(--nx-warn) 32%, transparent);
}
html.ui-next .nx-md-alert.warn .ic { background: color-mix(in srgb, var(--nx-warn) 15%, transparent); color: var(--nx-warn); }
html.ui-next .nx-md-alert.warn .go, html.ui-next .nx-md-alert.warn .go:hover { background: var(--nx-warn); color: var(--nx-bg); }
html.ui-next .nx-md-alert.preview {
  cursor: default; background: var(--nx-mark-bg); border-color: color-mix(in srgb, var(--nx-mark-ink) 30%, transparent);
}
html.ui-next .nx-md-alert.preview > .icon { width: 22px; height: 22px; flex: none; color: var(--nx-mark-ink); }

/* Section labels. */
html.ui-next .nx-md-h {
  display: flex; align-items: center; margin: 4px 2px -6px;
  font: 500 10px var(--nx-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--nx-muted);
}
html.ui-next .nx-md-h span { margin-left: auto; letter-spacing: 0.08em; }

/* Next job. */
html.ui-next .nx-md-next {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px;
  background: var(--nx-card); border: 1px solid var(--nx-tint-line);
}
html.ui-next[data-theme="dark"] .nx-md-next { background: rgba(255, 255, 255, 0.05); border-color: rgba(63, 216, 238, 0.22); }
html.ui-next .nx-md-next.late, html.ui-next[data-theme="dark"] .nx-md-next.late { border-color: color-mix(in srgb, var(--nx-bad) 35%, transparent); }
html.ui-next .nx-md-next .chips { display: flex; gap: 6px; flex-wrap: wrap; }
html.ui-next .nx-md-next .chips .nx-chip { height: 22px; font: 600 9.5px var(--nx-mono); letter-spacing: 0.08em; text-transform: uppercase; }
html.ui-next .nx-chip.thp { background: var(--nx-mark-bg); color: var(--nx-mark-ink); }
html.ui-next .nx-md-next h2 { margin: 0; font: 600 19px var(--nx-display); line-height: 1.2; color: var(--nx-ink); overflow-wrap: anywhere; }
html.ui-next .nx-md-next .pc { margin-top: -6px; font: 500 13px var(--nx-body); color: var(--nx-ink-2); }
html.ui-next .nx-md-next .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; }
html.ui-next .nx-md-next .meta span { display: inline-flex; align-items: center; gap: 5px; font: 600 11.5px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-md-next .meta span.k { font: 500 10.5px var(--nx-mono); letter-spacing: 0.04em; color: var(--nx-ink-2); }
html.ui-next .nx-md-next .meta .icon { width: 13px; height: 13px; }
html.ui-next .nx-md-next .who { font: 500 12.5px var(--nx-body); color: var(--nx-ink-2); }
html.ui-next .nx-md-next .who b { color: var(--nx-ink); }
html.ui-next .nx-md-next .ins {
  background: color-mix(in srgb, var(--nx-warn) 10%, transparent); border-left: 3px solid var(--nx-warn); border-radius: 10px;
  padding: 9px 12px; font: 500 13px var(--nx-body); white-space: pre-wrap; color: var(--nx-ink);
}
html.ui-next .nx-md-next .ins b { display: block; font: 500 9.5px var(--nx-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--nx-warn); margin-bottom: 2px; }
html.ui-next .nx-md-next .go { display: flex; gap: 10px; margin-top: 2px; }
html.ui-next .nx-md-next .go .nx-btn { height: 48px; border-radius: 12px; font-size: 14px; }
html.ui-next .nx-md-next .go .nx-btn.primary { flex: 1; }
html.ui-next .nx-md-next .go a.nx-btn { background: transparent; border: 1px solid var(--nx-line-2); font-weight: 700; }
html.ui-next .nx-md-next .go a.nx-btn .icon { width: 15px; height: 15px; }
html.ui-next .nx-md-next .calls { display: flex; gap: 18px; }
html.ui-next .nx-md-next .calls a { display: inline-flex; align-items: center; gap: 6px; font: 700 12.5px var(--nx-body); color: var(--nx-accent); text-decoration: none; }
html.ui-next .nx-md-next .calls .icon { width: 14px; height: 14px; }

/* The rest of the list. */
html.ui-next .nx-md-rows { display: flex; flex-direction: column; gap: 8px; }
html.ui-next .nx-md-row, html.ui-next .nx-md-row:hover {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px;
  background: var(--nx-card); border: 1px solid var(--nx-line); color: var(--nx-ink); cursor: pointer;
  box-shadow: none; filter: none; font-family: var(--nx-body);
}
html.ui-next .nx-md-row:hover { border-color: var(--nx-line-2); }
html.ui-next .nx-md-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
html.ui-next .nx-md-row .tx b { font: 700 13.5px var(--nx-body); overflow-wrap: anywhere; }
html.ui-next .nx-md-row .tx > span { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; font: 500 11px var(--nx-body); color: var(--nx-muted); min-width: 0; }
html.ui-next .nx-md-row i { font: 500 9.5px var(--nx-mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nx-accent); }
html.ui-next .nx-md-row i.pon, html.ui-next .nx-md-row i.fire { color: var(--nx-mark-ink); }
html.ui-next .nx-md-row em { font-style: normal; font-weight: 700; color: var(--nx-bad); }
html.ui-next .nx-md-row > .icon { width: 15px; height: 15px; color: var(--nx-muted); flex: none; }
html.ui-next .nx-md-row.done { opacity: 0.7; }
html.ui-next .nx-md-empty { border-radius: 20px; }
html.ui-next .nx-md-empty h3 { font: 600 18px var(--nx-display); }

/* Map tab. */
html.ui-next .nx-mapview { position: relative; height: calc(100vh - 62px); background: var(--nx-soft-2); isolation: isolate; }
html.ui-next .nx-mapview .nx-map { position: absolute; inset: 0; }

/* ON SHIFT pill (engineer header). */
html.ui-next .nx-live.ok {
  color: var(--nx-ok); background: color-mix(in srgb, var(--nx-ok) 10%, transparent);
  border-color: color-mix(in srgb, var(--nx-ok) 35%, transparent);
}
html.ui-next .nx-crumb .nx-live.shift { margin-left: auto; }

@media (max-width: 900px) {
  html.ui-next .nx-myday { display: block; }
  html.ui-next .nx-md-col { gap: 12px; }
  html.ui-next .nx-md-mapcol { display: none; }
  html.ui-next .nx-mapview { height: calc(100vh - 58px - var(--nx-tabbar-h) - env(safe-area-inset-bottom, 0px)); }
  html.ui-next .nx-crumb .nx-live.shift { display: inline-flex; gap: 5px; padding: 2px 7px; font-size: 8.5px; letter-spacing: 0.06em; }
  html.ui-next .nx-crumb .nx-live.shift i { width: 6px; height: 6px; }
  /* Room for title + date + ON SHIFT beside the bell, avatar and theme. */
  html.ui-next .topbar { gap: 8px; }
  html.ui-next .nx-crumb { gap: 8px; }
  html.ui-next .nx-crumb-trail { letter-spacing: 0.05em; }

  /* Raised Record button in the engineer tab bar. */
  html.ui-next .nx-tab-rec {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px;
    font: 700 11px var(--nx-body); color: var(--nx-accent);
  }
  html.ui-next .nx-tab-rec button, html.ui-next .nx-tab-rec button:hover {
    width: 54px; height: 54px; margin-top: -30px; padding: 0; border-radius: 50%; cursor: pointer; filter: none;
    border: 4px solid var(--nx-bg); background: var(--nx-primary); color: var(--nx-primary-ink);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--nx-accent) 45%, transparent);
  }
  html.ui-next .nx-tab-rec button .icon { width: 22px; height: 22px; stroke-width: 2; }
}

/* =====================================================================
   NOVA COMMAND CENTRE (v1.0.204) — the O3-Desktop (Night) /
   Nova-Day-Cyan-Desktop artboards: the office "Operations" home.
   ===================================================================== */
html.ui-next .nx-ops { display: flex; flex-direction: column; gap: 14px; font-family: var(--nx-body); color: var(--nx-ink); }
html.ui-next .nx-ops h2 {
  margin: 0; display: flex; align-items: baseline; gap: 8px; font: 600 14px var(--nx-display); color: var(--nx-ink);
}
html.ui-next .nx-ops h2 span { font: 500 10px var(--nx-mono); letter-spacing: 0.12em; color: var(--nx-muted); }
html.ui-next .nx-ops .none { margin: 10px 0 0; font: 500 12px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-ops-card { background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 16px; padding: 15px 18px; min-width: 0; }

/* KPI strip. */
html.ui-next .nx-ops-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
html.ui-next .nx-ops-kpi {
  display: flex; flex-direction: column; gap: 3px; padding: 13px 16px; border-radius: 14px;
  background: var(--nx-card); border: 1px solid var(--nx-line);
}
html.ui-next .nx-ops-kpi .k { font: 500 10px var(--nx-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--nx-muted); }
html.ui-next .nx-ops-kpi .v { font: 600 25px var(--nx-display); line-height: 1.05; color: var(--nx-ink); font-variant-numeric: tabular-nums; }
html.ui-next .nx-ops-kpi .v small { font-size: 14px; color: var(--nx-muted); }
html.ui-next .nx-ops-kpi .s, html.ui-next .nx-ops-kpi .d { font: 500 11.5px var(--nx-body); color: var(--nx-ink-2); }
html.ui-next .nx-ops-kpi .d { display: flex; align-items: center; gap: 4px; font-weight: 700; color: var(--nx-muted); }
html.ui-next .nx-ops-kpi .d.up { color: var(--nx-ok); }
html.ui-next .nx-ops-kpi .d.down { color: var(--nx-bad); }
html.ui-next .nx-ops-kpi .d .icon { width: 11px; height: 11px; stroke-width: 2.2; }
html.ui-next .nx-ops-kpi .bar { height: 5px; border-radius: 3px; background: var(--nx-track); margin-top: 6px; overflow: hidden; }
html.ui-next .nx-ops-kpi .bar i { display: block; height: 100%; border-radius: 3px; background: var(--nx-accent); }

/* Middle: map + side column. */
html.ui-next .nx-ops-mid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: 14px; height: 428px; }
html.ui-next .nx-ops-map {
  position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--nx-line);
  background: var(--nx-soft-2); isolation: isolate; min-height: 0;
}
html.ui-next .nx-ops-map .nx-map { position: absolute; inset: 0; }
html.ui-next .nx-ops-map-h, html.ui-next .nx-ops-legend, html.ui-next .nx-ops-sel { position: absolute; z-index: 500; }
html.ui-next .nx-ops-map-h {
  top: 12px; left: 14px; display: flex; align-items: baseline; gap: 8px; padding: 6px 11px; border-radius: 10px;
  background: color-mix(in srgb, var(--nx-surface) 82%, transparent); border: 1px solid var(--nx-line);
}
html.ui-next .nx-ops-map-h span { font: 500 10px var(--nx-mono); letter-spacing: 0.12em; color: var(--nx-muted); }
html.ui-next .nx-ops-legend {
  top: 12px; right: 14px; display: flex; align-items: center; gap: 14px; padding: 7px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--nx-surface) 82%, transparent); border: 1px solid var(--nx-line);
  font: 500 11.5px var(--nx-body); color: var(--nx-ink-2);
}
html.ui-next .nx-ops-legend span { display: inline-flex; align-items: center; gap: 6px; }
html.ui-next .nx-ops-legend i.e { width: 8px; height: 8px; border-radius: 50%; background: var(--nx-accent); }
html.ui-next .nx-ops-legend i.p { width: 8px; height: 8px; border: 1.5px solid var(--nx-mark-ink); transform: rotate(45deg); }
html.ui-next .nx-ops-sel {
  left: 14px; bottom: 14px; right: 14px; max-width: 440px; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-radius: 12px; background: color-mix(in srgb, var(--nx-surface) 90%, transparent); border: 1px solid var(--nx-line-2);
}
html.ui-next .nx-ops-sel[hidden] { display: none !important; }
html.ui-next .nx-ops-sel .av {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--nx-tint); color: var(--nx-accent); font: 700 11.5px var(--nx-body);
}
html.ui-next .nx-ops-sel .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
html.ui-next .nx-ops-sel b { font: 700 12.5px var(--nx-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui-next .nx-ops-sel em { font: 500 10.5px var(--nx-mono); font-style: normal; }
html.ui-next .nx-ops-pin { background: transparent; border: none; }
html.ui-next .nx-dia {
  display: block; width: 12px; height: 12px; margin: 2px; transform: rotate(45deg);
  border: 2px solid var(--nx-mark-ink); background: color-mix(in srgb, var(--nx-mark-ink) 22%, transparent); box-sizing: border-box;
}
html.ui-next .nx-dia.late { border-color: var(--nx-bad); background: color-mix(in srgb, var(--nx-bad) 22%, transparent); }
html.ui-next .nx-eng {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: var(--nx-accent); color: var(--nx-primary-ink); border: 2px solid var(--nx-surface);
  font: 800 10px var(--nx-body); box-shadow: 0 0 0 6px color-mix(in srgb, var(--nx-accent) 22%, transparent);
}
html.ui-next:not([data-theme="dark"]) .nx-eng { color: #fff; }
html.ui-next .nx-ops-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; min-width: 0; }
html.ui-next .nx-ops-ring { display: flex; align-items: center; gap: 16px; }
html.ui-next .nx-ops-ring svg { width: 112px; height: 112px; flex: none; }
html.ui-next .nx-ops-ring circle { fill: none; stroke-width: 10; }
html.ui-next .nx-ops-ring .trk { stroke: var(--nx-track); }
html.ui-next .nx-ops-ring .val { stroke: var(--nx-accent); stroke-linecap: round; }
html.ui-next .nx-ops-ring > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
html.ui-next .nx-ops-ring .k { font: 500 10px var(--nx-mono); letter-spacing: 0.14em; color: var(--nx-muted); }
html.ui-next .nx-ops-ring .v { font: 600 27px var(--nx-display); line-height: 1; }
html.ui-next .nx-ops-ring .s { font: 500 12px var(--nx-body); color: var(--nx-ink-2); }
html.ui-next .nx-ops-ring .w { display: flex; align-items: center; gap: 5px; margin-top: 3px; font: 600 11.5px var(--nx-body); color: var(--nx-warn); }
html.ui-next .nx-ops-ring .w .icon { width: 12px; height: 12px; }
html.ui-next .nx-ops-roster { flex: 1; min-height: 0; display: flex; flex-direction: column; }
html.ui-next .nx-ops-roster .rows { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; overflow-y: auto; min-height: 0; flex: 1; }
html.ui-next .nx-ops-roster .r { display: flex; align-items: center; gap: 9px; }
html.ui-next .nx-ops-roster .r > i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--nx-muted); }
html.ui-next .nx-ops-roster .r b { flex: 1; min-width: 0; font: 600 12.5px var(--nx-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ui-next .nx-ops-roster .r span { font: 500 10.5px var(--nx-mono); white-space: nowrap; }
html.ui-next .nx-ops .ok { color: var(--nx-ok); }
html.ui-next .nx-ops .accent { color: var(--nx-accent); }
html.ui-next .nx-ops .warn { color: var(--nx-warn); }
html.ui-next .nx-ops .muted { color: var(--nx-muted); }
html.ui-next .nx-ops .mark { color: var(--nx-mark-ink); }
html.ui-next .nx-ops .r > i.ok, html.ui-next .nx-ops .e > i.ok { background: var(--nx-ok); }
html.ui-next .nx-ops .r > i.accent, html.ui-next .nx-ops .e > i.accent { background: var(--nx-accent); }
html.ui-next .nx-ops .r > i.warn, html.ui-next .nx-ops .e > i.warn { background: var(--nx-warn); }
html.ui-next .nx-ops .r > i.muted, html.ui-next .nx-ops .e > i.muted { background: var(--nx-muted); }
html.ui-next .nx-ops .e > i.mark { background: var(--nx-mark-ink); }
html.ui-next .nx-ops-link, html.ui-next .nx-ops-link:hover {
  align-self: flex-start; margin-top: 10px; padding: 0; border: none; background: none; box-shadow: none; filter: none;
  font: 700 12px var(--nx-body); color: var(--nx-accent); cursor: pointer;
}

/* Bottom: throughput + event stream. */
html.ui-next .nx-ops-bot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; min-height: 250px; }
html.ui-next .nx-ops-thru { display: flex; flex-direction: column; }
html.ui-next .nx-ops-thru .chart { position: relative; flex: 1; min-height: 170px; margin: 14px 0 0 24px; }
html.ui-next .nx-ops-thru .g { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--nx-line); }
html.ui-next .nx-ops-thru .g.base { border-top-color: var(--nx-line-2); }
html.ui-next .nx-ops-thru .g em { position: absolute; left: -24px; top: -7px; font: 500 9.5px var(--nx-mono); font-style: normal; color: var(--nx-muted); }
html.ui-next .nx-ops-thru .bars { position: absolute; inset: 0; display: flex; justify-content: space-around; align-items: flex-end; }
html.ui-next .nx-ops-thru .b { position: relative; height: 100%; width: 22px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
html.ui-next .nx-ops-thru .b i { display: block; width: 20px; min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--nx-accent) 30%, var(--nx-track)); }
html.ui-next .nx-ops-thru .b.now i { background: var(--nx-accent); }
html.ui-next .nx-ops-thru .b em { font: 600 10px var(--nx-mono); font-style: normal; color: var(--nx-muted); margin-bottom: 3px; }
html.ui-next .nx-ops-thru .b.now em { color: var(--nx-ink); }
html.ui-next .nx-ops-thru .b span { position: absolute; bottom: -18px; font: 500 9.5px var(--nx-mono); color: var(--nx-muted); }
html.ui-next .nx-ops-thru .b.now span { color: var(--nx-ink); }
html.ui-next .nx-ops-thru { padding-bottom: 30px; }
html.ui-next .nx-ops-events { display: flex; flex-direction: column; min-height: 0; }
html.ui-next .nx-ops-events .rows { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; overflow-y: auto; max-height: 250px; }
html.ui-next .nx-ops-events .e, html.ui-next .nx-ops-events .e:hover {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 4px; border: none; border-radius: 8px;
  background: none; box-shadow: none; filter: none; text-align: left; color: var(--nx-ink); font: 500 12.5px var(--nx-body);
}
html.ui-next .nx-ops-events button.e { cursor: pointer; }
html.ui-next .nx-ops-events button.e:hover { background: var(--nx-soft); }
html.ui-next .nx-ops-events time { flex: none; min-width: 40px; font: 500 10.5px var(--nx-mono); color: var(--nx-accent); }
html.ui-next .nx-ops-events .e > i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
html.ui-next .nx-ops-events .e span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1100px) {
  html.ui-next .nx-ops-mid { grid-template-columns: minmax(0, 1fr); height: auto; }
  html.ui-next .nx-ops-map { height: 360px; }
  html.ui-next .nx-ops-roster .rows { max-height: 320px; }
  html.ui-next .nx-ops-bot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  html.ui-next .nx-ops { gap: 12px; }
  html.ui-next .nx-ops-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  html.ui-next .nx-ops-kpi { padding: 11px 12px; }
  html.ui-next .nx-ops-kpi .v { font-size: 21px; }
  html.ui-next .nx-ops-map { height: 300px; }
  html.ui-next .nx-ops-legend { top: auto; bottom: 12px; right: 12px; }
  html.ui-next .nx-ops-sel { bottom: 50px; }
  html.ui-next .nx-ops-events .e span { white-space: normal; }
}

/* =====================================================================
   FULL ROSTER (v1.0.232) — the Ops "On shift" card as a whole page: the
   same rows (dot, name, mono status), every field person, any day from a
   calendar. Colour classes are the Ops ones (ok / accent / warn / muted),
   plus mark for leave.
   ===================================================================== */
html.ui-next .nx-roster { gap: 12px; }
html.ui-next .nx-roster-back { margin-top: 0; }
html.ui-next .nx-roster-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html.ui-next .nx-roster-step, html.ui-next .nx-roster-step:hover {
  width: 40px; height: 40px; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--nx-line); background: var(--nx-card); color: var(--nx-ink);
  box-shadow: none; filter: none; cursor: pointer;
}
html.ui-next .nx-roster-step:hover { border-color: var(--nx-line-2); }
html.ui-next .nx-roster-step .icon { width: 18px; height: 18px; stroke-width: 2.2; }
html.ui-next .nx-roster-bar input.nx-roster-date {
  width: auto; min-width: 0; height: 40px; padding: 0 12px; margin: 0; border-radius: 12px;
  border: 1px solid var(--nx-line); background: var(--nx-card); color: var(--nx-ink);
  font: 600 13.5px var(--nx-mono); color-scheme: light; cursor: pointer;
}
html.ui-next[data-theme="dark"] .nx-roster-bar input.nx-roster-date { color-scheme: dark; }
html.ui-next .nx-roster-bar input.nx-roster-date:focus { border-color: var(--nx-accent); box-shadow: 0 0 0 3px var(--nx-tint); }
html.ui-next .nx-roster-bar input.nx-roster-date:invalid { border-color: var(--nx-warn); }
html.ui-next .nx-roster-today, html.ui-next .nx-roster-today:hover {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--nx-line); background: var(--nx-card);
  color: var(--nx-ink-2); font: 700 12.5px var(--nx-body); box-shadow: none; filter: none; cursor: pointer;
}
html.ui-next .nx-roster-today:hover { border-color: var(--nx-line-2); color: var(--nx-ink); }
html.ui-next .nx-roster-today:disabled {
  background: var(--nx-tint); border-color: var(--nx-tint-line); color: var(--nx-accent); cursor: default;
}
html.ui-next .nx-roster-step:disabled { opacity: 0.4; cursor: default; }
/* The card's own rows, at page length: no inner scroll box. */
html.ui-next .nx-roster-card { flex: none; }
html.ui-next .nx-roster-card .rows { overflow: visible; max-height: none; flex: none; gap: 0; margin-top: 8px; }
html.ui-next .nx-roster-card .r { padding: 9px 2px; border-bottom: 1px solid var(--nx-line); }
html.ui-next .nx-roster-card .r:last-child { border-bottom: none; }
html.ui-next .nx-roster-card .r b { font-size: 13.5px; }
html.ui-next .nx-roster-card .r span { font-size: 11px; }
html.ui-next .nx-roster-card .r.off b { color: var(--nx-muted); font-weight: 500; }
html.ui-next .nx-roster-card .r > i.mark { background: var(--nx-mark-ink); }
html.ui-next .nx-roster-sum { margin: 6px 0 0; font: 500 12.5px var(--nx-body); color: var(--nx-ink-2); }
/* Between who clocked in and who didn't: one dashed rule, not two lines. */
html.ui-next .nx-roster-sep { height: 0; border-top: 1px dashed var(--nx-line-2); margin: 4px 0; }
html.ui-next .nx-roster-card .r:has(+ .nx-roster-sep) { border-bottom: none; }
html.ui-next .nx-roster-card .none { margin: 8px 0; }
@media (max-width: 900px) {
  html.ui-next .nx-roster-bar input.nx-roster-date { flex: 1; }
  html.ui-next .nx-roster-card { padding: 13px 14px; }
  html.ui-next .nx-roster-card .r span { font-size: 10.5px; }
}

/* =====================================================================
   FULL ROSTER · WEEK — Day · Week switch, then Grid · Timeline · Cards.
   Green = hours on site (reached → left); amber = auto-closed 23:00 or
   no arrival recorded; L / H tiles = leave / bank holiday. No lateness
   colour anywhere. Phones (≤900px) get their own layouts; nothing is a
   frozen column there.
   ===================================================================== */
html.ui-next .nx-rw-seg {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; align-self: flex-start;
  border: 1px solid var(--nx-line); background: var(--nx-card);
}
html.ui-next .nx-rw-seg button, html.ui-next .nx-rw-seg button:hover {
  height: 32px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; box-shadow: none; filter: none;
  color: var(--nx-muted); font: 700 13px var(--nx-body); cursor: pointer;
}
html.ui-next .nx-rw-seg button:hover { color: var(--nx-ink); }
html.ui-next .nx-rw-seg button[aria-pressed="true"] { background: var(--nx-primary); color: var(--nx-primary-ink); }
html.ui-next .nx-rw-seg button:focus-visible { outline: 2px solid var(--nx-accent); outline-offset: 1px; }
html.ui-next .nx-rw { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
html.ui-next .nx-rw[hidden], html.ui-next .nx-roster-bar[hidden], html.ui-next .nx-roster-card[hidden] { display: none; }
html.ui-next .nx-rd-views { margin-left: auto; }
html.ui-next .nx-rd .nx-rw-trow .tot small.ok { color: var(--nx-muted); }
html.ui-next .nx-rd .nx-rw-trow .tot small.warn { color: var(--nx-warn); }
@media (max-width: 900px) { html.ui-next .nx-rd-views { margin-left: 0; } }
html.ui-next .nx-rw-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
html.ui-next .nx-rw-titles h2 { display: block; margin: 0; font: 800 24px/1.2 var(--nx-display); color: var(--nx-ink); }
html.ui-next .nx-rw-titles h2 span { color: var(--nx-muted); font: 600 24px/1.2 var(--nx-display); letter-spacing: 0; text-transform: none; margin: 0; padding: 0; background: none; }
html.ui-next .nx-rw-sum { margin: 6px 0 0; font: 600 14px var(--nx-body); color: var(--nx-ink-2); font-variant-numeric: tabular-nums; }
html.ui-next .nx-rw-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
html.ui-next .nx-rw-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
html.ui-next .nx-rw-range {
  min-width: 150px; height: 40px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid var(--nx-line); background: var(--nx-card); color: var(--nx-ink);
  font: 600 13.5px var(--nx-mono); box-sizing: border-box;
}
html.ui-next .nx-rw-export { position: relative; }
html.ui-next .nx-rw-exp, html.ui-next .nx-rw-exp:hover {
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--nx-primary); background: var(--nx-primary);
  color: var(--nx-primary-ink); font: 700 13.5px var(--nx-body); display: inline-flex; align-items: center; gap: 8px;
  box-shadow: none; filter: none; cursor: pointer;
}
html.ui-next .nx-rw-exp .icon { width: 16px; height: 16px; }
html.ui-next .nx-rw-menu {
  position: absolute; right: 0; top: 46px; z-index: 30; width: 220px; padding: 6px; border-radius: 12px;
  background: var(--nx-surface); border: 1px solid var(--nx-line-2); box-shadow: var(--nx-shadow-lg);
  display: flex; flex-direction: column;
}
html.ui-next .nx-rw-menu[hidden] { display: none; }
html.ui-next .nx-rw-menu button, html.ui-next .nx-rw-menu button:hover {
  height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--nx-ink); text-align: left;
  padding: 0 10px; display: flex; align-items: center; gap: 10px; font: 600 13.5px var(--nx-body); box-shadow: none; filter: none; cursor: pointer;
}
html.ui-next .nx-rw-menu button:hover { background: var(--nx-soft-2); }
html.ui-next .nx-rw-menu i {
  font: 800 10px var(--nx-body); font-style: normal; width: 28px; height: 26px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
}
html.ui-next .nx-rw-menu i.xl { background: color-mix(in srgb, var(--nx-ok) 15%, transparent); color: var(--nx-ok); }
html.ui-next .nx-rw-menu i.pdf { background: color-mix(in srgb, var(--nx-bad) 15%, transparent); color: var(--nx-bad); }
html.ui-next .nx-rw-key {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font: 500 12.5px var(--nx-body); color: var(--nx-muted);
}
html.ui-next .nx-rw-key b { color: var(--nx-ink); }
html.ui-next .nx-rw-key b.ok { color: var(--nx-ok); }
html.ui-next .nx-rw-key .k { display: inline-flex; align-items: center; gap: 6px; }
html.ui-next .nx-rw-key .nx-ops-link { margin: 0 0 0 auto; }
html.ui-next .nx-rw-key i { font-style: normal; }
html.ui-next .nx-rw .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
html.ui-next .nx-rw .dot.ok { background: var(--nx-ok); }
html.ui-next .nx-rw .pill {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  font: 700 11px var(--nx-body); font-style: normal; background: var(--nx-soft-2); color: var(--nx-ink);
}
html.ui-next .nx-rw .pill.warn { background: color-mix(in srgb, var(--nx-warn) 16%, transparent); color: var(--nx-warn); }
html.ui-next .nx-rw .pill.ok { background: color-mix(in srgb, var(--nx-ok) 14%, transparent); color: var(--nx-ok); }
html.ui-next .nx-rw .pill.lt, html.ui-next .nx-rw .pill.van { background: var(--nx-mark-bg); color: var(--nx-mark-ink); }
html.ui-next .nx-rw .pill.abs { background: color-mix(in srgb, var(--nx-bad) 14%, transparent); color: var(--nx-bad); }
html.ui-next .nx-rw .sw { width: 22px; height: 10px; border-radius: 3px; display: inline-block; }
html.ui-next .nx-rw .sw.in, html.ui-next .nx-rw-tl .sg.in, html.ui-next .nx-rw-pbar .sg.in { background: var(--nx-soft-2); box-shadow: inset 0 0 0 1px var(--nx-line-2); }
html.ui-next .nx-rw .sw.tr, html.ui-next .nx-rw .sg.tr { background: var(--nx-bar-dim); }
html.ui-next .nx-rw .sw.on, html.ui-next .nx-rw .sg.on { background: var(--nx-accent); }
html.ui-next .nx-rw .sw.tk { width: 2px; height: 14px; background: var(--nx-primary); }
html.ui-next .nx-rw .sw.auto, html.ui-next .nx-rw .sg.auto {
  background: repeating-linear-gradient(135deg, var(--nx-warn) 0 3px, color-mix(in srgb, var(--nx-warn) 22%, transparent) 3px 6px);
}
html.ui-next .nx-rw .sw.fade, html.ui-next .nx-rw .sg.fade { background: linear-gradient(to right, var(--nx-bar-dim), transparent); }
html.ui-next .nx-rw .sg.fade.on { background: linear-gradient(to right, var(--nx-accent), transparent); }
html.ui-next .nx-rw-foot { margin: 0; font: 500 12px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw .ok { color: var(--nx-ok); }
html.ui-next .nx-rw .warn { color: var(--nx-warn); }
html.ui-next .nx-rw .muted { color: var(--nx-muted); }
html.ui-next .nx-rw .av {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--nx-mark-bg); color: var(--nx-mark-ink); font: 800 12px var(--nx-body);
}
html.ui-next .nx-rw .nm { display: flex; align-items: center; gap: 10px; min-width: 0; }
html.ui-next .nx-rw .nm > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
html.ui-next .nx-rw .nm b { font: 700 14px var(--nx-body); color: var(--nx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui-next .nx-rw .nm small { font: 500 11px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw-box { background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 14px; overflow: hidden; }
html.ui-next .nx-rw-scroll { overflow-x: auto; }

/* ---- A: grid ---- */
html.ui-next .nx-rw-grid { min-width: 1100px; font-variant-numeric: tabular-nums; }
html.ui-next .nx-rw-row { display: grid; grid-template-columns: 190px repeat(7, minmax(0, 1fr)) 54px 84px; border-bottom: 1px solid var(--nx-line); }
html.ui-next .nx-rw-row.hd { background: var(--nx-soft); }
html.ui-next .nx-rw-row.hd > div {
  padding: 12px 10px; font: 700 11.5px var(--nx-body); text-transform: uppercase; letter-spacing: .06em; color: var(--nx-muted);
}
html.ui-next .nx-rw-row.hd > div + div { border-left: 1px solid var(--nx-line); }
html.ui-next .nx-rw-row.hd > div span { color: var(--nx-ink-2); }
html.ui-next .nx-rw-row.hd > div.now { color: var(--nx-accent); }
html.ui-next .nx-rw-row.hd .r, html.ui-next .nx-rw-row .r { text-align: right; justify-content: center; align-items: flex-end; }
html.ui-next .nx-rw-row > .nm { padding: 9px 10px; }
html.ui-next .nx-rw-row .c {
  min-height: 64px; padding: 8px 10px; box-sizing: border-box; border-left: 1px solid var(--nx-line);
  display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; text-align: left;
}
html.ui-next .nx-rw-row .c.we { background: var(--nx-soft); }
html.ui-next .nx-rw-row button.c, html.ui-next .nx-rw-row button.c:hover {
  margin: 0; border-radius: 0; border-top: 0; border-right: 0; border-bottom: 0; border-left: 1px solid var(--nx-line);
  background: transparent; color: inherit; box-shadow: none; filter: none; cursor: pointer; font: inherit; width: 100%; height: 100%;
}
html.ui-next .nx-rw-row button.c.we { background: var(--nx-soft); }
html.ui-next .nx-rw-row button.c:hover { background: var(--nx-tint); }
html.ui-next .nx-rw-row button.c.sel { background: var(--nx-tint); box-shadow: inset 0 0 0 2px var(--nx-accent); border-radius: 8px; }
html.ui-next .nx-rw-row button.c:focus-visible { outline: 2px solid var(--nx-accent); outline-offset: -2px; }
html.ui-next .nx-rw-row .t1 { font: 700 13px var(--nx-body); color: var(--nx-ink); white-space: nowrap; }
html.ui-next .nx-rw-row .t1 em { font-style: normal; color: var(--nx-muted); }
html.ui-next .nx-rw-row .t1 u { text-decoration: none; color: var(--nx-warn); }
html.ui-next .nx-rw-row .t1 .chip {
  font: 700 10px var(--nx-body); padding: 1px 5px; border-radius: 5px; margin-left: 2px;
  background: color-mix(in srgb, var(--nx-warn) 16%, transparent); color: var(--nx-warn);
}
html.ui-next .nx-rw-row .t2 span { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--nx-body); }
html.ui-next .nx-rw-row .t2 i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
html.ui-next .nx-rw-row .t2 small { color: var(--nx-muted); font-weight: 500; font-size: 12px; }
html.ui-next .nx-rw-row .t3 { font: 500 10.5px var(--nx-body); color: var(--nx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui-next .nx-rw-tile, html.ui-next .nx-rw-ph .tl.leave, html.ui-next .nx-rw-ph .tl.holiday {
  width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--nx-mark-bg); color: var(--nx-mark-ink); font: 800 12.5px var(--nx-body);
}
html.ui-next .nx-rw-row .c.leave, html.ui-next .nx-rw-row .c.holiday { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
html.ui-next .nx-rw-lt { font: 600 12px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw-abs { font: 700 12px var(--nx-body); color: var(--nx-bad); }
html.ui-next .nx-rw-none { font: 600 14px var(--nx-body); color: var(--nx-line-2); }
html.ui-next .nx-rw-row .tot { font: 700 13px var(--nx-body); color: var(--nx-ink); }
html.ui-next .nx-rw-row.ft { background: var(--nx-soft); border-bottom: 0; }
html.ui-next .nx-rw-row.ft > div:first-child {
  padding: 14px 10px; font: 700 11.5px var(--nx-body); text-transform: uppercase; letter-spacing: .06em; color: var(--nx-muted);
}
html.ui-next .nx-rw-row.ft .c { min-height: 46px; display: block; padding-top: 14px; }
html.ui-next .nx-rw-row.ft .c b { font: 800 14px var(--nx-body); color: var(--nx-primary); }
html.ui-next[data-theme="dark"] .nx-rw-row.ft .c b, html.ui-next[data-theme="dark"] .nx-rw-row.ft .tot { color: var(--nx-accent); }
html.ui-next .nx-rw-row.ft .c small { font: 600 11px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw-row.ft .c.tot { display: flex; padding-top: 8px; color: var(--nx-primary); }

/* ---- the day detail: popover (desktop) / sheet (phone) / inline (phone A) ---- */
html.ui-next .nx-rw-pop {
  position: absolute; z-index: 40; box-sizing: border-box; padding: 16px 18px; border-radius: 14px;
  background: var(--nx-surface); border: 1px solid var(--nx-line-2); box-shadow: var(--nx-shadow-lg);
  display: flex; flex-direction: column; gap: 12px; color: var(--nx-ink);
}
html.ui-next .nx-rw-pop.sheet {
  /* Above the phone's bottom tab bar, which stays in reach. */
  position: fixed; left: 0; right: 0; bottom: calc(var(--nx-tabbar-h) + env(safe-area-inset-bottom)); top: auto; width: auto;
  max-height: calc(100vh - var(--nx-tabbar-h) - 90px); overflow: auto;
  border-radius: 22px 22px 0 0; padding: 16px 16px 20px; z-index: 1001;
}
html.ui-next .nx-rw-scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 12, 19, .5); padding: 0; border: 0; border-radius: 0; box-shadow: none; }
html.ui-next .nx-rw-phead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
html.ui-next .nx-rw-phead > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
html.ui-next .nx-rw-phead b { font: 800 15px var(--nx-body); }
html.ui-next .nx-rw-phead span { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--nx-body); }
html.ui-next .nx-rw-phead span i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
html.ui-next .nx-rw-x, html.ui-next .nx-rw-x:hover {
  width: 34px; height: 34px; padding: 0; flex: none; border-radius: 10px; border: 1px solid var(--nx-line); background: var(--nx-card);
  color: var(--nx-ink); display: inline-flex; align-items: center; justify-content: center; box-shadow: none; filter: none; cursor: pointer;
}
html.ui-next .nx-rw-x .icon { width: 15px; height: 15px; }
html.ui-next .nx-rw-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
html.ui-next .nx-rw-steps > div {
  display: grid; grid-template-columns: 8px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px; background: var(--nx-soft-2);
}
html.ui-next .nx-rw-steps i { grid-row: span 2; width: 8px; height: 8px; border-radius: 50%; background: var(--nx-accent); }
html.ui-next .nx-rw-steps span { font: 600 11px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw-steps b { font: 800 15px var(--nx-body); color: var(--nx-ink); font-variant-numeric: tabular-nums; }
html.ui-next .nx-rw-steps .on { background: color-mix(in srgb, var(--nx-ok) 12%, transparent); }
html.ui-next .nx-rw-steps .on.warn { background: color-mix(in srgb, var(--nx-warn) 14%, transparent); }
html.ui-next .nx-rw-steps .on i { background: currentColor; }
html.ui-next .nx-rw-steps .on b { color: inherit; }
html.ui-next .nx-rw-steps .van { grid-template-columns: 1fr; background: var(--nx-mark-bg); }
html.ui-next .nx-rw-steps .van b { font-size: 13px; color: var(--nx-mark-ink); }
html.ui-next .nx-rw-pnote { margin: 0; font: 500 12px var(--nx-body); color: var(--nx-warn); }
html.ui-next .nx-rw-pfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font: 500 12px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw-pfoot .nx-ops-link { margin: 0; }
html.ui-next .nx-rw-tip {
  position: absolute; z-index: 35; width: 300px; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; pointer-events: none;
  background: #16233b; color: #eaf0f9; box-shadow: var(--nx-shadow-lg); display: flex; flex-direction: column; gap: 8px;
}
html.ui-next[data-theme="dark"] .nx-rw-tip { background: #1b2433; border: 1px solid var(--nx-line-2); }
html.ui-next .nx-rw-tip > div:first-child { display: flex; justify-content: space-between; gap: 8px; font: 800 13px var(--nx-body); }
html.ui-next .nx-rw-tip > div:first-child span { font: 700 12px var(--nx-body); color: #3fd8ee; }
html.ui-next .nx-rw-tip > div:first-child span.warn { color: #f5b83d; }
html.ui-next .nx-rw-tip .g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
html.ui-next .nx-rw-tip .g span { display: flex; flex-direction: column; gap: 2px; }
html.ui-next .nx-rw-tip small { font: 600 10px var(--nx-body); color: #a9b4c9; }
html.ui-next .nx-rw-tip .g b { font: 800 14px var(--nx-body); font-variant-numeric: tabular-nums; }

/* ---- B: timeline ---- */
html.ui-next .nx-rw-tl { min-width: 1100px; }
html.ui-next .nx-rw-trow { display: grid; grid-template-columns: 200px 28px minmax(0, 1fr) 140px; align-items: start; border-bottom: 1px solid var(--nx-line); }
html.ui-next .nx-rw-trow > div:first-child { padding: 12px 14px; }
html.ui-next .nx-rw-trow.hd { background: var(--nx-soft); align-items: center; }
html.ui-next .nx-rw-trow.hd > div:first-child, html.ui-next .nx-rw-trow.hd .r, html.ui-next .nx-rw-trow.ft > div:first-child {
  font: 700 11.5px var(--nx-body); text-transform: uppercase; letter-spacing: .06em; color: var(--nx-muted);
}
html.ui-next .nx-rw-trow .ax { position: relative; height: 40px; }
html.ui-next .nx-rw-trow .ax span, html.ui-next .nx-rw-ax span {
  position: absolute; top: 13px; transform: translateX(-50%); font: 600 11px var(--nx-mono); color: var(--nx-muted);
}
html.ui-next .nx-rw-trow .ax span:first-child, html.ui-next .nx-rw-ax span:first-child { transform: none; }
html.ui-next .nx-rw-trow .ax span:last-child { transform: translateX(-100%); }
html.ui-next .nx-rw-trow .r { padding: 12px 14px; text-align: right; display: flex; flex-direction: column; gap: 2px; }
html.ui-next .nx-rw-trow .tot b { font: 800 15px var(--nx-body); color: var(--nx-ink); font-variant-numeric: tabular-nums; }
html.ui-next .nx-rw-trow .tot small { font: 600 12px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw-trow .dl { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; }
html.ui-next .nx-rw-trow .dl span { height: 12px; line-height: 12px; font: 700 9.5px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw-trow .lanes { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; }
html.ui-next .nx-rw-tl .ln, html.ui-next .nx-rw-pbar .ln {
  position: relative; display: block; height: 12px; border-radius: 3px; padding: 0; margin: 0; border: 0; box-shadow: none; filter: none; width: 100%;
  background: repeating-linear-gradient(to right, var(--nx-line) 0 1px, transparent 1px calc(100% / 8.5));
}
html.ui-next .nx-rw-tl button.ln { cursor: pointer; }
html.ui-next .nx-rw-tl button.ln:hover, html.ui-next .nx-rw-tl button.ln.sel { box-shadow: 0 0 0 2px var(--nx-tint-line); }
html.ui-next .nx-rw-tl button.ln:focus-visible { outline: 2px solid var(--nx-accent); outline-offset: 2px; }
html.ui-next .nx-rw .sg { position: absolute; top: 1px; height: 10px; border-radius: 2px; }
html.ui-next .nx-rw .tk { position: absolute; top: -1px; width: 2px; height: 14px; margin-left: -1px; border-radius: 1px; background: var(--nx-primary); }
html.ui-next[data-theme="dark"] .nx-rw .tk { background: #eaf0f9; }
html.ui-next .nx-rw-tl .ln .lt {
  position: absolute; left: 0; top: -2px; height: 16px; padding: 0 7px; border-radius: 5px; display: inline-flex; align-items: center;
  font: 800 10px var(--nx-body); background: var(--nx-mark-bg); color: var(--nx-mark-ink);
}
html.ui-next .nx-rw-tl .ln .lt.abs { background: color-mix(in srgb, var(--nx-bad) 14%, transparent); color: var(--nx-bad); }
html.ui-next .nx-rw-trow.ft { background: var(--nx-soft); border-bottom: 0; align-items: center; }
html.ui-next .nx-rw-trow .chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 0; }
html.ui-next .nx-rw-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 9px;
  background: var(--nx-card); border: 1px solid var(--nx-line); font: 600 12px var(--nx-body); color: var(--nx-muted); font-variant-numeric: tabular-nums;
}
html.ui-next .nx-rw-chip b { color: var(--nx-ink); font-weight: 800; }
html.ui-next .nx-rw-chip small { font-size: 11px; color: var(--nx-muted); }

/* ---- C: cards ---- */
html.ui-next .nx-rw-ctools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
html.ui-next .nx-rw-find {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; box-sizing: border-box;
  border: 1px solid var(--nx-line); background: var(--nx-card); color: var(--nx-muted);
}
html.ui-next .nx-rw-find .icon { width: 16px; height: 16px; flex: none; }
html.ui-next .nx-rw-find input {
  border: 0; outline: 0; background: transparent; color: var(--nx-ink); font: 600 13.5px var(--nx-body); width: 180px; padding: 0; margin: 0; height: 36px; box-shadow: none;
}
html.ui-next .nx-rw-find:focus-within { border-color: var(--nx-accent); box-shadow: 0 0 0 3px var(--nx-tint); }
html.ui-next .nx-rw-counts { display: flex; flex-wrap: wrap; gap: 8px; }
html.ui-next .nx-rw-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
html.ui-next .nx-rw-card {
  background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
html.ui-next .nx-rw-card[hidden] { display: none; }
html.ui-next .nx-rw-card header { display: flex; align-items: center; gap: 10px; }
html.ui-next .nx-rw-card header .nm { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
html.ui-next .nx-rw-card header .nm b { font: 800 15px var(--nx-body); color: var(--nx-ink); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.ui-next .nx-rw-card .pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
html.ui-next .nx-rw-ctbl {
  display: grid; grid-template-columns: 92px repeat(7, minmax(0, 1fr)); font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--nx-line);
}
html.ui-next .nx-rw-ctbl.ph { grid-template-columns: 40px repeat(5, minmax(0, 1fr)); }
html.ui-next .nx-rw-ctbl .th { padding: 6px 2px; font: 700 10px var(--nx-body); text-transform: uppercase; letter-spacing: .04em; color: var(--nx-muted); text-align: center; }
html.ui-next .nx-rw-ctbl .th.ok { color: var(--nx-ok); }
html.ui-next .nx-rw-ctbl .td { padding: 5px 2px; font: 600 12px var(--nx-body); color: var(--nx-ink); text-align: center; border-top: 1px solid var(--nx-line); white-space: nowrap; }
html.ui-next .nx-rw-ctbl .td.lab { text-align: left; font: 600 11.5px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw-ctbl .td.lab.ok { color: var(--nx-ok); font-weight: 800; }
html.ui-next .nx-rw-ctbl .td.ok { color: var(--nx-ok); font-weight: 800; }
html.ui-next .nx-rw-ctbl .td.warn { color: var(--nx-warn); font-weight: 700; }
html.ui-next .nx-rw-ctbl .td.lt { color: var(--nx-mark-ink); font-weight: 800; }
html.ui-next .nx-rw-ctbl .td.abs { color: var(--nx-bad); font-weight: 800; }
html.ui-next .nx-rw-ctbl .td.mute { color: var(--nx-line-2); }
html.ui-next .nx-rw-cnote { margin: 0; font: 500 11.5px var(--nx-body); color: var(--nx-warn); }
html.ui-next .nx-rw-none-found { margin: 0; font: 600 13px var(--nx-body); color: var(--nx-muted); }
html.ui-next .nx-rw-none-found[hidden] { display: none; }
@media (max-width: 1280px) { html.ui-next .nx-rw-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- phones: A tiles, B day chips + bars, C transposed cards ---- */
@media (max-width: 900px) {
  html.ui-next .nx-rw-titles h2 { font-size: 20px; }
  html.ui-next .nx-rw-titles h2 span { display: block; font-size: 14px; margin-top: 2px; }
  html.ui-next .nx-rw-sum { font-size: 13px; }
  html.ui-next .nx-rw-head .nx-rw-views { width: 100%; }
  html.ui-next .nx-rw-head .nx-rw-views button { flex: 1; }
  html.ui-next .nx-rw-tools { position: sticky; bottom: calc(var(--nx-tabbar-h) + env(safe-area-inset-bottom)); z-index: 20; order: 9;
    padding: 10px 0; background: var(--nx-bg); border-top: 1px solid var(--nx-line); flex-wrap: nowrap; }
  html.ui-next .nx-rw-nav { flex: 1; flex-wrap: nowrap; gap: 6px; min-width: 0; }
  html.ui-next .nx-rw-range { flex: 1; min-width: 0; padding: 0 6px; font-size: 12px; height: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 42px; text-align: center; }
  html.ui-next .nx-rw-nav .nx-roster-step { width: 44px; height: 44px; }
  html.ui-next .nx-rw-nav .nx-roster-today { height: 44px; padding: 0 10px; font-size: 12px; }
  html.ui-next .nx-rw-range .y { display: none; }
  html.ui-next .nx-rw-exp { width: 44px; height: 44px; padding: 0; justify-content: center; }
  html.ui-next .nx-rw-exp span { display: none; }
  html.ui-next .nx-rw-menu { top: auto; bottom: 52px; }
  html.ui-next .nx-rw-key { font-size: 11.5px; gap: 6px 12px; }
  html.ui-next .nx-rw-key .k:nth-child(n+3) { display: none; }
  html.ui-next .nx-rw-foot { order: 8; }
  html.ui-next .nx-rw-body { order: 7; }
  /* A */
  html.ui-next .nx-rw-ph-days, html.ui-next .nx-rw-ph-row { display: grid; grid-template-columns: 104px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; }
  html.ui-next .nx-rw-ph-days { position: sticky; top: 64px; z-index: 5; background: var(--nx-bg); padding: 6px 0;
    font: 700 10px var(--nx-body); color: var(--nx-muted); letter-spacing: .06em; text-align: center; }
  html.ui-next .nx-rw-ph { background: var(--nx-card); border: 1px solid var(--nx-line); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; }
  html.ui-next .nx-rw-ph.open { border-color: var(--nx-tint-line); }
  html.ui-next .nx-rw-ph .nm { flex-direction: column; align-items: flex-start; gap: 1px; }
  html.ui-next .nx-rw-ph .nm b { font-size: 13px; max-width: 100%; }
  html.ui-next .nx-rw-ph .nm small { font-variant-numeric: tabular-nums; }
  html.ui-next .nx-rw-ph .tl, html.ui-next .nx-rw-ph .tl:hover {
    height: 36px; min-width: 0; padding: 0; margin: 0; border-radius: 8px; border: 1px solid var(--nx-line); background: var(--nx-soft);
    display: inline-flex; align-items: center; justify-content: center; font: 700 11px var(--nx-body); font-variant-numeric: tabular-nums;
    color: var(--nx-muted); box-shadow: none; filter: none; width: auto;
  }
  html.ui-next .nx-rw-ph button.tl { cursor: pointer; }
  html.ui-next .nx-rw-ph button.tl.ok { background: color-mix(in srgb, var(--nx-ok) 13%, transparent); border-color: transparent; color: var(--nx-ok); }
  html.ui-next .nx-rw-ph button.tl.warn { background: color-mix(in srgb, var(--nx-warn) 14%, transparent); border-color: transparent; color: var(--nx-warn); }
  html.ui-next .nx-rw-ph button.tl.sel { box-shadow: 0 0 0 2px var(--nx-accent); }
  html.ui-next .nx-rw-ph .tl.leave, html.ui-next .nx-rw-ph .tl.holiday { width: auto; height: 36px; border: 0; }
  html.ui-next .nx-rw-ph .tl.absent { color: var(--nx-bad); font-weight: 800; }
  html.ui-next .nx-rw-ph .tl.future { background: transparent; border-style: dashed; }
  html.ui-next .nx-rw-inline { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--nx-line); display: flex; flex-direction: column; gap: 10px; }
  html.ui-next .nx-rw-inline .nx-rw-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* B */
  html.ui-next .nx-rw-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  html.ui-next .nx-rw-chips button, html.ui-next .nx-rw-chips button:hover {
    height: 48px; padding: 0; margin: 0; border-radius: 10px; border: 1px solid var(--nx-line); background: var(--nx-card); color: var(--nx-ink);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font: 700 12px var(--nx-body); box-shadow: none; filter: none;
  }
  html.ui-next .nx-rw-chips button small { font: 600 11px var(--nx-body); color: var(--nx-muted); }
  html.ui-next .nx-rw-chips button[aria-pressed="true"] { background: var(--nx-primary); border-color: var(--nx-primary); color: var(--nx-primary-ink); }
  html.ui-next .nx-rw-chips button[aria-pressed="true"] small { color: inherit; opacity: .8; }
  html.ui-next .nx-rw-chips button:disabled { opacity: .4; }
  html.ui-next .nx-rw-sub { margin: 10px 0 4px; font: 700 14px var(--nx-body); color: var(--nx-ink); }
  html.ui-next .nx-rw-ax { position: relative; height: 22px; }
  html.ui-next .nx-rw-ax span { top: 4px; font-size: 10px; }
  html.ui-next .nx-rw-pbar, html.ui-next .nx-rw-pbar:hover {
    display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 0 0 4px; padding: 10px 12px; box-sizing: border-box; text-align: left;
    border-radius: 12px; border: 1px solid var(--nx-line); background: var(--nx-card); color: var(--nx-ink); box-shadow: none; filter: none; font: inherit;
  }
  html.ui-next button.nx-rw-pbar { cursor: pointer; }
  html.ui-next .nx-rw-pbar .nm { justify-content: space-between; width: 100%; }
  html.ui-next .nx-rw-pbar .nm small { font: 700 12px var(--nx-body); font-variant-numeric: tabular-nums; }
  html.ui-next .nx-rw-pbar.off { opacity: .6; }
  /* C */
  html.ui-next .nx-rw-cards { grid-template-columns: 1fr; gap: 10px; }
  html.ui-next .nx-rw-find { width: 100%; }
  html.ui-next .nx-rw-find input { width: 100%; }
  html.ui-next .nx-rw-counts { display: none; }
  html.ui-next .nx-rw-card { padding: 12px; }
  html.ui-next .nx-rw-card header { flex-wrap: wrap; }
  html.ui-next .nx-rw-ctbl .td { font-size: 12.5px; padding: 6px 1px; }
}

/* =====================================================================
   ANDROID APP (v1.0.206) — the APK injects app_overrides.css, written for
   the classic layout, on top of every page. Two of its !important rules
   would break the new look on a phone: `main { padding: 14px }` would put
   the bottom of every page under the tab bar, and `.leaflet-container
   { height: 300px }` would shrink the full-screen Map tab. These win on
   specificity (the app's hamburger/sidebar rules already lose to the
   shell rules above). No APK rebuild needed.
   ===================================================================== */
html.ui-next .nx-map.leaflet-container { height: auto !important; }
@media (max-width: 900px) {
  html.ui-next main#view-content,
  html.ui-next main#view-content.nx-wide { padding: 14px 14px calc(var(--nx-tabbar-h) + 28px + env(safe-area-inset-bottom, 0px)) !important; }
  html.ui-next main#view-content.nx-flush { padding: 0 0 calc(var(--nx-tabbar-h) + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ============================================================
   BOARD MONEY — ADMIN ONLY (v1.0.208)
   The drawer embeds the classic PON / pack row, whose £ pills follow the
   classic rule (back office sees them). On the Board only admin does.
   ============================================================ */
html.ui-next #nx-drawer-wrap.nx-nomoney .total-pill { display: none !important; }

/* ============================================================
   NOTIFICATIONS DROP-DOWN (v1.0.209)
   The header bell opens a small panel of the latest inbox items with
   "See all notifications" at the foot. Sits above the drawer (1200) and
   below the palette (1300).
   ============================================================ */
#nx-bell-wrap { position: fixed; inset: 0; z-index: 1250; display: none; }
#nx-bell-wrap.open { display: block; }
#nx-bell-wrap .nx-bell-scrim { position: absolute; inset: 0; background: transparent; }
.nx-bellpop {
  position: absolute; width: 380px; max-height: min(560px, calc(100vh - 90px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--nx-surface); color: var(--nx-ink);
  border: 1px solid var(--nx-line-2); border-radius: 16px; box-shadow: var(--nx-shadow-lg);
  font-family: var(--nx-body); animation: nxBellIn .14s ease-out;
}
@keyframes nxBellIn { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.nx-bp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--nx-line);
}
.nx-bp-title { font: 800 16px var(--nx-display); color: var(--nx-ink); }
.nx-bp-sub { font: 500 10px var(--nx-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--nx-muted); margin-top: 2px; }
.nx-bp-markall {
  border: none; background: transparent; color: var(--nx-accent); box-shadow: none;
  font: 700 12.5px var(--nx-body); padding: 6px 8px; border-radius: 8px; cursor: pointer;
}
.nx-bp-markall:hover { background: var(--nx-soft); filter: none; }
.nx-bp-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.nx-bp-item {
  width: 100%; display: flex; gap: 11px; align-items: flex-start; text-align: left;
  padding: 10px; border: none; border-radius: 11px; background: transparent; box-shadow: none;
  color: var(--nx-ink); cursor: pointer; position: relative;
}
.nx-bp-item:hover { background: var(--nx-soft); filter: none; }
.nx-bp-item.unread { background: color-mix(in srgb, var(--nx-accent) 7%, transparent); }
.nx-bp-item.unread::after {
  content: ''; position: absolute; top: 15px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--nx-accent);
}
.nx-bp-ic {
  flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--nx-soft);
  display: flex; align-items: center; justify-content: center;
}
.nx-bp-ic .icon { width: 16px; height: 16px; }
.nx-bp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-right: 12px; }
.nx-bp-top { display: flex; align-items: baseline; gap: 4px; font-size: 12px; font-weight: 600; color: var(--nx-muted); min-width: 0; }
.nx-bp-top b { font-weight: 800; }
.nx-bp-top b { flex: none; }
.nx-bp-top .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-bp-top time { margin-left: auto; padding-left: 8px; font: 500 10.5px var(--nx-mono); color: var(--nx-muted); white-space: nowrap; }
.nx-bp-snip {
  font-size: 13px; font-weight: 600; color: var(--nx-ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word;
}
.nx-bp-item:not(.unread) .nx-bp-snip { color: var(--nx-ink-2); font-weight: 500; }
.nx-bp-empty { padding: 26px 18px; text-align: center; font-size: 13px; color: var(--nx-muted); }
.nx-bp-skel { height: 48px; margin: 6px; border-radius: 10px; background: var(--nx-soft); animation: nxBpPulse 1.1s ease-in-out infinite alternate; }
@keyframes nxBpPulse { from { opacity: .5; } to { opacity: 1; } }
.nx-bp-foot {
  flex: none; width: 100%; border: none; border-top: 1px solid var(--nx-line); border-radius: 0;
  background: transparent; box-shadow: none; color: var(--nx-accent);
  font: 800 13px var(--nx-body); padding: 13px 16px; cursor: pointer; text-align: center;
}
.nx-bp-foot:hover { background: var(--nx-soft); filter: none; }
@media (max-width: 900px) {
  .nx-bellpop { left: 10px; right: 10px !important; width: auto; max-height: calc(100vh - 150px - env(safe-area-inset-bottom, 0px)); }
  #nx-bell-wrap .nx-bell-scrim { background: rgba(8, 12, 24, 0.3); }
}

/* ============================================================
   RAIL HOVER NAMES (v1.0.211)
   ============================================================ */
#nx-tip { display: none; }
html.ui-next #nx-tip {
  display: block; position: fixed; z-index: 1400; pointer-events: none;
  transform: translate(-4px, -50%); opacity: 0; transition: opacity .12s ease, transform .12s ease;
  background: var(--nx-ink); color: var(--nx-bg);
  font: 700 12.5px var(--nx-body); white-space: nowrap;
  padding: 6px 10px; border-radius: 8px; box-shadow: var(--nx-shadow-lg);
}
html.ui-next #nx-tip::before {
  content: ''; position: absolute; left: -4px; top: 50%; width: 8px; height: 8px;
  background: inherit; transform: translateY(-50%) rotate(45deg); border-radius: 1px;
}
html.ui-next #nx-tip.show { opacity: 1; transform: translate(0, -50%); }
/* A hub's second line ("Vans, checks, drivers, kit"): same ink, a shade quieter. */
html.ui-next #nx-tip .nx-tip-sub { display: block; font: 600 11px/1.3 var(--nx-body); color: inherit; opacity: .72; margin-top: 2px; }
@media (max-width: 900px), (hover: none) { html.ui-next #nx-tip { display: none; } }

/* ============================================================
   CLASSIC DIALOGS ON A SOLID CARD (v1.0.212)
   Nova night's .card is see-through (glass); a dialog floating over the page
   needs a solid face or the screen behind reads through it.
   ============================================================ */
html.ui-next .modal-overlay > .card,
html.ui-next [data-nx-dialog] > .card { background: var(--nx-surface); }

/* ============================================================
   QUICK FIND HISTORY (v1.0.214)
   Recent searches (chips that refill the box) and recently opened items
   (with a remove ✕) when the search box is empty.
   ============================================================ */
.nx-pal-hrow { display: flex; align-items: center; justify-content: space-between; }
.nx-pal-clear {
  border: none; background: transparent; box-shadow: none; padding: 2px 6px; border-radius: 6px;
  font: 700 11px var(--nx-body); letter-spacing: 0; text-transform: none; color: var(--nx-accent); cursor: pointer;
}
.nx-pal-clear:hover { background: var(--nx-soft); filter: none; }
.nx-pal-qs { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px 8px; }
.nx-pal-q {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  border: 1px solid var(--nx-line); background: var(--nx-soft); color: var(--nx-ink-2); box-shadow: none;
  font: 700 12.5px var(--nx-body); padding: 5px 10px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nx-pal-q:hover { border-color: var(--nx-line-2); color: var(--nx-ink); filter: none; }
.nx-pal-q .icon { width: 13px; height: 13px; flex: none; color: var(--nx-muted); }
.nx-pal-x {
  flex: none; width: 28px; height: 28px; border-radius: 8px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; box-shadow: none; color: var(--nx-muted); cursor: pointer;
  opacity: 0; transition: opacity .12s;
}
.nx-pal-x .icon { width: 14px; height: 14px; }
.nx-pal-it:hover .nx-pal-x, .nx-pal-it.on .nx-pal-x { opacity: 1; }
.nx-pal-x:hover { background: var(--nx-soft-2); color: var(--nx-ink); filter: none; }
@media (hover: none) { .nx-pal-x { opacity: 1; } }

/* Operations card links (v1.0.262): Full roster + Vehicle checks side by side. */
html.ui-next .nx-ops-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
html.ui-next .nx-ops-links .nx-ops-link { margin-top: 0; }

/* HR management: the segmented filters match the new look's .nx-seg. */
html.ui-next .hr-seg button {
  height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--nx-line); background: var(--nx-card);
  font: 700 12.5px var(--nx-body); color: var(--nx-ink-2);
}
html.ui-next .hr-seg button.on, html.ui-next .hr-seg button.on:hover { border-color: var(--nx-ink); background: var(--nx-ink); color: var(--nx-card); }
html.ui-next[data-theme="dark"] .hr-seg button.on { background: #e8edf7; color: #0a0f1d; border-color: #e8edf7; }
/* Risk assessment templates: the sticky badge strip, Part 1 rows and the
   matrix rating pairs follow the new look's card/line tokens. */
html.ui-next .ra-badges { background: var(--nx-card); border-color: var(--nx-line); }
html.ui-next .ra-badge.score { background: var(--nx-ink); color: var(--nx-card); }
html.ui-next .ra-part { color: var(--nx-ink-2); font-family: var(--nx-display); }
html.ui-next .ra-q-row { border-color: var(--nx-line); }
html.ui-next .ra-q-row.flag { background: var(--nx-bad-soft, rgba(220, 38, 38, 0.10)); }
html.ui-next .ra-rating { border-color: var(--nx-line); }
html.ui-next .ra-rating .hr-seg button { height: 30px; min-width: 34px; padding: 0; }
html.ui-next .ra-band { background: var(--nx-soft); color: var(--nx-ink); }
html.ui-next .ra-band.on { color: #fff; }
html.ui-next .ra-tpl-pick { color: var(--nx-ink-2); }
/* Risk matrix card: header cells and axis text follow the new-look tokens
   (dark glass included); the band cells keep their own colours. */
html.ui-next .ra-matrix-card { border-color: var(--nx-line); background: var(--nx-card); }
html.ui-next .ra-matrix { color: var(--nx-ink); }
html.ui-next .ra-mx-h { background: var(--nx-card); color: var(--nx-ink); border-color: var(--nx-line); }
html.ui-next .ra-mx-h.corner { background: transparent; border-color: transparent; }
html.ui-next .ra-mx-axis-top i, html.ui-next .ra-mx-vtext i, html.ui-next .ra-matrix-hint { color: var(--nx-ink-2); }
html.ui-next .ra-pick-btn { border-color: var(--nx-line); color: var(--nx-ink-2); }
html.ui-next .ra-pick-btn.on { border-color: var(--nx-ink); background: var(--nx-ink); color: var(--nx-card); }
html.ui-next[data-theme="dark"] .ra-mx-cell { border-color: rgba(255, 255, 255, 0.35); }
html.ui-next[data-theme="dark"] .ra-mx-cell.residual { outline-color: #e8edf7; }
html.ui-next[data-theme="dark"] .ra-mx-cell.residual[data-tag]::after { background: #e8edf7; color: #0a0f1d; }
