:root {
  --bg: #f5f1ec;
  --surface: #ffffff;
  --surface-soft: #fbf7f2;
  --text: #2b2119;
  --muted: #6e5e52;
  --line: #dfd3c7;
  --primary: #5f3b27;
  --primary-strong: #452a1d;
  --accent: #1f4f50;
  --success-bg: #e7f7ef;
  --error-bg: #fee8e7;
}

body.kds-card-expanded {
  overflow: hidden;
}

body.cashier-rail-resizing {
  cursor: col-resize;
  user-select: none;
}

.public-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto minmax(320px, 1fr);
  gap: 1rem;
  background: linear-gradient(160deg, #ffffff 0%, #f8f3ed 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 8px 22px rgba(55, 37, 25, 0.08);
}

.staff-login-link {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.85rem;
}

.public-top-left,
.public-top-right,
.public-bottom-left,
.public-bottom-right {
  display: grid;
  gap: 0.55rem;
  align-content: center;
}

.public-top-left {
  grid-column: 1;
  grid-row: 1;
}

.public-top-right {
  grid-column: 2;
  grid-row: 1;
  justify-items: start;
  align-content: center;
}

.delivery-heading {
  margin: 0;
  font-size: 1.15rem;
  color: var(--primary-strong);
}

.public-bottom-left {
  grid-column: 1;
  grid-row: 2;
  align-content: start;
}

.public-bottom-right {
  grid-column: 2;
  grid-row: 2;
  min-height: 320px;
}

.public-logo {
  width: min(300px, 70%);
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.cta-order {
  display: inline-block;
  text-decoration: none;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  padding: 0.75rem 1.1rem;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(69, 42, 29, 0.22);
  font-weight: 600;
}

.map-qr {
  width: clamp(150px, 20vw, 190px);
  height: clamp(150px, 20vw, 190px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.public-bottom-right iframe {
  border-radius: 8px;
  min-height: 320px;
}

.centered-panel {
  margin: 0 auto 0.9rem;
}

.split-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.staff-summary-heading {
  display: block;
  text-decoration: none;
  color: inherit;
}

.staff-summary-heading .muted {
  margin-bottom: 0.9rem;
}

.staff-summary-grid {
  margin-bottom: 0.85rem;
}

.staff-summary-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.staff-summary-card:hover,
.staff-summary-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(69, 42, 29, 0.1);
}

.cashier-header-row {
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.qr-cafe-top {
  position: sticky;
  top: 66px;
  z-index: 20;
}

.qr-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.qr-order-toolbar {
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: nowrap;
}

.staff-table-select-form {
  display: grid;
  grid-template-columns: auto minmax(92px, 148px) minmax(0, 1fr);
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.staff-table-select-text {
  white-space: nowrap;
  color: #5b3c29;
  font-weight: 700;
}

.staff-table-select-input {
  width: 100%;
  min-width: 0;
  background: #fffaf5;
  padding: 0.42rem 0.48rem;
}

.staff-table-current {
  color: #6f5140;
  font-weight: 700;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.compact-label {
  display: none;
}

.qr-empty-state,
.qr-welcome-screen {
  text-align: center;
}

.qr-welcome-screen {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  padding: 1.4rem 1rem;
}

.qr-landing-logo {
  width: 88px;
  height: 88px;
}

.qr-greeting {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #7b5236;
}

.qr-table-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 36px;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: #f3e8db;
  border: 1px solid #dfc8b2;
  color: #5b3826;
  font-weight: 700;
}

.qr-landing-note {
  margin: 0;
}

.qr-start-btn {
  min-width: 180px;
}

.qr-search-wrap {
  position: relative;
  width: 100%;
}

.qr-search {
  width: 100%;
  margin-top: 0.6rem;
  padding-right: 2.45rem;
}

.search-clear-btn {
  position: absolute;
  right: 0.52rem;
  top: calc(50% + 0.3rem);
  transform: translateY(-50%);
  width: 1.72rem;
  height: 1.72rem;
  min-height: 1.72rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #dfc8b2;
  background: #fff8f1;
  color: #5b3826;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.qr-category-bar {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.qr-cat-pill {
  white-space: nowrap;
  background: #efe6dd;
  color: #4f3424;
  border: 1px solid #dccbbb;
}

.qr-cat-pill.active {
  background: var(--primary);
  color: #fff;
}

.floating-cart {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.qr-bottom-cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--mobile-fixed-bottom-offset, 0px);
  z-index: 1200;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  width: 100%;
  min-height: 64px;
  padding: 0;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  border: 0;
  box-shadow: 0 12px 26px rgba(31, 79, 80, 0.24);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  transition: background 0.9s ease, box-shadow 0.9s ease, transform 0.2s ease;
  transform: translateZ(0);
  will-change: transform;
}

.qr-bottom-cart-half {
  min-height: 64px;
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.92rem 1rem calc(0.92rem + env(safe-area-inset-bottom));
  font: inherit;
  font-weight: 800;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.qr-bottom-cart-main {
  flex: 1 1 auto;
}

.qr-bottom-cart-orders {
  flex: 0 0 34%;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.qr-bottom-cart-bar.single-mode .qr-bottom-cart-main {
  width: 100%;
}

.qr-bottom-cart-bar.single-mode .qr-bottom-cart-label {
  font-size: 1.02rem;
}

.qr-bottom-cart-bar.split-mode .qr-bottom-cart-main {
  justify-content: flex-start;
}

.qr-bottom-cart-bar.split-mode .qr-bottom-cart-orders {
  display: inline-flex;
}

.qr-bottom-cart-label,
.qr-bottom-cart-orders-label {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 1rem;
}

.sheet-cue {
  display: block;
  flex: 0 0 100%;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.08rem;
  opacity: 0.78;
  line-height: 1;
  margin: 0 auto 0.06rem;
  width: 100%;
  transform-origin: center;
}

.sheet-cue.cue-up {
  animation: sheetCueUp 1.25s ease-in-out infinite;
}

.sheet-cue.cue-down {
  animation: sheetCueDown 1.25s ease-in-out infinite;
}

.qr-bottom-cart-bar span {
  display: inline-flex;
  align-items: center;
}

#floating-summary {
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

#floating-total {
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.qr-bottom-cart-divider {
  opacity: 0.5;
  flex: 0 0 auto;
  font-size: 0.94rem;
}

.qr-bottom-cart-bar.pulse {
  animation: qrCartPulse 1.6s ease;
}

@keyframes qrCartPulse {
  0% {
    background: var(--accent);
    box-shadow: 0 12px 26px rgba(31, 79, 80, 0.24);
  }
  18% {
    background: #3e7391;
    box-shadow: 0 12px 26px rgba(62, 115, 145, 0.28);
  }
  52% {
    background: #b8862d;
    box-shadow: 0 14px 30px rgba(184, 134, 45, 0.36);
  }
  100% {
    background: var(--accent);
    box-shadow: 0 12px 26px rgba(31, 79, 80, 0.24);
  }
}

.cart-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1290;
  background: rgba(27, 18, 12, 0.38);
  backdrop-filter: blur(2px);
}

.cart-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1300;
  display: grid;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem calc(1rem + env(safe-area-inset-bottom));
  background: #fffdf9;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 28px rgba(38, 24, 15, 0.18);
  max-height: min(75vh, 760px);
  min-height: 75vh;
  overflow: auto;
  transform: translateZ(0);
  will-change: transform;
}

.cart-sheet-handle {
  width: 100%;
  min-height: 16px;
  border-radius: 999px;
  margin: 0 auto;
  text-align: center;
  color: #b28d64;
  font-size: 0.72rem;
  letter-spacing: 0.08rem;
}

.cart-sheet-footer {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.cart-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cart-sheet-actions > * {
  width: 100%;
}

.tracked-item-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0.18rem 0;
}

.tracked-item-status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
  background: #efe8e0;
  color: #654633;
}

.tracked-item-status-pending {
  background: #fff2cf;
  color: #8a6100;
}

.tracked-item-status-approved {
  background: #dff2e5;
  color: #1c6b3a;
}

.orders-sheet-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.orders-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: #4f3424;
}

.orders-sheet-body {
  display: grid;
  gap: 0.28rem;
}

@keyframes sheetCueUp {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.72;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes sheetCueDown {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.72;
  }
  50% {
    transform: translateY(3px);
    opacity: 1;
  }
}

body.cart-sheet-open {
  overflow: hidden;
}

.floating-assist-btn {
  position: fixed;
  left: 16px;
  bottom: calc(68px + env(safe-area-inset-bottom) + var(--mobile-fixed-bottom-offset, 0px));
  z-index: 1210;
  min-height: 42px;
  border-radius: 999px;
  padding: 0.58rem 0.86rem;
  box-shadow: 0 8px 20px rgba(52, 31, 18, 0.18);
  touch-action: none;
  user-select: none;
  cursor: grab;
}


.public-welcome {
  position: relative;
}

.public-hero-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: center;
}

