/* admin/src/admin.css — SBSDispatch Admin Backend shared styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

:root {
  /* Chrome greys ~5× lighter than legacy #707186; list zebra + row hover unchanged */
  --gray-base: #e2e3e7;
  /* Body / shell; main column (right of nav, below topbar) */
  --bg: #ffffff;
  --bg2: #ffffff;
  --surface: #e2e3e7;
  --surface2: #e4e5e9;
  --surface3: #e6e7eb;
  --modal-elevated: #e8e9ed;
  --border: #dedee2;
  --border2: #dcdde0;
  --accent: #f5a623;
  --accent2: #c87d0e;
  --teal: #0db388;
  /* Brand primary: matches driver / dispatcher (scrollbars, buttons, focus) */
  --app-primary: #24A0ED;
  --app-primary-hover: #1a8fd0;
  /* Inline / legacy: same family as --accent for highlights; keep --accent for KPI stripes if needed */
  --accent-lt: rgba(36, 160, 237, 0.12);
  --blue: #24A0ED;
  --red: #9a4d52; /* semantic only: overdue, delete rows, errors */
  --btn-red: #24A0ED;
  --btn-red-hover: #1a8fd0;
  --nav-chrome-bg: #dedfe2;
  --topbar-brand-bg: #d8d8db;
  --header-notification-bg: #eef0f5;
  --list-zebra-odd: #ffffff;
  --list-zebra-even: #e9ecf2;
  --green: #16a34a;
  --amber: #d97706;
  --text: #111111;
  --text2: #5a5d68;
  --text3: #6d717d;
  --input-bg: #ffffff;
  --input-text: #111111;
  /* Compulsory / mandatory fields: match dispatcher Orders pill + modal required tint */
  --zc-orders-active-fill: rgba(36, 160, 237, 0.14);
  --zc-orders-active-fill-focus: rgba(36, 160, 237, 0.22);
  --zc-orders-active-border: rgba(36, 160, 237, 0.42);
  --zc-req-fill: var(--zc-orders-active-fill);
  --zc-req-fill-focus: var(--zc-orders-active-fill-focus);
  --zc-req-border: var(--zc-orders-active-border);
  --font-serif: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Narrower rail so list pages (e.g. User Management) use more viewport width */
  --nav-w: 156px;
  --top-h: 52px;
  --radius: 6px;
  --radius-lg: 10px;
  --scrollbar-thumb: var(--btn-red);
  --scrollbar-track: #f0f2f6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; padding-bottom: 36px; }

.zc-copy-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  padding: 8px 12px; text-align: center; font-size: 12px; color: var(--text3);
  background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--border);
  font-family: var(--font-mono);
}
.zc-copy-bar a {
  color: var(--accent2, #c45c4a);
  text-decoration: none;
  font-weight: 600;
}
.zc-copy-bar a:hover { text-decoration: underline; }
.admin-surface-on { box-shadow: 0 0 0 2px var(--teal); }

@media (min-width: 901px) {
  html, body { overflow: hidden; }
}

/* ── Scrollbar (thumb: logo red — see zc-app-themes.css) ── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb, #24A0ED) var(--scrollbar-track, var(--bg2));
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track, var(--bg2)); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb, #24A0ED); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--btn-red-hover); }

/* ── Layout shell ── */
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; grid-template-rows: var(--top-h) 1fr; height: 100vh; }

/* ── Topbar ── */
.topbar {
  grid-column: 1 / -1;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: stretch; padding: 0 20px; gap: 14px;
  position: relative; z-index: 50;
}
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(520px, 46vw);
}
.topbar-brand img {
  flex-shrink: 0;
}
.topbar-brand > div {
  min-width: 0;
  flex: 1 1 auto;
}
@media (min-width: 901px) {
  .topbar-brand {
    background: var(--topbar-brand-bg);
    margin-left: -20px;
    padding-left: 20px;
    padding-right: 14px;
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.06);
  }
}
.brand-icon {
  width: 28px; height: 28px;
  background: var(--btn-red); color: #fff;
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; flex-shrink: 0;
}
.brand-name {
  font-family: var(--font-mono); font-size: 14px; font-weight: 500; letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-name em { color: var(--btn-red); font-style: normal; }
.brand-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text3);
  border: 1px solid var(--border2); padding: 1px 6px; border-radius: 3px;
  flex-shrink: 0;
}
.topbar-middle {
  flex: 1 1 140px;
  min-width: 0;
  display: flex; align-items: center; gap: 8px;
  background: var(--header-notification-bg);
  border-radius: 8px;
  padding: 4px 10px;
  align-self: center;
}
.search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 280px;
}
.topbar-search {
  background: var(--input-bg); border: 1px solid var(--border2); color: var(--input-text);
  font-family: var(--font-sans); font-size: 14px; padding: 4px 12px; padding-left: 30px; line-height: 1.35;
  border-radius: var(--radius); outline: none; width: 100%; max-width: 280px; position: relative;
  box-sizing: border-box;
}
.topbar-search:focus { border-color: var(--btn-red); box-shadow: 0 0 0 2px rgba(36, 160, 237, 0.28); }
.search-wrap::before { content: '⌕'; position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 17px; pointer-events: none; }
.topbar-right {
  margin-left: auto;
  flex-shrink: 0;
  display: flex; align-items: center; gap: 8px;
  background: var(--header-notification-bg);
  border-radius: 8px;
  padding: 4px 10px;
  align-self: center;
}
.ws-indicator { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text3); font-family: var(--font-mono); }
.ws-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); }
.ws-dot.live { background: var(--teal); box-shadow: 0 0 5px var(--teal); }
.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 6px; border-radius: 20px;
  border: 1px solid var(--border); cursor: pointer;
  transition: border-color .15s;
}
.topbar-user:hover { border-color: var(--border2); }
.user-ava {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--btn-red); color: #fff;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-name { font-size: 13px; }
.user-role { font-size: 11px; color: var(--btn-red); font-family: var(--font-mono); }
.topbar-btn {
  background: var(--btn-red); border: 1px solid #1a8fd0; color: #fff;
  font-size: 12px; font-family: var(--font-sans); padding: 5px 10px;
  border-radius: var(--radius); cursor: pointer; transition: all .15s;
  font-weight: 600;
}
.topbar-btn:hover { background: var(--btn-red-hover); color: #fff; }

/* ── Sidebar nav ── */
.sidebar {
  background: var(--nav-chrome-bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--surface);
}
.sidebar::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar::-webkit-scrollbar-track { background: var(--nav-chrome-bg); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--btn-red-hover); }
.nav-group-label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text3);
  padding: 10px 8px 3px;
  font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 8px; cursor: pointer;
  color: var(--text2); font-size: 12px;
  font-weight: 700;
  border-left: 2px solid transparent;
  transition: all .12s; user-select: none; position: relative;
  white-space: nowrap;
  line-height: 1.2;
}
.nav-item:hover { color: var(--text); background: rgba(0,0,0,.05); }
.nav-item.active {
  color: var(--text);
  border-left-color: var(--btn-red);
  background: rgba(36, 160, 237, 0.12);
  box-shadow: inset 0 0 0 1px rgba(36, 160, 237, 0.2);
}
/* Add-on prices: extra visibility in sidebar. */
.nav-item.nav-item-hybrid { font-weight: 800; border-left-color: rgba(36, 160, 237, 0.4); }
.nav-item.nav-item-hybrid.active { border-left-color: var(--btn-red); }
a.nav-item { text-decoration: none; color: inherit; }
.nav-icon { width: 14px; font-size: 13px; flex-shrink: 0; text-align: center; line-height: 1; }

