/* ===== TRANSIT OPS HARD RESET — isolated surface ============================================
   Scoped ONLY to #transit-ops-workspace + body.bo-ops-route shell neutralize.
   Do NOT depend on .otw* / .prq* page grids. Mobile-first. */

/* --- Shell neutralize when Ops is active --- */
html.bo-ops-route, body.bo-ops-route {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: visible !important;
}
body.bo-ops-route .app {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
body.bo-ops-route .main {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
body.bo-ops-route .content {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  box-sizing: border-box !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}
body.bo-ops-route .main,
body.bo-ops-route .app,
body.bo-ops-route #view {
  overflow-x: visible !important;
  transform: none !important;
}
body.bo-ops-route .app.is-open .main,
body.bo-ops-route .app.side-open .main {
  transform: none !important;
}
body.bo-ops-route .top {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
@media (max-width: 767px) {
  body.bo-ops-route .top {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "menu title"
      "search search";
    gap: 8px;
    padding: 10px 12px !important;
    align-items: center;
  }
  body.bo-ops-route .top > div:first-child { display: contents; }
  body.bo-ops-route .menu-btn { grid-area: menu; display: inline-flex !important; }
  body.bo-ops-route .top h1 {
    grid-area: title;
    font-size: 1.05rem !important;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.bo-ops-route .top__act { display: none !important; }
  body.bo-ops-route .top .bo-search,
  body.bo-ops-route .top .bo-search:not(:focus-within),
  body.bo-ops-route .top .bo-search:focus-within {
    grid-area: search;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
  }
  body.bo-ops-route .bo-search__in {
    width: 100% !important;
    min-height: 44px;
    box-sizing: border-box;
  }
}

/* --- Isolated ops root --- */
#transit-ops-workspace,
#transit-ops-workspace * {
  box-sizing: border-box;
}
#transit-ops-workspace {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 1160px;
  min-width: 0;
  margin-inline: auto;
  padding-inline: 0;
  padding-bottom: 6rem;
  color: #22252a;
  font-family: "Cairo", system-ui, sans-serif;
}
/* build marker (dev) — confirm CSS loaded */
#transit-ops-workspace::before {
  content: "opsreal3";
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#transit-ops-workspace .tow-num {
  /* Isolate LTR tokens without flipping the block's inline-start (RTL). */
  unicode-bidi: isolate;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
#transit-ops-workspace bdi.tow-num,
#transit-ops-workspace .tow-num bdi {
  display: inline;
  direction: ltr;
  unicode-bidi: isolate;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Header */
#transit-ops-workspace .tow-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
}
#transit-ops-workspace .tow-head__title {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 900;
  line-height: 1.25;
}
#transit-ops-workspace .tow-head__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 0.9rem;
}
#transit-ops-workspace .tow-head__ref { font-weight: 900; }
#transit-ops-workspace .tow-head__cust { font-weight: 700; overflow-wrap: anywhere; }
#transit-ops-workspace .tow-head__dates { color: #7b8494; font-size: 0.86rem; }
#transit-ops-workspace .tow-head__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
}
#transit-ops-workspace .tow-head__links .lnk {
  color: #1f8fbf;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
#transit-ops-workspace .tow-dot { opacity: 0.45; }

/* Summary strip */
#transit-ops-workspace .tow-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e7e9ee;
  border-radius: 12px;
}
#transit-ops-workspace .tow-strip__i {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#transit-ops-workspace .tow-strip__i span {
  font-size: 0.7rem;
  font-weight: 800;
  color: #7b8494;
}
#transit-ops-workspace .tow-strip__i b {
  font-size: 0.92rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}
#transit-ops-workspace .tow-strip__i b.is-ok { color: #16a34a; }
#transit-ops-workspace .tow-strip__i b.is-wait { color: #9a6700; }

#transit-ops-workspace .tow-banner {
  background: #fff8eb;
  border: 1px solid #f0d9a0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Service list */
