.kitchen-page, .kitchen-shell { min-height: 100dvh; background: var(--paper); color: var(--ink); }
.kitchen-header { min-height: 76px; padding: 14px 26px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); background: var(--glass); position: sticky; top: 0; z-index: 20; }
.kitchen-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kitchen-logo { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 10px; color: var(--accent); font-size: 12px; font-weight: 600; }
.kitchen-brand strong { display: block; font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
.kitchen-brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.kitchen-header-center { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.kitchen-header-center strong { color: var(--green); font-weight: 500; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.kitchen-actions { justify-self: end; display: flex; gap: 7px; }
.utility-button.active { color: var(--green); border-color: var(--green); }
.utility-button .control-symbol { font-size: 18px; line-height: 1; }
.kitchen-content { max-width: 1580px; margin: auto; padding: 28px 26px 52px; }
.kitchen-overview { margin-bottom: 30px; }
.kitchen-overview h1 { margin: 0 0 5px; font-size: 25px; line-height: 1.25; font-weight: 600; }
.kitchen-overview p { margin: 0; color: var(--muted); font-size: 13px; }
.kds-board { display: grid; gap: 28px; }
.kds-section { min-width: 0; }
.kds-section-head { margin-bottom: 12px; }
.kds-section-head h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 600; }
.kds-section-head h2 span { margin-left: 4px; color: var(--accent); font-variant-numeric: tabular-nums; }
.kds-section.preparing .kds-section-head h2 span { color: var(--warning); }
.kds-section.ready .kds-section-head h2 span { color: var(--green); }
.kds-section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.kds-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 12px; }
.kds-ticket { min-width: 0; padding: 17px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.kds-ticket.first { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.kds-ticket.preparing { border-left: 3px solid var(--warning); }
.kds-ticket.ready { border-left: 3px solid var(--green); }
.kds-ticket-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.ticket-sequence { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.first .ticket-sequence { color: var(--accent); font-weight: 700; }
.kds-ticket-head h3 { margin: 0 0 3px; font-size: 21px; line-height: 1.25; font-weight: 600; }
.kds-ticket-head small { color: var(--muted); font-size: 11px; }
.ticket-wait { padding-top: 2px; color: var(--muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticket-wait.late { color: var(--danger); }
.kitchen-items { display: grid; margin: 14px 0; }
.kitchen-item { display: grid; grid-template-columns: 64px 28px minmax(0,1fr); align-items: start; gap: 9px; min-width: 0; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.kitchen-item + .kitchen-item { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.kitchen-item-visual { width: 64px; height: 64px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.kitchen-item-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.kitchen-item-visual.sprite { background-image: url('/assets/food-grid.png'); background-size: 200% 200%; }
.kitchen-item-visual.top-left { background-position: 0 0; }
.kitchen-item-visual.top-right { background-position: 100% 0; }
.kitchen-item-visual.bottom-left { background-position: 0 100%; }
.kitchen-item-visual.bottom-right { background-position: 100% 100%; }
.kitchen-item-visual.no-image::before { content: ''; width: 34px; height: 34px; border: 3px solid var(--muted); border-radius: 50%; box-shadow: inset 0 0 0 5px var(--soft); opacity: .55; }
.kitchen-item > strong { padding-top: 3px; color: var(--accent); font-size: 15px; }
.kitchen-item-copy { min-width: 0; padding-top: 2px; }
.kitchen-item span { font-weight: 600; }
.kitchen-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.kitchen-item .kitchen-item-note { color: var(--warning); }
.kitchen-alerts { display: grid; gap: 6px; margin: 0 0 14px; }
.allergy-strip, .customer-note { display: flex; align-items: start; gap: 8px; padding: 9px 11px; border-radius: 7px; background: var(--warning-soft); color: var(--warning); font-size: 12px; line-height: 1.45; }
.allergy-strip b { width: 19px; height: 19px; flex: 0 0 19px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 5px; }
.customer-note { flex-direction: column; gap: 2px; background: var(--soft); color: var(--ink); }
.customer-note b { color: var(--muted); font-size: 11px; }
.kds-action { width: 100%; min-height: 43px; margin-top: auto; padding: 10px 12px; border: 1px solid var(--accent-fill); border-radius: 8px; background: var(--accent-fill); color: var(--on-accent); font-size: 13px; font-weight: 700; text-align: center; }
.kds-action:disabled { opacity: .5; cursor: wait; }
.preparing .kds-action { background: transparent; color: var(--accent); }
.ready-message, .queue-message { margin: auto 0 0; padding-top: 10px; color: var(--muted); font-size: 12px; }
.ready-message { color: var(--green); }
.kds-empty { margin: 0; padding: 28px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: 13px; }
.kitchen-toast { position: fixed; z-index: 50; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100% - 30px); padding: 12px 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow); opacity: 0; pointer-events: none; font-size: 12px; }
.kitchen-toast.show { opacity: 1; }
.kitchen-toast.error { background: var(--danger-soft); color: var(--danger); }
.kitchen-error { min-height: 100dvh; display: grid; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.kitchen-error .kitchen-logo { margin-bottom: 20px; }
.kitchen-error h1 { margin: 0 0 12px; font-size: 27px; font-weight: 600; }
.kitchen-error p, .kitchen-error small { color: var(--muted); }
@media (max-width: 1100px) {
  .kitchen-header { grid-template-columns: 1fr auto; }
  .kitchen-header-center { display: none; }
  .kds-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .kitchen-header { padding: 11px 13px; gap: 9px; }
  .kitchen-brand { gap: 7px; }
  .kitchen-logo { width: 34px; height: 34px; flex-basis: 34px; font-size: 10px; }
  .kitchen-brand strong { font-size: 13px; }
  .kitchen-brand span { font-size: 10px; }
  .kitchen-actions { gap: 5px; }
  .utility-button { width: 35px; min-height: 35px; padding: 0; }
  .utility-button .control-label { display: none; }
  .kitchen-content { padding: 19px 13px 35px; }
  .kitchen-overview { margin-bottom: 24px; }
  .kitchen-overview h1 { font-size: 22px; }
  .kitchen-overview p { font-size: 12px; }
  .kds-board { gap: 25px; }
  .kds-cards { grid-template-columns: minmax(0,1fr); }
  .kds-ticket { padding: 14px; }
  .kds-ticket-head h3 { font-size: 20px; }
  .kitchen-item { grid-template-columns: 58px 26px minmax(0,1fr); gap: 8px; }
  .kitchen-item-visual { width: 58px; height: 58px; }
}
