:root {
  --ops-navy: #062653;
  --ops-navy-2: #0b376b;
  --ops-teal: #0797a3;
  --ops-teal-dark: #067783;
  --ops-teal-soft: #e8f8f9;
  --ops-blue-soft: #eef5ff;
  --ops-coral: #e8533f;
  --ops-coral-soft: #fff0ec;
  --ops-amber: #b76513;
  --ops-amber-soft: #fff5e8;
  --ops-green: #15805f;
  --ops-green-soft: #eaf8f1;
  --ops-text: #101f3d;
  --ops-muted: #66758f;
  --ops-line: #dbe5f2;
  --ops-surface: #fff;
  --ops-page: #f5f8fc;
  --ops-shadow: 0 10px 28px rgba(6, 38, 83, .08);
  --ops-radius: 18px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ops-page); }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background: var(--ops-page); color: var(--ops-text); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ops-auth-gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; color: #0a2342; background: #f5f8fc; text-align: center; }
.ops-auth-gate-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; background: #0e9fa4; font-weight: 800; }
.ops-auth-gate small { color: #61728a; }
body[data-auth-state="authenticated"] .ops-auth-gate { display: none; }
body[data-auth-state="pending"] .ops-app-shell,
body[data-auth-state="redirecting"] .ops-app-shell { visibility: hidden; }
body[data-auth-state="error"] .ops-app-shell { display: none; }
body[data-auth-state="error"] .ops-auth-gate { color: #8b1e2d; }

.ops-app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.ops-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px; border-right: 1px solid var(--ops-line); background: #fff; }
.ops-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 20px; }
.ops-brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: linear-gradient(145deg, var(--ops-navy), var(--ops-teal)); font-size: 13px; font-weight: 900; }
.ops-brand small, .ops-brand strong { display: block; }
.ops-brand small { color: var(--ops-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.ops-brand strong { margin-top: 2px; font-size: 18px; }
.ops-sidebar-nav { display: grid; gap: 4px; }
.ops-sidebar-nav :is(a, button) { width: 100%; min-height: 42px; padding: 10px 12px; border: 0; border-radius: 11px; background: transparent; color: #52627c; text-align: left; cursor: pointer; }
.ops-sidebar-nav :is(a, button):hover { background: var(--ops-blue-soft); color: var(--ops-navy); }
.ops-sidebar-nav .is-active { position: relative; color: var(--ops-teal-dark); background: var(--ops-teal-soft); font-weight: 800; }
.ops-sidebar-nav .is-active::before { content: ""; position: absolute; inset: 8px auto 8px -6px; width: 3px; border-radius: 3px; background: var(--ops-teal); }
.ops-sidebar-foot { margin-top: auto; padding: 14px 10px; border-top: 1px solid var(--ops-line); }
.ops-sidebar-foot span, .ops-sidebar-foot strong { display: block; }
.ops-sidebar-foot span { color: var(--ops-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.ops-sidebar-foot strong { margin-top: 5px; font-size: 12px; line-height: 1.4; }

.ops-page { min-width: 0; }
.ops-topbar { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 24px; color: #fff; background: linear-gradient(100deg, var(--ops-navy), #08366a); box-shadow: 0 6px 20px rgba(6, 38, 83, .16); }
.ops-topbar-title { min-width: 190px; }
.ops-topbar-title small, .ops-topbar-title strong { display: block; }
.ops-topbar-title small { opacity: .72; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.ops-topbar-title strong { margin-top: 2px; font-size: 18px; }
.ops-icon-button { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; color: inherit; background: rgba(255,255,255,.08); cursor: pointer; }
.ops-global-search { width: min(480px, 42vw); margin-left: auto; }
.ops-global-search input { width: 100%; min-height: 42px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; outline: none; color: #fff; background: rgba(255,255,255,.08); }
.ops-global-search input::placeholder { color: rgba(255,255,255,.72); }
.ops-global-search input:focus { border-color: rgba(255,255,255,.5); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.ops-live-pill { padding: 7px 12px; border-radius: 999px; color: #fff; background: var(--ops-teal); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }

.ops-main { width: min(1600px, 100%); margin: 0 auto; padding: 24px 26px 40px; }
.ops-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.ops-eyebrow { margin: 0 0 5px; color: var(--ops-teal-dark); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.ops-page-heading h1 { margin: 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.05; }
.ops-page-heading > div > p:last-child { margin: 8px 0 0; color: var(--ops-muted); }
.ops-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ops-button { min-height: 44px; padding: 10px 15px; border: 1px solid var(--ops-line); border-radius: 11px; font-weight: 800; cursor: pointer; }
.ops-button:disabled, button:disabled { opacity: .5; cursor: not-allowed; }
.ops-button-primary { border-color: var(--ops-teal); color: #fff; background: linear-gradient(135deg, var(--ops-teal), var(--ops-teal-dark)); }
.ops-button-secondary { color: var(--ops-navy); background: #fff; }
.ops-light-icon { border-color: var(--ops-line); color: var(--ops-navy); background: #fff; }

.ops-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0 12px; }
.ops-kpi-grid article { min-width: 0; padding: 15px; border: 1px solid var(--ops-line); border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgba(6,38,83,.05); }
.ops-kpi-grid span, .ops-kpi-grid strong, .ops-kpi-grid small { display: block; }
.ops-kpi-grid span { color: var(--ops-muted); font-size: 12px; }
.ops-kpi-grid strong { margin-top: 8px; font-size: 28px; line-height: 1; }
.ops-kpi-grid small { margin-top: 7px; color: var(--ops-green); font-size: 11px; }
.ops-kpi-grid article[data-tone="warning"] small { color: var(--ops-coral); }

.ops-view-tabs { display: flex; gap: 4px; margin-bottom: 12px; padding: 5px; border: 1px solid var(--ops-line); border-radius: 14px; background: #fff; overflow-x: auto; scrollbar-width: none; }
.ops-view-tabs::-webkit-scrollbar, .ops-detail-tabs::-webkit-scrollbar, .ops-filter-row::-webkit-scrollbar { display: none; }
.ops-view-tabs button { min-height: 42px; flex: 0 0 auto; padding: 9px 20px; border: 0; border-radius: 10px; background: transparent; color: var(--ops-muted); font-weight: 800; cursor: pointer; }
.ops-view-tabs button.is-active { color: #fff; background: var(--ops-teal); }
.ops-tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: rgba(6,38,83,.08); font-size: 10px; }
.ops-view-tabs button.is-active .ops-tab-count { background: rgba(255,255,255,.2); }

.ops-split-workspace { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(440px, .9fr); gap: 12px; align-items: start; }
.ops-queue-panel, .ops-booking-panel, .ops-alerts-panel, .ops-insights-panel { min-width: 0; border: 1px solid var(--ops-line); border-radius: var(--ops-radius); background: #fff; box-shadow: var(--ops-shadow); }
.ops-queue-panel, .ops-alerts-panel, .ops-insights-panel { padding: 16px; }
.ops-booking-panel { position: sticky; top: 80px; min-height: 640px; max-height: calc(100vh - 96px); overflow: hidden; }
.ops-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ops-section-heading h2 { margin: 0; font-size: 19px; }
.ops-section-heading p:last-child { margin: 5px 0 0; color: var(--ops-muted); font-size: 12px; line-height: 1.4; }
.ops-queue-heading { align-items: center; }
.ops-status-pill { padding: 7px 11px; border-radius: 999px; color: var(--ops-teal-dark); background: var(--ops-teal-soft); font-size: 11px; font-weight: 900; white-space: nowrap; }
.ops-queue-tools { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; margin-top: 14px; }
.ops-queue-search input { width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--ops-line); border-radius: 11px; outline: 0; }
.ops-queue-search input:focus { border-color: var(--ops-teal); box-shadow: 0 0 0 3px rgba(7,151,163,.1); }
.ops-filter-row { display: flex; max-width: 100%; gap: 6px; margin: 10px 0; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.ops-filter-row button { min-height: 40px; flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--ops-line); border-radius: 10px; background: #fff; color: var(--ops-muted); cursor: pointer; }
.ops-filter-row button.is-active { border-color: var(--ops-teal); color: var(--ops-teal-dark); background: var(--ops-teal-soft); font-weight: 800; }
.ops-advanced-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 8px; margin: 10px 0; padding: 12px; border: 1px solid var(--ops-line); border-radius: 13px; background: var(--ops-page); }
.ops-advanced-filters label { display: grid; gap: 5px; }
.ops-advanced-filters label span { color: var(--ops-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ops-advanced-filters select { min-height: 42px; padding: 8px 10px; border: 1px solid var(--ops-line); border-radius: 10px; background: #fff; }
.ops-inline-status { min-height: 22px; margin: 8px 0; color: var(--ops-muted); font-size: 12px; }
.ops-inline-status[data-tone="error"] { color: #bd3726; }
.ops-inline-status[data-tone="success"] { color: var(--ops-green); }
.ops-inline-status[data-tone="warning"] { color: var(--ops-amber); }

.ops-booking-list { display: grid; gap: 9px; }
.ops-booking-card { display: grid; grid-template-columns: auto minmax(0, 1.5fr) minmax(128px, .8fr) minmax(110px, .62fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--ops-line); border-radius: 14px; background: #fff; }
.ops-booking-card:hover, .ops-booking-card.is-selected { border-color: rgba(7,151,163,.55); box-shadow: 0 7px 20px rgba(6,38,83,.06); }
.ops-booking-card.is-selected { background: linear-gradient(90deg, rgba(7,151,163,.06), #fff 35%); }
.ops-card-check { width: 18px; height: 18px; accent-color: var(--ops-teal); }
.ops-booking-card strong, .ops-booking-card small { display: block; }
.ops-booking-card small { margin-top: 4px; color: var(--ops-muted); font-size: 11px; line-height: 1.35; }
.ops-booking-card .ops-booking-code { color: #075bc7; font-size: 13px; }
.ops-booking-status { justify-self: start; padding: 6px 9px; border-radius: 9px; color: var(--ops-teal-dark); background: var(--ops-teal-soft); font-size: 10px; font-weight: 900; text-transform: capitalize; }
.ops-booking-status[data-tone="warning"] { color: #b64b24; background: var(--ops-amber-soft); }
.ops-booking-status[data-tone="danger"] { color: #bd3726; background: var(--ops-coral-soft); }
.ops-review-button { min-height: 40px; padding: 9px 12px; border: 1px solid var(--ops-teal); border-radius: 10px; color: var(--ops-teal-dark); background: #fff; font-weight: 800; cursor: pointer; white-space: nowrap; }
.ops-pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.ops-pager button { min-width: 40px; min-height: 40px; border: 1px solid var(--ops-line); border-radius: 9px; background: #fff; cursor: pointer; }
.ops-pager button.is-active { border-color: var(--ops-teal); color: #fff; background: var(--ops-teal); }
.ops-empty-state { display: grid; place-items: center; gap: 6px; min-height: 150px; padding: 28px 14px; border: 1px dashed var(--ops-line); border-radius: 14px; color: var(--ops-muted); text-align: center; }
.ops-empty-state strong { color: var(--ops-text); }
.ops-detail-empty { min-height: 620px; margin: 12px; }

#operationsBookingWorkspace { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; height: min(760px, calc(100vh - 98px)); min-height: 638px; }
.ops-detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--ops-line); }
.ops-detail-header h2 { margin: 0; font-size: 19px; }
.ops-detail-header p:last-child { margin: 5px 0 0; color: var(--ops-muted); font-size: 12px; }
.ops-detail-header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.ops-text-link { min-height: 38px; padding: 7px 9px; border: 1px solid var(--ops-line); border-radius: 9px; color: var(--ops-navy); background: #fff; font-size: 10px; font-weight: 800; cursor: pointer; }
.ops-detail-tabs { display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; border-bottom: 1px solid var(--ops-line); scrollbar-width: none; }
.ops-detail-tabs button { min-height: 46px; flex: 0 0 auto; padding: 10px 11px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ops-muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.ops-detail-tabs button.is-active { border-bottom-color: var(--ops-teal); color: var(--ops-teal-dark); }
#operationsBookingWorkspace > .ops-inline-status { margin: 7px 16px 0; }
.ops-detail-content { min-height: 0; overflow-y: auto; padding: 10px 16px 18px; overscroll-behavior: contain; }
.ops-detail-sticky-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, .65fr); gap: 8px; padding: 12px 16px; border-top: 1px solid var(--ops-line); background: rgba(255,255,255,.98); }

.ops-next-action { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid rgba(7,151,163,.22); border-radius: 14px; background: linear-gradient(135deg, var(--ops-teal-soft), #fff); }
.ops-next-action-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: var(--ops-teal-dark); background: #fff; font-weight: 900; }
.ops-next-action small, .ops-next-action strong { display: block; }
.ops-next-action small { color: var(--ops-muted); }
.ops-next-action strong { margin: 3px 0; font-size: 17px; }
.ops-blocker { margin-top: 9px; padding: 10px 12px; border: 1px solid rgba(232,83,63,.18); border-radius: 10px; color: #b83d2d; background: var(--ops-coral-soft); font-size: 11px; }
.ops-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.ops-detail-grid article, .ops-summary-card { padding: 11px; border: 1px solid var(--ops-line); border-radius: 12px; background: var(--ops-page); }
.ops-detail-grid span { display: block; color: var(--ops-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ops-detail-grid strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 12px; }
.ops-detail-section { margin-top: 12px; }
.ops-detail-section:first-child { margin-top: 0; }
.ops-detail-section h3 { margin: 0 0 8px; font-size: 14px; }
.ops-detail-section-copy { margin: -3px 0 10px; color: var(--ops-muted); font-size: 11px; line-height: 1.45; }
.ops-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ops-form-grid label { display: grid; gap: 5px; min-width: 0; }
.ops-form-grid label.ops-span-2 { grid-column: 1 / -1; }
.ops-form-grid label > span { color: var(--ops-muted); font-size: 10px; font-weight: 800; }
.ops-form-grid :is(input, select, textarea) { width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid var(--ops-line); border-radius: 10px; outline: none; background: #fff; color: var(--ops-text); }
.ops-form-grid textarea { min-height: 76px; resize: vertical; }
.ops-form-grid :is(input, select, textarea):focus { border-color: var(--ops-teal); box-shadow: 0 0 0 3px rgba(7,151,163,.1); }
.ops-form-grid :is(input, textarea)[readonly] { background: #f5f8fc; color: #52627c; cursor: default; }
.ops-reason-other small { color: var(--ops-muted); font-size: 10px; line-height: 1.4; }
.ops-field-guidance { margin-top: 10px; padding: 10px 12px; border: 1px solid #cfe7ea; border-radius: 10px; background: #f1fbfc; color: #31556a; font-size: 11px; line-height: 1.45; }
.ops-field-guidance strong { color: var(--ops-teal-dark); }
.ops-action-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.ops-action-row button { min-height: 42px; padding: 8px 11px; border: 1px solid var(--ops-line); border-radius: 10px; background: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.ops-action-row button[data-tone="primary"] { border-color: var(--ops-teal); color: #fff; background: var(--ops-teal); }
.ops-action-row button[data-tone="danger"] { border-color: rgba(232,83,63,.3); color: #b83d2d; background: var(--ops-coral-soft); }
.ops-list-stack { display: grid; gap: 7px; }
.ops-list-item { display: grid; gap: 5px; padding: 11px; border: 1px solid var(--ops-line); border-radius: 11px; background: #fff; }
.ops-list-item header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ops-list-item small { color: var(--ops-muted); line-height: 1.4; }
.ops-list-item-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ops-list-item-actions button { min-height: 38px; padding: 7px 10px; border: 1px solid var(--ops-line); border-radius: 9px; background: #fff; font-size: 10px; font-weight: 800; }
.ops-readiness-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ops-readiness-list li { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-radius: 10px; background: var(--ops-page); font-size: 11px; }
.ops-readiness-list li::before { content: "!"; display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 999px; color: #b83d2d; background: var(--ops-coral-soft); font-size: 10px; font-weight: 900; }
.ops-readiness-list li.is-ready::before { content: "✓"; color: var(--ops-green); background: var(--ops-green-soft); }

.ops-alerts-panel, .ops-insights-panel { min-height: 560px; }
.ops-bulk-bar { position: sticky; z-index: 4; top: 80px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 10px 0; padding: 10px; border: 1px solid rgba(7,151,163,.2); border-radius: 12px; background: var(--ops-teal-soft); }
.ops-bulk-bar strong { margin-right: auto; font-size: 12px; }
.ops-bulk-bar button { min-height: 38px; padding: 7px 10px; border: 1px solid var(--ops-line); border-radius: 9px; background: #fff; font-size: 10px; font-weight: 800; }
.ops-alert-list { display: grid; gap: 8px; }
.ops-alert-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 12px; border: 1px solid var(--ops-line); border-radius: 13px; background: #fff; }
.ops-alert-item[data-priority="critical"] { border-left: 4px solid var(--ops-coral); }
.ops-alert-item input { width: 18px; height: 18px; accent-color: var(--ops-teal); }
.ops-alert-item strong, .ops-alert-item small { display: block; }
.ops-alert-item small { margin-top: 4px; color: var(--ops-muted); font-size: 11px; line-height: 1.45; }
.ops-alert-item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.ops-alert-item-actions button { min-height: 38px; padding: 7px 9px; border: 1px solid var(--ops-line); border-radius: 9px; background: #fff; font-size: 10px; font-weight: 800; }
.ops-insights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ops-insight-card { min-width: 0; padding: 14px; border: 1px solid var(--ops-line); border-radius: 14px; background: #fff; }
.ops-insight-card h3 { margin: 0; font-size: 14px; }
.ops-insight-card > p { margin: 5px 0 10px; color: var(--ops-muted); font-size: 11px; }
.ops-insight-card .ops-list-item { background: var(--ops-page); }

.ops-panel-backdrop { position: fixed; z-index: 80; inset: 0; background: rgba(6,24,50,.42); backdrop-filter: blur(2px); }
.ops-action-sheet { position: fixed; z-index: 90; inset: auto 0 0 auto; width: min(460px, 100%); max-height: min(82vh, 760px); overflow-y: auto; padding: 16px; transform: translateY(105%); transition: transform .2s ease; border: 1px solid var(--ops-line); border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -18px 50px rgba(6,38,83,.2); }
.ops-action-sheet.is-open { transform: translateY(0); }
.ops-action-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ops-line); }
.ops-action-sheet > header h2 { margin: 0; font-size: 20px; }
.ops-action-sheet-content { padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); }
.ops-module-list { display: grid; gap: 8px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.ops-module-list button { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 70px; padding: 11px; border: 1px solid var(--ops-line); border-radius: 13px; background: #fff; text-align: left; }
.ops-module-list button > span { display: grid; grid-row: span 2; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--ops-teal-dark); background: var(--ops-teal-soft); font-weight: 900; }
.ops-module-list strong, .ops-module-list small { display: block; }
.ops-module-list small { color: var(--ops-muted); }
.ops-mobile-nav { display: none; }

@media (max-width: 1180px) {
  .ops-app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .ops-main { padding-inline: 18px; }
  .ops-split-workspace { grid-template-columns: minmax(380px, 1fr) minmax(390px, .9fr); }
  .ops-booking-card { grid-template-columns: auto minmax(0, 1fr) minmax(105px, .72fr) auto; }
  .ops-booking-card > :nth-child(3) { display: none; }
}

@media (max-width: 960px) {
  .ops-split-workspace { display: block; }
  .ops-booking-panel { position: fixed; z-index: 85; inset: 0 0 0 auto; width: min(560px, 100%); max-height: none; min-height: 100dvh; border-radius: 0; transform: translateX(105%); transition: transform .2s ease; }
  .ops-booking-panel.is-open { transform: translateX(0); }
  #operationsBookingWorkspace { height: 100dvh; min-height: 0; }
  .ops-detail-empty { display: none; }
  .ops-insights-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .ops-app-shell { display: block; min-height: 100dvh; }
  .ops-sidebar { display: none; }
  .ops-topbar { min-height: 68px; padding: 10px 12px; }
  .ops-topbar-title { min-width: 0; }
  .ops-topbar-title small { display: none; }
  .ops-topbar-title strong { font-size: 20px; }
  .ops-global-search { display: none; }
  .ops-live-pill { margin-left: auto; }
  .ops-main { padding: 10px 9px 20px; }
  .ops-page-heading, .ops-kpi-grid { display: none; }
  .ops-view-tabs { position: sticky; z-index: 20; top: 68px; margin: 0 0 9px; }
  .ops-view-tabs button { min-height: 44px; flex: 1 0 auto; padding-inline: 12px; }
  .ops-queue-panel, .ops-alerts-panel, .ops-insights-panel { padding: 12px; border-radius: 16px; }
  .ops-section-heading { align-items: flex-start; }
  .ops-queue-tools { margin-top: 11px; }
  .ops-filter-row { margin-top: 8px; }
  .ops-filter-row button { min-height: 42px; }
  .ops-advanced-filters { grid-template-columns: minmax(0, 1fr); }
  .ops-booking-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; padding: 12px; }
  .ops-booking-card > :nth-child(3) { display: block; grid-column: 2; }
  .ops-booking-card > :nth-child(4) { grid-column: 3; grid-row: 1; }
  .ops-review-button { grid-column: 2 / -1; width: 100%; }
  .ops-pager { justify-content: center; }
  .ops-booking-panel { width: 100%; }
  .ops-detail-header { padding: max(12px, env(safe-area-inset-top)) 12px 10px; }
  .ops-detail-header-actions .ops-text-link { display: none; }
  .ops-detail-tabs { padding-inline: 8px; }
  .ops-detail-tabs button { min-height: 48px; font-size: 11px; }
  .ops-detail-content { padding: 9px 12px 16px; }
  .ops-detail-sticky-actions { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .ops-form-grid { grid-template-columns: minmax(0, 1fr); }
  .ops-form-grid label.ops-span-2 { grid-column: auto; }
  .ops-form-grid :is(input, select, textarea) { min-height: 48px; font-size: 16px; }
  .ops-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-alert-item { grid-template-columns: auto minmax(0, 1fr); }
  .ops-alert-item-actions { grid-column: 2; justify-content: flex-start; }
  .ops-mobile-nav { position: fixed; z-index: 50; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ops-line); background: rgba(255,255,255,.98); box-shadow: 0 -10px 26px rgba(6,38,83,.08); }
  .ops-mobile-nav button { display: grid; place-items: center; gap: 2px; min-height: 54px; border: 0; border-radius: 13px; background: transparent; color: var(--ops-muted); }
  .ops-mobile-nav span { font-size: 18px; line-height: 1; }
  .ops-mobile-nav small { font-size: 10px; }
  .ops-mobile-nav .is-active { color: var(--ops-teal-dark); background: var(--ops-teal-soft); font-weight: 900; }
}

.ops-po-department-workspace {
  min-height: calc(100vh - 250px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--ops-line);
  border-radius: 18px;
  background: #f5f8fc;
}
.ops-po-department-heading { padding: 16px 18px; border-bottom: 1px solid var(--ops-line); background: #fff; }
.ops-po-department-workspace iframe { display: block; width: 100%; height: calc(100vh - 330px); min-height: 640px; border: 0; background: #f5f8fc; }
body[data-ops-view="purchase_orders"] .ops-kpi-grid { display: none; }
body[data-ops-view="purchase_orders"] .ops-page-heading { margin-bottom: 10px; }
body[data-ops-view="purchase_orders"] .ops-page-heading > div:first-child p:last-child { display: none; }

@media (max-width: 960px) {
  .ops-po-department-workspace { min-height: calc(100dvh - 170px); border-radius: 14px; }
  .ops-po-department-heading { padding: 12px; }
  .ops-po-department-heading .ops-status-pill { display: none; }
  .ops-po-department-workspace iframe { height: calc(100dvh - 245px); min-height: 520px; }
}

@media (max-width: 760px) {
  body[data-ops-view="purchase_orders"] .ops-page-heading { display: none; }
  body[data-ops-view="purchase_orders"] .ops-main { padding-inline: 6px; }
  .ops-po-department-workspace { min-height: calc(100dvh - 122px); border: 0; border-radius: 0; }
  .ops-po-department-heading { display: none; }
  .ops-po-department-workspace iframe { height: calc(100dvh - 122px); min-height: 0; }
}

@media (max-width: 760px) {
  body.ops-mobile-embed { padding-bottom: 0; }
  body.ops-mobile-embed .ops-topbar,
  body.ops-mobile-embed .ops-mobile-nav { display: none; }
  body.ops-mobile-embed .ops-view-tabs { top: 0; }
  body.ops-mobile-embed .ops-main { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .ops-main { padding-inline: 8px; }
  .ops-queue-panel, .ops-alerts-panel, .ops-insights-panel { padding: 10px; }
  .ops-queue-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .ops-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .ops-detail-sticky-actions { grid-template-columns: minmax(0, 1fr); }
  .ops-alert-item-actions button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ops-booking-panel, .ops-action-sheet { transition: none; }
}
