:root {
  --green-950: #052f1e;
  --green-900: #073d22;
  --green-800: #0f5d31;
  --green-700: #17733d;
  --green-100: #e8f4ed;
  --yellow: #f6c344;
  --yellow-soft: #fff1c2;
  --cream: #fff9ed;
  --paper: rgba(255, 255, 255, 0.92);
  --ink: #17221d;
  --muted: #68756f;
  --line: rgba(15, 93, 49, 0.13);
  --shadow: 0 18px 50px rgba(5, 47, 30, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(246,195,68,.20), transparent 34%),
    linear-gradient(135deg, #073d22 0%, #0f5d31 34%, #f5f0df 34%, #fff9ed 100%);
  color: var(--ink);
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(5,47,30,.98), rgba(15,93,49,.95)),
    radial-gradient(circle at top, rgba(246,195,68,.35), transparent 45%);
  color: white;
  padding: 24px;
  position: sticky;
  top: 0;
  min-height: 100vh;
  box-shadow: 8px 0 30px rgba(0,0,0,.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: white;
  text-decoration: none;
  margin-bottom: 30px;
}

.brand img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 8px 15px rgba(0,0,0,.25));
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: var(--yellow);
  font-weight: 700;
  font-size: 14px;
}

.side-nav {
  display: grid;
  gap: 10px;
}

.side-nav a {
  color: white;
  text-decoration: none;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 700;
  transition: transform .15s ease, background .15s ease;
}

.side-nav a:hover {
  background: rgba(246,195,68,.18);
  transform: translateX(3px);
}

.sidebar-card {
  margin-top: 28px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
}

.sidebar-card p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.78);
  line-height: 1.45;
}

.main-area {
  min-width: 0;
}

.topbar {
  margin: 18px 22px 0;
  padding: 20px 24px;
  background: var(--paper);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 30px;
  color: var(--green-950);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--green-700);
  font-weight: 800;
  font-size: 12px;
}

.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.container {
  max-width: 1250px;
  margin: 22px auto;
  padding: 0 22px 34px;
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(7,61,34,.96), rgba(23,115,61,.90)),
    radial-gradient(circle at top right, rgba(246,195,68,.45), transparent 35%);
  color: white;
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.hero-panel h2 {
  font-size: 34px;
  margin: 6px 0 8px;
}

.hero-panel p:not(.eyebrow) {
  color: rgba(255,255,255,.82);
  margin: 0;
}

.hero-panel img {
  width: 128px;
  height: 128px;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,.30));
}

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

.cards {
  margin-top: 18px;
}

.card,
.panel {
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.card {
  min-height: 116px;
  position: relative;
  overflow: hidden;
}

.card:after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -35px;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: rgba(15,93,49,.08);
}

.card strong {
  color: var(--muted);
  display: block;
  font-size: 14px;
}

.card span {
  display: block;
  font-size: 30px;
  margin-top: 11px;
  font-weight: 900;
  color: var(--green-900);
}

.stat-green {
  background: linear-gradient(135deg, #0f5d31, #17733d);
}

.stat-green strong,
.stat-green span {
  color: white;
}

.stat-yellow {
  background: linear-gradient(135deg, #f6c344, #ffe08a);
}

.stat-yellow strong,
.stat-yellow span {
  color: #173b2f;
}

.panel {
  margin-top: 20px;
  overflow-x: auto;
}

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

.panel h2,
.panel h3 {
  margin: 3px 0 0;
  color: var(--green-950);
}

.actions {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  border: 0;
  background: var(--green-100);
  color: var(--green-900);
  border-radius: 999px;
  padding: 11px 16px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
  display: inline-block;
  box-shadow: 0 5px 14px rgba(5,47,30,.08);
}

.btn.primary {
  background: var(--yellow);
  color: #16381f;
}

.btn.ghost {
  background: white;
  border: 1px solid var(--line);
}

.btn.danger {
  background: #ffe7e7;
  color: #8a1f1f;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 16px;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef6f1;
  color: var(--green-950);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

tr:hover td {
  background: rgba(246,195,68,.08);
}

.table-link {
  color: var(--green-800);
  font-weight: 800;
}

label {
  display: block;
  font-weight: 800;
  margin: 11px 0 6px;
  color: var(--green-950);
}

input, select, textarea {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid rgba(15,93,49,.24);
  border-radius: 13px;
  font: inherit;
  background: white;
  outline-color: var(--yellow);
}

textarea {
  min-height: 76px;
}

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

.wide {
  grid-column: 1 / -1;
}

.narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.flash {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-weight: 800;
}

.flash.success {
  background: #dff6e7;
  color: #0b542a;
  border: 1px solid rgba(11,84,42,.18);
}

.flash.error {
  background: #ffe5e5;
  color: #8a1f1f;
  border: 1px solid rgba(138,31,31,.15);
}

.hint {
  color: var(--muted);
}

.small-link {
  display: inline-block;
  margin-top: 7px;
  font-size: 14px;
  color: var(--green-800);
  font-weight: 800;
}

.split {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}

.totals, .right {
  text-align: right;
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.inline-form select {
  width: 190px;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  background: #edf3f0;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 12px;
}

.status-confirmed, .status-ready, .status-completed {
  background: #dff6e7;
  color: #0b542a;
}

.status-inquiry, .status-preparing {
  background: #fff1c2;
  color: #755200;
}

.status-cancelled {
  background: #ffe5e5;
  color: #8a1f1f;
}

.invoice-body {
  background: white;
}

.invoice {
  max-width: 900px;
  margin: 30px auto;
  background: white;
  padding: 34px;
}

.invoice-totals {
  text-align: right;
  margin-top: 18px;
}

.thankyou {
  margin-top: 30px;
  font-weight: bold;
  color: var(--green-800);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    min-height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .topbar,
  .hero-panel {
    margin-left: 14px;
    margin-right: 14px;
  }

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

  .hero-panel img {
    width: 96px;
    height: 96px;
  }
}

@media print {
  .no-print, .topbar, .sidebar {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  body {
    background: white;
  }

  .invoice {
    margin: 0;
    max-width: none;
    box-shadow: none;
  }
}


/* Official Punitha Cafe logo + dashboard filter update */
.brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: rgba(255,255,255,.95);
  border-radius: 22px;
  padding: 6px;
}

.hero-panel img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  background: rgba(255,255,255,.96);
  border-radius: 28px;
  padding: 8px;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(160px, .8fr) minmax(160px, .8fr) auto;
  gap: 14px;
  align-items: end;
  margin: 16px 0 10px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(232,244,237,.95), rgba(255,241,194,.55));
  border: 1px solid var(--line);
  border-radius: 20px;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.range-label {
  margin: 8px 0 12px;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 24px !important;
  font-weight: 800;
}

@media (max-width: 900px) {
  .filter-form {
    grid-template-columns: 1fr;
  }

  .brand img {
    width: 74px;
    height: 74px;
  }

  .hero-panel img {
    width: 112px;
    height: 112px;
  }
}


/* Estimate status + estimate document */
.status-sent.estimates,
.status-sent-estimates {
  background: #dbeafe;
  color: #1e3a8a;
}

.status-sent {
  background: #dbeafe;
  color: #1e3a8a;
}

/* Because EJS status class can include spaces in older browsers, this fallback keeps the pill clean. */
.pill[class*="sent"] {
  background: #dbeafe;
  color: #1e3a8a;
}

.invoice-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.invoice-brand img {
  width: 94px;
  height: 94px;
  object-fit: contain;
}

.estimate-document h2 {
  color: var(--green-900);
}

.estimate-note {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 700;
}

.send-panel {
  margin-top: 24px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(232,244,237,.95), rgba(255,241,194,.65));
  border: 1px solid var(--line);
}

.btn.whatsapp {
  background: #25D366;
  color: white;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.estimate-sent-form {
  margin-top: 12px;
}


/* Kitchen Order Ticket / KOT print feature */
.kot-body {
  background: #f6f7f2;
  color: #111;
}

.kot-toolbar {
  max-width: 1100px;
  margin: 22px auto;
  padding: 18px 22px;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.kot-toolbar h1 {
  margin: 0 0 6px;
  color: var(--green-950);
}

.kot-toolbar p {
  margin: 0;
  color: var(--muted);
}

.kot-filter {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.kot-filter input {
  min-width: 155px;
}

.kot-empty {
  max-width: 900px;
  margin: 40px auto;
  background: white;
  padding: 28px;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.kot-page {
  max-width: 900px;
  min-height: 1030px;
  margin: 24px auto;
  background: white;
  padding: 28px;
  border: 2px solid #111;
  page-break-after: always;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}

.kot-page:last-child {
  page-break-after: auto;
}

.kot-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 4px solid #111;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.kot-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.kot-brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.kot-brand h1 {
  margin: 0;
  font-size: 32px;
  color: #111;
}

.kot-brand p {
  margin: 5px 0 0;
  font-size: 18px;
}

.kot-order-box {
  border: 3px solid #111;
  border-radius: 12px;
  padding: 10px 16px;
  text-align: center;
  min-width: 170px;
}

.kot-order-box p {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
}

.kot-order-box h2 {
  margin: 5px 0;
  font-size: 28px;
}

.kot-status {
  background: #fff1c2;
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 900;
}

.kot-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid #111;
  margin: 16px 0;
}

.kot-info-grid div {
  padding: 12px;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
}

.kot-info-grid div:nth-child(3n) {
  border-right: 0;
}

.kot-info-grid span,
.kot-note-box span,
.kot-footer span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #444;
  font-weight: 900;
  margin-bottom: 5px;
}

.kot-info-grid strong {
  font-size: 18px;
}

.kot-note-box {
  border: 2px solid #111;
  padding: 12px;
  margin-bottom: 12px;
  background: #fffdf4;
}

.kot-items {
  border: 2px solid #111;
  border-radius: 0;
  border-collapse: collapse;
  margin-top: 18px;
}

.kot-items th {
  background: #111;
  color: white;
  font-size: 14px;
  letter-spacing: .03em;
}

.kot-items th,
.kot-items td {
  border: 1px solid #111;
  padding: 12px;
  font-size: 16px;
}

.kot-items td strong {
  font-size: 18px;
}

.kot-item-name strong {
  font-weight: 900;
  text-transform: uppercase;
}


.qty-col {
  width: 160px;
}

.kot-qty {
  font-size: 20px !important;
  font-weight: 900;
  white-space: nowrap;
}

.kot-qty-line {
  display: block;
  white-space: nowrap;
  line-height: 1.25;
}

.check-col {
  width: 80px;
  text-align: center;
}

.check-box-cell {
  text-align: center;
  font-size: 28px !important;
}

.kot-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 46px;
}

.signature-line {
  border-bottom: 2px solid #111;
  height: 34px;
}

@media print {
  @page {
    size: letter;
    margin: 0.35in;
  }

  body.kot-body {
    background: white;
  }

  .kot-toolbar,
  .no-print {
    display: none !important;
  }

  .kot-page {
    margin: 0;
    max-width: none;
    min-height: auto;
    box-shadow: none;
    border: 2px solid #111;
    page-break-after: always;
  }

  .kot-page:last-child {
    page-break-after: auto;
  }

  .kot-brand img {
    width: 78px;
    height: 78px;
  }

  .kot-brand h1 {
    font-size: 28px;
  }
}


/* KOT daily number update */
.kot-order-box h2 {
  font-size: 24px;
  line-height: 1.05;
}

.kot-sub-number {
  margin: 4px 0 6px !important;
  font-size: 14px !important;
  font-weight: 900;
  color: #333;
}

.kot-info-grid {
  grid-template-columns: repeat(4, 1fr);
}

.kot-info-grid div:nth-child(3n) {
  border-right: 1px solid #111;
}

.kot-info-grid div:nth-child(4n) {
  border-right: 0;
}

@media print {
  .kot-order-box h2 {
    font-size: 22px;
  }
}


/* Reports menu */
.reports-hero {
  margin-bottom: 20px;
}

.report-print-body {
  background: white;
}

.report-print-page {
  max-width: 1000px;
  margin: 30px auto;
  background: white;
  padding: 30px;
}

.report-print-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 3px solid var(--green-900);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.report-print-page h2 {
  margin-top: 26px;
  color: var(--green-900);
}

@media print {
  .report-print-page {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .report-print-header {
    margin-bottom: 12px;
  }

  .report-print-page table {
    page-break-inside: auto;
  }

  .report-print-page tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}


/* Reports pie charts */
.report-chart-grid {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  align-items: stretch;
  margin-top: 20px;
}

.chart-panel {
  min-height: 430px;
}

.wide-chart {
  grid-column: 1 / -1;
}

.chart-wrap {
  position: relative;
  height: 310px;
  width: 100%;
}

.empty-chart {
  height: 100%;
  display: grid;
  place-items: center;
  background: rgba(232,244,237,.7);
  border: 1px dashed var(--line);
  color: var(--muted);
  border-radius: 16px;
  font-weight: 800;
  text-align: center;
  padding: 18px;
}

.print-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 16px 0 26px;
}

.print-chart-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  page-break-inside: avoid;
}

.print-chart-card h3 {
  margin: 0 0 10px;
  color: var(--green-900);
}

.print-chart-wrap {
  height: 280px;
}

@media print {
  .print-chart-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .print-chart-wrap {
    height: 235px;
  }

  .chart-wrap canvas {
    max-width: 100%;
  }
}

@media (max-width: 800px) {
  .print-chart-grid {
    grid-template-columns: 1fr;
  }

  .wide-chart {
    grid-column: auto;
  }
}


/* Fulfilled revenue report update */
.mini-report-cards {
  margin: 14px 0 18px;
}

.mini-report-cards .card {
  min-height: 96px;
}

.mini-report-cards .card span {
  font-size: 24px;
}


/* Cancel Orders feature */
.cancel-hero {
  background:
    linear-gradient(135deg, rgba(127,29,29,.94), rgba(15,93,49,.88)),
    radial-gradient(circle at top right, rgba(246,195,68,.42), transparent 35%);
}

.cancel-order-form {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.cancel-order-form textarea {
  min-height: 68px;
}

.cancel-inline-panel {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background: #fff4f4;
  border: 1px solid rgba(138,31,31,.18);
}

.cancel-inline-panel h3 {
  margin-top: 0;
  color: #8a1f1f;
}

.btn.danger {
  background: #dc2626;
  color: white;
}


/* Cloud login/auth UI */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(246,195,68,.28), transparent 35%),
    linear-gradient(135deg, #073d22 0%, #0f5d31 55%, #fff9ed 55%, #fff9ed 100%);
}

.login-card {
  width: min(440px, 100%);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.login-card img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

.login-card h1,
.login-card p {
  text-align: center;
}

.login-card h1 {
  color: var(--green-950);
  margin: 0;
}

.login-card p {
  color: var(--muted);
  margin: 8px 0 18px;
}

.login-btn {
  width: 100%;
  margin-top: 16px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(15,93,49,.10);
  color: var(--green-900);
  font-weight: 800;
}

.logout-form {
  display: inline;
  margin: 0;
}

/* Item category filters on New Order */
.item-filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: end;
  background: rgba(255, 249, 237, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin: 12px 0 10px;
}

.filter-help {
  display: flex;
  align-items: end;
  min-height: 48px;
}

/* Consolidated KOT prep list update */
.kot-filter select {
  min-width: 155px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: white;
}

.kot-consolidated-page {
  min-height: auto;
}

.consolidated-kot-items th,
.consolidated-kot-items td {
  font-size: 15px;
}

.kot-order-list {
  display: block;
  margin-top: 4px;
  color: #444;
  font-size: 12px;
  line-height: 1.25;
}

@media print {
  .kot-order-list {
    color: #111;
  }
}

/* Multiple Unit + Price options for menu items */
.form-section-title {
  margin: 18px 0 6px;
  color: var(--green-950);
  font-weight: 900;
  font-size: 16px;
}

.compact-table th,
.compact-table td {
  padding: 10px;
}

.unit-price-table input[type="checkbox"],
.inline-check input[type="checkbox"] {
  width: auto;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
}

.unit-price-list {
  display: grid;
  gap: 4px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

/* Menu item inactive filter/delete controls */
.item-filter-actions {
  margin-top: 14px;
  margin-bottom: 12px;
}

.row-actions {
  min-width: 155px;
}

.inline-delete-form {
  display: inline-block;
  margin: 8px 0 0;
}

.small-btn {
  padding: 7px 11px;
  font-size: 12px;
  box-shadow: none;
}



.request-row-actions {
  min-width: 92px;
  white-space: nowrap;
}

.request-row-actions .compact-inline-form {
  display: inline;
  margin: 0 0 0 8px;
}

.request-list-action-link,
button.request-list-action-link {
  appearance: none;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--green-900);
  cursor: pointer;
  display: inline;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  padding: 0;
  text-decoration: underline;
}

button.request-list-action-link:hover,
button.request-list-action-link:focus-visible,
.request-list-action-link:hover,
.request-list-action-link:focus-visible {
  color: var(--punitha-red);
  outline-offset: 3px;
}

.request-row-actions .btn {
  vertical-align: middle;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  min-width: 16px;
}

/* Order screen item/unit dropdown layout update */
.order-items-table {
  min-width: 1120px;
}

.order-items-table .order-item-cell {
  min-width: 230px;
}

.order-items-table .order-unit-cell {
  min-width: 210px;
  width: 220px;
}

.order-items-table .order-unit-select {
  min-width: 200px;
}

.order-items-table .order-qty-cell {
  width: 90px;
}

.order-items-table .order-price-cell {
  width: 115px;
}

.order-items-table .order-qty-input {
  width: 76px;
  min-width: 76px;
  padding-left: 8px;
  padding-right: 8px;
}

.order-items-table .order-price-input {
  width: 100px;
  min-width: 100px;
  padding-left: 8px;
  padding-right: 8px;
}


/* Orders screen: hide browser spinner arrows on Qty and Unit Price inputs to avoid accidental changes. */
.order-items-table .order-qty-input::-webkit-outer-spin-button,
.order-items-table .order-qty-input::-webkit-inner-spin-button,
.order-items-table .order-price-input::-webkit-outer-spin-button,
.order-items-table .order-price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.order-items-table .order-qty-input,
.order-items-table .order-price-input {
  -moz-appearance: textfield;
  appearance: textfield;
}

.order-items-table .order-line-total-cell {
  width: 115px;
  white-space: nowrap;
}

.order-items-table .order-instructions-cell {
  min-width: 170px;
}

.order-items-table .order-action-cell {
  width: 155px;
  white-space: nowrap;
}

.order-items-table .order-action-cell .btn {
  margin: 0 4px 6px 0;
}


/* Copyright footer update */
.app-copyright {
  max-width: 1250px;
  margin: 0 auto 24px;
  padding: 0 22px 22px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.login-copyright {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  padding: 0 12px;
}

.document-copyright {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.kot-copyright {
  margin-top: 20px;
  padding-top: 10px;
}


.business-contact-line {
  display: block;
  margin-top: 5px;
  line-height: 1.45;
}

.invoice-brand .business-contact-line,
.report-print-header .business-contact-line,
.kot-brand .business-contact-line {
  font-size: 12px;
  color: var(--muted);
}

.document-copyright .business-contact-line,
.app-copyright .business-contact-line,
.login-copyright .business-contact-line {
  margin-top: 4px;
}

@media print {
  .app-copyright,
  .login-copyright,
  .document-copyright {
    color: #444;
  }
}

/* Small internal KOT option: compact, plain, no logo/business branding */
.kot-body-small {
  background: #f3f3f3;
}

.kot-small-page {
  max-width: 720px;
  min-height: auto;
  padding: 14px;
  border: 1px solid #111;
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
  font-family: Arial, Helvetica, sans-serif;
}

.kot-small-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid #111;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.kot-small-title-row h1 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #111;
}

.kot-small-title-row p {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.kot-small-summary-box {
  border: 1px solid #111;
  padding: 6px 8px;
  min-width: 88px;
  text-align: center;
}

.kot-small-summary-box strong {
  display: block;
  font-size: 17px;
}

.kot-small-summary-box span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 900;
}

.kot-small-details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #111;
  border-left: 1px solid #111;
  margin: 8px 0;
}

.kot-small-details div {
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  padding: 5px 6px;
}

.kot-small-details span {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 900;
  color: #333;
  margin-bottom: 2px;
}

.kot-small-details strong {
  font-size: 12px;
  line-height: 1.25;
}

.kot-small-note {
  border: 1px solid #111;
  padding: 6px 8px;
  margin: 6px 0;
  font-size: 12px;
  background: white;
}

.kot-small-items {
  margin-top: 8px;
  border: 1px solid #111;
}

.kot-small-items th,
.kot-small-items td {
  border: 1px solid #111;
  padding: 5px 6px;
  font-size: 11px;
  line-height: 1.25;
}

.kot-small-items th {
  background: #111;
  color: white;
  font-size: 10px;
  letter-spacing: 0;
}

.kot-small-items td strong {
  font-size: 12px;
}

.kot-small-items .kot-item-name strong {
  font-weight: 900;
  text-transform: uppercase;
}

.kot-small-items .kot-qty {
  font-size: 13px !important;
  font-weight: 900;
  white-space: nowrap;
}

.kot-small-items .kot-qty-line {
  display: block;
  white-space: nowrap;
  line-height: 1.2;
}

.kot-small-items .check-box-cell {
  font-size: 16px !important;
}

.kot-small-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 900;
}

.kot-small-consolidated-page {
  max-width: 780px;
}

@media print {
  body.kot-body-small {
    background: white;
  }

  .kot-small-page {
    margin: 0;
    max-width: none;
    width: auto;
    padding: 10px;
    border: 1px solid #111;
    box-shadow: none;
    page-break-after: always;
  }

  .kot-small-page:last-child {
    page-break-after: auto;
  }

  .kot-small-title-row h1 {
    font-size: 18px;
  }

  .kot-small-details {
    grid-template-columns: repeat(4, 1fr);
  }

  .kot-small-items th,
  .kot-small-items td {
    padding: 4px 5px;
    font-size: 10px;
  }
}

/* Punitha Cafe logo-matched theme refresh
   Palette pulled from the logo: deep green, leaf green, gold, cream, saffron/orange. */
:root {
  --green-950: #052f1e;
  --green-900: #073d22;
  --green-800: #0f5d31;
  --green-700: #218f30;
  --green-100: #edf8ef;
  --yellow: #f6c344;
  --yellow-soft: #fff3c9;
  --cream: #fff7e8;
  --paper: rgba(255, 253, 247, 0.96);
  --ink: #173025;
  --muted: #69766e;
  --line: rgba(15, 93, 49, 0.16);
  --shadow: 0 20px 45px rgba(5, 47, 30, 0.12);
  --punitha-saffron: #d9480f;
  --punitha-saffron-dark: #b33b09;
  --punitha-chili: #b91c1c;
  --punitha-chef-cream: #fff7e8;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 6% 0%, rgba(246, 195, 68, 0.34), transparent 25%),
    radial-gradient(circle at 98% 12%, rgba(33, 143, 48, 0.16), transparent 30%),
    linear-gradient(145deg, #fff7e8 0%, #fffdf7 48%, #f0f8ef 100%);
  color: var(--ink);
}

.app-shell {
  grid-template-columns: 282px minmax(0, 1fr);
}

.sidebar {
  background:
    radial-gradient(circle at 18% 2%, rgba(246, 195, 68, 0.32), transparent 22%),
    radial-gradient(circle at 105% 88%, rgba(217, 72, 15, 0.30), transparent 28%),
    linear-gradient(180deg, #052f1e 0%, #073d22 56%, #0f5d31 100%);
  border-right: 5px solid rgba(246, 195, 68, 0.86);
  overflow: hidden;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(255,255,255,.50) 1.5px, transparent 1.5px);
  background-size: 34px 34px;
}

.brand,
.side-nav,
.sidebar-card {
  position: relative;
  z-index: 1;
}

.brand {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(246, 195, 68, 0.34);
  border-radius: 24px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.brand img {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: var(--cream);
  border: 3px solid var(--yellow);
  padding: 5px;
}

.brand strong {
  font-size: 23px;
  letter-spacing: -0.03em;
}

.brand span {
  color: #ffe58a;
  letter-spacing: 0.04em;
}

.side-nav {
  gap: 8px;
}

.side-nav a {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255,255,255,.95);
}

.side-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: transparent;
}

.side-nav a:hover,
.side-nav a:focus-visible {
  background: linear-gradient(90deg, rgba(246,195,68,.28), rgba(255,255,255,.10));
  border-color: rgba(246,195,68,.55);
  transform: translateX(4px);
}

.side-nav a:hover::before,
.side-nav a:focus-visible::before {
  background: var(--yellow);
}

.sidebar-card {
  background: rgba(255, 247, 232, 0.13);
  border: 1px solid rgba(246, 195, 68, 0.38);
  border-radius: 22px;
}

.sidebar-card strong {
  color: #fff1c2;
  font-size: 15px;
}

.main-area {
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), transparent 230px);
}