#transit-ops-workspace .tow-list,
#transit-ops-workspace .tow-day {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
#transit-ops-workspace .tow-day__h {
  font-size: 0.72rem;
  font-weight: 800;
  color: #7b8494;
  letter-spacing: 0.04em;
}

/* Card — MOBILE FIRST + container queries (pane width ≠ monitor width) */
#transit-ops-workspace .ops-card {
  container-type: inline-size;
  container-name: ops-card;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: #fff;
  border: 1px solid #e7e9ee;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(24, 32, 54, 0.05);
  overflow: visible;
}
#transit-ops-workspace .ops-card.is-block {
  border-color: #f0b4b4;
  box-shadow: inset 3px 0 0 #dc2626;
}
#transit-ops-workspace .ops-card.is-on {
  outline: 2px solid rgba(13, 92, 99, 0.18);
  outline-offset: 1px;
}
#transit-ops-workspace .ops-card.is-open {
  border-color: #c9d6e8;
}

#transit-ops-workspace .ops-card__head,
#transit-ops-workspace .ops-card__summary,
#transit-ops-workspace .ops-card__action,
#transit-ops-workspace .ops-card__details {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 12px 14px;
  overflow: visible;
}
/* SAFE HEADER: checkbox | content — status is its own row by default */
#transit-ops-workspace .ops-card__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
  cursor: pointer;
}
#transit-ops-workspace .ops-card__check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  grid-row: 1;
  grid-column: 1;
}
#transit-ops-workspace .ops-card__check input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #0d5c63;
  cursor: pointer;
}
#transit-ops-workspace .ops-card__id {
  grid-row: 1;
  grid-column: 2;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
#transit-ops-workspace .ops-card__type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.88rem;
  color: #334155;
  margin-bottom: 4px;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
}
#transit-ops-workspace .ops-card__fn,
#transit-ops-workspace .ops-card__route,
#transit-ops-workspace .ops-card__when {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}
#transit-ops-workspace .ops-card__fn {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.25;
}
#transit-ops-workspace .ops-card__route {
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.35;
}
#transit-ops-workspace .ops-card__when {
  font-size: 0.78rem;
  color: #7b8494;
  margin-top: 2px;
}
#transit-ops-workspace .ops-card__status {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 100%;
}
#transit-ops-workspace .ops-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  overflow: visible;
}
#transit-ops-workspace .ops-pill--ok { background: #e7f7ef; color: #0f7a45; }
#transit-ops-workspace .ops-pill--wait { background: #fff6e5; color: #9a6700; }
#transit-ops-workspace .ops-pill--ready { background: #e8f1ff; color: #1d4ed8; }
#transit-ops-workspace .ops-pill--block { background: #fde8e8; color: #b42318; }
#transit-ops-workspace .ops-pill--neutral { background: #eef2f7; color: #475569; }

/* DEFAULT = STACKED summary + full-width CTA */
#transit-ops-workspace .ops-card__summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
}
#transit-ops-workspace .ops-kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}
#transit-ops-workspace .ops-kv span {
  font-size: 0.7rem;
  font-weight: 800;
  color: #7b8494;
}
#transit-ops-workspace .ops-kv b {
  font-size: 0.95rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  white-space: normal;
  overflow: visible;
}
#transit-ops-workspace .ops-kv b.money {
  font-size: 1.05rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

#transit-ops-workspace .ops-card__action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 0;
}
#transit-ops-workspace .ops-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #f7931e, #ffc20e);
  color: #231a08;
  white-space: normal;
  overflow: visible;
}
#transit-ops-workspace .ops-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  max-width: 100%;
  border: 1.5px solid #e7e9ee;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: #334155;
  white-space: normal;
  overflow: visible;
}

