/* Zestia Operations Board v2
   A dense ticket workspace for online and telephone orders. */

body.app-frame {
  --ops-v2-ink: #101828;
  --ops-v2-muted: #667085;
  --ops-v2-line: #e4e7ec;
  --ops-v2-surface: #ffffff;
  --ops-v2-canvas: #f4f6f8;
  --ops-v2-blue: #175cd3;
  --ops-v2-phone: #7a5af8;
  background: var(--ops-v2-canvas);
}

body.app-frame .dashboard-shell {
  padding: 14px;
}

body.app-frame .ops-shell--primary {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame .ops-shell--primary > .ops-header {
  display: none;
}

body.app-frame .ops-shell--primary .ops-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--ops-v2-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  backdrop-filter: blur(14px);
}

body.app-frame .ops-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

body.app-frame .ops-filters::-webkit-scrollbar {
  display: none;
}

body.app-frame .ops-filters .chip,
body.app-frame .ops-tools .chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f2f4f7;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

body.app-frame .ops-filters .chip.is-active {
  border-color: #101828;
  background: #101828;
  color: #ffffff;
}

body.app-frame .ops-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.app-frame .ops-search {
  width: clamp(240px, 22vw, 360px);
  min-height: 38px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #ffffff;
  font-size: 13px;
}

body.app-frame .ops-priority-panel {
  margin: 0 0 14px;
  border: 1px solid var(--ops-v2-line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

body.app-frame .ops-priority-panel > summary {
  min-height: 44px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
}

body.app-frame .ops-priority-panel > summary::-webkit-details-marker {
  display: none;
}

body.app-frame .ops-priority-panel > summary h3 {
  margin: 0;
  font-size: 13px;
}

body.app-frame .ops-priority-panel > summary::after {
  content: "Mostrar";
  margin-left: auto;
  color: var(--ops-v2-muted);
  font-size: 11px;
  font-weight: 800;
}

body.app-frame .ops-priority-panel[open] > summary::after {
  content: "Ocultar";
}

body.app-frame .dashboard-shell .ops-board,
body.app-frame.ops-fullscreen .dashboard-shell .ops-board {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  align-items: start;
  gap: 14px !important;
  width: 100%;
  min-height: 0;
  overflow: visible;
}

body.app-frame .ops-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 190px;
  max-height: none;
  padding: 0;
  border: 1px solid var(--ops-v2-line);
  border-radius: 14px;
  background: var(--ops-v2-surface);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.05);
  overflow: hidden;
  justify-self: stretch;
}

body.app-frame .ops-column:not(.has-visible-cards) {
  display: none !important;
}

body.app-frame .ops-column__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid var(--ops-v2-line);
  border-radius: 0;
  background: #f9fafb;
  color: #344054;
}

body.app-frame .ops-column__head > span:first-child {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.app-frame .ops-column__head .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #101828;
  color: #ffffff;
  font-size: 13px;
}

body.app-frame .ops-column[data-column="NEW"] .ops-column__head {
  box-shadow: inset 4px 0 #f04438;
}

body.app-frame .ops-column[data-column="KITCHEN"] .ops-column__head {
  box-shadow: inset 4px 0 #f79009;
}

body.app-frame .ops-column[data-column="READY"] .ops-column__head {
  box-shadow: inset 4px 0 #2e90fa;
}

body.app-frame .ops-column[data-column="ASSIGNED"] .ops-column__head {
  box-shadow: inset 4px 0 #7a5af8;
}

body.app-frame .ops-column[data-column="ROUTE"] .ops-column__head {
  box-shadow: inset 4px 0 #12b76a;
}

body.app-frame .ops-column__list,
body.app-frame.ops-fullscreen .ops-column__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: stretch;
  max-height: 610px !important;
  padding: 10px;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  background: #f9fafb;
}