.topbar {
  border: 1px solid rgba(246, 195, 68, 0.36);
  border-top: 5px solid var(--yellow);
  box-shadow: 0 20px 45px rgba(5,47,30,.10);
}

.topbar h1,
.hero-panel h2,
.panel h2,
.panel h3,
.invoice h1,
.invoice h2,
.report-print-page h1,
.report-print-page h2 {
  letter-spacing: -0.035em;
}

.eyebrow {
  color: var(--punitha-saffron);
  letter-spacing: 0.15em;
}

.hero-panel {
  background:
    radial-gradient(circle at 82% 22%, rgba(246,195,68,.58), transparent 25%),
    radial-gradient(circle at 95% 100%, rgba(217,72,15,.42), transparent 26%),
    linear-gradient(135deg, #052f1e 0%, #0f5d31 62%, #218f30 100%);
  border: 1px solid rgba(246, 195, 68, 0.36);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(246, 195, 68, 0.22);
  border-radius: 22px;
  pointer-events: none;
}

.hero-panel img {
  background: var(--cream);
  border: 4px solid var(--yellow);
  box-shadow: 0 18px 35px rgba(0,0,0,.20);
}

.card,
.panel {
  border: 1px solid rgba(15, 93, 49, 0.13);
  box-shadow: 0 14px 34px rgba(5,47,30,.09);
}

.panel {
  border-top: 4px solid rgba(246,195,68,.72);
}

.card {
  border-top: 4px solid var(--yellow);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--green-700), var(--yellow));
}

.card strong {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 12px;
}

.card span {
  color: #073d22;
}

