/* ==========================================================================
   QRMenu — Components
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------ */
.btn {
  --btn-bg: var(--ink-700);
  --btn-tx: var(--tx);
  --btn-line: var(--line-firm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 9px 16px;
  min-height: 40px;
  border: 1px solid var(--btn-line);
  border-radius: var(--r-tight);
  background: var(--btn-bg);
  color: var(--btn-tx);
  font-size: var(--t-sm);
  font-weight: 550;
  letter-spacing: 0.005em;
  transition: background var(--quick), border-color var(--quick), transform var(--quick);
}
.btn:hover { background: var(--ink-600); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary {
  --btn-bg: var(--brass);
  --btn-tx: #241A05;
  --btn-line: transparent;
  font-weight: 600;
}
.btn-primary:hover { background: var(--brass-lit); }

.btn-wine { --btn-bg: var(--wine); --btn-tx: #FFF3F5; --btn-line: transparent; }
.btn-wine:hover { background: var(--wine-lit); }

.btn-ghost { --btn-bg: transparent; --btn-line: var(--line-firm); }
.btn-ghost:hover { background: rgba(240, 228, 202, 0.05); border-color: var(--line-loud); }

.btn-bare { --btn-bg: transparent; --btn-line: transparent; padding-inline: 8px; color: var(--tx-soft); }
.btn-bare:hover { background: rgba(240, 228, 202, 0.06); color: var(--tx); }

.btn-danger { --btn-bg: transparent; --btn-line: rgba(212, 83, 76, 0.4); --btn-tx: #E9877F; }
.btn-danger:hover { background: rgba(212, 83, 76, 0.12); border-color: var(--st-danger); }

.btn-sm { min-height: 32px; padding: 5px 11px; font-size: var(--t-xs); }
.btn-lg { min-height: 50px; padding: 13px 26px; font-size: var(--t-base); }
.btn-block { width: 100%; }
.btn-icon { padding: 0; width: 36px; min-height: 36px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-tight) 0 0 var(--r-tight); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-tight) var(--r-tight) 0; }
.btn-group .btn[aria-pressed="true"] { background: var(--ink-500); color: var(--tx); z-index: 1; }

/* --- Panels ------------------------------------------------------------- */
.panel {
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--lift-1);
}
.panel-pad { padding: var(--s-5); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel-head h3 { font-size: var(--t-base); font-weight: 600; letter-spacing: -0.005em; }
.panel-head p { font-size: var(--t-xs); color: var(--tx-mute); margin-top: 2px; }
.panel-body { padding: var(--s-5); }
.panel-foot {
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.14);
  border-radius: 0 0 var(--r-card) var(--r-card);
}

/* Paper: only for things that are literally printed ---------------------- */
.paper {
  background: var(--linen-50);
  color: var(--on-linen);
  border-radius: 4px;
  box-shadow: var(--lift-paper);
}
.paper .muted { color: var(--on-linen-mute); }
.paper .soft { color: var(--on-linen-soft); }
.paper hr { border-top: 1px solid var(--line-paper); }

/* --- Metric tiles ------------------------------------------------------- */
.metric {
  padding: var(--s-4) var(--s-5) var(--s-5);
  background: var(--ink-850);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  position: relative;
  overflow: hidden;
}
.metric::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--m-tint, var(--brass));
  opacity: 0.55;
}
.metric-label { font-size: var(--t-xs); color: var(--tx-mute); }
.metric-value {
  font-family: var(--face-num);
  font-size: var(--t-xl);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-top: var(--s-2);
  line-height: 1;
}
.metric-value small { font-size: var(--t-md); color: var(--tx-mute); font-weight: 400; }
.metric-foot { margin-top: var(--s-3); font-size: var(--t-xs); color: var(--tx-mute); display: flex; align-items: center; gap: 6px; }
.delta { font-family: var(--face-num); font-size: var(--t-xs); }
.delta-up { color: var(--st-ready); }
.delta-down { color: var(--st-danger); }