body.app-frame .order-card,
body.app-frame:not(.ops-compact) .order-card {
  display: grid;
  grid-template-columns: 170px minmax(230px, 1fr) minmax(190px, 0.78fr);
  grid-template-areas:
    "head items actions"
    "head allergens actions"
    "head meta actions"
    "head details actions";
  gap: 8px 14px;
  min-width: 0;
  width: 100%;
  max-width: none;
  min-height: 176px;
  padding: 12px 12px 12px 16px;
  border: 1px solid #d0d5dd;
  border-left: 5px solid #98a2b3;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: visible;
  box-sizing: border-box;
  align-self: stretch;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

body.app-frame .order-card:hover {
  transform: none;
  border-color: #98a2b3;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.09);
}

body.app-frame .order-card::before {
  display: none;
}

body.app-frame .order-card[data-source="PHONE"] {
  border-left-color: var(--ops-v2-phone);
}

body.app-frame .order-card[data-source="WEB"],
body.app-frame .order-card[data-source="APP"] {
  border-left-color: var(--ops-v2-blue);
}

body.app-frame .order-card__head {
  grid-area: head;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-right: 12px;
  border-right: 1px solid #eaecf0;
}

body.app-frame .order-card__identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

body.app-frame .turn-number {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 62px;
  min-height: 58px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #101828;
  color: #ffffff;
  font-size: 24px;
  font-style: normal;
  line-height: 1;
}

body.app-frame .turn-number::before {
  content: "PEDIDO";
  margin-bottom: 5px;
  color: #98a2b3;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

body.app-frame .order-card__title {
  align-items: flex-start;
  gap: 5px;
}

body.app-frame .turn-label {
  color: var(--ops-v2-muted);
  font-size: 9px;
}

body.app-frame .status-pill {
  padding: 5px 7px;
  border-radius: 6px;
  font-size: 9px;
}

body.app-frame .order-due-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.app-frame .order-due-box {
  flex: 1 1 72px;
  min-width: 0;
  min-height: 0;
  padding: 7px 8px;
  border-radius: 7px;
}

body.app-frame .order-due-box strong {
  font-size: 13px;
}

body.app-frame .order-due-box small {
  font-size: 8px;
}

body.app-frame .order-card__items {
  grid-area: items;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: none !important;
  min-width: 0;
  padding: 2px 0;
  overflow: visible !important;
}

body.app-frame .order-item-line {
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid #f2f4f7;
  color: var(--ops-v2-ink);
  font-size: 12px;
  line-height: 1.25;
}

body.app-frame .order-item-line span {
  display: block;
  margin-top: 2px;
  color: var(--ops-v2-muted);
  font-size: 10px;
}

body.app-frame .order-card__allergens {
  grid-area: allergens;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #fecdca;
  border-radius: 7px;
  background: #fff6f5;
  font-size: 9px;
}

body.app-frame .order-card__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-self: end;
  gap: 5px;
  margin: 0;
}

body.app-frame .order-card__meta .pill {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  background: #f2f4f7;
  font-size: 8px;
}

body.app-frame .order-card__meta .pill-phone {
  border-color: #d9d6fe;
  background: #f4f3ff;
  color: #5925dc;
}

body.app-frame .order-card__details {
  grid-area: details;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: #475467;
  font-size: 10px;
}

body.app-frame .order-card__note {
  flex-basis: 100%;
  padding: 5px 7px;
  border-radius: 6px;
  background: #fffaeb;
  color: #93370d;
}

body.app-frame .order-card__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-left: 12px;
  border-left: 1px solid #eaecf0;
}

body.app-frame .primary-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

body.app-frame .primary-actions form,
body.app-frame .primary-actions a,
body.app-frame .primary-actions button,
body.app-frame .primary-actions select {
  width: 100%;
}

body.app-frame .primary-actions button,
body.app-frame .primary-actions .button,
body.app-frame .primary-actions .ghost-button {
  min-height: 34px;
  border-radius: 7px;
  font-size: 10px;
}

body.app-frame .primary-actions button:not(.ghost-button):not(.danger),
body.app-frame .primary-actions .button:not(.ghost-button) {
  border-color: var(--ops-v2-blue);
  background: var(--ops-v2-blue);
  color: #ffffff;
}

body.app-frame .primary-actions button.danger {
  border-color: #fda29b;
  background: #ffffff;
  color: #b42318;
}

body.app-frame .order-card__actions > .order-card__links {
  display: none;
}

body.app-frame .order-details {
  margin-top: auto;
  border-top: 1px solid #eaecf0;
}