.nav-badge {
  margin-left: auto; background: var(--btn-red); color: #fff;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  padding: 0 5px; border-radius: 8px; min-width: 18px; text-align: center;
}
.nav-badge.amber { background: var(--amber); color: #000; }
.sidebar-footer { margin-top: auto; padding: 8px 8px; font-size: 10px; color: var(--text3); font-family: var(--font-mono); border-top: 1px solid var(--border); }

/* ── Main content ── */
/* min-width:0 so grid 1fr can shrink; flex child can use full column width (avoids “empty” gutters beside lists). */
.main { overflow: hidden; display: flex; flex-direction: column; background: var(--bg2); min-width: 0; }
.page { display: none; flex-direction: column; height: 100%; overflow: hidden; min-width: 0; }
.page.active { display: flex; flex: 1 1 auto; min-height: 0; }
.page-top {
  padding: 18px 24px 0; flex-shrink: 0;
  display: flex; align-items: flex-start; gap: 12px;
}
.page-heading { flex: 1; }
.page-title { font-family: var(--font-serif); font-size: 23px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.page-title em { color: var(--btn-red); font-style: italic; }
.page-desc { font-size: 13px; color: var(--text2); margin-top: 3px; font-family: var(--font-mono); }
/* Company Information — layout per company.png reference */
#page-companies .page-body {
  padding: 20px 24px 28px;
  background: #f5f6f8;
}
.co-tenant-layout {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1280px;
}
.co-panel--grey {
  background: #e8e9ed;
  border-radius: 12px;
  padding: 20px 22px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  border: 1px solid #dcdee3;
}
.co-panel__head { margin-bottom: 14px; }
.co-panel__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.02em;
}
.co-panel__sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: #5c6370;
  line-height: 1.45;
  font-family: var(--font-mono);
}
.co-profile-panel {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #ffffff;
  border-radius: 8px;
  padding: 18px 20px;
  border: 1px solid #e2e4e8;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.co-profile-logo-wrap {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafbfc;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
}
.co-profile-logo {
  max-width: 76px;
  max-height: 76px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.co-profile-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.co-profile-row {
  display: grid;
  gap: 14px 20px;
  align-items: start;
}
.co-profile-row--top {
  grid-template-columns: minmax(72px, 0.75fr) minmax(100px, 1fr) minmax(140px, 1.35fr) minmax(88px, 0.85fr) minmax(200px, 2.2fr);
}
.co-field--address-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-width: 0;
}
.co-address-block {
  flex: 1;
  min-width: 0;
}
.co-profile-edit-btn {
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 1px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 16px;
  line-height: 1.2;
  white-space: nowrap;
}
.co-profile-row--bottom {
  grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr) minmax(200px, 3fr);
}
.co-field { min-width: 0; }
.co-field__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b919c;
  margin-bottom: 4px;
}
.co-field__value {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1a1d24;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.co-field__value--mono { font-family: var(--font-mono); font-size: 13px; font-weight: 400; }
.co-billing-section {
  margin: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #dcdee3;
  padding: 18px 20px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.co-billing-oneline {
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.co-bill-ol-desc {
  width: min(240px, 32vw);
  flex: 1 1 160px;
  min-width: 120px;
}
.co-bill-ol-amt { width: 92px; }
.co-bill-ol-tax { width: 64px; }
.co-bill-ol-month { width: 132px; }
.co-bill-ol-meta {
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  padding: 0 2px;
}
.co-bill-ol-totals {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text);
  min-width: 100px;
}
.co-bill-ol-send {
  font-size: 12px;
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  margin: 0;
  cursor: pointer;
}
.co-bill-ol-refresh { margin-left: auto; }
.co-billing-table-wrap {
  overflow-x: auto;
}
.co-billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.co-billing-table thead th {
  text-align: left;
  padding: 10px 8px;
  background: #1a56db;
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.co-billing-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid #e8eaed;
  vertical-align: middle;
}
.co-billing-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}
.co-billing-table .co-bill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.co-billing-table .cell-mono {
  font-family: var(--font-mono);
}
.co-subscription-section { margin: 0; }
.co-subscription-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e4e8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.co-subscription-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}
.co-subscription-table thead th {
  background: #6d717a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 12px;
  white-space: nowrap;
  border: none;
}
.co-subscription-table tbody td {
  padding: 12px;
  vertical-align: top;
  line-height: 1.4;
  background: #ffffff;
  border-bottom: 1px solid #eceef2;
  color: #1a1d24;
}
.co-subscription-table .co-sub-col--date,
.co-subscription-table th.co-sub-col--date {
  white-space: nowrap;
  width: 1%;
}
.co-subscription-table .co-sub-col--email,
.co-subscription-table th.co-sub-col--email,
.co-subscription-table .co-sub-col--phone,
.co-subscription-table th.co-sub-col--phone {
  white-space: nowrap;
  width: 1%;
}
.co-subscription-table .co-sub-col--amount,
.co-subscription-table th.co-sub-col--amount {
  white-space: nowrap;
  width: 1%;
  text-align: left;
}
.co-subscription-table .co-sub-col--license,
.co-subscription-table th.co-sub-col--license {
  white-space: nowrap;
  width: 1%;
}
.co-subscription-table .co-sub-col--import,
.co-subscription-table th.co-sub-col--import {
  white-space: nowrap;
  width: 1%;
}
.co-subscription-table .co-sub-col--features,
.co-subscription-table th.co-sub-col--features {
  white-space: nowrap;
  min-width: 7rem;
}
.co-subscription-table .co-sub-col--company,
.co-subscription-table th.co-sub-col--company {
  min-width: 11rem;
  max-width: 22rem;
  white-space: normal;
}
.co-subscription-table tbody tr:last-child td { border-bottom: none; }
.co-subscription-table .mono { font-family: var(--font-mono); font-size: 12px; }
.co-subscription-table .co-sub-addr {
  display: block;
  font-size: 11px;
  color: #6d717a;
  margin-top: 4px;
  max-width: 240px;
  line-height: 1.35;
}
.co-sub-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef0f3;
  border: 1px solid #d8dbe0;
  color: #4a4f58;
}
@media (max-width: 960px) {
  .co-profile-panel { flex-direction: column; }
  .co-profile-row--top,
  .co-profile-row--bottom { grid-template-columns: 1fr 1fr; }
  .co-field--address-row,
  .co-field--notes { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .co-profile-row--top,
  .co-profile-row--bottom { grid-template-columns: 1fr; }
}
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.page-body {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 24px 28px;
}
/* Single full-height table: keep toolbar + header visible; scroll rows only */
.page-body:has(> .tbl-wrap:only-child) {
  overflow-y: hidden;
}
.page-body > .tbl-wrap:only-child {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.page-body > .tbl-wrap:only-child > .tbl-toolbar {
  flex-shrink: 0;
}
.page-body > .tbl-wrap:only-child > table {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  width: 100%;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.page-body > .tbl-wrap:only-child > table thead,
.page-body > .tbl-wrap:only-child > table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.page-body > .tbl-wrap:only-child > table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: 0 1px 0 var(--border);
}

/* ── Tabs ── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-shrink: 0; padding: 0 24px; }
.tab {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px;
  text-transform: uppercase; padding: 10px 16px;
  font-weight: 700;
  color: var(--text3); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all .15s;
}
.tab:hover { color: var(--text2); }
.tab.active { color: var(--btn-red); border-bottom-color: var(--btn-red); }

/* ── KPI cards ── */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 16px; position: relative; overflow: hidden;
}
.kpi::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; }
.kpi.a::after { background: var(--btn-red); }
.kpi.t::after { background: var(--teal); }
.kpi.b::after { background: var(--blue); }
.kpi.g::after { background: var(--green); }
.kpi.r::after { background: var(--red); }
.kpi-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); margin-bottom: 5px; }
.kpi-val { font-family: var(--font-mono); font-size: 29px; font-weight: 500; line-height: 1; color: var(--text); }
.kpi-val-sm { font-size: 18px; line-height: 1.15; word-break: break-word; }
.kpi-val-date { font-size: 14px; letter-spacing: 0; font-weight: 600; }
.kpi-sub { font-size: 12px; color: var(--text3); margin-top: 4px; }
.acct-ar-ap-kpis { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1200px) {
  .acct-ar-ap-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Buttons ── */
.btn {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  padding: 7px 14px; border-radius: var(--radius); border: none; cursor: pointer;
  transition: all .12s; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn-accent  { background: var(--btn-red); color: #fff; border: 1px solid #1a8fd0; }
.btn-accent:hover  { background: var(--btn-red-hover); color: #fff; }
.btn-teal    { background: var(--btn-red); color: #fff; border: 1px solid #1a8fd0; }
.btn-teal:hover { background: var(--btn-red-hover); color: #fff; }
.btn-secondary {
  background: var(--btn-red); color: #fff; border: 1px solid #1a8fd0;
}
.btn-secondary:hover { background: var(--btn-red-hover); color: #fff; }
.btn-ghost:not(.btn-danger) {
  background: var(--btn-red); color: #fff; border: 1px solid #1a8fd0; }
.btn-ghost:not(.btn-danger):hover { background: var(--btn-red-hover); color: #fff; }
.btn-danger  { background: transparent; color: var(--btn-red); border: 1px solid var(--btn-red); }
.btn-danger:hover { background: var(--btn-red-hover); color: #fff; }
.btn-blue    { background: var(--btn-red); color: #fff; border: 1px solid #1a8fd0; }
.btn-blue:hover { background: var(--btn-red-hover); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn:disabled { opacity: .35; cursor: not-allowed; }

/* General Accounting — section tabs + fleet toolbar (shared look, one active tab) */
.acct-tabstrip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.btn.acct-tab {
  background: #2a2d34;
  color: var(--btn-red);
  border: 1px solid rgba(36, 160, 237, 0.4);
}
.btn.acct-tab:hover {
  border-color: var(--btn-red);
  color: var(--btn-red);
  background: #32363f;
}
.btn.acct-tab.active {
  background: var(--btn-red);
  border-color: #1a8fd0;
  color: #fff;
}
.acct-tab-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}
@media (max-width: 720px) {
  .acct-tab-actions {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    width: 100%;
  }
}

/* General Accounting — deep grey cards, brand blue copy (matches action buttons) */
#page-accounting .scard,
#page-accounting .kpi {
  background: #2a2d34;
  border-color: #1e2128;
  color: var(--btn-red);
}
#page-accounting .kpi-label,
#page-accounting .kpi-val,
#page-accounting .kpi-sub,
#page-accounting .kpi-val-date,
#page-accounting .scard-title,
#page-accounting .scard .fld label,
#page-accounting #acctArApNote,
#page-accounting .scard > p,
#page-accounting #acctBankList,
#page-accounting #acctBankBalance,
#page-accounting #acct-panel-payouts > p {
  color: var(--btn-red);
}
#page-accounting .scard .tbl-wrap {
  background: transparent;
  border: 1px solid rgba(36, 160, 237, 0.25);
}
#page-accounting .tbl-wrap thead th {
  background: #23262e;
  color: var(--btn-red);
  border-bottom-color: rgba(36, 160, 237, 0.25);
}
#page-accounting .tbl-wrap tbody td {
  color: var(--btn-red);
}
#page-accounting .tbl-wrap tbody tr:nth-child(odd) td {
  background: rgba(0, 0, 0, 0.18);
}
#page-accounting .tbl-wrap tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.1);
}
#page-accounting .tbl-wrap tbody tr:hover td {
  background: rgba(36, 160, 237, 0.14) !important;
  color: #111;
}
#page-accounting .inp:focus,
#page-accounting .sel:focus,
#page-accounting .fld input:focus,
#page-accounting .fld select:focus,
#page-accounting .fld textarea:focus {
  border-color: #111;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.28);
}
#page-accounting #acct-panel-fleet .tbl-wrap,
#page-accounting #acct-panel-payouts .tbl-wrap {
  background: #2a2d34;
  border-color: #1e2128;
}
#page-accounting .kpi.a::after,
#page-accounting .kpi.t::after,
#page-accounting .kpi.b::after,
#page-accounting .kpi.g::after,
#page-accounting .kpi.r::after {
  background: var(--btn-red);
}
#page-accounting .empty-row td {
  color: var(--btn-red);
  opacity: 0.85;
}

/* ── Table ── */
.tbl-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

/* Vehicle pricing matrix + service levels — scroll wide/tall grids inside page */
#page-pricing .page-body.pricing-unified-page-body,
#page-service_levels .page-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#page-pricing .pricing-matrix-block .tbl-wrap.zc-admin-matrix-scroll,
#page-service_levels .page-body > .tbl-wrap.zc-admin-matrix-scroll {
  flex: 1 1 auto;
  min-height: 12rem;
  max-height: min(70vh, calc(100vh - 220px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#page-pricing .pricing-matrix-block .tbl-wrap.zc-admin-matrix-scroll > table,
#page-service_levels .page-body > .tbl-wrap.zc-admin-matrix-scroll > table {
  display: table;
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}
#page-pricing .pricing-matrix-block .tbl-wrap.zc-admin-matrix-scroll > table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}
#page-pricing .pricing-matrix-block .tbl-wrap.zc-admin-matrix-scroll > table thead th:first-child,
#page-pricing .pricing-matrix-block .tbl-wrap.zc-admin-matrix-scroll > table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
#page-pricing .pricing-matrix-block .tbl-wrap.zc-admin-matrix-scroll > table thead th:first-child {
  z-index: 3;
}
#page-pricing .pricing-matrix-hint {
  font-size: 11px;
  color: var(--text3);
  margin: 12px 0 0;
  line-height: 1.45;
}
#page-service_levels .page-body > .tbl-wrap.zc-admin-matrix-scroll > table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}

/* Staff lists: toolbar fixed, thead sticky, tbody scrolls (with toolbar sibling) */
.tbl-wrap.zc-list-table-flex {
  display: flex;
  flex-direction: column;
  max-height: min(calc(100vh - 200px), 720px);
  min-height: 0;
}
.tbl-wrap.zc-list-table-flex > .tbl-toolbar {
  flex-shrink: 0;
}
.tbl-wrap.zc-list-table-flex > table {
  flex: 1 1 auto;
  min-height: 0;
  display: block;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tbl-wrap.zc-list-table-flex > table thead,
.tbl-wrap.zc-list-table-flex > table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.tbl-wrap.zc-list-table-flex > table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface2);
  box-shadow: 0 1px 0 var(--border);
}
.tbl-wrap.zc-list-table-flex > [id$="ListPager"] {
  flex-shrink: 0;
  margin-top: 6px;
}

/*
 * User Management + Customer Directory: the shared .zc-list-table-flex rule caps height at 720px,
 * so on most desktops a large band of the main column stays empty (often read as unused “side” space).
 * Let the list card grow with the page flex area; tbody keeps its own scroll.
 */