/* Container queries — based on CARD width, not monitor/viewport */
@container ops-card (min-width: 520px) {
  .ops-card__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
  }
}
@container ops-card (min-width: 760px) {
  .ops-card__summary {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
    align-items: end;
  }
  .ops-card__action {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ops-cta { width: auto; flex: 1 1 auto; }
  .ops-toggle { width: auto; flex: 0 0 auto; padding-inline: 14px; }
}
@container ops-card (max-width: 519px) {
  .ops-card__summary {
    display: flex;
    flex-direction: column;
  }
  .ops-cta,
  .ops-toggle {
    width: 100%;
  }
}

/* Details */
#transit-ops-workspace .ops-card__details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f7f9fc;
  border-top: 1px solid #eef2f7;
  border-radius: 0 0 14px 14px;
}
#transit-ops-workspace .ops-track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
#transit-ops-workspace .ops-track li {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #7b8494;
}
#transit-ops-workspace .ops-track li.is-done { color: #16a34a; }
#transit-ops-workspace .ops-track li.is-mid { color: #b45309; }

#transit-ops-workspace .ops-sec {
  background: #fff;
  border: 1px solid #e7e9ee;
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  min-width: 0;
}
#transit-ops-workspace .ops-sec.is-focus {
  border-color: #f0d9a0;
  background: #fffdf8;
}
#transit-ops-workspace .ops-sec.is-edit { border-color: #c9d6e8; }
#transit-ops-workspace .ops-sec__h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
#transit-ops-workspace .ops-sec__h h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 900;
}
#transit-ops-workspace .ops-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
#transit-ops-workspace .ops-fields .fld,
#transit-ops-workspace .ops-fields label.fld {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 700;
}
#transit-ops-workspace .ops-fields .fld > span {
  font-size: 0.72rem;
  font-weight: 800;
  color: #7b8494;
}
#transit-ops-workspace .ops-fields .fld__ctrl,
#transit-ops-workspace .ops-fields .sup-pick__in,
#transit-ops-workspace .ops-fields .ccy-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1.5px solid #e7e9ee;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
#transit-ops-workspace .ops-pair {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
#transit-ops-workspace .ops-sec__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
#transit-ops-workspace .ops-save { font-size: 0.72rem; font-weight: 800; color: #16a34a; }
#transit-ops-workspace .ops-autosave { font-size: 0.72rem; color: #7b8494; }
#transit-ops-workspace .ops-empty {
  text-align: center;
  padding: 16px 10px;
  color: #7b8494;
}
#transit-ops-workspace .ops-empty p { margin: 0 0 10px; font-weight: 700; }
#transit-ops-workspace .ops-read { display: flex; flex-direction: column; gap: 8px; }
#transit-ops-workspace .ops-read-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.88rem;
}
#transit-ops-workspace .ops-read-row > span:first-child { color: #7b8494; min-width: 4.5rem; }
#transit-ops-workspace .ops-hint {
  margin: 0 0 4px;
  font-size: 0.75rem;
  color: #7b8494;
  font-weight: 600;
  line-height: 1.45;
}
#transit-ops-workspace .ops-danger {
  color: #dc2626 !important;
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
}
#transit-ops-workspace .ops-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#transit-ops-workspace .ops-doc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#transit-ops-workspace .ops-docok { color: #16a34a; font-weight: 800; font-size: 0.88rem; }

#transit-ops-workspace .ops-menu { position: relative; }
#transit-ops-workspace .ops-menu__btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e7e9ee;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}
#transit-ops-workspace .ops-menu__drop {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: min(14rem, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid #e7e9ee;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
#transit-ops-workspace .ops-menu__i {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  min-height: 44px;
}
#transit-ops-workspace .ops-menu__i:hover { background: #eef2f7; }
#transit-ops-workspace .ops-menu__i.is-warn { color: #dc2626; }

#transit-ops-workspace .ops-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  margin-inline-start: 6px;
}
#transit-ops-workspace .ops-chip.is-ok { background: #e7f7ef; color: #0f7a45; }