.stat-green {
  background:
    radial-gradient(circle at right bottom, rgba(246,195,68,.30), transparent 42%),
    linear-gradient(135deg, #073d22, #0f5d31 60%, #218f30);
  border-top-color: var(--green-700);
}

.stat-yellow {
  background:
    radial-gradient(circle at right bottom, rgba(217,72,15,.25), transparent 40%),
    linear-gradient(135deg, #f6c344, #ffe58a);
  border-top-color: var(--punitha-saffron);
}

.btn {
  border: 1px solid rgba(15,93,49,.13);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(5,47,30,.13);
}

.btn.primary {
  background: linear-gradient(135deg, var(--yellow), #ffe58a 55%, #f6c344);
  color: #073d22;
  border-color: rgba(217,72,15,.16);
}

.btn:not(.primary):not(.danger):not(.ghost):not(.whatsapp) {
  background: #eef8ef;
  color: var(--green-900);
}

.btn.ghost {
  background: #fffdf7;
  color: var(--green-900);
  border: 1px solid rgba(15,93,49,.17);
}

.btn.danger {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #fff;
  border-color: rgba(185,28,28,.25);
}

.table-link {
  color: var(--punitha-saffron-dark);
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}

table {
  border: 1px solid rgba(15,93,49,.10);
  background: #fffdf7;
}

th {
  background: linear-gradient(180deg, #073d22, #0f5d31);
  color: #fff7e8;
  border-bottom: 0;
}

td {
  background: rgba(255,255,255,.76);
}

tbody tr:nth-child(even) td {
  background: rgba(255,247,232,.82);
}

tr:hover td {
  background: rgba(246,195,68,.14);
}

label {
  color: #073d22;
}

input,
select,
textarea {
  background: #fffdf7;
  border-color: rgba(15,93,49,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(246,195,68,.22);
  outline: none;
}

input[type="checkbox"] {
  accent-color: var(--green-800);
  box-shadow: none;
}

.filter-form,
.item-filter-bar,
.send-panel {
  background:
    radial-gradient(circle at right top, rgba(246,195,68,.25), transparent 28%),
    linear-gradient(135deg, rgba(255,247,232,.96), rgba(237,248,239,.92));
  border-color: rgba(15,93,49,.16);
}

.pill {
  background: #fff3c9;
  color: #5f4300;
  border: 1px solid rgba(246,195,68,.45);
}

.status-confirmed,
.status-ready,
.status-completed {
  background: #daf5df;
  color: #0f5d31;
  border-color: rgba(15,93,49,.20);
}

.status-inquiry,
.status-preparing,
.status-sent,
.status-sent-estimates,
.pill[class*="sent"] {
  background: #fff3c9;
  color: #7a4b00;
  border-color: rgba(246,195,68,.50);
}

.status-cancelled {
  background: #ffe4dc;
  color: #9a3412;
  border-color: rgba(217,72,15,.24);
}

.flash.success {
  background: #e5f8e8;
  color: #0f5d31;
  border-color: rgba(15,93,49,.20);
}

.flash.error {
  background: #fff0e8;
  color: #9a3412;
  border-color: rgba(217,72,15,.24);
}

.login-body {
  background:
    radial-gradient(circle at 16% 10%, rgba(246,195,68,.42), transparent 24%),
    radial-gradient(circle at 86% 78%, rgba(217,72,15,.26), transparent 28%),
    linear-gradient(135deg, #052f1e 0%, #0f5d31 58%, #fff7e8 58%, #fffdf7 100%);
}

.login-card {
  border-top: 6px solid var(--yellow);
}

.login-card img {
  background: var(--cream);
  border: 4px solid var(--yellow);
  border-radius: 30px;
  padding: 6px;
}

.invoice-body {
  background: linear-gradient(180deg, #fff7e8, #fffdf7);
}

.invoice,
.report-print-page {
  border-top: 8px solid var(--green-800);
  border-bottom: 4px solid var(--yellow);
  box-shadow: 0 16px 42px rgba(5,47,30,.10);
}

.invoice h1,
.report-print-page h1 {
  color: var(--green-950);
}

.invoice h2,
.invoice h3,
.report-print-page h2,
.report-print-page h3 {
  color: var(--punitha-saffron-dark);
}

.invoice hr {
  border: 0;
  border-top: 2px solid rgba(246,195,68,.78);
  margin: 20px 0;
}

.invoice-brand img,
.report-print-header img {
  background: var(--cream);
  border: 3px solid var(--yellow);
  border-radius: 22px;
  padding: 5px;
}

.thankyou,
.estimate-note {
  border-left: 5px solid var(--yellow);
}

.app-copyright {
  color: rgba(23,48,37,.70);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 4px solid var(--yellow);
  }

  .brand {
    max-width: 410px;
  }
}

@media print {
  body,
  .invoice-body,
  .report-print-body {
    background: white !important;
  }

  .invoice,
  .report-print-page {
    border-top: 4px solid #0f5d31;
    border-bottom: 2px solid #f6c344;
    box-shadow: none;
  }

  th {
    background: #0f5d31 !important;
    color: #fff !important;
  }
}


/* Light green logo-matched refinement
   Uses the brighter leaf green from the Punitha Cafe logo (#2f8f46) so the app feels softer and less dark. */
:root {
  --green-950: #0f3d25;
  --green-900: #155c34;
  --green-800: #237b3f;
  --green-700: #2f8f46;
  --green-100: #eef9f0;
  --line: rgba(47, 143, 70, 0.18);
  --shadow: 0 18px 42px rgba(47, 143, 70, 0.11);
}

body {
  background:
    radial-gradient(circle at 6% 0%, rgba(246, 195, 68, 0.28), transparent 25%),
    radial-gradient(circle at 96% 10%, rgba(47, 143, 70, 0.20), transparent 30%),
    linear-gradient(145deg, #fff8ec 0%, #fffdf8 44%, #eef9f0 100%);
}

.sidebar {
  background:
    radial-gradient(circle at 18% 2%, rgba(246, 195, 68, 0.30), transparent 22%),
    radial-gradient(circle at 105% 88%, rgba(255, 180, 77, 0.20), transparent 28%),
    linear-gradient(180deg, #155c34 0%, #237b3f 54%, #2f8f46 100%);
  border-right-color: rgba(246, 195, 68, 0.78);
}

.brand,
.sidebar-card,
.side-nav a {
  background: rgba(255, 255, 255, 0.12);
}

.side-nav a:hover,
.side-nav a:focus-visible {
  background: linear-gradient(90deg, rgba(246,195,68,.30), rgba(255,255,255,.16));
}

.topbar {
  background: rgba(255, 253, 247, 0.97);
  border-color: rgba(47, 143, 70, 0.18);
  border-top-color: #f6c344;
}

.hero-panel {
  background:
    radial-gradient(circle at 82% 22%, rgba(246,195,68,.48), transparent 25%),
    radial-gradient(circle at 95% 100%, rgba(255, 181, 78, .26), transparent 26%),
    linear-gradient(135deg, #155c34 0%, #237b3f 58%, #2f8f46 100%);
}

.stat-green {
  background:
    radial-gradient(circle at right bottom, rgba(246,195,68,.28), transparent 42%),
    linear-gradient(135deg, #155c34, #237b3f 58%, #2f8f46);
}

.card::before {
  background: linear-gradient(180deg, #2f8f46, var(--yellow));
}

.card::after {
  background: rgba(47,143,70,.08);
}

.btn:not(.primary):not(.danger):not(.ghost):not(.whatsapp) {
  background: #eef9f0;
  color: #155c34;
}

.btn.ghost {
  color: #155c34;
  border-color: rgba(47,143,70,.20);
}

th {
  background: linear-gradient(180deg, #237b3f, #2f8f46);
}

input,
select,
textarea {
  border-color: rgba(47,143,70,.24);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2f8f46;
  box-shadow: 0 0 0 4px rgba(47,143,70,.16);
}

.filter-form,
.item-filter-bar,
.send-panel {
  background:
    radial-gradient(circle at right top, rgba(246,195,68,.22), transparent 28%),
    linear-gradient(135deg, rgba(255,248,236,.96), rgba(238,249,240,.96));
  border-color: rgba(47,143,70,.18);
}

.status-confirmed,
.status-ready,
.status-completed,
.flash.success {
  background: #e3f7e7;
  color: #155c34;
  border-color: rgba(47,143,70,.22);
}

.login-body {
  background:
    radial-gradient(circle at 16% 10%, rgba(246,195,68,.34), transparent 24%),
    radial-gradient(circle at 86% 78%, rgba(47,143,70,.22), transparent 28%),
    linear-gradient(135deg, #155c34 0%, #2f8f46 58%, #fff8ec 58%, #fffdf8 100%);
}

.invoice,
.report-print-page {
  border-top-color: #2f8f46;
}

@media print {
  .invoice,
  .report-print-page {
    border-top-color: #2f8f46;
  }

  th {
    background: #2f8f46 !important;
  }
}

/* Customer-facing menu PDF / print page */

.customer-menu-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.menu-items-top-actions {
  justify-content: flex-end;
}

.customer-menu-card {
  background:
    linear-gradient(135deg, rgba(232,244,237,.98), rgba(255,249,237,.95)),
    radial-gradient(circle at top right, rgba(246,195,68,.25), transparent 38%);
}

.customer-menu-pdf-form {
  align-items: end;
}

.customer-menu-pdf-form > div {
  min-width: 240px;
}

.customer-menu-pdf-form .btn {
  min-width: 140px;
}

.customer-menu-body {
  background: #f4fbf6;
  color: var(--ink);
}

.customer-menu-toolbar {
  max-width: 1040px;
  margin: 20px auto;
  padding: 18px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.customer-menu-toolbar h1 {
  margin: 0 0 5px;
  color: var(--green-950);
}

.customer-menu-toolbar p {
  margin: 0;
  color: var(--muted);
}

.customer-menu-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.customer-menu-page {
  max-width: 1040px;
  margin: 20px auto 36px;
  background: #fffdf8;
  border: 1px solid rgba(15, 93, 49, .16);
  border-radius: 26px;
  box-shadow: 0 22px 55px rgba(5, 47, 30, .12);
  overflow: hidden;
}

.customer-menu-header {
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(232,244,237,.96), rgba(255,241,194,.60)),
    radial-gradient(circle at top right, rgba(246,195,68,.35), transparent 42%);
  border-bottom: 1px solid var(--line);
}

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

.customer-menu-brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: white;
  border-radius: 22px;
  padding: 8px;
  box-shadow: 0 10px 25px rgba(5,47,30,.12);
}

.customer-menu-brand h1 {
  margin: 0;
  font-size: 32px;
  color: var(--green-950);
}

.customer-menu-brand p {
  margin: 5px 0 0;
  color: var(--green-800);
  font-weight: 700;
}

.customer-menu-contact,
.customer-menu-address {
  color: var(--muted) !important;
  font-weight: 600 !important;
}

.customer-menu-title-box {
  min-width: 240px;
  padding: 17px 18px;
  border-radius: 20px;
  background: white;
  border: 1px solid rgba(15,93,49,.14);
  text-align: right;
}

.customer-menu-title-box span,
.customer-menu-title-box small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}

.customer-menu-title-box strong {
  display: block;
  margin: 8px 0;
  color: var(--green-900);
  font-size: 21px;
}

.customer-menu-category {
  padding: 24px 32px 4px;
}

.customer-menu-category + .customer-menu-category {
  border-top: 1px dashed rgba(15,93,49,.24);
}

.customer-menu-category h2 {
  margin: 0 0 12px;
  padding: 11px 15px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  font-size: 20px;
}

.customer-menu-table {
  width: 100%;
  margin-top: 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 93, 49, .18);
  border-radius: 14px;
  background: white;
}

.customer-menu-table th {
  background: #dff1e5;
  color: var(--green-950);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.customer-menu-table th,
.customer-menu-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15,93,49,.12);
  vertical-align: middle;
}

.customer-menu-table tbody tr:nth-child(even) td {
  background: #fbfff9;
}

.customer-menu-table tbody tr:last-child td {
  border-bottom: 0;
}

.customer-menu-table tr:hover td {
  background: #fbfff9;
}

.customer-menu-slno {
  width: 52px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.customer-menu-price-col {
  width: 130px;
  text-align: right;
  font-weight: 900;
  color: var(--green-900);
  white-space: nowrap;
}

.same-item-unit-note {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f4fbf6;
  border: 1px solid rgba(15,93,49,.12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.customer-menu-empty {
  margin: 30px 34px;
  padding: 24px;
  background: #fff8df;
  border: 1px solid rgba(246,195,68,.35);
  border-radius: 18px;
  font-weight: 800;
  color: #755200;
}

.customer-menu-footer {
  margin: 22px 32px 30px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #f4fbf6;
  border: 1px solid rgba(15,93,49,.12);
  color: var(--green-900);
  display: grid;
  gap: 6px;
}

.customer-menu-footer span {
  color: var(--muted);
}

@media (max-width: 760px) {
  .customer-menu-toolbar,
  .customer-menu-header {
    flex-direction: column;
    align-items: stretch;
  }

  .customer-menu-title-box {
    text-align: left;
  }

  .customer-menu-brand {
    align-items: flex-start;
  }

  .customer-menu-table {
    font-size: 13px;
  }

  .customer-menu-table th,
  .customer-menu-table td {
    padding: 8px;
  }
}

@media print {
  body.customer-menu-body {
    background: white !important;
  }

  .customer-menu-page {
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .customer-menu-header {
    padding: 12px 0 12px;
    background: white !important;
    border-bottom: 2px solid #dcebe1;
  }

  .customer-menu-brand img {
    width: 70px;
    height: 70px;
    box-shadow: none;
    border: 1px solid #dcebe1;
  }

  .customer-menu-brand h1 {
    font-size: 25px;
  }

  .customer-menu-brand p {
    font-size: 12px;
  }

  .customer-menu-title-box {
    border: 1px solid #dcebe1;
    padding: 10px 12px;
  }

  .customer-menu-title-box strong {
    font-size: 17px;
  }

  .customer-menu-category {
    padding: 14px 0 2px;
    break-inside: avoid;
  }

  .customer-menu-category h2 {
    padding: 8px 10px;
    border-radius: 0;
    font-size: 15px;
    color: white !important;
    background: #2f8f46 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .customer-menu-table {
    border-radius: 0;
    font-size: 11px;
    page-break-inside: auto;
  }

  .customer-menu-table th {
    background: #dff1e5 !important;
    color: #073d22 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .customer-menu-table th,
  .customer-menu-table td {
    padding: 6px 7px;
  }

  .customer-menu-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .same-item-unit-note {
    display: none;
  }

  .customer-menu-footer {
    margin: 14px 0 0;
    padding: 10px;
    border-radius: 0;
    font-size: 11px;
  }
}

/* Customer menu unit-header price matrix update */
.customer-menu-subcategory-section {
  margin: 18px 0 24px;
  break-inside: avoid;
}

.customer-menu-subcategory-section h3 {
  margin: 0;
  padding: 10px 13px;
  color: var(--green-950);
  background: #edf8ef;
  border: 1px solid rgba(15,93,49,.16);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  font-size: 16px;
  font-weight: 900;
}

.customer-menu-price-matrix-table {
  border-radius: 0 0 14px 14px;
}

.customer-menu-price-matrix-table th,
.customer-menu-price-matrix-table td {
  text-align: center;
}

.customer-menu-price-matrix-table .customer-menu-item-col,
.customer-menu-price-matrix-table .customer-menu-item-name {
  text-align: left;
}

.customer-menu-item-col {
  min-width: 260px;
}

.customer-menu-unit-price-col {
  min-width: 95px;
  width: 115px;
  white-space: nowrap;
  font-weight: 900;
  color: var(--green-900);
}

.customer-menu-no-price {
  color: #9aa5a0;
  font-weight: 800;
}

@media (max-width: 760px) {
  .customer-menu-subcategory-section {
    overflow-x: auto;
  }

  .customer-menu-price-matrix-table {
    min-width: 620px;
  }
}

@media print {
  .customer-menu-subcategory-section {
    margin: 10px 0 14px;
    break-inside: avoid;
  }

  .customer-menu-subcategory-section h3 {
    padding: 6px 8px;
    border-radius: 0;
    font-size: 13px;
    background: #edf8ef !important;
    color: #073d22 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .customer-menu-price-matrix-table {
    border-radius: 0;
  }

  .customer-menu-item-col {
    min-width: 190px;
  }

  .customer-menu-unit-price-col {
    min-width: 70px;
    width: auto;
  }
}

/* Customer menu print first-page spacing fix */
@media print {
  @page {
    margin: 0.35in;
  }

  html,
  body.customer-menu-body {
    margin: 0 !important;
    padding: 0 !important;
  }

  .customer-menu-page {
    display: block !important;
    width: 100% !important;
  }

  .customer-menu-header {
    padding: 6px 0 8px !important;
    margin: 0 0 6px !important;
    gap: 10px !important;
    align-items: flex-start !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  .customer-menu-brand {
    gap: 9px !important;
  }

  .customer-menu-brand img {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px !important;
    padding: 3px !important;
  }

  .customer-menu-brand h1 {
    font-size: 18px !important;
    line-height: 1.05 !important;
  }

  .customer-menu-brand p {
    margin-top: 2px !important;
    font-size: 9.5px !important;
    line-height: 1.2 !important;
  }

  .customer-menu-title-box {
    min-width: 170px !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
  }

  .customer-menu-title-box span,
  .customer-menu-title-box small {
    font-size: 8.5px !important;
    line-height: 1.1 !important;
  }

  .customer-menu-title-box strong {
    margin: 3px 0 !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
  }

  /* Do not force the whole category/subcategory to move to the next page.
     That was causing page 1 to show only the header with the menu table pushed to page 2. */
  .customer-menu-category,
  .customer-menu-subcategory-section,
  .customer-menu-table,
  .customer-menu-price-matrix-table {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  .customer-menu-category {
    padding: 6px 0 0 !important;
    margin: 0 !important;
    page-break-before: auto !important;
    break-before: auto !important;
  }

  .customer-menu-category + .customer-menu-category {
    border-top: 0 !important;
    margin-top: 8px !important;
  }

  .customer-menu-category h2 {
    margin: 0 0 5px !important;
    padding: 5px 8px !important;
    font-size: 12px !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  .customer-menu-subcategory-section {
    margin: 5px 0 8px !important;
  }

  .customer-menu-subcategory-section h3 {
    padding: 4px 6px !important;
    font-size: 11px !important;
    page-break-after: avoid;
    break-after: avoid;
  }

  .customer-menu-price-matrix-table {
    font-size: 9.5px !important;
  }

  .customer-menu-price-matrix-table thead {
    display: table-header-group;
  }

  .customer-menu-price-matrix-table th,
  .customer-menu-price-matrix-table td,
  .customer-menu-table th,
  .customer-menu-table td {
    padding: 4px 5px !important;
    line-height: 1.15 !important;
  }

  .customer-menu-slno {
    width: 28px !important;
  }

  .customer-menu-item-col {
    min-width: 145px !important;
  }

  .customer-menu-unit-price-col {
    min-width: 52px !important;
    width: auto !important;
  }

  .customer-menu-footer {
    margin: 8px 0 0 !important;
    padding: 6px 8px !important;
    font-size: 9.5px !important;
  }
}


/* KOT marker-style highlight update: yellow highlighter only behind the actual text, not the whole box. */
.kot-highlight-info {
  background: transparent !important;
  box-shadow: none !important;
}

.kot-highlight-info span {
  color: #111 !important;
}

.kot-highlight-info strong,
.kot-inline-highlight {
  display: inline;
  background: linear-gradient(to top, rgba(255, 230, 80, 0.9) 0 58%, transparent 58% 100%) !important;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #111 !important;
  font-weight: 900;
  padding: 0 0.12em;
}

.kot-inline-highlight {
  line-height: 1.35;
}

@media print {
  .kot-highlight-info strong,
  .kot-inline-highlight {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Orders bulk action bars */
.bulk-action-bar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
  padding: 14px;
  border: 1px solid rgba(15,93,49,.14);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,247,232,.95), rgba(237,248,239,.95));
}

.bulk-action-bar.is-hidden,
.bulk-custom-amount.is-hidden {
  display: none;
}

.bulk-payment-bar {
  background: linear-gradient(135deg, rgba(237,248,239,.95), rgba(255,247,232,.95));
}

.bulk-selected-count {
  align-self: center;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,93,49,.12);
  border-radius: 999px;
  padding: 5px 10px;
}

.bulk-action-bar select {
  max-width: 230px;
  min-width: 180px;
}

.bulk-field {
  display: grid;
  gap: 4px;
}

.bulk-field label {
  font-size: 12px;
  font-weight: 800;
  color: var(--green-800);
}

.bulk-field input,
.bulk-field select {
  min-height: 38px;
}

.bulk-notes-field {
  min-width: 180px;
  flex: 1 1 200px;
}

.orders-table {
  font-size: 14px;
}

.orders-table .select-col {
  width: 58px;
  text-align: center;
  vertical-align: middle;
}


.btn.small {
  padding: 8px 12px;
  font-size: 12px;
  box-shadow: none;
}

/* Completed order payment warning modal */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.app-modal.is-hidden {
  display: none;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .42);
  backdrop-filter: blur(2px);
}

.app-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  background: #fffef8;
  border: 1px solid rgba(15, 93, 49, .18);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, .24);
  padding: 22px;
}

.app-modal-card h3 {
  margin-top: 0;
}

.modal-balance-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 18px;
}

.modal-balance-row {
  display: grid;
  grid-template-columns: minmax(95px, 1fr) minmax(120px, 1.5fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid rgba(15, 93, 49, .1);
  border-radius: 14px;
  background: rgba(255, 247, 232, .8);
}

.modal-balance-row b {
  color: var(--red, #a33);
  white-space: nowrap;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* Global number input cleanup: hide browser up/down spinner arrows everywhere.
   This prevents accidental value changes from the small arrows on number fields. */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}



/* Outstanding balance dashboard metric */
.card-link {
  color: inherit;
  display: block;
  text-decoration: none;
}

.card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(5,47,30,.13);
}

.card small {
  color: var(--muted);
  display: block;
  font-weight: 800;
  margin-top: 4px;
}

.stat-outstanding {
  background:
    radial-gradient(circle at right bottom, rgba(246,195,68,.30), transparent 42%),
    linear-gradient(135deg, #fff9e8, #fff1c2);
  border-top-color: #f6c344;
}

.stat-outstanding span {
  color: #8a2f00;
}


.orders-location-filter-select {
  width: 210px;
  max-width: 100%;
}

.orders-filter-form {
  grid-template-columns: minmax(220px, 320px) minmax(170px, 230px) auto;
}

@media (max-width: 900px) {
  .orders-location-filter-select {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .orders-filter-form {
    grid-template-columns: 1fr;
  }
}

/* Live Kitchen KOT touch display */
.kitchen-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(246,195,68,.20), transparent 30%),
    linear-gradient(135deg, #052f1e 0%, #0f5d31 28%, #fff9ed 28%, #fff9ed 100%);
  padding: 18px;
}

.kitchen-topbar,
.kitchen-filters,
.kitchen-order-card,
.kitchen-empty {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.kitchen-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 28px;
  padding: 18px 22px;
  box-shadow: var(--shadow);
}

.kitchen-brand-line {
  display: flex;
  align-items: center;
  gap: 16px;
}

.kitchen-brand-line img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: white;
  border-radius: 20px;
  padding: 6px;
}

.kitchen-topbar h1 {
  margin: 2px 0 2px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  color: var(--green-950);
}

.kitchen-subtitle {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.kitchen-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.kitchen-flash {
  max-width: 1600px;
  margin: 14px auto 0;
}

.kitchen-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}

.kitchen-filters label {
  margin-top: 0;
}

.kitchen-board {
  max-width: 1600px;
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 18px;
  align-items: start;
}

.kitchen-order-card {
  background: rgba(255,255,255,.96);
  border: 3px solid rgba(15,93,49,.18);
  border-radius: 30px;
  box-shadow: 0 18px 55px rgba(5,47,30,.18);
  overflow: hidden;
}

.kitchen-order-card.all-items-complete {
  border-color: rgba(11,84,42,.55);
}

.kitchen-order-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(232,244,237,.95), rgba(255,241,194,.62));
  border-bottom: 1px solid var(--line);
}

.kitchen-order-number {
  display: inline-block;
  font-size: 18px;
  font-weight: 900;
  color: var(--green-800);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 10px;
}

.kitchen-order-head h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 44px);
  color: var(--green-950);
  letter-spacing: .02em;
}

.kitchen-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kitchen-order-meta span {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  font-weight: 800;
}

.kitchen-status-stack {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: end;
}

.kitchen-status-pill,
.kitchen-progress-pill,
.kitchen-item-status {
  display: inline-block;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  white-space: nowrap;
}

.kitchen-status-pill {
  background: var(--green-900);
  color: white;
  font-size: 16px;
}

.kitchen-progress-pill {
  background: var(--yellow-soft);
  color: #6e4c00;
}

.kitchen-note {
  margin: 14px 18px 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: #fff8df;
  border: 1px solid rgba(246,195,68,.42);
  font-weight: 700;
}

.kitchen-item-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.kitchen-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 2px solid rgba(15,93,49,.15);
  border-radius: 24px;
  padding: 16px;
  background: white;
}

.kitchen-item-completed {
  background: #e4f8eb;
  border-color: rgba(11,84,42,.38);
}

.kitchen-item-partial {
  background: #fff8df;
  border-color: rgba(246,195,68,.55);
}

.kitchen-item-title {
  font-size: clamp(23px, 2.4vw, 36px);
  line-height: 1.08;
  font-weight: 1000;
  color: var(--green-950);
}

.kitchen-item-completed .kitchen-item-title {
  text-decoration: line-through;
  text-decoration-thickness: 4px;
  opacity: .72;
}

.kitchen-item-qty {
  margin-top: 9px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kitchen-item-qty span {
  font-size: 18px;
  font-weight: 900;
  background: var(--yellow-soft);
  color: #5b4000;
  border-radius: 999px;
  padding: 7px 11px;
  white-space: nowrap;
}

.kitchen-item-instructions {
  margin-top: 10px;
  font-size: 17px;
  color: #7a3d00;
  background: #fff4d0;
  border-radius: 14px;
  padding: 9px 11px;
}

.kitchen-item-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
  min-width: 128px;
}

.kitchen-item-status {
  text-align: center;
  background: #edf3f0;
  color: var(--green-900);
}

.kitchen-item-completed .kitchen-item-status {
  background: #0b542a;
  color: white;
}

.kitchen-done-btn {
  min-height: 74px;
  border: 0;
  border-radius: 22px;
  padding: 16px 20px;
  background: var(--yellow);
  color: #173b2f;
  font-size: 24px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(5,47,30,.16);
}

.kitchen-done-btn.is-done {
  background: #0b542a;
  color: white;
}

.kitchen-done-btn:active,
.kitchen-order-actions .btn:active {
  transform: scale(.97);
}

.kitchen-done-btn:disabled,
.kitchen-order-actions .btn:disabled {
  opacity: .58;
  cursor: wait;
}

.kitchen-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 18px;
}

.kitchen-order-actions .btn {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kitchen-empty {
  grid-column: 1 / -1;
  background: rgba(255,255,255,.94);
  border-radius: 28px;
  padding: 42px;
  text-align: center;
  box-shadow: var(--shadow);
}

.kitchen-empty h2 {
  margin: 0 0 8px;
  color: var(--green-950);
}

.kitchen-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  background: #073d22;
  color: white;
  border-radius: 18px;
  padding: 16px 18px;
  font-weight: 900;
  box-shadow: 0 15px 36px rgba(0,0,0,.28);
}

.kitchen-toast.is-error {
  background: #8a1f1f;
}

@media (max-width: 1000px) {
  .kitchen-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .kitchen-top-actions {
    justify-content: flex-start;
  }

  .kitchen-filters {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .kitchen-body {
    padding: 10px;
  }

  .kitchen-filters,
  .kitchen-item-row {
    grid-template-columns: 1fr;
  }

  .kitchen-order-head {
    flex-direction: column;
  }

  .kitchen-status-stack {
    justify-items: start;
  }

  .kitchen-item-actions {
    min-width: 0;
  }
}


/* Combined Today KOT screen */
.kot-menu-hero {
  align-items: center;
}

.kot-menu-panel .panel-head {
  align-items: flex-start;
}

.kot-menu-filter {
  align-items: end;
}

.kot-format-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.kot-format-card {
  border: 1px solid rgba(15, 93, 49, .18);
  background: linear-gradient(135deg, #fffdf4, #ffffff);
  color: var(--green-900);
  border-radius: 20px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  min-height: 112px;
  box-shadow: 0 10px 24px rgba(5,47,30,.08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.kot-format-card:hover,
.kot-format-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(5,47,30,.13);
  border-color: rgba(242, 181, 25, .9);
}

.kot-format-card strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: var(--green-950);
  margin-bottom: 8px;
}

.kot-format-card span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

/* Customer menu request workflow */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--green-950);
  font-size: 12px;
  font-weight: 900;
}

.copy-link-box,
.note-box,
.estimate-create-panel,
.status-update-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}

.copy-link-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.copy-link-row input {
  flex: 1 1 420px;
  font-family: monospace;
}

.inline-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  align-items: end;
}

.qty-mini {
  max-width: 110px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.public-menu-body {
  background: linear-gradient(135deg, #073d22 0%, #0f5d31 32%, #fff9ed 32%, #fff9ed 100%);
  min-height: 100vh;
}

.public-menu-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.public-menu-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow);
  border-radius: 26px;
  padding: 22px;
  margin: 18px 0;
}

.public-menu-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(7,61,34,.97), rgba(23,115,61,.92)),
    radial-gradient(circle at top right, rgba(246,195,68,.38), transparent 38%);
  color: white;
}

.public-menu-hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 5vw, 44px);
}

