/* Tradellen spatial dashboard refresh
   Scoped to app-mode: marketing, onboarding and backend code remain untouched. */
body.enterprise-theme.app-mode {
  --dash-bg: #eef0ed;
  --dash-paper: rgba(255,255,255,.78);
  --dash-paper-solid: #fff;
  --dash-ink: #171917;
  --dash-muted: #6e746f;
  --dash-line: rgba(28,31,28,.085);
  --dash-amber: #d79a2b;
  --dash-amber-soft: #f3d797;
  --dash-green: #3f7d60;
  --dash-blue: #537b91;
  --dash-spring: cubic-bezier(.16,1,.3,1);
  --w: var(--dash-paper-solid);
  --bg: var(--dash-bg);
  --bg2: #e5e8e3;
  --bdr: var(--dash-line);
  --bdr2: rgba(28,31,28,.15);
  --ink: var(--dash-ink);
  --ink2: #353a36;
  --ink3: #626963;
  --ink4: #5f665f;
  --teal: var(--dash-blue);
  --teal-d: #41687d;
  --teal-glow: rgba(83,123,145,.11);
  --orange: var(--dash-amber);
  background:
    radial-gradient(circle at 82% 8%, rgba(243,215,151,.28), transparent 27%),
    radial-gradient(circle at 16% 88%, rgba(117,160,137,.15), transparent 28%),
    var(--dash-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

body.enterprise-theme.app-mode #app {
  gap: 12px;
  padding: 12px;
  background:
    radial-gradient(circle at 78% -10%, rgba(246,216,148,.30), transparent 31%),
    linear-gradient(145deg, #e9ece7 0%, #f4f5f2 50%, #e8ebe6 100%);
}

/* Floating spatial sidebar */
body.enterprise-theme.app-mode aside {
  width: 270px;
  height: calc(100vh - 24px);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 27px;
  background:
    radial-gradient(circle at 22% 2%, rgba(243,215,151,.11), transparent 24%),
    linear-gradient(170deg, #202320 0%, #151715 70%, #101210 100%);
  box-shadow: 0 26px 70px rgba(29,34,29,.24), inset 0 1px 0 rgba(255,255,255,.08);
  scrollbar-gutter: stable;
}
body.enterprise-theme.app-mode .sb-hd { padding: 20px 16px 14px; border: 0; }
body.enterprise-theme.app-mode .sb-brand { margin-bottom: 15px; }
body.enterprise-theme.app-mode .sb-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg,#27E3B4,#12B894);
  box-shadow: 0 9px 24px rgba(216,168,78,.24), inset 0 1px 0 rgba(255,255,255,.75);
  transition: transform .35s var(--dash-spring), box-shadow .35s ease;
}
body.enterprise-theme.app-mode .sb-brand:hover .sb-mark { transform: rotate(-5deg) scale(1.06); box-shadow: 0 13px 30px rgba(216,168,78,.32); }
body.enterprise-theme.app-mode .sb-coname { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
body.enterprise-theme.app-mode .sb-powered { color: rgba(255,255,255,.55); font-size: 8px; letter-spacing: .14em; }
body.enterprise-theme.app-mode .sb-agent {
  position: relative;
  overflow: hidden;
  padding: 12px 13px;
  border: 1px solid rgba(255,255,255,.095);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
body.enterprise-theme.app-mode .sb-agent::after { content: ""; position: absolute; right: -18px; top: -22px; width: 62px; height: 62px; border-radius: 50%; background: rgba(243,215,151,.08); filter: blur(2px); }
body.enterprise-theme.app-mode .sb-dot,
body.enterprise-theme.app-mode .pn-dot {
  animation: dashPulse 2.5s ease-in-out infinite !important;
  background: #78c58e;
  box-shadow: 0 0 0 5px rgba(120,197,142,.08);
}
body.enterprise-theme.app-mode nav.sb-nav { gap: 3px; padding: 7px 9px 12px; }
body.enterprise-theme.app-mode .nav-domain-label { padding: 12px 14px 6px; color: rgba(255,255,255,.27); font-size: 8px; letter-spacing: .13em; }
body.enterprise-theme.app-mode .nb {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 13px;
  color: rgba(255,255,255,.52);
  font-family: inherit;
  font-size: 12px;
  transition: color .2s ease, background .2s ease, transform .32s var(--dash-spring), box-shadow .25s ease;
}
body.enterprise-theme.app-mode .nb svg { opacity: .6; transition: opacity .2s ease, transform .32s var(--dash-spring); }
body.enterprise-theme.app-mode .nb:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateX(3px); }
body.enterprise-theme.app-mode .nb:hover svg { opacity: 1; transform: scale(1.1); }
body.enterprise-theme.app-mode .nb.act {
  color: #241d10;
  background: linear-gradient(135deg, #f7e4b5, #dca846);
  box-shadow: 0 10px 25px rgba(218,164,69,.22), inset 0 1px 0 rgba(255,255,255,.72);
  transform: translateX(2px);
}
body.enterprise-theme.app-mode .nb.act::before { display: none; }
body.enterprise-theme.app-mode .nb.act svg { color: #4d3914; opacity: 1; transform: scale(1.06); }
body.enterprise-theme.app-mode .sb-badge { border-radius: 999px; background: rgba(255,255,255,.88); color: #252820; box-shadow: 0 3px 9px rgba(0,0,0,.12); }
body.enterprise-theme.app-mode .sb-ft { border-color: rgba(255,255,255,.06); padding: 10px; }
body.enterprise-theme.app-mode .sb-so { min-height: 42px; border-radius: 13px; }

/* Main canvas and glass topbar */
body.enterprise-theme.app-mode #main { border-radius: 27px; background: transparent; overflow: hidden; }
body.enterprise-theme.app-mode .topbar {
  height: 72px;
  margin-bottom: 0;
  padding: 0 26px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 24px 24px 0 0;
  background: rgba(255,255,255,.67);
  box-shadow: 0 1px 0 rgba(255,255,255,.88) inset, 0 15px 44px rgba(39,45,39,.055);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}
body.enterprise-theme.app-mode .tb-title { font-size: 18px; font-weight: 670; letter-spacing: -.025em; }
body.enterprise-theme.app-mode .tb-date { margin-top: 3px; color: var(--dash-muted); font-size: 11px; }
body.enterprise-theme.app-mode .tb-right { gap: 9px; }
body.enterprise-theme.app-mode .tb-cmd {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--dash-line);
  border-radius: 13px;
  background: rgba(255,255,255,.66);
  box-shadow: 0 4px 14px rgba(31,35,31,.04), inset 0 1px 0 #fff;
  transition: transform .25s var(--dash-spring), box-shadow .25s ease, background .2s ease;
}
body.enterprise-theme.app-mode .tb-cmd:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31,35,31,.09); }
body.enterprise-theme.app-mode .tb-cmd kbd { border: 0; border-radius: 7px; background: #eceeea; box-shadow: inset 0 -1px 0 rgba(0,0,0,.08); }
body.enterprise-theme.app-mode .tb-status {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(63,125,96,.13);
  border-radius: 999px;
  color: #356c51;
  background: rgba(224,241,229,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 14px rgba(63,125,96,.05);
}
body.enterprise-theme.app-mode .tb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(145deg, #313630, #151715);
  box-shadow: 0 7px 17px rgba(30,34,29,.18), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .3s var(--dash-spring), box-shadow .3s ease;
}
body.enterprise-theme.app-mode .tb-avatar:hover { transform: translateY(-2px) rotate(2deg) scale(1.04); box-shadow: 0 12px 24px rgba(30,34,29,.24); }
body.enterprise-theme.app-mode .content {
  position: relative;
  padding: 30px 30px 64px;
  border: 1px solid rgba(255,255,255,.52);
  border-top: 0;
  border-radius: 0 0 27px 27px;
  background:
    radial-gradient(circle at 90% 2%, rgba(243,215,151,.20), transparent 20%),
    radial-gradient(circle at 2% 80%, rgba(83,123,145,.08), transparent 22%),
    rgba(247,248,245,.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.enterprise-theme.app-mode .content::before { content: ""; position: fixed; z-index: -1; right: 7%; top: 12%; width: 220px; height: 220px; border-radius: 50%; background: rgba(243,215,151,.18); filter: blur(70px); pointer-events: none; }

/* Page transitions: short, interruptible, spatial */
body.enterprise-theme.app-mode .page.act { animation: dashPageIn .42s var(--dash-spring) both; }
body.enterprise-theme.app-mode .ov-reveal { animation: dashCardIn .48s var(--dash-spring) both; }
body.enterprise-theme.app-mode .ov-reveal.d1 { animation-delay: .05s; }
body.enterprise-theme.app-mode .ov-hero { margin: 5px 0 24px; }
body.enterprise-theme.app-mode .ov-greeting { font-size: clamp(28px,3vw,38px); font-weight: 650; letter-spacing: -.045em; }
body.enterprise-theme.app-mode .ov-summary { max-width: 720px; margin-top: 9px; color: var(--dash-muted); font-size: 15px; }

/* Operational brief becomes a floating bento strip */
body.enterprise-theme.app-mode .enterprise-context {
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  background: rgba(255,255,255,.52);
  box-shadow: 0 16px 45px rgba(32,38,32,.07), inset 0 1px 0 #fff;
  backdrop-filter: blur(18px);
}
body.enterprise-theme.app-mode .enterprise-context > div {
  padding: 16px 17px;
  border: 1px solid var(--dash-line);
  border-radius: 15px;
  background: rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 #fff;
  transition: transform .3s var(--dash-spring), box-shadow .3s ease;
}
body.enterprise-theme.app-mode .enterprise-context > div:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(33,38,33,.08); }
body.enterprise-theme.app-mode .enterprise-context > div:first-child { background: linear-gradient(145deg, #252925, #161816); }
body.enterprise-theme.app-mode .enterprise-context .context-primary span { color: rgba(255,255,255,.42); }
body.enterprise-theme.app-mode .enterprise-context .context-primary strong { color: #fff; }
body.enterprise-theme.app-mode .enterprise-context span { color: #848a84; font-size: 9px; letter-spacing: .1em; }
body.enterprise-theme.app-mode .enterprise-context strong { margin-top: 7px; font-size: 12px; }

/* Attention and lifecycle surfaces */
body.enterprise-theme.app-mode .ov-needs {
  padding: 7px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 22px;
  background: rgba(255,255,255,.7);
  box-shadow: 0 16px 42px rgba(32,38,32,.07), inset 0 1px 0 #fff;
}
body.enterprise-theme.app-mode .ov-need { min-height: 66px; border-radius: 16px; transition: transform .28s var(--dash-spring), background .2s ease, box-shadow .25s ease; }
body.enterprise-theme.app-mode .ov-need:hover { background: #fff; transform: translateX(4px); box-shadow: 0 10px 24px rgba(32,38,32,.07); }
body.enterprise-theme.app-mode .ov-need-ic { width: 42px; height: 42px; border-radius: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
body.enterprise-theme.app-mode .service-lifecycle {
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 22px;
  background: rgba(255,255,255,.61);
  box-shadow: 0 16px 42px rgba(32,38,32,.06), inset 0 1px 0 #fff;
}
body.enterprise-theme.app-mode .service-lifecycle-head { padding: 18px 20px 14px; }
body.enterprise-theme.app-mode .lifecycle-grid { gap: 7px; padding: 7px; border: 0; background: rgba(228,231,226,.45); }
body.enterprise-theme.app-mode .lifecycle-step {
  min-height: 98px;
  padding: 16px;
  border: 1px solid var(--dash-line) !important;
  border-radius: 15px;
  background: rgba(255,255,255,.78);
  transition: transform .3s var(--dash-spring), box-shadow .3s ease, background .2s ease;
}
body.enterprise-theme.app-mode .lifecycle-step:hover { z-index: 2; transform: translateY(-4px) scale(1.015); box-shadow: 0 13px 28px rgba(33,38,33,.1); background: #fff; }
body.enterprise-theme.app-mode .lifecycle-step.active { background: linear-gradient(145deg, #fffaf0, #f4e1b3); }
body.enterprise-theme.app-mode .lifecycle-step.attention { background: #fff5f1; }
body.enterprise-theme.app-mode .lifecycle-step::after { left: 16px !important; right: 16px !important; bottom: 9px !important; height: 3px !important; border-radius: 4px; }

/* Segmented controls */
body.enterprise-theme.app-mode .tab-row { width: max-content; max-width: 100%; gap: 4px; padding: 5px; border: 1px solid rgba(255,255,255,.8); border-radius: 15px; background: rgba(255,255,255,.56); box-shadow: inset 0 1px 0 #fff, 0 7px 22px rgba(32,38,32,.05); }
body.enterprise-theme.app-mode .tp { min-height: 38px; padding: 0 17px; border-radius: 11px; font-family: inherit; }
body.enterprise-theme.app-mode .tp:hover { background: rgba(255,255,255,.75); transform: translateY(-1px); }
body.enterprise-theme.app-mode .tp.act { color: #fff; background: linear-gradient(145deg, #353a35, #171917); box-shadow: 0 7px 16px rgba(25,29,25,.18), inset 0 1px 0 rgba(255,255,255,.16); }

/* Hero metrics */
body.enterprise-theme.app-mode .metrics-grid { gap: 13px; }
body.enterprise-theme.app-mode .mc {
  min-height: 142px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(249,250,247,.72));
  box-shadow: 0 18px 42px rgba(32,38,32,.075), inset 0 1px 0 #fff;
  transition: transform .38s var(--dash-spring), box-shadow .35s ease, border-color .2s ease;
}
body.enterprise-theme.app-mode .mc::before { content: ""; position: absolute; right: -24px; top: -26px; width: 86px; height: 86px; border-radius: 50%; background: rgba(83,123,145,.08); transition: transform .5s var(--dash-spring), background .3s ease; }
body.enterprise-theme.app-mode .mc:nth-child(2)::before,
body.enterprise-theme.app-mode .mc:nth-child(4)::before { background: rgba(215,154,43,.11); }
body.enterprise-theme.app-mode .mc:hover { transform: translateY(-8px) scale(1.018); border-color: rgba(255,255,255,.95); box-shadow: 0 28px 58px rgba(32,38,32,.14), inset 0 1px 0 #fff; }
body.enterprise-theme.app-mode .mc:hover::before { transform: scale(1.35); }
body.enterprise-theme.app-mode .mc:active { transform: translateY(-2px) scale(.985) !important; }
body.enterprise-theme.app-mode .mc::after { display: block; top: auto; bottom: 0; left: 18px; right: 18px; height: 4px; border-radius: 4px 4px 0 0; background: linear-gradient(90deg, var(--dash-blue), #8fb4c4); }
body.enterprise-theme.app-mode .mc:nth-child(2)::after,
body.enterprise-theme.app-mode .mc:nth-child(4)::after { background: linear-gradient(90deg, #c98a1d, var(--dash-amber-soft)); }
body.enterprise-theme.app-mode .mc-ey { margin-bottom: 14px; color: #707771; font-size: 9px; letter-spacing: .11em; }
body.enterprise-theme.app-mode .mc-val { position: relative; font-size: 38px; font-weight: 660; letter-spacing: -.045em; }
body.enterprise-theme.app-mode :where(.mc-val.tl,.mc-trend,.wf-stat .n.teal) { color: #4f7182; }

/* Cards shared across every dashboard page.
   NOTE: .bill-checkout is deliberately EXCLUDED — it is a dark "premium checkout" card
   (#122539) whose Change-plan / Stripe-note / Powered-by-Stripe text is light by design.
   Sweeping it into this light-card rule forced a white background under that light text,
   making the whole payment panel light-on-light (Stripe note measured 1.0:1 contrast).
   It keeps its own dark background from the inline stylesheet. */
body.enterprise-theme.app-mode :where(.chart-card,.tbl-card,.pn-card,.loc-page-card,.agent-script-card,.agent-chat-card,.s-card,.wf-stat,.wf-row,.wf-card,.wf-empty,.wf-thread,.cal-wrap,.asst-wrap,.dispatch-board-wrap,.rep-card,.sync-cell,.tm-card) {
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 21px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 16px 38px rgba(32,38,32,.065), inset 0 1px 0 #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.enterprise-theme.app-mode :where(.wf-card,.wf-row,.wf-stat,.pn-card,.loc-page-card,.s-card,.rep-card,.sync-cell,.tm-card) { transition: transform .32s var(--dash-spring), box-shadow .3s ease, border-color .2s ease, background .2s ease; }
body.enterprise-theme.app-mode :where(.wf-card,.wf-row,.wf-stat,.pn-card,.loc-page-card,.s-card,.rep-card,.sync-cell,.tm-card):hover { transform: translateY(-5px); border-color: rgba(255,255,255,.96); background: rgba(255,255,255,.94); box-shadow: 0 24px 48px rgba(32,38,32,.11), inset 0 1px 0 #fff; }
body.enterprise-theme.app-mode .chart-card { padding: 24px; }
body.enterprise-theme.app-mode .tbl-card { overflow: hidden; }
body.enterprise-theme.app-mode .tbl-hd { padding: 19px 22px; border-color: var(--dash-line); }
body.enterprise-theme.app-mode thead,
body.enterprise-theme.app-mode .wf-tbl th { background: rgba(231,234,229,.65); }
body.enterprise-theme.app-mode tbody tr { transition: background .18s ease, transform .22s var(--dash-spring); }
body.enterprise-theme.app-mode tbody tr:hover { background: rgba(255,250,238,.75); }
body.enterprise-theme.app-mode .bar-fill { border-radius: 7px 7px 2px 2px; background: linear-gradient(to top, #41687d, #9ab9c7); box-shadow: 0 5px 13px rgba(65,104,125,.14); }
body.enterprise-theme.app-mode :where(.badge,.wf-badge,.wf-tag,.wf-pill,.trial-pill,.plan-pill) { border-radius: 999px; }

/* Buttons, inputs, icon tiles, chat */
body.enterprise-theme.app-mode :where(.wf-btn,.s-btn,.chat-send,.dispatch-nav-btn.act,.form-submit) {
  min-height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, #353a35, #171917);
  box-shadow: 0 8px 18px rgba(25,29,25,.16), inset 0 1px 0 rgba(255,255,255,.13);
  transition: transform .28s var(--dash-spring), box-shadow .25s ease, filter .2s ease;
}
body.enterprise-theme.app-mode :where(.wf-btn,.s-btn,.chat-send,.dispatch-nav-btn.act,.form-submit):hover { filter: brightness(1.08); transform: translateY(-3px); box-shadow: 0 13px 24px rgba(25,29,25,.22); }
body.enterprise-theme.app-mode :where(.wf-btn,.s-btn,.chat-send,.dispatch-nav-btn.act,.form-submit):active { transform: scale(.96) !important; }
body.enterprise-theme.app-mode :where(.wf-btn-ghost,.wf-btn-sm,.s-btn-ghost,.dispatch-nav-btn,.tbl-action) { min-height: 40px; border-radius: 12px; transition: transform .25s var(--dash-spring), background .2s ease, box-shadow .2s ease; }
body.enterprise-theme.app-mode :where(.wf-btn-ghost,.wf-btn-sm,.s-btn-ghost,.dispatch-nav-btn,.tbl-action):hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(32,38,32,.08); }
body.enterprise-theme.app-mode :where(.wf-in,.s-in,.chat-input,.form-input,.auth-input,.jstage) { min-height: 44px; border-radius: 13px; background: rgba(255,255,255,.82); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
body.enterprise-theme.app-mode :where(.wf-in,.s-in,.chat-input,.form-input,.auth-input,.jstage):focus { border-color: rgba(83,123,145,.55); background: #fff; box-shadow: 0 0 0 4px rgba(83,123,145,.1), 0 10px 22px rgba(32,38,32,.06); outline: 0; }
body.enterprise-theme.app-mode :where(.wf-card-ic,.wf-row-ic,.loc-icon,.ov-need-ic) { border-radius: 14px; }

/* ── Phone: the summary numbers are TEXT, and the row icon is not the subject ────────
   Two leftovers visible the moment the collection screens were compacted.

   1. .wf-stat is in the big card rule above (white fill, border, shadow), so flattening
      it into a line in index.html left four little white boxes with hard edges floating
      in the middle of the page. It has to be released HERE, after that rule — the same
      cascade that made the filter-chip fix silently do nothing.

   2. .wf-row-ic is a 38px block of #111 on EVERY row, so an invoice list read as a column
      of black squares with the customer's name beside them. The name and the amount are
      the subject; the icon is a type marker and should sit behind them. */
@media (max-width: 700px) {
  body.enterprise-theme.app-mode .wf-stats .wf-stat,
  body.enterprise-theme.app-mode .cust-stat-row .cust-stat {
    background: none !important; border: 0 !important; box-shadow: none !important;
    border-radius: 0 !important; }
  body.enterprise-theme.app-mode .wf-stats .wf-stat:hover,
  body.enterprise-theme.app-mode .cust-stat-row .cust-stat:hover { transform: none !important; }
  body.enterprise-theme.app-mode .wf-row .wf-row-ic {
    background: var(--bg2, #EEF3F6) !important; color: var(--ink3, #4A5768) !important;
    width: 30px !important; height: 30px !important; border-radius: 9px !important; }
  body.enterprise-theme.app-mode .wf-row .wf-row-ic svg { width: 15px; height: 15px; }
}
body.enterprise-theme.app-mode .chat-bubble { border-radius: 16px 16px 16px 5px; }
body.enterprise-theme.app-mode .chat-msg.user .chat-bubble { border-radius: 16px 16px 5px 16px; background: linear-gradient(145deg, #343934, #171917); box-shadow: 0 8px 18px rgba(25,29,25,.12); }
body.enterprise-theme.app-mode .chat-av { width: 30px; height: 30px; box-shadow: 0 5px 12px rgba(32,38,32,.1); }

/* Sheets and overlays */
body.enterprise-theme.app-mode :where(.wf-modal,.modal-card) { border: 1px solid rgba(255,255,255,.72); border-radius: 24px; box-shadow: 0 36px 100px rgba(19,23,19,.28), inset 0 1px 0 #fff; animation: dashModalIn .38s var(--dash-spring) both; }
body.enterprise-theme.app-mode :where(#modal,#memberModal,#linkModal,#jobModal,#newJobModal) { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body.enterprise-theme.app-mode #demoTourLauncher { border-radius: 16px !important; background: linear-gradient(145deg, #2f342f, #141614) !important; box-shadow: 0 15px 34px rgba(23,26,23,.28) !important; }

@keyframes dashPageIn { from { opacity: 0; transform: translateY(14px) scale(.988); } to { opacity: 1; transform: none; } }
@keyframes dashCardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dashModalIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes dashPulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 4px rgba(120,197,142,.08); } 50% { opacity: .72; box-shadow: 0 0 0 8px rgba(120,197,142,0); } }

@media (max-width: 1100px) {
  body.enterprise-theme.app-mode #app { gap: 8px; padding: 8px; }
  body.enterprise-theme.app-mode aside { width: 244px; height: calc(100vh - 16px); border-radius: 23px; }
  body.enterprise-theme.app-mode .metrics-grid { grid-template-columns: repeat(2,1fr); }
  body.enterprise-theme.app-mode .enterprise-context { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body.enterprise-theme.app-mode #app { padding: 0; gap: 0; }
  body.enterprise-theme.app-mode aside { height: 100vh; border-radius: 0 24px 24px 0; }
  body.enterprise-theme.app-mode #main { border-radius: 0; }
  body.enterprise-theme.app-mode .topbar { height: 64px; padding: 0 14px; border-radius: 0; }
  body.enterprise-theme.app-mode .tb-status,
  body.enterprise-theme.app-mode .tb-cmd { display: none; }
  body.enterprise-theme.app-mode .content { padding: 20px 14px 48px; border: 0; border-radius: 0; }
  body.enterprise-theme.app-mode .metrics-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  body.enterprise-theme.app-mode .mc { min-height: 126px; padding: 17px; border-radius: 18px; }
  body.enterprise-theme.app-mode .mc-val { font-size: 30px; }
  body.enterprise-theme.app-mode .enterprise-context { grid-template-columns: 1fr; }
  body.enterprise-theme.app-mode .lifecycle-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 430px) {
  body.enterprise-theme.app-mode .metrics-grid { grid-template-columns: 1fr; }
  body.enterprise-theme.app-mode .ov-greeting { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  body.enterprise-theme.app-mode *,
  body.enterprise-theme.app-mode *::before,
  body.enterprise-theme.app-mode *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ─────────────────────────────────────────────────────────────
   Monochrome unification pass
   White is the operational accent. Gold is reserved for upgrade.
   ───────────────────────────────────────────────────────────── */
body.enterprise-theme.app-mode {
  --dash-bg: #e9eae8;
  --dash-paper: rgba(255,255,255,.78);
  --dash-paper-solid: #fff;
  --dash-ink: #0b0c0b;
  --dash-muted: #666a66;
  --dash-line: rgba(0,0,0,.09);
  --dash-amber: #fff;
  --dash-amber-soft: #fff;
  --dash-green: #262926;
  --dash-blue: #1b1d1b;
  --upgrade-gold: #d59b31;
  --upgrade-gold-soft: #f1d28d;
  --teal: #171917;
  --teal-d: #0b0c0b;
  --teal-glow: rgba(0,0,0,.07);
  --orange: var(--upgrade-gold);
  background: #e9eae8;
}

body.enterprise-theme.app-mode #app {
  background:
    radial-gradient(circle at 82% -8%, rgba(255,255,255,.96), transparent 29%),
    radial-gradient(circle at 10% 92%, rgba(255,255,255,.6), transparent 24%),
    linear-gradient(145deg, #dfe1de 0%, #f4f5f3 48%, #e2e4e1 100%);
}
body.enterprise-theme.app-mode aside {
  background:
    radial-gradient(circle at 22% 0%, rgba(255,255,255,.14), transparent 25%),
    linear-gradient(170deg, #191b19 0%, #090a09 72%, #000 100%);
  box-shadow: 0 26px 70px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.12);
}
body.enterprise-theme.app-mode .sb-mark {
  background: linear-gradient(135deg,#27E3B4,#12B894);
  box-shadow: 0 0 25px rgba(255,255,255,.38), 0 10px 28px rgba(0,0,0,.24), inset 0 1px 0 #fff;
}
body.enterprise-theme.app-mode .sb-brand:hover .sb-mark { box-shadow: 0 0 34px rgba(255,255,255,.55), 0 14px 34px rgba(0,0,0,.3); }
body.enterprise-theme.app-mode .sb-agent::after { background: rgba(255,255,255,.1); }
body.enterprise-theme.app-mode .sb-dot,
body.enterprise-theme.app-mode .pn-dot { background: #fff; box-shadow: 0 0 14px rgba(255,255,255,.8); }
body.enterprise-theme.app-mode .nb.act {
  color: #050505;
  background: linear-gradient(145deg, #fff, #dfe1df);
  box-shadow: 0 0 24px rgba(255,255,255,.4), 0 10px 28px rgba(0,0,0,.3), inset 0 1px 0 #fff;
}
body.enterprise-theme.app-mode .nb.act svg { color: #050505; }

body.enterprise-theme.app-mode .content {
  background:
    radial-gradient(circle at 91% 0%, rgba(255,255,255,.98), transparent 22%),
    radial-gradient(circle at 1% 84%, rgba(255,255,255,.6), transparent 25%),
    rgba(242,243,241,.76);
}
body.enterprise-theme.app-mode .content::before { background: rgba(255,255,255,.72); box-shadow: 0 0 85px rgba(255,255,255,.9); }
body.enterprise-theme.app-mode .tb-status { color: #252825; border-color: rgba(0,0,0,.09); background: rgba(255,255,255,.78); box-shadow: 0 0 18px rgba(255,255,255,.72), inset 0 1px 0 #fff; }
body.enterprise-theme.app-mode .enterprise-context > div:first-child { background: linear-gradient(145deg, #242724, #050605); box-shadow: 0 14px 30px rgba(0,0,0,.17); }
body.enterprise-theme.app-mode .enterprise-context > div:first-child:hover { box-shadow: 0 0 25px rgba(255,255,255,.72), 0 17px 34px rgba(0,0,0,.2); }
body.enterprise-theme.app-mode .lifecycle-step.active { border-color: rgba(0,0,0,.18) !important; background: linear-gradient(145deg, #fff, #e5e6e4); box-shadow: 0 0 24px rgba(255,255,255,.95), inset 0 1px 0 #fff; }
body.enterprise-theme.app-mode .lifecycle-step.active::after { background: #111 !important; }
body.enterprise-theme.app-mode .lifecycle-step.attention { background: #f1f2f0; }
body.enterprise-theme.app-mode .lifecycle-step.attention::after { background: #777 !important; }
body.enterprise-theme.app-mode .mc::before,
body.enterprise-theme.app-mode .mc:nth-child(2)::before,
body.enterprise-theme.app-mode .mc:nth-child(4)::before { background: rgba(255,255,255,.88); box-shadow: 0 0 32px rgba(255,255,255,.95); }
body.enterprise-theme.app-mode .mc::after,
body.enterprise-theme.app-mode .mc:nth-child(2)::after,
body.enterprise-theme.app-mode .mc:nth-child(4)::after { background: linear-gradient(90deg, #0b0c0b, #bfc2bf); }
body.enterprise-theme.app-mode :where(.mc-val.tl,.mc-val.or,.mc-trend,.wf-stat .n.teal,.rep-tech-rev,.kanban-card-val,.pn-status) { color: #111; }

/* Calendar: spatial cells, white glow, monochrome events */
body.enterprise-theme.app-mode .cal-wrap { padding: 20px; border-radius: 24px; background: rgba(255,255,255,.72); }
body.enterprise-theme.app-mode .cal-top { margin-bottom: 18px; }
body.enterprise-theme.app-mode .cal-month { color: #111; font-size: 17px; font-weight: 680; letter-spacing: -.02em; }
body.enterprise-theme.app-mode .cal-nav button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0,0,0,.09);
  border-radius: 13px;
  color: #111;
  background: linear-gradient(145deg, #fff, #eceeeb);
  box-shadow: 0 7px 16px rgba(0,0,0,.06), inset 0 1px 0 #fff;
  transition: transform .27s var(--dash-spring), box-shadow .25s ease;
}
body.enterprise-theme.app-mode .cal-nav button.cal-today { width: auto; min-width: 72px; }
body.enterprise-theme.app-mode .cal-nav button:hover { background: #fff; transform: translateY(-3px); box-shadow: 0 0 20px rgba(255,255,255,.95), 0 12px 24px rgba(0,0,0,.1); }
body.enterprise-theme.app-mode .cal-grid { gap: 8px; }
body.enterprise-theme.app-mode .cal-dow { color: #777c77; letter-spacing: .1em; }
body.enterprise-theme.app-mode .cal-cell {
  min-height: 104px;
  padding: 9px;
  border: 1px solid rgba(0,0,0,.075);
  border-radius: 16px;
  background: rgba(255,255,255,.64);
  box-shadow: inset 0 1px 0 #fff;
  transition: transform .3s var(--dash-spring), box-shadow .28s ease, background .2s ease;
}
body.enterprise-theme.app-mode .cal-cell:hover { z-index: 2; background: #fff; transform: translateY(-4px) scale(1.018); box-shadow: 0 0 25px rgba(255,255,255,.95), 0 16px 30px rgba(0,0,0,.1); }
body.enterprise-theme.app-mode .cal-cell.today { border-color: #111; background: #111; box-shadow: 0 0 24px rgba(255,255,255,.9), 0 14px 32px rgba(0,0,0,.22); }
body.enterprise-theme.app-mode .cal-cell.today .cal-daynum { color: #fff; }
body.enterprise-theme.app-mode .cal-daynum { color: #111; }
body.enterprise-theme.app-mode .cal-chip { border: 1px solid rgba(0,0,0,.12); border-left: 3px solid #111; border-radius: 8px; color: #111; background: #eef0ed; }
body.enterprise-theme.app-mode .cal-cell.today .cal-chip { border-color: rgba(255,255,255,.35); border-left-color: #fff; color: #fff; background: rgba(255,255,255,.12); }

/* Locations, phone lines, and settings */
body.enterprise-theme.app-mode .loc-row { margin: 7px; padding: 16px 17px; border: 0; border-radius: 15px; transition: transform .28s var(--dash-spring), background .2s ease, box-shadow .25s ease; }
body.enterprise-theme.app-mode .loc-row:hover { background: #fff; transform: translateX(4px); box-shadow: 0 10px 24px rgba(0,0,0,.07); }
body.enterprise-theme.app-mode .loc-icon { color: #fff; background: #111; box-shadow: 0 0 18px rgba(255,255,255,.88), 0 8px 18px rgba(0,0,0,.18); }
body.enterprise-theme.app-mode .loc-primary,
body.enterprise-theme.app-mode .plan-pill { color: #111; border: 1px solid rgba(0,0,0,.1); background: #eceeeb; }
body.enterprise-theme.app-mode .pn-number-row,
body.enterprise-theme.app-mode #emailConnectBox { border-radius: 16px !important; background: rgba(243,244,242,.88) !important; }
body.enterprise-theme.app-mode .tog.on,
body.enterprise-theme.app-mode .wf-tog.on { background: #111; box-shadow: 0 0 16px rgba(255,255,255,.9); }

/* Dispatch, jobs and field tracking */
body.enterprise-theme.app-mode .dispatch-board-wrap { background: rgba(255,255,255,.75); }
body.enterprise-theme.app-mode .dispatch-tech-hd,
body.enterprise-theme.app-mode .dispatch-time-cell { color: #111; background: rgba(236,238,235,.9); }
body.enterprise-theme.app-mode .dispatch-slot { background: rgba(255,255,255,.42); }
body.enterprise-theme.app-mode .dispatch-slot.now { background: rgba(0,0,0,.035); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
body.enterprise-theme.app-mode .dispatch-job,
body.enterprise-theme.app-mode .dispatch-job.scheduled,
body.enterprise-theme.app-mode .dispatch-job.enroute,
body.enterprise-theme.app-mode .dispatch-job.onsite,
body.enterprise-theme.app-mode .dispatch-job.completed,
body.enterprise-theme.app-mode .dispatch-job.invoiced,
body.enterprise-theme.app-mode .dispatch-job.unassigned { border: 1px solid rgba(0,0,0,.15); border-left: 3px solid #111; border-radius: 10px; color: #111; background: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.09); }
body.enterprise-theme.app-mode .dispatch-job:hover { opacity: 1; transform: translateY(-2px) scale(1.02); box-shadow: 0 0 18px rgba(255,255,255,.95), 0 10px 22px rgba(0,0,0,.15); }
body.enterprise-theme.app-mode #ftMap { border-color: rgba(0,0,0,.12); border-radius: 21px; box-shadow: 0 16px 36px rgba(0,0,0,.12); }
body.enterprise-theme.app-mode .tm-card.sel { border-color: #111; box-shadow: 0 0 0 2px #111, 0 0 24px rgba(255,255,255,.95); }
body.enterprise-theme.app-mode .tm-av { border-radius: 13px; background: #111; box-shadow: 0 7px 16px rgba(0,0,0,.16); }
body.enterprise-theme.app-mode :where(.st-onjob,.st-avail,.st-off,.qbo-on,.qbo-off) { color: #111; background: #e4e6e3; }
body.enterprise-theme.app-mode .fd-dot { background: #111; box-shadow: 0 0 10px rgba(255,255,255,.95); }

/* Customers, work orders, pricebook and reporting */
body.enterprise-theme.app-mode .cust-stat,
body.enterprise-theme.app-mode .kanban-col,
body.enterprise-theme.app-mode .kanban-card,
body.enterprise-theme.app-mode .pb-item {
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 19px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 14px 34px rgba(0,0,0,.065), inset 0 1px 0 #fff;
}
body.enterprise-theme.app-mode :where(.cust-stat,.kanban-card,.pb-item) { transition: transform .32s var(--dash-spring), box-shadow .28s ease, background .2s ease; }
body.enterprise-theme.app-mode :where(.cust-stat,.kanban-card,.pb-item):hover { border-color: #fff; background: #fff; transform: translateY(-6px); box-shadow: 0 0 24px rgba(255,255,255,.98), 0 22px 42px rgba(0,0,0,.11); }
body.enterprise-theme.app-mode .kanban-col { padding-bottom: 5px; background: rgba(225,227,224,.62); }
body.enterprise-theme.app-mode .kanban-col-hd { border-color: rgba(0,0,0,.08); }
body.enterprise-theme.app-mode :where(.cust-tag-vip,.cust-tag-new,.cust-tag-agree,.bg-bk,.bg-es,.bg-in) { border: 1px solid rgba(0,0,0,.1); color: #111; background: #e8eae7; }
body.enterprise-theme.app-mode .pb-cat.act { color: #fff; border-color: #111; background: #111; box-shadow: 0 0 18px rgba(255,255,255,.9), 0 8px 18px rgba(0,0,0,.15); }
body.enterprise-theme.app-mode .pb-item-tier.good,
body.enterprise-theme.app-mode .pb-item-tier.better,
body.enterprise-theme.app-mode .pb-item-tier.best { color: #555; }
body.enterprise-theme.app-mode .pb-item-add { width: 34px; height: 34px; border-radius: 11px; }
body.enterprise-theme.app-mode .pb-item:hover .pb-item-add { color: #fff; border-color: #111; background: #111; }
body.enterprise-theme.app-mode .rep-bar-fill,
body.enterprise-theme.app-mode .bar-fill { background: linear-gradient(to top, #111, #a9ada9); box-shadow: 0 0 12px rgba(255,255,255,.8); }
body.enterprise-theme.app-mode .rep-tech-av { background: #111; box-shadow: 0 0 14px rgba(255,255,255,.86), 0 6px 14px rgba(0,0,0,.15); }

/* Assistant and AI surfaces */
body.enterprise-theme.app-mode .asst-head { background: linear-gradient(145deg, #242724, #050505); }
body.enterprise-theme.app-mode .asst-dot { background: #fff; box-shadow: 0 0 15px #fff; }
body.enterprise-theme.app-mode .asst-msgs { background: rgba(241,242,240,.72); }
body.enterprise-theme.app-mode .asst-input-row input { min-height: 46px; border-radius: 14px; color: #111; background: #fff; }
body.enterprise-theme.app-mode .asst-input-row button { min-height: 46px; border-radius: 14px; color: #fff; background: #111; box-shadow: 0 9px 20px rgba(0,0,0,.18); }
body.enterprise-theme.app-mode .chat-av.ai { color: #fff; background: #111; box-shadow: 0 0 15px rgba(255,255,255,.85), 0 6px 14px rgba(0,0,0,.15); }
body.enterprise-theme.app-mode .chat-msg.ai .chat-bubble { border-color: rgba(0,0,0,.1); background: #f0f1ef; }

/* Generic workflow modules produced dynamically */
body.enterprise-theme.app-mode :where(.wf-card,.wf-row,.wf-stat,.wf-thread,.wf-empty,.wf-modal,.wf-section,.wf-panel) { color: #111; }
body.enterprise-theme.app-mode :where(.wf-card-ic,.wf-row-ic) { color: #fff; background: #111 !important; box-shadow: 0 0 16px rgba(255,255,255,.9), 0 7px 16px rgba(0,0,0,.16); }
body.enterprise-theme.app-mode :where(.wf-progress-fill,.wf-bar-fill) { background: linear-gradient(90deg, #111, #aaa) !important; }
body.enterprise-theme.app-mode :where(.wf-btn,.s-btn,.chat-send,.dispatch-nav-btn.act,.form-submit) { color: #fff; background: linear-gradient(145deg, #292c29, #050505); }

/* Gold is intentionally exclusive to commercial upgrade surfaces */
body.enterprise-theme.app-mode .trial-pill {
  color: #77510e;
  border-color: rgba(213,155,49,.35);
  background: linear-gradient(145deg, #fff8e8, #f5dfad);
  box-shadow: 0 0 20px rgba(213,155,49,.18), inset 0 1px 0 #fff;
}
body.enterprise-theme.app-mode .trial-upgrade {
  color: #1b1306;
  background: linear-gradient(145deg, var(--upgrade-gold-soft), var(--upgrade-gold));
  box-shadow: 0 7px 16px rgba(175,116,20,.22), inset 0 1px 0 rgba(255,255,255,.55);
}
body.enterprise-theme.app-mode #planExplorer {
  padding: 16px;
  border: 1px solid rgba(213,155,49,.3);
  border-radius: 17px;
  background: linear-gradient(145deg, #fffaf0, #f8e8c1);
  box-shadow: 0 0 22px rgba(213,155,49,.12), inset 0 1px 0 #fff;
}
body.enterprise-theme.app-mode #planExplorer:empty { display: none; }
body.enterprise-theme.app-mode #planExplorer button { border-color: rgba(135,86,10,.3) !important; }
body.enterprise-theme.app-mode #planExplorer button:last-child { color: #211706 !important; background: linear-gradient(145deg, var(--upgrade-gold-soft), var(--upgrade-gold)) !important; box-shadow: 0 8px 18px rgba(175,116,20,.18); }

@keyframes dashPulse { 0%,100% { opacity: 1; box-shadow: 0 0 8px rgba(255,255,255,.72); } 50% { opacity: .7; box-shadow: 0 0 20px rgba(255,255,255,1); } }

/* Inline legacy controls and dynamically injected modules */
body.enterprise-theme.app-mode [style*="background:var(--teal)"]:not(.trial-upgrade) { color: #fff !important; background: #111 !important; box-shadow: 0 8px 18px rgba(0,0,0,.16), 0 0 14px rgba(255,255,255,.7); }
body.enterprise-theme.app-mode .agent-script-card span[style*="#FFFBEB"] { color: #111 !important; border-color: rgba(0,0,0,.12) !important; background: #fff !important; box-shadow: 0 0 15px rgba(255,255,255,.95); }
body.enterprise-theme.app-mode :where(.st-new,.st-draft,.st-open,.st-ordered,.st-active,.st-sent,.st-quoted,.st-pending,.st-enroute,.st-approved,.st-paid,.st-converted,.st-completed,.st-received,.st-connected,.st-on,.st-overdue,.st-low,.st-lost,.st-emergency,.st-off,.st-urgent,.st-scheduled) { color: #111 !important; background: #e6e8e5 !important; border: 1px solid rgba(0,0,0,.08); }
body.enterprise-theme.app-mode .wf-stat .n.red,
body.enterprise-theme.app-mode .wf-stat .n.amber { color: #111 !important; }
body.enterprise-theme.app-mode .wf-tag { color: #111; background: #e7e9e6; }
body.enterprise-theme.app-mode .wf-bars .b { background: linear-gradient(180deg,#999,#111); box-shadow: 0 0 12px rgba(255,255,255,.8); }
body.enterprise-theme.app-mode .wf-tbl { overflow: hidden; border-radius: 18px; background: rgba(255,255,255,.76); box-shadow: 0 14px 34px rgba(0,0,0,.06); }
body.enterprise-theme.app-mode .wf-av { background: #111 !important; box-shadow: 0 0 14px rgba(255,255,255,.85), 0 6px 14px rgba(0,0,0,.16); }

/* Calendar and pricebook modals share the same floating sheet language */
body.enterprise-theme.app-mode :where(#dayViewModal,#apptModal,#pbModal,#specModal) { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body.enterprise-theme.app-mode :where(#dayViewModal,#apptModal,#pbModal,#specModal) > div { border: 1px solid rgba(255,255,255,.78); border-radius: 24px !important; background: rgba(255,255,255,.9) !important; box-shadow: 0 36px 100px rgba(0,0,0,.28), inset 0 1px 0 #fff !important; }
body.enterprise-theme.app-mode :where(#dayViewModal,#apptModal,#pbModal,#specModal) :where(input,select,textarea) { min-height: 44px; border-radius: 13px !important; background: #fff; }

/* Upgrade retains its deliberately unique gold signal after inline overrides. */
body.enterprise-theme.app-mode .trial-upgrade { color: #1b1306 !important; background: linear-gradient(145deg, var(--upgrade-gold-soft), var(--upgrade-gold)) !important; box-shadow: 0 7px 16px rgba(175,116,20,.22), inset 0 1px 0 rgba(255,255,255,.55) !important; }
body.enterprise-theme.app-mode #planExplorer button { color: #211706 !important; background: rgba(255,255,255,.64) !important; box-shadow: none; }
body.enterprise-theme.app-mode #planExplorer button:last-child { color: #211706 !important; background: linear-gradient(145deg, var(--upgrade-gold-soft), var(--upgrade-gold)) !important; box-shadow: 0 8px 18px rgba(175,116,20,.18) !important; }

/* Neutralize old amber literals in generated operational content. */
body.enterprise-theme.app-mode [style*="#B45309"]:not(#planExplorer *),
body.enterprise-theme.app-mode [style*="#D97706"]:not(#planExplorer *) { color: #111 !important; }
body.enterprise-theme.app-mode [style*="rgba(217,119,6"]:not(#planExplorer *) { color: #111 !important; background: #eceeeb !important; }
body.enterprise-theme.app-mode [style*="background:#F59E0B"]:not(#planExplorer *),
body.enterprise-theme.app-mode [style*="background:#D97706"]:not(#planExplorer *),
body.enterprise-theme.app-mode [style*="background:#FFFBEB"]:not(#planExplorer *) { background: #e6e8e5 !important; color: #111 !important; }
body.enterprise-theme.app-mode [style*="border-left:3px solid #F59E0B"] { border-left-color: #111 !important; }
body.enterprise-theme.app-mode svg [stroke="#D97706"],
body.enterprise-theme.app-mode svg[stroke="#D97706"] { stroke: #111 !important; }

/* Command Center hero: a premium anchor in both appearance modes. */
body.enterprise-theme.app-mode .ov-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 32px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 25px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 30%, rgba(255,255,255,.18), transparent 18%),
    linear-gradient(145deg, #242624, #050605 72%);
  box-shadow: 0 28px 65px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.12);
}
body.enterprise-theme.app-mode .ov-hero::before { content: ""; position: absolute; right: -45px; top: -62px; width: 180px; height: 180px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.025), 0 0 0 58px rgba(255,255,255,.015); }
body.enterprise-theme.app-mode .ov-greeting { position: relative; z-index: 1; color: #fff; text-shadow: 0 0 22px rgba(255,255,255,.16); }
body.enterprise-theme.app-mode .ov-summary { position: relative; z-index: 1; color: rgba(255,255,255,.56); }

/* Two intentional appearance choices in Settings. */
body.enterprise-theme.app-mode .appearance-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 18px; }
body.enterprise-theme.app-mode .appearance-choice { min-height: 116px; display: flex; align-items: center; gap: 15px; padding: 14px; border: 1px solid var(--bdr2); border-radius: 18px; color: var(--ink); background: rgba(255,255,255,.48); cursor: pointer; font-family: inherit; text-align: left; transition: transform .3s var(--dash-spring), box-shadow .28s ease, border-color .2s ease; }
body.enterprise-theme.app-mode .appearance-choice:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(0,0,0,.1), 0 0 20px rgba(255,255,255,.8); }
body.enterprise-theme.app-mode .appearance-choice.selected { border-color: currentColor; box-shadow: 0 0 0 2px var(--w), 0 0 0 4px var(--ink), 0 16px 32px rgba(0,0,0,.11); }
body.enterprise-theme.app-mode .appearance-preview { position: relative; flex: none; width: 84px; height: 76px; overflow: hidden; display: block; border-radius: 15px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
body.enterprise-theme.app-mode .appearance-preview i,
body.enterprise-theme.app-mode .appearance-preview b,
body.enterprise-theme.app-mode .appearance-preview em { position: absolute; display: block; border-radius: 7px; }
body.enterprise-theme.app-mode .appearance-preview i { left: 8px; top: 8px; bottom: 8px; width: 18px; }
body.enterprise-theme.app-mode .appearance-preview b { left: 33px; right: 8px; top: 9px; height: 20px; }
body.enterprise-theme.app-mode .appearance-preview em { left: 33px; right: 8px; top: 36px; bottom: 9px; }
body.enterprise-theme.app-mode .appearance-preview.obsidian { background: #050505; box-shadow: 0 0 20px rgba(255,255,255,.14), inset 0 1px 0 rgba(255,255,255,.18); }
body.enterprise-theme.app-mode .appearance-preview.obsidian i { background: #222; }
body.enterprise-theme.app-mode .appearance-preview.obsidian b { background: #fff; box-shadow: 0 0 12px rgba(255,255,255,.65); }
body.enterprise-theme.app-mode .appearance-preview.obsidian em { background: #171717; border: 1px solid #333; }
body.enterprise-theme.app-mode .appearance-preview.porcelain { background: #f2f3f1; border: 1px solid #dedfdd; }
body.enterprise-theme.app-mode .appearance-preview.porcelain i { background: #111; }
body.enterprise-theme.app-mode .appearance-preview.porcelain b { background: #fff; border: 1px solid #ddd; }
body.enterprise-theme.app-mode .appearance-preview.porcelain em { background: #111; }
body.enterprise-theme.app-mode .appearance-choice-copy { min-width: 0; }
body.enterprise-theme.app-mode .appearance-choice-copy strong,
body.enterprise-theme.app-mode .appearance-choice-copy small { display: block; }
body.enterprise-theme.app-mode .appearance-choice-copy strong { font-size: 13px; font-weight: 700; }
body.enterprise-theme.app-mode .appearance-choice-copy small { margin-top: 5px; color: var(--ink4); font-size: 10.5px; line-height: 1.4; }
body.enterprise-theme.app-mode :where(a,button,input,select,textarea):focus-visible { outline: 3px solid rgba(0,0,0,.72); outline-offset: 3px; }

/* ═══════════════════════════════════════════════════════════
   OBSIDIAN — predominantly black, shaped by white light
   ═══════════════════════════════════════════════════════════ */
html[data-theme="obsidian"] body.enterprise-theme.app-mode {
  color-scheme: dark;
  --dash-bg: #030403;
  --dash-paper: rgba(18,19,18,.86);
  --dash-paper-solid: #111211;
  --dash-ink: #f4f5f3;
  --dash-muted: #a3a7a3;
  --dash-line: rgba(255,255,255,.1);
  --w: #111211;
  --bg: #030403;
  --bg2: #1a1c1a;
  --bdr: rgba(255,255,255,.09);
  --bdr2: rgba(255,255,255,.17);
  --ink: #f4f5f3;
  --ink2: #d7d9d6;
  --ink3: #b0b4b0;
  --ink4: #5d635d;
  --teal: #fff;
  --teal-d: #fff;
  --teal-glow: rgba(255,255,255,.09);
  background: #000;
}
html[data-theme="obsidian"] body.enterprise-theme.app-mode #app { background: radial-gradient(circle at 84% -8%, rgba(255,255,255,.11), transparent 26%), radial-gradient(circle at 18% 100%, rgba(255,255,255,.055), transparent 26%), #000; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode #main { background: #030403; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .topbar { border-color: rgba(255,255,255,.1); color: var(--ink); background: rgba(13,14,13,.78); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 16px 48px rgba(0,0,0,.38); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .tb-cmd { color: #aaa; border-color: rgba(255,255,255,.11); background: rgba(255,255,255,.055); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .tb-cmd:hover { color: #fff; background: rgba(255,255,255,.1); box-shadow: 0 0 22px rgba(255,255,255,.12); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .tb-cmd kbd { color: #ddd; background: #252725; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .tb-status { color: #fff; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.07); box-shadow: 0 0 18px rgba(255,255,255,.1), inset 0 1px 0 rgba(255,255,255,.1); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .content { border-color: rgba(255,255,255,.07); background: radial-gradient(circle at 92% 0%, rgba(255,255,255,.09), transparent 21%), radial-gradient(circle at 0% 84%, rgba(255,255,255,.045), transparent 24%), #050605; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .content::before { background: rgba(255,255,255,.1); box-shadow: 0 0 95px rgba(255,255,255,.14); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .appearance-choice { color: #f4f5f3; border-color: rgba(255,255,255,.12); background: #151615; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .appearance-choice:hover { background: #1d1f1d; box-shadow: 0 0 22px rgba(255,255,255,.1), 0 18px 36px rgba(0,0,0,.4); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .appearance-choice.selected { border-color: #fff; box-shadow: 0 0 0 2px #111, 0 0 0 4px #fff, 0 0 25px rgba(255,255,255,.2); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .appearance-choice-copy small { color: #8d928d; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(a,button,input,select,textarea):focus-visible { outline-color: rgba(255,255,255,.9); }

html[data-theme="obsidian"] body.enterprise-theme.app-mode .ov-hero { border-color: rgba(255,255,255,.16); background: radial-gradient(circle at 86% 28%, rgba(255,255,255,.2), transparent 18%), linear-gradient(145deg, #202220, #000 72%); box-shadow: 0 0 35px rgba(255,255,255,.055), 0 30px 75px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.15); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context,
html[data-theme="obsidian"] body.enterprise-theme.app-mode .ov-needs,
html[data-theme="obsidian"] body.enterprise-theme.app-mode .service-lifecycle,
html[data-theme="obsidian"] body.enterprise-theme.app-mode .tab-row { border-color: rgba(255,255,255,.1); background: rgba(14,15,14,.78); box-shadow: 0 18px 48px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.07); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context > div { border-color: rgba(255,255,255,.09); color: #fff; background: #151615; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context > div:first-child { color: #080908; background: linear-gradient(145deg, #fff, #dfe1df); box-shadow: 0 0 28px rgba(255,255,255,.22), 0 14px 30px rgba(0,0,0,.28); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context > div:first-child span { color: #777; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context > div:first-child strong { color: #090a09; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context span { color: #777d77; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context strong { color: #f2f3f1; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context > div:first-child { color:#f4f6f5; background:#151816; box-shadow:none; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context > div:first-child span { color:#8fa09a; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .enterprise-context > div:first-child strong { color:#f5f7f6; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .ov-need { color: #fff; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .ov-need:hover { background: #1c1e1c; box-shadow: 0 0 24px rgba(255,255,255,.08); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .ov-need-ic { color: #111; background: #fff; box-shadow: 0 0 17px rgba(255,255,255,.28); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .lifecycle-grid { background: rgba(255,255,255,.025); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .lifecycle-step { border-color: rgba(255,255,255,.09) !important; color: #fff; background: #121312; box-shadow: inset 0 1px 0 rgba(255,255,255,.055); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .lifecycle-step:hover { background: #1c1e1c; box-shadow: 0 0 24px rgba(255,255,255,.1), 0 16px 30px rgba(0,0,0,.4); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .lifecycle-step.active { color: #111; border-color: #fff !important; background: #fff; box-shadow: 0 0 27px rgba(255,255,255,.36); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .lifecycle-step.active :where(span,strong,small) { color: #111; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .lifecycle-step.active::after { background: #111 !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .lifecycle-step.attention { background: #202220; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .tp { color: #929792; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .tp:hover { color: #fff; background: rgba(255,255,255,.08); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .tp.act { color: #090a09; background: #fff; box-shadow: 0 0 21px rgba(255,255,255,.28); }

html[data-theme="obsidian"] body.enterprise-theme.app-mode .mc { border-color: rgba(255,255,255,.1); color: #fff; background: linear-gradient(145deg, rgba(27,29,27,.96), rgba(10,11,10,.92)); box-shadow: 0 22px 50px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .mc:hover { border-color: rgba(255,255,255,.24); box-shadow: 0 0 28px rgba(255,255,255,.11), 0 30px 58px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.12); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .mc:nth-child(2) { color: #111; border-color: #fff; background: linear-gradient(145deg, #fff, #dfe1df); box-shadow: 0 0 30px rgba(255,255,255,.22), 0 24px 54px rgba(0,0,0,.45); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .mc :where(.mc-val,.mc-val.tl,.mc-val.or,.mc-trend) { color: #f4f5f3; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .mc:nth-child(2) :where(.mc-ey,.mc-val,.mc-val.tl,.mc-val.or,.mc-trend) { color: #111; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .mc::before { background: rgba(255,255,255,.055); box-shadow: 0 0 32px rgba(255,255,255,.08); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .mc:nth-child(2)::before { background: rgba(0,0,0,.06); box-shadow: none; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .mc::after { background: linear-gradient(90deg, #fff, #555); }

/* Dark shared surfaces across every static and generated page. */
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.chart-card,.tbl-card,.pn-card,.loc-page-card,.agent-script-card,.agent-chat-card,.s-card,.wf-stat,.wf-row,.wf-card,.wf-empty,.wf-thread,.cal-wrap,.asst-wrap,.dispatch-board-wrap,.rep-card,.sync-cell,.tm-card,.cust-stat,.kanban-col,.kanban-card,.pb-item,.wf-tbl) { border-color: rgba(255,255,255,.095) !important; color: var(--ink); background: rgba(17,18,17,.9) !important; box-shadow: 0 18px 44px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.wf-card,.wf-row,.wf-stat,.pn-card,.loc-page-card,.s-card,.rep-card,.sync-cell,.tm-card,.cust-stat,.kanban-card,.pb-item):hover { border-color: rgba(255,255,255,.24) !important; background: #1b1d1b !important; box-shadow: 0 0 25px rgba(255,255,255,.095), 0 25px 52px rgba(0,0,0,.5); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.chart-title,.tbl-title,.pn-hd,.loc-name,.s-h,.wf-h1,.wf-card-t,.wf-row-t,.wf-empty-t,.rep-card-h,.cust-stat-val,.kanban-card-name,.pb-item-name,.pb-item-price,.dispatch-date,.cal-month) { color: #f4f5f3 !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.chart-sub,.pn-sub,.loc-detail,.s-sub,.wf-h1sub,.wf-card-d,.wf-row-s,.wf-empty-p,.rep-card-sub,.cust-stat-lbl,.kanban-card-issue,.pb-item-desc,.pb-item-duration) { color: #8e948e !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.tbl-hd,.wf-tbl th,thead,.kanban-col-hd) { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.035) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(td,th,.wf-tbl td,.wf-tbl th) { color: var(--ink); border-color: rgba(255,255,255,.07); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode tbody tr:hover { background: rgba(255,255,255,.045); }

/* Obsidian calendar */
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-wrap { background: rgba(14,15,14,.94) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-nav button { color: #fff; border-color: rgba(255,255,255,.11); background: linear-gradient(145deg,#242624,#101110); box-shadow: 0 8px 18px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.08); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-nav button:hover { background: #292b29; box-shadow: 0 0 20px rgba(255,255,255,.12), 0 13px 25px rgba(0,0,0,.42); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-dow { color: #787d78; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-cell { border-color: rgba(255,255,255,.085); color: #fff; background: #111211; box-shadow: inset 0 1px 0 rgba(255,255,255,.045); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-cell:hover { background: #1b1d1b; box-shadow: 0 0 24px rgba(255,255,255,.1), 0 17px 32px rgba(0,0,0,.48); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-daynum { color: #f2f3f1; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-cell.today { border-color: #fff; background: #fff; box-shadow: 0 0 30px rgba(255,255,255,.34), 0 15px 36px rgba(0,0,0,.5); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-cell.today .cal-daynum { color: #0b0c0b; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-chip { color: #e7e9e6; border-color: rgba(255,255,255,.13); border-left-color: #fff; background: #242624; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-cell.today .cal-chip { color: #111; border-color: rgba(0,0,0,.16); border-left-color: #111; background: #e5e7e4; }

/* Obsidian controls, inputs, boards, chat and modals */
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.wf-in,.s-in,.chat-input,.form-input,.auth-input,.jstage,.cust-search,.asst-input-row input) { color: #f4f5f3; border-color: rgba(255,255,255,.13); background: #151615; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.wf-in,.s-in,.chat-input,.form-input,.auth-input,.jstage,.cust-search,.asst-input-row input):focus { border-color: #fff; background: #1c1e1c; box-shadow: 0 0 0 4px rgba(255,255,255,.08), 0 0 20px rgba(255,255,255,.08); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.pn-number-row,#emailConnectBox,.asst-msgs,.dispatch-tech-hd,.dispatch-time-cell,.kanban-col) { color: var(--ink); border-color: rgba(255,255,255,.08) !important; background: #0d0e0d !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .loc-row:hover { background: #1c1e1c; box-shadow: 0 0 22px rgba(255,255,255,.08); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .loc-icon,
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.wf-card-ic,.wf-row-ic) { color: #111; background: #fff !important; box-shadow: 0 0 18px rgba(255,255,255,.28); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.loc-primary,.plan-pill,.wf-tag,.wf-pill,.wf-badge,.badge,.cust-tag) { color: #e9ebe8 !important; border-color: rgba(255,255,255,.1) !important; background: #242624 !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .dispatch-slot { border-color: rgba(255,255,255,.065); background: rgba(255,255,255,.015); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .dispatch-job { color: #111 !important; border-color: #ddd; border-left-color: #111; background: #f4f5f3 !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .chat-msg.ai .chat-bubble { color: #eee; border-color: rgba(255,255,255,.1); background: #202220; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .chat-msg.user .chat-bubble { color: #111; background: #fff; box-shadow: 0 0 18px rgba(255,255,255,.15); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .asst-head { background: #050505; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.wf-modal,.modal-card,#dayViewModal>div,#apptModal>div,#pbModal>div,#specModal>div) { color: var(--ink); border-color: rgba(255,255,255,.12) !important; background: rgba(17,18,17,.97) !important; box-shadow: 0 0 32px rgba(255,255,255,.065), 0 38px 110px rgba(0,0,0,.68) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(#dayViewModal,#apptModal,#pbModal,#specModal) :where(input,select,textarea) { color: #fff; border-color: rgba(255,255,255,.14); background: #181a18; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode [style*="background:#fff"],
html[data-theme="obsidian"] body.enterprise-theme.app-mode [style*="background:#FFF"],
html[data-theme="obsidian"] body.enterprise-theme.app-mode [style*="background:white"],
html[data-theme="obsidian"] body.enterprise-theme.app-mode [style*="background:#F8FAFB"] { color: var(--ink); background: #151615 !important; }

/* Keep upgrade gold in both themes, including inside Obsidian. */
html[data-theme="obsidian"] body.enterprise-theme.app-mode .trial-pill { color: #f5dfad; border-color: rgba(213,155,49,.35); background: rgba(116,78,13,.24); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode #planExplorer { color: #211706; border-color: rgba(213,155,49,.34); background: linear-gradient(145deg,#fff6df,#f1d28d) !important; box-shadow: 0 0 26px rgba(213,155,49,.13), inset 0 1px 0 #fff; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode #planExplorer :where(div,span,strong,small,li) { color: #211706 !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode #planExplorer button { color: #211706 !important; background: rgba(255,255,255,.65) !important; }

@media (max-width: 760px) {
  body.enterprise-theme.app-mode .appearance-choices { grid-template-columns: 1fr; }
  body.enterprise-theme.app-mode .ov-hero { padding: 25px 22px; }
}

/* ═══════════════════════════════════════════════════════════
   Semantic color layer — color communicates state, never decoration
   ═══════════════════════════════════════════════════════════ */
body.enterprise-theme.app-mode {
  --sys-blue: #0066cc;
  --sys-blue-bg: #e8f2ff;
  --sys-green: #166e2f;
  --sys-green-bg: #e9f7ed;
  --sys-orange: #9a5200;
  --sys-orange-bg: #fff1dd;
  --sys-red: #c7192e;
  --sys-red-bg: #ffeaed;
  --sys-purple: #7840a0;
  --sys-purple-bg: #f3eafb;
  --sys-cyan: #087b9b;
  --sys-cyan-bg: #e2f7fc;
}
html[data-theme="obsidian"] body.enterprise-theme.app-mode {
  --sys-blue: #64a8ff;
  --sys-blue-bg: rgba(10,132,255,.16);
  --sys-green: #54d875;
  --sys-green-bg: rgba(48,209,88,.15);
  --sys-orange: #ffb340;
  --sys-orange-bg: rgba(255,159,10,.16);
  --sys-red: #ff6961;
  --sys-red-bg: rgba(255,69,58,.16);
  --sys-purple: #d18aff;
  --sys-purple-bg: rgba(191,90,242,.16);
  --sys-cyan: #67d9f4;
  --sys-cyan-bg: rgba(100,210,255,.15);
}

/* Live and connected states */
body.enterprise-theme.app-mode :where(.sb-dot,.pn-dot,.asst-dot,.fd-dot) { background: var(--sys-green) !important; box-shadow: 0 0 14px color-mix(in srgb, var(--sys-green) 55%, transparent) !important; }
body.enterprise-theme.app-mode :where(.pn-status,.qbo-on,.st-onjob) { color: var(--sys-green) !important; }
body.enterprise-theme.app-mode .tb-status { color: var(--sys-green); border-color: color-mix(in srgb, var(--sys-green) 22%, transparent); background: var(--sys-green-bg); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .tb-status { color: var(--sys-green); border-color: color-mix(in srgb, var(--sys-green) 28%, transparent); background: var(--sys-green-bg); }

/* Command Center metrics — distinct series, still restrained */
body.enterprise-theme.app-mode #mc-calls :where(.mc-val,.mc-trend) { color: var(--sys-blue); }
body.enterprise-theme.app-mode #mc-booked :where(.mc-val,.mc-trend) { color: var(--sys-green); }
body.enterprise-theme.app-mode #mc-rate :where(.mc-val,.mc-trend) { color: var(--sys-purple); }
body.enterprise-theme.app-mode #mc-rev :where(.mc-val,.mc-trend) { color: var(--sys-orange); }
body.enterprise-theme.app-mode #mc-calls::after { background: linear-gradient(90deg,var(--sys-blue),color-mix(in srgb,var(--sys-blue) 35%,white)); }
body.enterprise-theme.app-mode #mc-booked::after { background: linear-gradient(90deg,var(--sys-green),color-mix(in srgb,var(--sys-green) 35%,white)); }
body.enterprise-theme.app-mode #mc-rate::after { background: linear-gradient(90deg,var(--sys-purple),color-mix(in srgb,var(--sys-purple) 35%,white)); }
body.enterprise-theme.app-mode #mc-rev::after { background: linear-gradient(90deg,var(--sys-orange),color-mix(in srgb,var(--sys-orange) 35%,white)); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode #mc-booked :where(.mc-val,.mc-trend) { color: #187a34; }

/* Lifecycle and attention */
body.enterprise-theme.app-mode .lifecycle-step.active::after { background: var(--sys-blue) !important; }
body.enterprise-theme.app-mode .lifecycle-step.attention::after { background: var(--sys-orange) !important; }
body.enterprise-theme.app-mode .ov-need-ic.ok { color: var(--sys-green); background: var(--sys-green-bg); }
body.enterprise-theme.app-mode .ov-need-ic.info { color: var(--sys-blue); background: var(--sys-blue-bg); }
body.enterprise-theme.app-mode .ov-need-ic:not(.ok):not(.info) { color: var(--sys-orange); background: var(--sys-orange-bg); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .ov-need-ic { box-shadow: none; }

/* Calendar bookings are informational blue; today remains the contrast anchor */
body.enterprise-theme.app-mode .cal-chip { color: var(--sys-blue); border-color: color-mix(in srgb,var(--sys-blue) 24%,transparent); border-left-color: var(--sys-blue); background: var(--sys-blue-bg); }
body.enterprise-theme.app-mode .cal-cell.today .cal-chip { color: #dcecff; border-color: rgba(255,255,255,.2); border-left-color: #72b0ff; background: rgba(10,132,255,.24); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-chip { color: var(--sys-blue); border-color: rgba(100,168,255,.2); border-left-color: var(--sys-blue); background: var(--sys-blue-bg); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cal-cell.today .cal-chip { color: #0757a8; border-color: rgba(0,102,204,.18); border-left-color: #0066cc; background: #e8f2ff; }

/* Workflow and call-status pills */
body.enterprise-theme.app-mode :where(.st-approved,.st-paid,.st-converted,.st-completed,.st-received,.st-connected,.st-on,.bg-bk) { color: var(--sys-green) !important; border-color: color-mix(in srgb,var(--sys-green) 22%,transparent) !important; background: var(--sys-green-bg) !important; }
body.enterprise-theme.app-mode :where(.st-sent,.st-quoted,.st-pending,.st-enroute) { color: var(--sys-blue) !important; border-color: color-mix(in srgb,var(--sys-blue) 22%,transparent) !important; background: var(--sys-blue-bg) !important; }
body.enterprise-theme.app-mode :where(.st-urgent,.st-scheduled,.bg-in) { color: var(--sys-orange) !important; border-color: color-mix(in srgb,var(--sys-orange) 22%,transparent) !important; background: var(--sys-orange-bg) !important; }
body.enterprise-theme.app-mode :where(.st-overdue,.st-low,.st-lost,.st-emergency,.st-off,.bg-es) { color: var(--sys-red) !important; border-color: color-mix(in srgb,var(--sys-red) 22%,transparent) !important; background: var(--sys-red-bg) !important; }
body.enterprise-theme.app-mode :where(.st-new,.st-draft,.st-open,.st-ordered,.st-active) { color: var(--ink3) !important; border-color: var(--bdr) !important; background: var(--bg2) !important; }

/* Dispatch stages */
body.enterprise-theme.app-mode .dispatch-job.scheduled { color: var(--sys-blue) !important; border-color: color-mix(in srgb,var(--sys-blue) 28%,transparent); border-left-color: var(--sys-blue); background: var(--sys-blue-bg) !important; }
body.enterprise-theme.app-mode .dispatch-job.enroute { color: var(--sys-orange) !important; border-color: color-mix(in srgb,var(--sys-orange) 28%,transparent); border-left-color: var(--sys-orange); background: var(--sys-orange-bg) !important; }
body.enterprise-theme.app-mode .dispatch-job.onsite { color: var(--sys-cyan) !important; border-color: color-mix(in srgb,var(--sys-cyan) 28%,transparent); border-left-color: var(--sys-cyan); background: var(--sys-cyan-bg) !important; }
body.enterprise-theme.app-mode .dispatch-job.completed { color: var(--sys-green) !important; border-color: color-mix(in srgb,var(--sys-green) 28%,transparent); border-left-color: var(--sys-green); background: var(--sys-green-bg) !important; }
body.enterprise-theme.app-mode .dispatch-job.invoiced { color: var(--sys-purple) !important; border-color: color-mix(in srgb,var(--sys-purple) 28%,transparent); border-left-color: var(--sys-purple); background: var(--sys-purple-bg) !important; }
body.enterprise-theme.app-mode .dispatch-job.unassigned { color: var(--sys-red) !important; border-color: color-mix(in srgb,var(--sys-red) 28%,transparent); border-left-color: var(--sys-red); background: var(--sys-red-bg) !important; }

/* Customer, pricebook, reporting and chart meaning */
body.enterprise-theme.app-mode .cust-tag-vip { color: var(--sys-orange) !important; background: var(--sys-orange-bg) !important; }
body.enterprise-theme.app-mode .cust-tag-new { color: var(--sys-blue) !important; background: var(--sys-blue-bg) !important; }
body.enterprise-theme.app-mode .cust-tag-agree { color: var(--sys-purple) !important; background: var(--sys-purple-bg) !important; }
body.enterprise-theme.app-mode .pb-item-tier.good { color: var(--sys-blue); }
body.enterprise-theme.app-mode .pb-item-tier.better { color: var(--sys-green); }
body.enterprise-theme.app-mode .pb-item-tier.best { color: var(--sys-purple); }
body.enterprise-theme.app-mode .bar-fill,
body.enterprise-theme.app-mode .rep-bar-fill { background: linear-gradient(to top,var(--sys-blue),color-mix(in srgb,var(--sys-blue) 44%,white)); box-shadow: 0 6px 15px color-mix(in srgb,var(--sys-blue) 18%,transparent); }
body.enterprise-theme.app-mode .wf-bars .b,
body.enterprise-theme.app-mode :where(.wf-progress-fill,.wf-bar-fill) { background: linear-gradient(180deg,var(--sys-blue),color-mix(in srgb,var(--sys-blue) 48%,black)) !important; }
body.enterprise-theme.app-mode .wf-stat .n.red { color: var(--sys-red) !important; }
body.enterprise-theme.app-mode .wf-stat .n.amber { color: var(--sys-orange) !important; }
body.enterprise-theme.app-mode .wf-stat .n.teal { color: var(--sys-green) !important; }

/* Obsidian-specific semantic states outrank the dark surface rules above. */
html[data-theme="obsidian"] body.enterprise-theme.app-mode .lifecycle-step.active::after { background: var(--sys-blue) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .lifecycle-step.attention::after { background: var(--sys-orange) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .ov-need-ic.ok { color: var(--sys-green); background: var(--sys-green-bg); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .ov-need-ic.info { color: var(--sys-blue); background: var(--sys-blue-bg); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .ov-need-ic:not(.ok):not(.info) { color: var(--sys-orange); background: var(--sys-orange-bg); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.st-approved,.st-paid,.st-converted,.st-completed,.st-received,.st-connected,.st-on,.bg-bk) { color: var(--sys-green) !important; border-color: color-mix(in srgb,var(--sys-green) 30%,transparent) !important; background: var(--sys-green-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.st-sent,.st-quoted,.st-pending,.st-enroute) { color: var(--sys-blue) !important; border-color: color-mix(in srgb,var(--sys-blue) 30%,transparent) !important; background: var(--sys-blue-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.st-urgent,.st-scheduled,.bg-in) { color: var(--sys-orange) !important; border-color: color-mix(in srgb,var(--sys-orange) 30%,transparent) !important; background: var(--sys-orange-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.st-overdue,.st-low,.st-lost,.st-emergency,.st-off,.bg-es) { color: var(--sys-red) !important; border-color: color-mix(in srgb,var(--sys-red) 30%,transparent) !important; background: var(--sys-red-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .dispatch-job.scheduled { color: var(--sys-blue) !important; border-color: color-mix(in srgb,var(--sys-blue) 32%,transparent); border-left-color: var(--sys-blue); background: var(--sys-blue-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .dispatch-job.enroute { color: var(--sys-orange) !important; border-color: color-mix(in srgb,var(--sys-orange) 32%,transparent); border-left-color: var(--sys-orange); background: var(--sys-orange-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .dispatch-job.onsite { color: var(--sys-cyan) !important; border-color: color-mix(in srgb,var(--sys-cyan) 32%,transparent); border-left-color: var(--sys-cyan); background: var(--sys-cyan-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .dispatch-job.completed { color: var(--sys-green) !important; border-color: color-mix(in srgb,var(--sys-green) 32%,transparent); border-left-color: var(--sys-green); background: var(--sys-green-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .dispatch-job.invoiced { color: var(--sys-purple) !important; border-color: color-mix(in srgb,var(--sys-purple) 32%,transparent); border-left-color: var(--sys-purple); background: var(--sys-purple-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .dispatch-job.unassigned { color: var(--sys-red) !important; border-color: color-mix(in srgb,var(--sys-red) 32%,transparent); border-left-color: var(--sys-red); background: var(--sys-red-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cust-tag-vip { color: var(--sys-orange) !important; background: var(--sys-orange-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cust-tag-new { color: var(--sys-blue) !important; background: var(--sys-blue-bg) !important; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode .cust-tag-agree { color: var(--sys-purple) !important; background: var(--sys-purple-bg) !important; }

/* ═══════════════════════════════════════════════════════════
   STANDARD — familiar, compact, navy + teal Tradellen UI
   Fancy remains available through Settings.
   ═══════════════════════════════════════════════════════════ */
html[data-ui="standard"] body.enterprise-theme.app-mode {
  color-scheme: light;
  --ink: #0d1b2a;
  --ink2: #263e52;
  --ink3: #526b7d;
  --ink4: #55646D;
  --w: #fff;
  --bg: #f4f7fa;
  --bg2: #eaf0f4;
  --bdr: rgba(13,27,42,.09);
  --bdr2: rgba(13,27,42,.16);
  --teal: #1bd4a8;
  --teal-d: #067960;
  --teal-glow: rgba(27,212,168,.12);
  --orange: #ff6535;
  background: #f4f7fa;
}
html[data-ui="standard"] body.enterprise-theme.app-mode #app { gap: 0; padding: 0; background: #f4f7fa; }
html[data-ui="standard"] body.enterprise-theme.app-mode aside { width: 252px; height: 100vh; border: 0; border-right: 1px solid rgba(27,212,168,.09); border-radius: 0; background: linear-gradient(180deg,#081c29,#061620); box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .sb-hd { padding: 18px 16px 14px; }
html[data-ui="standard"] body.enterprise-theme.app-mode .sb-mark { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(135deg,#27E3B4,#12B894); box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .sb-agent { padding: 11px 13px; border-color: rgba(27,212,168,.14); border-radius: 10px; background: rgba(27,212,168,.055); box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .nb { min-height: 39px; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,.53); font-size: 12.5px; transform: none; box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .nb:hover { color: #fff; background: rgba(255,255,255,.055); transform: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .nb.act { color: #071a27; background: #1bd4a8; box-shadow: none; transform: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .nb.act svg { color: #071a27; }
html[data-ui="standard"] body.enterprise-theme.app-mode #main { border-radius: 0; background: #f4f7fa; box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .topbar { height: 64px; padding: 0 26px; border: 0; border-bottom: 1px solid var(--bdr); border-radius: 0; background: #fff; box-shadow: 0 2px 10px rgba(13,27,42,.04); backdrop-filter: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .tb-cmd { min-height: 38px; border-radius: 8px; background: #f4f7fa; box-shadow: none; transform: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .tb-status { min-height: 36px; border-radius: 999px; box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .tb-avatar { width: 36px; height: 36px; border-radius: 50%; background: #0d1b2a; box-shadow: none; transform: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .content { padding: 26px 28px 56px; border: 0; border-radius: 0; background: #f4f7fa; box-shadow: none; backdrop-filter: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .content::before { display: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .page.act { animation: pgIn .24s ease both; }
html[data-ui="standard"] body.enterprise-theme.app-mode .ov-hero { padding: 17px 24px; margin: 2px 0 14px; border: 1px solid rgba(27,212,168,.14); border-radius: 14px; background: linear-gradient(135deg,#0a2230,#071925); box-shadow: 0 8px 24px rgba(7,25,37,.12); }
html[data-ui="standard"] body.enterprise-theme.app-mode .ov-hero::before { right: -56px; top: -70px; opacity: .55; }
html[data-ui="standard"] body.enterprise-theme.app-mode .ov-greeting { font-size: 24px; text-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .ov-summary { margin-top: 6px; font-size: 14px; }
html[data-ui="standard"] body.enterprise-theme.app-mode .ov-summary { color: rgba(255,255,255,.58); }
html[data-ui="standard"] body.enterprise-theme.app-mode :where(.enterprise-context,.ov-needs,.service-lifecycle,.tab-row) { border-color: var(--bdr); border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(13,27,42,.035); backdrop-filter: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .enterprise-context { gap: 0; padding: 0; overflow: hidden; }
html[data-ui="standard"] body.enterprise-theme.app-mode .enterprise-context > div { padding: 15px 16px; border: 0; border-left: 1px solid var(--bdr); border-radius: 0; background: #fff; box-shadow: none; transform: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .enterprise-context > div:first-child { border-left: 0; color: #fff; background: #0a2230; box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .enterprise-context > div:first-child span { color: rgba(255,255,255,.46); }
html[data-ui="standard"] body.enterprise-theme.app-mode .enterprise-context > div:first-child strong { color: #fff; }
html[data-ui="standard"] body.enterprise-theme.app-mode .enterprise-context .brief-label { margin:0; }
html[data-ui="standard"] body.enterprise-theme.app-mode .enterprise-context .brief-value { display:flex; flex-direction:column; gap:4px; margin:0; }
html[data-ui="standard"] body.enterprise-theme.app-mode .enterprise-context .brief-value strong { margin:0; font-weight:650; }
html[data-ui="standard"] body.enterprise-theme.app-mode .enterprise-context .brief-value span { margin:0; font-weight:400; letter-spacing:0; text-transform:none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .lifecycle-grid { gap: 0; padding: 0; background: #fff; }
html[data-ui="standard"] body.enterprise-theme.app-mode .lifecycle-step { min-height: 92px; border: 0 !important; border-left: 1px solid var(--bdr) !important; border-radius: 0; background: #fff; box-shadow: none; transform: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .lifecycle-step:first-child { border-left: 0 !important; }
html[data-ui="standard"] body.enterprise-theme.app-mode .lifecycle-step:hover { background: #f7fafb; transform: none; box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .lifecycle-step.active { color: var(--ink); background: rgba(27,212,168,.08); box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .service-lifecycle-head { align-items:center; }
html[data-ui="standard"] body.enterprise-theme.app-mode .service-lifecycle-head h2,
html[data-ui="standard"] body.enterprise-theme.app-mode .service-lifecycle-head p { margin:0; }
html[data-ui="standard"] body.enterprise-theme.app-mode .lifecycle-step > span,
html[data-ui="standard"] body.enterprise-theme.app-mode .lifecycle-step > strong,
html[data-ui="standard"] body.enterprise-theme.app-mode .lifecycle-step > small { margin:0; }
html[data-ui="standard"] body.enterprise-theme.app-mode .tab-row { padding: 4px; }
html[data-ui="standard"] body.enterprise-theme.app-mode .tp { min-height: 34px; border-radius: 7px; }
/* Selected filter chip is DARK, not teal. #1bd4a8 is the fill on "+ New job",
   "+ New plan", "+ New task" — so on 12 screens the chip saying "you are looking at
   All" wore the same colour as the one button you are meant to press, and neither
   read as the answer. Selected state and primary action are different jobs.
   This rule outranks the .tp.act in index.html, so it is the one that has to change. */
html[data-ui="standard"] body.enterprise-theme.app-mode .tp.act { color: #fff; background: #0D1B2A; box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .metrics-grid { gap: 14px; }
html[data-ui="standard"] body.enterprise-theme.app-mode .mc { min-height: 132px; padding: 20px; border: 1px solid var(--bdr); border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(13,27,42,.045); transform: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .mc:hover { border-color: rgba(27,212,168,.36); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(13,27,42,.08); }
html[data-ui="standard"] body.enterprise-theme.app-mode .mc::before { display: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .mc::after { left: 0; right: 0; height: 3px; border-radius: 0; }
html[data-ui="standard"] body.enterprise-theme.app-mode :where(.chart-card,.tbl-card,.pn-card,.loc-page-card,.agent-script-card,.agent-chat-card,.s-card,.wf-stat,.wf-row,.wf-card,.wf-empty,.wf-thread,.cal-wrap,.asst-wrap,.dispatch-board-wrap,.rep-card,.sync-cell,.tm-card,.cust-stat,.kanban-col,.kanban-card,.pb-item,.wf-tbl) { border-color: var(--bdr) !important; border-radius: 12px; color: var(--ink); background: #fff !important; box-shadow: 0 2px 10px rgba(13,27,42,.04); backdrop-filter: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode :where(.wf-card,.wf-row,.wf-stat,.pn-card,.loc-page-card,.s-card,.rep-card,.sync-cell,.tm-card,.cust-stat,.kanban-card,.pb-item):hover { border-color: rgba(27,212,168,.34) !important; background: #fff !important; box-shadow: 0 8px 20px rgba(13,27,42,.075); transform: translateY(-2px); }
/* Repaint the theme's graphite buttons back to brand teal in standard mode — but ONLY the
   ones that have not chosen a background for themselves. Without the :not(), this rule's
   !important beat even inline styles, so a card offering "Open setup guide" (primary) plus
   "Open full tutorial" and "Import / migrate data" (both explicitly styled as quiet
   secondary buttons in the markup) rendered as three identical loud teal blocks. Every
   button in the app that sets an inline background also sets an inline color — verified
   across index.html, app-core.js and app-workspace.js — so releasing these from the rule
   cannot strand light text on a light fill, which is the usual way this goes wrong. */
html[data-ui="standard"] body.enterprise-theme.app-mode :where(.wf-btn,.s-btn,.chat-send,.dispatch-nav-btn.act,.form-submit):not([style*="background"]),
html[data-ui="standard"] body.enterprise-theme.app-mode [style*="background:var(--teal)"]:not(.trial-upgrade) { color: #071a27 !important; background: #1bd4a8 !important; box-shadow: none; }

/* ── ...but not EVERY .wf-btn is the primary action ─────────────────────────────
   The rule directly above paints every .wf-btn teal with !important, which is right
   for the one "+ New …" button a screen is built around and wrong everywhere the same
   class is reused for a secondary action. Measured across 48 screens, that left twelve
   with two or more saturated fills competing to be THE action.
   These three are the reuses. They must live HERE, after that rule and with the same
   html[data-ui] prefix: an equivalent rule in index.html's <style> block loses, because
   this stylesheet is linked afterwards and the declaration above is !important. */
html[data-ui="standard"] body.enterprise-theme.app-mode .fm-section .wf-btn,
html[data-ui="standard"] body.enterprise-theme.app-mode .supply-actions .wf-btn,
html[data-ui="standard"] body.enterprise-theme.app-mode #page-academy .wf-head .wf-btn {
  background: #fff !important; color: var(--ink2) !important;
  border: 1px solid var(--bdr) !important; box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .fm-section .wf-btn:hover,
html[data-ui="standard"] body.enterprise-theme.app-mode .supply-actions .wf-btn:hover,
html[data-ui="standard"] body.enterprise-theme.app-mode #page-academy .wf-head .wf-btn:hover {
  background: var(--bg2) !important; color: var(--ink) !important; }
html[data-ui="standard"] body.enterprise-theme.app-mode :where(.wf-in,.s-in,.chat-input,.form-input,.auth-input,.jstage,.cust-search,.asst-input-row input) { color: var(--ink); border-color: var(--bdr2); border-radius: 8px; background: #fff; box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .cal-wrap { padding: 18px; border-radius: 12px; background: #fff !important; }
html[data-ui="standard"] body.enterprise-theme.app-mode .cal-nav button { width: 36px; height: 36px; border-color: var(--bdr); border-radius: 8px; color: var(--ink); background: #f4f7fa; box-shadow: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .cal-grid { gap: 6px; }
html[data-ui="standard"] body.enterprise-theme.app-mode .cal-cell { min-height: 96px; padding: 7px; border-color: var(--bdr); border-radius: 9px; color: var(--ink); background: #fff; box-shadow: none; transform: none; }
html[data-ui="standard"] body.enterprise-theme.app-mode .cal-cell:hover { background: #f7fafb; transform: none; box-shadow: inset 0 0 0 1px rgba(27,212,168,.2); }
html[data-ui="standard"] body.enterprise-theme.app-mode .cal-cell.today { border-color: #1bd4a8; background: rgba(27,212,168,.06); box-shadow: inset 0 0 0 1px #1bd4a8; }
html[data-ui="standard"] body.enterprise-theme.app-mode .cal-cell.today .cal-daynum { color: var(--ink); }
html[data-ui="standard"] body.enterprise-theme.app-mode .appearance-choice,
html[data-ui="standard"] body.enterprise-theme.app-mode .ui-style-choice { color: var(--ink); background: #fff; }

/* Interface-style selector */
body.enterprise-theme.app-mode .ui-style-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 18px; }
body.enterprise-theme.app-mode .ui-style-choice { min-height: 112px; display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--bdr2); border-radius: 17px; color: var(--ink); background: var(--w); cursor: pointer; font-family: inherit; text-align: left; transition: transform .25s ease, box-shadow .25s ease, border-color .2s ease; }
body.enterprise-theme.app-mode .ui-style-choice:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.1); }
body.enterprise-theme.app-mode .ui-style-choice.selected { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-glow); }
body.enterprise-theme.app-mode .ui-style-choice > span:last-child { min-width: 0; }
body.enterprise-theme.app-mode .ui-style-choice strong,
body.enterprise-theme.app-mode .ui-style-choice small { display: block; }
body.enterprise-theme.app-mode .ui-style-choice strong { font-size: 13px; }
body.enterprise-theme.app-mode .ui-style-choice small { margin-top: 5px; color: var(--ink4); font-size: 10.5px; line-height: 1.4; }
body.enterprise-theme.app-mode .ui-style-preview { position: relative; flex: none; width: 82px; height: 72px; overflow: hidden; display: block; border-radius: 13px; }
body.enterprise-theme.app-mode .ui-style-preview i,
body.enterprise-theme.app-mode .ui-style-preview b,
body.enterprise-theme.app-mode .ui-style-preview em { position: absolute; display: block; border-radius: 5px; }
body.enterprise-theme.app-mode .ui-style-preview i { left: 7px; top: 7px; bottom: 7px; width: 19px; }
body.enterprise-theme.app-mode .ui-style-preview b { left: 32px; right: 7px; top: 8px; height: 18px; }
body.enterprise-theme.app-mode .ui-style-preview em { left: 32px; right: 7px; top: 32px; bottom: 8px; }
body.enterprise-theme.app-mode .ui-style-preview.standard { border: 1px solid rgba(27,212,168,.22); background: #081c29; }
body.enterprise-theme.app-mode .ui-style-preview.standard i { background: #061620; }
body.enterprise-theme.app-mode .ui-style-preview.standard b { background: #1bd4a8; }
body.enterprise-theme.app-mode .ui-style-preview.standard em { background: #fff; }
body.enterprise-theme.app-mode .ui-style-preview.fancy { border: 1px solid rgba(255,255,255,.12); background: #050505; box-shadow: 0 0 16px rgba(255,255,255,.12); }
body.enterprise-theme.app-mode .ui-style-preview.fancy i { background: #202020; }
body.enterprise-theme.app-mode .ui-style-preview.fancy b { background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.55); }
body.enterprise-theme.app-mode .ui-style-preview.fancy em { background: #171717; }

@media (max-width: 760px) {
  body.enterprise-theme.app-mode .ui-style-choices { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   LIVE OPERATIONS COMMAND CENTER
   Mirrors the cinematic call → dispatch → revenue story.
   ═══════════════════════════════════════════════════════════ */
body.enterprise-theme.app-mode .live-command-grid {
  --live-bg: #06141e;
  --live-surface: rgba(10,34,48,.86);
  --live-surface-2: rgba(13,43,58,.72);
  --live-line: rgba(27,212,168,.18);
  --live-text: #f4f8fa;
  --live-muted: rgba(220,235,239,.52);
  --live-accent: #1bd4a8;
  display: grid;
  grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr);
  gap: 14px;
  margin: 18px 0 22px;
}
body.enterprise-theme.app-mode .live-console {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--live-line);
  border-radius: 22px;
  color: var(--live-text);
  background:
    radial-gradient(circle at 92% 4%,rgba(27,212,168,.10),transparent 27%),
    linear-gradient(145deg,var(--live-surface),var(--live-bg));
  box-shadow: 0 22px 58px rgba(3,15,23,.22),inset 0 1px 0 rgba(255,255,255,.05);
}
body.enterprise-theme.app-mode .live-console::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom,#000,transparent 82%);
}
body.enterprise-theme.app-mode .live-console-head {
  position: relative;
  z-index: 2;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.018);
}
body.enterprise-theme.app-mode .live-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-ink, #0A7B64);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}
body.enterprise-theme.app-mode .live-kicker i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--live-accent);
  box-shadow: 0 0 0 5px rgba(27,212,168,.08),0 0 18px rgba(27,212,168,.8);
  animation: livePulse 2s ease-in-out infinite;
}
body.enterprise-theme.app-mode .live-console-head h2 {
  margin: 7px 0 0;
  color: var(--live-text);
  font-size: clamp(16px,1.55vw,21px);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -.025em;
}
body.enterprise-theme.app-mode .live-call-clock { flex: 0 0 auto; text-align: right; }
body.enterprise-theme.app-mode .live-call-clock span,
body.enterprise-theme.app-mode .live-call-clock strong { display: block; }
body.enterprise-theme.app-mode .live-call-clock span { max-width: 150px; overflow: hidden; color: var(--live-muted); font-family: 'IBM Plex Mono',monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
body.enterprise-theme.app-mode .live-call-clock strong { margin-top: 5px; color: var(--teal-ink, #0A7B64); font-family: 'IBM Plex Mono',monospace; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }

body.enterprise-theme.app-mode .live-wave {
  position: relative;
  z-index: 2;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 5px 20px 0;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
body.enterprise-theme.app-mode .live-wave i {
  width: 3px;
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(to top,#0b8e71,#62f0ce);
  box-shadow: 0 0 10px rgba(27,212,168,.28);
  animation: liveWave 1.1s ease-in-out infinite alternate;
}
body.enterprise-theme.app-mode .live-wave i:nth-child(2n) { animation-delay: -.25s; }
body.enterprise-theme.app-mode .live-wave i:nth-child(3n) { animation-delay: -.55s; }
body.enterprise-theme.app-mode .live-wave i:nth-child(4n) { animation-delay: -.75s; }
body.enterprise-theme.app-mode .live-transcript {
  position: relative;
  z-index: 2;
  min-height: 210px;
  max-height: 260px;
  overflow: hidden;
  padding: 14px 20px 8px;
  mask-image: linear-gradient(to bottom,#000 0%,#000 85%,transparent 100%);
}
body.enterprise-theme.app-mode .live-line { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 11px; padding: 8px 0; animation: liveLineIn .45s cubic-bezier(.22,1,.36,1) both; }
body.enterprise-theme.app-mode .live-line span { padding-top: 2px; color: rgba(255,255,255,.32); font-family: 'IBM Plex Mono',monospace; font-size: 8.5px; font-weight: 650; letter-spacing: .1em; }
body.enterprise-theme.app-mode .live-line.aria span { color: var(--teal-ink, #0A7B64); }
body.enterprise-theme.app-mode .live-line p { margin: 0; color: rgba(245,250,252,.79); font-size: 12.5px; line-height: 1.5; }
body.enterprise-theme.app-mode .live-line.caller p { color: rgba(27,212,168,.77); }
body.enterprise-theme.app-mode .live-call-intel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.07);
}
body.enterprise-theme.app-mode .live-call-intel > div { min-width: 0; padding: 13px 16px; background: rgba(4,18,27,.86); }
body.enterprise-theme.app-mode .live-call-intel span,
body.enterprise-theme.app-mode .live-call-intel strong { display: block; }
body.enterprise-theme.app-mode .live-call-intel span { color: rgba(255,255,255,.31); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
body.enterprise-theme.app-mode .live-call-intel strong { margin-top: 5px; overflow: hidden; color: rgba(255,255,255,.82); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

body.enterprise-theme.app-mode .live-open {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(27,212,168,.22);
  border-radius: 10px;
  color: var(--teal-ink, #0A7B64);
  background: rgba(27,212,168,.06);
  cursor: pointer;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 650;
  transition: transform .22s ease,background .2s ease,border-color .2s ease;
}
body.enterprise-theme.app-mode .live-open:hover { transform: translateY(-2px); border-color: rgba(27,212,168,.5); background: rgba(27,212,168,.11); }
body.enterprise-theme.app-mode .live-map {
  position: relative;
  z-index: 2;
  height: 255px;
  overflow: hidden;
  margin: 14px 14px 0;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 17px;
  background: #071925;
}
body.enterprise-theme.app-mode .live-map .leaflet-tile-pane { filter: saturate(1.02) brightness(.9) contrast(1.03); }
body.enterprise-theme.app-mode .live-tech-icon { z-index:700!important; overflow:visible!important; background:transparent!important; border:0!important; }
body.enterprise-theme.app-mode .live-tech-marker { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 3px solid #fff; border-radius: 50%; color: #06141e; background: var(--marker); box-shadow: 0 0 0 7px color-mix(in srgb,var(--marker) 22%,transparent),0 8px 22px rgba(0,0,0,.55); font: 850 10px Inter,sans-serif; cursor: pointer; }
body.enterprise-theme.app-mode .tech-map-label { padding:6px 9px; border:1px solid rgba(255,255,255,.18); border-radius:8px; color:#fff; background:rgba(3,15,23,.9); box-shadow:0 8px 20px rgba(0,0,0,.3); font:700 10px Inter,sans-serif; }
body.enterprise-theme.app-mode .tech-map-label::before { display:none; }
body.enterprise-theme.app-mode .live-map-privacy { margin:8px 15px 0; color:rgba(255,255,255,.42); font-size:8.5px; line-height:1.45; }
body.enterprise-theme.app-mode .live-crew-list { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; padding: 10px 14px 14px; }
body.enterprise-theme.app-mode .live-crew { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid rgba(255,255,255,.065); border-radius: 11px; color: inherit; background: rgba(255,255,255,.025); font: inherit; text-align: left; cursor: pointer; transition: transform .18s ease,border-color .18s ease,background .18s ease; }
body.enterprise-theme.app-mode .live-crew:hover { transform: translateY(-2px); border-color: rgba(27,212,168,.28); background: rgba(27,212,168,.055); }
body.enterprise-theme.app-mode .live-crew-avatar { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: #06141e; background: var(--live-accent); font-size: 8.5px; font-weight: 800; }
body.enterprise-theme.app-mode .live-crew.offline .live-crew-avatar { color: rgba(255,255,255,.6); background: rgba(255,255,255,.1); }
body.enterprise-theme.app-mode .live-crew-copy { min-width: 0; }
body.enterprise-theme.app-mode .live-crew-copy strong,
body.enterprise-theme.app-mode .live-crew-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.enterprise-theme.app-mode .live-crew-copy strong { color: rgba(255,255,255,.79); font-size: 9.5px; }
body.enterprise-theme.app-mode .live-crew-copy small { margin-top: 3px; color: rgba(255,255,255,.31); font-size: 8px; }
body.enterprise-theme.app-mode .live-empty { grid-column: 1/-1; padding: 14px; color: var(--live-muted); font-size: 11px; text-align: center; }

body.enterprise-theme.app-mode .signal-rail {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr minmax(28px,.32fr) 1fr minmax(28px,.32fr) 1fr minmax(28px,.32fr) 1fr;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--live-line);
  border-radius: 18px;
  color: var(--live-text);
  background: linear-gradient(90deg,rgba(6,20,30,.97),rgba(10,34,48,.94));
  box-shadow: 0 15px 38px rgba(3,15,23,.18),inset 0 1px 0 rgba(255,255,255,.045);
}
body.enterprise-theme.app-mode .signal-node { min-width: 0; display: grid; grid-template-columns: 30px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
body.enterprise-theme.app-mode .signal-node i { grid-row: 1/3; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.11); border-radius: 10px; color: rgba(255,255,255,.35); background: rgba(255,255,255,.03); font-family: 'IBM Plex Mono',monospace; font-size: 8px; font-style: normal; }
body.enterprise-theme.app-mode .signal-node.active i { color: #06141e; border-color: var(--teal-ink, #0A7B64); background: var(--live-accent); box-shadow: 0 0 18px rgba(27,212,168,.25); }
body.enterprise-theme.app-mode .signal-node span { color: rgba(255,255,255,.78); font-size: 10.5px; font-weight: 650; }
body.enterprise-theme.app-mode .signal-node small { overflow: hidden; color: rgba(255,255,255,.3); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
body.enterprise-theme.app-mode .signal-line { position: relative; height: 1px; overflow: hidden; background: rgba(255,255,255,.08); }
body.enterprise-theme.app-mode .signal-line b { position: absolute; top: 0; left: -35%; width: 35%; height: 100%; background: linear-gradient(90deg,transparent,var(--live-accent),transparent); animation: signalFlow 2.2s ease-in-out infinite; }

html[data-ui="fancy"][data-theme="obsidian"] body.enterprise-theme.app-mode .live-console,
html[data-ui="fancy"][data-theme="obsidian"] body.enterprise-theme.app-mode .signal-rail { box-shadow: 0 28px 80px rgba(0,0,0,.48),0 0 32px rgba(27,212,168,.045),inset 0 1px 0 rgba(255,255,255,.065); }
html[data-ui="fancy"] body.enterprise-theme.app-mode #page-overview .service-lifecycle { display: none; }

@keyframes livePulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.65; transform:scale(.78); } }
@keyframes liveWave { from { height:8px; opacity:.45; } to { height:35px; opacity:1; } }
@keyframes liveLineIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes liveRoute { to { stroke-dashoffset:-36; } }
@keyframes mapScan { 0%,10% { transform:translateY(-80%); opacity:0; } 35%,65% { opacity:1; } 90%,100% { transform:translateY(430%); opacity:0; } }
@keyframes pinRadar { 0% { opacity:.7; transform:scale(.65); } 100% { opacity:0; transform:scale(1.55); } }
@keyframes signalFlow { 0% { transform:translateX(0); opacity:0; } 20%,80% { opacity:1; } 100% { transform:translateX(385%); opacity:0; } }

@media (max-width: 1120px) {
  body.enterprise-theme.app-mode .live-command-grid { grid-template-columns: 1fr; }
  body.enterprise-theme.app-mode .live-transcript { min-height: 190px; }
}
@media (max-width: 720px) {
  body.enterprise-theme.app-mode .live-console-head { align-items: flex-start; }
  body.enterprise-theme.app-mode .live-call-clock { padding-top: 2px; }
  body.enterprise-theme.app-mode .live-call-intel,
  body.enterprise-theme.app-mode .live-crew-list { grid-template-columns: 1fr; }
  body.enterprise-theme.app-mode .signal-rail { grid-template-columns: 1fr; gap: 6px; }
  body.enterprise-theme.app-mode .signal-line { width: 1px; height: 18px; margin-left: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  body.enterprise-theme.app-mode .live-command-grid *,
  body.enterprise-theme.app-mode .live-command-grid *::before,
  body.enterprise-theme.app-mode .live-command-grid *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* Procurement, property profiles and customer hub parity workflows. */
body.enterprise-theme.app-mode .supply-automation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb,var(--teal) 24%,var(--bdr));
  border-radius: 18px;
  background: linear-gradient(135deg,color-mix(in srgb,var(--teal-glow) 70%,var(--w)),var(--w));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
body.enterprise-theme.app-mode .supply-automation > div:first-child { min-width: 0; }
body.enterprise-theme.app-mode .supply-kicker { display: block; color: var(--teal-d); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
body.enterprise-theme.app-mode .supply-automation strong,
body.enterprise-theme.app-mode .supply-automation small { display: block; }
body.enterprise-theme.app-mode .supply-automation strong { margin-top: 6px; color: var(--ink); font-size: 15px; }
body.enterprise-theme.app-mode .supply-automation small { margin-top: 4px; color: var(--ink4); font-size: 11.5px; line-height: 1.45; }
body.enterprise-theme.app-mode .supply-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
body.enterprise-theme.app-mode .supply-switch { display: inline-flex; align-items: center; gap: 8px; color: var(--ink3); cursor: pointer; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
body.enterprise-theme.app-mode .supply-switch input { position: absolute; opacity: 0; pointer-events: none; }
body.enterprise-theme.app-mode .supply-switch span { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--bdr2); transition: background .2s ease; }
body.enterprise-theme.app-mode .supply-switch span::after { content:""; position:absolute; left:3px; top:3px; width:16px; height:16px; border-radius:50%; background:var(--ink4); transition:transform .25s cubic-bezier(.22,1,.36,1),background .2s ease; }
body.enterprise-theme.app-mode .supply-switch input:checked + span { background: var(--teal-glow); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--teal) 50%,transparent); }
body.enterprise-theme.app-mode .supply-switch input:checked + span::after { background: var(--teal); transform: translateX(16px); }

body.enterprise-theme.app-mode .portal-cap-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
body.enterprise-theme.app-mode .portal-cap { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 16px; border: 1px solid var(--bdr); border-radius: 14px; background: var(--w); }
body.enterprise-theme.app-mode .portal-cap > div { min-width: 0; }
body.enterprise-theme.app-mode .portal-cap strong,
body.enterprise-theme.app-mode .portal-cap small { display: block; }
body.enterprise-theme.app-mode .portal-cap strong { color: var(--ink); font-size: 12.5px; }
body.enterprise-theme.app-mode .portal-cap small { margin-top: 4px; color: var(--ink4); font-size: 10.5px; line-height: 1.45; }
body.enterprise-theme.app-mode .portal-auto { margin-top: 14px; }
body.enterprise-theme.app-mode .portal-auto-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-top: 1px solid var(--bdr); }
body.enterprise-theme.app-mode .portal-auto-row > span { min-width: 0; }
body.enterprise-theme.app-mode .portal-auto-row strong,
body.enterprise-theme.app-mode .portal-auto-row small { display: block; }
body.enterprise-theme.app-mode .portal-auto-row strong { color: var(--ink); font-size: 12px; }
body.enterprise-theme.app-mode .portal-auto-row small { margin-top: 4px; color: var(--ink4); font-size: 10.5px; line-height: 1.4; }
body.enterprise-theme.app-mode .portal-preview { padding: 18px; border: 1px solid var(--bdr); border-radius: 16px; background: var(--bg); }
body.enterprise-theme.app-mode .portal-preview-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
body.enterprise-theme.app-mode .portal-preview-brand > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #06141e; background: #1bd4a8; font-weight: 800; }
body.enterprise-theme.app-mode .portal-preview-brand strong,
body.enterprise-theme.app-mode .portal-preview-brand small { display: block; }
body.enterprise-theme.app-mode .portal-preview-brand strong { color: var(--ink); font-size: 13px; }
body.enterprise-theme.app-mode .portal-preview-brand small { margin-top: 2px; color: var(--ink4); font-size: 10.5px; }
body.enterprise-theme.app-mode .portal-preview-alert { margin-bottom: 12px; padding: 10px 12px; border: 1px solid rgba(27,212,168,.22); border-radius: 10px; color: var(--teal-d); background: rgba(27,212,168,.08); font-size: 11.5px; font-weight: 650; }

html[data-ui="fancy"] body.enterprise-theme.app-mode .supply-automation,
html[data-ui="fancy"] body.enterprise-theme.app-mode .portal-cap,
html[data-ui="fancy"] body.enterprise-theme.app-mode .portal-auto { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

@media (max-width: 820px) {
  body.enterprise-theme.app-mode .supply-automation { align-items: flex-start; flex-direction: column; }
  body.enterprise-theme.app-mode .supply-actions { width: 100%; justify-content: space-between; }
  body.enterprise-theme.app-mode .portal-cap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body.enterprise-theme.app-mode .supply-actions { align-items: stretch; flex-direction: column; }
  body.enterprise-theme.app-mode .portal-auto-row { align-items: flex-start; }
}

/* Functional field map and technician workday profile. */
body.enterprise-theme.app-mode .tm-card { width:100%; color:inherit; font:inherit; text-align:left; }
body.enterprise-theme.app-mode .tm-open { display:block; margin-top:10px; color:var(--teal-d); font-size:10.5px; font-weight:750; }
body.enterprise-theme.app-mode #ftMap .leaflet-tile-pane { filter:saturate(.82) brightness(.82) contrast(1.06); }
body.enterprise-theme.app-mode #ftMap .leaflet-control-layers { border:1px solid var(--bdr); border-radius:10px; color:var(--ink); background:var(--w); box-shadow:0 8px 22px rgba(0,0,0,.12); font:600 11px Inter,sans-serif; }
body.enterprise-theme.app-mode .tech-profile { display:flex; flex-direction:column; gap:14px; }
body.enterprise-theme.app-mode .tech-profile-head { display:grid; grid-template-columns:46px minmax(0,1fr) auto; align-items:center; gap:12px; }
body.enterprise-theme.app-mode .tech-profile-avatar { width:46px; height:46px; display:grid; place-items:center; border-radius:14px; color:#06141e; background:var(--teal); box-shadow:0 8px 20px rgba(27,212,168,.22); font-size:12px; font-weight:850; }
body.enterprise-theme.app-mode .tech-profile-head h3 { margin:0; color:var(--ink); font-size:15px; }
body.enterprise-theme.app-mode .tech-profile-head p { margin:4px 0 0; color:var(--ink4); font-size:11px; }
body.enterprise-theme.app-mode .tech-current { padding:15px; border:1px solid color-mix(in srgb,var(--teal) 30%,var(--bdr)); border-radius:14px; background:color-mix(in srgb,var(--teal-glow) 62%,var(--w)); }
body.enterprise-theme.app-mode .tech-current span,body.enterprise-theme.app-mode .tech-current strong,body.enterprise-theme.app-mode .tech-current small { display:block; }
body.enterprise-theme.app-mode .tech-current span { color:var(--teal-d); font-size:9px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
body.enterprise-theme.app-mode .tech-current strong { margin-top:7px; color:var(--ink); font-size:13px; }
body.enterprise-theme.app-mode .tech-current p { margin:5px 0; color:var(--ink2); font-size:11.5px; }
body.enterprise-theme.app-mode .tech-current small { color:var(--ink4); font-size:10.5px; }
body.enterprise-theme.app-mode .tech-profile-section { padding:14px; border:1px solid var(--bdr); border-radius:14px; background:var(--w); }
body.enterprise-theme.app-mode .tech-section-title { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; }
body.enterprise-theme.app-mode .tech-section-title strong { color:var(--ink); font-size:12px; }
body.enterprise-theme.app-mode .tech-section-title span { color:var(--ink4); font-size:10px; }
body.enterprise-theme.app-mode .tech-history-row { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:9px 0; border-top:1px solid var(--bdr); }
body.enterprise-theme.app-mode .tech-history-row strong,body.enterprise-theme.app-mode .tech-history-row span { display:block; }
body.enterprise-theme.app-mode .tech-history-row strong { color:var(--ink2); font-size:11.5px; }
body.enterprise-theme.app-mode .tech-history-row span,body.enterprise-theme.app-mode .tech-history-row time { margin-top:3px; color:var(--ink4); font-size:10px; }
body.enterprise-theme.app-mode .tech-notes { margin:0; padding-left:18px; color:var(--ink3); font-size:11px; line-height:1.6; }
body.enterprise-theme.app-mode .tech-profile-empty { padding:10px 0; color:var(--ink4); font-size:11px; }

/* Competitive workflow layer: pipeline, role personalization and intelligent dispatch. */
body.enterprise-theme.app-mode .ov-role { display:inline-flex; align-items:center; margin-bottom:8px; padding:5px 9px; border:1px solid color-mix(in srgb,var(--teal) 28%,var(--bdr)); border-radius:999px; color:var(--teal); background:color-mix(in srgb,var(--teal-glow) 65%,transparent); font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
body.enterprise-theme.app-mode .pipeline-brief { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; overflow:hidden; margin-bottom:16px; border:1px solid var(--bdr); border-radius:16px; background:var(--bdr); }
body.enterprise-theme.app-mode .pipeline-brief > div { padding:16px; background:var(--w); }
body.enterprise-theme.app-mode .pipeline-brief span,body.enterprise-theme.app-mode .pipeline-brief strong,body.enterprise-theme.app-mode .pipeline-brief small { display:block; }
body.enterprise-theme.app-mode .pipeline-brief span { color:var(--ink4); font-size:8px; font-weight:800; letter-spacing:.1em; }
body.enterprise-theme.app-mode .pipeline-brief strong { margin-top:6px; color:var(--ink); font-size:20px; }
body.enterprise-theme.app-mode .pipeline-brief small { margin-top:3px; color:var(--ink4); font-size:9.5px; }
body.enterprise-theme.app-mode .pipeline-board { display:grid; grid-template-columns:repeat(6,minmax(205px,1fr)); gap:10px; overflow-x:auto; padding-bottom:8px; }
body.enterprise-theme.app-mode .pipeline-stage { min-height:430px; padding:10px; border:1px solid var(--bdr); border-radius:15px; background:color-mix(in srgb,var(--bg) 70%,var(--w)); }
body.enterprise-theme.app-mode .pipeline-stage > header { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; padding:4px 3px 11px; }
body.enterprise-theme.app-mode .pipeline-stage header strong,body.enterprise-theme.app-mode .pipeline-stage header span { display:block; }
body.enterprise-theme.app-mode .pipeline-stage header strong { color:var(--ink); font-size:11.5px; }
body.enterprise-theme.app-mode .pipeline-stage header span,body.enterprise-theme.app-mode .pipeline-stage header b { margin-top:3px; color:var(--ink4); font-size:9px; }
body.enterprise-theme.app-mode .pipeline-stack { display:flex; flex-direction:column; gap:8px; }
body.enterprise-theme.app-mode .pipeline-card { padding:12px; border:1px solid var(--bdr); border-radius:12px; background:var(--w); box-shadow:0 5px 14px rgba(4,18,28,.045); }
body.enterprise-theme.app-mode .pipeline-card-top { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:9px; }
body.enterprise-theme.app-mode .pipeline-card-top > span { color:var(--ink4); font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
body.enterprise-theme.app-mode .pipeline-card > strong,body.enterprise-theme.app-mode .pipeline-card > small,body.enterprise-theme.app-mode .pipeline-card > b { display:block; }
body.enterprise-theme.app-mode .pipeline-card > strong { color:var(--ink); font-size:11.5px; }
body.enterprise-theme.app-mode .pipeline-card > small { margin-top:4px; color:var(--ink4); font-size:9.5px; line-height:1.4; }
body.enterprise-theme.app-mode .pipeline-card > b { margin-top:8px; color:var(--teal-d); font-size:11px; }
body.enterprise-theme.app-mode .pipeline-card > button { width:100%; margin-top:10px; padding:7px; border:1px solid var(--bdr); border-radius:8px; color:var(--ink3); background:var(--bg); font:700 9.5px Inter,sans-serif; cursor:pointer; }
body.enterprise-theme.app-mode .pipeline-card > button:hover { color:var(--teal-d); border-color:color-mix(in srgb,var(--teal) 45%,var(--bdr)); }
body.enterprise-theme.app-mode .pipeline-empty { padding:22px 8px; color:var(--ink4); font-size:10px; text-align:center; }

body.enterprise-theme.app-mode .workspace-hero { display:flex; align-items:center; justify-content:space-between; gap:22px; margin-bottom:14px; padding:22px; border:1px solid rgba(27,212,168,.22); border-radius:18px; background:linear-gradient(135deg,rgba(27,212,168,.10),var(--w)); }
body.enterprise-theme.app-mode .workspace-hero span { color:var(--teal-d); font-size:8px; font-weight:850; letter-spacing:.12em; }
body.enterprise-theme.app-mode .workspace-hero h2 { margin:6px 0 4px; color:var(--ink); font-size:20px; }
body.enterprise-theme.app-mode .workspace-hero p { margin:0; color:var(--ink4); font-size:11px; }
body.enterprise-theme.app-mode .workspace-hero select { width:190px; flex:0 0 auto; }
body.enterprise-theme.app-mode .workspace-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr); gap:14px; }
body.enterprise-theme.app-mode .workspace-panel { overflow:auto; padding:17px; border:1px solid var(--bdr); border-radius:16px; background:var(--w); }
body.enterprise-theme.app-mode .workspace-panel > header { display:flex; justify-content:space-between; gap:12px; margin-bottom:13px; }
body.enterprise-theme.app-mode .workspace-panel header strong,body.enterprise-theme.app-mode .workspace-panel header small { display:block; }
body.enterprise-theme.app-mode .workspace-panel header strong { color:var(--ink); font-size:13px; }
body.enterprise-theme.app-mode .workspace-panel header small { margin-top:4px; color:var(--ink4); font-size:10px; }
body.enterprise-theme.app-mode .workspace-panel header button { border:0; color:var(--teal-d); background:transparent; font:750 10px Inter,sans-serif; cursor:pointer; }
body.enterprise-theme.app-mode .permission-grid { min-width:520px; display:grid; grid-template-columns:minmax(140px,1fr) repeat(5,minmax(54px,66px)); align-items:center; }
body.enterprise-theme.app-mode .permission-callout { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:12px; padding:13px 15px; border:1px solid rgba(37,99,235,.18); border-radius:13px; background:rgba(37,99,235,.06); }
body.enterprise-theme.app-mode .permission-callout b,body.enterprise-theme.app-mode .permission-callout span { display:block; }
body.enterprise-theme.app-mode .permission-callout b { color:var(--ink); font-size:11.5px; }
body.enterprise-theme.app-mode .permission-callout span { margin-top:3px; color:var(--ink4); font-size:9.5px; }
body.enterprise-theme.app-mode .permission-callout button { flex:0 0 auto; border:0; color:#2159d4; background:transparent; font:750 9.5px Inter,sans-serif; cursor:pointer; }
body.enterprise-theme.app-mode .permission-explain { display:grid; gap:8px; }
body.enterprise-theme.app-mode .permission-explain > div { padding:11px 12px; border:1px solid var(--bdr); border-radius:10px; background:var(--bg); }
body.enterprise-theme.app-mode .permission-explain b,body.enterprise-theme.app-mode .permission-explain span { display:block; }
body.enterprise-theme.app-mode .permission-explain b { color:var(--ink); font-size:11px; }
body.enterprise-theme.app-mode .permission-explain span { margin-top:3px; color:var(--ink4); font-size:10px; line-height:1.45; }
body.enterprise-theme.app-mode .nb.permission-locked { opacity:.34; }
body.enterprise-theme.app-mode .nb.permission-locked::after { content:'Locked'; margin-left:auto; color:rgba(255,255,255,.55); font-size:7px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
body.enterprise-theme.app-mode .permission-grid > b { padding:8px 4px; color:var(--ink4); font-size:9px; text-align:center; }
body.enterprise-theme.app-mode .permission-grid > span { padding:10px 0; border-top:1px solid var(--bdr); color:var(--ink3); font-size:10px; }
body.enterprise-theme.app-mode .permission-dot { height:37px; display:grid; place-items:center; padding:0; border:0; border-top:1px solid var(--bdr); background:transparent; cursor:pointer; }
body.enterprise-theme.app-mode .permission-dot i { width:18px; height:18px; border:1px solid var(--bdr2); border-radius:6px; background:var(--bg); }
body.enterprise-theme.app-mode .permission-dot.on i { border-color:var(--teal); background:var(--teal); box-shadow:0 0 14px rgba(27,212,168,.2); }
body.enterprise-theme.app-mode .permission-dot.on i::after { content:'✓'; display:grid; place-items:center; color:#06141e; font-size:11px; font-style:normal; font-weight:900; }
body.enterprise-theme.app-mode .custom-field-row { display:flex; justify-content:space-between; gap:10px; padding:11px 0; border-top:1px solid var(--bdr); }
body.enterprise-theme.app-mode .custom-field-row strong,body.enterprise-theme.app-mode .custom-field-row span { display:block; }
body.enterprise-theme.app-mode .custom-field-row strong { color:var(--ink); font-size:11px; }
body.enterprise-theme.app-mode .custom-field-row span { margin-top:4px; color:var(--ink4); font-size:9px; line-height:1.4; }
body.enterprise-theme.app-mode .custom-field-row button { border:0; color:#dc2626; background:transparent; font:700 9px Inter,sans-serif; cursor:pointer; }
body.enterprise-theme.app-mode .workspace-empty { padding:24px 8px; color:var(--ink4); font-size:10.5px; line-height:1.6; text-align:center; }
body.enterprise-theme.app-mode .workspace-check { display:flex; align-items:flex-start; gap:8px; margin:10px 0; color:var(--ink3); font-size:11px; line-height:1.45; }
body.enterprise-theme.app-mode .workspace-check input { accent-color:var(--teal); }
body.enterprise-theme.app-mode .workspace-presets { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:14px; }
body.enterprise-theme.app-mode .workspace-presets button { padding:14px; border:1px solid var(--bdr); border-radius:13px; color:inherit; background:var(--w); font:inherit; text-align:left; cursor:pointer; }
body.enterprise-theme.app-mode .workspace-presets b,body.enterprise-theme.app-mode .workspace-presets span { display:block; }
body.enterprise-theme.app-mode .workspace-presets b { color:var(--ink); font-size:11.5px; }
body.enterprise-theme.app-mode .workspace-presets span { margin-top:4px; color:var(--ink4); font-size:9.5px; line-height:1.4; }

body.enterprise-theme.app-mode .dispatch-intelligence { margin-bottom:14px; border:1px solid rgba(27,212,168,.2); border-radius:17px; background:linear-gradient(120deg,rgba(27,212,168,.08),var(--w)); }
body.enterprise-theme.app-mode .dispatch-intel-head { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:15px 17px; }
body.enterprise-theme.app-mode .dispatch-intel-head span,body.enterprise-theme.app-mode .dispatch-intel-head strong,body.enterprise-theme.app-mode .dispatch-intel-head small { display:block; }
body.enterprise-theme.app-mode .dispatch-intel-head span { color:var(--teal-d); font-size:8px; font-weight:850; letter-spacing:.12em; }
body.enterprise-theme.app-mode .dispatch-intel-head strong { margin-top:5px; color:var(--ink); font-size:13px; }
body.enterprise-theme.app-mode .dispatch-intel-head small { margin-top:3px; color:var(--ink4); font-size:9.5px; }
body.enterprise-theme.app-mode .capacity-ring { width:60px; height:60px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; background:radial-gradient(circle closest-side,var(--w) 76%,transparent 78% 99%),conic-gradient(var(--teal) var(--capacity),var(--bdr) 0); }
body.enterprise-theme.app-mode .capacity-ring b,body.enterprise-theme.app-mode .capacity-ring span { grid-area:1/1; }
body.enterprise-theme.app-mode .capacity-ring b { margin-top:-7px; color:var(--ink); font-size:12px; }
body.enterprise-theme.app-mode .capacity-ring span { margin-top:17px; color:var(--ink4); font-size:7px; }
body.enterprise-theme.app-mode .dispatch-recs { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:0 12px 12px; }
body.enterprise-theme.app-mode .dispatch-rec { min-width:0; display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:10px; padding:10px; border:1px solid var(--bdr); border-radius:12px; background:var(--w); }
body.enterprise-theme.app-mode .dispatch-score { color:var(--teal-d); font-size:15px; font-weight:850; text-align:center; }
body.enterprise-theme.app-mode .dispatch-score small { display:block; color:var(--ink4); font-size:7px; }
body.enterprise-theme.app-mode .dispatch-rec strong,body.enterprise-theme.app-mode .dispatch-rec span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.enterprise-theme.app-mode .dispatch-rec strong { color:var(--ink); font-size:10.5px; }
body.enterprise-theme.app-mode .dispatch-rec span { margin-top:4px; color:var(--ink4); font-size:8.5px; }
body.enterprise-theme.app-mode .dispatch-rec button { padding:7px 9px; border:0; border-radius:8px; color:#06141e; background:var(--teal); font:800 8.5px Inter,sans-serif; cursor:pointer; }
body.enterprise-theme.app-mode .dispatch-all-clear { padding:0 17px 15px; color:var(--ink4); font-size:10.5px; }

body.enterprise-theme.app-mode .field-sync { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--bdr); border-radius:999px; color:var(--ink4); background:var(--w); font-size:9px; font-weight:700; }
body.enterprise-theme.app-mode .field-sync i { width:7px; height:7px; border-radius:50%; background:var(--teal); box-shadow:0 0 10px rgba(27,212,168,.5); }
body.enterprise-theme.app-mode .field-tech-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-bottom:13px; }
body.enterprise-theme.app-mode .field-tech-tabs button { min-width:0; display:grid; grid-template-columns:34px minmax(0,1fr); grid-template-rows:auto auto; column-gap:9px; padding:11px; border:1px solid var(--bdr); border-radius:13px; color:inherit; background:var(--w); font:inherit; text-align:left; cursor:pointer; }
body.enterprise-theme.app-mode .field-tech-tabs button.act { border-color:rgba(27,212,168,.45); box-shadow:0 0 0 2px rgba(27,212,168,.09); }
body.enterprise-theme.app-mode .field-tech-tabs button > span { grid-row:1/3; width:34px; height:34px; display:grid; place-items:center; border-radius:10px; color:#06141e; background:var(--teal); font-size:9px; font-weight:850; }
body.enterprise-theme.app-mode .field-tech-tabs b,body.enterprise-theme.app-mode .field-tech-tabs small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.enterprise-theme.app-mode .field-tech-tabs b { color:var(--ink); font-size:10.5px; }
body.enterprise-theme.app-mode .field-tech-tabs small { margin-top:3px; color:var(--ink4); font-size:8.5px; }
body.enterprise-theme.app-mode .field-work-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(270px,.65fr); gap:13px; }
body.enterprise-theme.app-mode .field-job-hero { padding:22px; border:1px solid rgba(27,212,168,.22); border-radius:18px; background:linear-gradient(145deg,rgba(27,212,168,.1),var(--w) 60%); }
body.enterprise-theme.app-mode .field-job-kicker { color:var(--teal-d); font-size:8px; font-weight:850; letter-spacing:.12em; }
body.enterprise-theme.app-mode .field-job-hero h2 { margin:8px 0 2px; color:var(--ink); font-size:22px; }
body.enterprise-theme.app-mode .field-job-hero h3 { margin:0; color:var(--ink2); font-size:14px; }
body.enterprise-theme.app-mode .field-job-hero > p { margin:6px 0 0; color:var(--ink4); font-size:10.5px; }
body.enterprise-theme.app-mode .field-status-flow { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin:18px 0; }
body.enterprise-theme.app-mode .field-status-flow button { padding:10px; border:1px solid var(--bdr); border-radius:10px; color:var(--ink3); background:var(--w); font:750 10px Inter,sans-serif; cursor:pointer; }
body.enterprise-theme.app-mode .field-status-flow button.act { color:#06141e; border-color:var(--teal); background:var(--teal); }
body.enterprise-theme.app-mode .field-context { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
body.enterprise-theme.app-mode .field-context > div { padding:11px; border:1px solid var(--bdr); border-radius:11px; background:var(--w); }
body.enterprise-theme.app-mode .field-context span,body.enterprise-theme.app-mode .field-context strong,body.enterprise-theme.app-mode .field-context small { display:block; }
body.enterprise-theme.app-mode .field-context span { color:var(--ink4); font-size:8px; text-transform:uppercase; }
body.enterprise-theme.app-mode .field-context strong { margin-top:5px; color:var(--ink); font-size:10px; }
body.enterprise-theme.app-mode .field-context small { margin-top:3px; color:var(--ink4); font-size:8.5px; line-height:1.4; }
body.enterprise-theme.app-mode .field-side-panel { padding:16px; border:1px solid var(--bdr); border-radius:16px; background:var(--w); }
body.enterprise-theme.app-mode .field-side-panel > header { display:flex; justify-content:space-between; margin-bottom:7px; color:var(--ink); font-size:11px; }
body.enterprise-theme.app-mode .field-side-panel > header span { color:var(--teal-d); }
body.enterprise-theme.app-mode .field-check { width:100%; display:flex; align-items:center; gap:9px; padding:10px 0; border:0; border-top:1px solid var(--bdr); color:var(--ink3); background:transparent; font:inherit; text-align:left; cursor:pointer; }
body.enterprise-theme.app-mode .field-check i { width:20px; height:20px; display:grid; place-items:center; flex:0 0 auto; border:1px solid var(--bdr2); border-radius:6px; color:#06141e; font-size:11px; font-style:normal; font-weight:900; }
body.enterprise-theme.app-mode .field-check span { font-size:10.5px; line-height:1.35; }
body.enterprise-theme.app-mode .field-check.done i { border-color:var(--teal); background:var(--teal); }
body.enterprise-theme.app-mode .field-check.done span { color:var(--ink4); text-decoration:line-through; }
body.enterprise-theme.app-mode .field-bottom-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; margin-top:13px; }
body.enterprise-theme.app-mode .field-close-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
body.enterprise-theme.app-mode .field-close-actions button { padding:10px; border:1px solid var(--bdr); border-radius:10px; color:var(--ink3); background:var(--bg); font:700 9.5px Inter,sans-serif; cursor:pointer; }

body.enterprise-theme.app-mode .academy-hero { display:grid; grid-template-columns:minmax(0,1fr) 150px; gap:24px; align-items:center; padding:24px; border:1px solid rgba(27,212,168,.24); border-radius:19px; background:linear-gradient(135deg,rgba(27,212,168,.12),var(--w) 62%); }
body.enterprise-theme.app-mode .academy-hero span { color:var(--teal-d); font-size:8px; font-weight:850; letter-spacing:.12em; }
body.enterprise-theme.app-mode .academy-hero h2 { margin:7px 0 5px; color:var(--ink); font-size:23px; }
body.enterprise-theme.app-mode .academy-hero p { max-width:620px; margin:0; color:var(--ink4); font-size:11px; line-height:1.55; }
body.enterprise-theme.app-mode .academy-hero > div:first-child > div { display:flex; gap:8px; margin-top:15px; }
body.enterprise-theme.app-mode .academy-hero > div:first-child button { padding:9px 12px; border:1px solid var(--bdr); border-radius:9px; color:var(--ink3); background:var(--w); font:750 10px Inter,sans-serif; cursor:pointer; }
body.enterprise-theme.app-mode .academy-hero > div:first-child button:first-child { color:#06141e; border-color:var(--teal); background:var(--teal); }
body.enterprise-theme.app-mode .academy-guide { height:125px; display:grid; place-items:center; align-content:center; border:1px solid rgba(255,255,255,.09); border-radius:18px; color:#fff; background:linear-gradient(145deg,#06141e,#0b2a3c); box-shadow:0 18px 40px rgba(3,15,23,.2); cursor:pointer; }
body.enterprise-theme.app-mode .academy-guide i { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; color:#06141e; background:var(--teal); font-size:14px; font-style:normal; font-weight:900; box-shadow:0 0 24px rgba(27,212,168,.28); }
body.enterprise-theme.app-mode .academy-guide b { margin-top:8px; font-size:10px; }
body.enterprise-theme.app-mode .academy-guide span { margin-top:2px; color:rgba(255,255,255,.48); font-size:8px; letter-spacing:0; }
body.enterprise-theme.app-mode .academy-role-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:9px; margin:13px 0; }
body.enterprise-theme.app-mode .academy-role-grid button { padding:14px; border:1px solid var(--bdr); border-radius:13px; color:inherit; background:var(--w); font:inherit; text-align:left; cursor:pointer; }
body.enterprise-theme.app-mode .academy-role-grid b,body.enterprise-theme.app-mode .academy-role-grid span,body.enterprise-theme.app-mode .academy-role-grid em { display:block; }
body.enterprise-theme.app-mode .academy-role-grid b { color:var(--ink); font-size:11px; }
body.enterprise-theme.app-mode .academy-role-grid span { margin-top:4px; color:var(--ink4); font-size:9px; }
body.enterprise-theme.app-mode .academy-role-grid em { margin-top:9px; color:var(--teal-d); font-size:9px; font-style:normal; font-weight:750; }
body.enterprise-theme.app-mode .academy-catalog { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }
body.enterprise-theme.app-mode .academy-catalog section { overflow:hidden; border:1px solid var(--bdr); border-radius:14px; background:var(--w); }
body.enterprise-theme.app-mode .academy-catalog header { padding:11px 12px; border-bottom:1px solid var(--bdr); color:var(--ink4); background:var(--bg); font-size:8px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
body.enterprise-theme.app-mode .academy-catalog section button { width:100%; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:11px 12px; border:0; border-bottom:1px solid var(--bdr); color:inherit; background:transparent; font:inherit; text-align:left; cursor:pointer; }
body.enterprise-theme.app-mode .academy-catalog section button:last-child { border-bottom:0; }
body.enterprise-theme.app-mode .academy-catalog section button:hover { background:color-mix(in srgb,var(--teal-glow) 55%,transparent); }
body.enterprise-theme.app-mode .academy-catalog b,body.enterprise-theme.app-mode .academy-catalog span { display:block; }
body.enterprise-theme.app-mode .academy-catalog b { color:var(--ink); font-size:9.5px; }
body.enterprise-theme.app-mode .academy-catalog span { margin-top:3px; color:var(--ink4); font-size:8px; line-height:1.35; }
body.enterprise-theme.app-mode .academy-catalog i { color:var(--teal-d); font-size:11px; font-style:normal; }

@media(max-width:1100px){body.enterprise-theme.app-mode .academy-catalog{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){body.enterprise-theme.app-mode .pipeline-brief,body.enterprise-theme.app-mode .workspace-presets,body.enterprise-theme.app-mode .academy-role-grid{grid-template-columns:repeat(2,1fr)}body.enterprise-theme.app-mode .workspace-grid,body.enterprise-theme.app-mode .field-work-grid{grid-template-columns:1fr}body.enterprise-theme.app-mode .dispatch-recs{grid-template-columns:1fr}}
@media(max-width:560px){body.enterprise-theme.app-mode .pipeline-brief,body.enterprise-theme.app-mode .workspace-presets,body.enterprise-theme.app-mode .field-tech-tabs,body.enterprise-theme.app-mode .field-context,body.enterprise-theme.app-mode .field-bottom-grid,body.enterprise-theme.app-mode .academy-role-grid,body.enterprise-theme.app-mode .academy-catalog,body.enterprise-theme.app-mode .academy-hero{grid-template-columns:1fr}body.enterprise-theme.app-mode .workspace-hero{align-items:flex-start;flex-direction:column}body.enterprise-theme.app-mode .workspace-hero select{width:100%}}

/* ── Phone: horizontal boards and matrices ───────────────────────────────────────
   Found by sweeping all 49 app screens for the same defects fixed on the dispatch
   board. Two survived triage here.

   1. .pipeline-board is six 205px columns inside a 364px phone — 1280px of board,
      every card clipped. Identical shape to the jobs kanban, so it gets the identical
      treatment: one full-width column per screen, swiped with snap. Same DOM, same
      stages, sizing only, so the desktop board is untouched.
   2. .permission-grid is a role matrix (permission name + five role columns at 54-66px)
      that has to stay wide to be a matrix at all — collapsing it would destroy the
      thing being read. It scrolls inside .workspace-panel, so the fix is an honest
      affordance rather than a re-layout: fade the trailing edge so the cut reads as
      "swipe for more roles" instead of as clipped text. */
@media(max-width:700px){
  body.enterprise-theme.app-mode .pipeline-board{
    grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:calc(100vw - 72px);
    scroll-snap-type:x proximity;overscroll-behavior-x:contain;gap:10px}
  body.enterprise-theme.app-mode .pipeline-board > .pipeline-stage{scroll-snap-align:start;min-width:0}
  body.enterprise-theme.app-mode .workspace-panel{
    scrollbar-width:none;
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 26px),transparent 100%);
    mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 26px),transparent 100%)}
  body.enterprise-theme.app-mode .workspace-panel::-webkit-scrollbar{display:none}
  /* Pin the permission name. Scrolled out to Technician/Finance you were left toggling an
     unlabelled row of checkboxes with no idea which permission you were granting — the
     one interaction on this screen where getting the row wrong actually matters. The grid
     is exactly six children per row (42 children, 7 rows), so 6n+1 is the first column. */
  body.enterprise-theme.app-mode .permission-grid > *:nth-child(6n+1){
    position:sticky;left:0;z-index:1;background:var(--w,#fff)}
}
/* The mobile stage picker already names the stage above the list, so the pipeline's own
   stage header repeats those exact words directly beneath it. Hidden here rather than in
   index.html because `body.enterprise-theme.app-mode .pipeline-stage > header{display:flex}`
   two rules up outranks a plain `[data-mstage] > .mstage-on > header`. */
@media(max-width:700px){
  body.enterprise-theme.app-mode [data-mstage] > .mstage-on > header{display:none}
}

/* ── A reading floor on phones ──────────────────────────────────────────────────
   A both-engines clipping sweep found 634 pieces of sub-11px text. The uppercase
   letter-spaced eyebrows are a deliberate micro-label style and are left alone, but
   the 8–9.5px items below are SENTENCES — card descriptions, helper text under a
   setting, the line explaining what a workspace preset does. At 8px on a phone they
   are decoration rather than something anyone reads. Raised to 12px, mobile only;
   desktop keeps the tighter type it was designed with. */
@media(max-width:700px){
  body.enterprise-theme.app-mode :where(
    .pipeline-brief small,
    .pipeline-card > small,
    .permission-callout span,
    .custom-field-row span,
    .workspace-presets span,
    .academy-role-grid span,
    .academy-catalog span,
    .academy-hero span,
    .workspace-grid span,
    .field-work-grid span){font-size:12px!important;line-height:1.45}
  /* Eyebrows stay small but not invisible. */
  body.enterprise-theme.app-mode :where(
    .pipeline-brief span,
    .pipeline-card-top > span,
    .workspace-hero span,
    .permission-grid > b){font-size:10.5px!important}
}

/* ── Reading floor, round two ───────────────────────────────────────────────────
   The remaining sub-11px text, grouped by the RULE producing it rather than by
   instance: 22 styles across 111 places. Everything here is content someone reads —
   an academy card's title, what a pricebook tier includes, the label under a metric,
   the technician's name on a job card — not a micro-label. Uppercase letter-spaced
   eyebrows and Leaflet's own map tooltips are deliberately excluded: the first is a
   style, the second belongs to a third-party library and map labels are small by
   convention everywhere. Mobile only; desktop keeps its tighter type. */
@media(max-width:700px){
  body.enterprise-theme.app-mode :where(
    .academy-catalog b, .academy-catalog span, .academy-catalog small,
    .academy-guide b, .academy-guide span,
    .academy-role-grid span, .academy-role-grid em,
    .pb-pill, .pb-item-price span,
    .tm-open, .tm-card small,
    .mc-trend,
    .kanban-card-tech,
    .fm-tool small, .fm-kicker span,
    .workspace-empty, .workspace-panel small,
    .live-crew-copy small, .live-map-privacy,
    .cc-ag-tag, .wf-row-t span,
    .rep-card small, .rep-card div span){font-size:12px!important;line-height:1.4}
  /* Portal and Reports explain themselves in <small>; on a phone those sentences
     were 10.5px, the smallest text on the screen and the only thing telling you what
     the setting does. */
  body.enterprise-theme.app-mode :where(#page-portal small, #page-reports small,
    #page-workspace small){font-size:12px!important;line-height:1.45}
}

/* Final theme precedence: appearance style must never override dark-mode readability. */
html[data-theme="obsidian"][data-ui="standard"] body.enterprise-theme.app-mode,
html[data-theme="obsidian"][data-ui="fancy"] body.enterprise-theme.app-mode {
  color-scheme:dark;
  --ink:#f4f8fa;--ink2:#dbe7eb;--ink3:#b8c8ce;--ink4: #55646D;
  --w:#101f28;--bg:#06141e;--bg2:#0b2735;
  --bdr:rgba(255,255,255,.1);--bdr2:rgba(255,255,255,.18);
  --teal:#1bd4a8;--teal-d:#5ef0cb;--teal-glow:rgba(27,212,168,.12);
}
html[data-theme="obsidian"] body.enterprise-theme.app-mode :where(.content,#page-overview,.live-command-grid) { color:var(--ink); }
html[data-theme="obsidian"] body.enterprise-theme.app-mode #page-overview :where(.ov-greeting,.live-console-head h2,.live-line p,.live-call-intel strong,.live-crew-copy strong,.signal-node span) { color:#f4f8fa; }
html[data-theme="obsidian"] body.enterprise-theme.app-mode #page-overview :where(.ov-summary,.live-call-clock span,.live-map-privacy,.live-crew-copy small,.signal-node small) { color:#a9bbc2; }

/* ── Selected job-status pill ─────────────────────────────────────────────────
   .jstage is a toggle BUTTON, but it is grouped with the text-input selectors
   above (lines 306/307/735/736/954) to share their shape. Those rules also set
   `background`, and at specificity (0,2,1)+ they outrank the base rule
   `.jstage.on{background:#1BD4A8}` (0,2,0) in index.html. The result: the SELECTED
   job status rendered identically to the four unselected ones, so the job modal
   gave no indication of which stage a job was actually in.
   `.tp.act` already receives this treatment (lines 242/701/944); .jstage was missed.
   Listed per-theme so each override outranks its corresponding input rule. */
body.enterprise-theme.app-mode .jstage.on,
html[data-theme="obsidian"] body.enterprise-theme.app-mode .jstage.on,
html[data-ui="standard"] body.enterprise-theme.app-mode .jstage.on {
  background: #1BD4A8 !important;
  border-color: #1BD4A8 !important;
  color: #0D1B2A !important;
  font-weight: 700;
}

/* ── WCAG 2.3.3 / prefers-reduced-motion — specificity backstop ─────────────────
   The blanket rule above is `body.enterprise-theme.app-mode *` (0,2,1). The status
   dot's own rule is `body.enterprise-theme.app-mode .sb-dot` (0,3,1), so it WON on
   specificity despite both carrying !important, and dashPulse kept running for a
   user who had asked the OS for reduced motion. Measured: 1 infinite animation
   still playing under prefers-reduced-motion: reduce.

   Matching the offending selectors exactly, last in the file, is what actually
   stops it — a broader selector cannot outrank a narrower one. */
@media (prefers-reduced-motion: reduce) {
  body.enterprise-theme.app-mode .sb-dot,
  body.enterprise-theme.app-mode .pn-dot,
  body.enterprise-theme.app-mode .live-dot,
  body.enterprise-theme.app-mode [class*="-dot"],
  body.enterprise-theme.app-mode [class*="pulse"],
  body.enterprise-theme.app-mode [class*="Pulse"] { animation: none !important; }
}