#page-users .page-body > .tbl-wrap.zc-list-table-flex,
#page-customers .page-body > .tbl-wrap.zc-list-table-flex {
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  align-self: stretch;
  box-sizing: border-box;
}
#page-users .page-body > .tbl-wrap.zc-list-table-flex > table,
#page-customers .page-body > .tbl-wrap.zc-list-table-flex > table {
  width: 100%;
  box-sizing: border-box;
}
#page-users .zc-admin-users-cust-wrap > table thead,
#page-users .zc-admin-users-cust-wrap > table tbody,
#page-customers .zc-admin-users-cust-wrap > table thead,
#page-customers .zc-admin-users-cust-wrap > table tbody {
  min-width: 100%;
  box-sizing: border-box;
}

.page-body.zc-audit-page-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}
.zc-audit-online-block {
  max-height: min(38vh, 420px);
}
.zc-audit-grid-block {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(calc(100vh - 280px), 680px);
}

.page-body.zc-inv-dash-page-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}
.page-body.zc-inv-dash-page-body > .kpi-row {
  flex-shrink: 0;
}
.page-body.zc-inv-dash-page-body > .tbl-wrap.zc-list-table-flex {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(calc(100vh - 240px), 720px);
}

.page-body.zc-delivered-page-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0;
}
.page-body.zc-delivered-page-body > .tbl-wrap.zc-list-table-flex {
  flex: 1 1 auto;
  min-height: 0;
}

.zc-list-pager-host {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text3);
  border-top: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.zc-list-pager-inner {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.zc-list-pager-label {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.zc-list-pager-hint {
  font-size: 12px;
  color: var(--text3);
  margin-top: 8px;
  max-width: 56rem;
  line-height: 1.45;
}
.tbl-toolbar {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.tbl-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); }
.inp {
  background: var(--input-bg); border: 1px solid var(--border2); color: var(--input-text);
  font-family: var(--font-sans); font-size: 13px; padding: 3px 10px; line-height: 1.35;
  border-radius: var(--radius); outline: none;
}
.inp:focus { border-color: var(--btn-red); box-shadow: 0 0 0 2px rgba(36, 160, 237, 0.22); }
.sel {
  background: var(--input-bg); border: 1px solid var(--border2); color: var(--input-text);
  font-family: var(--font-sans); font-size: 13px; padding: 3px 8px; line-height: 1.35;
  border-radius: var(--radius); outline: none; cursor: pointer;
}
.sel:focus { border-color: var(--btn-red); box-shadow: 0 0 0 2px rgba(36, 160, 237, 0.22); }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--surface2);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text3); padding: 7px 14px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
thead th.r { text-align: right; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .08s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(odd) td { background: var(--list-zebra-odd); }
tbody tr:nth-child(even) td { background: var(--list-zebra-even); }
tbody tr:hover td { background: #dde1e8 !important; }
tbody td { padding: 7px 14px; font-size: 14px; vertical-align: middle; line-height: 1.28; }
tbody td.r { text-align: right; }
tbody td.mono { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.empty-row td { text-align: center; color: var(--text3); padding: 32px; font-size: 13px; font-family: var(--font-mono); }

/* All Users: tighter columns, compact TZ / customer cells */
#page-users .tbl-wrap thead th {
  padding: 6px 8px;
  letter-spacing: 0.08em;
}
#page-users .tbl-wrap tbody td {
  padding: 5px 8px;
  font-size: 13px;
}
#page-users .tbl-wrap td.users-cust-cell {
  max-width: 200px;
  font-size: 12px;
  line-height: 1.25;
  max-height: 2.55em;
  color: var(--text2);
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: hidden;
  vertical-align: top;
}
#page-users .tbl-wrap td.users-tz {
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* User Management + Customer Directory: no horizontal scroll; text cells max 2 lines */
.zc-cell-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.3;
  max-height: calc(1.3em * 2 + 2px);
  min-width: 0;
}
/* Customer Directory: horizontal scroll when needed; row opens edit (no action column). */
#page-customers .zc-admin-users-cust-wrap {
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
}
#page-users .zc-admin-users-cust-wrap {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
#page-users .zc-admin-users-cust-wrap > table {
  width: 100%;
  table-layout: fixed;
}
#page-customers .zc-admin-users-cust-wrap > table {
  width: 100%;
  min-width: 860px;
  table-layout: fixed;
  border-collapse: collapse;
}
#page-users .zc-admin-users-cust-wrap > table thead th {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.15;
  vertical-align: bottom;
  hyphens: auto;
}
#page-customers .zc-admin-users-cust-wrap > table thead th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  hyphens: none;
  overflow-wrap: normal;
  line-height: 1.15;
  vertical-align: bottom;
}

/* User Management: one line per row — ellipsis text; rows open edit on click */
#page-users .zc-admin-users-cust-wrap .zc-cell-clamp-2 {
  display: block;
  -webkit-box-orient: unset;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
  max-height: none;
  line-height: 1.28;
  min-width: 0;
}
#page-users .zc-admin-users-cust-wrap > table thead th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  hyphens: none;
  overflow-wrap: normal;
}
#page-users .zc-admin-users-cust-wrap > table tbody td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

#page-users .zc-admin-users-cust-wrap tbody tr.users-row-clickable {
  cursor: pointer;
}
#page-users .zc-admin-users-cust-wrap tbody tr.users-row-clickable:focus {
  outline: 2px solid var(--btn-red);
  outline-offset: -2px;
}

/* Customer Directory: single-line cells + column lines (same pattern as Users) */
#page-customers .zc-admin-users-cust-wrap .zc-cell-clamp-2 {
  display: block;
  -webkit-box-orient: unset;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
  max-height: none;
  line-height: 1.28;
  min-width: 0;
}
#page-customers .zc-admin-users-cust-wrap > table tbody td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
#page-customers .zc-admin-users-cust-wrap tbody tr.cust-row-clickable {
  cursor: pointer;
}
#page-customers .zc-admin-users-cust-wrap tbody tr.cust-row-clickable:focus {
  outline: 2px solid var(--btn-red);
  outline-offset: -2px;
}
#page-customers .zc-admin-users-cust-wrap > table thead th:not(:first-child),
#page-customers .zc-admin-users-cust-wrap > table tbody td:not(:first-child) {
  border-left: 1px solid var(--border);
}
#page-customers .zc-admin-users-cust-wrap > table thead th,
#page-customers .zc-admin-users-cust-wrap > table tbody td {
  padding-left: 6px;
  padding-right: 6px;
}
#page-customers .zc-admin-users-cust-wrap td.cust-status-cell .badge {
  white-space: nowrap;
  max-width: 100%;
  justify-content: center;
}

/* User Management: vertical column lines + tighter cell padding */
#page-users .zc-admin-users-cust-wrap > table {
  border-collapse: collapse;
}
#page-users .zc-admin-users-cust-wrap > table thead th:not(:first-child),
#page-users .zc-admin-users-cust-wrap > table tbody td:not(:first-child) {
  border-left: 1px solid var(--border);
}
#page-users .zc-admin-users-cust-wrap > table thead th,
#page-users .zc-admin-users-cust-wrap > table tbody td {
  padding-left: 6px;
  padding-right: 6px;
}

/* User Management column targets (9 cols, no action column — row opens edit) */
#page-users .zc-admin-users-cust-wrap > table thead th:nth-child(1),
#page-users .zc-admin-users-cust-wrap > table tbody td:nth-child(1) { width: 12%; }
#page-users .zc-admin-users-cust-wrap > table thead th:nth-child(2),
#page-users .zc-admin-users-cust-wrap > table tbody td:nth-child(2) { width: 20%; }
#page-users .zc-admin-users-cust-wrap > table thead th:nth-child(3),
#page-users .zc-admin-users-cust-wrap > table tbody td:nth-child(3) { width: 8%; }
#page-users .zc-admin-users-cust-wrap > table thead th:nth-child(4),
#page-users .zc-admin-users-cust-wrap > table tbody td:nth-child(4) { width: 17%; }
#page-users .zc-admin-users-cust-wrap > table thead th:nth-child(5),
#page-users .zc-admin-users-cust-wrap > table tbody td:nth-child(5) { width: 6%; }
#page-users .zc-admin-users-cust-wrap > table thead th:nth-child(6),
#page-users .zc-admin-users-cust-wrap > table tbody td:nth-child(6) { width: 5%; }
#page-users .zc-admin-users-cust-wrap > table thead th:nth-child(7),
#page-users .zc-admin-users-cust-wrap > table tbody td:nth-child(7) { width: 8%; }
#page-users .zc-admin-users-cust-wrap > table thead th:nth-child(8),
#page-users .zc-admin-users-cust-wrap > table tbody td:nth-child(8) { width: 10%; }
#page-users .zc-admin-users-cust-wrap > table thead th:nth-child(9),
#page-users .zc-admin-users-cust-wrap > table tbody td:nth-child(9) { width: 14%; }
#page-users .zc-admin-users-cust-wrap td.users-cust-cell {
  max-width: none;
  max-height: none;
  vertical-align: middle;
}
#page-users .zc-admin-users-cust-wrap td.users-role-cell .badge,
#page-users .zc-admin-users-cust-wrap td.users-unit-cell .badge,
#page-users .zc-admin-users-cust-wrap td.users-status-cell .badge {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  justify-content: center;
}
/* Customer Directory: explicit column widths (table-layout fixed — keeps header/body in sync) */
#page-customers .zc-admin-users-cust-wrap > table thead th:nth-child(1),
#page-customers .zc-admin-users-cust-wrap > table tbody td:nth-child(1) { width: 21%; }
#page-customers .zc-admin-users-cust-wrap > table thead th:nth-child(2),
#page-customers .zc-admin-users-cust-wrap > table tbody td:nth-child(2) { width: 18%; }
#page-customers .zc-admin-users-cust-wrap > table thead th:nth-child(3),
#page-customers .zc-admin-users-cust-wrap > table tbody td:nth-child(3) { width: 11%; }
#page-customers .zc-admin-users-cust-wrap > table thead th:nth-child(4),
#page-customers .zc-admin-users-cust-wrap > table tbody td:nth-child(4) { width: 11%; }
#page-customers .zc-admin-users-cust-wrap > table thead th:nth-child(5),
#page-customers .zc-admin-users-cust-wrap > table tbody td:nth-child(5) { width: 16%; }
#page-customers .zc-admin-users-cust-wrap > table thead th:nth-child(6),
#page-customers .zc-admin-users-cust-wrap > table tbody td:nth-child(6) { width: 6%; text-align: center; }
#page-customers .zc-admin-users-cust-wrap > table thead th:nth-child(7),
#page-customers .zc-admin-users-cust-wrap > table tbody td:nth-child(7) { width: 10%; }
#page-customers .zc-admin-users-cust-wrap > table thead th:nth-child(8),
#page-customers .zc-admin-users-cust-wrap > table tbody td:nth-child(8) { width: 7%; }

