:root {
  color-scheme: light;
  --ink: #241c0f;
  --muted: #74684d;
  --line: #ead68d;
  --paper: #fff8df;
  --panel: #ffffff;
  --accent: #f6c52f;
  --accent-strong: #bb8500;
  --accent-dark: #b98200;
  --accent-soft: #ffec9a;
  --accent-pale: #fff6d6;
  --warn: #b45309;
  --warn-soft: #fff7d6;
  --shadow: 0 18px 46px rgba(142, 99, 0, 0.13);
  --soft-shadow: 0 8px 24px rgba(142, 99, 0, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 248, 223, 0.82) 260px),
    var(--paper);
  color: var(--ink);
}

body.menu-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  display: grid;
  gap: 16px;
  max-width: 460px;
  padding: 24px;
  width: 100%;
}

.login-brand {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 86px minmax(0, 1fr);
}

.login-brand img {
  aspect-ratio: 1;
  border-radius: 999px;
  height: 86px;
  object-fit: contain;
  width: 86px;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
  line-height: 1.05;
}

.login-brand span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  font-weight: 750;
  margin-top: 4px;
}

.demo-users {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding-top: 14px;
}

.demo-users strong {
  color: var(--ink);
}

.login-status {
  min-height: 20px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.login-error {
  color: #b91c1c;
  font-weight: 750;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  background: #fffaf5;
  position: sticky;
  top: 0;
  z-index: 4;
  box-shadow: 0 8px 24px rgba(124, 45, 18, 0.08);
}

.app-header h1,
.panel h2,
.dialog-card h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.app-header h1 {
  font-size: clamp(26px, 3vw, 38px);
}

.panel h2,
.dialog-card h2 {
  font-size: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions,
.order-actions,
.product-actions,
.line-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.danger-button {
  border-color: #ffd4d4 !important;
  color: #b42318 !important;
}

.danger-button:hover {
  background: #fff2f2 !important;
}

.header-actions select {
  min-width: 170px;
}

.sales-mode .manager-only,
.sales-mode .advanced-field {
  display: none !important;
}

.sales-mode .app-header h1 {
  font-size: clamp(24px, 7vw, 34px);
}

.sales-mode .workspace {
  grid-template-columns: minmax(300px, 1fr) minmax(340px, 0.9fr) minmax(280px, 0.75fr);
}

.sales-mode .catalog-panel,
.sales-mode .order-panel,
.sales-mode .history-panel {
  padding: 16px;
}

.sales-mode .history-panel .stats-grid {
  display: none;
}

.sales-mode .totals div:nth-child(2) {
  display: none;
}

.sales-mode .product-photo {
  display: flex;
}

.sales-mode .product-card,
.sales-mode .history-card,
.sales-mode .cart-line {
  border-radius: 10px;
}

.sales-mode .primary-button,
.sales-mode .ghost-button {
  border-radius: 10px;
}

.sales-mode #saveOrderButton {
  min-height: 54px;
  font-size: 17px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.2fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 18px clamp(16px, 3vw, 36px) 34px;
}

.panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.catalog-panel,
.order-panel,
.history-panel,
.admin-panel {
  padding: 20px;
}

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

.catalog-panel .panel-heading {
  align-items: center;
}

.primary-button,
.ghost-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 750;
}

.primary-button {
  background: linear-gradient(180deg, #ffd958 0%, var(--accent) 100%);
  color: #241c0f;
  box-shadow: 0 10px 22px rgba(242, 194, 48, 0.27);
}

.primary-button:hover {
  background: var(--accent-strong);
}

.ghost-button {
  background: #fffdf7;
  border-color: var(--line);
  color: var(--ink);
}

.ghost-button:hover,
.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-pale);
}

.icon-button {
  width: 42px;
  flex: 0 0 42px;
  padding: 0;
  background: #fff;
  border-color: var(--line);
  font-size: 22px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.search-row {
  margin-bottom: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

select {
  appearance: auto;
  min-height: 46px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 194, 48, 0.2);
}

.catalog-list,
.history-list,
.cart-list {
  display: grid;
  gap: 10px;
}

.product-card,
.history-card,
.cart-line {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.product-card {
  display: grid;
  gap: 12px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.product-card:hover {
  box-shadow: 0 12px 26px rgba(124, 45, 18, 0.12);
  transform: translateY(-1px);
}

.product-photo,
.product-photo-large {
  align-items: center;
  background: #fff3e4;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 750;
  justify-content: center;
  overflow: hidden;
}

.product-photo {
  aspect-ratio: 16 / 8.5;
}

.product-photo-large {
  aspect-ratio: 16 / 10;
}

.product-photo img,
.product-photo-large img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.product-top,
.history-top,
.cart-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-card h3,
.history-card h3 {
  margin: 0;
  font-size: 16px;
}

.product-card p,
.history-card p,
.empty-state {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.price {
  color: var(--accent-strong);
  font-weight: 850;
  white-space: nowrap;
}

.stock-warning {
  color: var(--warn) !important;
  font-weight: 800;
}

.tag {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.product-actions button,
.line-actions button {
  min-height: 36px;
  padding: 0 12px;
}

.customer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

label {
  color: var(--ink);
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
}

label span {
  color: var(--muted);
  font-weight: 600;
}

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

.payment-select-field select {
  font-size: 16px;
  font-weight: 800;
}

.payment-choice-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: -4px;
}

.payment-choice {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  min-height: 48px;
  padding: 0 8px;
}

.payment-choice-active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 22px rgba(242, 194, 48, 0.25);
  color: #1f1a0d;
}

.customer-insight {
  align-items: center;
  background: #fff8df;
  border: 1px solid #f0d681;
  border-radius: 10px;
  color: var(--ink);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.customer-insight strong,
.customer-insight span {
  display: block;
}

.customer-insight strong {
  font-size: 14px;
}

.customer-insight span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.cart-line {
  align-items: center;
}

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

.line-main strong {
  display: block;
}

.quantity-control {
  display: inline-grid;
  grid-template-columns: 34px 42px 34px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.quantity-control button {
  min-height: 34px;
  border: 0;
  background: var(--accent-pale);
  font-weight: 850;
}

.quantity-control span {
  text-align: center;
  font-weight: 800;
}

.totals {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.totals strong {
  color: var(--ink);
}

.grand-total {
  font-size: 21px;
  color: var(--ink) !important;
}

.order-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.printer-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

#printerStatus {
  background: var(--warn-soft);
  border-radius: 999px;
  color: var(--warn);
  font-size: 13px;
  font-weight: 750;
  min-height: 30px;
  padding: 6px 12px;
}

#printerStatus.connected {
  background: #dcfce7;
  color: #166534;
}

.logo-preview {
  align-items: center;
  background: #fffaf5;
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  min-height: 110px;
  padding: 12px;
}

.logo-preview img {
  max-height: 96px;
  max-width: 180px;
  object-fit: contain;
}

.pos-header {
  align-items: center;
  background:
    radial-gradient(circle at 58% -90%, rgba(255, 255, 255, 0.7) 0 34%, transparent 35%),
    linear-gradient(180deg, #ffdc5d 0%, #f4bd22 100%);
  box-shadow: 0 10px 28px rgba(155, 106, 0, 0.22);
  color: var(--ink);
  display: grid;
  grid-template-columns: 56px 1fr auto;
  min-height: 68px;
  padding: 0 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.pos-icon-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  display: flex;
  font-size: 28px;
  height: 48px;
  justify-content: center;
  padding: 0;
  width: 48px;
}

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

.language-toggle {
  align-items: center;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(185, 133, 0, 0.18);
  border-radius: 999px;
  color: rgba(36, 28, 15, 0.58);
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  white-space: nowrap;
}

.language-toggle-button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: rgba(36, 28, 15, 0.58);
  font-size: inherit;
  font-weight: inherit;
  min-height: 28px;
  padding: 0 4px;
}

.language-toggle-button-active {
  color: var(--ink);
}

.ticket-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  min-width: 0;
}

.ticket-title strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}

.ticket-title span {
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(122, 86, 0, 0.16);
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 18px;
  font-weight: 850;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0 8px;
}

.pos-workspace {
  margin: 0 auto;
  max-width: 820px;
  min-height: calc(100vh - 64px);
  padding: 22px 18px 36px;
}

.pos-event-strip {
  align-items: end;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 0.45fr) minmax(240px, 1fr) auto;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.pos-event-strip label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 850;
  gap: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pos-event-strip select {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
  min-height: 48px;
  min-width: 0;
  padding: 0 12px;
}

.pos-event-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  max-width: 220px;
  overflow: hidden;
  padding-bottom: 13px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.charge-button {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, transparent 38%),
    linear-gradient(180deg, #ffd84c 0%, #f0b414 100%);
  border: 0;
  border-radius: 20px;
  box-shadow: 0 16px 34px rgba(184, 126, 0, 0.22);
  color: #fff8df;
  display: block;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.35;
  min-height: 96px;
  padding: 18px;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
}

.charge-button span {
  color: #fff;
  font-size: 22px;
}

.charge-button:active,
.pos-product-card:active {
  transform: scale(0.99);
}

.catalog-panel {
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  margin-top: 22px;
  overflow: hidden;
  padding: 0;
}

.catalog-toolbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 38%);
}

.catalog-toolbar select,
.catalog-toolbar input {
  border: 0;
  border-radius: 0;
  min-height: 64px;
}

.catalog-toolbar select {
  border-right: 1px solid var(--line);
  font-size: 19px;
}

.catalog-toolbar input {
  font-size: 17px;
}

.catalog-toolbar input:focus,
.catalog-toolbar select:focus {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.category-tabs {
  background: #fffaf0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  min-height: 36px;
  padding: 0 14px;
}

.category-tab-active {
  background: linear-gradient(180deg, #ffdc62 0%, var(--accent) 100%);
  border-color: var(--accent);
  color: #1f1a10;
  box-shadow: 0 8px 18px rgba(202, 146, 0, 0.18);
}

.catalog-list {
  background: linear-gradient(180deg, rgba(255, 252, 241, 0.85), rgba(255, 250, 235, 0.52));
  gap: 0;
  padding: 12px;
}

.pos-product-lanes {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pos-product-lane {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 218, 72, 0.12), transparent 44%),
    rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(231, 195, 93, 0.78);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(123, 86, 0, 0.055);
  display: grid;
  gap: 8px;
  overflow: hidden;
}

.pos-product-lane-head {
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 247, 214, 0.96), rgba(255, 252, 243, 0.88));
  border-bottom: 1px solid rgba(231, 195, 93, 0.66);
  display: flex;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 14px;
}