body.app-frame .order-details > summary {
  min-height: 30px;
  padding: 7px 0 0;
  color: #475467;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

body.app-frame .order-details__content {
  position: relative;
  z-index: 2;
  min-width: 280px;
  padding-top: 8px;
}

body.app-frame.ops-compact .order-card {
  min-height: 132px;
}

@media (max-width: 1500px) {
  body.app-frame .dashboard-shell .ops-board,
  body.app-frame.ops-fullscreen .dashboard-shell .ops-board {
    grid-template-columns: 1fr !important;
  }

  body.app-frame .ops-column__list,
  body.app-frame.ops-fullscreen .ops-column__list {
    max-height: 520px !important;
  }
}

@media (max-width: 920px) {
  body.app-frame .dashboard-shell {
    padding: 8px;
  }

  body.app-frame .ops-shell--primary .ops-toolbar {
    position: static;
    grid-template-columns: 1fr;
    grid-auto-flow: row !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    overflow: visible;
  }

  body.app-frame .ops-tools,
  body.app-frame .ops-search {
    width: 100%;
  }

  body.app-frame .ops-filters {
    display: flex !important;
    grid-auto-flow: unset !important;
    grid-auto-columns: unset !important;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
  }

  body.app-frame .ops-tools {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-auto-flow: row !important;
  }

  body.app-frame .dashboard-shell .ops-workbar__metrics {
    display: flex !important;
    grid-auto-flow: unset !important;
    grid-auto-columns: unset !important;
    flex-wrap: nowrap;
    gap: 6px;
    width: 100%;
    overflow-x: auto;
  }
}

@media (min-width: 681px) and (max-width: 1100px) {
  body.app-frame .order-card,
  body.app-frame:not(.ops-compact) .order-card {
    grid-template-columns: 145px minmax(180px, 1fr) minmax(155px, 0.72fr);
    gap: 7px 9px;
  }

  body.app-frame .order-card__head {
    padding-right: 9px;
  }

  body.app-frame .order-card__actions {
    padding-left: 9px;
  }
}

@media (max-width: 680px) {
  body.app-shell:not(.nav-open) .main-nav {
    display: none !important;
  }

  body.app-shell.nav-open .main-nav {
    display: flex !important;
    grid-column: 1 / -1;
    width: 100%;
    padding-top: 8px;
    overflow-x: auto;
  }

  body.app-shell .site-header--menu-first {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 64px;
  }

  body.app-frame .dashboard-shell .ops-workbar {
    margin-bottom: 8px;
  }

  body.app-frame .ops-shell--primary .ops-toolbar {
    gap: 9px;
    padding: 10px;
  }

  body.app-frame .ops-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  body.app-frame .ops-compact-toggle {
    display: none;
  }

  body.app-frame .ops-column {
    display: block;
  }

  body.app-frame .ops-column__head {
    min-height: 48px;
    border-right: 0;
    border-bottom: 1px solid var(--ops-v2-line);
  }

  body.app-frame .order-card,
  body.app-frame:not(.ops-compact) .order-card {
    display: flex;
    flex-direction: column;
  }

  body.app-frame .order-card__head,
  body.app-frame .order-card__actions {
    padding: 0;
    border: 0;
  }
}

/* KDS v5: preserve lane navigation and let complex orders breathe. */
body.app-frame.page-dashboard .ops-column__list {
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  touch-action: pan-y;
}

body.app-frame.page-dashboard .ops-column__list::-webkit-scrollbar {
  width: 10px;
}

body.app-frame.page-dashboard .ops-column__list::-webkit-scrollbar-track {
  background: #eef2f6;
  border-radius: 999px;
}

body.app-frame.page-dashboard .ops-column__list::-webkit-scrollbar-thumb {
  border: 2px solid #eef2f6;
  border-radius: 999px;
  background: #98a2b3;
}

@media (min-width: 901px) {
  body.app-frame.page-dashboard .ops-column:has(.order-card--large) {
    min-width: 440px;
  }
}

body.app-frame.page-dashboard .order-card--large,
body.app-frame.page-dashboard:not(.ops-compact) .order-card--large,
body.app-frame.page-dashboard.ops-compact .order-card--large {
  grid-template-rows: 50px minmax(88px, auto) minmax(0, 34px) 20px 30px;
  height: auto;
  min-height: 270px;
  max-height: none;
}

body.app-frame.page-dashboard .order-card--large .order-card__items {
  max-height: 112px !important;
}

body.app-frame.page-dashboard .order-card--large .order-item-line {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 680px) {
  body.app-frame.page-dashboard .order-card--large,
  body.app-frame.page-dashboard:not(.ops-compact) .order-card--large,
  body.app-frame.page-dashboard.ops-compact .order-card--large {
    min-height: 280px;
  }
}

/* KDS v4: production-first main screen, one navigation layer and collision-proof tickets. */
body.app-frame.page-dashboard .ops-workbar {
  display: none !important;
}

body.app-shell.page-dashboard .nav-group--secondary,
body.app-shell.page-dashboard .nav-group--status,
body.app-shell.page-dashboard .nav-meta__utility,
body.app-shell.page-dashboard .ops-lucia-pill {
  display: none !important;
}

body.app-shell.page-dashboard .site-header--menu-first {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
}

body.app-shell.page-dashboard .nav-cluster--center {
  flex: 1 1 auto;
}

body.app-shell.page-dashboard .nav-cluster--right {
  margin-left: auto;
}

body.app-frame.page-dashboard .ops-shell--primary .ops-toolbar {
  justify-content: flex-end;
  min-height: 36px;
  margin-bottom: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.app-frame.page-dashboard .ops-filters,
body.app-frame.page-dashboard .ops-compact-toggle {
  display: none !important;
}

body.app-frame.page-dashboard .ops-search {
  width: clamp(240px, 24vw, 360px);
  min-height: 34px;
  background: #ffffff;
}

body.app-frame.page-dashboard .dashboard-shell .ops-board,
body.app-frame.page-dashboard.ops-fullscreen .dashboard-shell .ops-board {
  height: calc(100dvh - 126px);
  min-height: 560px;
}

body.app-frame.page-dashboard .order-card,
body.app-frame.page-dashboard:not(.ops-compact) .order-card,
body.app-frame.page-dashboard.ops-compact .order-card {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "items"
    "alerts"
    "meta"
    "actions";
  grid-template-rows: 50px minmax(36px, 1fr) minmax(0, auto) 20px 30px;
  gap: 4px;
  height: 210px;
  min-height: 210px;
  max-height: 210px;
  padding: 7px;
}

body.app-frame.page-dashboard .order-card__head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 76px;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
}

body.app-frame.page-dashboard .order-card__identity {
  display: contents;
}

body.app-frame.page-dashboard .turn-number {
  align-items: center;
  grid-column: 1;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
}

body.app-frame.page-dashboard .order-card__title {
  grid-column: 2;
  justify-content: center;
  min-width: 0;
}

body.app-frame.page-dashboard .status-pill {
  width: auto;
  max-width: 100%;
  padding: 5px 6px;
  font-size: 8px;
  line-height: 1.15;
  text-align: left;
}

body.app-frame.page-dashboard .order-due-stack {
  grid-column: 3;
  min-width: 0;
}

body.app-frame.page-dashboard .order-due-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 48px;
  padding: 3px 4px;
  overflow: hidden;
}

