:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090d12;
  color: #17202b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #090d12;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.kds-shell {
  width: 100%;
  min-height: 100vh;
  padding: 12px;
}

.station-shell {
  width: 100%;
  min-height: 100vh;
  padding: 8px 12px 10px;
  color: #17202b;
}

.setup-shell {
  min-height: 100vh;
}

.setup-topbar,
.section-heading,
.store-card,
.kds-topbar,
.kds-actions,
.ticket-header-toggle,
.ticket-item-line {
  display: flex;
  align-items: center;
}

.setup-topbar,
.kds-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: stretch;
  gap: 16px;
  margin-bottom: 24px;
}

.setup-topbar > :first-child,
.kds-topbar > :first-child {
  min-width: 0;
}

.setup-topbar h1,
.kds-topbar h1 {
  overflow-wrap: anywhere;
}

.setup-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: end;
  gap: 8px;
  min-width: max-content;
}

.eyebrow {
  margin: 0 0 4px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 42px;
  line-height: 1.05;
}

h2 {
  font-size: 20px;
}

.selected-store {
  margin-top: 8px;
  color: #667085;
}

.setup-panel {
  padding: 20px 0;
  border-top: 1px solid #d6dce3;
}

.section-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading p,
.kds-actions p {
  color: #667085;
  font-size: 14px;
  text-align: right;
}

.icon-button,
.ghost-button,
.view-card,
.store-card {
  border-radius: 8px;
  cursor: pointer;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 1px solid #c8d0da;
  background: #ffffff;
  color: #17202b;
}

.ghost-button {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #c8d0da;
  background: #ffffff;
  color: #17202b;
}

.demo-button.active {
  border-color: #16a34a;
  background: #dcfce7;
  color: #166534;
}

.settings-button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 900;
}

.setup-actions .settings-button,
.kds-actions .settings-button,
.build-top-actions .settings-button {
  min-height: 36px;
  justify-self: end;
}

.setup-actions .icon-button,
.kds-actions .icon-button,
.build-top-actions .icon-button {
  justify-self: end;
}

.sound-permission-button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  cursor: pointer;
  font-size: 14px;
  font-weight: 950;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  background: rgba(2, 6, 12, 0.56);
  backdrop-filter: blur(8px);
}

.settings-panel {
  width: min(460px, 100%);
  min-height: 100%;
  padding: 18px;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid #1f2937;
  background: #080d13;
  color: #f8fafc;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.38);
  animation: settings-slide-in 220ms ease-out;
}

.settings-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.settings-panel-header h2 {
  color: #f8fafc;
  font-size: 28px;
}

.settings-context {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 850;
}

.settings-panel-header .icon-button {
  width: auto;
  padding: 0 12px;
  border-color: #334155;
  background: #111827;
  color: #f8fafc;
  font-weight: 900;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-list.compact {
  gap: 8px;
}

.settings-panel .eyebrow {
  color: #94a3b8;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid #1f2937;
  border-radius: 10px;
  background: #101822;
}

.settings-row.compact {
  padding: 10px 12px;
}

.settings-row strong,
.settings-row small {
  display: block;
}

.settings-row strong {
  color: #f8fafc;
  font-size: 16px;
}

.settings-row small {
  margin-top: 3px;
  color: #94a3b8;
  line-height: 1.3;
}

.settings-row input {
  width: 26px;
  height: 26px;
  accent-color: #14b8a6;
}

.settings-section {
  margin-top: 16px;
}

.settings-section.first {
  margin-top: 0;
}

.settings-section-title {
  margin: 0 0 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.settings-note {
  margin: 0;
  padding: 12px;
  border: 1px solid #1f2937;
  border-radius: 10px;
  background: #101822;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.settings-stepper {
  display: grid;
  grid-template-columns: 42px 58px 42px;
  align-items: center;
  gap: 6px;
}

.settings-stepper .settings-secondary {
  min-height: 38px;
  padding: 0;
  font-size: 22px;
}

.settings-stepper b {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 950;
  text-align: center;
}

.alarm-sound-options {
  display: grid;
  gap: 8px;
}

.alarm-sound-option {
  width: 100%;
  padding: 12px;
  border: 1px solid #1f2937;
  border-radius: 10px;
  background: #101822;
  color: #f8fafc;
  cursor: pointer;
  text-align: left;
}

.alarm-sound-option.selected {
  border-color: #14b8a6;
  background: #0f2f2e;
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.28);
}

.alarm-sound-option strong,
.alarm-sound-option span {
  display: block;
}

.alarm-sound-option strong {
  font-size: 15px;
  font-weight: 950;
}

.alarm-sound-option span {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.25;
}

.settings-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.settings-primary,
.settings-secondary {
  min-height: 48px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 950;
}

.settings-primary {
  border: 1px solid #14b8a6;
  background: #0f766e;
  color: #ffffff;
}

.settings-secondary {
  border: 1px solid #334155;
  background: #111827;
  color: #f8fafc;
}

.settings-full {
  grid-column: 1 / -1;
}

.settings-secondary:disabled {
  border-color: #1f2937;
  background: #0f172a;
  color: #64748b;
  cursor: default;
}

.settings-message {
  min-height: 20px;
  margin-top: 12px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.35;
}

.store-list {
  display: grid;
  gap: 10px;
}

.store-card {
  width: 100%;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid #d6dce3;
  background: #ffffff;
  color: #17202b;
  text-align: left;
}

.store-card.selected {
  border-color: #0f766e;
  background: #ecfdf5;
}

.store-card strong,
.store-card small {
  display: block;
}

.store-card strong {
  font-size: 18px;
}

.store-card small {
  margin-top: 4px;
  color: #667085;
}

.store-check {
  min-width: 54px;
  color: #047857;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.view-card {
  min-height: 150px;
  padding: 18px;
  border: 1px solid #d6dce3;
  background: #ffffff;
  color: #17202b;
  text-align: left;
}

.view-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
}

