/* Operations console: clear fleet context, dense records and direct slot work.
   Loaded last so established feature styles and their DOM hooks remain intact. */
:root {
  --bg: #f3f5f8;
  --muted: #53617a;
  --line: #dce2ea;
  --ok: #16754d;
  --ops-nav-width: 224px;
  --shadow: 0 2px 8px rgba(13, 27, 61, .035);
  font-size: 14px;
}

.visually-hidden, .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid #d97600;
  outline-offset: 3px;
}
button:disabled { cursor: not-allowed; }
.sidebar {
  width: var(--ops-nav-width);
  padding: 22px 12px 12px;
}
.brand { gap: 10px; padding: 0 10px 22px; }
.brand strong { font-size: 16px; letter-spacing: -.025em; }
.brand small { color: #a7b5ce; }
.brand-mark {
  width: 36px;
  height: 40px;
  border-radius: 9px;
  background: var(--accent);
  box-shadow: none;
}
#desktop-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #53617a transparent;
}
.nav-group { margin: 0 0 20px; }
.nav-label {
  padding: 0 12px 5px;
  color: #9aaccb;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 600;
}
.nav-item {
  min-height: 39px;
  padding: 8px 12px;
  margin: 1px 0;
  border-radius: 7px;
  font-size: 13px;
  color: #ced8e9;
  gap: 10px;
}
.nav-item.active {
  background: #223454;
  box-shadow: inset 3px 0 var(--accent);
  font-weight: 700;
}
.nav-item.active .nav-ico, .nav-item.active .nav-icon { color: #ffb35b; }
.sidebar-footer { flex-shrink: 0; padding: 13px 10px 3px; margin-top: 10px; }
.sidebar-footer small { color: #94a3bf; }
.workspace { margin-left: var(--ops-nav-width); min-width: 0; }
.topbar {
  height: 64px;
  gap: 22px;
  padding: 0 24px;
  background: #fff;
  backdrop-filter: none;
}
.workspace-context { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; min-width: 130px; max-width: 250px; }
.workspace-context:empty { display: none; }
.workspace-context > [aria-hidden] { color: #9ba8ba; font-size: 12px; }
.ops-context-link { border: 0; background: transparent; padding: 4px 0; color: var(--muted); font: inherit; font-size: 11px; text-decoration: none; cursor: pointer; }
.ops-context-link:hover { color: var(--accent-ink); }
.ops-context-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.search {
  min-width: 160px;
  max-width: 510px;
  min-height: 38px;
  border-color: var(--line);
  border-radius: 7px;
  padding: 8px 11px;
  background: #f7f8fa;
}
.search input { min-width: 0; font-size: 13px; }
.search input::placeholder { color: #68758b; opacity: 1; }
.search:focus-within { border-color: #a35c07; box-shadow: 0 0 0 2px #fff2e2; }
.search input:focus-visible { outline: 0; }
.top-actions { gap: 8px; flex-shrink: 0; }
.icon-button { height: 36px; width: 36px; border-radius: 7px; }
.user-button { gap: 9px; padding: 0 0 0 5px; }
.avatar { height: 34px; width: 34px; border-radius: 8px; background: #edf0f5; color: var(--ink); }
.user-copy strong { font-size: 12px; }
.user-copy small { font-size: 10px; }
#view { padding: 24px 24px 60px; max-width: 1680px; min-width: 0; }
.page-head { align-items: center; gap: 20px; margin-bottom: 22px; }
.page-head > div:first-child { min-width: 0; }
.page-head h1 { font-size: 27px; line-height: 1.2; margin: 4px 0 7px; letter-spacing: -.035em; }
.page-head p { font-size: 13px; max-width: 75ch; }
.page-head .eyebrow { font-size: 10px; font-weight: 650; text-transform: none; letter-spacing: .01em; color: var(--muted); }
.head-actions { gap: 7px; justify-content: flex-end; }
.button { min-height: 38px; border-radius: 7px; padding: 9px 13px; font-size: 12px; line-height: 1.35; }
.button.primary { color: #352000; font-weight: 750; }
.button.primary:hover { background: #fca12f; border-color: #fca12f; }
.select { min-height: 38px; border-radius: 7px; font-size: 13px; max-width: 100%; }
.card { border-radius: 10px; box-shadow: none; }
.card-head { padding: 15px 18px; }
.card-head h2 { font-size: 16px; }
.card-body { padding: 18px; }
.grid, .stack { gap: 16px; }
.pill { font-size: 10px; font-weight: 700; line-height: 1.35; padding: 4px 8px; }
.row-title { font-size: 13px; }
.row-sub { font-size: 11px; line-height: 1.45; }
.money, .kpi-value, .metric-pair strong { font-variant-numeric: tabular-nums; }
.kpi { padding: 16px 18px; border-radius: 10px; box-shadow: none; }
.kpi-value { margin: 8px 0 4px; font-size: 25px; }
.kpi-icon { background: transparent; border-radius: 0; }
.kpi-top { gap: 8px; }
.quick-action { border-radius: 7px; padding: 12px; }

/* Filters form one work surface above the records, including card layout. */
.list-toolbar, .ops-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 20px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.ops-filter-bar { border: 1px solid var(--line); border-radius: 10px; }
.card > .ops-filter-bar { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.ops-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.ops-filter { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; border: 1px solid transparent; border-radius: 6px; padding: 7px 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.ops-filter:hover { background: #f3f5f8; color: var(--ink); }
.ops-filter[aria-pressed="true"] { border-color: #e7c59c; background: #fff3e4; color: #744309; }
.ops-filter > span { display: inline-grid; place-items: center; min-width: 20px; padding: 1px 5px; border-radius: 9px; background: #e9edf3; color: #53617a; font-size: 10px; font-variant-numeric: tabular-nums; }
.ops-filter[aria-pressed="true"] > span { background: #f3d7b2; color: #603706; }
.ops-search-label { display: grid; gap: 6px; min-width: 210px; color: var(--muted); font-size: 11px; font-weight: 650; }
.ops-search-label input { width: 100%; min-width: 0; }
.ops-result-count { color: var(--muted); font-size: 12px; line-height: 1.4; margin-left: auto; white-space: nowrap; padding-bottom: 10px; }
.mini-search { min-width: 210px; max-width: 100%; min-height: 38px; padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--ink); }
.table-wrap { position: relative; max-width: 100%; overscroll-behavior-x: contain; scrollbar-width: thin; }
.data-table th { padding: 12px 15px; background: #f6f8fa; text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 650; white-space: nowrap; }
.data-table td { padding: 13px 15px; font-size: 12px; line-height: 1.45; vertical-align: middle; }
.data-table th:first-child, .data-table td:first-child { padding-left: 18px; }
.data-table tr.clickable:hover td { background: #f2f7f8; }
.data-table .button { min-height: 33px; padding: 7px 10px; font-size: 11px; }
.data-table td .row-sub { font-size: 10px; margin-top: 4px; }
.machine-grid { grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); }
.ops-fleet > .machine-grid { padding: 18px; }
.machine-card { padding: 18px; min-width: 0; }
.machine-card.clickable:hover { border-color: #a2afbf; }
.machine-card-top { gap: 14px; align-items: flex-start; }
.machine-card-top > div { min-width: 0; }
.machine-card h2 { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.machine-card .eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .02em; }
.machine-photo { height: 90px; margin: 14px 0; background: #f1f4f8; border: 1px solid #e8ecf2; color: #53617a; border-radius: 6px; font-size: 34px; }
.metric-pair { font-size: 12px; }
.progress { height: 5px; }
.ops-machine-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ops-machine-identity > div { min-width: 0; }
.ops-machine-identity strong { display: block; overflow-wrap: anywhere; }
.ops-machine-symbol { display: grid; place-items: center; height: 38px; width: 32px; flex: none; border: 1px solid #cdd6e1; border-radius: 5px; background: #f3f6f9; color: #53617a; }
.ops-machine-symbol svg { width: 19px; height: 24px; }
.ops-stock-meter { display: flex; align-items: center; gap: 10px; min-width: 145px; }
.ops-stock-meter .progress { margin-top: 0; }
.ops-stock-meter .money { min-width: 35px; text-align: right; }
.ops-stock-alert { display: block; max-width: 220px; color: #9b4e07; font-size: 12px; line-height: 1.45; }
.ops-machine-location { margin: 12px 0 18px; min-height: 18px; font-size: 12px; }
.ops-machine-alert { margin: 13px 0 17px; min-height: 18px; font-size: 12px; }
.ops-fleet .machine-card > .button { margin-top: auto; align-self: flex-start; }
.ops-fleet .machine-card { display: flex; flex-direction: column; }
.ops-fleet .machine-card .service-now > span { color: var(--muted); font-size: 11px; }
.service-now { flex-wrap: wrap; line-height: 1.5; }
.service-now small { font-size: 11px; text-align: left; }

/* Preserve the familiar shelf geometry and click-to-edit slot interaction. */
.floor { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 16px 0; }
.floor-label { line-height: 1.45; font-size: 10px; letter-spacing: .025em; }
.floor-slots { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; min-width: 0; }
.slot { min-width: 0; padding: 12px; border-radius: 8px; }
.slot-code { letter-spacing: .025em; }
.slot-main { min-width: 0; gap: 9px; }
.slot-prod { font-size: 13px; line-height: 1.4; }
.slot-clickable .slot-priceview { font-size: 19px; }
.slot-stock { font-size: 11px; line-height: 1.5; }
.slot-pricetag { font-size: 10px; line-height: 1.45; }
.slot-clickable:hover { box-shadow: none; background: #fffcf7; }
.slot.changed { background: var(--accent-soft); }
.machine-product-palette .palette { max-height: 620px; scrollbar-width: thin; }
.machine-product-palette .palette-item { border-radius: 7px; padding: 10px; }
.savebar { top: 76px; border-radius: 8px; padding: 12px 16px; }
.support-config-main { min-width: 0; }
.support-config-main > div { min-width: 0; }
.support-config-main p, .support-config-main small { overflow-wrap: anywhere; }
.mi-draftbar { left: calc(var(--ops-nav-width) + 24px); }

/* Keep dialogs readable and contained at small viewport heights. */
.modal { border-radius: 12px; max-height: calc(100dvh - 36px); overflow-y: auto; overscroll-behavior: contain; }
.modal-close { min-height: 36px; min-width: 36px; border-radius: 6px; line-height: 1; }
.field label { text-transform: none; letter-spacing: 0; font-size: 12px; line-height: 1.4; }
.field input, .field select { min-width: 0; max-width: 100%; border-radius: 7px; }
.form-grid { min-width: 0; }
.support-editor-section { border-radius: 8px; }
.support-live-preview { border-radius: 8px; }
.ops-search-results { position: absolute; top: 64px; right: 24px; width: min(580px, calc(100vw - 28px)); max-height: min(600px, calc(100dvh - 100px)); overflow-y: auto; overscroll-behavior: contain; border: 1px solid #bdc8d8; border-radius: 9px; padding: 14px; background: #fff; box-shadow: 0 12px 36px rgba(13, 27, 61, .16); z-index: 22; }
.ops-search-results[hidden] { display: none; }
.ops-search-results > p { font-size: 12px; margin-bottom: 10px; overflow-wrap: anywhere; }
.ops-search-group { margin-top: 18px; }
.ops-search-group h2 { font-size: 12px; color: var(--muted); font-weight: 650; margin: 0 0 6px; }
.ops-search-result {
  display: grid;
  align-content: center;
  gap: 3px;
  width: 100%;
  padding: 13px 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.ops-search-result:hover { background: #f3f7f9; }
.ops-search-result > span, .ops-search-result > div { min-width: 0; }
.ops-search-result strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.ops-search-result small { display: block; font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }

@media (max-width: 1200px) {
  .topbar { gap: 16px; }
  .user-copy { display: none; }
  .workspace-context { min-width: 110px; }
  .head-actions { max-width: 52%; }
}
@media (max-width: 1000px) and (min-width: 801px) {
  .topbar { padding: 0 20px; }
  .workspace-context { min-width: 95px; }
  .ops-context-title { font-size: 12px; }
  #view { padding-left: 20px; padding-right: 20px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .head-actions { max-width: none; justify-content: flex-start; }
}
@media (max-width: 800px) {
  .workspace { margin-left: 0; }
  .sidebar { display: none; }
  .topbar { height: 60px; padding: 0 14px; gap: 10px; }
  .mobile-brand { gap: 8px; }
  .mobile-brand strong { font-size: 15px; }
  .workspace-context { display: none; }
  .top-actions { gap: 6px; }
  .icon-button { width: 36px; height: 38px; }
  .user-button { padding: 0; }
  .search { top: 60px; left: 12px; right: 12px; min-height: 46px; z-index: 2; background: #fff; border-color: #aebbd0; }
  .search input { font-size: 16px; }
  #view { padding: 20px 14px 112px; }
  .page-head { display: block; margin-bottom: 18px; }
  .page-head h1 { font-size: 25px; }
  .head-actions { max-width: none; margin-top: 14px; justify-content: flex-start; }
  .head-actions > .button { flex: 0 1 auto; }
  .button { min-height: 42px; }
  .grid, .stack { gap: 12px; }
  .machine-grid { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
  .list-toolbar, .ops-filter-bar { display: flex; padding: 14px; gap: 12px; }
  .ops-filters { width: 100%; gap: 6px; padding: 10px 14px; }
  .ops-filter { min-height: 40px; padding: 8px 10px; }
  .ops-search-label { width: 100%; min-width: 0; }
  .ops-search-results { top: 106px; right: 14px; max-height: calc(100dvh - 190px); padding: 12px; }
  .ops-search-result { min-height: 62px; }
  .mini-search { width: 100%; min-width: 0; }
  .ops-result-count { margin-left: 0; padding-bottom: 0; }
  .data-table { min-width: 660px; }
  .data-table td, .data-table th { padding: 12px; }
  .data-table .button { min-height: 38px; }
  .card-head { padding: 14px; flex-wrap: wrap; }
  .card-body { padding: 14px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 22px; }
  .savebar { top: 70px; flex-wrap: wrap; gap: 10px; padding: 12px; }
  .floor { grid-template-columns: 1fr; gap: 10px; padding: 15px 0; }
  .floor-label { display: flex; align-items: baseline; gap: 8px; padding: 0; }
  .floor-label small { margin: 0; }
  .floor-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .slot { padding: 10px; }
  .slot .thumb { max-width: 40px; max-height: 48px; }
  .slot-main { align-items: flex-start; gap: 7px; }
  .slot-prod { font-size: 12px; }
  .ops-fleet > .machine-grid { padding: 14px; }
  .mi-draftbar { left: 14px; right: 14px; bottom: 84px; }
  .modal-backdrop { padding: 10px; }
  .modal { padding: 24px 18px; max-height: calc(100dvh - 20px); }
  .mobile-nav { box-shadow: 0 -2px 8px rgba(13, 27, 61, .04); }
  .mobile-nav button { min-height: 48px; font-size: 10px; }
  .mobile-nav button.active { background: #fff3e4; color: #8a4c05; border-radius: 6px; }
}
@media (max-width: 420px) {
  .head-actions { gap: 7px; }
  .head-actions .button { padding: 9px 11px; font-size: 11px; }
  .kpi-top { font-size: 11px; }
  .machine-grid { grid-template-columns: minmax(0, 1fr); }
  .slot-main { min-height: 49px; }
  .support-config-main { align-items: flex-start; }
  .support-config-icon { width: 34px; height: 36px; border-radius: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .toast, .slot-clickable { transition: none; }
}

/* All operational destinations remain available from the mobile More menu. */
.ops-more-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:16px}.ops-more-links{display:grid;padding:8px}.ops-more-links button{display:flex;align-items:center;gap:12px;min-height:46px;padding:12px;border:0;border-radius:6px;background:#fff;color:var(--ink);text-align:left;cursor:pointer;font:inherit}.ops-more-links button:hover{background:#f3f5f8}.filter-row [data-layout][aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:#fff}