/* Ready to Invoice, Invoices, All Invoices: column lines + auto width + scroll */
#page-delivered_orders .zc-admin-col-lines,
#page-invoices_admin .zc-admin-col-lines,
#page-invoices_dashboard .zc-admin-col-lines {
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
}
#page-delivered_orders .zc-admin-col-lines > table,
#page-invoices_admin .zc-admin-col-lines > table,
#page-invoices_dashboard .zc-admin-col-lines > table {
  width: 100%;
  min-width: 920px;
  table-layout: auto;
  border-collapse: collapse;
}
#page-delivered_orders .zc-admin-col-lines > table thead th:not(:first-child),
#page-delivered_orders .zc-admin-col-lines > table tbody td:not(:first-child),
#page-invoices_admin .zc-admin-col-lines > table thead th:not(:first-child),
#page-invoices_admin .zc-admin-col-lines > table tbody td:not(:first-child),
#page-invoices_dashboard .zc-admin-col-lines > table thead th:not(:first-child),
#page-invoices_dashboard .zc-admin-col-lines > table tbody td:not(:first-child) {
  border-left: 1px solid var(--border);
}
#page-delivered_orders .zc-admin-col-lines > table thead th,
#page-delivered_orders .zc-admin-col-lines > table tbody td,
#page-invoices_admin .zc-admin-col-lines > table thead th,
#page-invoices_admin .zc-admin-col-lines > table tbody td,
#page-invoices_dashboard .zc-admin-col-lines > table thead th,
#page-invoices_dashboard .zc-admin-col-lines > table tbody td {
  padding-left: 6px;
  padding-right: 6px;
}
#page-delivered_orders .zc-admin-col-lines > table thead th,
#page-invoices_admin .zc-admin-col-lines > table thead th,
#page-invoices_dashboard .zc-admin-col-lines > table thead th {
  white-space: nowrap;
}
#page-delivered_orders .zc-admin-col-lines > table tbody td,
#page-invoices_admin .zc-admin-col-lines > table tbody td,
#page-invoices_dashboard .zc-admin-col-lines > table tbody td {
  white-space: nowrap;
  vertical-align: middle;
}
#page-delivered_orders .zc-admin-col-lines > table tbody td.inv-row-actions,
#page-invoices_admin .zc-admin-col-lines > table tbody td.inv-row-actions,
#page-invoices_dashboard .zc-admin-col-lines > table tbody td.inv-row-actions {
  white-space: normal;
  min-width: 11rem;
}