/* --- Badges & pills ----------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-round);
  font-size: var(--t-xs);
  font-weight: 550;
  line-height: 1.5;
  background: rgba(240, 228, 202, 0.07);
  color: var(--tx-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.badge-plain::before { display: none; }

.badge[data-state="submitted"] { color: #A8C4F2; border-color: rgba(94, 143, 224, 0.35); background: rgba(94, 143, 224, 0.13); }
.badge[data-state="accepted"]  { color: #BEB0F0; border-color: rgba(134, 114, 220, 0.35); background: rgba(134, 114, 220, 0.13); }
.badge[data-state="preparing"] { color: #F0C775; border-color: rgba(224, 163, 46, 0.35); background: rgba(224, 163, 46, 0.13); }
.badge[data-state="ready"]     { color: #85D3A5; border-color: rgba(69, 171, 110, 0.35); background: rgba(69, 171, 110, 0.13); }
.badge[data-state="served"]    { color: #C3BBA9; border-color: var(--line-firm); }
.badge[data-state="closed"]    { color: var(--tx-mute); }
.badge[data-state="danger"]    { color: #ECA09A; border-color: rgba(212, 83, 76, 0.38); background: rgba(212, 83, 76, 0.13); }
.badge[data-state="draft"]     { color: var(--tx-mute); border-style: dashed; }
.badge[data-state="live"]      { color: #85D3A5; border-color: rgba(69, 171, 110, 0.4); background: rgba(69, 171, 110, 0.12); }
.badge[data-state="live"]::before { animation: pulse 2.2s var(--ease) infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.72); }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-round);
  border: 1px solid var(--line-firm);
  background: transparent;
  color: var(--tx-soft);
  font-size: var(--t-sm);
  transition: all var(--quick);
}
.chip:hover { border-color: var(--line-loud); color: var(--tx); }
.chip[aria-pressed="true"] {
  background: var(--brass);
  border-color: var(--brass);
  color: #241A05;
  font-weight: 550;
}
.chip-count { font-family: var(--face-num); font-size: 11px; opacity: 0.7; }

/* --- Forms -------------------------------------------------------------- */
.field { display: block; }
.field + .field { margin-top: var(--s-4); }
.field-label {
  display: block;
  font-size: var(--t-sm);
  font-weight: 550;
  margin-bottom: 7px;
  color: var(--tx-soft);
}
.field-label .req { color: var(--brass-lit); margin-left: 2px; }
.field-hint { font-size: var(--t-xs); color: var(--tx-mute); margin-top: 6px; }
.field-error { font-size: var(--t-xs); color: #ECA09A; margin-top: 6px; }

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 13px;
  min-height: 42px;
  background: var(--ink-900);
  border: 1px solid var(--line-firm);
  border-radius: var(--r-tight);
  color: var(--tx);
  font-size: var(--t-base);
  transition: border-color var(--quick), background var(--quick);
}
.input::placeholder, .textarea::placeholder { color: var(--tx-faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-loud); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brass);
  background: var(--ink-850);
  box-shadow: 0 0 0 3px rgba(217, 172, 85, 0.14);
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.input[aria-invalid="true"] { border-color: var(--st-danger); }
.input-num { font-family: var(--face-num); }

.select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23948B79' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 12px;
}

.input-group { display: flex; }
.input-group .input { border-radius: var(--r-tight) 0 0 var(--r-tight); }
.input-group .input-addon {
  display: flex; align-items: center;
  padding: 0 13px;
  background: var(--ink-750);
  border: 1px solid var(--line-firm);
  border-left: 0;
  border-radius: 0 var(--r-tight) var(--r-tight) 0;
  font-size: var(--t-sm);
  color: var(--tx-mute);
  white-space: nowrap;
}
.input-group.prefix .input { border-radius: 0 var(--r-tight) var(--r-tight) 0; }
.input-group.prefix .input-addon {
  border-left: 1px solid var(--line-firm);
  border-right: 0;
  border-radius: var(--r-tight) 0 0 var(--r-tight);
}