body.app-frame.page-dashboard .order-due-box--route {
  display: none;
}

body.app-frame.page-dashboard .order-card__items {
  grid-area: items;
  gap: 1px;
  min-height: 0;
  max-height: none !important;
  padding: 2px 5px;
  border: 1px solid #eaecf0;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden !important;
}

body.app-frame.page-dashboard .order-item-line {
  min-width: 0;
  padding: 1px 0;
  border-bottom: 1px solid #f2f4f7;
  font-size: 10px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.app-frame.page-dashboard .order-item-line--more {
  color: #667085;
  font-size: 8px;
}

body.app-frame.page-dashboard .order-card__alerts {
  grid-area: alerts;
  display: grid;
  gap: 2px;
  min-width: 0;
  max-height: 34px;
  overflow: hidden;
}

body.app-frame.page-dashboard .order-card__allergens,
body.app-frame.page-dashboard .order-card__instructions {
  display: block;
  grid-area: auto;
  min-width: 0;
  min-height: 15px;
  max-height: 16px;
  margin: 0;
  padding: 3px 5px;
  font-size: 7px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.app-frame.page-dashboard .order-card__meta {
  grid-area: meta;
  align-items: center;
  min-height: 20px;
  margin: 0;
}

body.app-frame.page-dashboard .order-card__actions {
  grid-area: actions;
  min-height: 30px;
  overflow: hidden;
}

body.app-frame.page-dashboard .primary-actions,
body.app-frame.page-dashboard .primary-actions form,
body.app-frame.page-dashboard .primary-actions a,
body.app-frame.page-dashboard .primary-actions button,
body.app-frame.page-dashboard .primary-actions select {
  height: 30px;
  min-height: 30px;
}

body.app-frame.page-dashboard .primary-actions button,
body.app-frame.page-dashboard .primary-actions .button,
body.app-frame.page-dashboard .primary-actions .ghost-button,
body.app-frame.page-dashboard .primary-actions select {
  padding: 3px 5px;
  font-size: 8px;
  line-height: 1;
  overflow: hidden;
}

@media (max-width: 900px) {
  body.app-frame.page-dashboard .ops-filters {
    display: flex !important;
  }

  body.app-frame.page-dashboard .ops-shell--primary .ops-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body.app-frame.page-dashboard .ops-tools,
  body.app-frame.page-dashboard .ops-search {
    width: 100%;
  }

  body.app-frame.page-dashboard .dashboard-shell .ops-board,
  body.app-frame.page-dashboard.ops-fullscreen .dashboard-shell .ops-board {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 680px) {
  body.app-frame.page-dashboard .order-card,
  body.app-frame.page-dashboard:not(.ops-compact) .order-card,
  body.app-frame.page-dashboard.ops-compact .order-card {
    height: 210px;
    min-height: 210px;
    max-height: 210px;
  }
}

/* KDS v3: glanceable density is the primary operating mode. */
body.app-frame .ops-priority-panel,
body.app-frame .rush-panel {
  display: none !important;
}

body.app-frame .ops-group-strip {
  display: none;
}

body.app-frame .freshness-alert {
  margin: 0 0 8px;
  padding: 0;
  border: 1px solid #fda29b;
  border-radius: 9px;
  background: #fff4f3;
  overflow: hidden;
}

body.app-frame .freshness-alert > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  cursor: pointer;
  list-style: none;
  color: #912018;
}

body.app-frame .freshness-alert > summary::-webkit-details-marker {
  display: none;
}

body.app-frame .freshness-alert > summary small {
  color: #b54708;
  font-size: 10px;
}

body.app-frame .freshness-alert__items {
  max-height: 150px;
  padding: 0 10px 8px;
  overflow-y: auto;
}

body.app-frame .dashboard-shell .ops-board,
body.app-frame.ops-fullscreen .dashboard-shell .ops-board {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(230px, 1fr)) !important;
  grid-auto-flow: row !important;
  align-items: stretch;
  gap: 7px !important;
  height: calc(100dvh - 235px);
  min-height: 500px;
  overflow-x: auto;
  overflow-y: hidden;
}

body.app-frame .ops-column,
body.app-frame.ops-fullscreen .ops-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 40px minmax(0, 1fr);
  align-self: stretch;
  height: 100%;
  min-height: 0;
  max-height: none;
  border-radius: 9px;
}