.public-cta-stack {
  display: grid;
  gap: 0.55rem;
  align-content: center;
}

.cta-secondary {
  background: #fff;
  color: var(--primary);
  border: 1px solid #d9c4b2;
  box-shadow: 0 4px 12px rgba(69, 42, 29, 0.08);
}

.public-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 0.9rem;
}

.public-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.careers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.career-card,
.recruitment-job-card,
.recruitment-application-card {
  background: linear-gradient(180deg, #fff 0%, #fdf8f2 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(69, 42, 29, 0.06);
}

.career-card {
  display: grid;
  gap: 0.55rem;
}

.career-card-meta,
.career-skill-list,
.recruitment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.career-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f4eadf;
  color: #67452f;
  font-size: 0.78rem;
  font-weight: 700;
}

.career-salary {
  margin: 0;
  color: var(--primary-strong);
  font-size: 1rem;
  font-weight: 700;
}

.career-skill-list span {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fff7ef;
  border: 1px solid #e4d2c2;
  font-size: 0.78rem;
}

.careers-filters,
.career-detail-layout,
.career-apply-form,
.recruitment-form,
.recruitment-application-list,
.recruitment-timeline {
  display: grid;
  gap: 0.8rem;
}

.careers-filters {
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
}

.career-detail-layout {
  grid-template-columns: minmax(280px, 0.95fr) minmax(340px, 1.05fr);
}

.career-detail-hero,
.careers-hero,
.career-thankyou {
  margin-bottom: 0.9rem;
}

.career-skill-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.8rem;
}

.career-skill-picker label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.recruitment-job-list,
.recruitment-application-list {
  display: grid;
  gap: 0.8rem;
}

.recruitment-job-card,
.recruitment-application-card {
  padding: 0.9rem;
}

.recruitment-job-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.recruitment-application-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
  margin-bottom: 0.65rem;
}

.recruitment-timeline {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid #e9ddd2;
}

.recruitment-timeline-entry {
  display: grid;
  gap: 0.15rem;
  padding: 0.45rem 0;
}

.recruitment-timeline-entry p {
  margin: 0;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.45rem;
}

.slot-chip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem;
  background: var(--surface-soft);
}

.people-stepper {
  display: inline-grid;
  grid-template-columns: 44px 84px 44px;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
}

.people-stepper input {
  text-align: center;
  font-weight: 600;
}

.review-qr-wrap {
  display: grid;
  justify-items: start;
  margin: 0.65rem 0;
}

.notif-wrap {
  position: relative;
  margin: 0;
}

.cashier-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.cashier-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.55rem 0 0.7rem;
  flex-wrap: wrap;
}

.cashier-mode-select {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #5b3c29;
  font-weight: 600;
}

.cashier-mode-select span {
  white-space: nowrap;
}

.cashier-mode-select select {
  min-width: 180px;
  background: #fffaf5;
}

.sound-volume-control {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: #5b3c29;
  font-weight: 600;
}

.sound-volume-control input[type="range"] {
  width: min(220px, 58vw);
}

@media (max-width: 720px) {
  .cashier-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .cashier-toolbar-row {
    align-items: stretch;
  }

  .cashier-mode-select {
    width: 100%;
    justify-content: space-between;
  }

  .cashier-mode-select select {
    flex: 1;
    min-width: 0;
  }
}

.notif-bell {
  background: #efe6dd;
  color: #4f3424;
  border: 1px solid #dccbbb;
}

.notif-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #b0212d;
  color: #fff;
  font-size: 0.74rem;
  margin-left: 0.2rem;
}

.notif-panel {
  position: absolute;
  right: 0;
  top: 38px;
  width: min(420px, 92vw);
  max-height: 300px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  z-index: 100;
}

.stats-hero {
  padding: 1rem;
}

.stats-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.stats-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
}

.stats-filter-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.button-link.ghost {
  background: #efe6dd;
  color: #4f3424;
}

.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.62rem;
  margin-bottom: 0.9rem;
}

.kpi-card {
  min-height: 132px;
}

.kpi-card small {
  color: var(--muted);
}

.kpi-delta {
  display: inline-flex;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
}

.kpi-delta.positive {
  background: #e7f7ef;
  color: #1f6f3b;
}

.kpi-delta.negative {
  background: #fee8e7;
  color: #a52929;
}

.stats-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.7rem;
}

.panel.inner {
  margin: 0;
  background: var(--surface-soft);
}

.table-wrap {
  overflow: auto;
}

.stats-best-days,
.stats-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.link-btn:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .public-hero-wrap,
  .public-grid {
    grid-template-columns: 1fr;
  }

  .public-hero-wrap > div:first-child {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .public-cta-stack {
    justify-items: center;
    text-align: center;
  }

  .review-qr-wrap {
    justify-items: center;
    text-align: center;
  }
}

.cart-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1200;
  background: #1f4f50;
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  font-size: 0.84rem;
}