/* Driver Management: single scrollable table so thead columns align with tbody */
#page-drivers_admin .tbl-wrap.zc-list-table-flex > .zc-admin-drivers-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--border);
}
#page-drivers_admin .tbl-wrap.zc-list-table-flex > .zc-admin-drivers-table-scroll > .zc-admin-drivers-directory-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
#page-drivers_admin .zc-admin-drivers-directory-table thead th:not(:first-child),
#page-drivers_admin .zc-admin-drivers-directory-table tbody td:not(:first-child) {
  border-left: 1px solid var(--border);
}
#page-drivers_admin .zc-admin-drivers-directory-table thead th,
#page-drivers_admin .zc-admin-drivers-directory-table tbody td {
  padding: 8px 10px;
  vertical-align: middle;
  text-align: left;
}
#page-drivers_admin .zc-admin-drivers-directory-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface2);
  box-shadow: 0 1px 0 var(--border);
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0.04em;
}
#page-drivers_admin .zc-admin-drivers-directory-table tbody td {
  white-space: nowrap;
}
#page-drivers_admin .zc-admin-drivers-directory-table tbody td:first-child {
  white-space: normal;
  min-width: 12rem;
  max-width: min(22rem, 40vw);
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 3px;
}
/* List tables: status / role badges read more clearly at a glance */
.tbl-wrap tbody td .badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  line-height: 1.25;
}
.b-admin     { background: rgba(36,160,237,.14); color: var(--btn-red); border: 1px solid rgba(36,160,237,.28); }
.b-dispatcher{ background: rgba(37,99,235,.15);  color: #7ba8f5;       border: 1px solid rgba(37,99,235,.25); }
.b-order_taker{background: rgba(13,179,136,.15); color: var(--teal);   border: 1px solid rgba(13,179,136,.25);}
.b-driver    { background: rgba(217,119,6,.15);  color: #f59e0b;       border: 1px solid rgba(217,119,6,.25); }
.b-customer  { background: rgba(100,116,139,.1); color: #aeb8ca;       border: 1px solid rgba(100,116,139,.18);}
.b-active    { background: rgba(22,163,74,.12);  color: #4ade80;       border: 1px solid rgba(22,163,74,.2);  }
.b-inactive  { background: rgba(220,53,69,.12);  color: #f87171;       border: 1px solid rgba(220,53,69,.2);  }
.b-paid      { background: rgba(22,163,74,.12);  color: #4ade80;       border: 1px solid rgba(22,163,74,.2);  }
.b-overdue   { background: rgba(220,53,69,.15);  color: var(--red);    border: 1px solid rgba(220,53,69,.3);  }
.b-sent      { background: rgba(37,99,235,.12);  color: #7ba8f5;       border: 1px solid rgba(37,99,235,.2);  }
.b-draft     { background: rgba(100,116,139,.08);color: #aeb8ca;       border: 1px solid rgba(100,116,139,.14);}
.b-partial   { background: rgba(217,119,6,.12);  color: #f59e0b;       border: 1px solid rgba(217,119,6,.2);  }
.b-pending   { background: rgba(100,116,139,.08);color: #aeb8ca;       border: 1px solid rgba(100,116,139,.14);}
.b-delivered { background: rgba(22,163,74,.12);  color: #4ade80;       border: 1px solid rgba(22,163,74,.2);  }
.b-cancelled { background: rgba(100,116,139,.07); color: #8b96a8;       border: 1px solid rgba(100,116,139,.12);}
.b-km { background: rgba(13,179,136,.12); color: var(--teal); border: 1px solid rgba(13,179,136,.2); }
.b-mi { background: rgba(36,160,237,.1); color: var(--btn-red); border: 1px solid rgba(36,160,237,.22); }

/* ── Modal ── */
.overlay {
  position: fixed; inset: 0; background: rgba(165, 168, 180, 0.78);
  display: flex; align-items: center; justify-content: center;
  /* Above assistant FAB/panel (~200020) and page Report FAB (~210050) */
  z-index: 220000;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--modal-elevated); border: 1px solid var(--border2); border-radius: var(--radius-lg);
  padding: 26px; width: 580px; max-width: 95vw; max-height: 90vh; overflow-y: auto;
  transform: translateY(16px); transition: transform .18s;
}
.overlay.open .modal { transform: none; }
.modal.modal-pricing-rule {
  width: 500px;
  max-width: 96vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 20px 14px;
}
.modal-pricing-rule .modal-hd {
  margin-bottom: 12px;
}
.modal-pricing-rule .modal-pricing-rule-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(72vh, calc(90vh - 120px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -2px;
  padding: 0 2px 4px;
}
.modal-pricing-rule .fg-pricing-edit {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 10px;
}
.modal-pricing-rule .fg-pricing-edit .fg-sep {
  padding-top: 6px;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #1a1a1a;
  font-weight: 700;
  border-top-color: var(--border);
}
.modal-pricing-rule .fg-pricing-edit .fg-sep-note {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text3);
  font-size: 10px;
  margin-left: 6px;
}
.modal-pricing-rule .fg-pricing-edit .fld {
  gap: 2px;
}
.modal-pricing-rule .fg-pricing-edit .fld label,
.modal-pricing-rule .fld-pr-active-lbl {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #111;
}
.modal-pricing-rule .fg-pricing-edit .fld input {
  font-size: 13px;
  padding: 4px 8px;
  min-height: 30px;
}
.modal-pricing-rule .fg-pricing-edit .fld-pr-skid-tl {
  grid-column: 1 / -1;
  max-width: 50%;
}
.modal-pricing-rule .pr-addon-strip {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 5px 0 2px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.modal-pricing-rule .pr-addon-strip-title {
  flex: 0 0 auto;
  min-width: 5.5rem;
  font-size: 11px;
  font-weight: 700;
  color: #111;
  letter-spacing: 0;
}
.modal-pricing-rule .pr-addon-opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #111;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}
.modal-pricing-rule .pr-addon-opt input {
  margin: 0;
  accent-color: var(--btn-red);
}
.modal-pricing-rule .pr-addon-strip-input {
  flex: 1 1 72px;
  min-width: 64px;
  max-width: 110px;
  font-size: 13px;
  padding: 4px 8px;
  min-height: 30px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--input-text);
}
.modal-pricing-rule .pr-addon-strip-input:focus {
  border-color: var(--btn-red);
  outline: none;
  box-shadow: 0 0 0 2px rgba(36, 160, 237, 0.22);
}
.modal-pricing-rule .pr-addon-opt-chk {
  margin-left: auto;
}
.modal-pricing-rule .fld-pr-active {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.modal-pricing-rule .fld-pr-active .toggle {
  margin: 0;
}
.modal-pricing-rule .modal-ft {
  flex-shrink: 0;
  margin-top: 10px;
  padding-top: 12px;
}
@media (max-width: 480px) {
  .modal-pricing-rule .fg-pricing-edit {
    grid-template-columns: 1fr 1fr;
  }
  .modal-pricing-rule .pr-addon-opt-chk {
    margin-left: 0;
  }
}
.modal-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-family: var(--font-serif); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.modal-title em { color: var(--btn-red); font-style: italic; }
.modal-x {
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text3);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.modal-x:hover { color: var(--btn-red); border-color: rgba(36, 160, 237, 0.5); }
/* Edit User modal: list-only actions moved from grid (Permissions, reset pwd, enable/disable) */
.mu-modal-actions {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.modal-user-compact .mu-modal-hd {
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 14px;
}
.modal-user-compact .mu-modal-hd .modal-title { flex: 0 0 auto; margin: 0; }
.modal-user-compact .mu-hd-actions {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.modal-user-compact .mu-user-fg { gap: 10px; }
.modal-user-compact .mu-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  padding: 4px 0;
}
.modal-user-compact .mu-toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-user-compact .mu-toggle-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
}
.modal-user-compact .mu-modal-hd {
  flex-wrap: nowrap;
  gap: 6px 10px;
}
.modal-user-compact .mu-modal-hd .modal-title {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-user-compact .mu-hd-active {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.modal-user-compact .mu-hd-active .toggle-lbl { font-size: 11px; min-width: 2.2em; }
.modal-user-compact .mu-hd-actions .btn { padding: 6px 10px; font-size: 12px; }
.modal-user-compact .mu-user-fg {
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 0.95fr);
}
.modal-user-compact .mu-user-fg > .fld-full,
.modal-user-compact .mu-user-fg > .full,
.modal-user-compact .mu-user-fg > .mu-toggle-row-inline {
  grid-column: 1 / -1;
}
.modal-user-compact .mu-row-name-phone { min-width: 0; }
.modal-user-compact .mu-row-name-phone:nth-child(1) { grid-column: 1; }
.modal-user-compact .mu-row-name-phone:nth-child(2) { grid-column: 2; }
.modal-user-compact .zc-ph-wrap > input {
  padding-right: 32px;
}
.modal-user-compact .zc-ph-status {
  max-width: 36%;
  font-size: 9px;
  right: 5px;
}
.modal-user-compact #mu_changePwdSection,
.modal-user-compact #mu_pwdField {
  grid-column: 1;
  min-width: 0;
}
.modal-user-compact .fld.mu-row-pwd-tz:not(#mu_changePwdSection):not(#mu_pwdField) {
  grid-column: 2;
  min-width: 0;
}
.modal-user-compact .mu-toggle-row-inline {
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
}
.modal-user-compact .mu-unit-item { margin-left: auto; }
.mu-unit-switch {
  display: inline-flex;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.mu-unit-opt {
  padding: 3px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--input-bg);
  border: none;
  cursor: pointer;
  color: var(--text3);
  line-height: 1.35;
}
.mu-unit-opt.on {
  background: var(--teal);
  color: #0a1628;
}
.mu-unit-opt:hover:not(.on) { background: var(--surface2); }
.modal-driver-compact {
  max-width: 640px;
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
}
.modal-driver-compact .md-driver-fg {
  gap: 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 4px;
}
.modal-driver-compact .fg-sep {
  padding-top: 6px;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 1.5px;
}
.modal-driver-compact .fld label { font-size: 9px; letter-spacing: 1px; }
.modal-driver-compact .fld input,
.modal-driver-compact .fld select,
.modal-driver-compact .fld textarea {
  font-size: 13px;
  padding: 4px 8px;
}
.modal-driver-compact .md-modal-hd {
  flex-wrap: nowrap;
  gap: 6px 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.modal-driver-compact .md-modal-hd .modal-title {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.modal-driver-compact .md-hd-sms {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.modal-driver-compact .md-hd-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.modal-driver-compact .md-hd-actions .btn { padding: 6px 10px; font-size: 12px; }
.modal-driver-compact .md-driver-fg {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.modal-driver-compact .md-driver-fg > .fld-full,
.modal-driver-compact .md-driver-fg > .fg-sep,
.modal-driver-compact .md-vehicle-grid,
.modal-driver-compact .md-trip-pay-grid,
.modal-driver-compact .md-payout-type-row {
  grid-column: 1 / -1;
}
.modal-driver-compact .md-vehicle-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px 10px;
}
.modal-driver-compact .md-veh-make { grid-column: 1; grid-row: 1; }
.modal-driver-compact .md-veh-model { grid-column: 2; grid-row: 1; }
.modal-driver-compact .md-veh-year { grid-column: 3; grid-row: 1; }
.modal-driver-compact .md-veh-plate { grid-column: 1; grid-row: 2; }
.modal-driver-compact .md-veh-max { grid-column: 2 / 4; grid-row: 2; }
.modal-driver-compact .md-trip-pay-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 8px;
}
.modal-driver-compact .md-trip-pay-grid .fld { min-width: 0; }
.modal-driver-compact .md-trip-pay-grid label {
  font-size: 8px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-driver-compact input.md-num-plain[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.modal-driver-compact input.md-num-plain[type="number"]::-webkit-outer-spin-button,
.modal-driver-compact input.md-num-plain[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.modal-ft { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-ft .btn.btn-ghost {
  min-height: 42px;
  padding: 10px 18px;
  font-weight: 700;
  border-radius: var(--radius);
}

/* ── Form grid ── */
.fg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fg.c1 { grid-template-columns: 1fr; }
.fg.c3 { grid-template-columns: 1fr 1fr 1fr; }
.fg-sep { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border); }
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); }
.fld input, .fld select, .fld textarea {
  background: var(--input-bg); border: 1px solid var(--border2); color: var(--input-text);
  font-family: var(--font-sans); font-size: 14px; padding: 5px 10px; line-height: 1.35; border-radius: var(--radius);
  outline: none; transition: border-color .15s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--btn-red); box-shadow: 0 0 0 2px rgba(36, 160, 237, 0.22); }
.fld textarea { resize: vertical; min-height: 56px; }
.fld .hint { font-size: 11px; color: var(--text3); }
.fld-full { grid-column: 1 / -1; }

/* Vehicle rates — equal-height panels below matrix */
.pricing-setup-grid {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  align-items: stretch;
}
.pricing-setup-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pricing-setup-grid--three {
  /* Add-ons | Packages (wider) | Tax (narrower) */
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr) minmax(0, 0.82fr);
}
.pricing-setup-panel {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 14px 16px;
}
.pricing-setup-panel .scard-title {
  margin-bottom: 4px;
}
.pricing-setup-panel__hint {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
  margin: 0 0 10px;
}
.pricing-setup-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.pricing-setup-panel__ft {
  flex-shrink: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
#page-pricing .pricing-setup-panel .addon-prices-form,
#page-pricing .pricing-setup-panel .hybrid-pricing-compact {
  max-width: none;
  width: 100%;
}
#page-pricing .pricing-setup-panel .addon-packages-table,
#page-pricing .pricing-setup-panel .pricing-service-table,
#page-pricing .pricing-setup-panel .pricing-tax-table {
  max-width: none;
  max-height: none;
  margin-bottom: 0;
}
.pricing-service-table table,
.pricing-tax-table table {
  font-size: 12px;
}
.pricing-service-table th,
.pricing-service-table td,
.pricing-tax-table th,
.pricing-tax-table td {
  padding: 5px 8px;
}
.pricing-quote-layers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-model-runtime--compact {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
  margin-bottom: 0;
}
.pricing-model-runtime--compact .pricing-model-runtime__hint {
  flex: none;
  font-size: 10px;
  line-height: 1.35;
}
.pricing-page-section__desc {
  font-size: 13px;
  color: var(--text2);
  margin: 0 0 12px;
  line-height: 1.45;
}
@media (max-width: 1100px) {
  .pricing-setup-grid--three {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .pricing-setup-grid--two {
    grid-template-columns: 1fr;
  }
  .pricing-setup-panel {
    min-height: 0;
  }
}

#page-hybrid_pricing .page-body.hybrid-pricing-page-body {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 24px 28px;
}
#page-hybrid_pricing .pricing-model-runtime {
  margin-bottom: 10px;
}
.addon-packages-table {
  max-width: 520px;
  margin-bottom: 12px;
  max-height: min(240px, 38vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.addon-packages-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}
.addon-packages-table table {
  font-size: 13px;
}
.addon-packages-table th,
.addon-packages-table td {
  padding: 6px 10px;
}
.addon-prices-notice {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 8px;
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.addon-prices-form,
.hybrid-pricing-compact {
  max-width: 520px;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: 2px 8px;
  align-items: end;
}
.addon-prices-form .fld,
.hybrid-pricing-compact .fld {
  gap: 2px;
}
.addon-prices-form .fld label,
.hybrid-pricing-compact .fld label {
  font-size: 9px;
  letter-spacing: 1px;
  line-height: 1.2;
}
.addon-prices-form .fld input[type="number"],
.hybrid-pricing-compact .fld input[type="number"] {
  max-width: 5.25rem;
  width: 100%;
  padding: 3px 6px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  border: 2px solid #555;
  color: #000;
}
.addon-prices-form .fld label,
.addon-prices-form .fg-sep,
.addon-prices-form .hy-addon-radio,
.addon-prices-form .hy-addon-chk,
.hybrid-pricing-compact .fld label,
.hybrid-pricing-compact .fg-sep,
.hybrid-pricing-compact .hy-addon-radio,
.hybrid-pricing-compact .hy-addon-chk {
  color: #000;
}
.addon-prices-form .fg-sep,
.hybrid-pricing-compact .fg-sep {
  padding-top: 6px;
  margin-top: 2px;
  margin-bottom: 0;
}
.addon-prices-form .hy-addon-inline,
.hybrid-pricing-compact .hy-addon-inline {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 10px;
  margin-bottom: 2px;
}
.addon-prices-form .hy-addon-inline .fld,
.hybrid-pricing-compact .hy-addon-inline .fld {
  margin: 0;
}
.addon-prices-form .hy-addon-radio,
.addon-prices-form .hy-addon-chk,
.hybrid-pricing-compact .hy-addon-radio,
.hybrid-pricing-compact .hy-addon-chk {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-sans);
  color: var(--text);
}
.addon-prices-form .hy-addon-val input,
.hybrid-pricing-compact .hy-addon-val input {
  max-width: 4.5rem;
}
#modalCustomerPricing .addon-prices-form {
  max-width: 100%;
}
@media (max-width: 720px) {
  .addon-prices-form,
  .hybrid-pricing-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Compulsory validated fields: same blue tint as APP / dispatcher modals (not red/pink) */
.overlay .modal .fld.zc-field-required input:not(:disabled),
.overlay .modal .fld.zc-field-required textarea:not(:disabled),
.modal .fld.zc-field-required input:not(:disabled),
.modal .fld.zc-field-required textarea:not(:disabled) {
  background: var(--zc-orders-active-fill) !important;
  border: 1px solid var(--zc-orders-active-border) !important;
}
.overlay .modal .fld.zc-field-required input:focus:not(:disabled),
.overlay .modal .fld.zc-field-required textarea:focus:not(:disabled),
.modal .fld.zc-field-required input:focus:not(:disabled),
.modal .fld.zc-field-required textarea:focus:not(:disabled) {
  background: var(--zc-orders-active-fill-focus) !important;
  border-color: var(--app-primary) !important;
  box-shadow: 0 0 0 2px rgba(36, 160, 237, 0.22) !important;
}
.overlay .modal .fld.zc-field-required input:disabled,
.overlay .modal .fld.zc-field-required textarea:disabled,
.modal .fld.zc-field-required input:disabled,
.modal .fld.zc-field-required textarea:disabled {
  background: #f5f5f5 !important;
  opacity: 0.88;
}
.overlay .modal .fld.zc-field-required input:-webkit-autofill,
.overlay .modal .fld.zc-field-required input:-webkit-autofill:hover,
.overlay .modal .fld.zc-field-required input:-webkit-autofill:focus,
.modal .fld.zc-field-required input:-webkit-autofill,
.modal .fld.zc-field-required input:-webkit-autofill:hover,
.modal .fld.zc-field-required input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--input-text) !important;
  caret-color: var(--input-text);
  box-shadow: 0 0 0 1000px var(--zc-orders-active-fill) inset !important;
  border: 1px solid var(--zc-orders-active-border) !important;
}
.overlay .modal .fld.zc-field-required input:-webkit-autofill:focus,
.modal .fld.zc-field-required input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px var(--zc-orders-active-fill-focus) inset, 0 0 0 2px rgba(36, 160, 237, 0.22) !important;
  border-color: var(--app-primary) !important;
}

/* ── Audit log entry ── */
.audit-entry {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.audit-entry:last-child { border-bottom: none; }
.audit-action {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 6px; border-radius: 3px; flex-shrink: 0; align-self: flex-start; margin-top: 1px;
}
.aa-INSERT { background: rgba(22,163,74,.15);  color: #4ade80; }
.aa-UPDATE { background: rgba(36,160,237,.14); color: var(--btn-red); }
.aa-DELETE { background: rgba(220,53,69,.15);  color: var(--red); }
.audit-meta { color: var(--text3); font-family: var(--font-mono); font-size: 11px; margin-top: 2px; }

/* ── Pricing rule card ── */
.rule-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; margin-bottom: 10px;
}
.rule-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rule-name { font-family: var(--font-serif); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.rule-field { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; }
.rule-field-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text3); margin-bottom: 3px; }
.rule-field-val { font-family: var(--font-mono); font-size: 16px; color: var(--text); }

/* ── Setting row ── */
.setting-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-info { flex: 1; }
.setting-key { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.setting-desc { font-size: 12px; color: var(--text3); margin-top: 2px; }
.setting-val { display: flex; align-items: center; gap: 8px; }
.setting-val input, .setting-val select {
  background: var(--input-bg); border: 1px solid var(--border2); color: var(--input-text);
  font-family: var(--font-mono); font-size: 13px; padding: 3px 9px; line-height: 1.35;
  border-radius: var(--radius); outline: none; min-width: 140px;
}
.setting-val input:focus, .setting-val select:focus { border-color: var(--btn-red); box-shadow: 0 0 0 2px rgba(36, 160, 237, 0.22); }

/* ── Toast (legacy corner host unused; saves use center banner) ── */
#toasts { display: none; }
#center-toast-host {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.center-toast-backdrop {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.35); pointer-events: auto;
}
.center-toast {
  position: relative; z-index: 1; pointer-events: auto;
  background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius-lg);
  padding: 18px 28px; font-size: 15px; font-family: var(--font-mono); line-height: 1.45;
  min-width: min(320px, calc(100vw - 40px)); max-width: min(520px, calc(100vw - 40px));
  text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  animation: centerToastIn 0.22s ease;
}
.center-toast--ok { border-left: 4px solid var(--teal); color: var(--teal); }
.center-toast--info { border-left: 4px solid var(--blue); color: #1d4ed8; }
.center-toast--success { border-left: 4px solid var(--teal); color: var(--teal); }
@keyframes centerToastIn { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Sidebar departments (collapsed until opened) ── */
.nav-dept { margin-bottom: 2px; }
.nav-dept-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin: 0; padding: 10px 14px 6px;
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text3); text-align: left;
}
.nav-dept-toggle:hover { color: var(--text2); }
.nav-dept-toggle::after {
  content: '+'; font-size: 14px; line-height: 1; color: var(--text3); font-weight: 400;
}
.nav-dept--open > .nav-dept-toggle::after { content: '−'; }
.nav-dept-items { display: none; padding-bottom: 4px; }
.nav-dept--open > .nav-dept-items { display: block; }

/* ── Centered error alert (dismiss with ×) ── */
#error-alert-host { position: fixed; inset: 0; z-index: 230000; pointer-events: none; }
.error-alert-backdrop {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); pointer-events: auto;
}
.error-alert-box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  pointer-events: auto; background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--radius-lg); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  min-width: min(420px, calc(100vw - 32px)); max-width: min(520px, calc(100vw - 32px));
  padding: 20px 44px 20px 20px;
}
.error-alert-title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--red); margin-bottom: 10px;
}
.error-alert-body { font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-wrap; }
.error-alert-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border: none;
  background: transparent; color: var(--text3); font-size: 22px; line-height: 1; cursor: pointer;
  border-radius: var(--radius);
}
.error-alert-close:hover { background: var(--bg2); color: var(--text); }

.modal-save-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(231, 76, 60, 0.14);
  border: 1px solid rgba(231, 76, 60, 0.45);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

/* ── Toggle switch ── */
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.toggle-track { width: 36px; height: 20px; background: var(--border2); border-radius: 10px; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle-track.on { background: var(--teal); }
.toggle-thumb { width: 14px; height: 14px; background: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: left .2s; }
.toggle-track.on .toggle-thumb { left: 19px; }
.toggle-lbl { font-size: 13px; color: var(--text2); }

/* ── Section card ── */
.scard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px; }
.scard-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); margin-bottom: 14px; }