.view-card span {
  color: #667085;
  line-height: 1.4;
}

.view-card:active,
.ghost-button:active,
.icon-button:active {
  transform: translateY(1px);
}

.kds-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  align-items: start;
  margin: -12px -12px 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #1f2937;
  background: rgba(9, 13, 18, 0.96);
  color: #f8fafc;
}

.kds-topbar .eyebrow,
.kds-actions p {
  color: #cbd5e1;
}

.station-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  justify-content: stretch;
  gap: 16px;
  margin: -8px -12px 8px;
  padding: 6px 12px;
  border-bottom: 1px solid #1f2937;
  background: rgba(9, 13, 18, 0.96);
  color: #f8fafc;
}

.station-topbar .selected-store {
  color: #cbd5e1;
}

.station-title-row {
  display: flex;
  align-items: baseline;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 2px;
  min-width: 0;
}

.station-title-row h1 {
  flex: 0 1 auto;
  min-width: min(100%, 170px);
  font-size: 30px;
  line-height: 1;
  white-space: normal;
  overflow-wrap: anywhere;
}

.station-title-row .selected-store {
  flex: 1 1 180px;
  overflow: hidden;
  max-width: 100%;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-topbar .ghost-button {
  min-height: 36px;
  padding: 0 10px;
}

.station-topbar .settings-button {
  min-height: 36px;
}

.station-topbar .icon-button,
.kds-actions .icon-button {
  width: 36px;
  height: 36px;
}

.build-shell {
  --build-zoom: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  padding: 8px 12px 12px;
  overflow: hidden;
  background: #090d12;
  color: #17202b;
}

.build-topbar {
  margin-bottom: 10px;
}

.build-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 4px;
  min-width: 0;
  max-width: min(70vw, 620px);
}

.build-top-actions p {
  flex: 1 1 128px;
  min-width: 84px;
  max-width: min(30vw, 220px);
  overflow: hidden;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-zoom-controls {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 32px;
  padding: 2px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #111827;
}

.build-zoom-controls .icon-button {
  width: 30px;
  height: 28px;
  min-width: 30px;
  min-height: 28px;
  padding: 0;
  border-color: #334155;
  background: #f8fafc;
  color: #111827;
  font-size: 18px;
  line-height: 1;
}

.build-zoom-controls .icon-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.build-zoom-controls span {
  min-width: 40px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.build-status-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.build-status-tab {
  min-height: 42px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #111827;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 15px;
  font-weight: 950;
}

.build-status-tab.active {
  color: #111827;
}

.build-status-tab.status-inprogress.active {
  border-color: #e5e7eb;
  background: #ffffff;
}

.build-status-tab.status-assembling.active {
  border-color: #d6b98c;
  background: #f1dfc7;
  color: #713f12;
}

.build-board {
  display: flex;
  flex: 1;
  align-items: flex-start;
  gap: calc(12px * var(--build-zoom));
  width: 100%;
  min-height: 0;
  height: auto;
  overflow-x: auto;
  overflow-y: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
}

.build-card {
  display: flex;
  flex: 0 0 clamp(280px, calc(370px * var(--build-zoom)), 430px);
  flex-direction: column;
  min-height: calc(100% * var(--build-zoom));
  padding: calc(14px * var(--build-zoom));
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  background: #ffffff;
  color: #17202b;
  scroll-snap-align: start;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  animation: card-in 140ms ease-out;
}

.build-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(10px * var(--build-zoom));
  padding-bottom: calc(10px * var(--build-zoom));
  border-bottom: 1px solid #e4e7ec;
}

.build-card.status-inprogress .build-card-header,
.build-card.status-preparing .build-card-header,
.build-card.status-assembling .build-card-header {
  margin: calc(-14px * var(--build-zoom)) calc(-14px * var(--build-zoom)) 0;
  padding: calc(14px * var(--build-zoom)) calc(14px * var(--build-zoom)) calc(10px * var(--build-zoom));
  border-radius: 8px 8px 0 0;
}

.build-card.status-inprogress .build-card-header {
  background: #ffffff;
}

.build-card.status-preparing .build-card-header {
  background: #ede9fe;
  border-bottom-color: #c4b5fd;
}

.build-card.status-assembling .build-card-header {
  background: #f1dfc7;
  border-bottom-color: #d6b98c;
}

.build-order-number {
  color: #101828;
  font-size: clamp(30px, calc(42px * var(--build-zoom)), 50px);
  font-weight: 950;
  line-height: 0.95;
}

.build-created {
  margin-top: calc(5px * var(--build-zoom));
  color: #667085;
  font-size: clamp(11px, calc(14px * var(--build-zoom)), 16px);
  font-weight: 800;
}

.build-card-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
}