body.app-frame .ops-column:not(.has-visible-cards) {
  display: grid !important;
}

body.app-frame .ops-column.is-filtered-out {
  display: none !important;
}

body.app-frame .ops-column__head {
  min-height: 40px;
  padding: 0 9px;
  background: #f8fafc;
}

body.app-frame .ops-column__head > span:first-child {
  font-size: 10px;
}

body.app-frame .ops-column__head .badge {
  min-width: 25px;
  height: 25px;
  border-radius: 7px;
  font-size: 11px;
}

body.app-frame .ops-column__list,
body.app-frame.ops-fullscreen .ops-column__list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  height: 100%;
  min-height: 0;
  max-height: none !important;
  padding: 6px;
  overflow-y: auto !important;
  overflow-x: hidden;
}

body.app-frame .order-card,
body.app-frame:not(.ops-compact) .order-card,
body.app-frame.ops-compact .order-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-areas:
    "head items"
    "head allergens"
    "meta meta"
    "instructions instructions"
    "actions actions";
  grid-template-rows: auto auto auto auto auto;
  flex: 0 0 auto;
  gap: 5px 7px;
  width: 100%;
  min-width: 0;
  height: 196px;
  min-height: 196px;
  max-height: 196px;
  padding: 7px 7px 7px 10px;
  border-width: 1px 1px 1px 4px;
  border-radius: 8px;
  box-sizing: border-box;
  overflow: hidden;
}

body.app-frame .order-card__head {
  grid-area: head;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  padding: 0 6px 0 0;
  border: 0;
  border-right: 1px solid #eaecf0;
}