.celebration-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 18px) scale(0.96);
  z-index: 1400;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: min(88vw, 320px);
  max-width: min(92vw, 360px);
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(35, 28, 22, 0.96);
  color: #fffaf1;
  box-shadow: 0 14px 34px rgba(30, 20, 12, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.celebration-toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.celebration-burst {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #ffe4a8, #b8862d);
  box-shadow: 0 0 0 8px rgba(255, 214, 122, 0.12);
  animation: celebratePop 0.9s ease;
  flex: 0 0 auto;
}

.celebration-copy {
  display: grid;
  gap: 0.14rem;
}

.celebration-copy strong {
  font-size: 0.96rem;
}

.celebration-copy span {
  font-size: 0.84rem;
  color: #f5ead8;
}

@keyframes celebratePop {
  0% {
    transform: scale(0.78) rotate(-10deg);
  }
  55% {
    transform: scale(1.08) rotate(6deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@media (max-width: 900px) {
  .public-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 0.8rem;
    padding: 0.9rem;
  }

  .public-top-left,
  .public-top-right,
  .public-bottom-left,
  .public-bottom-right {
    grid-column: 1;
  }

  .public-top-left {
    grid-row: 1;
  }

  .public-top-right {
    grid-row: 2;
    justify-items: stretch;
  }

  .public-bottom-left {
    grid-row: 3;
  }

  .public-bottom-right {
    grid-row: 4;
  }

  .public-logo {
    width: min(300px, 92%);
  }

  .cta-order {
    width: 100%;
    text-align: center;
  }

  .public-section-head {
    align-items: start;
    flex-direction: column;
  }

  .careers-filters,
  .career-detail-layout {
    grid-template-columns: 1fr;
  }

  .delivery-heading {
    font-size: 1.05rem;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #fbf8f3 0%, var(--bg) 100%);
  color: var(--text);
  overflow-x: hidden;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(43, 29, 23, 0.96);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.1rem;
  width: 100vw;
  max-width: 100vw;
  min-width: 100vw;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform;
}

body.cashier-shell .topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  background:
    linear-gradient(135deg, rgba(53, 34, 25, 0.98) 0%, rgba(68, 42, 28, 0.98) 52%, rgba(46, 31, 22, 0.98) 100%);
}

body.ordering-nav-hidden .topbar,
body.ordering-search-active .topbar {
  transform: translateY(-105%);
  opacity: 0;
  pointer-events: none;
}

body.ordering-nav-hidden .qr-cafe-top,
body.ordering-search-active .qr-cafe-top {
  top: 0;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-link-wrap {
  text-decoration: none;
  color: inherit;
}

body.cashier-shell .brand-wrap {
  min-width: 0;
}

body.cashier-shell .brand-wrap > div {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
  flex-wrap: nowrap;
}

body.cashier-shell .topbar h1,
body.cashier-shell .topbar p {
  white-space: nowrap;
  margin: 0;
}

body.cashier-shell .topbar p {
  opacity: 0.78;
}

body.cashier-shell .topbar h1 {
  font-size: 1.28rem;
}

body.cashier-shell .topbar p {
  font-size: 0.94rem;
}

body.cashier-shell.cashier-tablet-landscape .topbar {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
}

body.cashier-shell.cashier-tablet-landscape .brand-wrap {
  gap: 0.45rem;
}

body.cashier-shell.cashier-tablet-landscape .brand-logo {
  width: 32px;
  height: 32px;
  padding: 2px;
}

body.cashier-shell.cashier-tablet-landscape .brand-wrap > div {
  gap: 0.38rem;
}

body.cashier-shell.cashier-tablet-landscape .topbar h1 {
  font-size: 1.16rem;
}

body.cashier-shell.cashier-tablet-landscape .topbar p {
  font-size: 0.92rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.topbar p {
  margin: 0.1rem 0 0;
  opacity: 0.85;
  font-size: 0.82rem;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cashier-topbar-tools {
  display: grid;
  grid-template-columns: auto minmax(220px, 300px) auto;
  align-items: center;
  justify-content: end;
  gap: 0.7rem;
  min-width: 0;
}

.cashier-topbar-select,
.cashier-topbar-volume {
  color: #f2e8dd;
}

.cashier-topbar-select select {
  min-width: 170px;
}

.cashier-topbar-volume {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 180px;
}

.cashier-topbar-select select,
.cashier-topbar-volume input[type="range"] {
  background: rgba(255, 255, 255, 0.96);
}

.cashier-topbar-volume input[type="range"] {
  width: min(220px, 22vw);
}

.cashier-topbar-notif {
  justify-self: end;
}

body.cashier-shell.cashier-tablet-landscape .cashier-topbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.32rem;
  flex-wrap: nowrap;
  min-width: 0;
}

body.cashier-shell.cashier-tablet-landscape .cashier-topbar-select,
body.cashier-shell.cashier-tablet-landscape .cashier-topbar-volume,
body.cashier-shell.cashier-tablet-landscape .cashier-topbar-notif {
  flex: 0 0 auto;
}

body.cashier-shell.cashier-tablet-landscape .cashier-topbar-select select {
  min-width: 132px;
  font-size: 0.84rem;
  padding: 0.24rem 0.34rem;
}

body.cashier-shell.cashier-tablet-landscape .cashier-topbar-volume {
  min-width: 102px;
}

body.cashier-shell.cashier-tablet-landscape .cashier-topbar-volume input[type="range"] {
  width: 96px;
}

body.cashier-shell.cashier-tablet-landscape .notif-bell {
  padding: 0.22rem 0.36rem;
}

.topbar nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.88rem;
}

.topbar nav a:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
}

.hero-band {
  height: 240px;
  border-radius: 8px;
  margin-bottom: 0.9rem;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}

.hero-band.compact {
  height: 180px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(22, 17, 14, 0.76) 18%, rgba(22, 17, 14, 0.2) 70%);
  color: #fff;
  padding: 1.2rem;
  display: grid;
  align-content: end;
  gap: 0.35rem;
}

.hero-overlay h2 {
  margin: 0;
  font-size: 1.35rem;
}

.hero-overlay p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.92;
}

.container {
  max-width: 1320px;
  margin: 1.05rem auto 1.3rem;
  padding: 0 1rem;
}

.container-wide {
  max-width: min(100vw - 24px, 1920px);
  padding: 0 0.6rem;
  overflow-x: clip;
}

.container-cashier {
  margin-top: 0.7rem;
}

.panel,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(55, 37, 25, 0.06);
}

.panel {
  padding: 0.9rem;
  margin-bottom: 0.9rem;
}

.narrow {
  max-width: 430px;
  margin: 0;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 0.9fr);
  gap: 0.9rem;
  align-items: stretch;
  min-height: 72vh;
}

.login-visual {
  border-radius: 8px;
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
  min-height: 520px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.metric {
  padding: 0.85rem;
}

.metric h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.metric p {
  margin: 0.55rem 0 0;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary-strong);
}

h2,
h3,
h4 {
  margin: 0 0 0.55rem;
}

.grid {
  display: grid;
  gap: 0.6rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

label {
  display: grid;
  gap: 0.28rem;
  font-size: 0.84rem;
  color: var(--muted);
}

input,
select,
button {
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
}

input:focus,
select:focus {
  outline: 2px solid #85b8b8;
  border-color: var(--primary);
}

button,
.button-link {
  background: var(--primary);
  color: #fff;
  border: 0;
  text-decoration: none;
  display: inline-block;
  width: fit-content;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: var(--primary-strong);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #e8edf2;
  text-align: left;
  padding: 0.52rem;
  font-size: 0.86rem;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
}

.links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-soft);
}

.links a:hover {
  border-color: #b8c6d4;
  background: #fff;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem;
}

.flash-wrap {
  margin-bottom: 0.8rem;
}

.flash {
  padding: 0.58rem;
  border-radius: 8px;
  margin: 0.2rem 0;
  border: 1px solid var(--line);
}

.flash.success {
  background: var(--success-bg);
}

.flash.error {
  background: var(--error-bg);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 0.9rem;
  justify-content: start;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.68rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
  width: 100%;
  min-height: 430px;
}