.build-age {
  color: #b42318;
  font-size: clamp(16px, calc(22px * var(--build-zoom)), 26px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.build-channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(8px * var(--build-zoom));
  margin-top: calc(10px * var(--build-zoom));
}

.build-channel-row strong {
  flex: 0 0 auto;
  padding: calc(5px * var(--build-zoom)) calc(9px * var(--build-zoom));
  border-radius: 8px;
  background: #111827;
  color: #ffffff;
  font-size: clamp(13px, calc(17px * var(--build-zoom)), 20px);
  font-weight: 950;
}

.build-flip-panel {
  position: relative;
  flex: 1;
  min-height: calc(210px * var(--build-zoom));
  margin-top: calc(12px * var(--build-zoom));
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  perspective: 900px;
}

.build-flip-panel:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.9);
  outline-offset: 4px;
  border-radius: 10px;
}

.build-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  backface-visibility: hidden;
  transition: transform 190ms ease, opacity 160ms ease;
}

.build-comment-face {
  transform: rotateY(0);
  opacity: 1;
}

.build-items-face {
  transform: rotateY(180deg);
  opacity: 0;
}

.build-flip-panel.show-items .build-comment-face {
  transform: rotateY(-180deg);
  opacity: 0;
  pointer-events: none;
}

.build-flip-panel.show-items .build-items-face {
  transform: rotateY(0);
  opacity: 1;
}

.build-comment {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: calc(12px * var(--build-zoom));
  border: 2px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
}

.build-comment p {
  margin-bottom: calc(8px * var(--build-zoom));
  color: #92400e;
  font-size: clamp(10px, calc(13px * var(--build-zoom)), 15px);
  font-weight: 950;
  text-transform: uppercase;
}

.build-comment strong {
  color: #111827;
  font-size: clamp(20px, calc(32px * var(--build-zoom)), 40px);
  font-weight: 950;
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.build-comment.empty {
  border-color: #d0d5dd;
  background: #f8fafc;
}

.build-comment.empty p,
.build-comment.empty strong {
  color: #667085;
}

.build-items-face {
  padding: calc(12px * var(--build-zoom));
  border: 2px solid #d6dce3;
  border-radius: 8px;
  background: #f8fafc;
}

.build-items-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.build-items-head p {
  color: #344054;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.build-burger-list {
  display: grid;
  flex: 1;
  gap: calc(7px * var(--build-zoom));
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  align-content: start;
}

.build-burger-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(8px * var(--build-zoom));
  min-height: calc(38px * var(--build-zoom));
  padding: calc(7px * var(--build-zoom)) calc(9px * var(--build-zoom));
  border: 1px solid #d6dce3;
  border-radius: 8px;
  background: #f8fafc;
}

.build-burger-line span,
.build-burger-line em {
  font-size: clamp(12px, calc(16px * var(--build-zoom)), 18px);
  font-style: normal;
  font-weight: 950;
}

.build-burger-line span {
  color: #b45309;
}