.public-menu-hero p:not(.eyebrow) {
  color: rgba(255,255,255,.82);
  margin: 0;
}

.public-menu-hero .public-customer-greeting {
  color: #fff;
  font-weight: 850;
  font-size: 18px;
  margin-bottom: 6px;
}

.public-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.28));
}

.public-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.public-event-details-text-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.public-event-details-text-grid > div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf7;
  padding: 12px 14px;
}

.public-event-details-text-grid > div.wide {
  grid-column: 1 / -1;
}

.public-event-details-text-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.public-event-details-text-grid strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  white-space: pre-wrap;
}

.public-menu-tools input {
  min-width: min(360px, 100%);
}

.public-category h3 {
  margin-top: 22px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-100);
  color: var(--green-950);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.public-subcategory h4 {
  color: var(--green-800);
  margin: 18px 0 10px;
}

.public-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.public-menu-item {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fffdf7;
  cursor: pointer;
}

.public-menu-item:has(input[type="checkbox"]:checked) {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(23,115,61,.12);
  background: #f4fff7;
}

.public-item-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.public-item-check input {
  margin-top: 4px;
  width: 20px;
  height: 20px;
}

.public-item-check strong {
  display: block;
  font-size: 16px;
}

.public-item-check span {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.public-item-fields {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
}

.public-submit-bar {
  position: sticky;
  bottom: 12px;
  z-index: 10;
  background: rgba(255,249,237,.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.public-submit-btn {
  font-size: 17px;
  padding: 14px 22px;
}

.public-submit-bar p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 700px) {
  .public-menu-hero {
    align-items: flex-start;
  }
  .public-logo {
    width: 78px;
    height: 78px;
  }
  .public-item-fields {
    grid-template-columns: 1fr;
  }
  .copy-link-row {
    display: grid;
  }
}

/* Customer menu request table layout */
.public-menu-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.public-menu-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.public-menu-table th,
.public-menu-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
}

.public-menu-table th:last-child,
.public-menu-table td:last-child {
  border-right: 0;
}

.public-menu-table tbody tr:last-child td {
  border-bottom: 0;
}

.public-menu-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4fff7;
  color: var(--green-950);
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
}

.public-item-col {
  min-width: 220px;
  text-align: left !important;
}

.public-note-col {
  min-width: 210px;
}

.public-item-name {
  background: #fffdf7;
  min-width: 220px;
}

.public-item-name strong {
  display: block;
  font-size: 15px;
  color: var(--green-950);
}

.public-item-name span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.public-select-col,
.public-select-cell {
  width: 88px;
  text-align: center;
}

.public-item-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  background: #fffdf7;
  font-weight: 800;
  color: var(--green-950);
}

.public-item-choice input {
  width: 18px;
  height: 18px;
}

.public-item-choice:has(input[type="checkbox"]:checked) {
  border-color: var(--green-700);
  background: #eaf8ee;
  box-shadow: 0 0 0 3px rgba(23,115,61,.12);
}

.unit-select-mini {
  min-width: 160px;
}


.public-menu-row.has-selection .public-item-name {
  background: #f4fff7;
}

.public-unit-cell {
  min-width: 128px;
  text-align: center;
  background: #ffffff;
}

.public-unit-empty {
  color: #b7b7b7;
  text-align: center;
  background: #fafafa;
}

.public-unit-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: #fffdf7;
}

.public-unit-choice input {
  width: 18px;
  height: 18px;
}

.public-unit-price {
  font-weight: 800;
  color: var(--green-950);
  white-space: nowrap;
}

.public-unit-choice:has(input[type="checkbox"]:checked) {
  border-color: var(--green-700);
  background: #eaf8ee;
  box-shadow: 0 0 0 3px rgba(23,115,61,.12);
}

.public-note-cell input {
  min-width: 190px;
}

@media (max-width: 700px) {
  .public-menu-shell {
    width: min(100% - 18px, 1180px);
  }

  .public-menu-card {
    padding: 16px;
    border-radius: 20px;
  }

  .public-menu-table {
    min-width: 860px;
  }
}

/* Customer request review + optional unit controls */
.public-unit-choice.is-disabled,
.public-unit-amount:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.public-unit-number-box {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.public-unit-amount {
  width: 96px;
  min-width: 0;
  text-align: center;
  padding: 8px 7px;
  font-weight: 800;
}

.public-unit-amount:not(:disabled):focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(23,115,61,.12);
}

.public-review-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 18px;
}

.public-review-modal.is-open {
  display: grid;
  place-items: center;
}

.public-review-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.46);
}

.public-review-card {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: white;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0,0,0,.32);
  padding: 22px;
}

.public-review-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 22px;
  color: var(--muted);
  background: #fffdf7;
}

.public-review-table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}

.public-review-table tfoot th {
  background: #f4fff7;
  font-size: 16px;
}

.actions.right {
  justify-content: flex-end;
}


/* Customer request locked/review-only state */
.public-readonly-summary {
  border-color: #e2e8f0;
  background: #fffefa;
}

.public-readonly-summary .btn:disabled,
.readonly-submit-bar .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(.15);
}

.public-readonly-table .grand-total-row th,
.public-review-table .grand-total-row th {
  background: #fff3b0;
  color: var(--green-950);
  font-weight: 900;
}

.readonly-submit-bar {
  opacity: .8;
}

/* Customer link latest staff/order adjustment notice */
.strong-hint {
  background: #fff7c2;
  border-radius: 999px;
  display: inline-block;
  padding: 6px 11px;
  color: var(--green-950);
}


/* Simplified customer menu request selection */
.public-item-choice-inline {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-radius: 14px;
  padding: 10px 12px;
}

.public-item-choice-inline .public-item-choice-text {
  display: grid;
  gap: 2px;
}

.public-item-choice-inline strong {
  display: block;
  font-size: 15px;
  color: var(--green-950);
}

.public-item-choice-inline em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.public-unit-gated-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.public-menu-row:not(.has-item-selected) .public-unit-control {
  display: none !important;
}

.public-menu-row.has-item-selected .public-unit-gated-hint {
  display: none !important;
}

.public-menu-row.has-item-selected .public-unit-cell {
  background: #fbfffc;
}

.public-menu-row.has-item-selected .public-note-cell input {
  border-color: rgba(23,115,61,.30);
}

/* Customer request table/mobile view toggle */
.public-menu-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.public-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf7;
  box-shadow: 0 8px 18px rgba(7,61,34,.06);
}

.public-view-toggle-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--green-950);
  cursor: pointer;
  font-weight: 900;
  padding: 9px 13px;
  white-space: nowrap;
}

.public-view-toggle-btn.is-active {
  background: var(--green-700);
  color: white;
  box-shadow: 0 8px 16px rgba(23,115,61,.20);
}

.public-menu-mobile-mode .public-menu-table-wrap {
  overflow: visible;
  border: 0;
  background: transparent;
}

.public-menu-mobile-mode .public-menu-table,
.public-menu-mobile-mode .public-menu-table tbody,
.public-menu-mobile-mode .public-menu-table tr,
.public-menu-mobile-mode .public-menu-table td {
  display: block;
  width: 100%;
  min-width: 0;
}

.public-menu-mobile-mode .public-menu-table {
  border-collapse: separate;
  border-spacing: 0;
}

.public-menu-mobile-mode .public-menu-table thead {
  display: none;
}

.public-menu-mobile-mode .public-menu-row {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf7;
  box-shadow: 0 12px 28px rgba(7,61,34,.08);
  overflow: hidden;
}

.public-menu-mobile-mode .public-menu-row.has-selection {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(23,115,61,.10), 0 14px 30px rgba(7,61,34,.10);
  background: #f7fff9;
}