.pos-product-lane-head span {
  color: #9a760f;
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pos-product-lane-head strong {
  color: #241a10;
  display: block;
  font-size: 18px;
  line-height: 1.15;
  margin-top: 2px;
}

.pos-product-lane-head b {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(230, 195, 91, 0.78);
  border-radius: 999px;
  color: #b37a00;
  display: inline-flex;
  font-size: 14px;
  font-weight: 950;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0 10px;
}

.pos-product-lane-list {
  display: grid;
  gap: 0;
}

.pos-product-card {
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: 62px minmax(0, 1fr);
  min-height: 82px;
  padding: 12px 20px 12px 14px;
}

.pos-product-card:hover {
  background: #fffaf0;
  box-shadow: inset 4px 0 0 var(--accent);
  transform: none;
}

.pos-product-card .product-photo {
  aspect-ratio: 1;
  background: #f6efd9;
  border: 0;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(187, 133, 0, 0.08);
  display: flex !important;
  height: 52px;
  position: relative;
  width: 52px;
}

.pos-product-card .product-photo img {
  object-fit: cover;
}

.pos-product-card .product-top {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.pos-product-card h3 {
  font-size: 20px;
  font-weight: 760;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-product-meta {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-top: 5px;
}

.pos-product-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.product-qty-badge {
  align-items: center;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 999px;
  bottom: -2px;
  color: #1f1a10;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 6px;
  position: absolute;
  right: -4px;
}

.pos-product-card p,
.pos-product-card .tag,
.pos-product-actions .primary-button {
  display: none;
}

.pos-product-card .price {
  color: #3d2f14;
  font-size: 20px;
  font-weight: 820;
}

.pos-product-actions {
  justify-content: flex-end;
}

.pos-product-actions .ghost-button {
  min-height: 34px;
  padding: 0 10px;
}

.pos-product-actions .compact-button {
  min-width: 56px;
}

.pos-product-actions .danger-button {
  color: #a23b12;
}

.pos-product-lane .pos-product-card {
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(233, 201, 111, 0.58);
  min-height: 88px;
  padding: 12px 14px;
}

.pos-product-lane .pos-product-card:last-child {
  border-bottom: 0;
}

.pos-product-lane .pos-product-card:hover {
  background: #fff9e8;
  box-shadow: inset 4px 0 0 var(--accent);
}

.pos-product-lane .pos-product-actions {
  grid-column: 2;
  justify-content: flex-start;
}

.product-card.sold-out {
  opacity: 0.5;
}

.menu-backdrop {
  background: rgba(34, 29, 18, 0.42);
  backdrop-filter: blur(2px);
  inset: 0;
  position: fixed;
  z-index: 20;
}

.side-menu {
  background: #fffdfa;
  box-sizing: border-box;
  box-shadow: 12px 0 32px rgba(34, 29, 18, 0.22);
  display: grid;
  grid-auto-rows: max-content;
  height: 100vh;
  left: 0;
  max-width: min(88vw, 380px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  position: fixed;
  top: 0;
  width: 360px;
  z-index: 30;
}

.side-menu *,
.side-menu *::before,
.side-menu *::after {
  box-sizing: border-box;
}

.side-menu > * {
  max-width: 100%;
  min-width: 0;
}

.side-menu-brand {
  background:
    radial-gradient(circle at 88% -18%, rgba(255, 255, 255, 0.35) 0 40%, transparent 41%),
    linear-gradient(135deg, #ffdf63 0%, #e8ad17 100%);
  color: #fffaf0;
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 28px 22px 22px;
  position: relative;
}

.side-menu-brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.side-menu-brand span {
  font-size: 17px;
  line-height: 1.2;
}

.menu-close-button {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 20px;
  height: 34px;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 34px;
}

.menu-nav {
  display: grid;
  gap: 2px;
  padding: 16px 10px 14px;
}

.menu-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  display: grid;
  font-size: 17px;
  font-weight: 750;
  gap: 18px;
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 56px;
  padding: 0 14px;
  text-align: left;
  width: 100%;
}

.menu-sales-panel input,
.menu-settings-panel input,
.menu-settings-panel select {
  min-width: 0;
  width: 100%;
}

.menu-item:hover,
.menu-item-active {
  background: #fff4c7;
  color: var(--accent-strong);
}

.menu-item-active {
  box-shadow: inset 4px 0 0 var(--accent);
}

.menu-item-muted {
  color: #8a8170;
  opacity: 0.72;
}

.menu-icon {
  color: #777;
  display: inline-grid;
  height: 28px;
  place-items: center;
  position: relative;
  width: 28px;
}

.menu-item-active .menu-icon {
  color: var(--accent-strong);
}

.icon-sales::before {
  border: 3px solid currentColor;
  border-radius: 3px;
  content: "";
  height: 15px;
  width: 18px;
}

.icon-sales::after {
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  content: "";
  height: 8px;
  left: 8px;
  position: absolute;
  top: 2px;
  width: 10px;
}

.icon-receipts::before {
  border: 3px solid currentColor;
  content: "";
  height: 22px;
  width: 18px;
}

.icon-receipts::after {
  box-shadow:
    0 0 0 1px currentColor,
    0 6px 0 1px currentColor,
    0 12px 0 1px currentColor;
  content: "";
  height: 0;
  position: absolute;
  width: 12px;
}

.icon-crm::before {
  border: 3px solid currentColor;
  border-radius: 999px;
  content: "";
  height: 10px;
  position: absolute;
  top: 2px;
  width: 10px;
}

.icon-crm::after {
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  content: "";
  height: 12px;
  position: absolute;
  top: 14px;
  width: 22px;
}

.icon-items::before {
  box-shadow:
    0 0 0 2px currentColor,
    0 8px 0 2px currentColor,
    0 16px 0 2px currentColor;
  content: "";
  height: 0;
  left: 9px;
  position: absolute;
  width: 17px;
}

.icon-items::after {
  box-shadow:
    0 0 0 2px currentColor,
    0 8px 0 2px currentColor,
    0 16px 0 2px currentColor;
  content: "";
  height: 0;
  left: 2px;
  position: absolute;
  width: 2px;
}

.icon-reports::before {
  border-bottom: 3px solid currentColor;
  border-left: 3px solid currentColor;
  content: "";
  height: 22px;
  width: 24px;
}

.icon-reports::after {
  background: currentColor;
  box-shadow:
    7px -6px 0 currentColor,
    14px -13px 0 currentColor;
  content: "";
  height: 8px;
  left: 7px;
  position: absolute;
  top: 15px;
  width: 4px;
}

.icon-settings::before {
  border: 5px solid currentColor;
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.icon-settings::after {
  border-bottom: 4px solid currentColor;
  border-top: 4px solid currentColor;
  content: "";
  height: 20px;
  left: 10px;
  position: absolute;
  top: 4px;
  transform: rotate(45deg);
  width: 8px;
}

.icon-printer::before {
  border: 3px solid currentColor;
  border-radius: 3px;
  content: "";
  height: 14px;
  position: absolute;
  top: 9px;
  width: 22px;
}

.icon-printer::after {
  border: 3px solid currentColor;
  border-bottom: 0;
  content: "";
  height: 9px;
  position: absolute;
  top: 2px;
  width: 15px;
}

.icon-logout::before {
  border: 3px solid currentColor;
  border-radius: 3px;
  content: "";
  height: 20px;
  width: 16px;
}

.icon-logout::after {
  border-right: 3px solid currentColor;
  border-top: 3px solid currentColor;
  content: "";
  height: 9px;
  position: absolute;
  right: 2px;
  top: 8px;
  transform: rotate(45deg);
  width: 9px;
}

.menu-status-line {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin: -8px 22px 8px 70px;
}

.menu-settings-panel,
.menu-manager-tools,
.settings-action-row {
  display: grid;
  gap: 11px;
}

.menu-sales-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 13px;
  min-width: 0;
  overflow: hidden;
  padding: 16px 20px 20px;
}

.menu-sales-panel > *,
.menu-sales-panel label,
.menu-sales-panel input,
.menu-sales-panel button {
  max-width: 100%;
  min-width: 0;
}

.side-menu .sales-date-grid {
  grid-template-columns: 1fr;
}

.side-menu .sales-quick-actions,
.side-menu .sales-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sales-panel-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.sales-panel-heading h2 {
  font-size: 20px;
  margin: 0;
}

.sales-date-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.sales-quick-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.admin-filter-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 0.55fr 0.55fr 0.9fr 1.35fr 0.95fr;
}

.online-filter-grid,
.online-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.online-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.online-orders-panel {
  display: grid;
  gap: 16px;
}

.sales-filter-bar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 420px) minmax(190px, auto);
  margin-bottom: 14px;
}

.sales-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.admin-sales-panel {
  display: grid;
  gap: 18px;
}

.fair-overview-hero {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(255, 239, 167, 0.95) 0%, rgba(255, 251, 239, 0.98) 48%, #ffffff 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  padding: 24px;
  box-shadow: 0 18px 46px rgba(142, 99, 0, 0.1);
}

.fair-overview-hero strong {
  color: var(--ink);
  display: block;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.05;
}

.fair-overview-hero p {
  color: var(--muted);
  font-weight: 800;
  margin: 10px 0 0;
}

.overview-label {
  color: var(--accent-dark);
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.overview-meta-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-meta-grid span {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(214, 167, 44, 0.45);
  border-radius: 12px;
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  padding: 12px;
  min-height: 70px;
}

.overview-meta-grid strong {
  font-size: 16px;
  line-height: 1.15;
}

.owner-reminder-card {
  display: grid;
  gap: 12px;
}

.owner-reminders {
  background: #fff;
  border: 1px solid rgba(214, 167, 44, 0.58);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(202, 146, 0, 0.08);
  display: grid;
  gap: 8px;
  padding: 14px;
}

.owner-reminders h3 {
  color: var(--accent-dark);
  font-size: 13px;
  letter-spacing: 0.08em;
  margin: 0 0 2px;
  text-transform: uppercase;
}

.owner-reminders p {
  align-items: center;
  background: #fff9e9;
  border: 1px solid rgba(214, 167, 44, 0.32);
  border-radius: 10px;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 850;
  gap: 8px;
  margin: 0;
  padding: 9px 10px;
}

.owner-reminders p::before {
  background: var(--accent);
  border-radius: 999px;
  content: "";
  flex: 0 0 8px;
  height: 8px;
  width: 8px;
}

.admin-sales-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fair-kpi-grid div {
  align-items: center;
  background: #ffffff;
  border-color: rgba(214, 167, 44, 0.58);
  display: grid;
  grid-template-columns: 62px 1fr;
  grid-template-rows: auto auto auto;
  box-shadow: 0 12px 30px rgba(202, 146, 0, 0.08);
  min-height: 118px;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.report-kpi::before {
  align-items: center;
  align-self: start;
  background: radial-gradient(circle at 30% 20%, #fff8dc 0%, #ffe28a 100%);
  border-radius: 999px;
  color: var(--accent-dark);
  content: "$";
  display: flex;
  font-size: 25px;
  font-weight: 950;
  grid-row: 1 / 4;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.kpi-orders::before {
  content: "▣";
}

.kpi-products::before {
  content: "□";
}

.kpi-commission::before {
  content: "%";
}

.fair-kpi-grid strong {
  font-size: 30px;
  letter-spacing: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.fair-kpi-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-sales-breakdown {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.fair-overview-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.overview-section {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.overview-section-heading {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.overview-section-heading h3 {
  font-size: 23px;
  margin: 2px 0 0;
}

.daily-sales-list,
.product-overview-list,
.salesperson-overview-list,
.closing-overview-list,
.product-detail-list {
  display: grid;
  gap: 10px;
}

.daily-sales-row,
.product-detail-list article,
.salesperson-row,
.closing-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(234, 214, 141, 0.8);
  border-radius: 13px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.72fr) minmax(160px, 1fr) auto;
  padding: 13px 14px;
}

.product-detail-list article,
.salesperson-row,
.closing-row {
  grid-template-columns: 1fr auto;
}

.product-detail-list .product-detail-row {
  grid-template-columns: 46px 1fr auto;
}

.product-mini-photo {
  align-items: center;
  background: #fff4d6;
  border-radius: 12px;
  color: var(--muted);
  display: flex;
  font-size: 10px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  overflow: hidden;
  width: 42px;
}

.product-mini-photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.daily-sales-row strong,
.product-detail-list strong,
.salesperson-row strong,
.closing-row strong {
  color: var(--ink);
  font-size: 16px;
}

.daily-sales-row span,
.product-detail-list span,
.salesperson-row span,
.closing-row span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.daily-sales-bar {
  background: rgba(214, 167, 44, 0.13);
  border-radius: 999px;
  height: 13px;
  overflow: hidden;
}

.daily-sales-bar span {
  background: linear-gradient(90deg, #f4aa00 0%, #ffd74a 100%);
  border-radius: inherit;
  display: block;
  height: 100%;
  margin: 0;
}

.major-product-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.major-product-grid div {
  background: linear-gradient(180deg, #fff7d8 0%, #ffffff 100%);
  border: 1px solid rgba(214, 167, 44, 0.58);
  border-radius: 14px;
  display: grid;
  gap: 6px;
  min-height: 100px;
  padding: 14px;
}

.major-product-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.major-product-grid strong,
.product-detail-list b,
.salesperson-row b,
.closing-row b {
  color: var(--ink);
  font-size: 18px;
}

.major-product-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.payment-overview-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-overview-list .payment-row {
  min-height: 68px;
  padding-left: 48px;
  position: relative;
}

.payment-overview-list .payment-row::before {
  align-items: center;
  background: #fff2bc;
  border-radius: 12px;
  color: var(--accent-dark);
  content: "$";
  display: flex;
  font-size: 17px;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  left: 12px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
}

.payment-overview-list .payment-card::before {
  content: "▭";
}

.payment-overview-list .payment-ewallet::before {
  content: "▤";
}

.payment-overview-list .payment-bank::before {
  content: "⌂";
}

.payment-overview-list .payment-unpaid::before {
  color: #d3483d;
  content: "!";
}

.closing-row-done {
  background: #f5ffe8;
  border-color: #cfe7a3;
}

.closing-overview-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.closing-row {
  min-height: 82px;
}

.sales-summary-grid div,
.sales-breakdown div {
  background: #fffaf0;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 11px;
}

.sales-summary-grid span,
.sales-breakdown span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sales-summary-grid strong,
.sales-breakdown strong {
  color: var(--ink);
  font-size: 17px;
}

.sales-breakdown {
  display: grid;
  gap: 8px;
}

.sales-breakdown div {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.sales-target-progress {
  display: grid;
  gap: 10px;
}

.sales-target-card {
  background: linear-gradient(180deg, #fffdf6 0%, #fff8df 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  padding: 13px;
}

.sales-target-card-met {
  background: linear-gradient(180deg, #f7ffe9 0%, #ffffff 100%);
  border-color: #cfe7a3;
}

.sales-target-card strong {
  color: var(--ink);
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.sales-target-card small,
.sales-target-label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-top: 4px;
}

.sales-target-label {
  color: var(--accent-dark);
  letter-spacing: 0.08em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.sales-target-numbers {
  display: grid;
  gap: 6px;
}

.sales-target-numbers span {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  font-weight: 850;
  justify-content: space-between;
}

.sales-target-numbers b {
  color: var(--ink);
  font-size: 14px;
  text-align: right;
}

.sales-target-track {
  background: #fff1b9;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.sales-target-track i {
  background: linear-gradient(90deg, #f6bd18 0%, #d09300 100%);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.sales-target-card-met .sales-target-track i {
  background: linear-gradient(90deg, #69b84f 0%, #238b45 100%);
}

.sales-target-orders {
  display: grid;
  gap: 8px;
}

.menu-settings-panel {
  border-top: 1px solid var(--line);
  padding: 16px 20px 20px;
}

.menu-manager-tools {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 14px;
}

.menu-manager-tools strong {
  color: var(--muted);
  font-size: 13px;
}

.logout-menu-button {
  margin-top: 4px;
}

.side-menu #printerStatus {
  width: fit-content;
}

.history-panel {
  border-top: 1px solid var(--line);
  box-shadow: none;
  margin-top: 0;
  padding: 16px 20px 20px;
}

.side-menu .stats-grid {
  grid-template-columns: 1fr;
}

.side-menu .history-card {
  border-radius: 10px;
}

.history-close-button {
  align-items: center;
  background: #fff8df;
  border: 1px solid #f0dfac;
  border-radius: 999px;
  color: #7a5b06;
  cursor: pointer;
  display: none;
  font-size: 26px;
  font-weight: 850;
  height: 46px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 46px;
}

.menu-version {
  align-self: end;
  color: #aaa;
  display: block;
  font-size: 16px;
  margin-top: auto;
  padding: 18px 22px;
}

.checkout-dialog {
  border-radius: 18px 18px 0 0;
  margin: auto auto 0;
  max-height: 92vh;
  max-width: 760px;
  overflow: auto;
  width: min(760px, 100vw);
}

.checkout-dialog .order-panel {
  border: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: none;
}

.checkout-heading-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.checkout-close-button {
  align-items: center;
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 30px;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  line-height: 1;
  width: 58px;
}

.checkout-close-button:active {
  transform: translateY(1px);
}

.checkout-edit-tools {
  background: #fff9e9;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 14px 0;
  padding: 14px;
}

.checkout-edit-tools-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.checkout-edit-tools-head h3 {
  font-size: 22px;
  margin: 2px 0 0;
}

.checkout-edit-tools-head span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.checkout-edit-tools input {
  margin-bottom: 10px;
  min-height: 52px;
  width: 100%;
}

.checkout-product-picker {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.checkout-product-option {
  align-items: center;
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
  text-align: left;
}

.checkout-product-option strong,
.checkout-product-option small {
  display: block;
}

.checkout-product-option small {
  color: var(--muted);
  font-weight: 800;
  margin-top: 3px;
}

.checkout-product-option b {
  align-items: center;
  background: var(--brand);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
}

.checkout-dialog .order-actions {
  background: transparent;
  margin: 16px 0 0;
  padding: 0;
  position: static;
}

.checkout-dialog .order-actions button {
  flex: 1 1 150px;
}

.admin-view {
  background: var(--paper);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stats-grid div,
.admin-stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #fffdf7 0%, #fff7dc 100%);
}

.stats-grid span,
.admin-stat span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.stats-grid strong,
.admin-stat strong {
  font-size: 18px;
}

.history-card {
  display: grid;
  gap: 10px;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.warning-pill {
  background: var(--warn-soft);
  color: var(--warn);
}

dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: min(520px, calc(100vw - 28px));
  box-shadow: 0 26px 70px rgba(25, 33, 36, 0.24);
}

dialog::backdrop {
  background: rgba(25, 33, 36, 0.32);
  backdrop-filter: blur(2px);
}

.fair-native-select {
  display: none;
}

.fair-picker-trigger {
  align-items: center;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 950;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
  text-align: left;
  width: 100%;
}

.fair-picker-trigger:hover,
.fair-picker-trigger:focus-visible {
  box-shadow: 0 0 0 5px rgba(248, 198, 40, 0.18);
  outline: none;
}

.fair-picker-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fair-picker-dialog {
  border-radius: 24px;
  max-width: min(920px, calc(100vw - 28px));
  overflow: hidden;
  width: 920px;
}

.fair-picker-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(80, 53, 0, 0.24);
  max-height: min(760px, calc(100vh - 30px));
  overflow: auto;
}

.fair-picker-head {
  align-items: center;
  background: linear-gradient(135deg, #ffda51 0%, #f5b80f 100%);
  display: flex;
  justify-content: space-between;
  padding: 22px 26px;
}

.fair-picker-head h2 {
  font-size: 30px;
  line-height: 1.1;
  margin: 2px 0 0;
}

.fair-picker-search-row {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 18px 20px 12px;
}

.fair-picker-search {
  align-items: center;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  gap: 12px;
  min-height: 58px;
  padding: 0 16px;
}

.fair-picker-search input {
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 18px;
  font-weight: 900;
  min-width: 0;
  outline: 0;
  padding: 0;
  width: 100%;
}

.fair-picker-search span {
  color: var(--accent-strong);
  font-size: 22px;
  font-weight: 950;
}

.fair-picker-chip {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 950;
  padding: 0 18px;
}

.fair-picker-chip-active {
  background: var(--accent);
  color: var(--ink);
}

.fair-picker-list {
  padding: 0 20px 20px;
}

.fair-picker-all-row,
.fair-picker-event {
  background: #fff;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.fair-picker-all-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 4px;
  margin: 6px 0 16px;
  padding: 15px 18px;
}

.fair-picker-all-row span {
  color: var(--muted);
  font-weight: 800;
}

.fair-picker-group {
  margin-top: 16px;
}

.fair-picker-group > p {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  margin: 0 0 9px;
  text-transform: uppercase;
}

.fair-picker-events {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.fair-picker-event {
  align-items: center;
  border-bottom: 1px solid rgba(214, 167, 44, 0.32);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 18px;
}

.fair-picker-event:last-child {
  border-bottom: 0;
}

.fair-picker-event:hover,
.fair-picker-all-row:hover {
  background: #fff8df;
}

.fair-picker-event-active {
  background: linear-gradient(90deg, #fff4bf 0%, #fffdf7 100%);
  box-shadow: inset 5px 0 0 var(--accent);
}

.fair-picker-event strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
}

.fair-picker-event small {
  color: var(--muted);
  display: block;
  font-size: 15px;
  font-weight: 850;
  margin-top: 6px;
}

.fair-picker-event b {
  white-space: nowrap;
}

.dialog-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.import-dialog-card {
  width: min(760px, calc(100vw - 28px));
}

.import-preview {
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.import-preview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.import-preview-grid div {
  background: #fff;
  border: 1px solid #f1dda5;
  border-radius: 12px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
}

.import-preview-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.import-preview-grid strong {
  color: var(--ink);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.import-warning-list {
  color: #8a5b00;
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.import-warning-list:empty {
  display: none;
}

.import-warning-list p {
  background: #fff4d1;
  border-radius: 10px;
  margin: 0;
  padding: 9px 11px;
}

.closing-preview-panel {
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.closing-context-card {
  background: linear-gradient(135deg, #fff8df 0%, #fffdf6 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 10px 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.closing-context-card h3 {
  font-size: 20px;
  line-height: 1.15;
  margin: 2px 0 6px;
}

.closing-context-card span,
.closing-context-card small,
.closing-context-card p {
  color: var(--muted);
  display: block;
  font-weight: 800;
}

.closing-context-card p {
  border-top: 1px solid rgba(214, 167, 44, 0.24);
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 10px;
}

.closing-context-date {
  align-self: start;
  background: #fff;
  border: 1px solid rgba(214, 167, 44, 0.36);
  border-radius: 12px;
  min-width: 150px;
  padding: 10px 12px;
  text-align: right;
}

.closing-context-date strong {
  color: var(--text);
  display: block;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.1;
  margin: 4px 0;
}

.closing-preview-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.closing-preview-heading h3 {
  font-size: 18px;
  margin: 0;
}

.closing-preview-heading > strong,
.closing-preview-heading > span {
  color: var(--accent-strong);
  font-weight: 900;
  white-space: nowrap;
}

.closing-payment-summary,
.cash-count-rows {
  display: grid;
  gap: 8px;
}

.closing-payment-row {
  align-items: center;
  border-top: 1px solid rgba(214, 167, 44, 0.26);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 8px;
}

.closing-payment-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.closing-payment-row span {
  color: var(--muted);
  font-weight: 800;
}

.closing-payment-row strong {
  font-size: 18px;
}

.closing-payment-total {
  background: var(--accent-pale);
  border: 0;
  border-radius: 10px;
  margin-top: 2px;
  padding: 10px 12px;
}

.cash-count-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(86px, 1fr) minmax(76px, 96px) minmax(92px, 1fr);
}

.cash-count-row span,
.cash-count-row strong {
  font-weight: 900;
}

.cash-count-row input {
  min-height: 44px;
  text-align: center;
}

.cash-count-row strong {
  text-align: right;
}

.cash-count-total {
  align-items: center;
  background: #fff8e6;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  font-weight: 900;
  justify-content: space-between;
  padding: 10px 12px;
}

.cash-count-balanced strong {
  color: #15803d;
}

.cash-count-short strong {
  color: #b91c1c;
}

.cash-count-over strong {
  color: #b45309;
}

.receipt-sheet {
  display: none;
}

.admin-view {
  background:
    radial-gradient(circle at 82% -20%, rgba(246, 197, 47, 0.25), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 248, 223, 0.48) 280px);
  padding: 20px clamp(18px, 3vw, 40px) 34px;
}

.admin-mode .pos-workspace {
  display: none;
}

.admin-mode .admin-view {
  min-height: calc(100vh - 72px);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-toolbar h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: 0;
  line-height: 0.98;
}

.admin-tabs {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding: 7px;
  scrollbar-width: thin;
}

.admin-global-filter {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
}

.report-filter-panel {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: none;
}

.report-filter-panel .panel-heading h2 {
  font-size: 18px;
}

.report-range-pill {
  background: #fff1a9;
  color: var(--accent-dark);
}

.admin-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  margin: 6px 0 0;
}

.after-sales-card {
  gap: 8px;
}

.after-sales-card .product-actions {
  margin-top: 4px;
}

.followup-tool {
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px;
}

.followup-tool-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.followup-tool h3 {
  font-size: 20px;
  margin: 0 0 4px;
}

.followup-tool p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  margin: 0;
}

.followup-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.followup-summary span {
  background: var(--gold-soft);
  border-radius: 999px;
  color: var(--gold-deep);
  font-size: 13px;
  font-weight: 850;
  padding: 8px 12px;
  white-space: nowrap;
}

.followup-template-label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 850;
}

.followup-template-label textarea {
  min-height: 130px;
  resize: vertical;
}

.followup-customer-card .ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 720px) {
  .followup-tool-head {
    display: grid;
  }

  .followup-summary {
    justify-content: flex-start;
  }
}

.admin-product-item {
  gap: 8px;
}

.product-management-heading {
  background: rgba(255, 253, 246, 0.96);
  border-bottom: 1px solid var(--line);
  margin: -18px -18px 18px;
  padding: 18px;
  position: sticky;
  top: 0;
  z-index: 8;
}

.product-management-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.product-management-actions button {
  min-height: 44px;
  white-space: nowrap;
}

.product-management-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-product-item .inline-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-arrange-list {
  user-select: none;
}

.product-arrange-item {
  cursor: grab;
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.product-arrange-item:active {
  cursor: grabbing;
}

.product-arrange-item.product-dragging {
  box-shadow: 0 16px 34px rgba(167, 120, 0, 0.18);
  opacity: 0.78;
  transform: scale(0.99);
}

.management-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.product-title-row {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.product-drag-handle {
  align-items: center;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.management-card-head strong {
  min-width: 0;
}

.management-card-actions {
  flex: 0 0 auto;
}

.product-arrange-controls {
  gap: 8px;
}

.management-card-meta {
  line-height: 1.45;
}

.management-chip {
  align-items: center;
  background: #fff7d7;
  border: 1px solid #f0dfac;
  border-radius: 999px;
  color: #7a5b06;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  min-height: 30px;
  padding: 4px 10px;
}

.admin-tab {
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-weight: 800;
  padding: 10px 14px;
  white-space: nowrap;
}

.admin-tab-active {
  background: linear-gradient(180deg, #ffdc62 0%, var(--accent) 100%);
  box-shadow: 0 8px 18px rgba(202, 146, 0, 0.18);
  color: var(--ink);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.admin-panel[hidden],
.admin-stats[hidden] {
  display: none !important;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

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

.ranking-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(142, 99, 0, 0.06);
}

.ranking-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.crm-panel {
  grid-column: 1 / -1;
}

.crm-panel .panel-heading {
  align-items: center;
}

.crm-panel .panel-heading input {
  max-width: 280px;
}

.crm-card {
  background: linear-gradient(180deg, #fffaf5 0%, #ffffff 100%);
}

.crm-clickable-card,
.location-clickable-row,
.dashboard-clickable,
.salesperson-clickable-row {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.crm-clickable-card:hover,
.location-clickable-row:hover,
.dashboard-clickable:hover,
.salesperson-clickable-row:hover {
  border-color: #d9a600;
  box-shadow: 0 12px 28px rgba(184, 126, 0, 0.14);
  transform: translateY(-1px);
}

.crm-clickable-card:focus-visible,
.location-clickable-row:focus-visible,
.dashboard-clickable:focus-visible,
.salesperson-clickable-row:focus-visible {
  outline: 3px solid rgba(255, 204, 45, 0.45);
  outline-offset: 3px;
}

.commission-card-hint {
  color: #b77c00;
  font-weight: 800;
}

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

.checkbox-stack strong {
  font-size: 13px;
}

.check-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  gap: 9px;
  padding: 10px 12px;
}

.check-row input {
  width: auto;
}

/* Fair report dashboard redesign */
.admin-mode .pos-header {
  box-shadow: 0 1px 0 rgba(218, 161, 20, 0.32);
}

@media (min-width: 981px) {
  .admin-mode .pos-header {
    background: #fff;
    grid-template-columns: 56px minmax(260px, auto) 1fr auto;
    min-height: 72px;
    padding: 0 24px;
  }

  .admin-mode .pos-header::before {
    background: url("assets/wing-foong-logo.png") left center / 64px 64px no-repeat;
    color: #21170c;
    content: "FairFlow POS\a Wing Foong Bazhen";
    display: block;
    font-size: 13px;
    font-weight: 850;
    grid-column: 2;
    grid-row: 1;
    line-height: 1.2;
    min-height: 66px;
    padding: 17px 0 0 78px;
    white-space: pre;
  }

  .admin-mode .ticket-title {
    display: none;
  }

  .admin-mode #menuButton {
    background: #fff8dc;
    border: 1px solid #f2d57a;
    display: flex;
    grid-column: 1;
    grid-row: 1;
  }

  .admin-mode .pos-header-actions {
    grid-column: 4;
    justify-self: end;
  }

  .admin-mode #moreMenuButton {
    display: none;
  }
}
}

.admin-view {
  background: #fff;
  color: #21170c;
  padding: 22px clamp(18px, 2vw, 34px) 32px;
}

.admin-mode .admin-view {
  min-height: calc(100vh - 68px);
}

.admin-toolbar {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(420px, 1fr) auto;
  margin-bottom: 18px;
}

.admin-toolbar h2 {
  color: #21170c;
  font-size: clamp(34px, 3.1vw, 46px);
  font-weight: 950;
  line-height: 1;
}

.admin-fair-strip {
  align-items: center;
  display: flex;
  gap: 20px;
  min-width: 0;
}

.admin-fair-select {
  align-items: center;
  background: #fff;
  border: 1px solid #ecc96a;
  border-radius: 10px;
  display: inline-flex;
  gap: 18px;
  min-height: 44px;
  min-width: 260px;
  padding: 0 16px;
}

.admin-fair-select strong {
  font-size: 18px;
  line-height: 1.1;
}

.admin-fair-select span {
  color: #5f4d2d;
  font-size: 18px;
  margin-left: auto;
}

.admin-fair-date {
  color: #4f4129;
  font-size: 16px;
  font-weight: 750;
  white-space: nowrap;
}

.fair-status-pill {
  background: #eff9df;
  border: 1px solid #bfd98c;
  color: #258333;
  font-size: 13px;
  min-height: 30px;
}

.export-report-button::before {
  content: "⇩";
  font-size: 18px;
  line-height: 1;
}

.admin-tabs {
  background: #fff;
  border: 1px solid #ecd27f;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  gap: 12px;
  margin: -6px calc(clamp(18px, 2vw, 34px) * -1) 18px;
  padding: 8px clamp(18px, 2vw, 34px);
}

.admin-tab {
  border-radius: 9px;
  font-size: 15px;
  font-weight: 850;
  min-height: 42px;
  padding: 0 18px;
}

.admin-tab-active {
  background: linear-gradient(180deg, #ffdc5b, #f6bf1f);
  color: #21170c;
}

.report-filter-panel {
  background: #fff;
  border: 1px solid #ecd27f;
  border-radius: 12px;
  box-shadow: none;
  margin-bottom: 18px;
  padding: 14px;
}

.report-filter-panel .panel-heading {
  display: none;
}

.admin-filter-toggle {
  display: none;
}

.admin-filter-grid {
  grid-template-columns: 0.55fr 0.55fr 0.9fr 1.35fr 0.95fr;
}

.report-filter-panel label,
.sales-filter-bar label {
  color: #46391f;
  font-size: 12px;
  font-weight: 750;
}

.report-filter-panel select,
.report-filter-panel input {
  border-color: #e9c96c;
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 12px;
}

.sales-filter-bar {
  grid-template-columns: minmax(340px, 0.9fr) 1fr;
  margin: 2px 0 0;
}

.sales-date-grid {
  gap: 12px;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.sales-quick-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
}

.sales-quick-actions button {
  border-radius: 8px;
  min-height: 38px;
}

.sales-quick-actions .admin-period-active,
.ghost-button.admin-period-active {
  background: linear-gradient(180deg, #ffdc62 0%, var(--accent) 100%);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(202, 146, 0, 0.16);
  color: var(--ink);
}

.admin-event-date-picker {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-event-date-picker > div {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 750;
  gap: 2px;
  margin-right: 4px;
}

.admin-event-date-picker strong {
  color: var(--ink);
  font-size: 14px;
}

.event-date-chip {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  min-height: 34px;
  padding: 0 12px;
}

.event-date-chip-active {
  background: linear-gradient(180deg, #ffdc62 0%, var(--accent) 100%);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(202, 146, 0, 0.16);
}

.admin-panel[data-admin-panel="overview"] {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.settlement-panel {
  display: grid;
  gap: 18px;
}

.settlement-date-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settlement-date-actions label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
  min-width: 190px;
}

.settlement-period-summary {
  background: linear-gradient(135deg, var(--accent-pale) 0%, #fff 100%);
  border: 1px solid #ecd27f;
  border-radius: 14px;
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 10px 14px;
}

.settlement-period-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settlement-period-summary strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.settlement-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settlement-card {
  background: linear-gradient(135deg, #fff 0%, #fffaf0 100%);
  border: 1px solid #ecd27f;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(156, 102, 0, 0.055);
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.settlement-card:hover,
.settlement-fair-row:hover {
  border-color: var(--accent);
  box-shadow: 0 16px 30px rgba(202, 146, 0, 0.14);
  transform: translateY(-1px);
}

.settlement-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.settlement-card strong {
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.settlement-card small {
  color: var(--muted);
  font-weight: 800;
}

.settlement-card-ewallet {
  background: linear-gradient(135deg, #fff4cf 0%, #fff 100%);
  border-color: #e6b21f;
}

.settlement-fair-list {
  display: grid;
  gap: 12px;
}

.settlement-fair-row {
  background: #fff;
  border: 1px solid #ecd27f;
  border-radius: 16px;
  cursor: pointer;
  display: grid;
  gap: 12px;
  padding: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.settlement-fair-main {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
}

.settlement-fair-main strong,
.settlement-fair-main b {
  color: var(--ink);
  font-size: clamp(20px, 1.5vw, 28px);
  line-height: 1.1;
}

.settlement-fair-main small,
.settlement-fair-meta {
  color: var(--muted);
  font-weight: 800;
}

.settlement-fair-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.settlement-fair-meta span {
  background: #fff8dd;
  border-radius: 999px;
  padding: 5px 10px;
}

.settlement-closed {
  color: #15803d;
}

.settlement-open {
  color: #b77900;
}

.settlement-payment-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settlement-payment-strip span {
  background: #fffdf7;
  border: 1px solid #f1db91;
  border-radius: 12px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
}

.settlement-payment-strip small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settlement-payment-strip b {
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.settlement-closing-button {
  justify-self: end;
}

@media (max-width: 760px) {
  .settlement-date-actions,
  .settlement-period-summary,
  .settlement-date-actions label {
    width: 100%;
  }

  .settlement-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settlement-card {
    padding: 13px;
  }

  .settlement-card strong {
    font-size: 22px;
  }

  .settlement-fair-main {
    grid-template-columns: 1fr;
  }

  .settlement-payment-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settlement-closing-button {
    justify-self: stretch;
  }
}

.admin-report-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.fair-kpi-grid {
  gap: 14px;
  grid-column: span 8;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.owner-reminders-panel {
  grid-column: span 4;
}

.daily-section {
  grid-column: span 5;
}

.product-section {
  grid-column: span 7;
}

.payment-section,
.team-section,
.closing-section {
  grid-column: span 4;
}

.overview-section,
.fair-kpi-grid div {
  background: #fff;
  border: 1px solid #ecd27f;
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(156, 102, 0, 0.055);
}

.overview-section {
  gap: 12px;
  padding: 14px;
}

.location-report-panel {
  display: grid;
  gap: 14px;
}

.location-view-toggle {
  align-items: center;
  background: #fff8df;
  border: 1px solid #ecd27f;
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.location-view-button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #766b55;
  font-size: 14px;
  font-weight: 900;
  min-height: 38px;
  padding: 0 14px;
}

.location-view-button-active {
  background: linear-gradient(180deg, #ffdc58 0%, #f6bd18 100%);
  color: #21170c;
  box-shadow: 0 8px 18px rgba(184, 126, 0, 0.18);
}

.location-report-list {
  display: grid;
  gap: 0;
}

.location-report-chart {
  display: grid;
  gap: 12px;
}

.location-report-header,
.location-report-row {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1.45fr) minmax(150px, 1fr) 90px 120px 80px;
  padding: 14px 16px;
}

.location-report-header {
  border-bottom: 1px solid #ecd27f;
  color: #766b55;
  font-size: 13px;
  font-weight: 900;
}

.location-report-row {
  align-items: center;
  border-bottom: 1px solid #f0d98b;
}

.location-report-row:last-child {
  border-bottom: 0;
}

.location-report-row strong,
.location-report-row span {
  color: #21170c;
  font-weight: 900;
}

.location-report-row small,
.location-report-row em {
  color: #766b55;
  display: block;
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
  margin-top: 4px;
}

.location-chart-row {
  align-items: center;
  border: 1px solid #ecd27f;
  border-radius: 16px;
  display: grid;
  gap: 14px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 16px;
}

.insight-drawer-backdrop {
  background: rgba(24, 18, 8, 0.28);
  inset: 0;
  position: fixed;
  z-index: 79;
}

.insight-drawer {
  background: #fffdf7;
  border-left: 1px solid #e8c968;
  box-shadow: -20px 0 54px rgba(84, 56, 0, 0.18);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  max-width: min(680px, 92vw);
  position: fixed;
  right: 0;
  top: 0;
  width: 680px;
  z-index: 80;
}

.insight-drawer-wide {
  border: 1px solid #e8c968;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(84, 56, 0, 0.22);
  height: calc(100vh - 48px);
  left: 50%;
  max-width: min(1320px, calc(100vw - 48px));
  right: auto;
  top: 24px;
  transform: translateX(-50%);
  width: min(1320px, calc(100vw - 48px));
}

.location-detail-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.location-detail-layout > .insight-summary-grid,
.location-products-section,
.location-orders-section {
  grid-column: 1 / -1;
}

.insight-drawer-head {
  align-items: start;
  border-bottom: 1px solid #ecd27f;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 22px 24px;
}

.insight-drawer-head h2 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  margin: 4px 0 6px;
}

.insight-drawer-head span {
  color: #766b55;
  font-weight: 800;
}

.insight-drawer-close {
  align-items: center;
  background: #fffaf0;
  border: 1px solid #e4c35b;
  border-radius: 18px;
  color: #21170c;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 30px;
  font-weight: 950;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.insight-drawer-body {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 18px 24px 28px;
}

.insight-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insight-summary-grid div {
  background: #fff8df;
  border: 1px solid #ecd27f;
  border-radius: 14px;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
}

.insight-summary-grid span,
.insight-customer-profile span {
  color: #766b55;
  font-size: 13px;
  font-weight: 850;
}

.insight-summary-grid strong {
  color: #21170c;
  font-size: 20px;
  font-weight: 950;
  min-width: 0;
  overflow-wrap: anywhere;
}

.insight-section {
  background: #fff;
  border: 1px solid #ecd27f;
  border-radius: 18px;
  display: grid;
  gap: 10px;
  padding: 16px;
}

.insight-section h3 {
  font-size: 20px;
  margin: 0 0 4px;
}

.insight-compact-row,
.insight-order-row {
  align-items: center;
  border-top: 1px solid #f0d98b;
  display: grid;
  gap: 12px;
  padding: 12px 0;
}

.insight-compact-row:first-of-type,
.insight-order-row:first-of-type {
  border-top: 0;
}

.insight-compact-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.insight-compact-row div,
.insight-order-row div,
.insight-customer-profile {
  display: grid;
  gap: 4px;
}

.insight-compact-row span,
.insight-order-row span,
.insight-order-row small {
  color: #766b55;
  font-size: 13px;
  font-weight: 800;
}

.insight-compact-row strong,
.insight-order-row strong,
.insight-compact-row b,
.insight-order-row b {
  color: #21170c;
  font-weight: 950;
}

.insight-order-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(130px, auto);
}

.insight-order-row small {
  overflow-wrap: anywhere;
}

.insight-order-actions {
  display: flex !important;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.insight-order-actions .ghost-button {
  min-height: 38px;
  padding: 0 12px;
}

.insight-target-met {
  background: rgba(40, 142, 75, 0.06);
  border-radius: 12px;
  padding-left: 10px;
  padding-right: 10px;
}

.insight-target-met b {
  color: #187a3a;
}

.insight-target-miss {
  background: rgba(193, 39, 45, 0.06);
  border-radius: 12px;
  padding-left: 10px;
  padding-right: 10px;
}

.insight-target-miss b {
  color: #b3261e;
}

.commission-order-list {
  display: grid;
  gap: 8px;
}

.commission-order-row {
  align-items: start;
  background: #fffdf6;
  border: 1px solid #f0d98b;
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(90px, auto) minmax(90px, auto);
  padding: 12px;
}

.commission-order-row div {
  display: grid;
  gap: 4px;
}

.commission-order-row strong,
.commission-order-row b {
  color: #21170c;
  font-weight: 950;
}

.commission-order-row span,
.commission-order-row small {
  color: #766b55;
  font-size: 12px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.commission-order-row b {
  font-size: 16px;
  text-align: right;
}

.location-chart-rank {
  align-items: center;
  background: #fff3bf;
  border: 1px solid #f0d98b;
  border-radius: 14px;
  color: #bb8500;
  display: flex;
  font-size: 18px;
  font-weight: 950;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.location-chart-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.location-chart-heading {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-width: 0;
}

.location-chart-heading strong,
.location-chart-heading span {
  color: #21170c;
  font-weight: 950;
}

.location-chart-heading strong {
  display: block;
  font-size: 18px;
}

.location-chart-heading small,
.location-chart-meta {
  color: #766b55;
  font-size: 13px;
  font-weight: 800;
}

.location-chart-heading span {
  font-size: 18px;
  text-align: right;
  white-space: nowrap;
}

.location-chart-track {
  background: #fff4c7;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.location-chart-track i {
  background: linear-gradient(90deg, #f6bd18 0%, #d09300 100%);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.location-chart-meta {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.overview-section-heading h3 {
  color: #21170c;
  font-size: 17px;
  font-weight: 900;
}

.fair-kpi-grid div {
  align-content: center;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: none;
  min-height: 126px;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.report-kpi::before {
  display: none;
}

.fair-kpi-grid span {
  color: #6f624b;
  display: block;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
  min-width: 0;
}

.fair-kpi-grid strong {
  color: #21170c;
  display: block;
  font-size: clamp(24px, 1.65vw, 32px);
  font-weight: 950;
  line-height: 1.05;
  margin-top: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fair-kpi-grid small {
  color: #7a6c55;
  display: block;
  font-size: 13px;
  line-height: 1.25;
  margin-top: 10px;
  min-width: 0;
}

.owner-reminders {
  border: 0;
  box-shadow: none;
  gap: 0;
  padding: 0;
}

.owner-reminder-item {
  align-items: center;
  background: transparent;
  border-top: 1px solid #f0dfac;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px 1fr auto;
  min-height: 48px;
  padding: 9px 0;
  text-align: left;
  width: 100%;
}

.owner-reminder-item:hover {
  background: #fff8df;
}

.owner-reminder-item:focus-visible {
  outline: 3px solid rgba(246, 197, 47, 0.38);
  outline-offset: 2px;
}

.owner-reminder-static {
  cursor: default;
  grid-template-columns: 28px 1fr;
}

.owner-reminder-static:hover {
  background: transparent;
}

.owner-reminder-item:first-child {
  border-top: 0;
}

.owner-reminder-item > span {
  align-items: center;
  color: #ef9a00;
  display: flex;
  font-size: 20px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.owner-reminder-calendar > span::before {
  content: "◷";
}

.owner-reminder-warning > span::before {
  content: "⚠";
}

.owner-reminder-trophy > span::before {
  content: "♕";
}

.owner-reminder-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.owner-reminder-item small {
  color: #7a6c55;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.owner-reminder-item b {
  color: #5f4d2d;
  font-size: 26px;
  font-weight: 500;
}

.daily-sales-list::before {
  color: #6f624b;
  content: "日期  净销售额  订单数  产品数量";
  display: grid;
  font-size: 12px;
  font-weight: 750;
  grid-template-columns: 1fr 1.2fr 0.7fr 0.8fr;
  padding: 0 2px 8px;
}

.daily-sales-row {
  background: transparent;
  border: 0;
  border-top: 1px solid #f0dfac;
  border-radius: 0;
  box-shadow: none;
  gap: 10px;
  grid-template-columns: minmax(120px, 0.9fr) minmax(120px, 1fr) minmax(92px, 0.65fr) 52px minmax(72px, 0.75fr);
  min-height: 39px;
  padding: 8px 2px;
}

.daily-sales-row strong,
.daily-sales-row span,
.daily-sales-row b {
  align-self: center;
  color: #21170c;
  font-size: 13px;
  font-weight: 750;
  margin: 0;
}

.daily-sales-row span,
.daily-sales-row b {
  text-align: right;
}

.daily-sales-bar {
  height: 14px;
}

.daily-total-row {
  background: #fff4cf;
  border-radius: 7px;
  padding-left: 8px;
  padding-right: 8px;
}

.major-product-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.major-product-grid div {
  border-radius: 9px;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
  position: relative;
}

.major-product-grid span {
  color: #21170c;
  font-size: 14px;
}

.major-product-grid small {
  color: #7a6c55;
}

.major-product-grid b {
  bottom: 12px;
  color: #21170c;
  font-size: 18px;
  position: absolute;
  right: 12px;
}

.product-detail-list {
  border: 1px solid #f0dfac;
  border-radius: 9px;
  gap: 0;
  overflow: hidden;
}

.product-detail-list article {
  border: 0;
  border-top: 1px solid #f0dfac;
  border-radius: 0;
  grid-template-columns: 42px 1fr auto;
  padding: 10px 12px;
}

.product-detail-list article:first-child {
  border-top: 0;
}

.product-detail-list strong,
.product-detail-list b {
  font-size: 14px;
}

.product-detail-list span {
  font-size: 12px;
}

.product-total-row {
  background: #fff4cf;
}

.payment-overview-list {
  display: block;
}

.payment-overview-list .payment-donut {
  display: none;
}

.payment-overview-list .payment-legend {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  padding: 0;
}

.payment-overview-list .payment-row {
  background: #fffaf0;
  border: 1px solid #f0dfac;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  min-height: 82px;
  min-width: 0;
  padding: 11px 12px;
}

.payment-overview-list .payment-row::before {
  display: none;
}

.payment-row span {
  color: #46391f;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.payment-row strong,
.payment-row small {
  font-size: 13px;
  line-height: 1.2;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
}

.payment-row strong {
  color: #21170c;
  font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-row small {
  color: #7a6c55;
  font-weight: 750;
}

.salesperson-overview-list {
  border: 1px solid #f0dfac;
  border-radius: 9px;
  gap: 0;
  overflow: hidden;
}

.salesperson-overview-list::before {
  color: #6f624b;
  content: "销售员        净销售额       订单       应付佣金";
  display: grid;
  font-size: 12px;
  font-weight: 750;
  grid-template-columns: 1fr 0.9fr 0.5fr 0.8fr;
  padding: 10px 12px;
}

.salesperson-row {
  border: 0;
  border-top: 1px solid #f0dfac;
  border-radius: 0;
  grid-template-columns: 1fr 0.9fr 0.5fr 0.8fr;
  padding: 10px 12px;
}

.salesperson-row strong,
.salesperson-row span,
.salesperson-row b {
  color: #21170c;
  font-size: 13px;
  font-weight: 750;
  margin: 0;
}

.salesperson-row span,
.salesperson-row b {
  text-align: right;
}

.salesperson-total-row {
  background: #fff4cf;
}

.closing-overview-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.closing-row {
  align-content: center;
  background: #fff;
  border-radius: 9px;
  gap: 9px;
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 128px;
  padding: 12px;
  text-align: center;
}

.closing-row strong {
  font-size: 15px;
}

.closing-row span {
  background: #fde8e8;
  border-radius: 8px;
  color: #d72e2e;
  font-size: 13px;
  font-weight: 900;
  margin: 0;
  padding: 8px 12px;
}

.closing-row small {
  color: #7a6c55;
  font-size: 12px;
  font-weight: 750;
}

.closing-row-done span {
  background: #eef8e9;
  color: #26823e;
}

@media (max-width: 980px) {
  .admin-view {
    padding: 16px 12px 26px;
  }

  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-toolbar .header-actions,
  .report-filter-panel .admin-filter-grid,
  .report-filter-panel .sales-filter-bar {
    display: none;
  }

  .admin-tabs {
    display: flex;
    overflow-x: auto;
  }

  .report-filter-panel .admin-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-event-date-picker {
    display: flex;
  }

  .admin-toolbar h2 {
    font-size: 24px;
    text-align: center;
  }

  .admin-fair-strip {
    background: #fff;
    border: 1px solid #ecd27f;
    border-radius: 12px;
    display: grid;
    gap: 4px;
    grid-template-columns: 54px 1fr auto;
    padding: 18px;
  }

  .admin-fair-strip::before {
    color: #db8800;
    content: "▦";
    font-size: 36px;
    grid-row: span 2;
  }

  .admin-fair-select {
    border: 0;
    min-height: 0;
    min-width: 0;
    padding: 0;
  }

  .admin-fair-select strong {
    font-size: 21px;
  }

  .admin-fair-select span {
    display: none;
  }

  .admin-fair-date {
    font-size: 16px;
    grid-column: 2;
  }

  .fair-status-pill {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .report-filter-panel {
    border-radius: 12px;
    padding: 0;
  }

  .report-filter-panel .panel-heading {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 48px;
  }

  .report-filter-panel .panel-heading h2 {
    font-size: 16px;
  }

  .report-filter-panel .panel-heading::before {
    content: "≡";
    font-weight: 900;
    margin-right: 8px;
    transform: rotate(90deg);
  }

  .report-range-pill {
    display: none;
  }

  .admin-report-grid,
  .fair-kpi-grid,
  .closing-overview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fair-kpi-grid,
  .owner-reminders-panel,
  .daily-section,
  .product-section,
  .payment-section,
  .team-section,
  .closing-section {
    grid-column: 1 / -1;
  }

  .fair-kpi-grid {
    gap: 10px;
  }

  .fair-kpi-grid div {
    min-height: 104px;
    padding: 14px;
  }

  .report-kpi::before {
    height: 38px;
    right: 12px;
    top: 12px;
    width: 38px;
  }

  .fair-kpi-grid span {
    font-size: 15px;
    padding-right: 46px;
  }

  .fair-kpi-grid strong {
    font-size: 24px;
  }

  .overview-section {
    border-radius: 12px;
    padding: 12px;
  }

  .daily-sales-list::before {
    content: "每日销售                         销售额        订单      件/盒";
    grid-template-columns: 1fr 0.8fr 0.45fr 0.45fr;
  }

  .daily-sales-row {
    grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) 88px 40px 42px;
  }

  .daily-sales-row strong,
  .daily-sales-row span,
  .daily-sales-row b {
    font-size: 13px;
  }

  .major-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .payment-overview-list {
    grid-template-columns: 1fr;
  }

  .payment-overview-list .payment-donut {
    display: none;
  }

  .payment-overview-list .payment-legend {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .payment-overview-list .payment-row {
    align-content: center;
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
  }

  .payment-row span {
    font-size: 11px;
    white-space: normal;
  }

  .payment-row strong,
  .payment-row small {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .admin-view {
    padding: 16px 12px 22px;
  }

  .admin-report-grid {
    gap: 10px;
  }

  .fair-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .fair-kpi-grid div {
    border-radius: 12px;
    min-height: 102px;
  }

  .owner-reminder-item {
    min-height: 54px;
  }

  .daily-sales-row {
    grid-template-columns: minmax(95px, 1.1fr) minmax(80px, 1fr) 82px 32px 40px;
  }

  .daily-sales-bar {
    height: 8px;
  }

  .major-product-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .major-product-grid div {
    min-height: 88px;
    padding: 10px;
  }

  .product-detail-list article {
    grid-template-columns: 38px 1fr auto;
  }

  .payment-legend {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .payment-row span {
    font-size: 11px;
  }

  .payment-row strong {
    font-size: 16px;
  }

  .salesperson-overview-list::before {
    display: none;
  }

  .salesperson-row {
    grid-template-columns: 1fr auto auto;
  }

  .salesperson-row b {
    display: none;
  }

  .closing-overview-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .closing-row {
    min-height: 96px;
    padding: 10px 8px;
  }
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr 1fr;
  }

  .history-panel {
    grid-column: 1 / -1;
  }

  .admin-grid,
  .admin-stats,
  .admin-filter-grid,
  .import-preview-grid,
  .online-filter-grid,
  .online-form-grid,
  .admin-sales-summary,
  .admin-sales-breakdown,
  .fair-overview-layout {
    grid-template-columns: 1fr 1fr;
  }

  .fair-overview-hero {
    grid-template-columns: 1fr;
  }

  .overview-meta-grid,
  .major-product-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.menu-open.menu-receipts-mode .side-menu {
    max-width: 100vw;
    width: 100vw;
  }

  body.menu-open.menu-receipts-mode .menu-backdrop {
    opacity: 0;
  }

  body.menu-receipts-mode .side-menu-brand,
  body.menu-receipts-mode .menu-nav,
  body.menu-receipts-mode #menuSalesPanel,
  body.menu-receipts-mode #menuSettingsPanel {
    display: none;
  }

  body.menu-receipts-mode .history-panel {
    border-top: 0;
    padding: 18px 18px 24px;
  }

  body.menu-receipts-mode .history-panel .panel-heading {
    align-items: flex-start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  body.menu-receipts-mode .history-panel h2 {
    font-size: 26px;
    line-height: 1.08;
  }

  body.menu-receipts-mode .history-panel .status-pill {
    flex: 0 0 auto;
  }

  body.menu-receipts-mode .history-close-button {
    display: inline-flex;
  }

  body.menu-receipts-mode .history-card {
    border-radius: 8px;
    padding: 14px;
  }

  body.menu-receipts-mode .history-top {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.menu-receipts-mode .history-card h3,
  body.menu-receipts-mode .history-card p {
    min-width: 0;
  }

  body.menu-receipts-mode .history-card .product-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  body.menu-receipts-mode .history-card .product-actions button {
    min-height: 42px;
    padding-left: 8px;
    padding-right: 8px;
    width: 100%;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .header-actions,
  .order-actions,
  .printer-tools {
    width: 100%;
  }

  .header-actions button,
  .header-actions select,
  .order-actions button,
  .printer-tools button {
    flex: 1 1 160px;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .catalog-panel .panel-heading,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-card .panel-heading {
    align-items: flex-start;
    flex-direction: row;
  }

  .dialog-card .panel-heading .icon-button {
    border-radius: 999px;
    font-size: 24px;
    min-height: 42px;
    padding: 0;
  }

  .customer-grid,
  .stats-grid,
  .admin-grid,
  .admin-stats,
  .admin-filter-grid,
  .import-preview-grid,
  .online-filter-grid,
  .online-form-grid,
  .sales-filter-bar,
  .sales-date-grid,
  .admin-sales-summary,
  .admin-sales-breakdown,
  .fair-overview-hero,
  .fair-overview-layout,
  .overview-meta-grid,
  .major-product-grid,
  .daily-sales-row {
    grid-template-columns: 1fr;
  }

  .daily-sales-row {
    align-items: stretch;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .sales-mode .workspace {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .sales-mode .catalog-panel,
  .sales-mode .order-panel,
  .sales-mode .history-panel {
    padding: 14px;
  }

  .sales-mode .customer-grid {
    gap: 10px;
  }

  .sales-mode .product-card {
    gap: 10px;
  }

  .sales-mode .product-top,
  .sales-mode .history-top,
  .sales-mode .cart-line {
    gap: 10px;
  }

  .sales-mode .line-actions {
    justify-content: flex-end;
  }

  .sales-mode .order-actions {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin: 14px -14px -14px;
    padding: 10px 14px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 26%);
  }

  .sales-mode #clearOrderButton {
    flex: 0.7 1 110px;
  }

  .sales-mode #saveBluetoothOrderButton,
  .sales-mode #savePrintOrderButton {
    flex: 1 1 150px;
  }

  .sales-mode #saveOrderButton {
    flex: 1.3 1 180px;
  }

  .pos-header {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 0 4px;
  }

  .ticket-title strong {
    font-size: 22px;
  }

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

  .language-toggle {
    font-size: 12px;
    gap: 4px;
    min-height: 34px;
    padding: 0 8px;
  }

  .pos-workspace {
    min-height: calc(100vh - 58px);
    padding: 14px 0 26px;
  }

  .pos-event-strip {
    border-left: 0;
    border-right: 0;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 0;
    padding: 11px 14px;
  }

  .pos-event-strip span {
    max-width: none;
    padding-bottom: 0;
    text-align: left;
  }

  .charge-button {
    margin: 10px auto 20px;
    min-height: 86px;
    width: calc(100% - 28px);
  }

  .catalog-panel {
    border-left: 0;
    border-right: 0;
    margin-top: 0;
  }

  .catalog-toolbar {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  .catalog-toolbar select,
  .catalog-toolbar input {
    min-height: 58px;
  }

  .catalog-toolbar input {
    min-width: 0;
    padding-inline: 9px;
  }

  .pos-product-card {
    grid-template-columns: 62px minmax(0, 1fr);
    padding-right: 14px;
  }

  .pos-product-card h3,
  .pos-product-card .price {
    font-size: 19px;
  }

  .side-menu {
    max-width: 88vw;
    width: 340px;
  }

  .checkout-dialog .customer-grid {
    grid-template-columns: 1fr;
  }

  .payment-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 420px) {
  .catalog-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-toolbar select {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .catalog-toolbar input::placeholder {
    color: #8f8674;
  }

  .pos-product-card {
    gap: 10px;
    grid-template-columns: 54px minmax(0, 1fr);
    padding-left: 10px;
  }

  .payment-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pos-product-card .product-photo {
    height: 46px;
    width: 46px;
  }

  .pos-product-card h3,
  .pos-product-card .price {
    font-size: 17px;
  }

  .pos-product-actions .ghost-button {
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  .admin-view .fair-kpi-grid div {
    padding: 14px 10px 12px;
  }

  .admin-view .report-kpi::before {
    display: none;
  }

  .admin-view .fair-kpi-grid span {
    font-size: 13px;
    padding-right: 0;
  }

  .admin-view .fair-kpi-grid strong {
    font-size: 21px;
    white-space: nowrap;
  }

  .admin-view .fair-kpi-grid small {
    font-size: 11px;
  }

  .admin-view .daily-sales-list::before {
    display: none;
  }

  .admin-view .daily-sales-row {
    background: #fff;
    border: 1px solid #f0dfac;
    border-radius: 10px;
    grid-template-columns: 1fr auto auto auto;
    padding: 12px;
  }

  .admin-view .daily-sales-row strong {
    order: 1;
  }

  .admin-view .daily-sales-row span:nth-of-type(1) {
    order: 2;
  }

  .admin-view .daily-sales-row span:nth-of-type(2) {
    order: 3;
  }

  .admin-view .daily-sales-row b {
    order: 4;
  }

  .admin-view .daily-sales-bar {
    grid-column: 1 / -1;
    order: 5;
  }

  .admin-view .daily-total-row {
    background: #fff4cf;
  }

  .admin-view .daily-total-row > div {
    display: none;
  }
}

@media (max-width: 760px) {
  .admin-view .fair-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-view .admin-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-view .payment-overview-list {
    grid-template-columns: 1fr;
  }

  .admin-view .closing-overview-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Local dashboard clarity prototype */
body.admin-mode {
  background:
    radial-gradient(circle at 18% -10%, rgba(255, 218, 95, 0.22), transparent 28rem),
    linear-gradient(180deg, #fffdf8 0%, #f7f5ef 100%);
}

body.admin-mode .admin-view {
  background: transparent;
  padding: 22px clamp(18px, 2vw, 32px) 34px;
}

body.admin-mode .admin-toolbar {
  align-items: end;
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 1.35fr) auto;
  margin-bottom: 14px;
}

body.admin-mode .admin-toolbar h2 {
  letter-spacing: 0;
}

body.admin-mode .admin-fair-strip {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-self: start;
  min-width: 0;
}

body.admin-mode .admin-toolbar .header-actions {
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: max-content;
}

body.admin-mode .admin-fair-date {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.admin-mode .fair-status-pill {
  flex: 0 0 auto;
}

body.admin-mode .report-filter-panel,
body.admin-mode .overview-section,
body.admin-mode .fair-kpi-grid > div {
  background: rgba(255, 255, 255, 0.92);
  border-color: #ead38e;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(83, 60, 13, 0.055);
}

body.admin-mode .admin-report-grid {
  align-items: start;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.92fr);
}

body.admin-mode .fair-kpi-grid {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.admin-mode .report-kpi {
  align-items: center;
  display: grid;
  gap: 4px 14px;
  grid-template-columns: minmax(0, 1fr) 48px;
  min-height: 116px;
  padding: 18px;
}

body.admin-mode .report-kpi::after {
  align-items: center;
  background: #fff4cf;
  border: 1px solid #f0d16e;
  border-radius: 999px;
  color: #d49400;
  content: "$";
  display: flex;
  font-size: 22px;
  font-weight: 950;
  grid-column: 2;
  grid-row: 1 / span 3;
  height: 48px;
  justify-content: center;
  width: 48px;
}

body.admin-mode .kpi-orders::after {
  content: "□";
}

body.admin-mode .kpi-products::after {
  content: "▣";
}

body.admin-mode .kpi-commission::after {
  content: "%";
}

body.admin-mode .fair-kpi-grid span,
body.admin-mode .fair-kpi-grid strong,
body.admin-mode .fair-kpi-grid small {
  min-width: 0;
  padding: 0;
}

body.admin-mode .fair-kpi-grid strong {
  font-size: clamp(26px, 2.25vw, 34px);
  line-height: 1.05;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  word-break: keep-all;
}

body.admin-mode #adminSalesRangeGross,
body.admin-mode #adminSalesRangeRefunds {
  font-size: clamp(24px, 2vw, 32px);
}

body.admin-mode .owner-reminders-panel {
  display: none !important;
}

body.admin-mode .daily-section,
body.admin-mode .payment-section {
  grid-column: 1;
}

body.admin-mode .product-section,
body.admin-mode .team-section {
  grid-column: 2;
}

body.admin-mode .closing-section {
  grid-column: 1 / -1;
}

body.admin-mode .overview-section {
  padding: 16px;
}

body.admin-mode .daily-sales-list::before {
  content: "日期  趋势  销售额  订单  件/盒";
  grid-template-columns: 1fr minmax(100px, 1.25fr) 0.9fr 0.45fr 0.55fr;
}

body.admin-mode .daily-sales-row {
  grid-template-columns: 1fr minmax(100px, 1.25fr) 0.9fr 0.45fr 0.55fr;
}

body.admin-mode .product-detail-list article {
  min-height: 58px;
}

body.admin-mode .payment-overview-list {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

body.admin-mode .payment-total-line {
  align-items: center;
  background: #fff8df;
  border: 1px solid #f0dfac;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 12px;
}

body.admin-mode .payment-total-line span {
  color: #6f624b;
  font-size: 13px;
  font-weight: 850;
}

body.admin-mode .payment-total-line strong {
  color: #21170c;
  font-size: clamp(17px, 1.35vw, 22px);
  font-weight: 950;
  overflow-wrap: anywhere;
  text-align: right;
}

body.admin-mode .payment-overview-list .payment-legend {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
}

body.admin-mode .payment-overview-list .payment-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-top: 1px solid #f0dfac;
  border-radius: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(100px, 1fr) minmax(120px, auto) minmax(44px, auto);
  min-height: 44px;
  padding: 9px 2px;
}

body.admin-mode .payment-overview-list .payment-row:first-child {
  border-top: 0;
}

body.admin-mode .payment-row strong,
body.admin-mode .payment-row small {
  text-align: right;
}

body.admin-mode .payment-row strong {
  font-size: 16px;
}

body.admin-mode .salesperson-row,
body.admin-mode .salesperson-overview-list::before {
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 0.9fr) minmax(48px, 0.45fr) minmax(92px, 0.7fr);
}

body.admin-mode .closing-overview-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

body.admin-mode .closing-row {
  min-height: 96px;
}

@media (max-width: 980px) {
  body.admin-mode .admin-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  body.admin-mode .admin-report-grid {
    grid-template-columns: 1fr;
  }

  body.admin-mode .fair-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-mode .daily-section,
  body.admin-mode .product-section,
  body.admin-mode .payment-section,
  body.admin-mode .team-section,
  body.admin-mode .closing-section {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.admin-mode .admin-tabs {
    background: #fff;
    border-radius: 12px;
    display: flex;
    gap: 6px;
    margin: 0 0 12px;
    overflow-x: auto;
    padding: 6px 16px;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  body.admin-mode .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  body.admin-mode .admin-tab {
    border-radius: 10px;
    flex: 0 0 auto;
    font-size: 13px;
    min-height: 38px;
    padding: 0 12px;
  }

  body.admin-mode .admin-view {
    padding: 14px 10px 24px;
  }

  body.admin-mode .report-filter-panel {
    padding: 12px;
  }

  body.admin-mode .admin-filter-toggle {
    align-items: center;
    background: #fffdfa;
    border: 1px solid #edcc66;
    border-radius: 10px;
    color: #21170c;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 46px;
    padding: 0 12px;
    width: 100%;
  }

  body.admin-mode .admin-filter-toggle span {
    font-size: 15px;
    font-weight: 900;
  }

  body.admin-mode .admin-filter-toggle strong {
    color: #8a6c16;
    font-size: 12px;
    font-weight: 850;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.admin-mode .admin-filter-toggle b {
    color: #a87700;
    font-size: 18px;
    line-height: 1;
  }

  body.admin-mode .report-filter-panel.is-collapsed .admin-filter-grid,
  body.admin-mode .report-filter-panel.is-collapsed .admin-event-date-picker,
  body.admin-mode .report-filter-panel.is-collapsed .sales-filter-bar {
    display: none;
  }

  body.admin-mode .report-filter-panel:not(.is-collapsed) .admin-filter-grid,
  body.admin-mode .report-filter-panel:not(.is-collapsed) .sales-filter-bar {
    margin-top: 12px;
  }

  body.admin-mode .admin-fair-strip {
    box-sizing: border-box;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    width: 100%;
  }

  body.admin-mode .admin-fair-select,
  body.admin-mode .admin-fair-select strong,
  body.admin-mode .admin-fair-date {
    min-width: 0;
  }

  body.admin-mode .admin-fair-select strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.admin-mode .admin-fair-date {
    font-size: 12px;
    line-height: 1.25;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  body.admin-mode .report-filter-panel .panel-heading {
    justify-content: flex-start;
    min-height: auto;
    padding: 0 0 10px;
  }

  body.admin-mode .report-filter-panel .panel-heading::before,
  body.admin-mode .report-filter-panel .panel-heading .eyebrow {
    display: none;
  }

  body.admin-mode .report-filter-panel .panel-heading h2 {
    color: #21170c;
    font-size: 15px;
    font-weight: 900;
  }

  body.admin-mode .fair-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-mode .report-kpi {
    gap: 6px;
    grid-template-columns: 1fr;
    min-height: 116px;
    padding: 14px;
  }

  body.admin-mode .report-kpi::after {
    grid-column: 1;
    grid-row: 1;
    height: 34px;
    justify-self: end;
    width: 34px;
    font-size: 16px;
  }

  body.admin-mode .fair-kpi-grid span {
    font-size: 13px;
  }

  body.admin-mode .fair-kpi-grid strong,
  body.admin-mode #adminSalesRangeNet {
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.08;
  }

  body.admin-mode #adminSalesRangeGross,
  body.admin-mode #adminSalesRangeRefunds {
    font-size: clamp(19px, 5.3vw, 22px);
    white-space: nowrap;
  }

  body.admin-mode .daily-sales-list::before {
    display: none;
  }

  body.admin-mode .daily-sales-row {
    grid-template-columns: 1fr auto auto;
  }

  body.admin-mode .daily-sales-row strong {
    grid-column: 1;
  }

  body.admin-mode .daily-sales-bar {
    grid-column: 1 / -1;
  }

  body.admin-mode .daily-sales-row span:nth-of-type(1) {
    grid-column: 1;
    text-align: left;
  }

  body.admin-mode .daily-sales-row span:nth-of-type(2),
  body.admin-mode .daily-sales-row b {
    text-align: right;
  }

  body.admin-mode .major-product-grid {
    grid-template-columns: 1fr;
  }

  body.admin-mode .product-detail-list article {
    grid-template-columns: 42px 1fr;
  }

  body.admin-mode .product-detail-list article b {
    grid-column: 2;
    justify-self: start;
  }

  body.admin-mode .payment-overview-list .payment-row {
    grid-template-columns: 1fr auto;
  }

  body.admin-mode .payment-row small {
    grid-column: 1 / -1;
    text-align: left;
  }

  body.admin-mode .salesperson-row,
  body.admin-mode .salesperson-overview-list::before {
    grid-template-columns: 1fr auto auto;
  }

  body.admin-mode .salesperson-row b,
  body.admin-mode .salesperson-overview-list::before {
    font-size: 12px;
  }

  body.admin-mode [data-admin-panel="products"] .ranking-item,
  body.admin-mode [data-admin-panel="team"] .ranking-item,
  body.admin-mode [data-admin-panel="events"] .ranking-item {
    border-radius: 8px;
    gap: 10px;
    padding: 14px;
  }

  body.admin-mode .management-card-head {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
  }

  body.admin-mode .management-card-head strong {
    font-size: 18px;
    line-height: 1.15;
  }

  body.admin-mode .management-card-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  body.admin-mode .product-management-heading {
    margin: -14px -14px 14px;
    padding: 14px;
  }

  body.admin-mode .product-management-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  body.admin-mode .product-management-actions button {
    width: 100%;
  }

  body.admin-mode .product-title-row {
    align-items: flex-start;
  }

  body.admin-mode .product-drag-handle {
    height: 34px;
    width: 34px;
  }

  body.admin-mode .management-card-actions .ghost-button {
    min-height: 40px;
    width: 100%;
  }

  body.admin-mode .management-card-meta {
    color: #6f624b;
    font-size: 14px;
  }

  body.admin-mode [data-admin-panel="events"] .management-card-actions {
    grid-template-columns: 1fr minmax(130px, auto);
  }

  body.admin-mode [data-admin-panel="events"] .management-chip {
    justify-content: center;
    min-height: 40px;
  }
}

/* Mobile admin order cards */
@media (max-width: 760px) {
  body.admin-mode [data-admin-panel="orders"] .table-wrap {
    overflow: visible;
  }

  body.admin-mode [data-admin-panel="orders"] table,
  body.admin-mode [data-admin-panel="orders"] tbody,
  body.admin-mode [data-admin-panel="orders"] tr,
  body.admin-mode [data-admin-panel="orders"] td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  body.admin-mode [data-admin-panel="orders"] table {
    border: 0;
    min-width: 0;
  }

  body.admin-mode [data-admin-panel="orders"] thead {
    display: none;
  }

  body.admin-mode [data-admin-panel="orders"] tbody {
    display: grid;
    gap: 10px;
  }

  body.admin-mode [data-admin-panel="orders"] tr {
    background: #fff;
    border: 1px solid #ead38e;
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(83, 60, 13, 0.05);
    padding: 12px;
  }

  body.admin-mode [data-admin-panel="orders"] td {
    align-items: start;
    border: 0;
    display: grid;
    font-size: 13px;
    gap: 10px;
    grid-template-columns: minmax(78px, 0.36fr) minmax(0, 1fr);
    padding: 7px 0;
  }

  body.admin-mode [data-admin-panel="orders"] td::before {
    color: #7a6c55;
    content: attr(data-label);
    font-size: 12px;
    font-weight: 850;
  }

  body.admin-mode [data-admin-panel="orders"] td span {
    color: #7a6c55;
  }

  body.admin-mode [data-admin-panel="orders"] td[data-label="金额"] strong {
    color: #21170c;
    font-size: 18px;
  }

  body.admin-mode [data-admin-panel="orders"] td[data-label="操作"] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
  }

  body.admin-mode [data-admin-panel="orders"] td[data-label="操作"]::before {
    display: none;
  }

  body.admin-mode [data-admin-panel="orders"] td[data-label="操作"] .ghost-button {
    flex: 1 1 88px;
    min-height: 38px;
  }
}

/* Checkout flow polish */
@media (max-width: 760px) {
  .sales-mode .checkout-dialog {
    border-radius: 14px 14px 0 0;
    max-height: 94vh;
  }

  .sales-mode .checkout-dialog .order-panel {
    padding: 14px;
  }

  .sales-mode .checkout-dialog .panel-heading {
    align-items: flex-start;
    gap: 6px;
  }

  .sales-mode .checkout-dialog .checkout-close-button {
    border-radius: 12px;
    font-size: 28px;
    height: 52px;
    width: 52px;
  }

  .sales-mode .checkout-dialog .cart-line {
    align-items: start;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .sales-mode .checkout-dialog .line-actions {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    justify-content: stretch;
    width: 100%;
  }

  .sales-mode .checkout-dialog .quantity-control {
    grid-template-columns: 1fr 1.15fr 1fr;
    justify-self: stretch;
  }

  .sales-mode .checkout-dialog .customer-grid {
    gap: 12px;
  }

  .sales-mode .checkout-dialog .payment-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sales-mode .checkout-dialog .payment-choice {
    min-height: 46px;
  }

  .sales-mode .checkout-dialog .totals {
    background: #fff8df;
    border: 1px solid #f0dfac;
    border-radius: 8px;
    margin-top: 14px;
    padding: 12px;
  }

  .sales-mode .checkout-dialog .order-actions {
    background: transparent;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 14px 0 0;
    padding: 0;
    position: static;
  }

  .sales-mode .checkout-dialog .order-actions button {
    flex: none;
    min-height: 48px;
    width: 100%;
  }

  .sales-mode .checkout-dialog #saveOrderButton {
    grid-column: 1 / -1;
    min-height: 54px;
  }

  .sales-mode .checkout-dialog #saveBluetoothOrderButton,
  .sales-mode .checkout-dialog #savePrintOrderButton {
    font-size: 14px;
  }
}

@media (max-width: 760px) {
  body.admin-mode .location-report-panel .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-mode .location-view-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  body.admin-mode .location-report-header {
    display: none;
  }

  body.admin-mode .location-report-row {
    align-items: start;
    border: 1px solid #ecd27f;
    border-radius: 12px;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 10px;
  }

  body.admin-mode .location-report-row div {
    grid-column: 1 / -1;
  }

  body.admin-mode .location-report-row span {
    background: #fff8df;
    border-radius: 8px;
    padding: 8px;
  }

  body.admin-mode .location-chart-row {
    align-items: start;
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 12px;
  }

  body.admin-mode .location-chart-rank {
    border-radius: 12px;
    font-size: 15px;
    height: 34px;
    width: 34px;
  }

  body.admin-mode .location-chart-heading {
    display: grid;
    gap: 6px;
  }

  body.admin-mode .commission-order-row,
  .commission-order-row {
    grid-template-columns: 1fr;
  }

  body.admin-mode .commission-order-row b,
  .commission-order-row b {
    text-align: left;
  }

  body.admin-mode .location-chart-heading span {
    font-size: 17px;
    text-align: left;
    white-space: normal;
  }

  body.admin-mode .location-chart-meta {
    display: grid;
    gap: 4px;
  }

  .insight-drawer {
    border-left: 0;
    max-width: 100vw;
    width: 100vw;
  }

  .insight-drawer-wide {
    border-radius: 0;
    height: 100vh;
    left: 0;
    max-width: 100vw;
    top: 0;
    transform: none;
    width: 100vw;
  }

  .location-detail-layout {
    grid-template-columns: 1fr;
  }

  .insight-drawer-head {
    padding: 18px 18px 14px;
  }

  .insight-drawer-body {
    padding: 14px 16px 24px;
  }

  .insight-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insight-compact-row,
  .insight-order-row {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .insight-order-amount {
    align-items: start;
  }

  .closing-context-card {
    grid-template-columns: 1fr;
  }

  .closing-context-date {
    text-align: left;
  }

  .fair-picker-dialog {
    max-width: calc(100vw - 20px);
    width: calc(100vw - 20px);
  }

  .fair-picker-panel {
    max-height: calc(100vh - 20px);
  }

  .fair-picker-head {
    padding: 18px;
  }

  .fair-picker-head h2 {
    font-size: 26px;
  }

  .fair-picker-search-row {
    grid-template-columns: 1fr;
  }

  .fair-picker-search input {
    font-size: 16px;
  }

  .fair-picker-chip {
    min-height: 48px;
  }

  .fair-picker-event {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .fair-picker-event b {
    white-space: normal;
  }
}

/* React Bits-inspired polish: Magic Bento cards, Pill Nav tabs, and Animated Content. */
.rb-magic-card {
  --rb-x: 50%;
  --rb-y: 50%;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.rb-magic-card::before {
  background:
    radial-gradient(
      320px circle at var(--rb-x) var(--rb-y),
      rgba(255, 207, 48, 0.28),
      rgba(255, 230, 123, 0.12) 34%,
      transparent 64%
    );
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 0.2s ease;
  z-index: 0;
}

.rb-magic-card > * {
  position: relative;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .rb-magic-card:hover {
    border-color: rgba(214, 160, 0, 0.62);
    box-shadow: 0 18px 44px rgba(128, 91, 0, 0.12);
    transform: translateY(-2px);
  }

  .rb-magic-card:hover::before {
    opacity: 1;
  }
}

.rb-pill-nav {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 235, 0.92)),
    rgba(255, 255, 255, 0.92);
  border-color: rgba(228, 190, 86, 0.72);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 8px 26px rgba(128, 91, 0, 0.06);
  gap: 6px;
  padding: 6px;
}

.rb-pill-nav .admin-tab {
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 18px;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.rb-pill-nav .admin-tab-active {
  background: linear-gradient(180deg, #ffe37a 0%, #ffc928 100%);
  box-shadow: 0 9px 22px rgba(210, 151, 0, 0.22);
}

@media (hover: hover) and (pointer: fine) {
  .rb-pill-nav .admin-tab:hover {
    background: rgba(255, 239, 180, 0.72);
    color: var(--ink);
    transform: translateY(-1px);
  }

  .rb-pill-nav .admin-tab-active:hover {
    background: linear-gradient(180deg, #ffe37a 0%, #ffc928 100%);
  }
}

.rb-animated-content:not([hidden]) {
  animation: rb-content-enter 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes rb-content-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }

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

@media (max-width: 720px) {
  .rb-pill-nav {
    border-radius: 18px;
  }

  .rb-pill-nav .admin-tab {
    min-height: 44px;
    padding: 10px 15px;
  }

  body.admin-mode .fair-kpi-grid strong {
    font-size: clamp(20px, 6vw, 26px);
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  body.admin-mode .fair-kpi-grid {
    grid-template-columns: 1fr;
  }

  body.admin-mode .report-kpi {
    min-height: 106px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rb-magic-card,
  .rb-magic-card::before,
  .rb-pill-nav .admin-tab,
  .rb-animated-content:not([hidden]) {
    animation: none;
    transition: none;
  }
}

/* Product management: React Bits-inspired MagicBento cards. */
.admin-product-bento-grid {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.admin-product-bento-grid .admin-product-item {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 213, 74, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 242, 0.96));
  border-color: rgba(226, 190, 90, 0.78);
  border-radius: 14px;
  color: #241a10;
  display: grid;
  gap: 14px;
  grid-template-rows: 1fr auto;
  min-height: 216px;
  opacity: 1;
  padding: 16px;
}

.admin-product-bento-grid .admin-product-item:not(.pending-item) {
  animation: product-card-enter 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(min(var(--product-index, 0), 10) * 28ms);
}

.admin-product-card-main {
  align-items: flex-start;
  display: grid !important;
  gap: 14px;
  grid-template-columns: 72px minmax(0, 1fr);
}

.admin-product-thumb {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 248, 224, 0.98), rgba(255, 239, 178, 0.82));
  border: 1px solid rgba(235, 199, 91, 0.78);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #b57a00;
  display: flex !important;
  flex: 0 0 auto;
  font-size: 28px;
  font-weight: 950;
  height: 72px;
  justify-content: center;
  overflow: hidden;
  width: 72px;
}

.admin-product-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.admin-product-copy {
  display: grid !important;
  gap: 10px;
  min-width: 0;
}

.admin-product-bento-grid .management-card-head {
  align-items: flex-start;
  display: flex !important;
  gap: 10px;
  justify-content: space-between;
}

.admin-product-bento-grid .management-card-head strong {
  color: #241a10;
  display: block;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.admin-product-bento-grid .management-chip {
  background: rgba(255, 245, 207, 0.92);
  color: #9a6900;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-product-meta-grid {
  display: grid !important;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-product-meta-pill {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(238, 209, 125, 0.7);
  border-radius: 10px;
  color: var(--ink);
  display: grid !important;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
}

.admin-product-meta-pill small {
  color: #8a7b61;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-product-meta-pill b {
  color: #241a10;
  font-size: 15px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.admin-product-sku {
  background: rgba(255, 247, 218, 0.7);
  border: 1px dashed rgba(221, 184, 82, 0.75);
  border-radius: 999px;
  color: #776a51;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-product-bento-grid .management-card-actions {
  align-items: center;
  align-self: end;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
}

.admin-product-bento-grid .management-card-actions .ghost-button,
.admin-product-bento-grid .management-card-actions .compact-button {
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 14px;
}

.admin-product-bento-grid.product-arrange-list {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.admin-product-bento-grid.admin-product-lanes-grid {
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.admin-product-lane {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 217, 74, 0.14), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 238, 0.96));
  border: 1px solid rgba(226, 190, 90, 0.78);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(128, 91, 0, 0.06);
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.admin-product-lane-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 4px 4px 10px;
}

.admin-product-lane-head span {
  color: #b57a00;
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-product-lane-head strong {
  color: #241a10;
  display: block;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.05;
  margin-top: 3px;
}

.admin-product-lane-head b {
  background: rgba(255, 241, 187, 0.9);
  border: 1px solid rgba(232, 194, 87, 0.72);
  border-radius: 999px;
  color: #a36d00;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 950;
  padding: 8px 12px;
}

.admin-product-lane-list {
  display: grid;
  gap: 10px;
}

.admin-product-lanes-grid .admin-product-lane .admin-product-item {
  animation-delay: calc(min(var(--product-index, 0), 8) * 18ms);
  border-radius: 14px;
  box-shadow: none;
  min-height: 0;
  padding: 14px;
}

.admin-product-lanes-grid .admin-product-lane .admin-product-card-main {
  grid-template-columns: 62px minmax(0, 1fr);
}

.admin-product-lanes-grid .admin-product-lane .admin-product-thumb {
  height: 62px;
  width: 62px;
}

.admin-product-lanes-grid .admin-product-lane .admin-product-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-product-bento-grid .product-arrange-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-product-bento-grid .product-arrange-controls .compact-button {
  min-width: 0;
  width: 100%;
}

.product-management-actions {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 228, 0.9));
  border: 1px solid rgba(232, 198, 98, 0.64);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(155, 103, 0, 0.08);
  padding: 6px;
}

.product-management-actions .ghost-button,
.product-management-actions .primary-button {
  border-radius: 999px;
}

@keyframes product-card-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

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

@media (max-width: 760px) {
  .admin-product-bento-grid,
  .admin-product-bento-grid.product-arrange-list,
  .admin-product-bento-grid.admin-product-lanes-grid {
    grid-template-columns: 1fr;
  }

  .admin-product-card-main {
    position: relative;
    grid-template-columns: 1fr;
  }

  .admin-product-thumb {
    border-radius: 12px;
    font-size: 22px;
    height: 58px;
    position: absolute;
    right: 0;
    top: 0;
    width: 58px;
  }

  .admin-product-copy {
    padding-right: 72px;
  }

  .admin-product-meta-grid {
    grid-template-columns: 1fr;
  }

  .admin-product-bento-grid .management-card-head {
    display: grid !important;
    grid-template-columns: 1fr auto;
  }

  .admin-product-bento-grid .management-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-product-bento-grid .product-arrange-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-management-actions {
    border-radius: 16px;
    padding: 8px;
  }

  .admin-product-lane {
    border-radius: 16px;
    padding: 12px;
  }

  .admin-product-lane-head {
    align-items: flex-start;
  }

  .admin-product-lanes-grid .admin-product-lane .admin-product-card-main {
    grid-template-columns: 1fr;
  }

  .admin-product-lanes-grid .admin-product-lane .admin-product-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* Modern POS dashboard preview shell */
.admin-desktop-sidebar {
  display: none;
}

@media (min-width: 1180px) {
  body.admin-mode {
    background:
      radial-gradient(circle at 55% -12%, rgba(255, 212, 76, 0.18), transparent 28rem),
      linear-gradient(180deg, #fffdf8 0%, #f8f6f0 48%, #fffaf0 100%);
  }

  body.admin-mode .admin-desktop-sidebar {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 240, 0.92)),
      #fff;
    border-right: 1px solid rgba(224, 190, 105, 0.58);
    box-shadow: 18px 0 50px rgba(82, 58, 8, 0.055);
    color: #22190f;
    display: grid;
    grid-template-rows: auto auto auto auto 1fr;
    gap: 18px;
    height: 100dvh;
    left: 0;
    overflow-y: auto;
    padding: 22px 18px;
    position: fixed;
    top: 0;
    width: 260px;
    z-index: 30;
  }

  body.admin-mode .admin-sidebar-brand {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 0 6px 14px;
  }

  body.admin-mode .admin-sidebar-brand img {
    aspect-ratio: 1;
    height: 44px;
    object-fit: contain;
    width: 44px;
  }

  body.admin-mode .admin-sidebar-brand strong {
    display: block;
    font-size: 21px;
    font-weight: 950;
    line-height: 1;
  }

  body.admin-mode .admin-sidebar-brand span {
    color: #d28400;
    display: block;
    font-size: 12px;
    font-weight: 850;
    margin-top: 3px;
  }

  body.admin-mode .admin-sidebar-section {
    display: grid;
    gap: 4px;
  }

  body.admin-mode .admin-sidebar-section > span {
    color: #897b62;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0 10px 5px;
    text-transform: uppercase;
  }

  body.admin-mode .admin-rail-link {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 20px;
    color: #2b2115;
    display: grid;
    gap: 12px;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 54px;
    padding: 8px 10px;
    text-align: left;
  }

  body.admin-mode .admin-rail-link span {
    display: grid;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.1;
  }

  body.admin-mode .admin-rail-link small {
    color: #74684d;
    font-size: 11px;
    font-weight: 750;
    margin-top: 3px;
  }

  body.admin-mode .admin-rail-icon {
    align-items: center;
    background: #fff7d9;
    border: 1px solid transparent;
    border-radius: 13px;
    color: #cf8500;
    display: flex;
    font-size: 18px;
    height: 34px;
    justify-content: center;
    line-height: 1;
    width: 34px;
  }

  body.admin-mode .admin-rail-link.admin-tab-active,
  body.admin-mode .admin-rail-link:hover {
    background:
      radial-gradient(circle at 100% 0%, rgba(255, 205, 61, 0.2), transparent 62%),
      #fff3d2;
    box-shadow: inset 4px 0 0 #f5a400, 0 12px 26px rgba(150, 100, 0, 0.08);
    color: #a96d00;
  }

  body.admin-mode .admin-rail-link.admin-tab-active .admin-rail-icon,
  body.admin-mode .admin-rail-link:hover .admin-rail-icon {
    background: linear-gradient(180deg, #ffcf39, #f6a400);
    border-color: rgba(182, 117, 0, 0.22);
    color: #fff;
  }

  body.admin-mode .admin-sidebar-footer {
    align-self: end;
    border-top: 1px solid rgba(224, 190, 105, 0.54);
    color: #74684d;
    display: grid;
    gap: 5px;
    margin-top: 14px;
    padding: 16px 8px 0;
  }

  body.admin-mode .admin-sidebar-footer span {
    color: #9b8b70;
    font-size: 11px;
    font-weight: 800;
  }

  body.admin-mode .admin-sidebar-footer strong {
    color: #078b5d;
    font-size: 12px;
    font-weight: 850;
  }

  body.admin-mode .pos-header,
  body.admin-mode .admin-view {
    margin-left: 260px;
  }

  body.admin-mode .pos-header {
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(224, 190, 105, 0.58);
    box-shadow: none;
    min-height: 74px;
    position: sticky;
    top: 0;
    z-index: 20;
  }

  body.admin-mode #menuButton {
    display: none;
  }

  body.admin-mode .pos-header::before {
    content: "";
    display: none;
  }

  body.admin-mode .pos-header-actions {
    grid-column: 4;
  }

  body.admin-mode .admin-view {
    padding: 24px 30px 34px;
  }

  body.admin-mode .admin-toolbar {
    align-items: center;
    grid-template-columns: minmax(260px, auto) minmax(280px, 1fr) auto;
    margin-bottom: 18px;
  }

  body.admin-mode .admin-toolbar h2 {
    font-size: clamp(34px, 3vw, 50px);
  }

  body.admin-mode .admin-toolbar .header-actions {
    gap: 12px;
  }

  body.admin-mode .admin-toolbar .header-actions button,
  body.admin-mode .language-toggle {
    border-radius: 14px;
  }

  body.admin-mode .admin-tabs {
    backdrop-filter: blur(18px);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 240, 0.88)),
      #fff;
    border: 1px solid rgba(224, 190, 105, 0.62);
    border-radius: 999px;
    box-shadow: 0 14px 42px rgba(76, 54, 12, 0.09);
    justify-content: center;
    margin: 0 auto 18px;
    max-width: 860px;
    position: sticky;
    top: 84px;
    z-index: 12;
  }

  body.admin-mode .admin-tab {
    border-radius: 999px;
    min-width: 96px;
  }

  body.admin-mode .report-filter-panel {
    border-radius: 18px;
    box-shadow: 0 18px 52px rgba(76, 54, 12, 0.075);
    margin-bottom: 18px;
  }

  body.admin-mode .fair-kpi-grid {
    gap: 16px;
  }

  body.admin-mode .report-kpi {
    border-radius: 18px;
    min-height: 150px;
    padding: 24px;
  }

  body.admin-mode .fair-kpi-grid > .kpi-sales,
  body.admin-mode .fair-kpi-grid > .kpi-products {
    background:
      radial-gradient(circle at 14% 82%, rgba(255, 167, 0, 0.26), transparent 28%),
      linear-gradient(135deg, #102031 0%, #09131f 100%);
    border-color: rgba(255, 176, 0, 0.72);
    box-shadow: 0 18px 50px rgba(9, 19, 31, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  body.admin-mode .fair-kpi-grid > .kpi-sales span,
  body.admin-mode .fair-kpi-grid > .kpi-sales small,
  body.admin-mode .fair-kpi-grid > .kpi-products span,
  body.admin-mode .fair-kpi-grid > .kpi-products small {
    color: rgba(255, 255, 255, 0.78);
  }

  body.admin-mode .fair-kpi-grid > .kpi-sales strong,
  body.admin-mode .fair-kpi-grid > .kpi-products strong {
    color: #fff;
  }

  body.admin-mode .fair-kpi-grid > .kpi-sales::after,
  body.admin-mode .fair-kpi-grid > .kpi-products::after {
    background: rgba(255, 166, 0, 0.16);
    border-color: rgba(255, 178, 35, 0.42);
    color: #ffb21f;
  }

  body.admin-mode .fair-kpi-grid > .kpi-sales::before,
  body.admin-mode .fair-kpi-grid > .kpi-products::before {
    background:
      linear-gradient(135deg, transparent 0 18%, rgba(255, 169, 0, 0.95) 18% 22%, transparent 22% 38%, rgba(255, 169, 0, 0.95) 38% 42%, transparent 42% 62%, rgba(255, 169, 0, 0.95) 62% 66%, transparent 66%),
      radial-gradient(220px circle at var(--rb-x) var(--rb-y), rgba(255, 198, 49, 0.24), transparent 60%);
    bottom: 16px;
    content: "";
    height: 34px;
    left: 20px;
    opacity: 0.22;
    position: absolute;
    right: 72px;
    top: auto;
  }

  body.admin-mode .overview-section {
    border-radius: 18px;
    box-shadow: 0 18px 52px rgba(76, 54, 12, 0.07);
    padding: 20px;
  }
}

@media print {
  body {
    background: #fff;
  }

  #app,
  dialog {
    display: none !important;
  }

  .receipt-sheet {
    display: block;
    color: #000;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.35;
    margin: 0;
    width: 72mm;
  }

  .receipt {
    padding: 0;
  }

  .receipt-logo {
    display: block;
    height: 28mm;
    margin: 0 auto 4px;
    object-fit: contain;
    width: 28mm;
  }

  .receipt h1,
  .receipt p {
    margin: 0;
  }

  .receipt h1 {
    font-size: 18px;
    text-align: center;
    margin-bottom: 6px;
  }

  .receipt p {
    white-space: pre-line;
  }

  .receipt hr {
    border: 0;
    border-top: 1px dashed #000;
    margin: 8px 0;
  }

  .receipt-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
  }

  .receipt-items {
    display: grid;
    gap: 5px;
  }

  .receipt-total {
    font-size: 15px;
    font-weight: 800;
  }
}