.build-burger-line strong {
  overflow: hidden;
  color: #17202b;
  font-size: clamp(13px, calc(17px * var(--build-zoom)), 19px);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-burger-line em {
  max-width: 145px;
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #075985;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(8px * var(--build-zoom));
  margin-top: calc(12px * var(--build-zoom));
}

.build-card-actions.has-secondary {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
}

.build-print-button,
.build-done-button,
.build-back-button {
  min-height: calc(58px * var(--build-zoom));
  border-radius: 8px;
  cursor: pointer;
  font-size: clamp(14px, calc(18px * var(--build-zoom)), 21px);
  font-weight: 950;
}

.build-print-button {
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #ffffff;
}

.build-print-button.printed {
  border-color: #14b8a6;
  background: #134e4a;
}

.build-done-button {
  border: 1px solid #16a34a;
  background: #dcfce7;
  color: #166534;
}

.build-back-button {
  border: 1px solid #a16207;
  background: #fef3c7;
  color: #713f12;
}

.build-done-button:disabled,
.build-back-button:disabled {
  border-color: #94a3b8;
  background: #e2e8f0;
  color: #64748b;
}

.build-print-button:disabled {
  border-color: #94a3b8;
  background: #e2e8f0;
  color: #334155;
  cursor: wait;
}

.build-loading {
  display: grid;
  min-width: 320px;
  place-items: center;
  padding: 24px;
  border: 1px dashed #475569;
  border-radius: 8px;
  color: #cbd5e1;
  font-weight: 900;
}

.customer-display-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 20px;
  height: 100vh;
  min-height: 100vh;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, #11241c 0%, #19382b 48%, #0c1713 100%);
  color: #f8fafc;
}

.customer-display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
}

.customer-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.customer-logo-button {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
}

.customer-logo-button img {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.customer-logo-button:active {
  transform: scale(0.98);
}

.customer-brand h1 {
  overflow: hidden;
  max-width: 58vw;
  font-size: 32px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-display-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.customer-display-actions p {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbe7df;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.customer-display-board {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
}

.display-section {
  --display-card-min: 92px;
  --display-featured-min: 182px;
  --display-grid-min: 150px;
  --display-older-grid-min: 90px;
  --display-older-min: 70px;
  --display-number-size: clamp(36px, 5.5vw, 86px);
  --display-older-number-size: clamp(24px, 2.8vw, 42px);
  --display-gap: 12px;
  --display-radius: 22px;
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 16px;
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 44px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
}

.display-section.density-medium {
  --display-card-min: 78px;
  --display-featured-min: 138px;
  --display-grid-min: 118px;
  --display-older-grid-min: 78px;
  --display-older-min: 60px;
  --display-number-size: clamp(30px, 4.6vw, 64px);
  --display-older-number-size: clamp(22px, 2.4vw, 36px);
  --display-gap: 10px;
  --display-radius: 18px;
}

.display-section.density-high {
  --display-card-min: 62px;
  --display-featured-min: 96px;
  --display-grid-min: 82px;
  --display-older-grid-min: 66px;
  --display-older-min: 50px;
  --display-number-size: clamp(24px, 3.5vw, 48px);
  --display-older-number-size: clamp(18px, 2vw, 30px);
  --display-gap: 8px;
  --display-radius: 15px;
}

.display-section.density-max {
  --display-card-min: 50px;
  --display-featured-min: 62px;
  --display-grid-min: 58px;
  --display-older-grid-min: 54px;
  --display-older-min: 42px;
  --display-number-size: clamp(18px, 2.6vw, 34px);
  --display-older-number-size: clamp(16px, 1.8vw, 24px);
  --display-gap: 6px;
  --display-radius: 12px;
}

.display-section.density-ultra {
  --display-card-min: 38px;
  --display-featured-min: 46px;
  --display-grid-min: 44px;
  --display-older-grid-min: 42px;
  --display-older-min: 34px;
  --display-number-size: clamp(15px, 2vw, 26px);
  --display-older-number-size: clamp(13px, 1.5vw, 20px);
  --display-gap: 5px;
  --display-radius: 10px;
}

.ready-section {
  background: rgba(235, 255, 244, 0.1);
}

.display-flow-group {
  min-height: 0;
}

.display-section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}

.display-section-title p {
  min-width: 0;
  color: #ffffff;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  text-align: left;
}

.display-section-title.compact p {
  font-size: 26px;
}

.display-section-title b {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  color: #ffffff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.display-ready-grid,
.display-number-grid,
.display-older-ready {
  display: grid;
  gap: var(--display-gap);
  min-height: 0;
  overflow: hidden;
}

.display-ready-grid {
  flex: 0 0 auto;
  grid-auto-rows: minmax(var(--display-featured-min), auto);
  grid-template-columns: repeat(auto-fit, minmax(var(--display-grid-min), 1fr));
}

.display-ready-grid:empty {
  display: none;
}

.display-number-grid {
  flex: 1 1 auto;
  grid-auto-rows: minmax(var(--display-card-min), auto);
  grid-template-columns: repeat(auto-fit, minmax(var(--display-grid-min), 1fr));
  min-height: 0;
  align-content: start;
}

.display-number-grid.density-low {
  grid-template-columns: repeat(auto-fit, minmax(var(--display-grid-min), 1fr));
}

.display-number-grid.density-high {
  grid-template-columns: repeat(auto-fit, minmax(var(--display-grid-min), 1fr));
}

.display-older-ready {
  flex: 1 1 auto;
  grid-auto-rows: minmax(var(--display-older-min), auto);
  grid-template-columns: repeat(auto-fit, minmax(var(--display-older-grid-min), 1fr));
  margin-top: var(--display-gap);
  align-content: start;
}

.display-order-card {
  display: grid;
  min-height: var(--display-card-min);
  place-items: center;
  border: 0;
  border-radius: var(--display-radius);
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
}

.display-order-card strong {
  font-size: var(--display-number-size);
  font-weight: 950;
  line-height: 0.95;
}

.display-order-card.featured {
  min-height: var(--display-featured-min);
}

.display-order-card.older {
  min-height: var(--display-older-min);
  opacity: 0.9;
}

.display-order-card.older strong {
  font-size: var(--display-older-number-size);
}

.display-order-card.inprogress {
  background: #ffffff;
  color: #0f172a;
  box-shadow: inset 0 0 0 3px #e5e7eb, 0 16px 34px rgba(0, 0, 0, 0.14);
}

.display-order-card.ready {
  background: #dcfce7;
  color: #052e16;
  box-shadow: inset 0 0 0 3px #86efac, 0 16px 34px rgba(0, 0, 0, 0.14);
}

.display-order-card.talabat.inprogress {
  background: #ffffff;
  box-shadow: inset 0 0 0 4px #fb923c, 0 16px 34px rgba(0, 0, 0, 0.14);
}

.display-order-card.talabat.ready {
  background: #ffedd5;
  color: #431407;
  box-shadow: inset 0 0 0 3px #fdba74, 0 16px 34px rgba(0, 0, 0, 0.14);
}

.display-empty {
  display: grid;
  min-height: 78px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.32);
  border-radius: 18px;
  color: #dbe7df;
  font-weight: 900;
}

.pickup-shell {
  width: 100%;
  min-height: 100vh;
  padding: 8px 12px 12px;
  overflow: hidden;
  background: #090d12;
  color: #f8fafc;
}

.pickup-topbar {
  margin-bottom: 10px;
}

.pickup-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  align-content: start;
  gap: 12px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  padding: 2px 2px 12px;
}

.pickup-card {
  min-height: 230px;
  border-radius: 8px;
  background: transparent;
  color: #111827;
  cursor: pointer;
  outline: none;
  perspective: 1100px;
  animation: card-in 140ms ease-out;
}

.pickup-card-inner {
  position: relative;
  width: 100%;
  min-height: inherit;
  transition: transform 220ms ease;
  transform-style: preserve-3d;
}

.pickup-card.flipped .pickup-card-inner {
  transform: rotateY(180deg);
}

.pickup-card:focus-visible .pickup-card-inner {
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.38);
}