.item-name {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.item-image {
  width: 100%;
  height: 164px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #dfe6ee;
  background: #f8fbfc;
  cursor: pointer;
  transition: all 0.18s ease;
}

.item-image.zoomed {
  width: min(68vw, 240px);
  height: min(68vw, 240px);
}

.item-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: #f1f5f8;
}

.item-meta,
.item-desc,
.item-calories {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.28;
}

.item-short {
  margin: 0;
  font-size: 0.81rem;
  line-height: 1.3;
  color: #4d5a63;
  min-height: 2.2em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.size-row {
  min-height: 34px;
  font-size: 0.78rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.24rem;
}

.size-row .size-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: #6f7781;
  background: #f7f7f7;
  border: 1px solid #d7dbe0;
}

.size-row .size-select:focus,
.size-row .size-select.has-value {
  color: #1f2933;
  background: #fff;
}

.item-actions {
  margin-top: auto;
  display: grid;
  gap: 0.38rem;
}

.item-desc {
  min-height: 36px;
}

.qty-control {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 0.3rem;
  align-items: center;
  margin-top: auto;
}

.qr-menu-header {
  display: grid;
  gap: 0.75rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.98), rgba(255, 250, 245, 0.95)),
    #fff;
  backdrop-filter: blur(10px);
  transition: padding 0.18s ease, gap 0.18s ease, box-shadow 0.18s ease;
}

.qr-menu-header.is-compact {
  gap: 0.42rem;
  padding-top: 0.48rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 10px 24px rgba(52, 31, 18, 0.13);
}

.qr-menu-header .qr-search {
  transition: margin 0.18s ease, padding 0.18s ease;
}

.qr-menu-header.is-compact .qr-search {
  margin-top: 0;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.qr-menu-header.is-compact .qr-category-bar {
  margin-top: 0.12rem;
  padding-bottom: 0;
}

.special-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid #eadccf;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  background: #fcf6ef;
}

.special-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #4c2f20;
  color: #fff8f0;
  font-size: 0.76rem;
  font-weight: 700;
}

.special-ticker {
  overflow: hidden;
  white-space: nowrap;
}

.special-ticker span {
  display: inline-block;
  animation: brownberriesTicker 18s linear infinite;
  color: #69412c;
  font-size: 0.88rem;
}

@keyframes brownberriesTicker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-18%);
  }
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.section-heading.compact {
  margin-bottom: 0.6rem;
}

.section-heading h3 {
  margin: 0;
}

.section-note {
  max-width: 420px;
  text-align: right;
  margin: 0;
}

.eyebrow {
  margin: 0 0 0.16rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b6348;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-picker-shell {
  position: relative;
  display: grid;
  gap: 0.36rem;
  max-height: none;
  padding-right: 0;
}

.table-picker-shell .section-heading {
  margin-bottom: 0.1rem;
}

.table-chip-bar {
  margin-top: 0;
}

.table-chip {
  min-width: 64px;
  justify-content: center;
  font-weight: 700;
}

.qr-menu-grid {
  align-items: stretch;
}

.item-card-topline {
  min-height: 24px;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.item-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  background: #f2e4d6;
  color: #6b4128;
  font-size: 0.72rem;
  font-weight: 700;
}

.item-tag-featured {
  background: #4c2f20;
  color: #fff8f1;
}

.item-tag-muted {
  background: #f5f4f1;
  color: #57626d;
}

.item-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
}

.parcel-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #4f5b65;
}

.quick-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.empty-filter-state {
  border: 1px dashed #dbc7b5;
  border-radius: 8px;
  padding: 0.85rem;
  text-align: center;
  background: #fbf6f1;
  color: #7a5a43;
}

.qty-btn {
  padding: 0.34rem;
  font-weight: 700;
}

.add-to-cart-btn {
  width: 100%;
  background: var(--accent);
}

.add-to-cart-btn:hover {
  background: #173d3e;
}

.cart-lines {
  display: grid;
  gap: 0.38rem;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr 70px 90px 90px;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.44rem;
}

.thumb-image {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.item-preview {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 260px;
}

.qty {
  width: 64px;
}

.full {
  grid-column: 1 / -1;
}

.inline {
  display: inline-block;
}

.muted {
  color: var(--muted);
  margin: 0;
}

.kitchen-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.k-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: 0 10px 28px rgba(47, 29, 20, 0.06);
  position: relative;
}

.k-card h3 {
  margin-top: 0;
  font-size: 0.96rem;
}

.k-card ul {
  margin: 0.35rem 0;
  padding-left: 1.15rem;
}

.k-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
}

.kds-shell {
  display: grid;
  gap: 0.9rem;
}

.kds-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.kds-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
}

.kds-station-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.kds-station-switch .button-link.active {
  background: #4f3528;
  color: #fff8f1;
  border-color: #4f3528;
}

.kds-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.kds-metric-card {
  background: linear-gradient(180deg, #fffdf9, #f6efe7);
  border: 1px solid rgba(111, 74, 53, 0.12);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  display: grid;
  gap: 0.2rem;
}

.kds-metric-card span {
  font-size: 0.78rem;
  color: var(--muted);
}

.kds-metric-card strong {
  font-size: 1.12rem;
  color: #4a2c1d;
}

.kds-training-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.kds-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.95rem;
  align-items: start;
  position: relative;
}

.kds-layout.sop-open {
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
}

.kds-layout.sop-open .kitchen-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1120px) {
  .kitchen-grid,
  .kds-layout.sop-open .kitchen-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .kitchen-grid,
  .kds-layout.sop-open .kitchen-grid {
    grid-template-columns: 1fr;
  }
}

.kds-board-panel,
.kds-sop-panel {
  position: sticky;
  top: calc(74px + env(safe-area-inset-top));
}

.kds-board-panel {
  min-width: 0;
}

.kds-card-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 33, 25, 0.18);
  z-index: 60;
}

.kds-card-backdrop.hidden {
  display: none;
}

.kds-sop-panel.hidden {
  display: none;
}