.search {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.search .input { padding-left: 38px; }
.search svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--tx-faint);
  pointer-events: none;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  cursor: pointer;
  font-size: var(--t-sm);
  line-height: 1.5;
}
.check input {
  appearance: none;
  width: 18px; height: 18px;
  margin-top: 1px;
  flex: none;
  border: 1px solid var(--line-loud);
  border-radius: 4px;
  background: var(--ink-900);
  transition: all var(--quick);
}
.check input[type="radio"] { border-radius: 50%; }
.check input:checked {
  background: var(--brass);
  border-color: var(--brass);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.4 5.8 10 11 4.4' fill='none' stroke='%23241A05' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
}
.check input[type="radio"]:checked {
  background-image: none;
  box-shadow: inset 0 0 0 4px var(--ink-900);
}

.toggle {
  appearance: none;
  width: 40px; height: 23px;
  flex: none;
  border-radius: var(--r-round);
  background: var(--ink-600);
  border: 1px solid var(--line-firm);
  position: relative;
  cursor: pointer;
  transition: background var(--quick);
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--tx-soft);
  transition: transform var(--quick), background var(--quick);
}
.toggle:checked { background: var(--brass); border-color: var(--brass); }
.toggle:checked::after { transform: translateX(17px); background: #241A05; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) 0;
}
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch-row strong { display: block; font-size: var(--t-sm); font-weight: 550; }
.switch-row span { font-size: var(--t-xs); color: var(--tx-mute); }

.form-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.fieldset-title {
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--tx);
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}

/* --- Tables ------------------------------------------------------------- */
.table-scroll { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-sm);
}
table.data thead th {
  text-align: left;
  font-weight: 550;
  font-size: var(--t-xs);
  color: var(--tx-mute);
  padding: 11px var(--s-5);
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
table.data tbody td {
  padding: 13px var(--s-5);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background var(--quick); }
table.data tbody tr:hover { background: rgba(240, 228, 202, 0.035); }
table.data td.num, table.data th.num { font-family: var(--face-num); text-align: right; font-variant-numeric: tabular-nums; }
table.data .cell-main { font-weight: 550; color: var(--tx); }
table.data .cell-sub { font-size: var(--t-xs); color: var(--tx-mute); margin-top: 1px; }
table.data .cell-actions { text-align: right; white-space: nowrap; }
table.data tr[data-selected="true"] { background: rgba(217, 172, 85, 0.07); }

.thumb {
  width: 40px; height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  background: var(--ink-700);
  display: grid;
  place-items: center;
  font-size: var(--t-xs);
  color: var(--tx-faint);
  overflow: hidden;
}
.thumb-lg { width: 60px; height: 60px; border-radius: 10px; }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: linear-gradient(150deg, var(--brass-deep), var(--wine));
  color: #FFF3DC;
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.avatar-lg { width: 46px; height: 46px; font-size: var(--t-sm); }

/* --- Toolbar ------------------------------------------------------------ */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
}

/* --- Tabs --------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: var(--s-1);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 11px 15px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--tx-mute);
  font-size: var(--t-sm);
  font-weight: 550;
  white-space: nowrap;
  transition: color var(--quick), border-color var(--quick);
}
.tab:hover { color: var(--tx-soft); }
.tab[aria-selected="true"] { color: var(--tx); border-bottom-color: var(--brass); }
.tab-count {
  font-family: var(--face-num);
  font-size: 11px;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: var(--r-round);
  background: rgba(240, 228, 202, 0.09);
}

/* --- Docket: the order ticket ------------------------------------------
   A real kitchen chit. The perforated top edge is information, not
   decoration: it marks anything that represents a printable order ticket. */
