:root {
  --navy: #16324f;
  --teal: #0b8f87;
  --gold: #d8a84e;
  --navy-pale: #e8eef4;
  --teal-pale: #e7f5f4;
  --gold-pale: #f8efe0;
  --crimson: #8a1f1f;
  --crimson-pale: #f8d4d4;
  --paper: #f4f6f9;
  --ink: #1b2838;
  --muted: #5b6b7c;
  --line: #e4eaf0;
  --card: #ffffff;
  --sidebar: 72px;
  --sidebar-open: 240px;
  --topbar: 64px;
  --page-pad-x: 2.25rem;
  --shadow: 0 8px 24px rgba(22, 50, 79, 0.06);
  --radius: 8px;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
html, body { margin: 0; background: var(--paper); color: var(--ink); }
[dir="rtl"] {
  font-family: "IBM Plex Sans Arabic", "Segoe UI", "Trebuchet MS", sans-serif;
}
a { color: var(--teal); }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 40; background: #fff; padding: 0.4rem 0.7rem; }

body.is-app {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
}

.sidebar {
  width: var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 30;
  transition: width 0.18s ease 0.12s, box-shadow 0.18s ease;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sidebar:hover,
.sidebar:focus-within,
.sidebar.is-expanded,
body.sidebar-pinned .sidebar {
  width: var(--sidebar-open);
  box-shadow: 12px 0 28px rgba(22, 50, 79, 0.1);
  transition-delay: 0s;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0.85rem 0.35rem;
  text-decoration: none;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  min-height: 56px;
}
.sidebar-brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: center;
}
.sidebar-brand strong {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  font-weight: 800;
}
.sidebar-brand em {
  display: none;
  font-style: normal;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
}
.sidebar:hover .sidebar-brand,
.sidebar:focus-within .sidebar-brand,
.sidebar.is-expanded .sidebar-brand,
body.sidebar-pinned .sidebar-brand {
  justify-content: flex-start;
  padding: 1rem 1.1rem;
}
.sidebar:hover .sidebar-brand span,
.sidebar:focus-within .sidebar-brand span,
.sidebar.is-expanded .sidebar-brand span,
body.sidebar-pinned .sidebar-brand span {
  text-align: left;
}
.sidebar:hover .sidebar-brand strong,
.sidebar:focus-within .sidebar-brand strong,
.sidebar.is-expanded .sidebar-brand strong,
body.sidebar-pinned .sidebar-brand strong {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.sidebar:hover .sidebar-brand em,
.sidebar:focus-within .sidebar-brand em,
.sidebar.is-expanded .sidebar-brand em,
body.sidebar-pinned .sidebar-brand em {
  display: block;
}
.sidebar-nav {
  padding: 0.7rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sidebar:hover .sidebar-nav,
.sidebar:focus-within .sidebar-nav,
.sidebar.is-expanded .sidebar-nav,
body.sidebar-pinned .sidebar-nav {
  padding: 0.7rem 0.75rem 1rem;
  align-items: stretch;
}
.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0 0.7rem;
  border-top: 1px solid var(--line);
}
.sidebar:hover .sidebar-logout,
.sidebar:focus-within .sidebar-logout,
.sidebar.is-expanded .sidebar-logout,
body.sidebar-pinned .sidebar-logout {
  padding: 0.45rem 0.75rem 0.85rem;
}
.sidebar-group {
  width: 48px;
  margin: 0.12rem 0;
}
.sidebar:hover .sidebar-group,
.sidebar:focus-within .sidebar-group,
.sidebar.is-expanded .sidebar-group,
body.sidebar-pinned .sidebar-group {
  width: auto;
  margin-bottom: 0.15rem;
}
.sidebar-group-toggle,
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0.12rem 0;
  border: 0;
  background: transparent;
  border-radius: var(--radius);
  color: #4a5a6a;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
}
.sidebar:hover .sidebar-group-toggle,
.sidebar:focus-within .sidebar-group-toggle,
.sidebar.is-expanded .sidebar-group-toggle,
body.sidebar-pinned .sidebar-group-toggle,
.sidebar:hover .sidebar-link,
.sidebar:focus-within .sidebar-link,
.sidebar.is-expanded .sidebar-link,
body.sidebar-pinned .sidebar-link {
  width: 100%;
  height: auto;
  justify-content: flex-start;
  gap: 0.7rem;
  padding: 0.48rem 0.65rem;
  margin-bottom: 0.12rem;
  white-space: normal;
  line-height: 1.2;
}
.nav-ico {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: currentColor;
  overflow: visible;
}
.sidebar:hover .nav-ico,
.sidebar:focus-within .nav-ico,
.sidebar.is-expanded .nav-ico,
body.sidebar-pinned .nav-ico {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
.sidebar-group-toggle .chevron {
  display: none;
  margin-left: auto;
  fill: none;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}
.sidebar:hover .sidebar-group-toggle .chevron,
.sidebar:focus-within .sidebar-group-toggle .chevron,
.sidebar.is-expanded .sidebar-group-toggle .chevron,
body.sidebar-pinned .sidebar-group-toggle .chevron {
  display: block;
}
.sidebar-group.is-open .sidebar-group-toggle .chevron { transform: rotate(180deg); }
.sidebar-group-toggle span,
.sidebar-link span {
  display: none;
  overflow: hidden;
}
.sidebar:hover .sidebar-group-toggle span,
.sidebar:focus-within .sidebar-group-toggle span,
.sidebar.is-expanded .sidebar-group-toggle span,
body.sidebar-pinned .sidebar-group-toggle span,
.sidebar:hover .sidebar-link span,
.sidebar:focus-within .sidebar-link span,
.sidebar.is-expanded .sidebar-link span,
body.sidebar-pinned .sidebar-link span {
  display: inline;
}
.sidebar-group-toggle:hover,
.sidebar-link:hover { background: #f0f6f6; color: var(--navy); }
.sidebar-link.sidebar-logout-btn { color: var(--gold); }
.sidebar-link.sidebar-logout-btn:hover { background: #f8f1e3; color: var(--gold); }
.sidebar-group-toggle.is-current { color: var(--teal); }
body:not(.sidebar-pinned) .sidebar:not(:hover):not(:focus-within):not(.is-expanded) .sidebar-group-toggle.is-current,
.sidebar-link.is-active {
  background: var(--teal);
  color: #fff;
}
.sidebar-link.is-active { font-weight: 650; }
.sidebar-group-panel-inner {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.22s ease;
}
.sidebar:hover .sidebar-group.is-open .sidebar-group-panel-inner,
.sidebar:focus-within .sidebar-group.is-open .sidebar-group-panel-inner,
.sidebar.is-expanded .sidebar-group.is-open .sidebar-group-panel-inner,
body.sidebar-pinned .sidebar-group.is-open .sidebar-group-panel-inner {
  max-height: 400px;
}
.sidebar:hover .sidebar-group-panel .sidebar-link,
.sidebar:focus-within .sidebar-group-panel .sidebar-link,
.sidebar.is-expanded .sidebar-group-panel .sidebar-link,
body.sidebar-pinned .sidebar-group-panel .sidebar-link {
  padding-left: 1.85rem;
}
body:not(.sidebar-pinned) .sidebar:not(:hover):not(:focus-within):not(.is-expanded) .sidebar-group-panel {
  display: none;
}

.workspace {
  margin-left: var(--sidebar);
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.18s ease;
}
body.sidebar-pinned .workspace { margin-left: var(--sidebar-open); }
[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
  border-right: 0;
  border-left: 1px solid var(--line);
}
[dir="rtl"] .sidebar:hover,
[dir="rtl"] .sidebar:focus-within,
[dir="rtl"] .sidebar.is-expanded,
[dir="rtl"] body.sidebar-pinned .sidebar {
  box-shadow: -12px 0 28px rgba(22, 50, 79, 0.1);
}
[dir="rtl"] .workspace {
  margin-left: 0;
  margin-right: var(--sidebar);
  transition: margin-right 0.18s ease;
}
[dir="rtl"] body.sidebar-pinned .workspace { margin-right: var(--sidebar-open); }
[dir="rtl"] .user-chip {
  padding-left: 0;
  padding-right: 0.4rem;
  border-left: 0;
  border-right: 1px solid var(--line);
}
.topbar {
  height: var(--topbar);
  flex: 0 0 auto;
  margin-top: auto;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.25rem;
  min-width: 0;
  width: 100%;
  position: relative;
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.topbar-right { justify-content: flex-end; }
.topbar-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  display: flex;
  align-items: center;
  max-width: min(280px, 42%);
  min-width: 0;
}
.topbar-brand img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.workspace-main {
  padding: 1.1rem max(var(--page-pad-x), env(safe-area-inset-right, 0px)) 1.25rem max(var(--page-pad-x), env(safe-area-inset-left, 0px));
  max-width: none;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: #f4f7fa;
  border-radius: var(--radius);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  position: relative;
}
.icon-btn:hover { background: #e7eef3; }
.icon-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.05rem;
  text-align: center;
}
.lang-chip {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  background: #f4f7fa;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
}
.lang-menu { position: relative; }
.lang-panel {
  position: absolute;
  inset-inline-end: 0;
  bottom: calc(100% + 0.45rem);
  width: min(12.5rem, calc(100vw - 1.5rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 40;
  padding: 0.65rem 0.7rem 0.6rem;
}
.lang-panel-title {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.lang-list { list-style: none; margin: 0; padding: 0; }
.lang-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.lang-list a:hover { background: var(--teal-pale); }
.lang-list a.is-current {
  background: var(--navy-pale);
  color: var(--navy);
}
.lang-list a.is-current::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex: 0 0 auto;
}
.login-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1rem;
}
.login-langs a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}
.login-langs a:hover { color: var(--navy); background: #f4f7fa; }
.login-langs a.is-current {
  color: var(--navy);
  background: var(--navy-pale);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-left: 0.4rem;
  border-left: 1px solid var(--line);
}
.user-chip .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  flex-shrink: 0;
  overflow: hidden;
}
.user-chip .avatar svg {
  display: block;
  width: 36px;
  height: 36px;
}
.user-chip .avatar text {
  fill: #fff;
  font-size: 16px;
  font-weight: 700;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}
.user-chip > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.15; }
.user-chip strong { font-size: 0.82rem; color: var(--navy); }
.user-chip em { font-style: normal; font-size: 0.68rem; color: var(--muted); }
.text-btn {
  background: transparent;
  border: 0;
  color: var(--gold);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
}

.breadcrumbs {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  overflow-wrap: anywhere;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--teal); }
.breadcrumbs span:last-child { color: var(--navy); font-weight: 650; }

.page-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1, .card h2 { margin: 0.15rem 0 0; color: var(--navy); overflow-wrap: anywhere; }
.kicker { margin: 0; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.72rem; color: var(--teal); font-weight: 700; }
.page-head-actions, .action-row, .filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: end; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0.42rem 0.9rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-weight: 650;
  font: inherit;
  max-width: 100%;
  touch-action: manipulation;
}
.button-primary { background: var(--teal); color: #fff; }
.button-secondary { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.button-gold { background: var(--gold); color: var(--navy); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.15rem;
  box-shadow: var(--shadow);
  margin: 0 0 1rem;
  min-width: 0;
  max-width: 100%;
}
.card h2 { font-size: 1rem; margin-bottom: 0.85rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi-card {
  background: #fff;
  color: var(--navy);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem 1rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.kpi-card .kpi-title { color: var(--muted); font-size: 1.05rem; font-weight: 650; line-height: 1.25; }
.kpi-card .kpi-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.65rem; }
.kpi-card strong { font-size: 1.35rem; color: var(--navy); margin: 0.4rem 0 0; overflow-wrap: anywhere; }
.kpi-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal);
  background: #e7f5f4;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}
.kpi-bar {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #edf2f6;
  margin-top: auto;
  overflow: hidden;
}
.kpi-bar i {
  display: block;
  height: 100%;
  width: var(--fill, 70%);
  border-radius: inherit;
}
.kpi-bar.is-teal i { background: var(--teal); }
.kpi-bar.is-gold i { background: var(--gold); }
.kpi-bar.is-navy i { background: var(--navy); }

.board-grid > *, .queue-grid > * { min-width: 0; }
.board-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.board-grid > .is-wide { grid-column: 1 / -1; }
.queue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; align-items: stretch; }
.queue-grid .card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: visible;
}
.queue-grid .data-table a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.queue-grid .data-table a:hover { color: var(--teal); }
.queue-grid .card > .table-wrap {
  flex: 1 1 auto;
  max-height: min(16.5rem, 50dvh);
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: auto;
}
.queue-grid .card > .table-wrap:last-child {
  margin-bottom: 0;
  padding-bottom: 0.35rem;
}
.queue-grid .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}
.queue-grid .data-table tbody tr:last-child td { border-bottom: 0; }
[data-stock-rows] .is-stock-status { cursor: pointer; }
[data-stock-rows] .stock-status-link {
  display: flex;
  align-items: center;
  min-height: 1.35rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
[data-stock-rows] .stock-status-link:hover,
[data-stock-rows] .stock-status-link:focus-visible { color: var(--teal); }

.ops-board {
  --ops-navy: var(--navy);
  --ops-teal: var(--teal);
  --ops-gold: var(--gold);
  --ops-crimson: var(--crimson);
  --ops-radius: 12px;
}
.ops-board .ops-welcome { align-items: flex-end; }
.ops-board .ops-welcome .lead { margin: 0.4rem 0 0; max-width: 42rem; }
.ops-board .kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0.85rem;
}
.ops-board .card,
.ops-board .kpi-card {
  border: 1px solid var(--line);
  border-radius: var(--ops-radius);
  box-shadow: 0 5px 18px rgba(22, 50, 79, 0.04);
}
.ops-board .kpi-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  padding: 1rem 1.05rem 0.95rem;
}
.ops-board .kpi-card:hover { background: #fbfcfe; }
.ops-board .kpi-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.ops-step:hover,
.ops-bar-row:hover,
.ops-alert:hover { background: #f0f5f8; }
.ops-board .kpi-card .kpi-copy { min-width: 0; }
.ops-board .kpi-card .kpi-title { font-size: 0.82rem; font-weight: 650; }
.ops-board .kpi-card strong { font-size: 1.7rem; line-height: 1.1; margin-top: 0.45rem; overflow-wrap: normal; }
.ops-board .kpi-icon {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 10px;
  color: var(--navy);
  background: var(--navy-pale);
}
.ops-board .kpi-card.is-teal .kpi-icon { color: var(--teal); background: var(--teal-pale); }
.ops-board .kpi-card.is-gold .kpi-icon { color: #8a6408; background: var(--gold-pale); }
.ops-board .kpi-card.is-crimson .kpi-icon,
.ops-board .kpi-card[data-kpi="lowStock"] .kpi-icon { color: var(--crimson); background: var(--crimson-pale); }
.ops-board .kpi-icon svg { width: 1rem; height: 1rem; display: block; }
.ops-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.8fr);
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: stretch;
}
.ops-charts > .card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  min-width: 0;
  overflow: visible;
}
.ops-charts .ops-alert-list {
  flex: 1 1 auto;
  grid-auto-rows: 1fr;
  min-height: 0;
}
.ops-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.9rem; }
.ops-panel-head h2 { margin: 0; }
.ops-panel-sub { margin: 0.28rem 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.ops-work {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem;
  align-items: center;
}
.ops-donut-wrap { position: relative; flex: 0 0 auto; }
.ops-donut {
  position: relative;
  width: 8.25rem;
  height: 8.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  display: grid;
  place-items: center;
  appearance: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.ops-donut svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.ops-donut:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.ops-donut > span {
  width: 5.15rem;
  height: 5.15rem;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--navy);
  box-shadow: inset 0 0 0 1px rgba(22, 50, 79, 0.04);
  pointer-events: none;
}
.ops-donut strong { display: block; font-size: 1.2rem; line-height: 1.1; }
.ops-donut small { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.68rem; font-weight: 650; }
.ops-donut-menu {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: calc(100% + 0.7rem);
  min-width: 13.5rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(22, 50, 79, 0.14);
  transform: translateY(-50%);
}
.ops-donut-menu[hidden] { display: none; }
.ops-donut-slice {
  display: grid;
  grid-template-columns: 0.7rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
.ops-donut-slice:hover,
.ops-donut-slice.is-active { background: #f4f7fb; }
.ops-donut-slice i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 99px;
  background: var(--navy);
}
.ops-donut-slice.is-teal i { background: var(--teal); }
.ops-donut-slice.is-gold i { background: var(--gold); }
.ops-donut-slice.is-crimson i { background: var(--crimson); }
.ops-donut-slice span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-donut-slice strong { font-size: 0.9rem; color: var(--navy); }
.ops-pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.4rem, 1fr));
  gap: 0.45rem;
  width: 100%;
}
.ops-step {
  min-width: 0;
  padding: 0.7rem 0.7rem 0.65rem;
  border-radius: 10px;
  background: #f7fafc;
  text-decoration: none;
  color: inherit;
}
.ops-step:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.ops-step-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ops-step-value { margin-top: 0.35rem; font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.ops-step-bar {
  height: 4px;
  margin-top: 0.55rem;
  overflow: hidden;
  border-radius: 99px;
  background: #e9eef6;
}
.ops-step-bar span,
.ops-track span,
.ops-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--navy);
}
.ops-step.is-teal .ops-step-bar span,
.ops-bar-row.is-teal .ops-track span,
.ops-track.is-teal i { background: var(--teal); }
.ops-step.is-gold .ops-step-bar span,
.ops-bar-row.is-gold .ops-track span,
.ops-track.is-gold i { background: var(--gold); }
.ops-step.is-crimson .ops-step-bar span,
.ops-bar-row.is-crimson .ops-track span,
.ops-track.is-crimson i { background: var(--crimson); }
.ops-bars { display: grid; gap: 0.7rem; margin-top: 1rem; }
.ops-bar-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 9.5rem) minmax(0, 1fr) 3.4rem;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}
.ops-bar-row:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.ops-bar-label, .ops-bar-number { font-size: 0.75rem; color: var(--muted); }
.ops-bar-number { color: var(--navy); font-weight: 700; text-align: right; }
.ops-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1f6;
}
.ops-track i { width: var(--fill, 0%); }
.ops-alert-list { display: grid; gap: 0.55rem; }
.ops-alert {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: #f7fafc;
  text-decoration: none;
  color: inherit;
}
.ops-alert:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.ops-alert-icon {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  color: var(--navy);
  background: var(--navy-pale);
}
.ops-alert.is-teal .ops-alert-icon { color: var(--teal); background: var(--teal-pale); }
.ops-alert.is-gold .ops-alert-icon { color: #8a6408; background: var(--gold-pale); }
.ops-alert.is-crimson .ops-alert-icon { color: var(--crimson); background: var(--crimson-pale); }
.ops-alert-icon svg { width: 0.95rem; height: 0.95rem; display: block; }
.ops-alert-title { display: block; font-size: 0.82rem; font-weight: 700; color: var(--navy); }
.ops-alert-copy { display: block; margin-top: 0.12rem; color: var(--muted); font-size: 0.72rem; }
.ops-pill {
  min-width: 1.6rem;
  padding: 0.18rem 0.45rem;
  border-radius: 99px;
  color: var(--navy);
  background: var(--navy-pale);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}
.ops-alert.is-teal .ops-pill { color: var(--teal); background: var(--teal-pale); }
.ops-alert.is-gold .ops-pill { color: #8a6408; background: var(--gold-pale); }
.ops-alert.is-crimson .ops-pill { color: var(--crimson); background: var(--crimson-pale); }
.ops-stock-viz {
  display: flex;
  justify-content: center;
  margin: 0 0 0.85rem;
}
.ops-share {
  display: grid;
  grid-template-columns: minmax(2.4rem, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
}
.ops-board .queue-grid .card > .table-wrap:last-child {
  border-radius: 0 0 var(--ops-radius) var(--ops-radius);
}
.ops-today {
  min-height: 100%;
}
.ops-job-list {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  min-height: 0;
  max-height: min(16.5rem, 50dvh);
  overflow: auto;
}
.ops-job {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: #f7fafc;
  text-decoration: none;
  color: inherit;
}
.ops-job:hover { background: #f0f5f8; }
.ops-job:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.ops-job .ops-alert-icon { color: var(--teal); background: var(--teal-pale); }
.ops-job.is-gold .ops-alert-icon { color: #8a6408; background: var(--gold-pale); }
.ops-quiet {
  flex: 1 1 auto;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  min-height: 8.5rem;
  padding: 0.4rem 0.2rem 0.7rem;
  text-align: center;
}
.ops-quiet p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.ops-quiet a {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}
.ops-quiet a:hover { text-decoration: underline; }
.ops-pill.is-teal { color: var(--teal); background: var(--teal-pale); }
.ops-pill.is-gold { color: #8a6408; background: var(--gold-pale); }

.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.plain-list a { color: var(--navy); text-decoration: none; font-weight: 650; }
.plain-list a:hover { color: var(--teal); }

.table-wrap {
  overflow: auto;
  background: #fff;
  border-radius: var(--radius);
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}
.card > .table-wrap { margin: 0 -1.15rem; }
.card > .table-wrap:not(:last-child) { padding-bottom: 0.45rem; }
.card > .table-wrap:last-child {
  margin-bottom: -1.15rem;
  border-radius: 0 0 var(--radius) var(--radius);
}
.card > .table-wrap + .stack-form { margin-top: 1rem; }
.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th, .data-table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
.data-table .cell-wrap { white-space: normal; }
.data-table thead th { color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.data-table tbody tr:nth-child(odd) { background: rgba(11, 143, 135, 0.08); }
.data-table tbody tr:nth-child(even) { background: #fff; }
.data-table tbody tr:hover { background: rgba(11, 143, 135, 0.16); }
.data-table tbody td:first-child { font-weight: 700; color: var(--navy); }
.sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.sort-link::after {
  content: "↕";
  font-size: 0.68rem;
  opacity: 0.35;
}
th[aria-sort="ascending"] .sort-link::after { content: "▲"; opacity: 1; color: var(--teal); }
th[aria-sort="descending"] .sort-link::after { content: "▼"; opacity: 1; color: var(--teal); }
.sort-link.is-sorted { color: var(--navy); }

.chip { display: inline-block; border-radius: 999px; padding: 0.12rem 0.55rem; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.is-kind-reorder { background: #f8e7c4; color: #7a5a12; }
.is-kind-installation { background: #d9f3f1; color: #086963; }
.is-kind-new-sale { background: #e8eef4; color: var(--navy); }
.is-kind-production { background: #d8f3d6; color: #216c2a; }
.is-status-draft, .is-status-planned, .is-status-pending, .is-status-not-invoiced,
.is-status-waiting-for-customer-approach, .is-status-replacement, .is-status-uae-border, .is-status-saudi-border, .is-status-yemen-border, .is-status-multimodal { background: #e8eef4; color: var(--navy); }
.is-status-customer-approved, .is-status-scheduled, .is-status-ready-to-schedule, .is-status-ready-for-installation,
.is-status-stock-replenishment, .is-status-safety-stock, .is-status-sohar-port, .is-status-sea { background: #d9f3f1; color: #086963; }
.is-status-in-production, .is-status-in-progress, .is-status-installation-scheduled,
.is-status-customer-order, .is-status-project, .is-status-muscat-port, .is-status-road { background: #f8e7c4; color: #7a5a12; }
.is-status-completed, .is-status-paid, .is-status-received, .is-status-active, .is-status-passed, .is-status-released,
.is-status-new-product, .is-status-salalah-port, .is-status-air { background: #d8f3d6; color: #216c2a; }
.is-status-going-leave-soon { background: #f8e7c4; color: #7a5a12; }
.is-status-on-leave { background: #d9f3f1; color: #086963; }
.is-status-on-hold, .is-status-quality-hold, .is-status-partially-paid, .is-status-reorder,
.is-status-suggest-to-reorder, .is-status-production-shortage, .is-status-duqm-port, .is-status-rail { background: #fde8c8; color: #8a4b00; }
.is-status-cancelled, .is-status-critical, .is-status-critically-order, .is-status-absent { background: #f8d4d4; color: #8a1f1f; }
.is-status-none { background: #e8eef4; color: var(--navy); }
.is-status-inactive { background: #f8d4d4; color: #8a1f1f; }
.is-qty-negative { background: #f8d4d4; color: #8a1f1f; }
.is-status-confirmed, .is-status-custom-cleared { background: #d9f3f1; color: #086963; }
.is-status-in-transit { background: #f8e7c4; color: #7a5a12; }

.stack-form { display: grid; gap: 0.75rem; max-width: min(640px, 100%); width: 100%; }
.stack-form label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0.7rem;
  font-weight: 650;
  color: var(--navy);
  line-height: 1.35;
}
.stack-form label > span { display: block; }
.stack-form label > span.money-input.has-rate {
  grid-template-columns: minmax(0, 1fr) 6.25rem 5.5rem;
}
.stack-form label > span.money-input.has-rate:has([data-payment-rate][hidden]) {
  grid-template-columns: minmax(0, 1fr) 6.75rem;
}
.money-input.has-rate {
  grid-template-columns: minmax(0, 1fr) 6.25rem 5.5rem;
}
.money-input.has-rate:has([data-payment-rate][hidden]) {
  grid-template-columns: minmax(0, 1fr) 6.75rem;
}
.stack-form input, .stack-form select, .stack-form textarea, .filter-bar input, .filter-bar select {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  max-width: 100%;
  min-width: 0;
}
.search-select {
  position: relative;
  min-width: 0;
}
.search-select.is-open { z-index: 8; }
.search-select select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.search-select input {
  width: 100%;
  padding-right: 2.15rem;
}
.search-select-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 2.15rem;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.search-select-toggle::after {
  content: "";
  display: block;
  width: 0.48rem;
  height: 0.48rem;
  margin: 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 0.15s ease;
}
.search-select.is-open .search-select-toggle::after {
  transform: translateY(0.14rem) rotate(225deg);
}
.search-select input:disabled + .search-select-list + .search-select-toggle,
.search-select:has(input:disabled) .search-select-toggle {
  cursor: default;
  opacity: 0.45;
  pointer-events: none;
}
.stack-form .search-select input:disabled {
  background: #f3f5f7;
  color: var(--navy);
  cursor: default;
}
.order-line-row .search-select,
.order-line-row.is-purchase .search-select {
  width: 100%;
  min-width: 0;
}
.search-select-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.2rem);
  margin: 0;
  padding: 0.3rem 0;
  max-height: min(16rem, 45dvh);
  overflow: auto;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 9;
}
.search-select-list li {
  padding: 0.45rem 0.7rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.search-select-list li[role="option"]:hover,
.search-select-list li.is-active {
  background: rgba(11, 143, 135, 0.12);
  color: var(--navy);
}
.search-select-list li.search-select-empty {
  color: var(--muted);
  cursor: default;
  font-weight: 500;
}
.filter-bar { background: #fff; padding: 0.85rem 1rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; }
.filter-bar label { display: grid; gap: 0.28rem; font-size: 0.78rem; font-weight: 650; color: var(--navy); }
.filter-bar-actions { display: flex; gap: 0.45rem; align-items: end; padding-bottom: 0.05rem; }
.filters {
  display: grid;
  gap: 0.85rem;
  margin: 0.25rem 0 0;
}
.filters label {
  display: grid;
  gap: 0.35rem;
  font-weight: 650;
  color: var(--navy);
  font-size: 0.82rem;
}
.filters label[hidden] { display: none; }
.filters-inline {
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  align-items: end;
}
.filters label.filters-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.45rem;
}
.filters-check input { width: 1.05rem; height: 1.05rem; }
.filters input[type="date"] {
  min-height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.35rem 0.6rem;
  font: inherit;
  color: var(--navy);
}
.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 0.85rem;
  margin: 0 0 0.85rem;
}
.list-search { flex: 1 1 16rem; min-width: 12rem; margin: 0; }
.list-search-field { display: grid; gap: 0.35rem; margin: 0; font-weight: 650; color: var(--navy); }
.list-search-title { margin: 0; font-size: 0.78rem; }
.list-search input[type="search"] {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}
.column-picker {
  position: relative;
  flex: 0 0 11.5rem;
  width: 11.5rem;
  max-width: 100%;
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0 auto;
}
.column-picker-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--navy);
}
.column-picker-trigger {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.6rem;
  padding: 0.55rem 2rem 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 650;
  text-align: start;
  cursor: pointer;
}
.column-picker-trigger::after {
  content: "";
  position: absolute;
  inset-inline-end: 0.75rem;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  border-inline-end: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
}
.column-picker-trigger[aria-expanded="true"] {
  border-color: var(--teal);
  outline: 2px solid rgba(11, 143, 135, 0.28);
}
.column-picker-trigger[aria-expanded="true"]::after {
  transform: translateY(-20%) rotate(225deg);
}
.column-picker-menu {
  position: absolute;
  z-index: 12;
  top: calc(100% + 0.35rem);
  inset-inline-end: 0;
  width: min(20rem, 90vw);
  padding: 0.6rem 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.column-picker-menu-head {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}
.column-picker-menu-head .button {
  min-height: 2rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.8rem;
}
.column-picker-list {
  display: grid;
  gap: 0.1rem;
  max-height: 18rem;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.column-option {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
}
.column-option label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  margin: 0;
  font-weight: 650;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--navy);
}
.column-option input {
  width: auto;
  margin: 0;
  accent-color: var(--teal);
  cursor: pointer;
}
.column-option:hover,
.column-option:has(input:checked) {
  background: rgba(11, 143, 135, 0.08);
}
.column-picker-hint {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}
.data-table th[hidden],
.data-table td[hidden] {
  display: none;
}
.search-builder-wrap { margin: 0 0 0.85rem; }
.search-builder-wrap .filters.search-builder { margin-bottom: 0; }
.filters.search-builder {
  display: grid;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.search-builder:not(.has-conditions) {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.search-builder:not(.has-conditions) .search-builder-group { flex: 1; }
.search-builder:not(.has-conditions) .search-builder-head { display: none; }
.search-builder-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.search-builder-clear { min-height: 2.1rem; padding: 0.25rem 0.75rem; font-size: 0.85rem; }
.search-builder-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-items: stretch;
}
.search-builder.has-conditions .search-builder-group { grid-template-columns: 2.6rem 1fr; }
.search-builder-join {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.15rem;
  border-radius: 8px;
  background: var(--line);
  color: var(--navy);
}
.search-builder.has-conditions .search-builder-join { display: flex; }
.search-builder-join-toggle {
  flex: 1;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.35rem 0;
}
.search-builder-join-toggle span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.08em;
  display: inline-block;
}
.search-builder-main { display: grid; gap: 0.4rem; min-width: 0; }
.search-builder-main [data-condition-rows]:empty { display: none; }
.search-builder-row {
  display: grid;
  grid-template-columns: minmax(9rem, 1.1fr) minmax(8rem, 0.8fr) minmax(8rem, 1.3fr) 2.1rem;
  gap: 0.45rem;
  align-items: center;
}
.search-builder-row.has-between {
  grid-template-columns: minmax(8rem, 1fr) minmax(7rem, 0.7fr) minmax(7rem, 1fr) minmax(7rem, 1fr) 2.1rem;
}
.search-value-to { display: none; }
.search-builder-row.has-between .search-value-to { display: block; }
.search-builder-row select,
.search-builder-row input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}
.search-field { border-color: #c45c5c; }
.search-op { border-color: #2f9d6a; }
.search-value { border-color: #3478c9; }
.search-builder-add {
  justify-self: start;
  min-height: 2.1rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
}
.search-builder-icon {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
}
@media (max-width: 720px) {
  .search-builder.has-conditions .search-builder-group { grid-template-columns: 1fr; }
  .search-builder-join {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.4rem 0.65rem;
  }
  .search-builder-join-toggle span {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .search-builder-row,
  .search-builder-row.has-between { grid-template-columns: 1fr; }
}
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0.8rem; }
.kv dt { color: var(--muted); font-size: 0.78rem; }
.kv dd { margin: 0.15rem 0 0; font-weight: 650; }
.rail { display: flex; gap: 0.4rem; list-style: none; padding: 0; overflow: auto; margin: 0 0 1rem; }
.rail li { padding: 0.35rem 0.7rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); font-size: 0.78rem; }
.rail li.is-current { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 800; }
.rail-note { margin: -0.55rem 0 1rem; color: var(--muted); font-size: 0.85rem; }
.order-path-scan { margin: 0 0 0.4rem; }
.order-path-scan .rail { margin-bottom: 0.45rem; }
.order-path-scan .rail-note { margin: 0; }
.order-lines { display: grid; gap: 0.7rem; margin: 0 0 1rem; }
.order-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem auto;
  gap: 0.55rem 0.7rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.order-line-row [data-remove-line] { justify-self: start; }
.order-line-hint {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.82rem;
}
.path-line-notes {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.path-line-notes:empty { display: none; }
@media (max-width: 720px) {
  .order-line-row { grid-template-columns: 1fr; }
}
.order-line-row.is-purchase {
  grid-template-columns: minmax(8rem, 1fr) minmax(8.5rem, 1fr) auto;
  align-items: end;
  gap: 0.8rem 1rem;
  padding: 1rem;
}
.order-line-row.is-purchase .purchase-line-item,
.order-line-row.is-purchase .purchase-line-supplier {
  grid-column: 1 / -1;
}
.order-line-row.is-purchase [data-remove-purchase-line] {
  justify-self: start;
}
.order-line-row.is-purchase input[readonly],
.stack-form input[readonly],
.stack-form select:disabled {
  background: #f3f5f7;
  color: var(--navy);
  cursor: default;
  opacity: 1;
}
.money-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.75rem;
  gap: 0.45rem;
  min-width: 0;
}
.stack-form .money-input input,
.stack-form .money-input select {
  min-width: 0;
}
.choice-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.choice-group legend {
  padding: 0;
  font-weight: 650;
  color: var(--navy);
}
.choice-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.7rem;
}
.stack-form .choice-pill {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 0;
  font-weight: 700;
  cursor: pointer;
}
.stack-form .choice-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  padding: 0;
  border: 0;
  appearance: none;
}
.stack-form .choice-pill span.chip {
  cursor: pointer;
  border: 0;
}
.stack-form .choice-pill input:not(:checked) + span.chip {
  background: #e8eef4;
  color: var(--navy);
}
.stack-form .choice-pill:hover span.chip {
  filter: brightness(0.97);
}
.stack-form .choice-pill input:focus-visible + span.chip {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.stack-form .choice-pill input:checked + span.chip {
  filter: none;
}
.kv.is-locked dd {
  font-weight: 600;
}
.form-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: form-step;
  display: grid;
  gap: 0.35rem;
}
.form-steps li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  counter-increment: form-step;
}
.form-step-label,
.card h2.form-step-label {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}
.form-step-label::before {
  content: counter(form-step) ". ";
  color: var(--teal);
}
.form-step-result {
  margin: 0;
}
.signature-field {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
}
.signature-pad {
  width: 100%;
  max-width: 560px;
  height: 180px;
  touch-action: none;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 6px;
  cursor: crosshair;
}
.signature-image {
  max-width: 560px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
@media (max-width: 720px) {
  .order-line-row.is-purchase { grid-template-columns: 1fr; }
  .form-steps li { grid-template-columns: 1fr; }
}
.notice { padding: 0.7rem 0.9rem; border-radius: var(--radius); }
.notice-error { background: #f8d4d4; color: #8a1f1f; }
.empty, .muted, .lead { color: var(--muted); }
.list-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.1rem;
  flex-wrap: wrap;
  margin: 0.85rem 0 0;
}
.list-pager-info { margin: 0; color: var(--muted); font-size: 0.85rem; }
.pager, .list-pager-pages { display: flex; align-items: center; gap: 0.2rem; flex-wrap: wrap; }
.list-pager-pages a,
.list-pager-pages span {
  min-width: 2rem;
  padding: 0.28rem 0.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--navy);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 650;
}
.list-pager-pages a:hover { background: #e8eef4; }
.list-pager-pages .is-current {
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}
.list-pager-pages .is-disabled,
.list-pager-ellipsis { color: var(--muted); font-weight: 500; }
.list-pager-pages button {
  min-width: 2rem;
  padding: 0.28rem 0.5rem;
  text-align: center;
  color: var(--navy);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}
.list-pager-pages button:hover { background: #e8eef4; }
.list-pager-pages button.is-current {
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}
.list-pager-pages button:disabled,
.list-pager-pages button.is-disabled {
  color: var(--muted);
  cursor: default;
  background: transparent;
}
.report-table-scroll {
  height: 16.5rem;
  max-height: 16.5rem;
  overflow: auto;
  overscroll-behavior: contain;
}
.report-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.report-table [data-report-row][hidden] { display: none !important; }
.report-pager[hidden] { display: none !important; }
.reports-page {
  display: grid;
  gap: 1rem;
}
.reports-page > .card,
.reports-page > .kpi-grid,
.reports-page > .ops-charts,
.reports-page > .queue-grid,
.reports-page > .report-window {
  margin: 0;
}
.reports-page .ops-charts,
.reports-page .queue-grid { margin-bottom: 0; }
.reports-page .kpi-grid {
  margin-bottom: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ops-board.reports-page .kpi-card strong { font-size: 1.28rem; overflow-wrap: normal; }
.ops-report-filters .filters { margin-top: 0.1rem; }
.reports-page .report-window {
  --report-text: #102a4c;
  --report-muted: #6f7f91;
  --report-border: #e1e7ef;
  --report-blue: #2167e8;
  --report-blue-soft: #edf3ff;
  --report-red: #c64352;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--report-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(29, 53, 84, 0.09);
  color: var(--report-text);
}
.reports-page .ops-charts > .report-window,
.reports-page .queue-grid > .report-window {
  min-height: 100%;
}
.reports-page .report-window-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px 14px;
}
.reports-page .report-window-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.reports-page .report-window h2 {
  margin: 0;
  color: var(--report-text);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}
.reports-page .report-window-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 23px;
  padding: 0 8px;
  border-radius: 99px;
  color: var(--report-blue);
  background: var(--report-blue-soft);
  font-size: 11px;
  font-weight: 500;
}
.reports-page .report-window-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  color: var(--report-blue);
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.reports-page .report-window-all:hover,
.reports-page .report-window-all:focus-visible {
  background: var(--report-blue-soft);
}
.reports-page .report-window-all svg {
  width: 14px;
  height: 14px;
  display: block;
}
.reports-page .report-table {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.reports-page .report-window .table-wrap {
  overflow-x: auto;
}
.reports-page .report-window .report-table-scroll {
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  min-height: 0;
  margin: 0;
}
.reports-page .report-window table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.reports-page .report-window th,
.reports-page .report-window td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--report-border);
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
}
.reports-page .report-window th {
  padding-block: 10px;
  border-top: 1px solid var(--report-border);
  color: var(--report-muted);
  background: #f8fafc;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.reports-page .report-window td {
  height: 54px;
  color: var(--report-text);
  font-size: 12px;
}
.reports-page .report-window tbody tr:last-child td { border-bottom: 0; }
.reports-page .report-window tbody tr:hover,
.reports-page .report-window tbody tr.is-alt { background: #fafcff; }
.reports-page .report-window .text-end {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.reports-page .report-id {
  color: var(--report-blue);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.reports-page .report-id:hover,
.reports-page .report-id:focus-visible { text-decoration: underline; }
.reports-page .report-line {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
.reports-page .report-age {
  color: var(--report-muted);
  white-space: nowrap;
}
.reports-page .report-age.is-overdue {
  color: var(--report-red);
  font-weight: 500;
}
.reports-page .report-window-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  min-height: 0;
  padding: 11px 18px 13px;
  border-top: 1px solid var(--report-border);
  color: var(--report-muted);
  font-size: 11px;
}
.reports-page .report-window-info {
  margin: 0;
}
.reports-page .report-window-meta {
  margin-left: auto;
}
.reports-page .report-window-footer strong {
  color: var(--report-text);
  font-weight: 500;
}
.reports-page .report-window-footer .list-pager-pages {
  margin-left: auto;
}
.reports-page .report-window-footer .list-pager-pages[hidden] {
  display: none;
}
.reports-page .report-window-footer .list-pager-pages button {
  min-width: 1.7rem;
  min-height: 1.7rem;
  border-radius: 8px;
  font-size: 11px;
}
.reports-page .report-window-footer .list-pager-pages button.is-current {
  background: var(--report-blue);
}
.reports-page .report-window .ops-quiet {
  padding: 18px;
}
.report-queue,
.report-boards {
  display: grid;
  gap: 0.65rem;
  align-items: stretch;
}
.report-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-boards > .card.is-wide { grid-column: 1 / -1; }
.report-queue .report-table,
.report-boards .report-table {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.report-queue > .card,
.report-boards > .card {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.report-table .data-table {
  width: 100%;
  table-layout: fixed;
}
.report-table .data-table th,
.report-table .data-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-columns {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 400 / 112;
  max-height: 8.5rem;
  margin: 0 0 0.45rem;
  overflow: visible;
}
.status-columns-axis {
  stroke: var(--line);
  stroke-width: 1;
}
.status-columns-bar {
  fill: var(--teal);
}
.status-columns-item:hover .status-columns-bar,
.status-columns-item:focus-visible .status-columns-bar {
  fill: var(--navy);
}
.status-columns-val {
  fill: var(--navy);
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}
.status-mix {
  margin-bottom: 0;
}
.status-mix .data-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}
.status-mix th:nth-child(2),
.status-mix td:nth-child(2) { width: 44%; }
.status-mix th:nth-child(3),
.status-mix td:nth-child(3) { width: 4.4rem; text-align: right; }
.status-mix .chip { white-space: normal; max-width: 11rem; }
.status-bar-cell {
  display: grid;
  grid-template-columns: minmax(2.5rem, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}
.status-bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #edf2f6;
  overflow: hidden;
}
.status-bar i {
  display: block;
  height: 100%;
  width: var(--fill, 0%);
  background: var(--teal);
  border-radius: inherit;
}
.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.master-cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  position: sticky;
  top: 0.35rem;
  z-index: 3;
  background: var(--paper);
  padding: 0.15rem 0 0.55rem;
  margin: 0 0 0.2rem;
}
.master-cat-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
}
.master-cat-nav a:hover { border-color: var(--teal); color: var(--teal); }
.master-data-page { display: grid; gap: 1.05rem; }
.master-cat, .master-table { scroll-margin-top: 4.25rem; }
.master-cat:target,
.master-table:target { outline: 2px solid rgba(11, 143, 135, 0.45); outline-offset: 3px; border-radius: var(--radius); }
.master-data-page .master-cat { margin: 0; }
.master-data-page .master-cat > h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  color: var(--navy);
}
.master-boards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: stretch;
}
.master-table {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.master-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.master-table-head h3 { margin: 0; font-size: 0.98rem; color: var(--navy); }
.master-table-head .muted { margin: 0.15rem 0 0; font-size: 0.8rem; }
.master-table .table-wrap { flex: 1; min-width: 0; }

body.is-login { display: block; background: var(--navy); }
body.is-login main { max-width: none; padding: 0; }
.login-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(11,143,135,0.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(216,168,78,0.22), transparent 42%),
    var(--navy);
}
.sidebar-backdrop {
  display: none;
}
.login-card { width: min(420px, 92vw); background: #fff; border-radius: 12px; padding: 1.6rem; box-shadow: var(--shadow); max-width: 100%; }
.login-card .remember-me {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f8fb;
  cursor: pointer;
  font-weight: 650;
  user-select: none;
}
.login-card .remember-me:hover {
  border-color: var(--teal);
}
.login-card .remember-me:has(input:focus-visible) {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.login-card .remember-me:has(input:checked) {
  background: rgba(11, 143, 135, 0.12);
  border-color: var(--teal);
}
.login-card .remember-me input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  padding: 0;
  flex: none;
  border: none;
  box-shadow: none;
  accent-color: var(--teal);
}
.login-brand { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; }
.login-brand img {
  width: auto;
  height: 56px;
  max-width: 170px;
  object-fit: contain;
}
.login-brand h1 { margin: 0.15rem 0 0; }

.app-alert {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(560px, calc(100vw - 2rem));
  color: var(--ink);
}
.app-alert::backdrop {
  background: rgba(22, 50, 79, 0.46);
}
.app-alert-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.15rem;
  box-shadow: 0 18px 40px rgba(22, 50, 79, 0.18);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: min(80vh, 640px);
}
.app-alert-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}
.app-alert-card p { margin: 0; line-height: 1.45; }
.app-alert-table { max-height: 240px; overflow: auto; }
.app-alert-card > .button { align-self: flex-end; margin-top: 0.2rem; }

@media (max-width: 1200px) {
  .kpi-grid, .board-grid, .queue-grid, .report-queue, .report-boards, .master-boards, .ops-charts { grid-template-columns: 1fr 1fr; }
  .ops-board .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  .ops-board.reports-page .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .report-boards > .card.is-wide { grid-column: 1 / -1; }
  .report-queue > .card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  body.sidebar-open {
    overflow: hidden;
  }
  .workspace { margin-left: 0; }
  [dir="rtl"] .workspace { margin-right: 0; }
  .topbar {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 32;
    margin-top: 0;
    height: auto;
    min-height: var(--topbar);
    border-top: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.35rem max(0.85rem, env(safe-area-inset-right)) 0.35rem max(0.85rem, env(safe-area-inset-left));
  }
  .workspace-main {
    --page-pad-x: 1.15rem;
    padding: 0.85rem max(var(--page-pad-x), env(safe-area-inset-right, 0px)) max(1.15rem, env(safe-area-inset-bottom, 0px)) max(var(--page-pad-x), env(safe-area-inset-left, 0px));
  }
  .sidebar-toggle {
    width: 44px;
    height: 44px;
  }
  .topbar-brand { max-width: min(180px, 38%); }
  .topbar-brand img { height: 36px; }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    top: var(--topbar);
    z-index: 25;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(22, 50, 79, 0.42);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .sidebar-backdrop[hidden] { display: none !important; }
  body.sidebar-open .sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    width: min(var(--sidebar-open), 86vw);
    max-width: 280px;
    top: var(--topbar);
    height: calc(100vh - var(--topbar));
    height: calc(100dvh - var(--topbar));
    transform: translateX(-110%);
    transition: transform 0.2s ease;
    box-shadow: none;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar:hover,
  .sidebar:focus-within,
  .sidebar.is-expanded,
  body.sidebar-pinned .sidebar {
    width: min(var(--sidebar-open), 86vw);
    max-width: 280px;
    box-shadow: none;
  }
  body.sidebar-open .sidebar {
    transform: none;
    box-shadow: 12px 0 28px rgba(22, 50, 79, 0.16);
  }
  body.sidebar-open .sidebar .sidebar-group-panel {
    display: block;
  }
  .sidebar-brand,
  .sidebar:hover .sidebar-brand,
  .sidebar.is-expanded .sidebar-brand,
  body.sidebar-pinned .sidebar-brand {
    justify-content: flex-start;
    padding: 1rem 1.1rem;
  }
  .sidebar-brand span { text-align: left; }
  .sidebar-brand strong { font-size: 0.95rem; letter-spacing: 0.04em; }
  .sidebar-brand em { display: block; }
  .sidebar-nav,
  .sidebar:hover .sidebar-nav {
    padding: 0.7rem 0.75rem 1rem;
    align-items: stretch;
  }
  .sidebar-logout,
  .sidebar:hover .sidebar-logout {
    padding: 0.45rem 0.75rem max(0.85rem, env(safe-area-inset-bottom));
  }
  .sidebar-nav {
    -webkit-overflow-scrolling: touch;
  }
  .sidebar-group { width: auto; }
  .sidebar-group-toggle span,
  .sidebar-link span {
    display: inline;
  }
  .sidebar-group-toggle,
  .sidebar-link {
    width: 100%;
    height: auto;
    min-height: 44px;
    justify-content: flex-start;
    gap: 0.7rem;
    padding: 0.48rem 0.65rem;
  }
  .nav-ico {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }
  .sidebar-group-toggle .chevron { display: block; }
  .sidebar-group.is-open .sidebar-group-panel-inner { max-height: 400px; }
  .sidebar-group-panel .sidebar-link { padding-left: 1.85rem; }
  .kpi-grid, .board-grid, .queue-grid, .report-queue, .report-boards, .master-boards, .ops-charts { grid-template-columns: 1fr; }
  .ops-board .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-work { grid-template-columns: 1fr; justify-items: center; }
  .ops-donut-menu {
    left: 50%;
    top: calc(100% + 0.65rem);
    transform: translate(-50%, 0);
  }
  .ops-pipeline { width: 100%; }
  .ops-board.reports-page .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-chip > span:not(.avatar) { display: none; }
  .breadcrumbs { justify-content: flex-start; }
  .page-head { align-items: stretch; }
  .page-head-actions, .action-row, .filter-bar-actions {
    width: 100%;
  }
  .page-head-actions .button,
  .filter-bar-actions .button {
    flex: 1 1 auto;
  }
  .action-row > * { flex: 1 1 8rem; min-width: 0; }
  .action-row .button { width: 100%; }
  .list-search { min-width: 0; flex-basis: 100%; }
  .column-picker { flex-basis: 100%; width: 100%; margin-left: 0; }
  .master-cat-nav { top: calc(var(--topbar) - 0.15rem); }
  .master-cat, .master-table { scroll-margin-top: calc(var(--topbar) + 3.2rem); }
  .report-table .data-table {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
  }
  .reports-page .report-window table {
    table-layout: auto;
    width: 100%;
    min-width: 32rem;
  }
  .reports-page .hide-mobile { display: none; }
  .reports-page .report-window-head { padding: 14px; }
  .reports-page .report-window h2 { font-size: 14px; }
  .reports-page .report-window th,
  .reports-page .report-window td { padding-left: 10px; padding-right: 10px; }
  .reports-page .report-window-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .signature-pad,
  .signature-image { max-width: 100%; height: auto; }
  .login-card { width: min(420px, calc(100vw - 1.5rem)); padding: 1.25rem; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .kpi-grid,
  .reports-page .kpi-grid,
  .board-grid,
  .queue-grid { grid-template-columns: 1fr 1fr; }
  .ops-board.reports-page .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-board .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-charts { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .page-head { flex-direction: column; align-items: stretch; }
  .stack-form label > span.money-input.has-rate,
  .stack-form label > span.money-input.has-rate:has([data-payment-rate][hidden]),
  .money-input,
  .money-input.has-rate,
  .money-input.has-rate:has([data-payment-rate][hidden]) {
    grid-template-columns: 1fr;
  }
  .list-pager { justify-content: center; }
  .list-pager-pages { justify-content: center; }
  input, select, textarea, .list-search input[type="search"] {
    font-size: 16px;
  }
}
@media (max-width: 480px) {
  .reports-page .kpi-grid,
  .kpi-grid { grid-template-columns: 1fr; }
  .ops-board.reports-page .kpi-grid { grid-template-columns: 1fr 1fr; }
  .ops-board .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-card { min-height: 0; }
  .kpi-card .kpi-title { font-size: 1rem; }
  .kpi-card strong { font-size: 1.25rem; }
  .ops-board .kpi-card strong { font-size: 1.4rem; }
  .ops-bar-row { grid-template-columns: 1fr auto; }
  .ops-bar-row .ops-track { grid-column: 1 / -1; }
  .topbar-right { gap: 0.35rem; }
  .topbar-brand { max-width: min(140px, 34%); }
  .topbar-brand img { height: 28px; }
  .lang-chip { display: none; }
  .user-chip { padding-left: 0.2rem; }
  .card { padding: 0.85rem 0.8rem 0.95rem; }
}

