/* Zestia Cocina: command-first light workspace. */
.zestia-ops-shell--kds .kds-lane-tabs {
  display: none;
}

.zestia-ops-shell--kds .kds-rush__table {
  max-height: 270px;
  overflow: auto;
}

.zestia-ops-shell--kds .kds-rush__row:nth-child(n + 8) {
  display: none;
}

.zestia-ops-shell--kds .kds-rush__head {
  cursor: pointer;
  list-style: none;
}

.zestia-ops-shell--kds .kds-rush__head::-webkit-details-marker {
  display: none;
}

.zestia-ops-shell--kds .kds-rush__toggle-label {
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.zestia-ops-shell--kds .kds-rush[open] .kds-rush__toggle-label::after {
  content: " menos";
}

.zestia-ops-shell--kds .kds-column {
  border-color: #d9e2ed;
  box-shadow: 0 9px 26px rgba(15, 23, 42, .07);
}

.zestia-ops-shell--kds .kitchen-column__head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.zestia-ops-shell--kds .kds-ticket {
  border: 1px solid #dce4ee;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .055);
}

.zestia-ops-shell--kds .kds-ticket + .kds-ticket {
  margin-top: 8px;
}

/* El canal vive en el numero de comanda; no consume otra columna de texto. */
.zestia-ops-shell--kds .kds-ticket .ticket-head {
  grid-template-columns: auto auto minmax(0, 1fr);
}

.zestia-ops-shell--kds .kds-ticket .ticket-head > .kds-group-marker {
  grid-column: 2;
}

.zestia-ops-shell--kds .kds-ticket .ticket-head > .kds-ticket__title {
  grid-column: 3;
}

.zestia-ops-shell--kds .kds-ticket .ticket-head .kds-order-number {
  border: 2px solid rgba(15, 23, 42, .14);
  background: #172033;
  color: #fff;
}

.zestia-ops-shell--kds .kds-ticket .ticket-head .kds-order-number--web {
  border-color: #1e40af;
  background: #1d4ed8;
  color: #fff;
}

.zestia-ops-shell--kds .kds-ticket .ticket-head .kds-order-number--app {
  border-color: #166534;
  background: #15803d;
  color: #fff;
}

.zestia-ops-shell--kds .kds-ticket .ticket-head .kds-order-number--phone {
  border-color: #ca8a04;
  background: #facc15;
  color: #1f2937;
}

.zestia-ops-shell--kds .kds-ticket .ticket-head .kds-order-number--manual {
  border-color: #334155;
  background: #475569;
  color: #fff;
}

.zestia-ops-shell--kds .kds-ticket .ticket-head .kds-order-number--whatsapp {
  border-color: #115e59;
  background: #0f766e;
  color: #fff;
}

/* La letra identifica el grupo; el color es solo un refuerzo independiente. */
.zestia-ops-shell--kds .kds-group-marker {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  min-width: 38px;
  min-height: 38px;
  padding: 5px 7px;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 9px;
  background: #6d28d9;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .2);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.zestia-ops-shell--kds .kds-group-marker b {
  font-size: 20px;
  font-weight: 900;
}

.zestia-ops-shell--kds .kds-group-marker small {
  font-size: 12px;
  font-weight: 900;
}

.zestia-ops-shell--kds .kds-group-marker--1 { background: #6d28d9; }
.zestia-ops-shell--kds .kds-group-marker--2 { background: #a21caf; }
.zestia-ops-shell--kds .kds-group-marker--3 { background: #86198f; }
.zestia-ops-shell--kds .kds-group-marker--4 { background: #9d174d; }
.zestia-ops-shell--kds .kds-group-marker--5 { background: #854d0e; }
.zestia-ops-shell--kds .kds-group-marker--6 { background: #4c1d95; }
.zestia-ops-shell--kds .kds-group-marker--7 { background: #701a75; }
.zestia-ops-shell--kds .kds-group-marker--8 { background: #831843; }
.zestia-ops-shell--kds .kds-group-marker--missing {
  min-width: 54px;
  border-color: #fca5a5;
  background: #334155;
  color: #fff;
}

.zestia-ops-shell--kds .kds-group-marker--missing b {
  font-size: 11px;
  letter-spacing: .025em;
}

.zestia-ops-shell--kds .kds-priority--route,
.zestia-ops-shell--kds .kds-priority--route_ready {
  border-color: #8fcfc7;
  background: #e9faf7;
  color: #075e56;
}

.zestia-ops-shell--kds .kds-priority--route_due,
.zestia-ops-shell--kds .kds-priority--route_late {
  border-color: #e9a49b;
  background: #fff0ee;
  color: #9f261d;
}

.zestia-ops-shell--kds .kds-priority--route_unknown {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #475569;
}

.zestia-ops-shell--kds .kds-ops-hint--route,
.zestia-ops-shell--kds .kds-ops-hint--route_ready {
  border-left-color: #087a70;
  background: #edf9f7;
}

.zestia-ops-shell--kds .kds-ops-hint--route_due,
.zestia-ops-shell--kds .kds-ops-hint--route_late {
  border-left-color: #c4372b;
  background: #fff1ef;
}

.zestia-ops-shell--kds .kds-ops-hint--route_unknown {
  border-left-color: #64748b;
  background: #f1f5f9;
}

.zestia-ops-shell--kds .kds-ticket__wall-detail-toggle,
.zestia-ops-shell--kds .kds-ticket__more-items,
.zestia-ops-shell--kds .kds-wall-pager {
  display: none;
}

/* KDS mural: la pantalla grande prioriza comandas, tiempos y acciones. */
@media (min-width: 981px) {
  html:has(body.zestia-ops-shell--kds.kds-focus),
  body.zestia-ops-shell--kds.kds-focus {
    height: 100%;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .site-header.zestia-ops-header {
    min-height: 64px;
    padding: 6px 16px;
  }

  .zestia-ops-shell--kds.kds-focus .zestia-ops-brand__mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .zestia-ops-shell--kds.kds-focus .zestia-ops-status {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .zestia-ops-shell--kds.kds-focus .main-nav.zestia-ops-nav a,
  .zestia-ops-shell--kds.kds-focus .kds-fullscreen-toggle {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .zestia-ops-shell--kds.kds-focus .content.zestia-ops-main {
    display: grid;
    grid-template-rows: 62px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    height: calc(100dvh - 64px);
    min-height: 0;
    padding: 8px 12px 10px;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .kds-operation-alert {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 120;
    max-width: 520px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: 160px minmax(360px, 1fr) 245px 150px 92px;
    gap: 5px;
    min-height: 0;
    margin: 0;
    padding: 4px;
    border-radius: 10px;
    box-shadow: none;
  }

  .zestia-ops-shell--kds.kds-focus :is(
    .kds-workbar__station,
    .kds-workbar__counts,
    .kds-workbar__deadline,
    .kds-workbar__lucia,
    .kds-tools-panel > summary
  ) {
    min-height: 52px;
    border-radius: 8px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__station {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 4px 6px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__station strong {
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__station select {
    min-height: 32px;
    padding: 5px 8px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__counts {
    min-height: 52px;
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    gap: 3px;
    padding: 3px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__filter {
    min-height: 44px;
    padding: 4px 7px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__filter strong {
    font-size: 25px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__filter small {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__deadline {
    grid-template-areas: "time label countdown" "time label countdown";
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 2px 7px;
    min-height: 52px;
    padding: 5px 8px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__deadline .kitchen-deadline-board__time {
    font-size: 31px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__deadline .kitchen-deadline-board__countdown {
    align-self: center;
    font-size: 15px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__deadline :is(
    .kitchen-deadline-board__meta,
    .kitchen-deadline-board__status
  ) {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__lucia {
    grid-template-columns: minmax(48px, 1fr) 44px 44px;
    min-height: 52px;
    padding: 3px 5px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__lucia .lucia-status span {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__lucia .lucia-toggle {
    min-height: 38px;
    font-size: 10px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-tools-panel > summary {
    min-height: 52px;
    padding: 0 8px;
    font-size: 11px;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-board[data-kds-wall="true"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 86px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    height: auto;
    min-height: 0;
    margin: 0;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush {
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 6px;
    min-height: 0;
    max-height: none;
    padding: 6px;
    overflow: hidden;
    border-left: 5px solid #dc2626;
    border-radius: 11px;
    box-shadow: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__head {
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: start;
    gap: 4px;
    min-height: 0;
    padding: 4px 8px 4px 2px;
    border-right: 1px solid #e2e8f0;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__head h2 {
    font-size: 18px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__table {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__row--head {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__row:not(.kds-rush__row--head) {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 6px;
    min-height: 66px;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    background: #fffaf0;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__row:not(.kds-rush__row--head) > span:first-child strong {
    font-size: 22px;
    line-height: 1;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__row:not(.kds-rush__row--head) > span:first-child small,
  .zestia-ops-shell--kds.kds-focus .kds-rush__row span:nth-child(2),
  .zestia-ops-shell--kds.kds-focus .kds-rush__row span:nth-child(4),
  .zestia-ops-shell--kds.kds-focus .kds-rush__row span:nth-child(6) {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__row span:nth-child(3) {
    font-size: 18px;
    font-weight: 950;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__row span:nth-child(5) {
    overflow: hidden;
    color: #475569;
    font-size: 11px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zestia-ops-shell--kds.kds-focus .kds-rush__row:nth-child(n + 6) {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-column {
    grid-row: 2;
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 8px;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 11px;
    scrollbar-width: thin;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-column__head {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    margin: -8px -8px 0;
    padding: 7px 10px;
    border-radius: 10px 10px 7px 7px;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-column__head h2 {
    font-size: 22px;
    font-weight: 950;
    letter-spacing: .015em;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-column[data-kds-wall-page-exhausted="true"]::after {
    content: "Columna revisada · sin más comandas";
    display: grid;
    flex: 1 1 auto;
    place-items: center;
    min-height: 120px;
    padding: 18px;
    border: 1px dashed #b9c6d5;
    border-radius: 10px;
    background: #f8fafc;
    color: #526174;
    font-size: 15px;
    font-weight: 850;
    text-align: center;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket {
    align-self: start;
    gap: 7px;
    height: max-content;
    min-height: max-content;
    padding: 9px;
    overflow: visible;
    border-left-width: 5px;
    border-radius: 10px;
    box-shadow: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket + .kds-ticket {
    margin-top: 0;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .ticket-head h3 {
    width: 60px;
    min-height: 60px;
    font-size: 30px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__title strong {
    font-size: 17px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__title span,
  .zestia-ops-shell--kds.kds-focus .kds-ticket__scope,
  .zestia-ops-shell--kds.kds-focus .kds-ops-hint span,
  .zestia-ops-shell--kds.kds-focus .sync-state p,
  .zestia-ops-shell--kds.kds-focus .station-grid,
  .zestia-ops-shell--kds.kds-focus .kds-auto-note {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-meta {
    gap: 5px;
    margin: 0;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-meta :is(.pill, .chip) {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 10px;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-deadline {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 6px;
    min-height: 42px;
    padding: 6px 8px;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-deadline__time {
    font-size: 24px;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items {
    gap: 5px;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items > li {
    padding: 7px 8px;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-item__top > span,
  .zestia-ops-shell--kds.kds-focus .ticket-items > li > span {
    font-size: 16px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 6px;
    margin-top: 1px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__actions :is(form, button, .btn) {
    width: 100%;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__actions :is(button, .btn) {
    min-height: 42px;
  }
}

@media (max-width: 980px) {
  .zestia-ops-shell--kds .site-header.zestia-ops-header {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 54px;
    padding: 5px 8px;
  }

  .zestia-ops-shell--kds .zestia-ops-header__actions {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 4px;
    width: auto;
    min-width: 0;
    opacity: 1;
    cursor: auto;
  }

  .zestia-ops-shell--kds .zestia-ops-status {
    display: none;
  }

  .zestia-ops-shell--kds .kds-fullscreen-toggle {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .zestia-ops-shell--kds .kds-fullscreen-toggle::before {
    display: block;
    width: 16px;
    height: 16px;
    background:
      linear-gradient(currentColor, currentColor) left top / 7px 2px no-repeat,
      linear-gradient(currentColor, currentColor) left top / 2px 7px no-repeat,
      linear-gradient(currentColor, currentColor) right top / 7px 2px no-repeat,
      linear-gradient(currentColor, currentColor) right top / 2px 7px no-repeat,
      linear-gradient(currentColor, currentColor) left bottom / 7px 2px no-repeat,
      linear-gradient(currentColor, currentColor) left bottom / 2px 7px no-repeat,
      linear-gradient(currentColor, currentColor) right bottom / 7px 2px no-repeat,
      linear-gradient(currentColor, currentColor) right bottom / 2px 7px no-repeat;
    content: "";
  }

  .zestia-ops-shell--kds .main-nav.zestia-ops-nav {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    padding-block-end: 0;
  }

  .zestia-ops-shell--kds .main-nav.zestia-ops-nav a {
    min-height: 44px;
    padding: 7px 9px;
    font-size: 11px;
  }

  .zestia-ops-shell--kds .kds-workbar {
    position: relative;
    top: auto;
    grid-template-columns: minmax(126px, .72fr) minmax(142px, 1fr) 48px;
    grid-template-areas:
      "station lucia tools"
      "deadline counts counts";
    gap: 4px;
    padding: 4px;
  }

  .zestia-ops-shell--kds .kds-workbar__station {
    grid-area: station;
    grid-template-columns: minmax(0, 1fr);
    min-height: 48px;
    padding: 1px;
  }

  .zestia-ops-shell--kds .kds-workbar__station strong {
    display: none;
  }

  .zestia-ops-shell--kds .kds-workbar__station select {
    min-height: 44px;
    padding: 5px 7px;
    font-size: 12px;
  }

  .zestia-ops-shell--kds .kds-workbar__counts {
    grid-area: counts;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    min-height: 48px;
    padding: 2px;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket + .kds-ticket {
    margin-top: 0;
  }

  .zestia-ops-shell--kds .kds-workbar__filter {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px;
    min-height: 44px;
    padding: 3px 4px;
  }

  .zestia-ops-shell--kds .kds-workbar__filter span {
    font-size: 9px;
  }

  .zestia-ops-shell--kds .kds-workbar__filter strong {
    font-size: 18px;
  }

  .zestia-ops-shell--kds .kds-workbar__filter small {
    display: none;
  }

  .zestia-ops-shell--kds .kds-workbar__deadline {
    grid-area: deadline;
    grid-template-areas:
      "label label"
      "time countdown";
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 5px;
    min-height: 48px;
    padding: 3px 6px;
  }

  .zestia-ops-shell--kds .kds-workbar__deadline .kitchen-deadline-board__label {
    font-size: 8px;
  }

  .zestia-ops-shell--kds .kds-workbar__deadline .kitchen-deadline-board__time {
    align-self: center;
    font-size: 22px;
  }

  .zestia-ops-shell--kds .kds-workbar__deadline .kitchen-deadline-board__countdown {
    align-self: center;
    justify-self: end;
    overflow: hidden;
    max-width: 100%;
    font-size: 10px;
    text-overflow: ellipsis;
  }

  .zestia-ops-shell--kds .kds-workbar__deadline :is(
    .kitchen-deadline-board__meta,
    .kitchen-deadline-board__status
  ) {
    display: none;
  }

  .zestia-ops-shell--kds .kds-workbar__lucia {
    grid-area: lucia;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: 2px;
    min-height: 48px;
    max-height: 48px;
    padding: 2px 3px;
  }

  .zestia-ops-shell--kds .kds-workbar__lucia .lucia-status strong {
    font-size: 12px;
  }

  .zestia-ops-shell--kds .kds-workbar__lucia .lucia-status span {
    display: none;
  }

  .zestia-ops-shell--kds .kds-workbar__lucia .lucia-toggle {
    min-height: 44px;
    padding: 2px;
    font-size: 9px;
  }

  .zestia-ops-shell--kds .kds-workbar__lucia .lucia-toggle input {
    width: 14px;
    height: 14px;
    margin: 0;
  }

  .zestia-ops-shell--kds .kds-tools-panel {
    grid-area: tools;
  }

  .zestia-ops-shell--kds .kds-tools-panel > summary {
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .zestia-ops-shell--kds .kds-tools-panel > summary::before {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: -6px 0 currentColor, 6px 0 currentColor;
    content: "";
  }

  .zestia-ops-shell--kds .kds-lane-tabs {
    grid-column: 1 / -1;
    display: grid;
    position: sticky;
    top: 0;
    z-index: 45;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
    border: 1px solid #d9e2ed;
    border-radius: 13px;
    background: rgba(245, 248, 252, .96);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
    backdrop-filter: blur(10px);
  }

  .zestia-ops-shell--kds .kds-lane-tabs button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3px;
    min-height: 44px;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: #fff;
    color: #334155;
  }

  .zestia-ops-shell--kds .kds-lane-tabs button[aria-selected="true"] {
    border-color: #172033;
    background: #172033;
    color: #fff;
  }

  .zestia-ops-shell--kds .kds-lane-tabs span {
    overflow: hidden;
    font-size: 11px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zestia-ops-shell--kds .kds-lane-tabs strong {
    font-family: var(--zops-font-data);
    font-size: 18px;
  }

  .zestia-ops-shell--kds .kitchen-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .zestia-ops-shell--kds .kds-rush {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
    gap: 4px;
    padding: 4px;
    border-radius: 11px;
  }

  .zestia-ops-shell--kds .kds-rush__head {
    min-height: 40px;
    padding: 3px 7px;
  }

  .zestia-ops-shell--kds .kds-rush__head h2 {
    font-size: 15px;
  }

  .zestia-ops-shell--kds .kds-rush__head .badge {
    margin-left: auto;
  }

  .zestia-ops-shell--kds .kds-rush__head p,
  .zestia-ops-shell--kds .kitchen-column__head p {
    display: none;
  }

  .zestia-ops-shell--kds .kds-rush__table {
    max-height: 148px;
    overscroll-behavior: contain;
  }

  .zestia-ops-shell--kds .kds-rush__row:not(.kds-rush__row--head):not([hidden]) {
    display: grid;
  }

  .zestia-ops-shell--kds .kitchen-board[data-active-lane="accepted"] [data-kds-lane]:not([data-kds-lane="accepted"]),
  .zestia-ops-shell--kds .kitchen-board[data-active-lane="prep"] [data-kds-lane]:not([data-kds-lane="prep"]),
  .zestia-ops-shell--kds .kitchen-board[data-active-lane="ready"] [data-kds-lane]:not([data-kds-lane="ready"]) {
    display: none;
  }

  .zestia-ops-shell--kds .kds-column {
    grid-column: 1 / -1;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 520px) {
  .zestia-ops-shell--kds .site-header.zestia-ops-header {
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
  }

  .zestia-ops-shell--kds .zestia-ops-brand__copy small {
    display: none;
  }

  .zestia-ops-shell--kds .zestia-ops-brand__wordmark {
    font-size: 16px;
  }

  .zestia-ops-shell--kds .kds-workbar__deadline {
    grid-template-areas: "label label" "time countdown";
  }

  .zestia-ops-shell--kds .kds-workbar__filter {
    gap: 1px;
    padding: 2px;
  }

  .zestia-ops-shell--kds .kds-workbar__filter span {
    font-size: 8px;
  }

  .zestia-ops-shell--kds .kds-workbar__filter strong {
    font-size: 17px;
  }

  .zestia-ops-shell--kds .kds-rush__row {
    grid-template-columns: 62px minmax(80px, .9fr) minmax(72px, .8fr);
  }

  .zestia-ops-shell--kds .kds-rush__row span:nth-child(4),
  .zestia-ops-shell--kds .kds-rush__row span:nth-child(5),
  .zestia-ops-shell--kds .kds-rush__row span:nth-child(6) {
    display: none;
  }

  .zestia-ops-shell--kds .kds-rush__row:nth-child(n + 6):not([hidden]) {
    display: grid;
  }
}

/* Wallboard v2: a kitchen TV never depends on page or lane scrolling. */
.zestia-ops-shell--kds .kds-ticket__wall-status {
  display: contents;
}

@media (min-width: 981px) {
  .zestia-ops-shell--kds.kds-focus .site-header.zestia-ops-header {
    min-height: 56px;
    padding: 5px 14px;
  }

  .zestia-ops-shell--kds.kds-focus .content.zestia-ops-main {
    grid-template-rows: 58px minmax(0, 1fr);
    gap: 6px;
    height: calc(100dvh - 56px);
    padding: 6px 10px 8px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar {
    min-height: 58px;
  }

  .zestia-ops-shell--kds.kds-focus #kitchen-print-status {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 240;
    width: min(520px, calc(100vw - 28px));
    margin: 0;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .2);
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-board[data-kds-wall="true"] {
    position: relative;
    grid-template-rows: 40px minmax(0, 1fr);
    gap: 6px;
    --kds-wall-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-family: var(--kds-wall-font);
  }

  .zestia-ops-shell--kds.kds-focus .kds-lane-tabs,
  .zestia-ops-shell--kds.kds-focus .kds-rush {
    display: none !important;
  }

  .zestia-ops-shell--kds.kds-focus .kds-wall-pager:not([hidden]) {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    padding: 3px 7px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .055);
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    flex: 1 1 330px;
    gap: 8px;
    min-width: 240px;
    max-width: 390px;
    min-height: 32px;
    padding: 4px 9px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status strong,
  .zestia-ops-shell--kds.kds-focus .kds-route-status span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status strong {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status .kds-group-marker {
    flex: 0 0 auto;
    min-width: 28px;
    min-height: 26px;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 900;
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status--info {
    border-color: #8fcfc7;
    background: #edf9f7;
    color: #075e56;
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status--success {
    border-color: #83c99a;
    background: #edf9f0;
    color: #166534;
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status--danger {
    border-color: #e9a49b;
    background: #fff0ee;
    color: #9f261d;
  }

  .zestia-ops-shell--kds.kds-focus .kds-wall-pager button {
    width: auto;
    min-width: 88px;
    min-height: 32px;
    padding: 5px 10px;
    border-color: #b9c6d5;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-wall-pager button:focus-visible,
  .zestia-ops-shell--kds.kds-focus .kds-ticket__wall-detail-toggle:focus-visible {
    outline: 3px solid #075985;
    outline-offset: 2px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-wall-pager__status {
    flex: 0 1 280px;
    min-width: 220px;
    color: #172033;
    font-family: var(--zops-font-data);
    font-size: 15px;
    font-weight: 900;
    text-align: center;
  }

  .zestia-ops-shell--kds.kds-focus .kds-column {
    grid-row: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 5px;
    height: 100%;
    min-height: 0;
    padding: 6px;
    overflow: hidden;
    overscroll-behavior: none;
    scrollbar-width: none;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-column__head {
    position: static;
    flex: 0 0 40px;
    min-height: 40px;
    margin: -6px -6px 0;
    padding: 5px 9px;
    backdrop-filter: none;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-column__head h2 {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: .015em;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket[data-kds-wall-page-hidden="true"] {
    display: none !important;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 7px;
    overflow: hidden;
  }

  /* The wall pager owns spacing. Legacy margins must not escape its height budget. */
  .zestia-ops-shell--kds.kds-focus .kds-column > .kds-ticket + .kds-ticket {
    margin-top: 0;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .ticket-head {
    min-height: 42px;
    padding-right: 88px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .ticket-head h3 {
    width: 76px;
    flex: 0 0 76px;
    min-height: 42px;
    font-variant-numeric: tabular-nums;
    font-size: 34px;
    font-weight: 900;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .kds-group-marker {
    min-width: 42px;
    min-height: 42px;
    padding: 5px 7px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .kds-group-marker b {
    font-size: 21px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__title strong {
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__title span,
  .zestia-ops-shell--kds.kds-focus .ticket-meta > :not(.kds-priority),
  .zestia-ops-shell--kds.kds-focus .kds-ticket__scope,
  .zestia-ops-shell--kds.kds-focus .sync-state p,
  .zestia-ops-shell--kds.kds-focus .station-grid,
  .zestia-ops-shell--kds.kds-focus .kds-auto-note,
  .zestia-ops-shell--kds.kds-focus .kds-ops-hint span {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-meta {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__wall-status {
    display: flex;
    align-items: stretch;
    gap: 4px;
    min-height: 32px;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-deadline {
    flex: 0 1 auto;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 5px;
    min-width: 112px;
    min-height: 32px;
    padding: 3px 6px;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-deadline__label {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-deadline__time {
    font-size: 21px;
    font-weight: 900;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-deadline__countdown {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ops-hint {
    flex: 0 1 auto;
    align-items: center;
    margin: 0;
    min-height: 28px;
    padding: 4px 7px;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ops-hint strong {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus [data-kds-items-scope] {
    flex: 0 0 auto;
    min-height: 0;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    min-height: 0;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items > li {
    position: relative;
    height: 48px;
    min-width: 0;
    padding: 3px 6px;
    overflow: hidden;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-item__top {
    display: block;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-item__top > span {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    text-transform: uppercase;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items > li:has(.ticket-item__change-flag) .ticket-item__top > span {
    padding-right: 72px;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-inline-form {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-item__top > span,
  .zestia-ops-shell--kds.kds-focus .ticket-items > li > span {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items > li.kds-ticket-item--wide {
    grid-column: 1 / -1;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items > li.kds-ticket-item--wide .ticket-item__top > span {
    text-transform: none;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-item__change-flag {
    position: absolute;
    top: 2px;
    right: 3px;
    display: block;
    max-width: 70px;
    padding: 2px 4px;
    overflow: hidden;
    border-radius: 5px;
    background: #ffedd5;
    color: #9a3412;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-item__change-flag + ul,
  .zestia-ops-shell--kds.kds-focus .ticket-item__change-flag ~ ul {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-item__stations {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items > li:nth-child(n + 5) {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items > li > ul {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__notes {
    flex: 0 0 auto;
    margin: 0;
    overflow: hidden;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zestia-ops-shell--kds.kds-focus .kds-coordination-strip {
    flex: 1 1 132px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    min-width: 96px;
    max-width: 180px;
    min-height: 28px;
    padding: 4px 7px;
    overflow: hidden;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a5f;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-coordination-strip strong,
  .zestia-ops-shell--kds.kds-focus .kds-coordination-strip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zestia-ops-shell--kds.kds-focus .kds-coordination-strip--held {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
  }

  .zestia-ops-shell--kds.kds-focus .kds-coordination-strip--blocked {
    border-color: #fecaca;
    background: #fff1f2;
    color: #9f1239;
  }

  .zestia-ops-shell--kds.kds-focus .kds-coordination-strip--done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
  }

  .zestia-ops-shell--kds.kds-focus .sync-state,
  .zestia-ops-shell--kds.kds-focus .kds-coordination-detail {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__actions {
    flex: 0 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 4px;
    margin-top: 0;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__actions :is(button, .btn) {
    min-height: 48px;
    padding: 5px 8px;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__wall-detail-toggle {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 48px;
    padding: 4px 7px;
    border: 1px solid #9fb0c3;
    border-radius: 7px;
    background: #fff;
    color: #172033;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .tag,
  .zestia-ops-shell--kds.kds-focus .kds-priority {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .tag-app {
    border-color: #166534;
    background: #15803d;
    color: #fff;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket[data-kds-wall-fit="compact"] .ticket-items > li:nth-child(n + 3),
  .zestia-ops-shell--kds.kds-focus .kds-ticket[data-kds-wall-fit="minimal"] .ticket-items > li:nth-child(n + 2) {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket[data-kds-wall-fit="minimal"] :is(
    .kds-ticket__notes,
    .kds-ops-hint,
    .kds-coordination-strip
  ),
  .zestia-ops-shell--kds.kds-focus .kds-ticket[data-kds-wall-fit="summary"] :is(
    .kds-ticket__wall-status,
    [data-kds-items-scope],
    .kds-ticket__notes,
    .kds-ops-hint,
    .kds-coordination-strip
  ) {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket[data-kds-wall-truncated="true"] .kds-ticket__wall-detail-toggle {
    border-color: #075985;
    background: #e0f2fe;
    color: #0c4a6e;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open {
    inset: 0;
    display: grid;
    width: min(880px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 16px;
    overflow: auto;
    border: 1px solid #9fb0c3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(15, 23, 42, .34);
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open::backdrop {
    background: rgba(15, 23, 42, .5);
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-head {
    padding-right: 86px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-ticket__title span,
  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-meta > *,
  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-ticket__scope,
  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .sync-state p,
  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-ops-hint span {
    display: initial;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-meta,
  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-ticket__scope {
    display: flex;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-ticket__wall-status {
    display: contents;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .station-grid {
    display: grid;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open [data-kds-items-scope],
  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-items {
    overflow: visible;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-items {
    grid-template-columns: 1fr;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-items > li {
    grid-column: auto;
    height: auto;
    min-height: 0;
    padding: 9px 10px;
    overflow: visible;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-item__top {
    display: flex;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-item__top > span {
    display: block;
    padding-right: 0;
    overflow: visible;
    text-transform: none;
    -webkit-line-clamp: initial;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-item__top > span,
  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-ticket__actions :is(button, .btn) {
    font-size: 16px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-inline-form {
    display: block;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-inline-form button {
    min-height: 44px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-item__change-flag {
    position: static;
    display: inline-flex;
    max-width: none;
    margin-top: 5px;
    font-size: 13px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-items > li:nth-child(n + 5) {
    display: list-item;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-items > li > ul {
    display: block;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-coordination-strip {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .sync-state {
    display: block;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-coordination-detail {
    display: flex;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-ticket__notes {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open :is(
    .kds-ticket__title strong,
    .kitchen-deadline__countdown,
    .kds-ops-hint strong,
    .kds-coordination-strip,
    .kds-ticket__actions button,
    .kds-ticket__actions .btn
  ) {
    text-transform: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-ticket__more-items {
    display: none;
  }
}

@media (min-width: 981px) and (max-width: 1390px) {
  .zestia-ops-shell--kds.kds-focus .kds-route-status {
    flex-basis: 410px;
    min-width: 390px;
    max-width: 430px;
    font-size: 13px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status > span {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-wall-pager__status {
    flex-basis: 220px;
    min-width: 190px;
    font-size: 13px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-wall-pager button {
    min-width: 74px;
    padding-inline: 7px;
  }
}

/* Shared dispatch meaning: the same confirmed group reads identically in
   Cocina and in the main Business board. Colour reinforces the persistent
   letter; the instruction never depends on colour alone. */
.zestia-ops-shell--kds .zops-joint-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 2px solid #6d28d9;
  border-left-width: 8px;
  border-radius: 10px;
  background: #f4f0ff;
  color: #35116b;
}

.zestia-ops-shell--kds .zops-joint-group > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.zestia-ops-shell--kds .zops-joint-group strong,
.zestia-ops-shell--kds .zops-joint-group > b {
  color: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: .015em;
}

.zestia-ops-shell--kds .zops-joint-group span {
  color: #4c1d95;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
}

.zestia-ops-shell--kds .zops-joint-group > b {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 7px;
  background: #6d28d9;
  color: #ffffff;
  white-space: nowrap;
}

.zestia-ops-shell--kds .zops-joint-group--waiting {
  border-color: #9d174d;
  background: #fff1f5;
  color: #831843;
}

.zestia-ops-shell--kds .zops-joint-group--waiting span {
  color: #831843;
}

.zestia-ops-shell--kds .zops-joint-group--waiting > b {
  background: #9d174d;
}

.zestia-ops-shell--kds .zops-joint-group--ready {
  border-color: #047857;
  background: #eef9f5;
  color: #065f46;
}

.zestia-ops-shell--kds .zops-joint-group--ready span {
  color: #065f46;
}

.zestia-ops-shell--kds .zops-joint-group--ready > b {
  background: #047857;
}

.zestia-ops-shell--kds .zops-joint-group--missing {
  border-color: #b42318;
  background: #fff5f3;
  color: #8a1c14;
}

.zestia-ops-shell--kds .zops-joint-group--missing span {
  color: #8a1c14;
}

.zestia-ops-shell--kds .zops-joint-group--missing > b {
  background: #b42318;
}

.zestia-ops-shell--kds .sync-state > strong,
.zestia-ops-shell--kds .kds-coordination-strip > strong {
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* A 1366px kitchen display at 125% zoom still remains a three-lane wallboard. */
@media (min-width: 981px) and (max-width: 1180px) {
  .zestia-ops-shell--kds.kds-focus .kds-workbar {
    grid-template-columns: 126px minmax(290px, 1fr) 205px 122px 70px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__counts {
    grid-template-columns: repeat(4, minmax(52px, 1fr));
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__filter {
    padding-inline: 4px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__filter strong {
    font-size: 22px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__deadline {
    padding-inline: 5px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__deadline .kitchen-deadline-board__time {
    font-size: 27px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__lucia {
    grid-template-columns: minmax(42px, 1fr) 40px 40px;
    padding-inline: 3px;
  }

  .zestia-ops-shell--kds.kds-focus .main-nav.zestia-ops-nav a {
    padding-inline: 7px;
  }
}

/* Print policy is configured deliberately from the novice-friendly settings dialog. */
.zestia-ops-shell--kds .kds-workbar__print {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 2px 6px;
  min-width: 0;
  padding: 2px 7px;
  border: 1px solid #b7a98f;
  border-radius: 8px;
  background: #fffaf0;
  color: #3f3424;
}

.zestia-ops-shell--kds .kds-workbar__print > span {
  align-self: center;
  overflow: hidden;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.zestia-ops-shell--kds .kds-workbar__print select {
  grid-column: 2;
  grid-row: 1;
  min-width: 52px;
  min-height: 30px;
  padding: 2px 6px;
  border: 2px solid #7c6744;
  border-radius: 7px;
  background: #ffffff;
  color: #241d13;
  font-size: 16px;
  font-weight: 950;
}

.zestia-ops-shell--kds .kds-workbar__print select:disabled {
  border-color: #b7a98f;
  background: #eee7d9;
  color: #6b6254;
  cursor: not-allowed;
}

.zestia-ops-shell--kds .kds-workbar__print small {
  grid-column: 1 / -1;
  align-self: start;
  overflow: hidden;
  color: #675b49;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 981px) {
  .zestia-ops-shell--kds.kds-focus .kds-workbar {
    grid-template-columns: 145px minmax(330px, 1fr) 225px 128px 145px 82px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__print {
    min-height: 52px;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .zestia-ops-shell--kds.kds-focus .kds-workbar {
    grid-template-columns: 120px minmax(280px, 1fr) 190px 112px 116px 64px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-workbar__print {
    padding-inline: 5px;
  }
}

@media (max-width: 980px) {
  .zestia-ops-shell--kds .kds-workbar {
    grid-template-areas:
      "station print tools"
      "deadline counts counts"
      "lucia lucia lucia";
  }

  .zestia-ops-shell--kds .kds-workbar__print {
    grid-area: print;
    min-height: 48px;
  }
}

/* Novice workflow: the wall shows work only; every configuration lives here. */
.zestia-ops-shell--kds .kds-settings-toggle {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #9f927b;
  border-radius: 9px;
  background: #fffdf8;
  color: #172033;
  font-size: 14px;
  font-weight: 900;
}

.zestia-ops-shell--kds .kds-settings-dialog {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #9f927b;
  border-radius: 18px;
  background: #fbf7ee;
  color: #172033;
  box-shadow: 0 28px 80px rgba(32, 25, 16, .3);
}

.zestia-ops-shell--kds .kds-settings-dialog::backdrop {
  background: rgba(23, 32, 51, .58);
  backdrop-filter: blur(3px);
}

.zestia-ops-shell--kds .kds-settings-dialog.is-open-fallback {
  position: fixed;
  inset: 16px;
  z-index: 800;
  display: block;
  margin: auto;
}

.zestia-ops-shell--kds .kds-settings-dialog__shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 34px);
}

.zestia-ops-shell--kds .kds-settings-dialog__head,
.zestia-ops-shell--kds .kds-settings-dialog__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #c9bea9;
  background: #f4eddd;
}

.zestia-ops-shell--kds .kds-settings-dialog__foot {
  justify-content: flex-end;
  border-top: 1px solid #c9bea9;
  border-bottom: 0;
}

.zestia-ops-shell--kds .kds-settings-dialog__head span {
  color: #675b49;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.zestia-ops-shell--kds .kds-settings-dialog__head h2 {
  margin: 2px 0 0;
  font-size: 28px;
}

.zestia-ops-shell--kds .kds-settings-dialog__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  padding: 16px;
  overflow: auto;
}

.zestia-ops-shell--kds .kds-settings-dialog .kds-tools-card {
  position: static;
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #c9bea9;
  border-radius: 12px;
  background: #fffdf8;
  box-shadow: none;
}

.zestia-ops-shell--kds .kds-settings-dialog .kds-tools-card--wide {
  grid-column: 1 / -1;
}

.zestia-ops-shell--kds .kds-settings-station,
.zestia-ops-shell--kds .kds-settings-filters {
  display: grid;
  gap: 7px;
}

.zestia-ops-shell--kds .kds-settings-filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.zestia-ops-shell--kds .kds-settings-dialog :is(select, input[type="text"], button, .btn) {
  min-height: 44px;
  font-size: 16px;
}

.zestia-ops-shell--kds .kds-settings-dialog .kds-workbar__print {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.9fr);
  min-height: 86px;
  padding: 10px;
}

.zestia-ops-shell--kds .kds-settings-dialog .kds-workbar__print > span,
.zestia-ops-shell--kds .kds-settings-dialog .kds-workbar__print small {
  white-space: normal;
}

.zestia-ops-shell--kds .kds-print-help {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.zestia-ops-shell--kds .kds-settings-dialog .lucia-kds-bar {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto auto;
  gap: 8px;
}

.zestia-ops-shell--kds .kds-settings-dialog .lucia-toggle {
  min-height: 44px;
}

.zestia-ops-shell--kds .kds-ticket__secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zestia-ops-shell--kds .kds-handoff-note {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  border: 2px solid #047857;
  border-radius: 8px;
  background: #eef9f5;
  color: #065f46;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

@media (min-width: 981px) {
  .zestia-ops-shell--kds.kds-focus .content.zestia-ops-main {
    display: block;
    height: calc(100dvh - 56px);
    padding: 6px 10px 8px;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-board[data-kds-wall="true"] {
    grid-template-rows: minmax(0, 1fr) 40px;
    height: 100%;
  }

  .zestia-ops-shell--kds.kds-focus .kds-column {
    grid-row: 1;
  }

  .zestia-ops-shell--kds.kds-focus .kds-wall-pager:not([hidden]) {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(180px, .8fr) auto minmax(300px, 1.4fr) auto;
    gap: 7px;
    min-height: 40px;
    padding: 3px 7px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status {
    min-width: 0;
    max-width: none;
    min-height: 32px;
    font-size: 13px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-route-status > span {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-wall-pager__next {
    min-width: 300px;
    min-height: 32px;
    padding: 4px 14px;
    border-color: #172033;
    background: #172033;
    color: #fffdf8;
  }

  .zestia-ops-shell--kds.kds-focus .kds-wall-pager__status {
    display: block;
    min-width: 0;
    color: inherit;
    font-size: 14px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket {
    gap: 3px;
    padding: 5px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .ticket-head {
    min-height: 38px;
    padding-right: 80px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .ticket-head h3 {
    min-height: 38px;
    font-size: 31px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket .kds-group-marker {
    min-height: 38px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__wall-status,
  .zestia-ops-shell--kds.kds-focus .kitchen-deadline {
    min-height: 28px;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-deadline__label {
    display: inline;
    align-self: center;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .zestia-ops-shell--kds.kds-focus .kitchen-deadline__time {
    font-size: 18px;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items > li {
    height: 44px;
  }

  .zestia-ops-shell--kds.kds-focus .ticket-items > li:nth-child(n + 3) {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__actions :is(button, .btn),
  .zestia-ops-shell--kds.kds-focus .kds-handoff-note {
    min-height: 44px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__secondary-actions {
    display: none;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket__wall-detail-toggle {
    top: 5px;
    right: 5px;
    min-height: 42px;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .ticket-items > li:nth-child(n + 3) {
    display: list-item;
  }

  .zestia-ops-shell--kds.kds-focus .kds-ticket:popover-open .kds-ticket__secondary-actions {
    display: flex;
  }
}

@media (max-width: 980px) {
  .zestia-ops-shell--kds .kds-settings-dialog__body {
    grid-template-columns: 1fr;
  }

  .zestia-ops-shell--kds .kds-settings-dialog .kds-tools-card--wide {
    grid-column: auto;
  }
}

/* Food-safety declarations are operational blockers, not ordinary notes. */
.zestia-ops-shell--kds .kds-food-safety {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 3px 10px;
  padding: 8px 10px;
  border: 3px solid #b42318;
  border-left-width: 9px;
  border-radius: 10px;
  background: #fff1ed;
  color: #5f110c;
  box-shadow: 0 0 0 2px rgba(180, 35, 24, .14);
}

.zestia-ops-shell--kds .kds-food-safety strong {
  font-size: 16px;
  font-weight: 950;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.zestia-ops-shell--kds .kds-food-safety span {
  min-width: 0;
  color: #431407;
  font-size: 15px;
  font-weight: 900;
}

.zestia-ops-shell--kds .kds-food-safety b {
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.zestia-ops-shell--kds .kds-food-safety.is-invalid {
  border-color: #7f1d1d;
  background: #fee2e2;
  color: #450a0a;
}

.zestia-ops-shell--kds .ticket-item__food-safety {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  margin-top: 5px;
  padding: 5px 7px;
  border-radius: 7px;
  background: #b42318;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.zestia-ops-shell--kds .ticket-item__food-safety strong,
.zestia-ops-shell--kds .ticket-item__food-safety span {
  color: inherit;
  font: inherit;
}

.zestia-ops-shell--kds .kds-food-safety-blocked {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 9px;
  background: #7f1d1d;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}

/* KDS contrast skin: warm canvas, vivid workflow lanes and clear ticket state. */
.zestia-ops-shell--kds {
  --kds-canvas-eggshell: #f4eddd;
  --kds-surface-eggshell: #fbf7ee;
  --kds-surface-soft-eggshell: #f8f0df;
  --kds-ticket-surface: #fffdf8;
  --kds-ticket-border: #9f927b;
  --kds-compact-bg: var(--kds-canvas-eggshell);
  --zops-canvas: var(--kds-canvas-eggshell);
  --zops-surface: var(--kds-surface-eggshell);
  --zops-surface-soft: var(--kds-surface-soft-eggshell);
  background: var(--kds-canvas-eggshell);
}

body.kds-shell.zestia-ops-shell--kds {
  background: var(--kds-canvas-eggshell);
}

.zestia-ops-shell--kds .site-header.zestia-ops-header,
.zestia-ops-shell--kds .kds-wall-pager:not([hidden]) {
  background: rgba(251, 247, 238, .97);
}

.zestia-ops-shell--kds .kds-workbar {
  background: rgba(251, 247, 238, .97);
}

.zestia-ops-shell--kds .kds-column[data-kds-lane="accepted"] {
  --kds-lane-accent: #9a4c00;
  --kds-lane-border: #9a4c00;
  --kds-lane-soft: #fff8e8;
  --kds-lane-shadow: rgba(154, 76, 0, .18);
}

.zestia-ops-shell--kds .kds-column[data-kds-lane="prep"] {
  --kds-lane-accent: #0369a1;
  --kds-lane-border: #0369a1;
  --kds-lane-soft: #eef7fb;
  --kds-lane-shadow: rgba(3, 105, 161, .18);
}

.zestia-ops-shell--kds .kds-column[data-kds-lane="ready"] {
  --kds-lane-accent: #047857;
  --kds-lane-border: #047857;
  --kds-lane-soft: #eef9f5;
  --kds-lane-shadow: rgba(4, 120, 87, .18);
}

.zestia-ops-shell--kds .kds-column[data-kds-lane] {
  border-color: var(--kds-lane-border);
  background: var(--kds-lane-soft);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .72),
    0 8px 22px var(--kds-lane-shadow);
}

.zestia-ops-shell--kds .kds-column[data-kds-lane] .kitchen-column__head {
  background: var(--kds-lane-accent);
  color: #ffffff;
  box-shadow: none;
}

.zestia-ops-shell--kds .kds-column[data-kds-lane] .kitchen-column__head h2 {
  color: #ffffff;
}

.zestia-ops-shell--kds .kds-column[data-kds-lane] .kitchen-column__head .badge {
  border-color: rgba(255, 255, 255, .72);
  background: #ffffff;
  color: var(--kds-lane-accent);
}

.zestia-ops-shell--kds .kds-column[data-kds-lane] .kds-ticket {
  --kds-ticket-accent: var(--kds-ticket-border);
  --kds-ticket-wash: var(--kds-ticket-surface);
  --kds-ticket-shadow: var(--kds-lane-shadow);
  border-color: var(--kds-ticket-accent);
  background: var(--kds-ticket-wash);
  box-shadow:
    inset 7px 0 0 var(--kds-lane-accent),
    0 6px 16px var(--kds-ticket-shadow);
}

.zestia-ops-shell--kds .kds-column[data-kds-lane] .kds-ticket.ticket-card--due-soon {
  --kds-ticket-accent: var(--kds-ticket-border);
  --kds-ticket-wash: #fff8e8;
  --kds-ticket-shadow: rgba(181, 71, 8, .2);
  box-shadow:
    inset 8px 0 0 #b54708,
    0 6px 16px var(--kds-ticket-shadow);
}

.zestia-ops-shell--kds .kds-column[data-kds-lane] .kds-ticket.ticket-card--overdue {
  --kds-ticket-accent: var(--kds-ticket-border);
  --kds-ticket-wash: #fff5f3;
  --kds-ticket-shadow: rgba(180, 35, 24, .2);
  box-shadow:
    inset 8px 0 0 #b42318,
    0 6px 16px var(--kds-ticket-shadow);
}

@media (min-width: 981px) and (max-width: 1390px) {
  .zestia-ops-shell--kds.kds-focus .kds-route-status > span {
    display: block;
  }
}