.docket {
  position: relative;
  background: var(--ink-850);
  border: 1px solid var(--line-firm);
  border-radius: 3px;
  padding: var(--s-4);
  padding-top: calc(var(--s-4) + 4px);
}
.docket::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background:
    repeating-radial-gradient(circle at 5px 0, transparent 0 3px, var(--ink-900) 3px 6px);
  background-size: 10px 6px;
  border-radius: 3px 3px 0 0;
}
.docket-num {
  font-family: var(--face-num);
  font-size: var(--t-md);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.docket-lines { margin: var(--s-3) 0; display: grid; gap: 7px; }
.docket-line { display: flex; gap: var(--s-3); align-items: baseline; font-size: var(--t-sm); }
.docket-qty {
  font-family: var(--face-num);
  font-weight: 600;
  min-width: 22px;
  color: var(--brass-lit);
}
.docket-mods { font-size: var(--t-xs); color: var(--tx-mute); padding-left: 34px; }
.docket-mods li { list-style: none; }
.docket-mods li::before { content: "+ "; color: var(--tx-faint); }

/* --- Order lifecycle rail ----------------------------------------------- */
.lifecycle {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.lifecycle::-webkit-scrollbar { display: none; }
.life-step {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 7px 14px 7px 22px;
  font-size: var(--t-xs);
  font-weight: 550;
  color: var(--tx-faint);
  background: var(--ink-800);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%);
  margin-right: -8px;
  white-space: nowrap;
}
.life-step:first-child { padding-left: 14px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); }
.life-step:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 10px 50%); margin-right: 0; }
.life-step[data-done="true"] { background: var(--ink-600); color: var(--tx-soft); }
.life-step[data-current="true"] { background: var(--brass); color: #241A05; }

/* --- Timeline ----------------------------------------------------------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line-firm);
}
.tl-item { position: relative; padding-bottom: var(--s-5); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -24px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink-600);
  border: 2px solid var(--ink-850);
  box-shadow: 0 0 0 1px var(--line-firm);
}
.tl-item[data-accent="true"]::before { background: var(--brass); box-shadow: 0 0 0 1px var(--brass-deep); }
.tl-time { font-family: var(--face-num); font-size: var(--t-xs); color: var(--tx-mute); }
.tl-title { font-size: var(--t-sm); font-weight: 550; margin-top: 1px; }
.tl-note { font-size: var(--t-xs); color: var(--tx-mute); margin-top: 3px; }

/* --- Empty & loading ---------------------------------------------------- */
.empty {
  padding: var(--s-8) var(--s-5);
  text-align: center;
  max-width: 420px;
  margin-inline: auto;
}
.empty-mark {
  width: 52px; height: 52px;
  margin: 0 auto var(--s-4);
  display: grid; place-items: center;
  border-radius: var(--r-card);
  border: 1px dashed var(--line-loud);
  color: var(--tx-faint);
}
.empty h3 { font-size: var(--t-md); margin-bottom: 6px; }
.empty p { font-size: var(--t-sm); color: var(--tx-mute); margin-bottom: var(--s-4); }

.skel {
  background: linear-gradient(100deg, var(--ink-800) 30%, var(--ink-750) 50%, var(--ink-800) 70%);
  background-size: 240% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-tight);
}
@keyframes shimmer { to { background-position: -240% 0; } }
.skel-line { height: 11px; }
.skel-line + .skel-line { margin-top: 9px; }

.spinner {
  width: 17px; height: 17px;
  border: 2px solid var(--line-loud);
  border-top-color: var(--brass);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Modal -------------------------------------------------------------- */
.modal-veil {
  position: fixed;
  inset: 0;
  background: var(--veil);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: var(--s-4);
  z-index: 60;
}
.modal-veil[hidden] { display: none; }
.modal {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--ink-800);
  border: 1px solid var(--line-firm);
  border-radius: var(--r-card);
  box-shadow: var(--lift-2);
  animation: modal-in 220ms var(--ease);
}
.modal-wide { width: min(880px, 100%); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
}
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5) var(--s-5) var(--s-4);
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: var(--t-md); }
.modal-head p { font-size: var(--t-xs); color: var(--tx-mute); margin-top: 3px; }
.modal-body { padding: var(--s-5); }
.modal-foot {
  display: flex; justify-content: flex-end; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.16);
}