/* ── Progress bar ── */
.pbar-wrap { background: var(--bg2); border-radius: 3px; height: 4px; overflow: hidden; }
.pbar { height: 100%; background: var(--btn-red); border-radius: 3px; transition: width .4s; }
.pbar.teal { background: var(--teal); }
.pbar.red { background: var(--red); }

/* Desktop-only floating Report button */
.desktop-page-report-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--btn-red);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.45);
  border: 1px solid #1a8fd0;
}
.desktop-page-report-fab:hover {
  background: var(--btn-red-hover);
  color: #fff;
}
@media (min-width: 1024px) {
  .desktop-page-report-fab { display: block; }
}

/* ── Assistant mascot FAB (clears footer strip + sits beside Report on desktop) ── */
body.zc-wl-replace-root .zc-assist-fab.zc-assist-fab--float {
  bottom: 48px;
  z-index: 210055 !important;
}
@media (min-width: 1024px) {
  body.zc-wl-replace-root .zc-assist-fab.zc-assist-fab--float {
    bottom: 56px;
    right: 200px;
  }
  body.zc-wl-replace-root .desktop-page-report-fab {
    bottom: 56px;
    right: 24px;
    z-index: 210050 !important;
  }
}
@media (max-width: 1023px) {
  body.zc-wl-replace-root .zc-assist-fab.zc-assist-fab--float {
    bottom: 48px;
    right: max(16px, env(safe-area-inset-right, 0px));
  }
}

/* ── Mobile / narrow screens ── */
.nav-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  flex-shrink: 0;
  background: #b91c1c;
  border: 1px solid #991b1b;
  border-radius: var(--radius);
  color: #fff;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.nav-menu-btn:hover { background: #991b1b; border-color: #7f1d1d; color: #fff; }
.nav-menu-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* Mobile drawer backdrop: hidden from layout + hits when menu open only */
.sidebar-backdrop {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: var(--top-h);
  bottom: 0;
  background: rgba(165, 168, 180, 0.5);
  z-index: 150;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
  touch-action: manipulation;
}

@media (max-width: 900px) {
  html {
    height: auto;
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu-btn { display: flex; }

  /* Flex column avoids grid 1fr collapse on auto-height containers (was blocking layout + touches). */
  .shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    height: auto;
  }

  .topbar {
    flex: 0 0 auto;
    width: 100%;
    position: relative;
    z-index: 200;
    grid-column: unset;
    padding:
      max(0px, env(safe-area-inset-top, 0px))
      max(20px, env(safe-area-inset-right, 0px))
      0
      max(20px, env(safe-area-inset-left, 0px));
  }

  .topbar-brand {
    width: auto;
    min-width: 0;
    flex: 1;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    box-shadow: none;
  }

  .topbar-middle {
    display: none;
  }

  .topbar-right {
    flex-shrink: 0;
    gap: 6px;
  }

  .topbar-user .user-name,
  .topbar-user .user-role {
    display: none;
  }

  .topbar-btn {
    padding: 8px 10px;
    font-size: 12px;
    touch-action: manipulation;
    min-height: 40px;
  }

  /* Drawer: no pointer capture when off-screen (fixes dead clicks on main). */
  .sidebar {
    position: fixed;
    top: var(--top-h);
    left: 0;
    bottom: 0;
    width: min(300px, 90vw);
    max-height: calc(100vh - var(--top-h));
    max-height: calc(100dvh - var(--top-h));
    z-index: 160;
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.2s ease;
    box-shadow: none;
    border-right: 1px solid var(--border);
    pointer-events: none;
    -webkit-overflow-scrolling: touch;
  }

  body.admin-nav-open .sidebar {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.4);
  }

  body.admin-nav-open .sidebar-backdrop {
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    flex: 1 1 auto;
    width: 100%;
    min-height: 50vh;
    overflow: visible;
    position: relative;
    z-index: 1;
    isolation: isolate;
    grid-column: unset;
    grid-row: unset;
  }

  .page {
    min-height: 0;
    flex: 1 1 auto;
    display: none;
    flex-direction: column;
    overflow: visible;
    height: auto;
  }

  .page.active {
    display: flex;
  }

  .page-body {
    flex: 1 1 auto;
    overflow: visible;
    padding: 12px 14px 28px;
    -webkit-overflow-scrolling: touch;
  }

  .page-top {
    padding: 14px 14px 0;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
  }

  .page-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .page-title {
    font-size: 20px;
  }

  .nav-item {
    min-height: 40px;
    align-items: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(232, 160, 32, 0.15);
  }

  .tabs {
    padding: 0 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .tab {
    flex-shrink: 0;
    touch-action: manipulation;
  }

  .tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 520px;
  }

  .fg,
  .fg.c3 {
    grid-template-columns: 1fr;
  }

  .kpi-row {
    grid-template-columns: 1fr 1fr;
  }

  .modal {
    width: 100%;
    margin: 10px;
    max-height: calc(100dvh - 20px);
  }

  #toasts {
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 10050;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }

  .btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Phone autocomplete (Admin Users / Customers modals) */
.zc-ph-wrap {
  position: relative;
  width: 100%;
}
.zc-ph-wrap > input {
  width: 100%;
  padding-right: 72px;
}
.zc-ph-status {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text3);
  pointer-events: none;
  max-width: 68%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zc-ph-drop {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.zc-ph-row {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.zc-ph-row:last-child {
  border-bottom: none;
}
.zc-ph-row:hover,
.zc-ph-row.zc-ph-row-active {
  background: var(--surface3);
  box-shadow: inset 0 0 0 1px var(--btn-red);
}
.zc-ph-meta {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
  line-height: 1.35;
}

/* Concentric rings modal — compact, no scroll for typical tier count */
#modalAdvConc .modal.modal-adv-conc {
  width: min(680px, 96vw);
  max-height: none;
  overflow: visible;
  padding: 14px 16px 12px;
}
#modalAdvConc .modal-hd {
  margin-bottom: 8px;
}
#modalAdvConc .modal-title {
  font-size: 17px;
}
#modalAdvConc .fg-adv-conc {
  display: block;
  gap: 0;
}
#modalAdvConc .adv-conc-hint {
  font-size: 10px;
  line-height: 1.35;
  color: var(--text3);
  margin: 0 0 8px;
}
#modalAdvConc .adv-conc-hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 8px;
  margin-bottom: 8px;
}
#modalAdvConc .adv-conc-hub-grid .fld label {
  font-size: 9px;
  letter-spacing: 1px;
  margin-bottom: 0;
}
#modalAdvConc .adv-conc-hub-grid .fld input {
  font-size: 12px;
  padding: 4px 6px;
}
#modalAdvConc .adv-conc-tiers-sep {
  padding-top: 6px;
  margin-top: 2px;
  margin-bottom: 6px;
}
#modalAdvConc .adv-conc-tier-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
#modalAdvConc .adv-conc-tier-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
#modalAdvConc .adv-conc-tier-table th {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  text-align: left;
  padding: 5px 6px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
#modalAdvConc .adv-conc-tier-table th:nth-child(1) { width: 12%; }
#modalAdvConc .adv-conc-tier-table th:nth-child(2) { width: 18%; }
#modalAdvConc .adv-conc-tier-table th:nth-child(3) { width: 22%; }
#modalAdvConc .adv-conc-tier-table th:nth-child(4),
#modalAdvConc .adv-conc-tier-table th:nth-child(5) { width: 24%; }
#modalAdvConc .adv-conc-tier-table td {
  padding: 3px 4px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
#modalAdvConc .adv-conc-tier-table tr:last-child td {
  border-bottom: none;
}
#modalAdvConc .adv-conc-tier-table input {
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
  padding: 3px 5px;
  font-family: var(--font-mono);
}
#modalAdvConc .adv-conc-add-tier {
  margin-top: 6px;
}
#modalAdvConc .modal-ft {
  margin-top: 10px;
  padding-top: 10px;
}