.kds-sop-toggle {
  position: fixed;
  top: 50%;
  right: 0.9rem;
  transform: translateY(-50%);
  z-index: 40;
  width: 46px;
  min-width: 46px;
  height: 72px;
  padding: 0;
  border-radius: 14px;
  background: rgba(95, 59, 39, 0.96);
  color: #fff8f1;
  box-shadow: 0 14px 28px rgba(47, 29, 20, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.kds-sop-toggle:hover {
  background: rgba(69, 42, 29, 0.98);
}

.kds-board-head,
.kds-sop-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.kds-board-state {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.kds-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #36a269;
  box-shadow: 0 0 0 6px rgba(54, 162, 105, 0.15);
}

.k-card.delayed {
  border-color: rgba(189, 79, 52, 0.28);
  box-shadow: 0 12px 26px rgba(189, 79, 52, 0.08);
}

.k-card-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 2rem 1rem;
}

.kds-ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.kds-ticket-meta {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
}

.kds-card-toggle {
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  background: #f3ece4;
  color: #5f3b27;
  border: 1px solid rgba(111, 74, 53, 0.14);
  font-size: 1rem;
  line-height: 1;
}

.kds-card-toggle:hover {
  background: #e9dfd4;
}

.kds-ticket-ref {
  margin-top: 0.3rem;
  font-size: 0.8rem;
}

.kds-status-badge,
.kds-ticket-timer,
.kds-mini-badge,
.kds-alert-chip,
.kds-sop-prep-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.22rem 0.58rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.kds-status-badge.pending {
  background: #ece7df;
  color: #6a625c;
}

.kds-status-badge.pending-approval {
  background: #fff1db;
  color: #ba6d00;
}

.kds-status-badge.preparing {
  background: #fff1db;
  color: #ba6d00;
}

.kds-status-badge.ready {
  background: #e4f6ea;
  color: #287b4d;
}

.kds-status-badge.served {
  background: #e2eefb;
  color: #2a5f95;
}

.kds-status-badge.cancelled {
  background: #fbe8e5;
  color: #b84e31;
}

.kds-ticket-timer {
  background: #f5f0ea;
  color: #6e5547;
}

.kds-ticket-timer.delayed {
  background: #fbe8e5;
  color: #b84e31;
}

.kds-item-list {
  display: grid;
  gap: 0.52rem;
  margin: 0.8rem 0 0.9rem;
  max-height: 380px;
  overflow: auto;
  padding-right: 0.2rem;
}

.kds-item-shell {
  display: grid;
  gap: 0.42rem;
}

.kds-item-shell.approval-pending .kds-item-row {
  background: #fff6e8;
  border-color: rgba(186, 109, 0, 0.22);
}

.kds-item-shell.approval-approved .kds-item-row {
  background: #f5fbf6;
  border-color: rgba(40, 123, 77, 0.18);
}

.kds-item-shell.active .kds-item-row {
  border-color: #6f4a35;
  box-shadow: 0 0 0 3px rgba(111, 74, 53, 0.12);
}

.kds-item-row {
  width: 100%;
  border: 1px solid rgba(111, 74, 53, 0.14);
  background: #fffdfa;
  color: var(--text);
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  cursor: pointer;
}

.kds-item-main {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.kds-item-main strong {
  display: block;
  color: #4a2c1d;
  font-size: 0.98rem;
  line-height: 1.22;
  font-weight: 700;
}

.kds-item-main span,
.kds-item-side {
  font-size: 0.8rem;
  color: var(--muted);
}

.kds-item-main small {
  font-size: 0.76rem;
  color: var(--muted);
}

.kds-item-shell.item-served .kds-item-main strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #6e5e52;
}

.kds-item-side {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.kds-mini-badge {
  background: #fff0df;
  color: #9a5500;
}

.kds-sop-quick {
  color: #6f4a35;
  font-weight: 700;
}

.kds-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.kds-item-actions form {
  margin: 0;
}

.kds-item-actions button {
  min-width: 84px;
  padding: 0.42rem 0.62rem;
  border-radius: 999px;
  background: #efe8e0;
  color: #5f4638;
  font-size: 0.78rem;
  border: 1px solid rgba(111, 74, 53, 0.12);
}

.kds-item-actions button.active {
  background: #6f4a35;
  color: #fff8f1;
  border-color: #6f4a35;
}

.kds-item-actions button:disabled {
  background: #f2ede7;
  color: #99897d;
  border-color: rgba(111, 74, 53, 0.1);
  cursor: not-allowed;
}

.k-card.maximized {
  position: fixed;
  top: var(--kds-max-top, calc(78px + env(safe-area-inset-top)));
  left: var(--kds-max-left, 1rem);
  right: var(--kds-max-right, 1rem);
  bottom: var(--kds-max-bottom, 1rem);
  z-index: 80;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  background: #ffffff;
  opacity: 1;
  box-shadow: 0 22px 50px rgba(27, 18, 12, 0.28);
}

.k-card.maximized .kds-item-list {
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding-right: 0.3rem;
}

.kds-actions form button {
  min-width: 88px;
}

.kds-actions .danger {
  background: #fff1ef;
  color: #b84e31;
  border-color: rgba(184, 78, 49, 0.2);
}

.kds-sop-search {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

.kds-sop-empty {
  border: 1px dashed rgba(111, 74, 53, 0.2);
  border-radius: 12px;
  padding: 1rem;
  background: #fffdfa;
  margin-bottom: 0.9rem;
}

.kds-sop-content {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.kds-sop-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.kds-sop-prep-badge {
  background: #f5ece0;
  color: #6b4128;
}

.kds-sop-photo-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(111, 74, 53, 0.16);
  background: #fffdfa;
}

.kds-sop-photo {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.kds-sop-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.kds-alert-chip {
  background: #fbe8e5;
  color: #b84e31;
}

.kds-sop-sections {
  display: grid;
  gap: 0.75rem;
}

.kds-sop-section {
  border: 1px solid rgba(111, 74, 53, 0.12);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #fffdfa;
}

.kds-sop-section h4 {
  margin: 0 0 0.45rem;
}

.kds-sop-section ul,
.kds-training-wrap ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.3rem;
}

.kds-training-wrap {
  border: 1px solid rgba(45, 112, 112, 0.18);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #f5fbfb;
}

.kds-training-wrap h4 {
  margin: 0 0 0.45rem;
}

.kds-library-section {
  display: grid;
  gap: 0.7rem;
}

.kds-sop-library {
  display: grid;
  gap: 0.5rem;
  max-height: 360px;
  overflow: auto;
  padding-right: 0.2rem;
}

.kds-library-item {
  border: 1px solid rgba(111, 74, 53, 0.12);
  background: #fff;
  color: #4a2c1d;
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  text-align: left;
  display: grid;
  gap: 0.18rem;
  cursor: pointer;
}

.kds-library-item strong {
  color: #4a2c1d;
}

.kds-library-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

.inventory-sop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.inventory-sop-grid textarea,
.inventory-size-notes textarea {
  width: 100%;
  resize: vertical;
}

.inventory-size-notes {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid rgba(111, 74, 53, 0.12);
  border-radius: 12px;
  background: #fffdfa;
}

@media (max-width: 1100px) {
  .kds-layout {
    grid-template-columns: 1fr;
  }

  .kds-board-panel,
  .kds-sop-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .kds-header,
  .kds-header-actions,
  .kds-ticket-head,
  .kds-sop-title-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .kds-metrics,
  .inventory-sop-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .kds-metrics,
  .inventory-sop-grid {
    grid-template-columns: 1fr;
  }

  .kitchen-grid,
  .kds-layout,
  .kds-layout.sop-open {
    grid-template-columns: 1fr;
  }

  .kds-item-row {
    align-items: flex-start;
  }

  .kds-item-side {
    flex-direction: column;
    align-items: flex-end;
  }

  .kds-item-actions button {
    min-width: calc(50% - 0.25rem);
  }

  .kds-sop-toggle {
    top: auto;
    bottom: 1rem;
    right: 0.8rem;
    transform: none;
    height: 52px;
    width: 52px;
    min-width: 52px;
    border-radius: 999px;
  }

  .kds-layout.sop-open .kds-sop-panel {
    position: fixed;
    right: 0.75rem;
    left: 0.75rem;
    top: calc(72px + env(safe-area-inset-top));
    bottom: 0.75rem;
    z-index: 35;
    overflow: auto;
  }

  .k-card.maximized {
    top: var(--kds-max-top, calc(70px + env(safe-area-inset-top)));
    left: var(--kds-max-left, 0.75rem);
    right: var(--kds-max-right, 0.75rem);
    bottom: var(--kds-max-bottom, 0.75rem);
  }
}

.qr-menu-table .thumb-image.qr-thumb {
  width: 82px;
  height: 82px;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.18s ease;
}

.qr-menu-table .thumb-image.qr-thumb.zoomed {
  width: 180px;
  height: 180px;
}

.desc-btn {
  background: #efe6dd;
  color: #4f3424;
  border: 1px solid #dccbbb;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  font-size: 0.76rem;
}

.desc-btn:hover {
  background: #e6d8ca;
}

.pager {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.desc-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 14, 11, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.desc-dialog {
  width: min(520px, 95vw);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem;
}

.hidden {
  display: none;
}

.profile-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0.9rem;
}

.profile-sidebar {
  display: grid;
  gap: 0.3rem;
  align-content: start;
  height: fit-content;
}

.profile-sidebar a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: var(--surface-soft);
}

.profile-sidebar a.active {
  background: #fff;
  border-color: #bfae9e;
  font-weight: 600;
}

.profile-content {
  min-width: 0;
}

.library-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0.9rem;
}

.library-sidebar {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  height: fit-content;
}

.library-sidebar a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: var(--surface-soft);
}