/* --- Toast -------------------------------------------------------------- */
.toast-dock {
  position: fixed;
  bottom: var(--s-5);
  right: var(--s-5);
  display: grid;
  gap: var(--s-2);
  z-index: 80;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 12px var(--s-4);
  min-width: 250px;
  background: var(--ink-700);
  border: 1px solid var(--line-firm);
  border-left: 3px solid var(--brass);
  border-radius: var(--r-tight);
  box-shadow: var(--lift-2);
  font-size: var(--t-sm);
  pointer-events: auto;
  animation: toast-in 240ms var(--ease);
}
.toast[data-kind="ok"] { border-left-color: var(--st-ready); }
.toast[data-kind="bad"] { border-left-color: var(--st-danger); }
@keyframes toast-in { from { opacity: 0; transform: translateX(14px); } }

/* --- Notice ------------------------------------------------------------- */
.notice {
  display: flex; gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-tight);
  border: 1px solid var(--line-firm);
  background: rgba(240, 228, 202, 0.04);
  font-size: var(--t-sm);
  line-height: 1.55;
}
.notice svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--tx-mute); }
.notice strong { display: block; margin-bottom: 2px; }
.notice[data-kind="warn"] { border-color: rgba(224, 163, 46, 0.34); background: rgba(224, 163, 46, 0.08); }
.notice[data-kind="warn"] svg { color: var(--st-preparing); }
.notice[data-kind="bad"] { border-color: rgba(212, 83, 76, 0.34); background: rgba(212, 83, 76, 0.08); }
.notice[data-kind="bad"] svg { color: var(--st-danger); }
.notice[data-kind="ok"] { border-color: rgba(69, 171, 110, 0.34); background: rgba(69, 171, 110, 0.08); }
.notice[data-kind="ok"] svg { color: var(--st-ready); }

/* --- Pagination --------------------------------------------------------- */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--line);
  font-size: var(--t-xs);
  color: var(--tx-mute);
}
.pager-nav { display: flex; gap: var(--s-1); }
.pager-nav button {
  min-width: 30px; height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-firm);
  border-radius: var(--r-tight);
  background: transparent;
  color: var(--tx-soft);
  font-family: var(--face-num);
  font-size: var(--t-xs);
  transition: all var(--quick);
}
.pager-nav button:hover { background: var(--ink-700); }
.pager-nav button[aria-current="page"] { background: var(--brass); border-color: var(--brass); color: #241A05; font-weight: 600; }

/* --- QR mark (drawn, not an image) -------------------------------------- */
.qr {
  --qr-cell: 6px;
  display: grid;
  grid-template-columns: repeat(21, var(--qr-cell));
  grid-auto-rows: var(--qr-cell);
  gap: 0;
  padding: calc(var(--qr-cell) * 2);
  background: #fff;
  border-radius: 6px;
  width: max-content;
}
.qr i { background: transparent; }
.qr i.on { background: #12100D; }
.qr-lg { --qr-cell: 9px; }
.qr-sm { --qr-cell: 3.5px; }

/* --- Key/value list ----------------------------------------------------- */
.kv { display: grid; gap: 0; }
.kv-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-sm);
}
.kv-row:last-child { border-bottom: 0; }
.kv-row dt { color: var(--tx-mute); font-size: var(--t-xs); }
.kv-row dd { text-align: right; font-weight: 500; }
.paper .kv-row { border-color: var(--line-paper); }
.paper .kv-row dt { color: var(--on-linen-mute); }