/* Batch bar */
#transit-ops-workspace .tow-batch {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 24px), 900px);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #0f172a;
  color: #fff;
  padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
}
#transit-ops-workspace .tow-batch__n { font-weight: 800; }
#transit-ops-workspace .tow-batch__a {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#transit-ops-workspace .tow-batch__a .btn {
  flex: 1 1 auto;
  min-height: 44px;
  min-width: 0;
  justify-content: center;
}

#transit-ops-workspace .tow-err { color: #dc2626; font-weight: 800; }
#transit-ops-workspace .tow-empty {
  padding: 24px;
  text-align: center;
  color: #7b8494;
  font-weight: 700;
}

.sup-pick__drop--portal {
  position: fixed !important;
  background: #fff;
  border: 1px solid #e7e9ee;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: none !important;
  overflow: hidden;
  z-index: 120 !important;
}
.sup-pick__drop--portal .sup-pick__list {
  max-height: calc(2.75rem * 5);
}
.sup-pick__drop--sheet {
  position: fixed !important;
  inset-inline: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  left: 0 !important;
  right: 0 !important;
  max-height: min(72vh, 520px) !important;
  width: 100% !important;
  z-index: 120 !important;
  border-radius: 16px 16px 0 0;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 28px rgba(20, 26, 34, 0.18);
  background: #fff;
  overflow: hidden;
}
.sup-pick__bd {
  position: fixed;
  inset: 0;
  z-index: 115;
  background: rgba(20, 26, 34, 0.4);
  border: 0;
  padding: 0;
  cursor: pointer;
}
#transit-ops-workspace.tow-queue { max-width: 980px; }
#transit-ops-workspace .tow-qbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
#transit-ops-workspace .tow-qsearch {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid #e7e9ee;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
#transit-ops-workspace .tow-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#transit-ops-workspace .tow-chip {
  border: 1px solid #e7e9ee;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  min-height: 40px;
}
#transit-ops-workspace .tow-chip.is-on {
  background: linear-gradient(135deg, #f7931e, #ffc20e);
  border-color: transparent;
  color: #231a08;
}
#transit-ops-workspace .tow-qcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
  text-align: start;
  background: #fff;
  border: 1px solid #e7e9ee;
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(24, 32, 54, 0.05);
}

/* Shared btn helpers used inside root */
#transit-ops-workspace .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  min-height: 40px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
#transit-ops-workspace .btn--ok {
  background: #0d5c63;
  color: #fff;
}
#transit-ops-workspace .btn--g {
  background: #fff;
  border: 1.5px solid #e7e9ee;
  color: #242a33;
}
#transit-ops-workspace .btn--sm { min-height: 36px; padding: 0 10px; font-size: 0.82rem; }
#transit-ops-workspace .lnk {
  color: #1f8fbf;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