.attendance-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(40px, 1fr));
  gap: 0.35rem;
  max-width: 760px;
}

.cal-head {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.cal-cell {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.cal-cell.empty {
  background: #f6f1eb;
}

.day-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7ccc2;
  font-size: 0.82rem;
}

.st-present {
  background: #d9f3df;
  border-color: #74b981;
}

.st-half {
  background: #fff1bf;
  border-color: #ddbc42;
}

.st-absent {
  background: #ffdfe0;
  border-color: #d06f72;
}

.st-leave {
  background: #ddecff;
  border-color: #6d97d6;
}

.cashier-table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}

.cashier-workspace {
  display: grid;
  grid-template-columns: minmax(330px, var(--cashier-rail-width, 390px)) 14px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

body.cashier-shell.cashier-tablet-landscape .cashier-workspace {
  grid-template-columns: minmax(250px, var(--cashier-rail-width, 300px)) 14px minmax(0, 1fr);
}

body.cashier-shell.cashier-tablet-landscape .cashier-table-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.cashier-shell.cashier-tablet-landscape .cashier-table-box-compact {
  min-height: 78px;
  padding: 0.42rem 0.4rem;
}

body.cashier-shell.cashier-tablet-landscape .cashier-table-box-compact strong {
  font-size: 16px;
}

body.cashier-shell.cashier-tablet-landscape .cashier-table-box-compact > span {
  font-size: 14px;
}

body.cashier-shell.cashier-tablet-landscape .cashier-selected-sections {
  grid-template-rows: minmax(220px, 1fr) 14px minmax(220px, 1fr);
}

body.cashier-shell.cashier-tablet-portrait .cashier-workspace {
  grid-template-columns: 1fr;
}

body.cashier-shell.cashier-tablet-portrait .cashier-rail-splitter,
body.cashier-shell.cashier-tablet-portrait .cashier-section-splitter {
  display: none;
}

body.cashier-shell.cashier-tablet-portrait .topbar {
  grid-template-columns: 1fr;
  align-items: start;
}

body.cashier-shell.cashier-tablet-portrait .brand-wrap > div {
  display: grid;
  gap: 0.12rem;
}

body.cashier-shell.cashier-tablet-portrait .cashier-topbar-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  align-items: center;
  gap: 0.45rem;
}

body.cashier-shell.cashier-tablet-portrait .cashier-topbar-select select {
  min-width: 0;
  width: 100%;
}

body.cashier-shell.cashier-tablet-portrait .cashier-topbar-volume {
  min-width: 120px;
}

body.cashier-shell.cashier-tablet-portrait .cashier-topbar-volume input[type="range"] {
  width: 120px;
}

body.cashier-shell.cashier-tablet-portrait .cashier-table-panel {
  position: static;
  max-height: none;
}

body.cashier-shell.cashier-tablet-portrait .cashier-table-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

body.cashier-shell.cashier-tablet-portrait .cashier-table-box-compact {
  min-height: 102px;
  padding: 0.54rem 0.5rem;
}

body.cashier-shell.cashier-tablet-portrait .cashier-table-box-compact strong {
  font-size: 16px;
}

body.cashier-shell.cashier-tablet-portrait .cashier-table-box-compact > span {
  font-size: 14px;
}

body.cashier-shell.cashier-tablet-portrait .cashier-selected-sections {
  grid-template-rows: auto auto auto;
}

.cashier-table-panel,
.cashier-orders-panel,
.cashier-settlement-panel,
.cashier-empty-panel {
  min-height: 0;
  min-width: 0;
}

.cashier-table-panel {
  position: sticky;
  top: 0.8rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 108px);
  background: linear-gradient(180deg, #fffdf9 0%, #faf5ee 100%);
}

.cashier-table-panel-head {
  margin-bottom: 0.7rem;
}

.cashier-table-panel-head h3,
.cashier-orders-panel h3,
.cashier-settlement-panel h3,
.cashier-empty-panel h3 {
  margin-bottom: 0.2rem;
}

.cashier-section-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: nowrap;
  margin-bottom: 0.5rem;
}

.cashier-section-headline h3,
.cashier-section-headline p {
  margin: 0;
  white-space: nowrap;
}

.cashier-section-headline p {
  color: #5b4537;
}

.cashier-table-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
  overflow: auto;
  padding: 0.18rem 0.2rem 0.2rem 0.18rem;
}

.cashier-table-box-compact {
  align-content: start;
  min-height: 92px;
  padding: 0.52rem 0.5rem;
  overflow: hidden;
}

.cashier-table-box-compact strong {
  font-size: 16px;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cashier-table-box-compact > span {
  font-size: 14px;
  color: #6b5446;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cashier-table-box {
  display: grid;
  gap: 0.2rem;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem;
  background: linear-gradient(180deg, #ffffff 0%, #fcf7f1 100%);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.cashier-table-box.running {
  background: linear-gradient(180deg, #edf9f1 0%, #e0f4e8 100%);
  border-color: #6fb886;
}

.cashier-table-box.selected {
  border-color: #8c6a54;
  box-shadow: inset 0 0 0 2px #8c6a54, 0 6px 12px rgba(92, 60, 41, 0.1);
  position: relative;
  z-index: 2;
}

.cashier-table-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  margin-top: 0.12rem;
  align-items: center;
}

.cashier-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border-radius: 999px;
  padding: 0.12rem 0.36rem;
  font-size: 0.64rem;
  font-weight: 700;
}

.cashier-status-chip.pending-approval {
  background: #fff1db;
  color: #ba6d00;
}

.cashier-status-chip.pending {
  background: #ece7df;
  color: #6a625c;
}

.cashier-status-chip.preparing {
  background: #fff1db;
  color: #ba6d00;
}

.cashier-status-chip.ready {
  background: #e4f6ea;
  color: #287b4d;
}

.cashier-status-chip.served {
  background: #e2eefb;
  color: #2a5f95;
}

.cashier-status-chip.rejected {
  background: #fbe8e5;
  color: #b84e31;
}

.cashier-item-line {
  display: grid;
  gap: 0.18rem;
  margin-bottom: 0.32rem;
}

.cashier-item-line.served > :first-child {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #6e5e52;
}

.cashier-item-line.rejected > :first-child {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #b84e31;
  opacity: 0.75;
}

.cashier-move-form {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf7f2;
}

.cashier-selected-sections {
  display: grid;
  grid-template-rows: minmax(280px, 1fr) 14px minmax(260px, 1fr);
  gap: 0.85rem;
  min-height: 0;
  min-width: 0;
}

.cashier-orders-panel,
.cashier-settlement-panel {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0%, #fdf9f4 100%);
  box-shadow: 0 8px 22px rgba(73, 47, 31, 0.06);
}

.cashier-rail-splitter {
  display: flex;
  align-items: stretch;
  justify-content: center;
  touch-action: none;
}

.cashier-rail-splitter-handle {
  width: 14px;
  height: 100%;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0, transparent 42%, #d5c2b1 42%, #d5c2b1 58%, transparent 58%, transparent 100%);
  cursor: col-resize;
  position: relative;
}

.cashier-rail-splitter-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  right: 2px;
  height: 66px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(108, 78, 56, 0.14);
}