/* --- Bar & sparkline charts (pure CSS/SVG, no library) ------------------ */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 132px;
}
.bars .bar {
  flex: 1;
  min-width: 6px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--brass) 0%, var(--brass-deep) 100%);
  opacity: 0.85;
  position: relative;
  transition: opacity var(--quick);
}
.bars .bar:hover { opacity: 1; }
.bars .bar[data-dim="true"] { background: var(--ink-600); }
.bars-axis {
  display: flex; justify-content: space-between;
  margin-top: var(--s-2);
  font-family: var(--face-num);
  font-size: 10px;
  color: var(--tx-faint);
}

.hbar-row { display: grid; grid-template-columns: 1fr 74px; gap: var(--s-4); align-items: center; padding: 8px 0; }
.hbar-label { font-size: var(--t-sm); }
.hbar-track { height: 6px; border-radius: 3px; background: var(--ink-700); overflow: hidden; margin-top: 6px; }
.hbar-fill { height: 100%; border-radius: 3px; background: var(--brass); }
.hbar-val { font-family: var(--face-num); font-size: var(--t-sm); text-align: right; color: var(--tx-soft); }

.spark { width: 100%; height: 42px; display: block; }
.spark path.line { fill: none; stroke: var(--brass); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.spark path.area { stroke: none; }

/* --- Segmented / drawer helpers ---------------------------------------- */
.drawer-veil {
  position: fixed; inset: 0;
  background: var(--veil);
  z-index: 70;
}
.drawer-veil[hidden] { display: none; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  background: var(--ink-800);
  border-left: 1px solid var(--line-firm);
  box-shadow: var(--lift-2);
  z-index: 71;
  display: flex;
  flex-direction: column;
  animation: drawer-in 260ms var(--ease);
}
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } }

/* ==========================================================================
   Shared across areas — every page loads this file, so anything used by
   more than one shell lives here rather than in an area stylesheet.
   ========================================================================== */

/* --- from marketing.css ------------------------------------------ */
.logo { display: flex; align-items: center; gap: 10px; flex: none; }

.logo-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--brass);
  color: #241A05;
  font-family: var(--face-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  padding-bottom: 2px;
}

.logo-word {
  font-family: var(--face-display);
  font-size: var(--t-md);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-word em { font-style: normal; color: var(--brass-lit); }

.phone {
  position: absolute;
  right: 2%; top: 0;
  width: 232px;
  border-radius: 30px;
  padding: 9px;
  background: linear-gradient(160deg, #342D22, #16130F);
  border: 1px solid var(--line-firm);
  box-shadow: 0 50px 70px -38px #000, var(--lift-2);
  transform: rotate(3deg);
}

.phone-screen {
  border-radius: 22px;
  overflow: hidden;
  background: var(--ink-900);
}

.phone-top {
  padding: 16px 14px 12px;
  background: linear-gradient(170deg, #241D14, var(--ink-850));
  border-bottom: 1px solid var(--line);
}

.phone-top small { font-size: 9px; color: var(--tx-mute); }

.phone-top strong { display: block; font-family: var(--face-display); font-size: 15px; margin-top: 2px; }

.phone-cats { display: flex; gap: 5px; padding: 10px 14px 4px; }

.phone-cats span {
  font-size: 9px;
  padding: 3px 8px;
  border-radius: var(--r-round);
  border: 1px solid var(--line-firm);
  color: var(--tx-mute);
}

.phone-cats span:first-child { background: var(--brass); border-color: var(--brass); color: #241A05; }

.phone-item {
  display: flex; gap: 9px; align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}

.phone-item .ph-img {
  width: 38px; height: 38px;
  border-radius: 8px;
  flex: none;
  background: linear-gradient(140deg, var(--ink-600), var(--ink-750));
}

.phone-item b { display: block; font-size: 10px; font-weight: 550; }

.phone-item em { font-style: normal; font-size: 9px; color: var(--tx-mute); }

.phone-item .ph-price { margin-left: auto; font-family: var(--face-num); font-size: 10px; color: var(--brass-lit); }

.phone-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 10px 12px 12px;
  padding: 9px 12px;
  border-radius: var(--r-round);
  background: var(--brass);
  color: #241A05;
  font-size: 10px;
  font-weight: 650;
}

.plan-lines { display: grid; gap: 10px; font-size: var(--t-sm); }

.plan-lines li { display: flex; gap: 10px; align-items: flex-start; list-style: none; color: var(--tx-soft); }

.plan-lines svg { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--brass-lit); }

.plan-lines li[data-off="true"] { color: var(--tx-faint); }

.plan-lines li[data-off="true"] svg { color: var(--tx-faint); }

.section-linen .plan-lines li { color: var(--on-linen-soft); }

/* --- from backoffice.css ------------------------------------------ */
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-tight);
  border: 1px solid transparent;
  background: transparent;
  color: var(--tx-soft);
  position: relative;
  transition: all var(--quick);
}