.pickup-card-face {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 10px;
  min-height: inherit;
  padding: 14px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #f8fafc;
  backface-visibility: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
}

.pickup-card-front {
  grid-template-rows: auto auto 1fr;
}

.pickup-card-back {
  place-items: center;
  align-content: center;
  text-align: center;
  transform: rotateY(180deg);
}

.pickup-card-back strong {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 950;
  line-height: 0.9;
}

.pickup-card-back p {
  max-width: 24ch;
  color: #475569;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.pickup-card.dine-in .pickup-card-face {
  background: #eff6ff;
}

.pickup-card.takeout .pickup-card-face {
  background: #f0fdf4;
}

.pickup-card.delivery .pickup-card-face {
  background: #fff7ed;
}

.pickup-card.unpaid .pickup-card-face {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18), 0 10px 26px rgba(0, 0, 0, 0.26);
}

.pickup-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pickup-card-main strong {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 950;
  line-height: 0.9;
}

.pickup-age {
  color: #b42318;
  font-size: 20px;
  font-weight: 950;
  white-space: nowrap;
}

.pickup-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pickup-payment {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.pickup-payment b {
  font-size: 18px;
  font-weight: 950;
}

.pickup-payment small {
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.pickup-payment.cash b {
  color: #c2410c;
}

.pickup-payment.paid b {
  color: #047857;
}

.pickup-close-button {
  width: min(100%, 260px);
  min-height: 56px;
  border: 1px solid #0f766e;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 950;
}

.pickup-close-button:disabled {
  border-color: #cbd5e1;
  background: #e2e8f0;
  color: #475569;
  cursor: not-allowed;
}

.station-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(460px, 1.25fr);
  gap: 12px;
}

.station-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 66px);
  padding: 16px;
  border: 1px solid #1f2937;
  border-radius: 8px;
  background: #090d12;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.station-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1f2937;
}

.station-panel-header h2 {
  color: #f8fafc;
  font-size: 32px;
  line-height: 1;
}