.cashier-section-splitter {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -0.28rem 0;
  touch-action: none;
}

.cashier-section-splitter-handle {
  width: 100%;
  height: 14px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, transparent 0, transparent 44%, #d7c5b5 44%, #d7c5b5 56%, transparent 56%, transparent 100%);
  cursor: row-resize;
  position: relative;
}

.cashier-section-splitter-handle::before {
  content: "";
  position: absolute;
  inset: 2px 50%;
  transform: translateX(-50%);
  width: 52px;
  border-radius: 999px;
  background: rgba(110, 84, 60, 0.16);
}

.cashier-selected-sections.is-resizing {
  user-select: none;
}

.cashier-orders-panel > div:last-child,
.cashier-settlement-panel form {
  min-height: 0;
}

.cashier-orders-panel > div:last-child {
  overflow: auto;
}

.cashier-settlement-panel form {
  flex: 1;
  overflow: auto;
}

.cashier-settlement-panel table,
.cashier-orders-panel table {
  min-width: 760px;
}

.cashier-empty-panel {
  display: grid;
  place-items: center;
  min-height: 280px;
  text-align: center;
  grid-row: 1 / span 2;
}

@media (min-width: 980px) {
  .cashier-workspace {
    min-height: calc(100vh - 240px);
  }
}

@media (max-width: 680px), (orientation: portrait) and (max-width: 1024px) {
  .cashier-workspace {
    grid-template-columns: 1fr;
  }

  .cashier-rail-splitter {
    display: none;
  }

  .cashier-table-panel {
    position: static;
    max-height: none;
  }

  .cashier-table-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .cashier-selected-sections {
    grid-template-rows: auto auto auto;
  }

  .cashier-section-splitter {
    display: none;
  }
}

@media (max-width: 680px), (orientation: portrait) and (max-width: 1024px) {
  .cashier-table-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cashier-table-box-compact {
    min-height: 96px;
    padding: 0.46rem 0.42rem;
  }

  .cashier-table-box-compact strong {
    font-size: 16px;
  }

  .cashier-table-box-compact > span {
    font-size: 14px;
  }
}

@media (max-width: 1450px) {
  .cashier-topbar-tools {
    grid-template-columns: auto minmax(180px, 240px) auto;
    gap: 0.55rem;
  }
}

@media (max-width: 720px), (orientation: portrait) and (max-width: 1024px) {
  body.cashier-shell .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .cashier-topbar-tools {
    grid-template-columns: minmax(160px, 1fr) minmax(150px, 220px) auto;
    justify-content: stretch;
  }

  .cashier-topbar-notif {
    justify-self: start;
  }
}

@media (orientation: landscape) and (min-width: 700px) and (max-width: 1400px) {
  body.cashier-shell .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 0.78rem;
  }

  body.cashier-shell .brand-wrap {
    gap: 0.55rem;
  }

  body.cashier-shell .brand-logo {
    width: 36px;
    height: 36px;
    padding: 3px;
  }

  body.cashier-shell .topbar h1 {
    font-size: 0.98rem;
  }

  body.cashier-shell .topbar p {
    font-size: 0.74rem;
  }

  .cashier-topbar-tools {
    grid-template-columns: minmax(148px, 190px) minmax(150px, 200px) auto;
    gap: 0.45rem;
  }

  .cashier-topbar-select select {
    min-width: 148px;
    font-size: 0.92rem;
    padding: 0.34rem 0.42rem;
  }

  .cashier-topbar-volume {
    min-width: 145px;
  }

  .cashier-topbar-volume input[type="range"] {
    width: min(160px, 18vw);
  }

  .notif-bell {
    padding: 0.34rem 0.48rem;
    min-width: auto;
  }
}

.cashier-move-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(180px, 0.9fr) auto;
  gap: 0.8rem;
  align-items: end;
}

.cashier-move-picks {
  display: grid;
  gap: 0.45rem;
}

.cashier-move-order-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cashier-move-order-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.6rem;
  border: 1px solid #d8cec1;
  border-radius: 999px;
  background: #fff;
  font-size: 0.88rem;
}

.cashier-move-order-chip input {
  margin: 0;
}

.cashier-move-target {
  display: grid;
  gap: 0.32rem;
}

.cashier-item-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.26rem;
}

.cashier-inline-state {
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

@media (max-width: 720px) {
  .cashier-move-grid {
    grid-template-columns: 1fr;
  }
}

/* Ordering UI polish: shared rhythm, hierarchy, and density */
.qr-cafe-top,
.panel h2,
.panel h3 {
  letter-spacing: 0;
}

.qr-head h2 {
  font-size: clamp(1.02rem, 1.8vw, 1.28rem);
  margin-bottom: 0.2rem;
}

.qr-search,
#staff-search,
#browse-search {
  border: 1px solid #d8c5b2;
  background: #fffdf9;
  font-size: 0.92rem;
  padding: 0.62rem 0.68rem;
}

.qr-category-bar {
  gap: 0.52rem;
  padding: 0.2rem 0 0.24rem;
}

.qr-cat-pill {
  border-radius: 999px;
  padding: 0.42rem 0.74rem;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(47, 24, 11, 0.06);
}

.qr-cat-pill.active {
  box-shadow: 0 4px 10px rgba(69, 42, 29, 0.18);
}

.item-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.8rem;
}

.item-card {
  border-radius: 8px;
  padding: 0.72rem;
  min-height: 455px;
  max-height: none;
  gap: 0.42rem;
  box-shadow: 0 6px 16px rgba(52, 31, 18, 0.06);
}

.item-name {
  font-size: 0.96rem;
  font-weight: 700;
}

.item-meta {
  font-size: 0.78rem;
  line-height: 1.3;
}

.item-price {
  margin: 0;
  font-size: 0.88rem;
  color: #4c2f20;
  font-weight: 600;
}

.item-calories {
  font-size: 0.78rem;
}

.item-image {
  height: 168px;
  border-color: #e3d8cc;
  background: #f8f3ed;
}

.desc-btn {
  width: fit-content;
  min-height: 30px;
  padding: 0.29rem 0.55rem;
}

.image-dialog {
  position: relative;
  max-width: min(94vw, 700px);
  padding-top: 2.2rem;
}

.image-modal-src {
  width: min(86vw, 620px);
  max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e1d6c9;
  background: #faf6f0;
}

.image-close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}

.qty-control {
  grid-template-columns: 38px 1fr 38px;
  gap: 0.34rem;
}

.qty-control input.qty-input {
  min-width: 66px;
  text-align: center;
}

.add-to-cart-btn {
  min-height: 38px;
  font-weight: 600;
}