body.app-frame .order-card__identity {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

body.app-frame .turn-number {
  min-width: 48px;
  width: 48px;
  min-height: 48px;
  height: 48px;
  padding: 6px;
  border-radius: 7px;
  font-size: 20px;
  text-decoration: none;
}

body.app-frame .turn-number::before {
  margin-bottom: 3px;
  font-size: 5px;
}

body.app-frame .order-card__title {
  width: 100%;
  gap: 3px;
}

body.app-frame .turn-label {
  display: none;
}

body.app-frame .status-pill {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 4px;
  font-size: 7px;
  line-height: 1.15;
  overflow-wrap: normal;
  text-align: center;
  word-break: normal;
}

body.app-frame .order-due-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.app-frame .order-due-box {
  flex: 0 0 auto;
  min-height: 0;
  padding: 4px 5px;
  border-radius: 6px;
}

body.app-frame .order-due-box span,
body.app-frame .order-due-box small {
  font-size: 6px;
}

body.app-frame .order-due-box strong {
  font-size: 12px;
  line-height: 1;
}

body.app-frame .order-card__items {
  grid-area: items;
  display: flex;
  gap: 2px;
  max-height: 74px !important;
  padding: 0;
  overflow: hidden !important;
}

body.app-frame .order-item-line {
  padding: 0 0 3px;
  font-size: 11px;
  line-height: 1.15;
}

body.app-frame .order-item-line span {
  display: none;
}

body.app-frame .order-card__allergens {
  grid-area: allergens;
  align-self: end;
  max-height: 26px;
  padding: 4px 5px;
  font-size: 8px;
  line-height: 1.1;
  overflow: hidden;
}

body.app-frame .order-card__meta {
  grid-area: meta;
  flex-wrap: nowrap;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

body.app-frame .order-card__meta .pill {
  flex: 0 0 auto;
  min-height: 20px;
  padding: 0 5px;
  font-size: 7px;
}

body.app-frame .order-card__meta .pill-kitchen-target,
body.app-frame .order-card__meta .pill-payment,
body.app-frame .order-card__meta .pill-verification {
  display: none;
}

body.app-frame .order-card__instructions {
  grid-area: instructions;
  min-width: 0;
  padding: 3px 5px;
  border-radius: 5px;
  background: #fffaeb;
  color: #93370d;
  font-size: 8px;
  font-weight: 750;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.app-frame .order-card__details {
  display: none;
}

body.app-frame .order-card__actions {
  grid-area: actions;
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
}

body.app-frame .primary-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 4px;
}

body.app-frame .primary-actions form,
body.app-frame .primary-actions a,
body.app-frame .primary-actions button,
body.app-frame .primary-actions select {
  min-width: 0;
  width: 100%;
}

body.app-frame .primary-actions button,
body.app-frame .primary-actions .button,
body.app-frame .primary-actions .ghost-button,
body.app-frame .primary-actions select {
  min-height: 27px;
  padding: 3px 5px;
  border-radius: 6px;
  font-size: 8px;
  line-height: 1.05;
}

body.app-frame .order-details {
  display: none;
}

body.app-frame .ops-shell--primary .ops-toolbar {
  min-height: 44px;
  margin-bottom: 7px;
  padding: 5px 7px;
  border-radius: 9px;
}

body.app-frame .ops-filters .chip,
body.app-frame .ops-tools .chip {
  min-height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 9px;
}

body.app-frame .ops-search {
  min-height: 32px;
  font-size: 11px;
}

@media (max-width: 1300px) {
  body.app-frame .dashboard-shell .ops-board,
  body.app-frame.ops-fullscreen .dashboard-shell .ops-board {
    grid-template-columns: repeat(3, minmax(240px, 1fr)) !important;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body.app-frame .ops-column,
  body.app-frame.ops-fullscreen .ops-column {
    height: 520px;
  }
}

@media (max-width: 900px) {
  body.app-frame .dashboard-shell .ops-board,
  body.app-frame.ops-fullscreen .dashboard-shell .ops-board {
    grid-template-columns: repeat(2, minmax(230px, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  body.app-frame .dashboard-shell .ops-board,
  body.app-frame.ops-fullscreen .dashboard-shell .ops-board {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.app-frame .ops-column,
  body.app-frame.ops-fullscreen .ops-column {
    display: grid;
    height: 480px;
  }

  body.app-frame .order-card,
  body.app-frame:not(.ops-compact) .order-card,
  body.app-frame.ops-compact .order-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    height: 205px;
    min-height: 205px;
    max-height: 205px;
  }

  body.app-frame .ops-filters {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  body.app-frame .ops-filters .chip {
    flex: 0 0 auto;
    width: auto;
    min-height: 34px;
    padding: 0 10px;
    scroll-snap-align: start;
  }
}