.icon-btn:hover { background: rgba(240, 228, 202, 0.06); color: var(--tx); }

.icon-btn svg { width: 17px; height: 17px; }

.icon-btn .dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--st-danger);
  border: 2px solid var(--ink-900);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}

.page-head h1 {
  font-size: var(--t-lg);
  font-weight: 600;
  letter-spacing: -0.018em;
}

.page-head p { font-size: var(--t-sm); color: var(--tx-mute); margin-top: 4px; max-width: 68ch; }

.page-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

.diet-tags { display: flex; gap: 5px; margin-top: 5px; }

.diet {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--r-round);
  border: 1px solid var(--line-firm);
  color: var(--tx-mute);
}

.diet[data-kind="veg"] { color: #8FD09A; border-color: rgba(78, 127, 73, 0.5); }

.diet[data-kind="spicy"] { color: #E9A199; border-color: rgba(212, 83, 76, 0.4); }

.invoice-total {
  display: flex; justify-content: space-between;
  padding-top: var(--s-4);
  margin-top: var(--s-3);
  border-top: 2px solid var(--on-linen);
  font-size: var(--t-md);
  font-weight: 600;
}

.invoice-total span:last-child { font-family: var(--face-num); }

.stamp {
  display: inline-block;
  padding: 5px 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  transform: rotate(-4deg);
  opacity: 0.75;
}

.stamp[data-kind="paid"] { color: #2E7D4F; }

.stamp[data-kind="due"] { color: #A87C2C; }

.stamp[data-kind="overdue"] { color: #B03A33; }

.stamp[data-kind="void"] { color: #857A67; }

/* --- from customer.css ------------------------------------------ */
.g-logo {
  width: 68px; height: 68px;
  border-radius: 18px;
  flex: none;
  display: grid; place-items: center;
  background: var(--brand-accent);
  color: var(--brand-accent-ink);
  font-family: var(--face-display);
  font-size: 26px;
  font-weight: 600;
  border: 3px solid var(--brand-surface);
}

.live-pip {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--st-ready);
  animation: pulse 2.2s var(--ease) infinite;
}

.welcome .g-logo { margin: 0 auto; width: 76px; height: 76px; font-size: 30px; }

/* --- from kitchen.css ------------------------------------------ */
.tick-note {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 3px;
  background: rgba(224, 163, 46, 0.13);
  border-left: 2px solid var(--st-preparing);
  font-size: var(--t-sm);
  color: #F0C775;
}

/* --- printed line-item table (invoices, receipts) --- */
table.invoice-lines { width: 100%; border-collapse: collapse; margin-top: var(--s-6); font-size: var(--t-sm); }
table.invoice-lines th {
  text-align: left;
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--on-linen-mute);
  padding: 8px 0;
  border-bottom: 1px solid var(--line-paper);
}
table.invoice-lines td { padding: 11px 0; border-bottom: 1px solid var(--line-paper); vertical-align: top; }
table.invoice-lines td.num, table.invoice-lines th.num { text-align: right; font-family: var(--face-num); }

/* Taller variant for a chart that has to hold a full-height column. */
.bars-tall { height: 258px; }