/* Zone pricing page + company regions block */
/* Do not set display here — .page / .page.active control visibility. */
.co-regions-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.co-regions-block__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.co-regions-block__sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text3);
  line-height: 1.45;
}
#coRegionsIdentity {
  padding: 0 0 10px;
}
#coRegionsIdentity .regions-identity-banner {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
#coRegionsIdentity .regions-region-card__head {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
#coRegionsIdentity .regions-region-card__bbox {
  border-bottom: none;
}
.co-regions-setup.page-top {
  padding: 0;
  margin: 0 0 8px;
}
#page-zone_pricing.active {
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#page-zone_pricing .regions-identity-header {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 24px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
#page-zone_pricing .regions-identity-banner {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
#page-zone_pricing .regions-identity-banner .regions-region-card__head {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
#page-zone_pricing .regions-identity-banner .regions-region-card__bbox {
  border-bottom: none;
}
#page-zone_pricing .regions-page-header {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 24px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
#page-zone_pricing .regions-page-header .regions-pricing-hero {
  margin: 0;
}
#page-zone_pricing .page-top,
#page-zone_pricing #regionsSetupTop {
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  gap: 10px;
  padding-bottom: 0;
}
#page-zone_pricing .page-top .page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}
#page-zone_pricing .page-body {
  flex: 0 1 auto;
  min-height: min-content;
  overflow: visible;
  padding-top: 12px;
  padding-bottom: 32px;
}
#page-zone_pricing .regions-page-work {
  min-height: min-content;
}
#page-zone_pricing .regions-page-work .tbl-wrap {
  overflow-x: auto;
}
#page-zone_pricing .regions-pricing-hero {
  align-items: center;
}
#page-zone_pricing .regions-pricing-hero__help-col {
  flex: 1;
  min-width: 0;
}
#page-zone_pricing .regions-pricing-hero__lead {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text2);
}
#page-zone_pricing .regions-pricing-help-details {
  margin-top: 2px;
}
#page-zone_pricing .regions-pricing-help-details summary {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--btn-red);
  cursor: pointer;
  user-select: none;
  list-style: none;
}
#page-zone_pricing .regions-pricing-help-details summary::-webkit-details-marker {
  display: none;
}
#page-zone_pricing .regions-pricing-help-details summary::before {
  content: '▸ ';
}
#page-zone_pricing .regions-pricing-help-details[open] summary::before {
  content: '▾ ';
}
#page-zone_pricing .regions-pricing-help-details__scroll {
  max-height: 10rem;
  overflow-y: auto;
  margin-top: 6px;
  padding-right: 4px;
}
#page-zone_pricing .regions-pricing-hero > .regions-pricing-hero__help {
  display: none;
}
.zp-example-map-wrap {
  margin-bottom: 10px;
}
.zp-example-map__title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text2);
}
.zp-example-map__caption {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text3);
}
.zp-example-map {
  width: 100%;
  max-width: 100%;
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #e8ecf2;
}
.zp-example-map.zp-boundary-map-leaflet {
  height: 280px;
  min-height: 280px;
}
.zp-leaflet-tooltip {
  background: rgba(19, 25, 41, 0.96) !important;
  border: 1px solid var(--border) !important;
  color: #fff !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  padding: 5px 9px !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
}
.zp-leaflet-tooltip b {
  color: #fff !important;
}
.pricing-pct-adj-bar {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
}
.pricing-pct-adj-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-size: 12px;
}
.pricing-pct-adj-bar__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--text2);
}
.pricing-pct-adj-bar__radio,
.pricing-pct-adj-bar__temp,
.pricing-pct-adj-bar__pct {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pricing-pct-adj-bar__hint {
  font-size: 11px;
  color: var(--text3);
  flex: 1 1 100%;
}
.cp-cell-override {
  box-shadow: inset 0 0 0 2px rgba(36, 160, 237, 0.35);
}

/* Edit Customer — wide modal with Vehicle pricing matrix */
#modalCustomer.open {
  display: flex;
  padding: 16px;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}
.modal.modal--customer-edit {
  width: min(94vw, 1080px);
  max-width: 94vw;
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 16px 10px;
}
.modal.modal--customer-edit .mc2-modal-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  align-content: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#modalCustomer .mc2-block {
  grid-column: 1 / -1;
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0;
  box-sizing: border-box;
}
#modalCustomer .mc2-block-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 8px;
}
#modalCustomer .mc2-block-hint {
  font-size: 11px;
  color: var(--text3);
  margin: 0 0 10px;
  line-height: 1.45;
}
#modalCustomer .mc2-block-contact {
  background: #f9fafb;
  border-color: #d8dadf;
}
#modalCustomer .mc2-block-billing {
  background: #f2f3f6;
  border-color: #cdd0d7;
}
#modalCustomer .mc2-block-rates {
  background: #ebedf1;
  border-color: #c2c6ce;
}
#modalCustomer .mc2-block-notes {
  background: #f7f8fa;
  border-color: #d4d7dd;
}
#modalCustomer .mc2-block-surcharge {
  background: #eceef2;
  border-color: #babec8;
}
#modalCustomer .mc2-surcharge-line {
  display: grid;
  grid-template-columns:
    auto
    minmax(0, 0.75fr)
    minmax(0, 0.75fr)
    minmax(0, 0.65fr)
    auto
    minmax(0, 0.65fr)
    auto
    minmax(0, 0.65fr)
    auto
    auto;
  gap: 8px;
  align-items: end;
  min-width: 0;
}
#modalCustomer .mc2-surcharge-heading {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  padding-bottom: 2px;
  white-space: nowrap;
}
#modalCustomer .mc2-surcharge-line .fld {
  margin-bottom: 0;
  min-width: 0;
}
#modalCustomer .mc2-surcharge-line .fld label {
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#modalCustomer .mc2-surcharge-line .fld input {
  min-width: 0;
  width: 100%;
}
#modalCustomer .mc2-sf-chk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  padding-bottom: 5px;
  margin: 0;
}
#modalCustomer .mc2-sf-chk input {
  margin: 0;
}
#modalCustomer .mc2-block-tax-hybrid {
  background: #f5f6f8;
  border-color: #d0d3da;
}
#modalCustomer .mc2-tax-hybrid-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}
#modalCustomer .mc2-tax-hybrid-grid:has(.mc2-tax-hybrid-col-sl[hidden]) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#modalCustomer .mc2-tax-hybrid-grid:has(.mc2-tax-hybrid-col-sl[hidden]):has(.mc2-tax-hybrid-col-hybrid[style*="display: none"]),
#modalCustomer .mc2-tax-hybrid-grid:has(.mc2-tax-hybrid-col-sl[hidden]):has(.mc2-tax-hybrid-col-hybrid[style*="display:none"]) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  #modalCustomer .mc2-tax-hybrid-grid,
  #modalCustomer .mc2-tax-hybrid-grid:has(.mc2-tax-hybrid-col-sl[hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  #modalCustomer .mc2-tax-hybrid-grid {
    grid-template-columns: 1fr;
  }
}
#modalCustomer .mc2-tax-hybrid-col {
  min-width: 0;
  overflow: hidden;
}
#modalCustomer .mc2-tax-hybrid-col-taxes {
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
#modalCustomer .mc2-tax-hybrid-col-sl {
  padding: 8px 10px;
  background: #ebedf1;
  border: 1px solid #c2c6ce;
  border-radius: 8px;
  min-height: 12rem;
  display: flex;
  flex-direction: column;
}
#modalCustomer .mc2-tax-hybrid-col-sl[hidden] {
  display: none !important;
}
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-block-hint {
  margin-bottom: 6px;
}
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-wrap {
  flex: 1 1 auto;
  min-height: 8rem;
  max-height: min(42vh, 360px);
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
}
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table {
  table-layout: fixed;
  width: 100%;
  font-size: 11px;
}
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table th:nth-child(1),
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table td:nth-child(1) {
  width: 38%;
  word-break: break-word;
}
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table th:nth-child(2),
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table td:nth-child(2),
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table th:nth-child(3),
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table td:nth-child(3) {
  width: 22%;
}
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table th:nth-child(4),
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table td:nth-child(4) {
  width: 18%;
}
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table th,
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-matrix-table td {
  padding: 4px 3px;
  vertical-align: middle;
}
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-pct,
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-sl-flat {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 3px 4px;
  font-size: 11px;
  text-align: right;
}
#modalCustomer .mc2-tax-hybrid-col-sl .btn-ghost.btn-sm {
  font-size: 10px;
  padding: 2px 5px;
}
#modalCustomer .mc2-tax-hybrid-col-sl td strong {
  font-size: 11px;
  font-weight: 600;
}
#modalCustomer .mc2-tax-hybrid-col-hybrid[style*="display: none"],
#modalCustomer .mc2-tax-hybrid-col-hybrid[style*="display:none"] {
  display: none !important;
}
#modalCustomer .mc2-tax-hybrid-col-hybrid:not([style*="display: none"]):not([style*="display:none"]) {
  padding: 8px 10px;
  background: #e4e7ec;
  border: 1px solid #b0b5c0;
  border-radius: 8px;
  min-height: 12rem;
}
#modalCustomer .mc2-tax-hybrid-col-sms {
  padding: 8px 10px;
  background: #eaecef;
  border: 1px solid #c5c9d2;
  border-radius: 8px;
  min-height: 12rem;
}
#modalCustomer .mc2-sms-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#modalCustomer .mc2-sms-opt {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
  color: var(--text);
}
#modalCustomer .mc2-sms-opt input {
  margin-top: 2px;
  flex-shrink: 0;
}
#modalCustomer .mc2-sms-opt span {
  min-width: 0;
  word-break: break-word;
}
#modalCustomer .mc2-tax-list label,
#modalCustomer .mc2-tax-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  background: var(--surface2);
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 4px;
  font-size: 12px;
}
#modalCustomer .mc2-tax-hybrid-col-taxes .mc2-tax-row span {
  min-width: 0;
  word-break: break-word;
}
#modalCustomer .mc2-hybrid-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#modalCustomer .mc2-hybrid-card {
  padding: 6px 8px;
  background: var(--surface2);
  border-radius: 6px;
}
#modalCustomer .mc2-hybrid-card-title {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
#modalCustomer .mc2-hybrid-card-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
#modalCustomer .mc2-tax-hybrid-col-hybrid .mc2-block-hint {
  margin-bottom: 6px;
  font-size: 10px;
}
#modalCustomer .mc2-tax-hybrid-col-taxes .mc2-block-hint,
#modalCustomer .mc2-tax-hybrid-col-sl .mc2-block-title,
#modalCustomer .mc2-tax-hybrid-col-hybrid .mc2-block-title,
#modalCustomer .mc2-tax-hybrid-col-sms .mc2-block-title {
  margin-bottom: 4px;
}
#modalCustomer .mc2-tax-hybrid-col-taxes .mc2-block-hint {
  font-size: 10px;
  margin-bottom: 6px;
}
#modalCustomer .mc2-hybrid-mode,
#modalCustomer .mc2-hybrid-auto {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
#modalCustomer .mc2-hybrid-val {
  width: 3.25rem;
  min-width: 0;
  max-width: 100%;
  padding: 3px 4px;
  font-size: 11px;
  box-sizing: border-box;
}
#modalCustomer .mc2-hybrid-schema-warn {
  font-size: 12px;
  color: var(--text3);
  margin: 8px 0 0;
}
#modalCustomer .mc2-block-notes-input {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}
#modalCustomer .mc2-block-contact::before {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 8px;
  content: "Contact & address";
}
.mc2-profile-compact .fld {
  margin-bottom: 4px;
}
.mc2-profile-compact .fld label {
  margin-bottom: 2px;
  font-size: 11px;
}
.mc2-profile-compact .fld input,
.mc2-profile-compact .fld select,
.mc2-profile-compact .fld textarea {
  padding: 5px 8px;
  font-size: 13px;
}
.mc2-profile-compact .fg-sep,
.mc2-profile-compact .mc2-addr-sep {
  margin: 6px 0 4px;
  padding-bottom: 2px;
  font-size: 11px;
}
.mc2-modal-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mc2-modal-hd .modal-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.mc2-hd-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.mc2-top-strip,
.mc2-billing-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}
.mc2-top-line,
.mc2-billing-line {
  display: grid;
  gap: 8px;
  align-items: end;
  min-width: 0;
}
.mc2-line-primary {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1.25fr)
    auto
    minmax(0, 1.35fr);
}
.mc2-top-strip.mc2-type-business .mc2-line-primary {
  grid-template-columns:
    minmax(0, 0.95fr)
    minmax(0, 1.2fr)
    auto
    minmax(0, 1.5fr);
}
.mc2-top-strip:not(.mc2-type-business) .mc2-f-company {
  display: none !important;
}
.mc2-top-strip.mc2-type-business .mc2-f-name {
  display: none !important;
}
.mc2-line-address {
  grid-template-columns:
    minmax(0, 2.1fr)
    minmax(0, 0.85fr)
    minmax(0, 1.05fr)
    minmax(0, 0.65fr)
    minmax(0, 0.75fr)
    minmax(0, 0.7fr);
}
.mc2-billing-line {
  grid-template-columns:
    minmax(0, 1.6fr)
    minmax(0, 1fr)
    minmax(0, 0.65fr)
    minmax(0, 1.1fr);
}
.mc2-top-line .fld,
.mc2-billing-line .fld {
  margin-bottom: 0;
  min-width: 0;
}
.mc2-top-line .fld label,
.mc2-billing-line .fld label {
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc2-top-line .fld input,
.mc2-top-line .fld select,
.mc2-billing-line .fld input,
.mc2-billing-line .fld select {
  min-width: 0;
}
.mc2-lbl-hint {
  font-weight: 400;
  color: var(--text2);
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
}
.mc2-f-type-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 2px;
}
.mc2-type-radios {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  min-height: 30px;
}
.mc2-type-opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.mc2-type-opt input {
  margin: 0;
}
.mc2-rates-section {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  grid-column: 1 / -1;
}
.mc2-rates-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: nowrap;
  margin: 0 0 8px;
  min-width: 0;
}
.mc2-rates-toolbar-left {
  display: flex;
  align-items: baseline;
  gap: 8px 10px;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}