.station-capacity {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.station-capacity.large {
  min-height: 52px;
  padding: 0 16px;
  font-size: 28px;
  font-weight: 950;
}

.station-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.station-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.station-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.station-stack {
  display: grid;
  gap: 8px;
}

.station-group-title {
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 950;
}

.station-column-head .station-group-title {
  margin-bottom: 0;
}

.station-metric,
.station-control {
  height: 104px;
  padding: 10px;
  border: 1px solid #d6dce3;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.station-metric {
  display: grid;
  place-content: center;
}

.station-metric strong {
  display: block;
  margin-bottom: 4px;
  color: #101828;
  font-size: 46px;
  line-height: 1;
}

.station-metric p {
  color: #344054;
  font-size: 17px;
  font-weight: 900;
}

.station-control {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  font: inherit;
}

.station-control div {
  display: block;
}

.station-control.pending,
.station-control.added {
  justify-content: center;
}

.station-control.pending div,
.station-control.added div {
  transform: translateY(10px);
}

.station-control strong {
  display: block;
  color: #101828;
  font-size: 46px;
  line-height: 1;
}

.station-control p {
  margin-top: 4px;
  color: #344054;
  font-size: 17px;
  font-weight: 950;
}

.station-badge-row {
  position: absolute;
  top: 8px;
  right: 8px;
  left: 8px;
  display: flex;
  justify-content: flex-end;
  min-height: 24px;
  pointer-events: none;
}

.station-pending,
.station-added {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 14px;
  font-weight: 950;
}

.station-added {
  background: #dcfce7;
  color: #166534;
  animation: station-badge-pop 520ms ease-out;
}

.station-pending b,
.station-added b {
  margin-right: 3px;
  font-size: 20px;
  line-height: 1;
}

.station-control.pending {
  border-color: #dc2626;
  background: #fff7f7;
}

.station-control.added {
  border-color: #22c55e;
  background: #f0fdf4;
  animation: station-added-pulse 680ms ease-out;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.station-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.station-primary,
.station-secondary {
  min-height: 58px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 950;
}

.station-primary {
  grid-column: 1 / -1;
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #ffffff;
  font-size: 20px;
}

.station-primary:disabled {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: not-allowed;
}

.station-secondary {
  border: 1px solid #c8d0da;
  background: #ffffff;
  color: #17202b;
  font-size: 16px;
}

.station-bottom-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.station-bottom-actions .station-primary,
.station-bottom-actions .station-secondary {
  min-height: 72px;
  font-size: 22px;
}

.station-bottom-actions.confirming {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
}

.station-bottom-actions.confirming .station-primary {
  grid-column: auto;
}

.station-sequence {
  margin-top: 10px;
}

.station-sequence-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 4px;
}

.sequence-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
  animation: station-pop 180ms ease-out;
}

.sequence-chip small {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 28px;
  height: 22px;
  padding: 0 5px;
  border: 2px solid #090d12;
  border-radius: 999px;
  background: #ffffff;
  color: #101828;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.sequence-chip.s {
  background: #64748b;
}

.sequence-chip.d {
  background: #64748b;
}

.sequence-chip.t {
  background: #64748b;
}

.sequence-chip.order-color-0 {
  background: #2563eb;
}

.sequence-chip.order-color-1 {
  background: #dc2626;
}

.sequence-chip.order-color-2 {
  background: #16a34a;
}

.sequence-chip.order-color-3 {
  background: #9333ea;
}

.sequence-chip.order-color-4 {
  background: #ca8a04;
}

.sequence-chip.order-color-5 {
  background: #0891b2;
}

.kds-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 4px;
  min-width: 0;
  max-width: min(62vw, 520px);
}

.kds-actions p {
  flex: 1 1 120px;
  min-width: 84px;
  max-width: min(30vw, 220px);
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

.kds-filterbar {
  display: flex;
  gap: 8px;
  margin: -2px 0 12px;
  overflow-x: auto;
}

.status-filter {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d6dce3;
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  cursor: pointer;
  font-weight: 800;
}

.status-filter.selected {
  border-color: #0ea5e9;
  background: #e0f2fe;
  color: #075985;
}

.ticket-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
  gap: 12px;
}

.ticket-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 12px 12px 14px 16px;
  border: 1px solid #d0d7e2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  animation: card-in 140ms ease-out;
}

.ticket-card.warning {
  border-color: #f3d08a;
  background: #ffffff;
}

.ticket-card.late {
  border-color: #f4b4b4;
  background: #ffffff;
}

.ticket-card.status-prepared {
  border-color: #3fbf7f;
  background: #ffffff;
}

.ticket-card.status-preparing {
  border-color: #c4b5fd;
  background: #ffffff;
}

.ticket-card.status-assembling {
  border-color: #d6b98c;
  background: #ffffff;
}

.ticket-card.talabat-order {
  background: #ffffff;
}