.public-menu-mobile-mode .public-menu-table td {
  border-right: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.public-menu-mobile-mode .public-menu-table td:last-child {
  border-bottom: 0;
}

.public-menu-mobile-mode .public-item-name {
  background: #f4fff7;
}

.public-menu-mobile-mode .public-item-name strong {
  font-size: 17px;
}

.public-menu-mobile-mode .public-select-cell {
  text-align: left;
  width: 100%;
  background: #ffffff;
}

.public-menu-mobile-mode .public-select-cell .public-item-choice,
.public-menu-mobile-mode .public-item-choice-inline {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 14px;
  font-size: 15px;
}

.public-menu-mobile-mode .public-unit-cell {
  text-align: left;
  background: white;
}

.public-menu-mobile-mode .public-unit-empty {
  display: none !important;
}

.public-menu-mobile-mode .public-unit-cell::before,
.public-menu-mobile-mode .public-note-cell::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.public-menu-mobile-mode .public-unit-choice {
  width: 100%;
  justify-content: space-between;
  padding: 12px 14px;
}

.public-menu-mobile-mode .public-unit-number-box {
  display: grid;
  grid-template-columns: 1fr 120px;
  align-items: center;
  gap: 10px;
  justify-items: stretch;
}

.public-menu-mobile-mode .public-unit-amount {
  width: 100%;
  min-height: 42px;
}

.public-menu-mobile-mode .public-note-cell input {
  min-width: 0;
  width: 100%;
}

@media (max-width: 760px) {
  .public-menu-tools {
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
  }

  .public-view-toggle {
    width: 100%;
  }

  .public-view-toggle-btn {
    flex: 1;
  }

  .public-menu-tools input {
    width: 100%;
  }
}

/* Orders filter alignment fix for staff locked-location view */
.orders-filter-form {
  grid-template-columns: minmax(220px, 320px) 210px auto;
  align-items: start;
  column-gap: 14px;
  row-gap: 10px;
}

.orders-filter-form > div {
  min-width: 0;
}

.orders-filter-form label {
  display: block;
  margin-bottom: 8px;
}

.orders-filter-form .filter-buttons {
  align-self: start;
  margin-top: 33px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

.orders-location-filter-select {
  width: 210px;
  max-width: 100%;
}

.orders-filter-form .hint {
  margin: 6px 0 0;
  line-height: 1.25;
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 1020px) {
  .orders-filter-form {
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 210px);
  }

  .orders-filter-form .filter-buttons {
    grid-column: 1 / -1;
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .orders-filter-form {
    grid-template-columns: 1fr;
  }

  .orders-location-filter-select {
    width: 100%;
  }

  .orders-filter-form .filter-buttons {
    grid-column: auto;
  }

  .orders-filter-form .hint {
    white-space: normal;
  }
}


/* Small Internal KOT print size / zoom control
   The default is intentionally larger than before because kitchen printouts were hard to read. */
:root {
  --small-kot-scale: 1.15;
}

.kot-print-scale-control select {
  min-width: 130px;
}

body.kot-body-small .kot-small-page {
  font-size: calc(12px * var(--small-kot-scale));
}

body.kot-body-small .kot-small-title-row h1 {
  font-size: calc(20px * var(--small-kot-scale));
  line-height: 1.1;
}

body.kot-body-small .kot-small-title-row p {
  font-size: calc(12px * var(--small-kot-scale));
}

body.kot-body-small .kot-small-summary-box strong {
  font-size: calc(17px * var(--small-kot-scale));
}

body.kot-body-small .kot-small-summary-box span {
  font-size: calc(10px * var(--small-kot-scale));
}

body.kot-body-small .kot-small-details span {
  font-size: calc(9px * var(--small-kot-scale));
}

body.kot-body-small .kot-small-details strong {
  font-size: calc(12px * var(--small-kot-scale));
}

body.kot-body-small .kot-small-note {
  font-size: calc(12px * var(--small-kot-scale));
}

body.kot-body-small .kot-small-items th,
body.kot-body-small .kot-small-items td {
  padding: calc(4px * var(--small-kot-scale)) calc(5px * var(--small-kot-scale));
  font-size: calc(11px * var(--small-kot-scale));
  line-height: 1.25;
}

body.kot-body-small .kot-small-items th {
  font-size: calc(10px * var(--small-kot-scale));
}

body.kot-body-small .kot-small-items td strong,
body.kot-body-small .kot-small-items .kot-item-name strong {
  font-size: calc(12px * var(--small-kot-scale));
}

body.kot-body-small .kot-small-items .kot-qty {
  font-size: calc(13px * var(--small-kot-scale)) !important;
}

body.kot-body-small .kot-small-items .check-box-cell {
  font-size: calc(16px * var(--small-kot-scale)) !important;
}

body.kot-body-small .kot-small-footer {
  font-size: calc(11px * var(--small-kot-scale));
}

@media print {
  body.kot-body-small .kot-small-title-row h1 {
    font-size: calc(18px * var(--small-kot-scale));
  }

  body.kot-body-small .kot-small-items th,
  body.kot-body-small .kot-small-items td {
    padding: calc(4px * var(--small-kot-scale)) calc(5px * var(--small-kot-scale));
    font-size: calc(10px * var(--small-kot-scale));
  }
}


/* Fixed-size KOT zoom values for reliable print rendering across browsers. */
body.kot-body-small {
  --small-kot-page-font-size: 13.8px;
  --small-kot-title-size: 23px;
  --small-kot-title-print-size: 20.7px;
  --small-kot-subtitle-size: 13.8px;
  --small-kot-summary-size: 19.55px;
  --small-kot-summary-label-size: 11.5px;
  --small-kot-label-size: 10.35px;
  --small-kot-value-size: 13.8px;
  --small-kot-note-size: 13.8px;
  --small-kot-header-size: 11.5px;
  --small-kot-cell-size: 12.65px;
  --small-kot-item-size: 13.8px;
  --small-kot-qty-size: 14.95px;
  --small-kot-check-size: 18.4px;
  --small-kot-footer-size: 12.65px;
  --small-kot-cell-padding-y: 4.6px;
  --small-kot-cell-padding-x: 5.75px;
}

body.kot-body-small[data-small-kot-scale="1"] {
  --small-kot-page-font-size: 12px;
  --small-kot-title-size: 20px;
  --small-kot-title-print-size: 18px;
  --small-kot-subtitle-size: 12px;
  --small-kot-summary-size: 17px;
  --small-kot-summary-label-size: 10px;
  --small-kot-label-size: 9px;
  --small-kot-value-size: 12px;
  --small-kot-note-size: 12px;
  --small-kot-header-size: 10px;
  --small-kot-cell-size: 11px;
  --small-kot-item-size: 12px;
  --small-kot-qty-size: 13px;
  --small-kot-check-size: 16px;
  --small-kot-footer-size: 11px;
  --small-kot-cell-padding-y: 4px;
  --small-kot-cell-padding-x: 5px;
}

body.kot-body-small[data-small-kot-scale="1-15"] {
  --small-kot-page-font-size: 13.8px;
  --small-kot-title-size: 23px;
  --small-kot-title-print-size: 20.7px;
  --small-kot-subtitle-size: 13.8px;
  --small-kot-summary-size: 19.55px;
  --small-kot-summary-label-size: 11.5px;
  --small-kot-label-size: 10.35px;
  --small-kot-value-size: 13.8px;
  --small-kot-note-size: 13.8px;
  --small-kot-header-size: 11.5px;
  --small-kot-cell-size: 12.65px;
  --small-kot-item-size: 13.8px;
  --small-kot-qty-size: 14.95px;
  --small-kot-check-size: 18.4px;
  --small-kot-footer-size: 12.65px;
  --small-kot-cell-padding-y: 4.6px;
  --small-kot-cell-padding-x: 5.75px;
}

body.kot-body-small[data-small-kot-scale="1-3"] {
  --small-kot-page-font-size: 15.6px;
  --small-kot-title-size: 26px;
  --small-kot-title-print-size: 23.4px;
  --small-kot-subtitle-size: 15.6px;
  --small-kot-summary-size: 22.1px;
  --small-kot-summary-label-size: 13px;
  --small-kot-label-size: 11.7px;
  --small-kot-value-size: 15.6px;
  --small-kot-note-size: 15.6px;
  --small-kot-header-size: 13px;
  --small-kot-cell-size: 14.3px;
  --small-kot-item-size: 15.6px;
  --small-kot-qty-size: 16.9px;
  --small-kot-check-size: 20.8px;
  --small-kot-footer-size: 14.3px;
  --small-kot-cell-padding-y: 5.2px;
  --small-kot-cell-padding-x: 6.5px;
}

body.kot-body-small[data-small-kot-scale="1-45"] {
  --small-kot-page-font-size: 17.4px;
  --small-kot-title-size: 29px;
  --small-kot-title-print-size: 26.1px;
  --small-kot-subtitle-size: 17.4px;
  --small-kot-summary-size: 24.65px;
  --small-kot-summary-label-size: 14.5px;
  --small-kot-label-size: 13.05px;
  --small-kot-value-size: 17.4px;
  --small-kot-note-size: 17.4px;
  --small-kot-header-size: 14.5px;
  --small-kot-cell-size: 15.95px;
  --small-kot-item-size: 17.4px;
  --small-kot-qty-size: 18.85px;
  --small-kot-check-size: 23.2px;
  --small-kot-footer-size: 15.95px;
  --small-kot-cell-padding-y: 5.8px;
  --small-kot-cell-padding-x: 7.25px;
}

body.kot-body-small .kot-small-page {
  font-size: var(--small-kot-page-font-size) !important;
}

body.kot-body-small .kot-small-title-row h1 {
  font-size: var(--small-kot-title-size) !important;
}

body.kot-body-small .kot-small-title-row p {
  font-size: var(--small-kot-subtitle-size) !important;
}

body.kot-body-small .kot-small-summary-box strong {
  font-size: var(--small-kot-summary-size) !important;
}

body.kot-body-small .kot-small-summary-box span {
  font-size: var(--small-kot-summary-label-size) !important;
}

body.kot-body-small .kot-small-details span {
  font-size: var(--small-kot-label-size) !important;
}

body.kot-body-small .kot-small-details strong {
  font-size: var(--small-kot-value-size) !important;
}

body.kot-body-small .kot-small-note {
  font-size: var(--small-kot-note-size) !important;
}

body.kot-body-small .kot-small-items th,
body.kot-body-small .kot-small-items td {
  padding: var(--small-kot-cell-padding-y) var(--small-kot-cell-padding-x) !important;
  font-size: var(--small-kot-cell-size) !important;
}

body.kot-body-small .kot-small-items th {
  font-size: var(--small-kot-header-size) !important;
}

body.kot-body-small .kot-small-items td strong,
body.kot-body-small .kot-small-items .kot-item-name strong {
  font-size: var(--small-kot-item-size) !important;
}

body.kot-body-small .kot-small-items .kot-qty {
  font-size: var(--small-kot-qty-size) !important;
}

body.kot-body-small .kot-small-items .check-box-cell {
  font-size: var(--small-kot-check-size) !important;
}

body.kot-body-small .kot-small-footer {
  font-size: var(--small-kot-footer-size) !important;
}

@media print {
  body.kot-body-small .kot-small-title-row h1 {
    font-size: var(--small-kot-title-print-size) !important;
  }
}


.customer-event-text-block,
.staff-request-detail-lines {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf7;
  color: var(--ink);
  line-height: 1.55;
}

.customer-event-text-block p,
.staff-request-detail-lines p {
  margin: 0 0 6px;
  font-size: 15px;
}

.customer-event-text-block strong,
.staff-request-detail-lines strong {
  color: var(--green-900);
  font-weight: 850;
}

.customer-event-text-spacer {
  height: 12px;
}

.customer-event-text-spacer.small {
  height: 8px;
}

.sortable-header {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.sortable-header .sort-indicator {
  align-items: center;
  background: rgba(40, 99, 57, 0.08);
  border: 1px solid rgba(40, 99, 57, 0.18);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  height: 18px;
  justify-content: center;
  line-height: 1;
  min-width: 18px;
  padding: 0 5px;
}

.sortable-header .sort-indicator.is-active {
  background: var(--yellow, #f6c344);
  border-color: var(--yellow, #f6c344);
  color: #173b2f;
}

.sortable-header.active {
  color: #fff7e8;
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.orders-table th {
  vertical-align: middle;
}

.action-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

/* Customer request feedback */
.public-feedback-card {
  margin-top: 18px;
}

.public-feedback-form {
  margin-top: 14px;
}

.public-feedback-form textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
}

.public-feedback-existing {
  margin-top: 12px;
}

.customer-feedback-note p {
  margin: 4px 0;
}

/* Simplified public customer request menu */
.public-menu-simple-table {
  min-width: 760px;
}

.public-menu-simple-table .public-unit-select-cell {
  min-width: 190px;
}

.public-menu-simple-table .public-qty-cell {
  width: 120px;
}

.public-unit-select,
.public-unit-qty,
.public-item-instructions {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  font: inherit;
}

.public-unit-qty {
  max-width: 110px;
}

.public-unit-select:disabled,
.public-unit-qty:disabled,
.public-item-instructions:disabled {
  background: #f6f6f6;
  color: var(--muted);
  cursor: not-allowed;
}

.public-order-total-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 18px;
  margin-top: 12px;
}

.public-order-total-grid p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
}

.public-order-total-grid .grand-total-text {
  background: #f4fff7;
  color: var(--green-950);
  font-size: 18px;
}

.public-review-actions {
  flex-wrap: wrap;
}


/* Customer Request: gold Submit for Review + strict Place Order visibility */
.btn.public-submit-review-btn {
  background: linear-gradient(135deg, var(--yellow), #ffe58a 55%, #f6c344) !important;
  color: #073d22 !important;
  border-color: rgba(217,72,15,.22) !important;
  font-weight: 800;
}

.btn.public-submit-review-btn:hover,
.btn.public-submit-review-btn:focus-visible {
  box-shadow: 0 12px 24px rgba(246,195,68,.28);
}

.btn.public-submit-review-btn:disabled,
#placeOrderBtn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


/* Mobile-only account block inside the collapsible menu. Desktop keeps the original topbar user/logout. */
.mobile-menu-account {
  display: none;
}

.mobile-menu-logout-form {
  margin: 0;
}

/* Mobile compatibility pass: collapsible navigation, compact headers, card-style tables, and touch-friendly forms. */
.mobile-menu-toggle {
  display: none;
}

@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background:
      radial-gradient(circle at 10% 0%, rgba(246, 195, 68, 0.22), transparent 26%),
      linear-gradient(180deg, #fff8ec 0%, #fffdf8 52%, #eef9f0 100%);
  }

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 4px solid var(--yellow);
    box-shadow: 0 10px 28px rgba(5, 47, 30, .18);
  }

  .brand {
    margin: 0;
    padding: 8px 10px;
    border-radius: 18px;
    max-width: none;
    gap: 10px;
  }

  .brand img {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    border-radius: 15px;
    padding: 3px;
  }

  .brand strong {
    font-size: 17px;
    line-height: 1.05;
  }

  .brand span {
    font-size: 11px;
  }

  .mobile-menu-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(246, 195, 68, .40);
    border-radius: 14px;
    background: rgba(255,255,255,.16);
    color: white;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    font-size: 18px;
    line-height: 1;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height .2s ease, opacity .2s ease, margin-top .2s ease;
  }

  .sidebar.nav-open .side-nav {
    max-height: 70vh;
    overflow-y: auto;
    opacity: 1;
    margin-top: 10px;
    padding-bottom: 4px;
  }

  .side-nav a {
    padding: 10px 10px;
    border-radius: 12px;
    text-align: center;
    font-size: 13px;
    line-height: 1.15;
    transform: none !important;
  }

  .sidebar-card {
    display: none;
  }

  .mobile-menu-account {
    display: block;
    grid-column: 1 / -1;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(246, 195, 68, .35);
    color: white;
    text-align: left;
  }

  .mobile-menu-user-label {
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
  }

  .mobile-menu-user-name {
    margin-top: 3px;
    font-weight: 900;
    font-size: 15px;
  }

  .mobile-menu-user-meta {
    margin-top: 2px;
    color: #ffe58a;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-menu-logout-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(246, 195, 68, .55);
    border-radius: 12px;
    background: rgba(255, 249, 237, .95);
    color: var(--green-950);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
  }

  .main-area {
    min-width: 0;
  }

  .topbar {
    margin: 10px 10px 0;
    padding: 12px 13px;
    border-radius: 18px;
    gap: 10px;
  }

  .topbar h1 {
    font-size: 18px;
    line-height: 1.15;
  }

  .topbar .eyebrow {
    display: none;
  }

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

  .top-actions .btn,
  .top-actions .logout-form,
  .top-actions .logout-form .btn,
  .top-actions .user-chip {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .top-actions .user-chip,
  .top-actions .logout-form {
    display: none;
  }

  .container {
    width: 100%;
    margin: 12px auto;
    padding: 0 10px 26px;
  }

  .hero-panel {
    margin: 0;
    padding: 18px;
    border-radius: 20px;
    flex-direction: row;
    align-items: center;
  }

  .hero-panel h2 {
    font-size: 23px;
    line-height: 1.1;
  }

  .hero-panel p:not(.eyebrow) {
    font-size: 13px;
  }

  .hero-panel img {
    width: 76px !important;
    height: 76px !important;
    border-radius: 20px;
    padding: 5px;
  }

  .grid.cards,
  .mini-report-cards,
  .report-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card,
  .panel {
    border-radius: 18px;
    padding: 14px;
  }

  .card {
    min-height: 92px;
  }

  .card strong {
    font-size: 10.5px;
  }

  .card span {
    font-size: 22px;
    margin-top: 8px;
  }

  .card small {
    font-size: 11px;
  }

  .panel {
    margin-top: 14px;
    overflow-x: visible;
  }

  .panel-head,
  .split {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .panel-head .btn,
  .split .actions .btn {
    width: 100%;
    text-align: center;
  }

  .actions,
  .filter-buttons,
  .customer-menu-quick-actions,
  .menu-items-top-actions,
  .customer-menu-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .actions .btn,
  .filter-buttons .btn,
  .customer-menu-quick-actions .btn,
  .menu-items-top-actions .btn,
  .customer-menu-toolbar-actions .btn {
    width: 100%;
    text-align: center;
  }

  .btn {
    min-height: 42px;
    padding: 10px 13px;
    border-radius: 14px;
  }

  .form-grid,
  .form-grid.two-col,
  .filter-form,
  .orders-filter-form,
  .item-filter-bar,
  .inline-form,
  .inline-form-grid,
  .bulk-action-bar,
  .kot-filter,
  .customer-menu-pdf-form {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 10px;
    width: 100%;
  }

  .wide {
    grid-column: auto;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  label {
    margin-top: 8px;
  }

  .copy-link-row,
  .modal-actions,
  .kot-toolbar,
  .customer-menu-toolbar,
  .kitchen-topbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .copy-link-row .btn,
  .modal-actions .btn,
  .kot-toolbar .btn,
  .customer-menu-toolbar .btn,
  .kitchen-topbar .btn {
    width: 100%;
  }

  .bulk-field,
  .bulk-notes-field,
  .bulk-action-bar select,
  .inline-form select,
  .orders-location-filter-select {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .modal-balance-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  /* Turn admin/staff tables into stacked cards on phones. Footer JS copies th text into data-label. */
  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) {
    min-width: 0 !important;
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 0;
  }

  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) thead {
    display: none;
  }

  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items),
  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) tbody,
  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) tr,
  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) td {
    display: block;
  }

  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) tr {
    margin: 0 0 12px;
    overflow: hidden;
    border: 1px solid rgba(47,143,70,.16);
    border-radius: 16px;
    background: #fffdf8;
    box-shadow: 0 8px 20px rgba(47,143,70,.08);
  }

  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) td {
    border: 0;
    border-bottom: 1px solid rgba(47,143,70,.10);
    padding: 10px 11px;
    background: #fffdf8 !important;
    text-align: left !important;
  }

  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) td:last-child {
    border-bottom: 0;
  }

  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--green-800);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .responsive-data-table:not(.customer-menu-price-matrix-table):not(.kot-items):not(.kot-small-items) td[data-label=""]::before {
    display: none;
  }

  .orders-table .select-col,
  .orders-table td.select-col {
    width: auto;
    text-align: left;
  }

  .orders-table input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }

  .responsive-data-table .btn,
  .responsive-data-table a.btn,
  .responsive-data-table button.btn {
    width: 100%;
    margin: 3px 0;
    text-align: center;
  }

  .responsive-data-table td a:not(.btn) {
    display: inline-block;
    padding: 6px 0;
  }

  .order-items-table td,
  #requestAddItemsTable td {
    display: block !important;
  }

  .order-items-table .order-item-cell,
  .order-items-table .order-unit-cell,
  .order-items-table .order-qty-cell,
  .order-items-table .order-price-cell,
  .order-items-table .order-instructions-cell,
  .order-items-table .order-action-cell {
    min-width: 0;
    width: auto;
  }

  .order-items-table select,
  .order-items-table input,
  .order-items-table textarea,
  #requestAddItemsTable select,
  #requestAddItemsTable input,
  #requestAddItemsTable textarea {
    width: 100% !important;
    min-width: 0 !important;
  }

  .order-items-table .order-action-cell .btn,
  #requestAddItemsTable .order-action-cell .btn {
    width: 100%;
    margin: 4px 0;
  }

  .public-menu-simple-table select,
  .public-menu-simple-table input,
  .public-menu-simple-table textarea {
    width: 100% !important;
  }

  .customer-menu-price-matrix-table {
    min-width: 620px;
  }

  .customer-menu-subcategory-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 520px) {
  .top-actions,
  .actions,
  .filter-buttons,
  .customer-menu-quick-actions,
  .menu-items-top-actions,
  .customer-menu-toolbar-actions,
  .grid.cards,
  .mini-report-cards,
  .report-chart-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-panel img {
    width: 64px !important;
    height: 64px !important;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .card span {
    font-size: 20px;
  }
}


.secure-customer-link {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #e8d7a2;
  border-radius: 12px;
  background: #fff8e6;
}

.copy-link-input {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #d9c382;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
}

/* Public homepage / quick estimate */
.public-home-body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 210, 80, .22), transparent 32%),
    linear-gradient(135deg, #fffaf0 0%, #f4fbef 55%, #fffdf7 100%);
}