.mc2-rates-heading {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  flex-shrink: 0;
}
.mc2-rates-heading em {
  color: var(--accent);
  font-style: normal;
}
.mc2-rates-intro,
.mc2-rates-foot,
.mc2-pricing-need-save {
  font-size: 11px;
  color: var(--text3);
  margin: 0;
  line-height: 1.35;
}
#modalCustomer .mc2-rates-toolbar-left .mc2-rates-intro {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
#modalCustomer .mc2-rates-pct-bar.pricing-pct-adj-bar {
  margin: 0;
  padding: 6px 10px;
  flex: 0 0 auto;
  max-width: 52%;
}
#modalCustomer .mc2-rates-pct-bar .pricing-pct-adj-bar__inner {
  flex-wrap: nowrap;
  gap: 6px 10px;
  font-size: 11px;
}
#modalCustomer .mc2-rates-pct-bar .pricing-pct-adj-bar__title {
  font-size: 10px;
  white-space: nowrap;
}
#modalCustomer .mc2-rates-pct-bar .pricing-pct-adj-bar__radio,
#modalCustomer .mc2-rates-pct-bar .pricing-pct-adj-bar__temp,
#modalCustomer .mc2-rates-pct-bar .pricing-pct-adj-bar__pct {
  white-space: nowrap;
  font-size: 11px;
}
#modalCustomer .mc2-rates-pct-bar .pricing-pct-adj-bar__hint {
  flex: 0 1 auto;
  max-width: 12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#modalCustomer .mc2-rates-pct-bar .btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}
.mc2-rates-subheading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin: 14px 0 8px;
}
#modalCustomer .mc2-block-rates #mc2_pricingEditor {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#modalCustomer .mc2-vr-matrix-wrap.tbl-wrap {
  --mc2-vr-head-h: 2.75rem;
  --mc2-vr-row-h: 5.5rem;
  flex: 0 1 auto;
  min-height: calc(var(--mc2-vr-head-h) + 6 * var(--mc2-vr-row-h));
  max-height: calc(var(--mc2-vr-head-h) + 6 * var(--mc2-vr-row-h));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0;
}
.mc2-vr-cell-override {
  box-shadow: inset 0 0 0 2px rgba(36, 160, 237, 0.35);
}
#modalCustomer .mc2-vr-cell .btn-ghost.btn-sm {
  font-size: 11px;
  padding: 2px 8px;
}
.mc2-vrow-label {
  min-width: 8rem;
  vertical-align: top;
  padding: 6px 8px;
}
.mc2-vrow-sub {
  font-size: 11px;
  color: var(--text3);
}
#modalCustomer .mc2-vr-matrix-wrap > table {
  display: table;
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}
#modalCustomer .mc2-vr-matrix-wrap > table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
  white-space: nowrap;
  padding: 6px 8px;
}
#modalCustomer .mc2-vr-matrix-wrap > table thead th:first-child,
#modalCustomer .mc2-vr-matrix-wrap > table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
#modalCustomer .mc2-vr-matrix-wrap > table thead th:first-child {
  z-index: 3;
}
#modalCustomer .mc2-sl-matrix-wrap {
  max-height: min(36vh, 320px);
  overflow: auto;
  margin-bottom: 8px;
}
.mc2-vr-cell-hint {
  font-size: 11px;
  color: var(--text3);
  margin: 10px 0 0;
  line-height: 1.45;
}
.mc2-pricing-status {
  font-size: 12px;
  color: var(--text2);
  margin: 0 0 8px;
  padding: 8px 10px;
  background: var(--bg2);
  border-radius: 6px;
  border: 1px solid var(--border);
}
#modalCustomer .mc2-vr-matrix-wrap table td,
#modalCustomer .mc2-vr-matrix-wrap table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
#modalCustomer .mc2-sl-matrix-table td,
#modalCustomer .mc2-sl-matrix-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.zp-example-map-wrap {
  max-width: 420px;
}
@media (min-width: 900px) {
  #page-zone_pricing .regions-pricing-hero__help-col {
    max-width: 440px;
  }
}
.zp-map-svg {
  display: block;
  width: 100%;
  height: auto;
}
.zp-map-water {
  fill: #c5dff0;
}
.zp-map-land {
  fill: #efe8dc;
  stroke: #b8a88c;
  stroke-width: 1;
}
.zp-map-land--live {
  fill: #f4f1eb;
  stroke: #c8bfb0;
  stroke-width: 1;
}
.zp-map-county {
  stroke: #888;
  stroke-width: 1;
  stroke-dasharray: 4 3;
}
.zp-map-county-label {
  font-size: 8px;
  fill: #666;
}
.zp-map-marker circle {
  fill: #24a0ed;
  stroke: #fff;
  stroke-width: 1.5;
}
.zp-map-marker--emph circle {
  fill: #c41e3a;
  r: 7;
}
.zp-map-marker--live circle {
  fill: #2d8a4e;
}
.zp-map-label {
  font-size: 8px;
  fill: #222;
  font-family: var(--font-mono);
}
.zp-map-label--emph {
  font-weight: 700;
  font-size: 8.5px;
}
.zp-map-label--live {
  font-size: 7.5px;
}
.zp-map-z {
  fill: #c41e3a;
  font-weight: 700;
}
.zp-map-route {
  stroke: #c41e3a;
  stroke-width: 2;
  stroke-dasharray: 5 3;
}
.zp-map-route-arrow {
  fill: #c41e3a;
}
.zp-map-ring {
  fill: none;
  stroke: #c41e3a;
  stroke-width: 1;
  opacity: 0.45;
}
.zp-map-ring--1 { stroke-dasharray: none; }
.zp-map-ring--2 { stroke-dasharray: 4 4; }
.zp-map-ring--3 { stroke-dasharray: 2 3; }
.zp-map-hub-label {
  font-size: 8px;
  font-weight: 700;
  fill: #c41e3a;
}
.zp-map-dual {
  display: flex;
  gap: 8px;
  max-width: 340px;
}
.zp-map-dual__panel {
  flex: 1;
  min-width: 0;
}
.zp-map-dual__code {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  color: var(--btn-red);
}
.zp-map-svg--mini {
  max-height: 120px;
}
.zp-tenant-map-wrap {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.zp-tenant-map__title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}
.zp-tenant-map__caption {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text3);
}
.regions-pricing-hero {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  margin: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.regions-pricing-hero__labels {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding-right: 16px;
  min-width: 148px;
}
.regions-pricing-hero__kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  line-height: 1.2;
}
.regions-pricing-hero__tier {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.regions-pricing-hero__rule {
  flex-shrink: 0;
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 2px 0;
}
.regions-pricing-hero__help {
  flex: 1;
  min-width: 0;
  padding-left: 18px;
  padding-right: 4px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text2);
}
.regions-pricing-hero__help code {
  font-size: 11px;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
}
.regions-pricing-hero__help strong {
  color: var(--text);
  font-weight: 600;
}
.regions-pricing-help__lead {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
  font-size: 12px;
}
.regions-pricing-help__section {
  margin-bottom: 8px;
}
.regions-pricing-help__h {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 2px;
}
.regions-pricing-help__p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text2);
}
.regions-pricing-help__example {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text2);
}
.regions-pricing-help__example li {
  margin-bottom: 3px;
}
.regions-region-panel-tip {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text3);
  margin: 0 0 8px;
  padding: 8px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.regions-setup-heading .page-title {
  font-size: 22px;
}
.regions-region-card {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.regions-region-card--work {
  margin-bottom: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.regions-region-card--work .regions-region-card__body {
  padding: 0 0 14px;
}
.regions-region-card__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.regions-region-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.regions-region-card__key {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 3px;
}
.regions-region-card__zones-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
}
.regions-region-card__bbox {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border);
}
.regions-region-card__body {
  padding: 12px 14px 14px;
}
.regions-matrix-section {
  margin-bottom: 4px;
}
.regions-matrix-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
.regions-zone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.regions-zone-chips .regions-zone-chip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
}
/* Admin-only display order for New Order dropdowns (not shown on order entry labels). */
.zc-admin-order-col {
  width: 3.25rem;
  min-width: 3.25rem;
  max-width: 3.5rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.zc-admin-order-input {
  width: 2.75rem;
  max-width: 100%;
  padding: 2px 4px;
  font-size: 12px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: inherit;
  box-sizing: border-box;
  appearance: none;
  -moz-appearance: textfield;
}
.zc-admin-order-input::-webkit-outer-spin-button,
.zc-admin-order-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.zc-admin-order-input:focus {
  outline: 2px solid var(--app-primary);
  outline-offset: 1px;
}
.zc-admin-order-hint {
  font-size: 12px;
  color: var(--text3);
  margin: 0 0 10px;
  line-height: 1.45;
}
.zc-admin-order-apply-th {
  cursor: pointer;
  user-select: none;
  color: var(--app-primary, #24a0ed);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.zc-admin-order-apply-th:hover {
  filter: brightness(1.1);
}
.zc-admin-order-apply-th--busy {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 720px) {
  .regions-pricing-hero {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .regions-pricing-hero__rule {
    display: none;
  }
  #page-zone_pricing .regions-pricing-hero__help-col {
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }
  .regions-region-card__bbox {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .kpi-row {
    grid-template-columns: 1fr;
  }

  .ws-indicator span#wsLabel {
    display: none;
  }
}