.ticket-card.talabat-order.status-prepared {
  border-color: #3fbf7f;
  background: #ffffff;
}

.ticket-card.status-prepared .ticket-rail {
  background: #22c55e;
}

.ticket-card.status-prepared .ticket-item {
  background: #f8fafc;
  border-color: #d6dce3;
}

.ticket-card.status-preparing .ticket-item {
  background: #f8fafc;
  border-color: #d6dce3;
}

.ticket-card.status-assembling .ticket-item {
  background: #f8fafc;
  border-color: #d6dce3;
}

.ticket-card.talabat-order .ticket-item {
  background: #fff7ed;
  border-color: #fed7aa;
}

.ticket-card.alarm-pending {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  animation: alarm-card-shake 380ms ease-in-out infinite;
}

.ticket-alarm-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 247, 237, 0.88);
  color: #7c2d12;
  cursor: pointer;
  text-align: center;
  backdrop-filter: blur(2px);
  animation: alarm-pulse 900ms ease-in-out infinite alternate;
}

.ticket-alarm-overlay span {
  font-size: 22px;
  font-weight: 950;
  text-transform: uppercase;
}

.ticket-alarm-overlay strong {
  color: #111827;
  font-size: 56px;
  line-height: 0.9;
}

.ticket-alarm-overlay em {
  color: #9a3412;
  font-size: 17px;
  font-style: normal;
  font-weight: 900;
}

.ticket-rail {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 2;
  width: 6px;
  background: #38bdf8;
}

.ticket-card.warning .ticket-rail {
  background: #f59e0b;
}

.ticket-card.late .ticket-rail {
  background: #ef4444;
}

.ticket-header {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e4e7ec;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease;
}

.ticket-card.actions-open {
  border-color: #6ea886;
}

.ticket-card.actions-open .ticket-header {
  margin: -12px -12px 0 -16px;
  padding: 12px 12px 10px 16px;
  width: calc(100% + 28px);
  border-radius: 8px 8px 0 0;
  background: #e8f4ed;
}

.ticket-card.status-inprogress .ticket-header {
  background: #ffffff;
}

.ticket-card.status-preparing .ticket-header {
  margin: -12px -12px 0 -16px;
  padding: 12px 12px 10px 16px;
  width: calc(100% + 28px);
  border-radius: 8px 8px 0 0;
  background: #ede9fe;
  border-bottom-color: #c4b5fd;
}

.ticket-card.status-assembling .ticket-header {
  margin: -12px -12px 0 -16px;
  padding: 12px 12px 10px 16px;
  width: calc(100% + 28px);
  border-radius: 8px 8px 0 0;
  background: #f1dfc7;
  border-bottom-color: #d6b98c;
}

.ticket-card.status-prepared .ticket-header {
  margin: -12px -12px 0 -16px;
  padding: 12px 12px 10px 16px;
  width: calc(100% + 28px);
  border-radius: 8px 8px 0 0;
  background: #dcfce7;
  border-bottom-color: #86efac;
}