.public-home-topbar {
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--green-900);
  text-decoration: none;
}

.public-home-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(47, 143, 70, .14);
}

.public-home-brand strong,
.public-home-brand em {
  display: block;
}

.public-home-brand strong {
  font-size: 20px;
  line-height: 1.1;
}

.public-home-brand em {
  margin-top: 3px;
  font-style: normal;
  color: #8b6a16;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.public-staff-login {
  color: var(--green-800);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(47, 143, 70, .16);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(47, 143, 70, .10);
}

.public-home-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 18px 20px 36px;
}

.public-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: 28px;
  align-items: start;
}

.public-home-hero-copy {
  padding-top: 72px;
}

.public-home-hero-copy h1 {
  margin: 8px 0 14px;
  color: var(--green-900);
  font-size: clamp(34px, 6vw, 64px);
  line-height: .98;
  letter-spacing: -.04em;
}

.public-home-note {
  max-width: 680px;
  color: #4a5b46;
  font-size: 18px;
  line-height: 1.65;
}

.public-home-highlights {
  margin-top: 26px;
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(47, 143, 70, .18);
}

.public-home-highlights span {
  display: block;
  padding-left: 14px;
  border-left: 3px solid rgba(246, 195, 68, .95);
  color: #42523f;
  cursor: default;
}

.public-home-highlights em,
.public-home-highlights strong {
  display: block;
}

.public-home-highlights em {
  margin-bottom: 3px;
  color: #7b5d12;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.public-home-highlights strong {
  color: var(--green-900);
  font-size: 16px;
  line-height: 1.25;
}

.public-home-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(47, 143, 70, .16);
  border-radius: 26px;
  box-shadow: 0 22px 60px rgba(47, 143, 70, .13);
}

.public-home-quick-card {
  padding: 24px;
}

.public-home-quick-card h2,
.public-home-about h2 {
  margin: 5px 0 8px;
  color: var(--green-900);
}

.public-quote-form {
  margin-top: 16px;
}

.public-spam-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.public-menu-link-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(232,244,237,.98), rgba(255,241,194,.70));
  border: 1px solid rgba(47, 143, 70, .22);
}

.public-menu-link-panel h3 {
  margin: 0 0 8px;
  color: var(--green-900);
  font-size: 22px;
}

.public-menu-link-intro,
.public-menu-link-note {
  margin: 0 0 12px;
  color: #4a5b46;
  line-height: 1.55;
}

.public-menu-link-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 7px;
}

.public-menu-link-row input {
  flex: 1 1 260px;
  min-width: 0;
  font-family: monospace;
  background: #fff;
}

.public-menu-instructions {
  margin: 14px 0;
  padding-left: 22px;
  color: #34443a;
  line-height: 1.55;
}

.public-menu-instructions li + li {
  margin-top: 6px;
}

.public-menu-link-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.public-menu-link-actions .btn {
  justify-content: center;
  text-align: center;
}