.floating-cart {
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 700;
  min-height: 40px;
  touch-action: none;
  user-select: none;
}

.cart-line {
  border-radius: 8px;
  padding: 0.5rem;
}

/* Staff ordering page visual consistency */
#staff-floating-cart,
#browse-floating-cart {
  right: 20px;
  bottom: 18px;
}

@media (max-width: 800px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-line {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .login-visual {
    min-height: 240px;
  }

  .panel {
    padding: 0.65rem;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .library-layout {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qr-menu-table thead {
    display: none;
  }

  .qr-menu-table,
  .qr-menu-table tbody,
  .qr-menu-table tr,
  .qr-menu-table td {
    display: block;
    width: 100%;
  }

  .qr-menu-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 0.65rem;
    padding: 0.55rem;
    background: #fff;
  }

  .qr-menu-table td {
    border-bottom: 0;
    padding: 0.25rem 0;
  }

  .qr-menu-table .thumb-image.qr-thumb {
    width: 72px;
    height: 72px;
  }

  .qr-menu-table .thumb-image.qr-thumb.zoomed {
    width: min(72vw, 240px);
    height: min(72vw, 240px);
  }

  .item-preview {
    min-width: 0;
  }

  .qty-control {
    grid-template-columns: 34px 64px 34px;
    width: fit-content;
  }

  .add-to-cart-btn {
    width: auto;
    min-width: 90px;
  }

  .panel {
    padding: 0.62rem;
  }

  .qr-head {
    gap: 0.55rem;
  }

  .qr-order-toolbar {
    align-items: center;
  }

  .staff-table-select-form {
    grid-template-columns: auto minmax(82px, 108px) minmax(0, 1fr);
    gap: 0.36rem;
  }

  .staff-table-select-text {
    font-size: 0.78rem;
  }

  .staff-table-select-input {
    font-size: 0.82rem;
    padding: 0.38rem 0.42rem;
  }

  .staff-table-current {
    font-size: 0.78rem;
  }

  .qr-head .brand-logo {
    width: 38px;
    height: 38px;
  }

  .qr-search,
  #staff-search,
  #browse-search {
    font-size: 0.9rem;
    padding: 0.58rem 0.6rem;
  }

  .qr-cat-pill {
    font-size: 0.76rem;
    padding: 0.38rem 0.64rem;
  }

  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .item-card {
    min-height: 410px;
    padding: 0.6rem;
    gap: 0.34rem;
  }

  .item-name {
    font-size: 0.88rem;
  }

  .item-meta,
  .item-calories,
  .item-price {
    font-size: 0.75rem;
  }

.item-short {
  font-size: 0.74rem;
}

.item-image {
  height: 122px;
  }

  .desc-btn {
    font-size: 0.72rem;
    padding: 0.26rem 0.44rem;
  }

  .add-to-cart-btn {
    min-height: 34px;
    font-size: 0.84rem;
  }

  .floating-cart {
    right: 12px;
    bottom: 12px;
    padding: 0.56rem 0.68rem;
    border-radius: 8px;
    font-size: 0.84rem;
  }

  .floating-assist-btn {
    left: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom) + var(--mobile-fixed-bottom-offset, 0px));
    min-height: 38px;
    font-size: 0.84rem;
    padding: 0.52rem 0.72rem;
  }

  .qr-bottom-cart-bar {
    min-height: 62px;
    font-size: 0.96rem;
  }

  .qr-bottom-cart-half {
    min-height: 62px;
    padding: 0.88rem 0.9rem calc(0.88rem + env(safe-area-inset-bottom));
  }

  #floating-summary,
  #floating-total,
  .qr-bottom-cart-label,
  .qr-bottom-cart-orders-label {
    font-size: 0.96rem;
  }

  .qr-bottom-cart-orders {
    flex-basis: 38%;
  }

  .cart-sheet {
    min-height: 75vh;
    max-height: 78vh;
  }

  .qr-welcome-screen {
    padding: 1rem 0.8rem;
  }

  .qr-landing-logo {
    width: 72px;
    height: 72px;
  }

  .special-strip,
  .section-heading {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  .section-note {
    text-align: left;
    max-width: none;
  }

  .item-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .quick-add-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1200px) {
  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.9rem;
  }

  .item-card {
    min-height: 450px;
    padding: 0.78rem;
  }

  .item-image {
    height: 182px;
  }

  .item-name {
    font-size: 1rem;
  }
}

.inventory-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0.8rem;
}

.inventory-hero {
  background: linear-gradient(135deg, #fffdf9 0%, #f3e7d9 100%);
}

.inventory-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.inventory-badge {
  border: 1px solid #d8c0a7;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.inventory-sidebar {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  position: sticky;
  top: 0.8rem;
}

.inventory-sidebar a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.48rem 0.58rem;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  font-weight: 600;
  font-size: 0.86rem;
}

.inventory-sidebar a.active {
  background: #2f1b0f;
  color: #fff;
  border-color: #2f1b0f;
}

.inventory-content {
  display: grid;
  gap: 0.8rem;
}

.inventory-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.inventory-main-grid {
  align-items: start;
}

.inventory-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
}

.inventory-kpi {
  background: #fff;
  border: 1px solid #e3d7c8;
  border-radius: 8px;
  padding: 0.64rem;
}

.inventory-kpi h4 {
  margin: 0 0 0.35rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.inventory-kpi p {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.inventory-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
}

.inventory-category-chip {
  border: 1px solid #e6dacd;
  border-radius: 8px;
  padding: 0.55rem;
  background: #fffdfa;
}

.inventory-category-chip h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.inventory-sticky-save {
  position: sticky;
  bottom: 10px;
  z-index: 8;
}

.inventory-alert-list {
  display: grid;
  gap: 0.45rem;
}

.inventory-alert-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
}

.inventory-alert-row.low {
  background: #fff0eb;
  border: 1px solid #f2c7bb;
}

.inventory-alert-row.overstock {
  background: #fff7e8;
  border: 1px solid #ead2a1;
}

.inventory-alert-row.neutral {
  background: #f5f0ea;
  border: 1px solid #e0d5c8;
}

.inventory-inline-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.inventory-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.inventory-filter-bar {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}

.inventory-closing-group {
  border: 1px solid #ebdece;
  border-radius: 8px;
  padding: 0.6rem;
  background: #fffdfa;
}

.inventory-closing-head {
  margin-bottom: 0.5rem;
}

.inventory-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.inventory-status.low {
  background: #fff0eb;
  color: #9d3322;
}

.inventory-status.overstock {
  background: #fff7e8;
  color: #8f5d00;
}

.inventory-status.healthy {
  background: #edf8f0;
  color: #1f6d3f;
}

.inventory-setting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

@media (max-width: 900px) {
  .inventory-layout {
    grid-template-columns: 1fr;
  }
  .inventory-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inventory-two-col {
    grid-template-columns: 1fr;
  }
}

.public-notice-bar {
  overflow: hidden;
  background: #2f1b0f;
  color: #fff;
  border-radius: 8px;
  margin-bottom: 0.6rem;
}

.public-notice-track {
  white-space: nowrap;
  display: inline-block;
  padding: 0.45rem 0;
  animation: ticker-move 16s linear infinite;
}

.public-notice-track span {
  padding-left: 100%;
  font-weight: 600;
  font-size: 0.88rem;
}

@keyframes ticker-move {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