/* Modals used by ops (outside root, but themed) */
.tow-sheet { padding: 4px; max-width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tow-sheet h3 { margin: 0; font-size: 1.05rem; }
.tow-sheet__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tow-sheet__a { display: flex; flex-direction: column; gap: 8px; }
.tow-sheet__a.is-row { flex-direction: row; flex-wrap: wrap; }
.tow-sheet__a.is-sticky {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 10px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tow-sheet__a .btn { min-height: 44px; justify-content: center; }
.tow-modal-card { width: min(620px, calc(100vw - 24px)) !important; max-width: calc(100vw - 24px); }
.tow-hist { list-style: none; margin: 0 0 12px; padding: 0; max-height: min(50vh, 360px); overflow: auto; }
.tow-hist li { padding: 8px 0; border-bottom: 1px solid #eef2f7; font-size: 0.88rem; }
.tow-preview { width: 100%; height: min(55vh, 520px); border: 1px solid #e7e9ee; border-radius: 10px; background: #f8fafc; }
.tow-preview-fb { padding: 16px; border: 1px dashed #e7e9ee; border-radius: 10px; text-align: center; }
.tow-cx { display: flex; flex-direction: column; gap: 8px; }
.tow-cx label { display: flex; gap: 8px; align-items: flex-start; min-height: 44px; }
.tow-money { display: flex; flex-direction: column; gap: 8px; }

/* Page-level strip/batch only — CARD internals use @container above, not viewport MQ */
@media (min-width: 600px) {
  #transit-ops-workspace .tow-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  #transit-ops-workspace .tow-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  #transit-ops-workspace .ops-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
  #transit-ops-workspace .tow-batch {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  #transit-ops-workspace .tow-batch__a .btn { flex: 0 1 auto; }
}
@media (min-width: 1000px) {
  #transit-ops-workspace .ops-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }
  #transit-ops-workspace .ops-fields .fld--wide,
  #transit-ops-workspace .ops-fields [id^="po_sup_slot_"],
  #transit-ops-workspace .ops-pair,
  #transit-ops-workspace .ops-sec__foot {
    grid-column: 1 / -1;
  }
  #transit-ops-workspace .tow-qcard {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ===== Purchase Order Wizard (canonical) ===== */
html.pow-lock, html.pow-lock body { overflow:hidden; }
.pow-root { position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; font-size:var(--bo-fs, .92rem); color:var(--bo-ink, #1a1f27); }
.pow-bd { position:absolute; inset:0; background:rgba(20,26,34,.5); }
.pow { position:relative; display:flex; flex-direction:column; background:var(--bo-surface, #fff); box-shadow:var(--bo-shadow-lg); overflow:hidden; }
.pow--panel { width:min(840px, calc(100vw - 48px)); max-height:min(92vh, 940px); border-radius:var(--bo-r-lg, 16px); }
.pow--sheet { width:100vw; height:100vh; height:100dvh; max-height:none; border-radius:0; }
.pow-h { display:flex; align-items:center; gap:var(--bo-3, 12px); padding:14px 20px; border-bottom:1px solid var(--bo-line, #e6e9ef); flex:0 0 auto; }
.pow-h__t { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1 1 auto; }
.pow-h__t h3 { margin:0; font-size:var(--bo-fs-md, 1.05rem); font-weight:900; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.pow-h__s { color:var(--bo-muted, #6b7484); font-size:var(--bo-fs-sm, .82rem); font-weight:700; }
.pow-ref { font-size:.78rem; font-weight:800; color:var(--bo-ink-2); background:var(--bo-line-2, #f0f3f7); border-radius:999px; padding:2px 10px; }
.pow-h__save { flex:0 1 auto; min-width:0; }
.pow-save { display:inline-flex; align-items:center; gap:6px; font-size:.78rem; font-weight:800; white-space:nowrap; border:0; background:none; padding:4px 0; }
.pow-save.is-busy { color:var(--bo-muted); }
.pow-save.is-ok { color:var(--bo-green, #16a34a); }
.pow-save.is-wait { color:var(--bo-muted-2); white-space:normal; }
.pow-save.is-err { color:var(--bo-red, #dc2626); cursor:pointer; text-decoration:underline; }
.pow-x { flex:0 0 auto; width:40px; height:40px; border-radius:10px; border:1px solid var(--bo-line); background:var(--bo-surface); font-size:1.25rem; line-height:1; cursor:pointer; color:var(--bo-ink-2); }
.pow-x:hover { background:var(--bo-surface-2); }
.pow-body { flex:1 1 auto; overflow:auto; padding:8px 20px 24px; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.pow-sec { padding:18px 0; border-bottom:1px solid var(--bo-line-2, #f0f3f7); }
.pow-sec:last-child { border-bottom:0; }
.pow-sec h4 { margin:0 0 12px; font-size:.95rem; font-weight:900; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.pow-sec h4 small, .pow-sec h5 small { font-size:.75rem; font-weight:700; color:var(--bo-muted); }
.pow-sec h5 { margin:0 0 8px; font-size:.85rem; font-weight:900; }
.pow-sec--opt > summary { list-style:none; cursor:pointer; }
.pow-sec--opt > summary::-webkit-details-marker { display:none; }
.pow-sec--opt > summary h4 { margin:0; }
.pow-sec--opt > summary h4::after { content:"+"; margin-inline-start:auto; color:var(--bo-muted); font-weight:700; }
.pow-sec--opt[open] > summary h4::after { content:"\2212"; }
.pow-sec--opt[open] > summary { margin-bottom:12px; }
.pow-muted { color:var(--bo-muted, #6b7484); font-size:.8rem; font-weight:600; }
.pow-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:10px; }
.pow-row--end { justify-content:flex-end; }
.pow-card { border:1px solid var(--bo-line); border-radius:var(--bo-r, 12px); padding:12px 14px; background:var(--bo-surface); }
.pow-svcs { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.pow-svc { display:flex; align-items:flex-start; gap:12px; padding:10px 12px; border:1px solid var(--bo-line); border-radius:var(--bo-r); background:var(--bo-surface-2, #f8fafc); }
.pow-svc__ic { flex:0 0 auto; width:36px; height:36px; border-radius:10px; background:var(--bo-surface); border:1px solid var(--bo-line); display:grid; place-items:center; font-size:1rem; }
.pow-svc__b { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1 1 auto; }
.pow-svc__b b { font-weight:800; overflow-wrap:anywhere; }
.pow-svc__b span { color:var(--bo-muted); font-size:.8rem; font-weight:600; }
.pow-svc__sup { color:var(--bo-ink-2) !important; }
.pow-svc .pow-x { width:32px; height:32px; font-size:1.05rem; }
.pow-split { margin:14px 0 4px; padding:14px 16px; border-radius:var(--bo-r); background:#fff7ed; border:1px solid #fed7aa; }
.pow-split b { font-weight:900; }
.pow-split p { margin:6px 0; font-size:.84rem; }
.pow-split ul { margin:6px 0 0; padding-inline-start:18px; font-size:.84rem; }
.pow-split small { color:var(--bo-muted); font-weight:600; }
.pow-sup { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.pow-sup > div { display:flex; flex-direction:column; gap:2px; }
.pow-suggest { display:flex; flex-direction:column; gap:4px; background:var(--bo-surface-2); }
.pow-suggest b { font-size:1rem; font-weight:900; }
.pow-suggest.is-none b { font-size:.92rem; }
.pow-score { font-size:.8rem; font-weight:800; color:var(--bo-blue-d, #1f8fbf); }
.pow-sup-slot { min-height:44px; }
.pow-drop { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:112px; padding:16px; border:1.5px dashed #c5ced9; border-radius:var(--bo-r); background:var(--bo-surface-2); cursor:pointer; text-align:center; }
.pow-drop:hover, .pow-drop:focus-visible, .pow-drop.is-over { border-color:var(--bo-orange, #f7931e); background:#fffaf2; outline:none; }
.pow-drop__t { font-weight:900; }
.pow-drop small { color:var(--bo-muted); font-weight:600; }
.pow-file { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; }
.pow-file__ic { width:42px; height:42px; border-radius:10px; display:grid; place-items:center; font-size:.7rem; font-weight:900; color:#fff; background:var(--bo-ink-2); }
.pow-file__b { display:flex; flex-direction:column; gap:3px; min-width:0; }
.pow-file__b b { font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pow-file__b small { color:var(--bo-muted); font-size:.75rem; }
.pow-file__a { display:flex; gap:12px; }
.pow-file__thumb { grid-column:1 / -1; max-height:160px; max-width:100%; object-fit:contain; border-radius:8px; border:1px solid var(--bo-line); background:var(--bo-surface-2); justify-self:start; }
.pow-chip { display:inline-flex; align-items:center; gap:6px; width:max-content; font-size:.72rem; font-weight:800; border-radius:999px; padding:2px 10px; background:var(--bo-line-2); color:var(--bo-ink-2); }
.pow-chip.is-ok { background:#dcfce7; color:#166534; }
.pow-chip.is-wait { background:#fef3c7; color:#92400e; }
.pow-chip.is-busy { background:#e0f2fe; color:#075985; }
.pow-review-h { display:flex; flex-direction:column; gap:2px; margin:14px 0 10px; }
.pow-review-h b { font-weight:900; }
.pow-review-h span { color:var(--bo-muted); font-size:.82rem; font-weight:700; }
.pow-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px 14px; margin-top:12px; }
.pow-grid--1 { grid-template-columns:minmax(0, 320px); }
.pow-f { display:flex; flex-direction:column; gap:6px; min-width:0; }
.pow-f > span { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:.78rem; font-weight:800; color:var(--bo-ink-2); }
.pow-in { width:100%; min-height:44px; box-sizing:border-box; border:1.5px solid var(--bo-line); border-radius:10px; padding:8px 12px; font:inherit; background:var(--bo-surface); color:var(--bo-ink); }
.pow-in:focus { outline:none; border-color:var(--bo-blue, #29abe2); box-shadow:0 0 0 3px rgba(41,171,226,.15); }
.pow-in[readonly] { background:var(--bo-surface-2); color:var(--bo-muted); }
.pow-tag { font-size:.66rem; font-weight:800; color:var(--bo-muted-2); background:var(--bo-line-2); border-radius:999px; padding:1px 8px; }
.pow-tag.is-mid { color:#92400e; background:#fef3c7; }
.pow-tag.is-low { color:#9a3412; background:#ffedd5; }
.pow-tag.is-edit { color:#1e3a8a; background:#dbeafe; }
.pow-hist { margin-top:12px; font-size:.8rem; }
.pow-hist summary { cursor:pointer; font-weight:800; color:var(--bo-muted); }
.pow-hist ul { margin:6px 0 0; padding-inline-start:18px; }
.pow-allocs { display:flex; flex-direction:column; gap:8px; }
.pow-alloc { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; }
.pow-alloc > span:first-child { display:flex; flex-direction:column; min-width:0; }
.pow-alloc > span:first-child b { font-weight:800; overflow-wrap:anywhere; }
.pow-alloc small { color:var(--bo-muted); font-size:.75rem; }
.pow-money { display:flex; align-items:center; gap:6px; flex:0 0 auto; }
.pow-money .pow-in { width:9.5rem; text-align:end; }
.pow-money i { font-style:normal; font-weight:800; font-size:.78rem; color:var(--bo-muted); min-width:2.6rem; }
.pow-lines { margin:0 0 14px; padding:12px; border-radius:var(--bo-r); background:var(--bo-surface-2); border:1px solid var(--bo-line-2); }
.pow-line { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,260px); gap:10px; align-items:center; padding:6px 0; border-top:1px solid var(--bo-line-2); }
.pow-line:first-of-type { border-top:0; }
.pow-line__d { font-size:.84rem; font-weight:700; overflow-wrap:anywhere; }
.pow-line .pow-in { min-height:40px; }
.pow-recon { display:flex; flex-wrap:wrap; gap:8px 20px; align-items:center; margin-top:14px; padding:12px 14px; border-radius:var(--bo-r); background:var(--bo-surface-2); border:1px solid var(--bo-line); }
.pow-recon > div { display:flex; flex-direction:column; gap:2px; }
.pow-recon span { color:var(--bo-muted); font-size:.74rem; font-weight:800; }
.pow-recon b { font-weight:900; }
.pow-recon em { font-style:normal; font-size:.8rem; font-weight:800; margin-inline-start:auto; }
.pow-recon.is-ok { background:#f0fdf4; border-color:#bbf7d0; }
.pow-recon.is-ok em { color:#166534; }
.pow-recon.is-bad { background:#fffbeb; border-color:#fde68a; }
.pow-recon.is-bad em { color:#92400e; }
.pow-conf { padding:10px 0; border-top:1px solid var(--bo-line-2); }
.pow-conf:first-of-type { border-top:0; }
.pow-conf > b { font-weight:800; font-size:.86rem; }
.pow-conf .pow-grid { margin-top:8px; }
.pow-rev { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:10px 16px; margin:0 0 12px; }
.pow-rev > div { display:flex; flex-direction:column; gap:2px; }
.pow-rev dt { color:var(--bo-muted); font-size:.74rem; font-weight:800; }
.pow-rev dd { margin:0; font-weight:800; overflow-wrap:anywhere; }
.pow-check { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px 14px; }
.pow-check li { display:flex; align-items:center; gap:6px; font-size:.8rem; font-weight:700; color:var(--bo-muted); }
.pow-check li.is-ok { color:#166534; }
.pow-err { flex:0 0 auto; margin:0; padding:10px 20px; background:#fef2f2; border-top:1px solid #fecaca; color:#991b1b; font-size:.84rem; font-weight:800; }
.pow-err p { margin:2px 0; }
.pow-foot { flex:0 0 auto; display:flex; gap:10px; padding:12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top:1px solid var(--bo-line); background:var(--bo-surface); }
.pow-foot .btn { flex:1 1 0; min-height:48px; font-weight:900; }
.pow-dlg { position:absolute; inset:0; z-index:110; display:flex; align-items:center; justify-content:center; padding:16px; }
.pow-dlg__bd { position:absolute; inset:0; background:rgba(20,26,34,.45); }
.pow-dlg__c { position:relative; width:min(460px, 100%); max-height:90vh; overflow:auto; background:var(--bo-surface); border-radius:var(--bo-r-lg); padding:20px; box-shadow:var(--bo-shadow-lg); display:flex; flex-direction:column; gap:10px; }
.pow-dlg__c h4 { margin:0; font-size:1rem; font-weight:900; }
.pow-dlg__c p { margin:0; font-size:.86rem; line-height:1.6; }
.pow-dlg__c .btn { min-height:44px; }
.acc-blocks { display:flex; flex-direction:column; gap:.75rem; }
.acc-block { padding:.75rem; border:1px solid #eef2f7; border-radius:10px; background:#fafbfc; }
.acc-block ul { margin:.35rem 0 .55rem; padding-inline-start:1.1rem; }
.ltr { direction:ltr; text-align:start; }
@media (max-width:767px) {
  .pow-h { padding:12px 14px; }
  .pow-h__save { order:3; flex-basis:100%; }
  .pow-h { flex-wrap:wrap; }
  .pow-body { padding:4px 14px 20px; }
  .pow-grid { grid-template-columns:1fr; }
  .pow-grid--1 { grid-template-columns:1fr; }
  .pow-line { grid-template-columns:minmax(0,1fr) auto; }
  .pow-line .pow-in { grid-column:1 / -1; }
  .pow-alloc { flex-wrap:wrap; }
  .pow-money { width:100%; }
  .pow-money .pow-in { flex:1 1 auto; width:auto; }
  .pow-file { grid-template-columns:auto 1fr; }
  .pow-file__a { grid-column:1 / -1; }
  .pow-foot { padding:10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .pow-dlg { align-items:flex-end; padding:0; }
  .pow-dlg__c { width:100%; border-radius:16px 16px 0 0; padding-bottom:calc(20px + env(safe-area-inset-bottom, 0px)); }
}


/* PO eligibility � locked services */
#transit-ops-workspace .ops-card.is-po-locked .ops-card__check--locked {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #eef2f7;
  border: 1.5px solid #d5dbe5;
  flex: 0 0 auto;
}
#transit-ops-workspace .ops-kv--po {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .55rem;
}
#transit-ops-workspace .ops-kv--po small {
  color: #7b8494;
  font-weight: 700;
}
#transit-ops-workspace .tow-batch--elig {
  opacity: .95;
}