.public-menu-link-note {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.public-quote-form label {
  color: var(--green-900);
  font-weight: 900;
}

.public-quote-submit {
  width: 100%;
  margin-top: 16px;
  justify-content: center;
  font-size: 16px;
}

.public-form-footnote {
  margin: 10px 0 0;
  color: #6a715f;
  font-size: 13px;
  text-align: center;
}

.public-home-about {
  margin-top: 28px;
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.public-home-about p {
  margin: 0;
  color: #4a5b46;
  line-height: 1.65;
}

.public-home-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 20px 26px;
  color: #6f765f;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 920px) {
  .public-home-hero,
  .public-home-about {
    grid-template-columns: 1fr;
  }

  .public-home-hero-copy {
    padding-top: 0;
  }

  .public-home-quick-card {
    order: 2;
  }
}

@media (max-width: 560px) {
  .public-home-topbar {
    align-items: flex-start;
    padding: 14px 14px 8px;
  }

  .public-home-shell {
    padding: 12px 14px 28px;
  }

  .public-home-brand img {
    width: 48px;
    height: 48px;
  }

  .public-home-brand strong {
    font-size: 17px;
  }

  .public-staff-login {
    padding: 7px 10px;
    font-size: 12px;
  }

  .public-home-hero-copy h1 {
    font-size: 36px;
  }

  .public-home-note {
    font-size: 16px;
  }

  .public-home-highlights {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .public-home-quick-card,
  .public-home-about {
    padding: 18px;
    border-radius: 20px;
  }

  .public-menu-link-actions {
    grid-template-columns: 1fr;
  }

  .public-menu-link-row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Duplicate customer warning */
.alert.warning.duplicate-customer-warning {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff4ce;
  color: #6d4f00;
  border: 1px solid #edd07a;
  line-height: 1.45;
}

.duplicate-customer-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.duplicate-customer-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .65);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.btn.warning {
  background: #fff4ce;
  color: #6d4f00;
  border: 1px solid #edd07a;
}

@media (max-width: 560px) {
  .duplicate-customer-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Customer menu: keep checkbox in its own narrow column so item names stay readable on mobile. */
.public-menu-simple-table .public-select-col,
.public-menu-simple-table .public-item-select-cell {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  text-align: center;
  vertical-align: middle;
}

.public-menu-simple-table .public-item-col,
.public-menu-simple-table .public-item-name {
  min-width: 240px;
}

.public-checkbox-choice {
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  border-radius: 14px;
  margin: 0 auto;
}

.public-checkbox-choice .public-item-checkbox {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: 0 0 auto;
}

.public-checkbox-visual {
  display: none;
}

.public-item-name-text {
  display: grid;
  gap: 2px;
}

.public-item-name-text strong {
  overflow-wrap: anywhere;
  word-break: normal;
}

.public-item-name-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

@media (max-width: 760px) {
  .public-menu-mobile-mode .public-simple-menu-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: stretch;
  }

  .public-menu-mobile-mode .public-simple-menu-row .public-item-select-cell {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-width: 0;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #f4fff7;
  }

  .public-menu-mobile-mode .public-simple-menu-row .public-item-select-cell::before,
  .public-menu-mobile-mode .public-simple-menu-row .public-item-name::before {
    display: none;
  }

  .public-menu-mobile-mode .public-simple-menu-row .public-item-name {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    display: block;
    padding: 12px 12px;
    border-bottom: 1px solid var(--line);
    background: #f4fff7;
  }

  .public-menu-mobile-mode .public-simple-menu-row .public-unit-select-cell,
  .public-menu-mobile-mode .public-simple-menu-row .public-qty-cell,
  .public-menu-mobile-mode .public-simple-menu-row .public-note-cell {
    grid-column: 1 / -1;
    min-width: 0;
    width: auto;
  }

  .public-menu-mobile-mode .public-simple-menu-row .public-unit-select-cell::before,
  .public-menu-mobile-mode .public-simple-menu-row .public-qty-cell::before,
  .public-menu-mobile-mode .public-simple-menu-row .public-note-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--green-800);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .public-menu-mobile-mode .public-simple-menu-row .public-checkbox-choice,
  .public-menu-mobile-mode .public-simple-menu-row .public-item-select-cell .public-item-choice {
    width: 42px !important;
    height: 42px;
    min-width: 42px;
    padding: 0;
    justify-content: center;
  }

  .public-menu-mobile-mode .public-simple-menu-row .public-checkbox-choice input {
    width: 22px !important;
    height: 22px;
  }

  .public-menu-mobile-mode .public-simple-menu-row .public-item-name strong {
    font-size: 16px;
    line-height: 1.25;
  }
}

/* Mobile customer menu quantity input - make 3 digit qty easy to read */
@media (max-width: 760px) {
  .public-menu-mobile-mode .public-simple-menu-row .public-qty-cell {
    align-items: flex-start;
  }

  .public-menu-mobile-mode .public-simple-menu-row .public-unit-qty {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    padding: 12px 10px;
    border-radius: 14px;
  }
}

/* Customer menu table view mobile qty input fix
   The previous mobile qty sizing only applied in Mobile View mode. Keep Qty readable
   in Table View on phones too, so up to 3 digits are visible without squishing. */
@media (max-width: 760px) {
  .public-menu-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .public-menu-simple-table .public-qty-cell {
    width: 138px !important;
    min-width: 138px !important;
    max-width: 138px !important;
  }

  .public-menu-simple-table .public-unit-qty {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    box-sizing: border-box;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    padding: 12px 10px;
    border-radius: 14px;
  }
}

/* Small Sticky Note KOT: compact plain notes for kitchen use. */
.kot-sticky-sheet {
  max-width: 1100px;
  margin: 18px auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
  align-items: start;
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
}

.kot-sticky-note {
  border: 1px solid #111;
  background: #fff;
  padding: 6px;
  break-inside: avoid;
  page-break-inside: avoid;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: none;
}

.kot-sticky-meta {
  margin-bottom: 4px;
  border-bottom: 1px solid #111;
  padding-bottom: 3px;
}

.kot-sticky-meta div {
  margin: 1px 0;
}

.kot-sticky-items {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.kot-sticky-items th,
.kot-sticky-items td {
  border: 1px solid #111;
  padding: 2px 3px;
  text-align: left;
  vertical-align: top;
  font-size: 11px;
  line-height: 1.15;
}

.kot-sticky-items th {
  font-weight: 700;
  background: transparent;
  color: #111;
}

.kot-sticky-items th:last-child,
.kot-sticky-items td:last-child {
  width: 72px;
  white-space: nowrap;
}

@media print {
  body.kot-body-small {
    background: #fff !important;
  }

  body.kot-body-small .kot-toolbar {
    display: none !important;
  }

  .kot-sticky-sheet {
    width: 100%;
    max-width: none;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }

  .kot-sticky-note {
    padding: 5px;
    font-size: 10px;
    border: 1px solid #000;
  }

  .kot-sticky-items th,
  .kot-sticky-items td {
    padding: 1.5px 2px;
    font-size: 9.5px;
  }

  .kot-sticky-items th:last-child,
  .kot-sticky-items td:last-child {
    width: 60px;
  }
}

/* Customer Request staff edit panel */
.request-details-edit-form h3 {
  margin: 0 0 3px;
  color: var(--green-950);
}

.request-details-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.request-detail-status-pill {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(251, 186, 72, .18);
  border: 1px solid rgba(251, 186, 72, .45);
  font-size: 13px;
}

.request-timestamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.request-timestamp-card {
  padding: 10px 12px;
  border: 1px solid rgba(15, 93, 49, .16);
  border-radius: 14px;
  background: rgba(15, 93, 49, .055);
}

.request-timestamp-card span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.request-timestamp-card strong {
  color: var(--green-950);
  font-size: 14px;
}

.request-details-grid label {
  margin-top: 8px;
}

.request-details-grid textarea {
  min-height: 64px;
}

.unit-price-input:disabled {
  background: #f4f4f4;
  color: #8a8a8a;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .request-details-edit-head {
    display: block;
  }

  .request-detail-status-pill {
    display: inline-block;
    margin-top: 8px;
  }
}

/* Manual sticky-note KOT layout: matches the simple handwritten kitchen notes. */
.kot-sticky-sheet {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.manual-sticky-note {
  min-height: 220px;
  padding: 12px 14px;
  border: 1px solid rgba(91, 65, 20, .25);
  border-radius: 2px;
  background-color: #efd38a;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0) 27px,
    rgba(55, 117, 168, .45) 28px,
    rgba(55, 117, 168, .45) 29px
  );
  box-shadow: 0 5px 14px rgba(0, 0, 0, .16);
  font-family: "Comic Sans MS", "Segoe Print", Arial, sans-serif;
  font-size: 18px;
  line-height: 28px;
}

.kot-sticky-heading {
  min-height: 30px;
  margin-bottom: 6px;
  padding-left: 4px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kot-sticky-list {
  margin: 0;
  padding-left: 28px;
  list-style-position: outside;
}

.kot-sticky-list li {
  min-height: 29px;
  padding-left: 4px;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kot-sticky-item-name {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kot-sticky-qty {
  display: inline-block;
  flex: 0 0 auto;
  white-space: nowrap;
}

.kot-sticky-dash {
  display: inline-block;
  flex: 0 0 auto;
  margin: 0;
}

.kot-sticky-instructions {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media print {
  .kot-sticky-sheet {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  .manual-sticky-note {
    min-height: 195px;
    padding: 9px 10px;
    font-size: 15px;
    line-height: 24px;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .kot-sticky-heading {
    min-height: 26px;
    margin-bottom: 4px;
  }

  .kot-sticky-list li {
    min-height: 24px;
  }
}

/* Customer Request archive cleanup */
.cleanup-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  margin: 14px 0;
  border: 1px solid #eadfd1;
  border-radius: 16px;
  background: #fffaf3;
}

.cleanup-panel .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.customer-request-table .select-col {
  width: 64px;
  text-align: center;
}

.customer-request-table .request-row-actions {
  min-width: 120px;
}

.archived-request-row {
  opacity: 0.82;
  background: #fafafa;
}

.archived-pill {
  background: #f0f0f0;
  color: #555;
  border-color: #ddd;
}

.archive-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 14px;
  margin: 12px 0 16px;
  border: 1px solid #e0d4c4;
  border-radius: 14px;
  background: #fff8ec;
}

@media (max-width: 760px) {
  .cleanup-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Editable payment correction rows */
.payments-table .table-input {
  width: 100%;
  min-width: 115px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.payments-table .amount-input {
  min-width: 100px;
}

.payments-table .notes-input {
  min-width: 180px;
}

.payments-table .actions-cell {
  white-space: nowrap;
}

.btn.small {
  padding: 8px 11px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .payments-table {
    display: block;
    overflow-x: auto;
  }
}

/* Customer Request new/updated attention highlighting */
.nav-badge-new {
  background: #f97316;
  color: #fff;
}

.nav-badge-updated {
  background: #2563eb;
  color: #fff;
}

.attention-legend {
  margin-top: 8px;
}

.attention-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  vertical-align: middle;
}

.attention-new {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
}

.attention-updated {
  background: #dbeafe;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
}

.request-attention-new,
.request-attention-updated {
  box-shadow: inset 5px 0 0 #f97316;
}

.request-attention-updated {
  box-shadow: inset 5px 0 0 #2563eb;
}

.request-attention-new td {
  background: #fff7ed;
}

.request-attention-updated td {
  background: #eff6ff;
}

.attention-help-text {
  font-size: 12px;
}

.attention-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 14px;
  margin: 12px 0 16px;
  border-radius: 14px;
}

.attention-banner-new {
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #7c2d12;
}

.attention-banner-updated {
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #172554;
}

/* Keep Customer Request row actions compact: Open and Archive should look like matching text links, not uneven pill buttons. */
.customer-request-table .request-row-actions .compact-inline-form {
  display: inline !important;
  margin: 0 0 0 8px !important;
}

.customer-request-table .request-row-actions button.request-list-action-link {
  appearance: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  width: auto !important;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

/* Public homepage: find existing customer requests */
.public-existing-request-panel {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(47, 143, 70, .16);
}

.public-existing-request-heading h3 {
  margin: 4px 0 8px;
  color: var(--green-900);
  font-size: 22px;
}

.public-existing-request-note,
.public-existing-request-footnote {
  margin: 0 0 12px;
  color: #4a5b46;
  line-height: 1.55;
  font-size: 14px;
}

.public-existing-request-form label {
  color: var(--green-900);
  font-weight: 900;
}

.public-existing-request-row,
.public-existing-link-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 7px;
}

.public-existing-request-row input,
.public-existing-link-row input {
  flex: 1 1 230px;
  min-width: 0;
}

.public-existing-link-row input {
  font-family: monospace;
  background: #fff;
}

.public-existing-results {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.public-existing-result-card {
  padding: 14px;
  border: 1px solid rgba(47, 143, 70, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
}

.public-existing-result-summary {
  display: grid;
  gap: 3px;
  color: #42523f;
  font-size: 14px;
  line-height: 1.35;
}

.public-existing-result-summary strong {
  color: var(--green-900);
  font-size: 16px;
}

.public-existing-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.public-existing-actions .btn {
  justify-content: center;
  text-align: center;
}

.public-existing-request-footnote {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 560px) {
  .public-existing-request-row .btn,
  .public-existing-link-row .btn {
    width: 100%;
    justify-content: center;
  }

  .public-existing-actions {
    grid-template-columns: 1fr;
  }
}

/* Customer Requests list: allow phone users to choose between stacked cards and the full table. */
.customer-request-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-request-list-view-controls {
  display: none;
}

@media (max-width: 760px) {
  .customer-request-list-view-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    margin: 12px 0 14px;
  }

  .customer-request-list-view-toggle {
    width: 100%;
  }

  .customer-request-list-view-btn {
    flex: 1;
  }

  .customer-request-table-swipe-hint {
    margin: 0;
    text-align: center;
    font-size: 12px;
  }

  .customer-request-list-page.request-list-mobile-mode .customer-request-table-wrap {
    overflow-x: visible;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table {
    display: table !important;
    width: 100% !important;
    min-width: 1320px !important;
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table thead {
    display: table-header-group !important;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table tbody {
    display: table-row-group !important;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table tr {
    display: table-row !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none !important;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table th,
  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table td {
    display: table-cell !important;
    width: auto;
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff !important;
    text-align: left !important;
    vertical-align: top;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--green-950);
    background: #f4fff7 !important;
    white-space: nowrap;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table th:last-child,
  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table td:last-child {
    border-right: 0;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table td::before {
    display: none !important;
    content: none !important;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table .select-col,
  .customer-request-list-page.request-list-table-mode .customer-request-table td.select-col {
    width: 64px !important;
    min-width: 64px;
    text-align: center !important;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table td:nth-child(2) {
    min-width: 210px;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table td:nth-child(5),
  .customer-request-list-page.request-list-table-mode .customer-request-table td:nth-child(8),
  .customer-request-list-page.request-list-table-mode .customer-request-table td:nth-child(9) {
    min-width: 150px;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table .request-row-actions {
    min-width: 145px;
    white-space: nowrap;
  }

  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table .btn,
  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table a.btn,
  .customer-request-list-page.request-list-table-mode .customer-request-table.responsive-data-table button.btn {
    width: auto;
  }
}

/* Orders list: allow phone users to choose between stacked cards and the full table. */
.orders-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.orders-list-view-controls {
  display: none;
}

@media (max-width: 760px) {
  .orders-list-view-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    margin: 12px 0 14px;
  }

  .orders-list-view-toggle {
    width: 100%;
  }

  .orders-list-view-btn {
    flex: 1;
  }

  .orders-table-swipe-hint {
    margin: 0;
    text-align: center;
    font-size: 12px;
  }

  .orders-list-page.orders-list-mobile-mode .orders-table-wrap {
    overflow-x: visible;
  }

  .orders-list-page.orders-list-table-mode .orders-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table {
    display: table !important;
    width: 100% !important;
    min-width: 1280px !important;
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table thead {
    display: table-header-group !important;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table tbody {
    display: table-row-group !important;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table tr {
    display: table-row !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none !important;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table th,
  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table td {
    display: table-cell !important;
    width: auto;
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff !important;
    text-align: left !important;
    vertical-align: middle;
    white-space: nowrap;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--green-950);
    background: #f4fff7 !important;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table th:last-child,
  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table td:last-child {
    border-right: 0;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table td::before {
    display: none !important;
    content: none !important;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table .select-col,
  .orders-list-page.orders-list-table-mode .orders-list-table td.select-col {
    width: 64px !important;
    min-width: 64px;
    text-align: center !important;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table td:nth-child(2) {
    min-width: 135px;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table td:nth-child(6) {
    min-width: 180px;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table td:last-child {
    min-width: 120px;
  }

  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table .btn,
  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table a.btn,
  .orders-list-page.orders-list-table-mode .orders-list-table.responsive-data-table button.btn {
    width: auto;
  }
}


/* Customer Request detail: allow phone users to choose stacked item cards or the complete item tables. */
.customer-request-items-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-request-items-view-controls {
  display: none;
}

/* Dashboard: allow phone users to choose stacked order cards or the complete order tables. */
.dashboard-orders-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dashboard-view-controls {
  display: none;
}

@media (max-width: 760px) {
  .customer-request-items-view-controls,
  .dashboard-view-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    margin: 12px 0 14px;
  }

  .customer-request-items-view-toggle,
  .dashboard-view-toggle {
    width: 100%;
  }

  .customer-request-items-view-btn,
  .dashboard-view-btn {
    flex: 1;
  }

  .customer-request-items-table-swipe-hint,
  .dashboard-table-swipe-hint {
    margin: 0;
    text-align: center;
    font-size: 12px;
  }

  .customer-request-detail-page.request-items-mobile-mode .customer-request-items-table-wrap,
  body.dashboard-mobile-mode .dashboard-orders-table-wrap {
    overflow-x: visible;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table-wrap,
  body.dashboard-table-mode .dashboard-orders-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table {
    display: table !important;
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-selected-items-table.responsive-data-table {
    min-width: 1180px !important;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-add-items-table.responsive-data-table {
    min-width: 1050px !important;
  }

  body.dashboard-table-mode .dashboard-latest-orders-table.responsive-data-table {
    min-width: 980px !important;
  }

  body.dashboard-table-mode .dashboard-filtered-orders-table.responsive-data-table {
    min-width: 1160px !important;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table thead,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table thead {
    display: table-header-group !important;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table tbody,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table tbody {
    display: table-row-group !important;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table tr,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table tr {
    display: table-row !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none !important;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table th,
  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table td,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table th,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table td {
    display: table-cell !important;
    width: auto;
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff !important;
    text-align: left !important;
    vertical-align: middle;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table th,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--green-950);
    background: #f4fff7 !important;
    white-space: nowrap;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table th:last-child,
  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table td:last-child,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table th:last-child,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table td:last-child {
    border-right: 0;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table tbody tr:last-child td,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table.responsive-data-table td::before,
  body.dashboard-table-mode .dashboard-orders-table.responsive-data-table td::before {
    display: none !important;
    content: none !important;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table select,
  .customer-request-detail-page.request-items-table-mode .customer-request-items-table input,
  .customer-request-detail-page.request-items-table-mode .customer-request-items-table textarea {
    min-width: 125px;
  }

  .customer-request-detail-page.request-items-table-mode .customer-request-items-table .btn,
  .customer-request-detail-page.request-items-table-mode .customer-request-items-table a.btn,
  .customer-request-detail-page.request-items-table-mode .customer-request-items-table button.btn,
  body.dashboard-table-mode .dashboard-orders-table .btn,
  body.dashboard-table-mode .dashboard-orders-table a.btn,
  body.dashboard-table-mode .dashboard-orders-table button.btn {
    width: auto;
  }

  body.dashboard-table-mode .dashboard-orders-table td {
    white-space: nowrap;
  }

  /* The Add Items editor has older ID-based mobile rules. Explicitly restore its
     real table layout whenever staff selects Table View on a phone. */
  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable td {
    display: table-cell !important;
    width: auto !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable select,
  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable input,
  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable textarea {
    width: auto !important;
    min-width: 125px !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-item-cell {
    min-width: 260px !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-item-cell select {
    min-width: 235px !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-unit-cell {
    min-width: 220px !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-unit-cell select {
    min-width: 200px !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-qty-cell {
    min-width: 105px !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-qty-cell input {
    min-width: 78px !important;
    width: 78px !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-price-cell,
  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-line-total-cell {
    min-width: 120px !important;
    white-space: nowrap;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-instructions-cell {
    min-width: 210px !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-instructions-cell input {
    min-width: 190px !important;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-action-cell {
    min-width: 170px !important;
    white-space: nowrap;
  }

  .customer-request-detail-page.request-items-table-mode #requestAddItemsTable .order-action-cell .btn {
    display: inline-block;
    width: auto !important;
    margin: 0 4px 4px 0;
  }
}

/* Customer Request item audit trail and customer-facing review status. */
.request-item-change-history {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfffc;
}

.request-item-change-history-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.request-item-change-history-head h3,
.request-item-change-history-head p {
  margin-top: 0;
}

.request-item-history-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.request-item-history-table {
  min-width: 980px;
}

.request-item-history-table td {
  vertical-align: top;
}

.request-history-new-row td {
  background: #eff6ff;
}

.request-history-new-badge,
.request-history-action,
.request-review-status,
.public-review-status,
.public-inline-review-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.request-history-new-badge {
  margin-left: 6px;
  padding: 2px 7px;
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.request-history-action,
.request-review-status,
.public-review-status,
.public-inline-review-badge {
  padding: 4px 8px;
}

.request-history-action-added,
.request-review-status-customer,
.public-review-status-pending {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.request-history-action-updated {
  color: #1e3a8a;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.request-history-action-deleted {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

.request-history-action-requested-update,
.request-history-action-requested-delete {
  color: #6b21a8;
  background: #f3e8ff;
  border: 1px solid #d8b4fe;
}

.request-review-status-reviewed,
.public-review-status-reviewed,
.public-inline-review-badge {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.public-inline-review-badge {
  margin-top: 5px;
  white-space: normal;
}

.public-current-selection-table td:nth-child(4),
.public-readonly-table td:nth-child(4) {
  font-size: 15px;
}

.compact-empty-state {
  padding: 14px;
}

@media (max-width: 760px) {
  .request-item-change-history {
    padding: 13px;
  }

  .request-item-history-table {
    min-width: 0;
  }

  .public-current-selection-table,
  .public-readonly-table {
    min-width: 760px;
  }
}

/* Customer View: make staff-approved quantity updates unmistakable. */
.public-staff-update-card {
  border: 2px solid rgba(15, 93, 49, .28);
  background: linear-gradient(135deg, rgba(237, 248, 239, .98), rgba(255, 255, 255, .98));
}

.public-staff-update-time {
  margin: 8px 0 0;
  color: var(--green-800);
}

.public-current-status-badge {
  align-self: flex-start;
  white-space: nowrap;
}

.public-staff-unit-cell strong,
.public-staff-qty-cell strong {
  display: inline-block;
  min-width: 48px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(15, 93, 49, .12);
  color: var(--green-900);
  font-size: 1.08rem;
  text-align: center;
}

@media (max-width: 760px) {
  .public-current-status-badge {
    margin-top: 8px;
  }

  .public-current-selection-table {
    min-width: 980px;
  }
}

.public-staff-update-alert {
  margin: 0 0 16px;
  padding: 13px 16px;
  border: 1px solid rgba(15, 93, 49, .28);
  border-left: 5px solid var(--green-700);
  border-radius: 14px;
  background: rgba(237, 248, 239, .98);
  color: var(--green-900);
  box-shadow: 0 8px 20px rgba(5, 47, 30, .08);
}

/* Customer View: show the previous quantity beside the current staff-approved qty. */
.public-staff-change-detail {
  display: block;
  margin-top: 6px;
  max-width: 190px;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.public-staff-change-detail b {
  color: #431407;
}

/* Customer View: clearly distinguish a review from an actual staff unit/qty change. */
.public-staff-update-alert strong,
.public-staff-update-alert span {
  display: block;
}

.public-staff-update-alert strong {
  margin-bottom: 4px;
}

.public-staff-update-alert-action {
  border-color: rgba(194, 65, 12, .32);
  border-left-color: #c2410c;
  background: #fff7ed;
  color: #7c2d12;
}

.public-staff-update-items {
  margin: 5px 0;
  font-weight: 800;
}

.public-staff-update-time {
  margin-top: 5px;
  font-size: .9rem;
  font-weight: 700;
}

/* Customer View: simplified approved-order workflow. */
.public-approved-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.public-approved-actions-hint {
  margin: 9px 0 0;
  text-align: right;
}

.public-menu-editor[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .public-approved-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .public-approved-actions .btn {
    width: 100%;
  }

  .public-approved-actions-hint {
    text-align: left;
  }
}

/* Customer Request proposed discount, round-off and tax pricing. */
.request-proposed-pricing-panel {
  margin-top: 18px;
  padding: 20px;
  overflow: hidden;
}

.request-pricing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.request-pricing-title-block {
  min-width: 0;
  max-width: 760px;
}

.request-pricing-title-block h3 {
  margin: 3px 0 7px;
}

.request-pricing-title-block .hint {
  margin: 0;
  line-height: 1.5;
}

.request-pricing-visibility {
  flex: 0 0 auto;
  margin-top: 2px;
  white-space: nowrap;
}

.request-proposed-pricing-form {
  margin: 0;
}

.request-pricing-controls {
  display: grid;
  grid-template-columns: minmax(175px, 1fr) minmax(175px, 1fr) minmax(270px, 1.35fr) auto;
  gap: 14px;
  align-items: stretch;
}

.request-pricing-field,
.request-tax-toggle {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(15, 93, 49, .15);
  border-radius: 14px;
  background: rgba(249, 252, 249, .9);
}

.request-pricing-field {
  display: flex;
  flex-direction: column;
}

.request-pricing-field label {
  margin-bottom: 7px;
  font-weight: 850;
}

.request-pricing-field input {
  width: 100%;
}

.request-pricing-field .hint {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.4;
}

.request-tax-toggle {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.request-tax-toggle:hover,
.request-tax-toggle:focus-within {
  border-color: rgba(15, 93, 49, .35);
  background: rgba(239, 249, 241, .96);
  box-shadow: 0 0 0 3px rgba(15, 93, 49, .07);
}

.request-tax-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.request-tax-toggle span {
  display: block;
  min-width: 0;
}

.request-tax-toggle strong,
.request-tax-toggle small {
  display: block;
}

.request-tax-toggle strong {
  color: var(--green-950);
  line-height: 1.3;
}

.request-tax-toggle small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.request-pricing-save {
  display: flex;
  align-items: flex-end;
}

.request-pricing-save .btn {
  min-height: 44px;
  white-space: nowrap;
}

.request-pricing-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.request-conversion-pricing-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.request-pricing-preview span,
.request-conversion-pricing-summary span {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(15, 93, 49, .16);
  border-radius: 12px;
  background: rgba(247, 252, 248, .95);
}

.request-pricing-preview span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.request-pricing-preview small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.25;
}

.request-pricing-preview strong {
  color: var(--green-950);
  font-size: 16px;
  line-height: 1.25;
}

.request-conversion-pricing-summary span {
  display: inline-flex;
  justify-content: space-between;
  gap: 16px;
  min-width: 190px;
}

.request-pricing-preview-total {
  border-color: rgba(15, 93, 49, .38) !important;
  background: rgba(226, 244, 230, .95) !important;
  color: var(--green-900);
}

.request-pricing-preview-total strong {
  font-size: 18px;
}

.request-pricing-footnote {
  margin: 12px 0 0;
  line-height: 1.45;
}

.public-proposed-pricing-alert {
  margin: 0 0 16px;
  padding: 13px 16px;
  border: 1px solid rgba(180, 83, 9, .32);
  border-left: 5px solid #b45309;
  border-radius: 14px;
  background: #fffbeb;
  color: #78350f;
  box-shadow: 0 8px 20px rgba(120, 53, 15, .08);
}

.public-proposed-pricing-alert strong,
.public-proposed-pricing-alert span {
  display: block;
}

.public-proposed-pricing-alert strong {
  margin-bottom: 4px;
}

.public-proposed-pricing-card {
  border: 1px solid rgba(180, 83, 9, .24);
  background: linear-gradient(180deg, #fffdf7 0%, #fffbeb 100%);
}

.public-proposed-pricing-inline {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
}

.public-proposed-pricing-inline h3 {
  margin: 3px 0 12px;
}

.public-proposed-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.public-proposed-pricing-grid span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(180, 83, 9, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
}

.public-proposed-total {
  border-color: rgba(180, 83, 9, .42) !important;
  background: #fef3c7 !important;
  color: #78350f;
}

@media (max-width: 1080px) {
  .request-pricing-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-tax-toggle {
    min-height: 100%;
  }

  .request-pricing-save {
    align-items: stretch;
  }

  .request-pricing-save .btn {
    width: 100%;
  }

  .request-pricing-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .request-proposed-pricing-panel {
    padding: 16px;
  }

  .request-pricing-header {
    display: grid;
    gap: 10px;
  }

  .request-pricing-visibility {
    justify-self: start;
  }

  .request-pricing-controls,
  .request-pricing-preview,
  .request-conversion-pricing-summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .request-pricing-preview span,
  .request-conversion-pricing-summary span {
    min-width: 0;
  }

  .request-pricing-save .btn {
    width: 100%;
  }

  .public-proposed-pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* Customer Request screen grouping and compact Add Items workflow. */
.request-selected-menu-panel,
.request-new-add-items-panel,
.convert-order-panel {
  margin-top: 18px;
  padding: 20px;
}

.request-section-heading,
.request-selected-menu-heading,
.request-inline-add-items-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.request-section-heading h3,
.request-selected-menu-heading h3,
.request-inline-add-items-head h4 {
  margin: 3px 0 6px;
}

.request-selected-menu-heading .hint,
.request-inline-add-items-head .hint {
  margin: 0;
}

.request-add-items-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(15, 93, 49, .34);
  border-radius: 50%;
  background: var(--green-700, #0f5d31);
  color: #fff;
  font: 800 27px/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(15, 93, 49, .16);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.request-add-items-icon-btn:hover,
.request-add-items-icon-btn:focus-visible {
  transform: translateY(-1px);
  background: var(--green-800, #0b4826);
  box-shadow: 0 9px 20px rgba(15, 93, 49, .23);
  outline: none;
}

.request-add-items-icon-btn[aria-expanded="true"] {
  background: #fff;
  color: var(--green-800, #0b4826);
}

.request-inline-add-items-panel {
  margin-top: 20px;
  padding: 18px;
  border: 1px dashed rgba(15, 93, 49, .34);
  border-radius: 15px;
  background: rgba(246, 251, 247, .92);
}

.request-inline-add-items-panel[hidden] {
  display: none !important;
}

.request-inline-add-items-head {
  margin-bottom: 10px;
}

.request-add-items-help {
  margin-top: 0;
}

.request-item-change-history-collapsible {
  padding: 0;
  overflow: hidden;
}

.request-item-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.request-item-history-summary::-webkit-details-marker {
  display: none;
}

.request-item-history-summary:hover,
.request-item-history-summary:focus-visible {
  background: rgba(238, 248, 240, .75);
  outline: none;
}

.request-item-history-summary-copy,
.request-item-history-summary-actions {
  display: flex;
  align-items: center;
}

.request-item-history-summary-copy {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.request-item-history-summary-copy strong {
  color: var(--green-950);
  font-size: 17px;
}

.request-item-history-summary-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.request-item-history-summary-actions {
  flex: 0 0 auto;
  gap: 10px;
}

.request-item-history-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(15, 93, 49, .09);
  color: var(--green-800);
  font-size: 22px;
  line-height: 1;
  transition: transform .18s ease;
}

.request-item-change-history-collapsible[open] .request-item-history-chevron {
  transform: rotate(180deg);
}

.request-item-history-content {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(15, 93, 49, .12);
}

.request-item-history-content > .hint:first-child {
  margin-top: 14px;
}

@media (max-width: 760px) {
  .request-selected-menu-panel,
  .request-new-add-items-panel,
  .convert-order-panel {
    padding: 15px;
  }

  .request-add-items-icon-btn {
    width: 40px;
    height: 40px;
  }

  .request-inline-add-items-panel {
    margin-inline: -4px;
    padding: 13px;
  }

  .request-item-history-summary {
    align-items: flex-start;
    padding: 14px;
  }

  .request-item-history-summary-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
  }

  .request-item-history-summary-actions .attention-badge {
    white-space: normal;
    text-align: right;
  }

  .request-item-history-content {
    padding: 0 13px 13px;
  }
}

/* Customer menu: final print override.
   This rule intentionally appears after mobile responsive rules so print/PDF
   never restores the staff-only Share Menu toolbar as a grid. */
@media print {
  body.customer-menu-body .customer-menu-toolbar,
  body.customer-menu-body .customer-menu-screen-only,
  body.customer-menu-body .no-print.customer-menu-toolbar {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }
}

/* Universal client-side column sorting for tables that do not already use server-side sorting. */
.client-sortable-column {
  padding: 0 !important;
}

.client-sort-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.72rem 0.78rem;
  cursor: pointer;
}

.client-sort-button:hover,
.client-sort-button:focus-visible {
  background: rgba(244, 171, 26, 0.12);
  outline: none;
}

.client-sort-button:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(28, 109, 67, 0.72);
}

.client-sort-button.active {
  color: #fff7e8;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.client-sort-button.active:hover,
.client-sort-button.active:focus-visible {
  color: #ffffff;
  background: rgba(246, 195, 68, 0.18);
}

.client-sort-label {
  min-width: 0;
}

.client-sort-indicator {
  flex: 0 0 auto;
  color: #806a3a;
  font-size: 0.78rem;
  line-height: 1;
  opacity: 0.72;
}

.client-sort-button.active .client-sort-indicator {
  color: #173b2f;
  background: var(--yellow, #f6c344);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  min-width: 20px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  opacity: 1;
  text-shadow: none;
}

@media print {
  .client-sort-indicator {
    display: none !important;
  }

  .client-sort-button {
    min-height: 0;
    padding: 0;
    cursor: default;
  }
}


/* Selected order mobile views: full-table option for order details and order-item editing. */
.order-detail-table-wrap,
.order-edit-items-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.order-detail-view-controls,
.order-edit-items-view-controls {
  display: none;
}

@media (max-width: 760px) {
  .order-detail-view-controls,
  .order-edit-items-view-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    margin: 12px 0 14px;
  }

  .order-detail-view-toggle,
  .order-edit-items-view-toggle {
    width: 100%;
  }

  .order-detail-view-btn,
  .order-edit-items-view-btn {
    flex: 1;
  }

  .order-detail-table-swipe-hint,
  .order-edit-items-table-swipe-hint {
    margin: 0;
    text-align: center;
    font-size: 12px;
  }

  body.order-detail-mobile-mode .order-detail-table-wrap,
  .order-edit-page.order-edit-items-mobile-mode .order-edit-items-table-wrap {
    overflow-x: visible;
  }

  body.order-detail-table-mode .order-detail-table-wrap,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table {
    display: table !important;
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  body.order-detail-table-mode .order-detail-items-table.responsive-data-table {
    min-width: 940px !important;
  }

  body.order-detail-table-mode .order-detail-payments-table.responsive-data-table {
    min-width: 820px !important;
  }

  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table {
    min-width: 1120px !important;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table thead,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table thead {
    display: table-header-group !important;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table tbody,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table tbody {
    display: table-row-group !important;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table tr,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table tr {
    display: table-row !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none !important;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table th,
  body.order-detail-table-mode .order-detail-data-table.responsive-data-table td,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table th,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table td {
    display: table-cell !important;
    width: auto;
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff !important;
    text-align: left !important;
    vertical-align: middle;
    white-space: nowrap;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table th,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--green-950);
    background: #f4fff7 !important;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table th:last-child,
  body.order-detail-table-mode .order-detail-data-table.responsive-data-table td:last-child,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table th:last-child,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table td:last-child {
    border-right: 0;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table tbody tr:last-child td,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table tbody tr:last-child td {
    border-bottom: 0;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table td::before,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table td::before {
    display: none !important;
    content: none !important;
  }

  body.order-detail-table-mode .order-detail-data-table.responsive-data-table .btn,
  body.order-detail-table-mode .order-detail-data-table.responsive-data-table a.btn,
  body.order-detail-table-mode .order-detail-data-table.responsive-data-table button.btn,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table .btn,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table a.btn,
  .order-edit-page.order-edit-items-table-mode .order-edit-items-table.responsive-data-table button.btn {
    width: auto;
    margin: 2px 4px 2px 0;
  }

  body.order-detail-table-mode .order-detail-payments-table .table-input {
    width: 100% !important;
  }

  body.order-detail-table-mode .order-detail-payments-table .actions-cell {
    min-width: 170px;
    white-space: nowrap !important;
  }

  .order-edit-page.order-edit-items-table-mode .order-items-table select,
  .order-edit-page.order-edit-items-table-mode .order-items-table input,
  .order-edit-page.order-edit-items-table-mode .order-items-table textarea {
    width: auto !important;
  }

  .order-edit-page.order-edit-items-table-mode .order-items-table .order-item-cell,
  .order-edit-page.order-edit-items-table-mode .order-items-table .order-item-cell select {
    min-width: 230px !important;
  }

  .order-edit-page.order-edit-items-table-mode .order-items-table .order-unit-cell,
  .order-edit-page.order-edit-items-table-mode .order-items-table .order-unit-cell select {
    min-width: 200px !important;
  }

  .order-edit-page.order-edit-items-table-mode .order-items-table .order-qty-cell,
  .order-edit-page.order-edit-items-table-mode .order-items-table .order-qty-input {
    width: 86px !important;
    min-width: 86px !important;
  }

  .order-edit-page.order-edit-items-table-mode .order-items-table .order-price-cell,
  .order-edit-page.order-edit-items-table-mode .order-items-table .order-price-input {
    width: 112px !important;
    min-width: 112px !important;
  }

  .order-edit-page.order-edit-items-table-mode .order-items-table .order-instructions-cell,
  .order-edit-page.order-edit-items-table-mode .order-items-table .order-instructions-cell input {
    min-width: 190px !important;
  }

  .order-edit-page.order-edit-items-table-mode .order-items-table .order-action-cell {
    min-width: 170px !important;
    white-space: nowrap !important;
  }

  /* Mobile card mode: let both action buttons wrap inside the card so Delete/Remove stays fully visible. */
  body.order-detail-mobile-mode .payments-table .actions-cell,
  .order-edit-page.order-edit-items-mobile-mode .order-items-table .order-action-cell {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible;
  }

  body.order-detail-mobile-mode .payments-table .actions-cell .btn,
  .order-edit-page.order-edit-items-mobile-mode .order-items-table .order-action-cell .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    white-space: normal;
  }
}

/* All remaining staff/admin modules: shared phone Table View / Mobile View control.
   Purpose-built screens (Dashboard, Orders, Customer Requests, selected Order) keep
   their dedicated rules; this covers Customers, Menu Items, Locations, Users,
   Reports, Cancel Eligible, New Order, and any future standard table module. */
.universal-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.universal-table-view-controls {
  display: none;
}

@media (max-width: 760px) {
  .universal-table-view-controls {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    margin: 12px 0 14px;
  }

  .universal-table-view-toggle {
    width: 100%;
  }

  .universal-table-view-btn {
    flex: 1;
  }

  .universal-table-swipe-hint {
    margin: 0;
    text-align: center;
    font-size: 12px;
  }

  body.universal-mobile-mode .universal-table-wrap {
    overflow-x: visible;
  }

  body.universal-table-mode .universal-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table {
    display: table !important;
    width: 100% !important;
    min-width: var(--universal-table-min-width, 760px) !important;
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table thead {
    display: table-header-group !important;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table tbody {
    display: table-row-group !important;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table tr {
    display: table-row !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none !important;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table th,
  body.universal-table-mode .universal-table-data.responsive-data-table td {
    display: table-cell !important;
    width: auto;
    min-width: 0;
    padding: 10px 11px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff !important;
    text-align: left !important;
    vertical-align: middle;
    white-space: nowrap;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--green-950);
    background: #f4fff7 !important;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table th:last-child,
  body.universal-table-mode .universal-table-data.responsive-data-table td:last-child {
    border-right: 0;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table tbody tr:last-child td {
    border-bottom: 0;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table td::before {
    display: none !important;
    content: none !important;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table .btn,
  body.universal-table-mode .universal-table-data.responsive-data-table a.btn,
  body.universal-table-mode .universal-table-data.responsive-data-table button.btn {
    display: inline-flex;
    width: auto !important;
    margin: 2px 4px 2px 0;
    white-space: nowrap;
  }

  body.universal-table-mode .universal-table-data.responsive-data-table input,
  body.universal-table-mode .universal-table-data.responsive-data-table select,
  body.universal-table-mode .universal-table-data.responsive-data-table textarea {
    width: auto !important;
    max-width: none;
  }

  /* Editable order-item tables need stable input widths when restored to table mode. */
  body.universal-table-mode .universal-table-data.order-items-table .order-item-cell,
  body.universal-table-mode .universal-table-data.order-items-table .order-item-cell select {
    min-width: 230px !important;
  }

  body.universal-table-mode .universal-table-data.order-items-table .order-unit-cell,
  body.universal-table-mode .universal-table-data.order-items-table .order-unit-cell select {
    min-width: 200px !important;
  }

  body.universal-table-mode .universal-table-data.order-items-table .order-qty-cell,
  body.universal-table-mode .universal-table-data.order-items-table .order-qty-input {
    width: 86px !important;
    min-width: 86px !important;
  }

  body.universal-table-mode .universal-table-data.order-items-table .order-price-cell,
  body.universal-table-mode .universal-table-data.order-items-table .order-price-input {
    width: 112px !important;
    min-width: 112px !important;
  }

  body.universal-table-mode .universal-table-data.order-items-table .order-instructions-cell,
  body.universal-table-mode .universal-table-data.order-items-table .order-instructions-cell input {
    min-width: 190px !important;
  }

  body.universal-table-mode .universal-table-data.order-items-table .order-action-cell {
    min-width: 170px !important;
    white-space: nowrap !important;
  }

  /* Mobile cards: all action areas may wrap/stack, so Delete/Remove never clips. */
  body.universal-mobile-mode .universal-table-data.responsive-data-table td:last-child,
  body.universal-mobile-mode .universal-table-data.responsive-data-table .row-actions,
  body.universal-mobile-mode .universal-table-data.responsive-data-table .actions-cell,
  body.universal-mobile-mode .universal-table-data.responsive-data-table .order-action-cell {
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  body.universal-mobile-mode .universal-table-data.responsive-data-table td:last-child form,
  body.universal-mobile-mode .universal-table-data.responsive-data-table .row-actions form,
  body.universal-mobile-mode .universal-table-data.responsive-data-table .actions-cell form,
  body.universal-mobile-mode .universal-table-data.responsive-data-table .order-action-cell form {
    display: block !important;
    width: 100% !important;
    margin: 8px 0 0 !important;
  }

  body.universal-mobile-mode .universal-table-data.responsive-data-table td:last-child .btn,
  body.universal-mobile-mode .universal-table-data.responsive-data-table .row-actions .btn,
  body.universal-mobile-mode .universal-table-data.responsive-data-table .actions-cell .btn,
  body.universal-mobile-mode .universal-table-data.responsive-data-table .order-action-cell .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0 !important;
    margin: 4px 0 !important;
    white-space: normal;
  }
}

/* Mobile action safety for the purpose-built table modules too. */
@media (max-width: 760px) {
  .customer-request-detail-page.request-items-mobile-mode .customer-request-items-table .order-action-cell {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  .customer-request-detail-page.request-items-mobile-mode .customer-request-items-table .order-action-cell .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    white-space: normal;
  }

  .customer-request-list-page.request-list-mobile-mode .customer-request-table .request-row-actions {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  .customer-request-list-page.request-list-mobile-mode .customer-request-table .request-row-actions .compact-inline-form {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
  }

  .orders-list-page.orders-list-mobile-mode .orders-list-table td:last-child {
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

/* PROD enhancements: customer overwrite warning, linked order number, meal-grouped KOTs,
   and current-week dashboard breakdown. */
.duplicate-customer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.order-number-link {
  color: var(--green-800);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.order-number-link:hover,
.order-number-link:focus-visible {
  color: var(--punitha-saffron);
}

.kot-meal-page-title,
.kot-meal-section-title {
  margin: 0 0 14px;
  padding: 9px 14px;
  border: 2px solid #111;
  background: #fff1c2;
  color: #111;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}

.kot-meal-page-title {
  font-size: 22px;
}

.kot-meal-section-title {
  max-width: 1100px;
  margin: 18px auto 8px;
  font-size: 20px;
}

.kot-sticky-meal-group {
  display: block;
}

.kot-sticky-header-space {
  height: 18px;
}

.kot-sticky-meal-title {
  margin: 0 0 3px;
  padding: 0 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 900;
  line-height: 20px;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.kitchen-meal-board {
  max-width: 1600px;
  margin: 18px auto 0;
  display: grid;
  gap: 26px;
}

.kitchen-meal-section {
  min-width: 0;
}

.kitchen-meal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 13px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #073d22, #0f5d31);
  color: white;
  box-shadow: 0 10px 28px rgba(5,47,30,.18);
}

.kitchen-meal-heading h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: .08em;
}

.kitchen-meal-heading span {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f6c344;
  color: #173b2f;
  font-weight: 900;
}

.kitchen-meal-section .kitchen-board {
  max-width: none;
  margin-top: 0;
}

.kitchen-meal-card-title {
  padding: 9px 14px;
  background: #fff1c2;
  border-bottom: 1px solid rgba(15,93,49,.18);
  color: #5b3d00;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}

.card-button {
  width: 100%;
  appearance: none;
  color: inherit;
  border-right: 1px solid rgba(15, 93, 49, 0.13);
  border-bottom: 1px solid rgba(15, 93, 49, 0.13);
  border-left: 1px solid rgba(15, 93, 49, 0.13);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card-button:hover,
.card-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(5,47,30,.13);
}

.stat-current-week {
  background:
    radial-gradient(circle at right bottom, rgba(15,93,49,.15), transparent 42%),
    linear-gradient(135deg, #eef8f1, #fff8df);
}

.current-week-breakdown.is-hidden {
  display: none;
}

.current-week-grand-total {
  color: var(--green-900);
  font-size: clamp(24px, 3vw, 36px);
  white-space: nowrap;
}

.current-week-day-list {
  display: grid;
  gap: 8px;
}

.current-week-day-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(100px, auto) minmax(110px, auto);
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.current-week-day-row > div {
  display: grid;
  gap: 2px;
}

.current-week-day-row > div span,
.current-week-day-row > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.current-week-day-row > strong:last-child {
  color: var(--green-900);
  font-size: 17px;
  text-align: right;
}

.current-week-day-row.is-today {
  border-color: #f6c344;
  background: #fff9e8;
  box-shadow: inset 4px 0 0 #f6c344;
}

@media (max-width: 760px) {
  .duplicate-customer-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .duplicate-customer-actions .btn {
    flex: 1 1 180px;
    text-align: center;
  }

  .current-week-day-row {
    grid-template-columns: 1fr auto;
  }

  .current-week-day-row > span {
    text-align: right;
  }

  .current-week-day-row > strong:last-child {
    grid-column: 1 / -1;
    text-align: left;
  }

  .kitchen-meal-heading {
    align-items: flex-start;
  }
}

@media print {
  .kot-meal-page-title {
    margin-top: 0;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .kot-meal-section-title {
    margin: 0 0 6px;
    padding: 5px 10px;
    font-size: 15px;
    break-after: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .kot-sticky-meal-group + .kot-sticky-meal-group {
    margin-top: 10px;
  }

  .kot-sticky-header-space {
    height: 16px;
  }

  .kot-sticky-meal-title {
    font-size: 11px;
    line-height: 16px;
  }

  .manual-sticky-note {
    min-height: 225px;
  }
}

/* Sticky-note KOT print header spacing fix.
   Keep a visible writable/clear area at the top of every printed page and note. */
@media print {
  @page {
    size: letter;
    margin: 0.62in 0.35in 0.35in;
  }

  body.kot-body-small {
    padding-top: 0.14in !important;
    box-sizing: border-box;
  }

  body.kot-body-small .kot-sticky-header-space {
    display: block !important;
    height: 28px !important;
    min-height: 28px !important;
  }

  body.kot-body-small .manual-sticky-note {
    min-height: 238px;
  }
}