.ticket-header-toggle {
  display: grid;
  grid-template-columns: auto minmax(68px, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  width: 100%;
  padding: 0 0 8px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ticket-card.actions-open .ticket-header-toggle {
  padding-bottom: 8px;
}

.ticket-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 6px;
  min-height: 34px;
  padding-bottom: 10px;
  overflow: hidden;
}

.ticket-card.actions-open .ticket-subrow {
  padding-bottom: 0;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  min-width: 0;
  padding: 0 8px;
  border-radius: 8px;
  background: #eef2f6;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.source-badge.talabat {
  background: #ffedd5;
  color: #9a3412;
}

.source-badge.pos {
  background: #dbeafe;
  color: #1e3a8a;
}

.source-badge.delivery {
  background: #ffedd5;
  color: #9a3412;
}

.source-badge.dine-in {
  background: #e0e7ff;
  color: #3730a3;
}

.source-badge.takeout {
  background: #ccfbf1;
  color: #115e59;
}

.channel-icon {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.ticket-age {
  justify-self: end;
  color: #b42318;
  font-size: 16px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.ticket-card.warning .ticket-age {
  color: #b54708;
}

.ticket-card.late .ticket-age {
  color: #b42318;
}

.ticket-number {
  color: #101828;
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.ticket-time {
  display: inline-flex;
  align-items: center;
  height: 28px;
  min-width: 0;
  overflow: hidden;
  padding: 0 8px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f8fafc;
  color: #475467;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.header-time {
  justify-self: center;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-chip.new {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.status-chip.inprogress {
  border-color: #111827;
  background: #ffffff;
  color: #111827;
}

.status-chip.preparing {
  border-color: #7c3aed;
  background: #ede9fe;
  color: #4c1d95;
}

.status-chip.assembling {
  border-color: #a16207;
  background: #fef3c7;
  color: #713f12;
}

.status-chip.prepared {
  border-color: #16a34a;
  background: #dcfce7;
  color: #166534;
}

.ticket-items {
  position: relative;
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.ticket-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.ticket-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid #c8d0da;
  border-radius: 8px;
  background: #ffffff;
  color: #17202b;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.ticket-action-icon {
  position: relative;
  width: 16px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.ticket-action-icon::before {
  position: absolute;
  content: "";
  inset: -7px 2px auto;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  background: #ffffff;
}

.ticket-action-icon::after {
  position: absolute;
  content: "";
  right: 2px;
  bottom: 2px;
  left: 2px;
  height: 2px;
  background: currentColor;
}

.ticket-action.print {
  border-color: #98a2b3;
  background: #f8fafc;
}

.ticket-action.status {
  border-color: #0f766e;
  background: #ccfbf1;
  color: #115e59;
}

.ticket-item {
  width: 100%;
  padding: 10px;
  border: 1px solid #d6dce3;
  border-radius: 8px;
  background: #f8fafc;
  color: #17202b;
  text-align: left;
  cursor: pointer;
}

.ticket-item.done {
  border-color: #86efac;
  background: #ecfdf5;
  opacity: 0.75;
}

.ticket-item.done strong,
.ticket-item.done li {
  text-decoration: line-through;
}

.ticket-item-line {
  align-items: baseline;
  gap: 8px;
}

.item-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #c8d0da;
  border-radius: 6px;
  color: #047857;
  font-size: 14px;
  font-weight: 950;
}

.ticket-item-line strong {
  font-size: 18px;
  line-height: 1.2;
}

.ticket-qty {
  color: #b45309;
  font-size: 18px;
  font-weight: 950;
}

.ticket-item ul {
  margin: 6px 0 0;
  padding-left: 34px;
  color: #475467;
  font-size: 16px;
  line-height: 1.35;
}

.ticket-loading,
.ticket-empty,
.ticket-error,
.empty-state {
  padding: 18px;
  border: 1px dashed #98a2b3;
  border-radius: 8px;
  color: #475467;
}

.ticket-error {
  border-color: #ef4444;
  color: #b42318;
}

@media (max-width: 760px) {
  .app-shell,
  .kds-shell,
  .build-shell {
    padding: 16px;
  }

  h1 {
    font-size: 34px;
  }

  .setup-topbar,
  .kds-topbar,
  .station-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .kds-actions,
  .build-top-actions,
  .setup-actions {
    align-items: center;
    justify-content: end;
  }

  .ticket-header-toggle {
    align-items: flex-start;
  }

  .kds-topbar {
    margin: -16px -16px 16px;
    padding: 14px 16px;
  }

  .section-heading p,
  .kds-actions p {
    text-align: right;
  }

  .kds-actions p,
  .build-top-actions p {
    max-width: min(36vw, 180px);
    font-size: 12px;
  }

  .station-title-row h1,
  .kds-topbar h1,
  .setup-topbar h1 {
    font-size: clamp(24px, 8vw, 34px);
  }

  .station-title-row .selected-store {
    font-size: 12px;
  }

  .settings-button {
    min-height: 38px;
    padding: 0 10px;
  }

  .setup-actions .settings-button,
  .kds-actions .settings-button,
  .build-top-actions .settings-button,
  .station-topbar .settings-button {
    min-height: 36px;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .station-topbar .icon-button,
  .kds-actions .icon-button {
    width: 36px;
    height: 36px;
  }

  .build-zoom-controls .icon-button {
    width: 30px;
    height: 28px;
  }

  .ticket-board {
    grid-template-columns: 1fr;
  }

  .build-board {
    height: auto;
  }

  .build-card {
    flex-basis: min(86vw, 390px);
  }
}

@media (orientation: landscape) and (min-width: 900px) {
  .kds-topbar h1 {
    font-size: 30px;
  }

  .ticket-board {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .ticket-number {
    font-size: 30px;
  }

  .ticket-age {
    font-size: 19px;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes station-pop {
  from {
    opacity: 0.55;
    transform: scale(0.86);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes station-added-pulse {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  }

  45% {
    transform: scale(1.015);
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.28);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  }
}

@keyframes station-badge-pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.8);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes alarm-pulse {
  from {
    box-shadow: inset 0 0 0 0 rgba(249, 115, 22, 0.28);
  }

  to {
    box-shadow: inset 0 0 0 8px rgba(249, 115, 22, 0.28);
  }
}

@keyframes alarm-card-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-1.5px);
  }

  50% {
    transform: translateX(1.5px);
  }

  75% {
    transform: translateX(-1px);
  }
}

@keyframes settings-slide-in {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}
