/* Presentation layer shared by the POS screens. */
[hidden] { display: none !important; }
#view-settings .settings-layout { display: block; }
.sidebar #settings-subnav { display: grid; gap: 4px; margin: 0 0 6px 18px; padding: 4px 0 4px 12px; border: 0; border-left: 1px solid #426359; border-radius: 0; background: transparent; }
.sidebar #settings-subnav[hidden] { display: none; }
.sidebar .settings-nav-item { padding: 10px 12px; min-height: 40px; font-size: 13px; color: #b9d0c8; background: transparent; }
.sidebar .settings-nav-item[aria-current="page"] { color: #124d3e; background: #d4f4e5; }
.sidebar .settings-nav-item:hover { color: #124d3e; background: #d4f4e5; }
.settings-chevron { margin-left: auto; transition: transform .15s; }
[data-view="settings"][aria-expanded="true"] .settings-chevron { transform: rotate(180deg); }
@media (min-width: 961px) and (max-width: 1280px) { .sidebar #settings-subnav { margin-left: 0; padding-left: 0; border-left: 0; } .sidebar .settings-nav-item { padding: 8px 3px; font-size: 10px; flex-wrap: wrap; justify-content: center; text-align: center; } }
@media (max-width: 960px) { .sidebar #settings-subnav { flex-shrink: 0; display: flex; margin: 0; padding: 0 8px; align-items: center; } .sidebar .settings-nav-item { white-space: nowrap; } }
.settings-content[hidden], .settings-nav-item[hidden] { display: none; }
.settings-nav-item:not([aria-current="page"]) { background: transparent; color: #617570; }
.settings-form { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); align-items: end; gap: 14px; padding: 20px; margin: 18px 0; background: white; border: 1px solid #dbe7e2; border-radius: 12px; }
.settings-form label { display: grid; gap: 8px; font-size: 13px; }
.settings-form input, .settings-form select { width: 100%; min-width: 0; padding: 11px; min-height: 44px; font: inherit; border: 1px solid #dbe7e2; border-radius: 8px; }
#coupon-error { grid-column: 1 / -1; color: #b42318; margin: 0; }
.settings-record { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; margin: 12px 0; border: 1px solid #dbe7e2; background: white; border-radius: 12px; }
.settings-record p { margin: 8px 0; }.settings-record small { color: #617570; }
body.admin-connected #admin-shift-panel { display: block; background: #f5faf7; }
body.admin-connected #admin-shift-panel[hidden] { display: none; }
#admin-shift-panel > div { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(180px, 280px) minmax(180px, 280px) auto; align-items: end; gap: 12px; }
#admin-shift-panel > div > strong, #admin-shift-panel > div > p { align-self: center; }
#admin-shift-panel label { display: grid; gap: 5px; color: #617570; font-size: 13px; }
#admin-shift-panel input { width: 100%; min-width: 0; }
@media (max-width: 760px) { #admin-shift-panel > div { grid-template-columns: 1fr 1fr; } #admin-shift-panel > div > strong, #admin-shift-panel > div > p { grid-column: 1 / -1; } }
.settings-order { background: white; border: 1px solid #dbe7e2; border-radius: 10px; margin: 10px 0; }
.settings-order summary { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; cursor: pointer; padding: 16px; }
.settings-order summary > span { flex: 1; font-size: 13px; color: #617570; }
.settings-order-body { padding: 0 18px 18px; border-top: 1px solid #edf2f0; font-size: 13px; }
.settings-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf2f0; }
#view-reports .section-head p { margin: 6px 0 0; color: #617570; }
.report-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0; }
.report-filters > span { margin-right: auto; font-weight: 650; }
.report-filters label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.report-filters input, .report-filters select { padding: 10px; min-height: 42px; border: 1px solid #dbe7e2; border-radius: 9px; background: white; color: #19332f; font: inherit; }
.report-tabs { display: flex; gap: 8px; overflow-x: auto; border-bottom: 1px solid #dbe7e2; margin-bottom: 18px; }
.report-tabs button { flex-shrink: 0; background: transparent; padding: 14px 20px; border: 0; border-radius: 0; border-bottom: 3px solid transparent; color: #617570; }
.report-tabs button.active { border-bottom-color: #0f766e; color: #075e58; font-weight: 700; }
#view-reports .report-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
#view-reports .metric { padding: 24px; border: 1px solid #dbe7e2; border-radius: 12px; background: white; box-shadow: none; border-top: 3px solid #bce8db; }
#view-reports .metric strong { font-size: clamp(20px,2vw,28px); color: #123e36; overflow-wrap: anywhere; }
#view-reports .report-dashboard { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.report-dashboard > section { min-width: 0; padding: 20px; background: white; border: 1px solid #dbe7e2; border-radius: 12px; grid-column: span 2; }
.report-dashboard > section:nth-child(-n+2) { grid-column: span 3; }
.report-dashboard > section[hidden] { display: none; }
.report-dashboard h3 { margin: 0 0 18px; font-size: 17px; }
.report-caption { color: #617570; font-size: 12px; margin: -8px 0 16px; }
#view-reports .bar-chart { height: 220px; display: flex; align-items: stretch; gap: 5px; padding: 16px 0 26px; border-bottom: 1px solid #dbe7e2; background: repeating-linear-gradient(to top, transparent 0, transparent 49px, #edf2f0 50px); }
#view-reports .bar { flex: 1; min-width: 0; position: relative; display: flex; align-items: flex-end; }
#view-reports .bar i { display: block; width: 100%; min-height: 0; background: linear-gradient(#14988a,#076f66); border-radius: 3px 3px 0 0; }
#view-reports .bar span { position: absolute; bottom: -22px; width: 100%; text-align: center; font-size: 10px; color: #617570; }
.report-payment-layout { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.report-donut { width: 180px; height: 180px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.report-donut > div { width: 136px; height: 136px; background: white; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; font-size: 14px; }
.report-donut small { color: #617570; }
.report-legend { flex: 1; min-width: 180px; display: grid; gap: 16px; font-size: 12px; }
.report-legend > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.report-legend span { margin-right: auto; }.report-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.report-product, .report-activity { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf2f0; font-size: 13px; }
.report-product > div, .report-activity > div:first-of-type { flex: 1; min-width: 0; }
.report-product img, .report-product-placeholder { width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.report-product small, .report-activity small { display: block; color: #617570; font-size: 11px; margin-top: 4px; }
.report-product > strong, .report-activity > div:last-child { text-align: right; flex-shrink: 0; }
.report-category { margin-bottom: 20px; font-size: 12px; }
.report-category > div:first-child { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.report-track { height: 12px; background: #edf3f0; border-radius: 4px; overflow: hidden; }.report-track i { display: block; height: 100%; background: #0f8578; border-radius: 4px; }
.report-activity-icon { padding: 10px; background: #e0f5ed; border-radius: 50%; color: #0f766e; }
.report-activity .report-paid { color: #10713e; background: #e0f7e8; padding: 2px 6px; border-radius: 8px; }
.report-empty { color: #617570; text-align: center; padding: 40px 10px; }
#report-recent, #best-sellers { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; }
#view-reports .report-focused > section { grid-column: 1 / -1; }
@media(max-width:1200px) { .report-dashboard > section { grid-column: span 3; } }
@media(max-width:700px) { #view-reports .report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } #view-reports .report-dashboard > section { grid-column: 1 / -1; } .report-filters > span { width: 100%; } #view-reports .metric { padding: 16px; } }
.settings-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { display: grid; gap: 12px; padding: 16px; background: white; border: 1px solid #dbe7e2; border-radius: 14px; }
.settings-nav-item { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 9px; background: #d4f4e5; color: #124d3e; text-decoration: none; font-weight: 600; }
.settings-content { min-width: 0; }
.settings-content .section-head { flex-wrap: wrap; gap: 12px; }
@media (max-width: 960px) { .settings-layout { grid-template-columns: 1fr; gap: 16px; } .settings-nav { display: flex; align-items: center; flex-wrap: wrap; } }
.crm-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 20px 0; }
.crm-overview article { display: grid; gap: 10px; padding: 20px; border: 1px solid #dbe7e2; border-radius: 14px; background: white; }
.crm-overview article:first-child { background: #e3f4ec; }
.crm-overview span { font-size: 13px; color: #617570; }
.crm-overview strong { font-size: 24px; overflow-wrap: anywhere; color: #075e58; }
.crm-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; background: white; border: 1px solid #dbe7e2; padding: 16px; border-radius: 14px; }
.crm-toolbar label, .crm-history-filters label, #crm-form label { display: grid; gap: 6px; font-size: 13px; }
.crm-toolbar label:first-child { flex: 1; min-width: 180px; }
.crm-toolbar input, .crm-toolbar select, .crm-history-filters input, .crm-history-filters select, #crm-form textarea { border: 1px solid #dbe7e2; border-radius: 9px; padding: 10px; min-height: 42px; font: inherit; min-width: 0; }
#view-members .member-layout { display: grid; grid-template-columns: minmax(270px, .75fr) minmax(0, 1.6fr); gap: 20px; align-items: start; }
#view-members .member-list { min-height: 0; max-height: none; overflow: visible; background: white; border: 1px solid #dbe7e2; border-radius: 14px; padding: 8px; }
#view-members .member-card { border: 0; border-bottom: 1px solid #edf2f0; border-radius: 8px; }
#view-members .member-card.active { background: #e5f5ef; }
#view-members .member-detail { min-width: 0; display: grid; gap: 18px; border-radius: 16px; }
.crm-profile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.crm-profile h2, .crm-profile p { margin: 4px 0; }
.crm-profile > button { margin-left: auto; }
.crm-progress { display: grid; gap: 10px; background: #edf7f2; padding: 16px; border-radius: 12px; }
.crm-progress progress { width: 100%; height: 9px; accent-color: #0f766e; }
.crm-progress small, .crm-contact { color: #617570; font-size: 13px; }
.crm-contact { display: grid; gap: 9px; white-space: pre-wrap; overflow-wrap: anywhere; }
.crm-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.crm-history-head h3 { margin: 0; font-size: 16px; }
.crm-history-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.crm-table-wrap { overflow: auto; max-height: 420px; overscroll-behavior: contain; border: 1px solid #dbe7e2; border-radius: 10px; }
.crm-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.crm-table th { position: sticky; top: 0; background: #eaf3ef; text-align: left; white-space: nowrap; }
.crm-table th, .crm-table td { padding: 12px; border-bottom: 1px solid #e0e8e6; }
.crm-table small { display: block; color: #617570; margin-top: 5px; }
.crm-pagination { display: flex; justify-content: space-between; gap: 10px; padding: 12px; }
#crm-editor { width: min(520px, calc(100vw - 24px)); }
#crm-error { margin: 0; color: #b42318; }
@media (max-width: 1100px) { #view-members .member-layout { grid-template-columns: 1fr; } .crm-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .crm-overview strong { font-size: 18px; } .crm-overview article { padding: 14px; } .crm-toolbar label { flex: 1; } }
:root {
  --bg: #f3f6f6;
  --panel-soft: #f0f5f4;
  --line: #e0e8e6;
  --ink: #19332f;
  --muted: #617570;
  --shadow: 0 4px 20px rgb(25 51 47 / 4%);
}

body { line-height: 1.45; }
button, input, select { touch-action: manipulation; }
button { transition: background-color .15s, border-color .15s, box-shadow .15s; }
button:disabled { cursor: not-allowed; }
:where(button, input, select, a):focus-visible {
  outline: 3px solid #299d90;
  outline-offset: 3px;
}
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px #0f766e18; }
.app-shell { grid-template-columns: 218px minmax(0, 1fr); }
.sidebar {
  background: #102e29;
  padding: 24px 14px;
  gap: 30px;
  min-width: 0;
}
.sidebar .brand-block { padding: 0 8px; }
.brand-mark { flex-shrink: 0; border-radius: 13px; background: #d4f4e5; color: #124d3e; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sidebar .brand-block span { color: #a6c2b9; font-size: 12px; }
.nav-list { gap: 5px; }
.nav-btn { min-height: 49px; border-radius: 10px; font-weight: 600; color: #b9d0c8; }
.nav-btn svg { flex-shrink: 0; }
.nav-btn:hover { background: #1b4038; }
.nav-btn.active { background: #d4f4e5; color: #124d3e; box-shadow: none; }
.sidebar .operator-panel { background: #1b3c34; border-color: #305047; box-shadow: none; }
.operator-panel strong { color: #f2faf6; }
.operator-panel span { color: #b9d0c8; }
.logout-btn { border-color: #466258; }
.workspace { padding: 24px; }
.topbar { min-height: 54px; margin-bottom: 24px; }
.topbar h1 { margin-top: 4px; font-size: 27px; letter-spacing: -.7px; }
.eyebrow { font-size: 10px; letter-spacing: .1em; }
.topbar-actions { gap: 8px; justify-content: flex-end; }
.topbar-actions .secondary-btn { padding-inline: 12px; }
.role-pill { background: #e5eeeb; border-color: transparent; }
.shift-strip { gap: 12px; margin-bottom: 20px; }
.shift-tile { padding: 15px 17px; border-radius: 12px; box-shadow: none; }
.shift-tile:first-child { background: #e6f3ed; border-color: #cae3d7; }
.shift-tile strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.sales-grid { gap: 20px; grid-template-columns: minmax(0, 1fr) 360px; }
.menu-pane, .order-pane { border-radius: 16px; padding: 18px; min-height: 0; }
.menu-pane { background: transparent; border: 0; box-shadow: none; padding: 0; }
.menu-pane .section-head { flex-wrap: wrap; gap: 12px; }
.menu-pane h2 { margin-top: 3px; font-size: 22px; }
.menu-pane .search-box { flex: 1 1 210px; max-width: 350px; }
.search-box { min-height: 46px; border-radius: 11px; }
.search-box input { background: transparent; }
.category-tabs { padding: 18px 0; gap: 8px; }
.category-tabs button { border-radius: 999px; min-height: 42px; font-size: 13px; }
.category-tabs button.active { background: var(--brand); color: white; }
.menu-grid { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.menu-item { padding: 0; border-radius: 14px; grid-template-rows: 110px auto; min-height: 208px; box-shadow: none; }
.menu-info { padding: 12px; gap: 12px; }
.menu-info strong { font-size: 15px; line-height: 1.4; }
.dish-art.food { background: #dcece2; color: #37674c; }
.dish-art.drink { background: #dfedf1; color: #3b6e80; }
.dish-art.dessert { background: #f5e7db; color: #926045; }
.dish-art.retail { background: #e8e4ef; color: #6b5982; }
.dish-art span { border: 0; background: #ffffff66; border-radius: 50%; width: 58px; height: 58px; }
.order-pane { top: 16px; max-height: none; min-width: 0; gap: 0; border-top: 3px solid var(--brand); }
.order-pane > *, .order-pane label, .order-pane input { min-width: 0; }
.order-pane input { width: 100%; }
.discount-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.order-title { padding-bottom: 16px; }
.order-title h2 { margin-top: 5px; }
.order-title select { max-width: 155px; }
.table-tools { gap: 6px; margin: 12px 0; }
.table-tools .secondary-btn { background: #f5f8f7; min-height: 42px; font-weight: 600; }
.order-list { max-height: 340px; scrollbar-width: thin; }
.totals-box { font-variant-numeric: tabular-nums; }
.grand-total { color: var(--brand-strong); }
.payment-methods { gap: 6px; }
.payment-chip { min-width: 0; flex: 1 1 42%; padding: 0 8px; font-size: 13px; }
.checkout-btn { min-height: 54px; border-radius: 11px; font-size: 16px; }
.login-screen { background: #edf4ef; }
.login-card { padding: 32px; border-radius: 20px; gap: 20px; }
.login-card .login-brand { display: flex; }
.login-brand .brand-mark { background: var(--brand); }
.login-brand strong { font-size: 21px; }
.login-brand span { color: var(--muted); }
.login-card .brand-block div:not(.brand-mark) { font-size: 16px; }
.login-card input, .login-card select { min-height: 50px; }
.login-hint { text-align: center; }
.toast { z-index: 100; }

@media (min-width: 961px) and (max-width: 1280px) {
  .app-shell { grid-template-columns: 202px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; gap: 22px; }
  .sidebar .brand-block { padding-inline: 4px; }
  .nav-btn { min-width: 0; gap: 8px; padding-inline: 10px; font-size: 12px; }
  .sidebar .operator-panel { display: block; padding: 11px; }
  .workspace { padding: 18px; }
  .sales-grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; }
  .shift-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .order-pane { position: sticky; padding: 14px; }
  .topbar { flex-wrap: wrap; }
}

/* Give the floor plan a clear hierarchy and keep every table readable. */
#view-tables { --floor-ink: #173b35; }
#view-tables .section-head {
  align-items: flex-end;
  margin: 2px 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid #d9e6e1;
}
#view-tables .section-head h2 { margin-top: 5px; color: var(--floor-ink); font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -.04em; }
#view-tables .section-actions { gap: 9px; }
#view-tables .section-actions .secondary-btn {
  min-height: 44px;
  padding: 0 14px;
  border-color: #d5e3dd;
  border-radius: 11px;
  background: #fff;
  color: #24463e;
  font-size: 14px;
  font-weight: 650;
  box-shadow: 0 2px 5px #193c3210;
}
#view-tables .section-actions .secondary-btn:hover,
#view-tables .section-actions .secondary-btn.active { border-color: #74b19c; background: #e6f5ed; color: #145743; }
#view-tables .table-grid:not(.floor-plan) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
  gap: 14px;
  margin-top: 0;
}
#view-tables .table-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 148px;
  padding: 20px;
  overflow: hidden;
  border-color: #dce8e2;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff 35%, #f8fbf9);
  box-shadow: 0 4px 14px #15372b0a;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
#view-tables .table-card::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #cbd9d2; }
#view-tables .table-card:hover { transform: translateY(-2px); border-color: #aacfc0; box-shadow: 0 10px 24px #15372b12; }
#view-tables .table-card h3 { margin: 12px 0 5px; color: #183b34; font-size: 19px; letter-spacing: -.02em; }
#view-tables .table-meta { color: #758780; font-size: 13px; }
#view-tables .table-badge { min-height: 25px; padding: 0 10px; background: #eef3f0; color: #52665d; font-size: 11px; letter-spacing: .02em; }
#view-tables .table-card.busy { border-color: #f0d49b; background: linear-gradient(145deg, #fffdf7, #fff8e7); }
#view-tables .table-card.busy::after { background: #e6a52a; }
#view-tables .table-card.busy h3 { color: #75480b; }
#view-tables .table-card.busy .table-badge { background: #ffedc2; color: #83510b; }
#view-tables .table-card.ready { border-color: #a9d9bd; background: linear-gradient(145deg, #fbfffc, #eaf8ef); }
#view-tables .table-card.ready::after { background: #32a56a; }
#view-tables .table-card.ready h3 { color: #145c37; }
#view-tables .table-card.ready .table-badge { background: #d6f2e0; color: #17643b; }
#view-tables .table-card.reserved { border-color: #aac5fb; background: linear-gradient(145deg, #fbfcff, #edf3ff); }
#view-tables .table-card.reserved::after { background: #3274ed; }
#view-tables .table-card.reserved h3 { color: #244eaa; }
#view-tables .table-card.reserved .table-badge { background: #dce8ff; color: #2458c5; }

.booking-integration {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 0 0 18px; padding: 15px 17px; border: 1px solid #cfe5d9; border-radius: 14px;
  background: linear-gradient(110deg, #eaf7ef, #f7fbf8 75%);
}
.booking-integration-copy, .booking-integration-links { display: flex; align-items: center; gap: 13px; }
.booking-integration-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: #d3efdf; color: #176746; }
.booking-integration-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.booking-integration-copy strong { color: #174b37; font-size: 14px; }
.booking-integration-copy p { margin: 4px 0 0; color: #59776a; font-size: 12px; overflow-wrap: anywhere; }
.booking-integration-links { flex-shrink: 0; }
.booking-integration-links .secondary-btn { min-height: 38px; padding: 0 12px; border-radius: 9px; color: #225743; font-size: 12px; text-decoration: none; }

#view-booking { color: #173a33; }
#view-booking .booking-page { max-width: 1540px; margin: 0 auto; }
#view-booking .booking-header { align-items: flex-end; margin: 0 0 22px; padding: 4px 0 18px; border-bottom: 1px solid #dce8e2; }
#view-booking .booking-header h2 { margin-top: 5px; color: #173b34; font-size: clamp(25px, 2.3vw, 34px); letter-spacing: -.045em; }
#view-booking .booking-header .section-actions { gap: 7px; }
#view-booking .booking-header .section-actions > button { min-height: 40px; padding-inline: 13px; border-radius: 10px; font-size: 13px; font-weight: 650; }
#view-booking .booking-header input[type="date"] { min-height: 40px; border-radius: 10px; }
#view-booking .booking-header .primary-btn { box-shadow: 0 5px 12px #1175502b; }
#view-booking .booking-integration { margin-bottom: 19px; padding: 14px 17px; border-color: #d7e9de; background: linear-gradient(105deg, #edf8f1, #f9fcfa 75%); }
#view-booking .booking-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
#view-booking .booking-stat { position: relative; display: grid; gap: 6px; min-height: 116px; padding: 15px 17px; overflow: hidden; border: 1px solid #e0e9e4; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px #183d3008; }
#view-booking .booking-stat::after { position: absolute; right: -14px; bottom: -27px; width: 82px; height: 82px; border-radius: 50%; background: #f0f6f2; content: ""; }
#view-booking .booking-stat > span { color: #71817a; font-size: 12px; font-weight: 650; }
#view-booking .booking-stat > strong { color: #1e4439; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
#view-booking .booking-stat > small { color: #87948e; font-size: 11px; }
#view-booking .booking-stat-waiting { border-color: #f0dfbe; }
#view-booking .booking-stat-waiting::after { background: #fff5df; }
#view-booking .booking-stat-waiting > strong { color: #9b6818; }
#view-booking .booking-stat-confirmed::after, #view-booking .booking-stat-checked::after { background: #e9f6ed; }
#view-booking .booking-stat-checked > strong { color: #168152; }
#view-booking .booking-stat-guests::after { background: #edf1fa; }
#view-booking .booking-control-row { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
#view-booking .booking-search-box { width: min(420px, 100%); min-height: 43px; border-color: #dde8e2; border-radius: 11px; background: #fff; }
#view-booking .booking-search-box:focus-within { border-color: #84b9a2; box-shadow: 0 0 0 3px #25845913; }
#view-booking .booking-timeline { overflow: hidden; border: 1px solid #dfe9e3; border-radius: 16px; background: #fff; box-shadow: 0 8px 26px #173b3409; }
.booking-timeline-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 17px 19px; border-bottom: 1px solid #e5ede8; }
.booking-timeline-heading h3 { margin-top: 4px; color: #24483d; font-size: 16px; }
.booking-timeline-date { color: #76857e; font-size: 12px; }
.booking-timeline-scroll { overflow: auto; }
.booking-timeline-grid { display: grid; min-width: 1030px; grid-template-columns: 142px repeat(12, minmax(68px, 1fr)); }
.booking-timeline-grid > * { min-width: 0; border-right: 1px solid #edf1ee; border-bottom: 1px solid #edf1ee; }
.booking-table-head, .booking-time-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; min-height: 39px; padding: 0 10px; background: #f5f8f6; color: #687a71; font-size: 11px; font-weight: 700; }
.booking-table-head { left: 0; z-index: 3; color: #496258; }
.booking-time-head { justify-content: center; padding-inline: 4px; font-variant-numeric: tabular-nums; }
.booking-table-label { position: sticky; left: 0; z-index: 1; display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 7px 10px; background: #fbfdfb; color: #315248; font-size: 12px; font-weight: 650; }
.booking-table-number { display: grid; place-items: center; width: 27px; height: 27px; flex-shrink: 0; border-radius: 8px; background: #eaf3ed; color: #347157; font-size: 10px; font-weight: 750; }
.booking-slot { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 54px; margin: 0; padding: 5px; border: 0; border-radius: 0; background: #fff; color: #a7b2ac; }
.booking-slot.empty { position: relative; }
.booking-slot.empty span { opacity: 0; font-size: 10px; transition: opacity .15s ease; }
.booking-slot.empty i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #dfe9e3; transition: transform .15s ease, background .15s ease; }
.booking-slot.empty:hover { background: #f1f8f3; }
.booking-slot.empty:hover span { opacity: 1; }
.booking-slot.empty:hover i { transform: scale(.6); background: #5a9d7c; }
.booking-slot.occupied { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; margin: 5px 3px; min-height: 44px; padding: 5px 7px; border-radius: 8px; text-align: left; overflow: hidden; }
.booking-slot.occupied strong, .booking-slot.occupied small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-slot.occupied strong { font-size: 10px; }
.booking-slot.occupied small { margin-top: 2px; font-size: 9px; opacity: .76; }
.booking-slot.status-waiting { background: #fff4db; color: #83590f; }
.booking-slot.status-confirmed { background: #e8f4ff; color: #28608f; }
.booking-slot.status-checked, .booking-slot.status-serving { background: #e4f6eb; color: #1c7149; }
.booking-slot.status-completed { background: #f0f2f1; color: #61716a; }
.booking-slot.status-cancelled, .booking-slot.status-noshow { background: #fff0ed; color: #a7493b; }
.booking-slot.occupied:hover { filter: saturate(1.12); box-shadow: inset 0 0 0 1px currentColor; }
#view-booking .section-head { flex-wrap: wrap; }
.booking-detail-grid { gap: 10px; }
.booking-detail-grid > div { padding: 12px; border: 1px solid #e3ece6; border-radius: 11px; background: #f9fbf9; }
.booking-detail-grid > div > span { color: #788981; font-size: 11px; }
.booking-detail-grid > div > strong { margin-top: 5px; color: #294d40; font-size: 13px; overflow-wrap: anywhere; }
.booking-api-card { border-radius: 18px; }
.booking-assign-table { display:grid; gap:6px; margin:12px 0; color:#62766c; font-size:12px; }
.booking-assign-table select { min-height:42px; border:1px solid #dce8e2; border-radius:9px; padding:8px 10px; background:#fff; color:#24483d; font:inherit; }
#booking-api-dialog { width: min(580px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; border-radius: 18px; overflow: auto; box-shadow: 0 24px 80px #102e2940; }
#booking-api-dialog::backdrop { background: #102e2970; backdrop-filter: blur(3px); }
.booking-api-card { display: grid; gap: 14px; padding: 24px; }
.booking-api-card > p { color: #5b7068; line-height: 1.55; }
.booking-api-card label { display: grid; gap: 6px; color: #5d7169; font-size: 12px; }
.booking-api-card code, .booking-api-card pre { margin: 0; padding: 11px 12px; border: 1px solid #dce8e2; border-radius: 9px; background: #f3f7f5; color: #25473d; font: 12px/1.5 Consolas, monospace; overflow-wrap: anywhere; white-space: pre-wrap; }
.booking-api-card .booking-api-note { padding: 11px 12px; border-radius: 9px; background: #fff7e8; color: #74551c; font-size: 12px; }

@media (min-width: 1281px) {
  .app-shell { grid-template-columns: 232px minmax(0, 1fr); }
  .sidebar { padding: 24px 14px; }
}

@media (max-width: 960px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 5; padding: 8px 12px; }
  .sidebar .brand-block, .sidebar .operator-panel { display: none; }
  .nav-list { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: thin; }
  .nav-btn { width: auto; flex: 0 0 auto; flex-direction: column; gap: 4px; min-width: 68px; padding: 8px; font-size: 11px; }
  .workspace { padding: 16px; }
  .sales-grid { grid-template-columns: 1fr; }
  .order-pane { position: static; }
  .shift-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
  .topbar { flex-wrap: wrap; gap: 14px; }
  .topbar-actions { justify-content: flex-start; }
  .order-title { flex-direction: row; align-items: center; }
  .discount-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-chip { min-width: 0; }
  #view-tables .section-head { align-items: flex-start; flex-direction: column; }
  #view-tables .section-actions { justify-content: flex-start; }
  #view-tables .table-card { min-height: 132px; padding: 16px; }
  .booking-integration { align-items: flex-start; flex-direction: column; }
  .booking-integration-links { flex-wrap: wrap; }
  #view-booking .booking-header { align-items: flex-start; }
  #view-booking .booking-header .section-actions { justify-content: flex-start; }
  #view-booking .booking-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-booking .booking-stat { min-height: 104px; }
  .booking-timeline-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
}

@media (max-width: 520px) {
  #view-booking .booking-stats { gap: 8px; }
  #view-booking .booking-stat { padding: 12px; }
  #view-booking .booking-stat > strong { font-size: 25px; }
  #view-booking .booking-header .section-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  #view-booking .booking-header .section-actions > * { width: 100%; }
}

@media (max-width: 400px) {
  .workspace { padding: 12px; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .menu-item { grid-template-rows: 90px auto; }
  .menu-info { padding: 10px; }
  .price-line { gap: 4px; font-size: 13px; }
  .price-line svg { width: 28px; height: 28px; padding: 6px; }
  .login-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .menu-item:hover { transform: none; }
}
.recipe-editor, #menu-item-recipe {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.recipe-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(80px, 1fr) minmax(65px, .7fr) 40px;
  align-items: end;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe6e4;
  border-radius: 10px;
  background: #f6faf9;
}
.recipe-row label { display: grid; gap: 6px; min-width: 0; }
.recipe-row input, .recipe-row select { width: 100%; min-width: 0; box-sizing: border-box; }
.recipe-row .recipe-remove { padding: 0; min-width: 0; height: 48px; font-size: 24px; }
.recipe-editor > small { color: #617b78; line-height: 1.5; }
@media (max-width: 600px) {
  .recipe-row { grid-template-columns: minmax(0, 1fr) minmax(65px, 1fr) 40px; }
  .recipe-row > label:first-child { grid-column: 1 / -1; }
}
.inventory-category-manager {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.inventory-category-manager label, .inventory-category-filter {
  display: grid;
  gap: 8px;
  max-width: 360px;
}
.inventory-category-filter { margin: 18px 0; }
.inventory-list label { display: grid; gap: 6px; margin-top: 8px; }

/* Inventory workspace */
#view-inventory { --inventory-green: #08786f; --inventory-ink: #17352f; }
#view-inventory .section-head { margin-bottom: 18px; }
#view-inventory .inventory-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
#view-inventory .inventory-panel { margin-bottom: 16px; padding: 20px; border: 1px solid #dfeae6; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgb(23 53 47 / 5%); }
#view-inventory h3 { margin: 0; color: var(--inventory-ink); font-size: 18px; }
#view-inventory .inventory-entry-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: -2px -2px 20px; padding: 16px 18px; border: 1px solid #d5ebe2; border-radius: 12px; background: linear-gradient(110deg, #effaf5, #f8fcfa); }
#view-inventory .inventory-heading-copy { display: flex; align-items: center; gap: 13px; min-width: 0; }
#view-inventory .inventory-heading-copy p, #view-inventory .inventory-list-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
#view-inventory .inventory-symbol { display: grid; flex-shrink: 0; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #d6f1e4; color: var(--inventory-green); }
#view-inventory .inventory-symbol svg { width: 24px; height: 24px; }
#view-inventory .inventory-category-manager { align-items: end; gap: 8px; margin: 0; padding-left: 20px; border-left: 1px solid #cfe1da; flex-wrap: nowrap; }
#view-inventory .inventory-category-manager label { min-width: 210px; }
#view-inventory label { color: #29433e; font-size: 13px; font-weight: 650; }
#view-inventory input, #view-inventory select { width: 100%; min-width: 0; height: 44px; padding: 9px 12px; border: 1px solid #d5e1dd; border-radius: 9px; background: #fff; color: var(--inventory-ink); box-sizing: border-box; }
#view-inventory input::placeholder { color: #91a39e; }
#view-inventory input:focus, #view-inventory select:focus { border-color: var(--inventory-green); box-shadow: 0 0 0 3px rgb(8 120 111 / 11%); outline: 0; }
#view-inventory .inventory-entry-form { grid-template-columns: 1.35fr 1fr .72fr 1fr 1fr; gap: 12px; margin: 0; padding: 0; border: 0; background: transparent; }
#view-inventory .inventory-entry-form label { display: grid; align-content: end; gap: 7px; }
#view-inventory .inventory-entry-form > button { grid-column: 1 / 3; min-height: 46px; max-width: 300px; }
#view-inventory .inventory-filter-panel { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.1fr); align-items: end; gap: 14px; }
#view-inventory .inventory-category-filter, #view-inventory .inventory-search { width: auto; max-width: none; margin: 0; gap: 7px; }
#view-inventory .inventory-list-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
#inventory-result-count { padding: 6px 10px; border-radius: 999px; background: #eef8f4; color: var(--inventory-green); font-size: 12px; font-weight: 750; white-space: nowrap; }
#view-inventory .inventory-list { gap: 8px; }
#view-inventory .inventory-stock-card { display: grid; grid-template-columns: 46px minmax(210px, 1.35fr) minmax(170px, .8fr) auto; align-items: center; gap: 14px; padding: 13px 14px; border: 1px solid #e1ebe7; border-radius: 11px; background: #fff; box-shadow: 0 2px 8px rgb(23 53 47 / 3%); }
#view-inventory .inventory-stock-card:hover { border-color: #9bcfc0; box-shadow: 0 5px 14px rgb(23 53 47 / 8%); }
#view-inventory .inventory-stock-name { width: auto; min-width: 0; }
#view-inventory .inventory-stock-name > strong { display: block; overflow-wrap: anywhere; color: var(--inventory-ink); font-size: 16px; }
#view-inventory .inventory-stock-name label { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--muted); font-size: 11px; }
#view-inventory .inventory-stock-name select { width: auto; max-width: 165px; height: 30px; padding: 3px 8px; border: 1px solid #cce6dc; border-radius: 7px; background: #f0faf6; color: var(--inventory-green); font-size: 12px; }
#view-inventory .inventory-stock-balance { display: grid; gap: 3px; padding-left: 16px; border-left: 1px solid #e1ebe7; color: var(--muted); font-size: 12px; }
#view-inventory .inventory-stock-balance strong { color: var(--inventory-green); font-size: 17px; font-variant-numeric: tabular-nums; }
#view-inventory .inventory-stock-balance small { font-size: 11px; }
#view-inventory .inventory-stock-balance .status-badge { width: max-content; padding: 3px 7px; border-radius: 999px; background: #fff4e5; color: #a65c00; }
#view-inventory .printer-card-actions { display: flex; gap: 7px; margin-left: auto; }
#view-inventory [data-stock-delta] { min-width: 88px; min-height: 38px; padding: 0 11px; border-radius: 8px; border-color: #c6e7da; background: #effaf5; color: var(--inventory-green); font-size: 12px; font-weight: 750; }
#view-inventory [data-stock-delta]:hover { border-color: var(--inventory-green); background: #dff4eb; }
#view-inventory [data-stock-delta="-1"] { border-color: #f0d3d0; background: #fff6f5; color: #b4483d; }
#view-inventory [data-stock-delta="-1"]:hover { border-color: #d9776d; background: #ffebe8; }
#view-inventory .inventory-low { border-color: #edc8bf; background: #fffdfc; }
@media (max-width: 1200px) {
  #view-inventory .inventory-entry-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  #view-inventory .inventory-category-manager { padding-left: 0; border-left: 0; }
  #view-inventory .inventory-entry-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #view-inventory .inventory-entry-form > button { grid-column: auto; }
  #view-inventory .inventory-stock-card { grid-template-columns: 42px minmax(170px, 1fr) minmax(145px, .8fr) auto; }
}
@media (max-width: 700px) {
  #view-inventory .inventory-panel { padding: 14px; }
  #view-inventory .inventory-entry-heading { margin: 0 0 16px; padding: 14px; }
  #view-inventory .inventory-heading-copy { align-items: flex-start; }
  #view-inventory .inventory-category-manager { flex-wrap: wrap; }
  #view-inventory .inventory-category-manager label { min-width: min(240px, 100%); flex: 1 1 220px; }
  #view-inventory .inventory-entry-form, #view-inventory .inventory-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #view-inventory .inventory-entry-form > button { grid-column: 1 / -1; max-width: none; }
  #view-inventory .inventory-search { grid-column: 1 / -1; }
  #view-inventory .inventory-stock-card { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 12px; }
  #view-inventory .inventory-stock-balance { grid-column: 1 / -1; padding: 9px 0 0; border-top: 1px solid #e1ebe7; border-left: 0; }
  #view-inventory .printer-card-actions { grid-column: 1 / -1; width: 100%; margin-left: 0; }
  #view-inventory [data-stock-delta] { flex: 1; }
}
@media (max-width: 420px) {
  #view-inventory .inventory-entry-form, #view-inventory .inventory-filter-panel { grid-template-columns: 1fr; }
  #view-inventory .inventory-search { grid-column: auto; }
  #view-inventory .inventory-category-manager .secondary-btn { width: 100%; }
}

/* Compact receipt rows and a persistent payment summary. */
.order-pane .order-list { gap: 0; padding: 0; }
.order-pane .order-item { grid-template-columns: 38px minmax(0, 1fr) auto 28px; align-items: center; gap: 8px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.order-pane .order-item:last-child { border-bottom: 0; }
.order-pane .order-item-thumb { width: 38px; height: 38px; }
.order-pane .order-item strong { font-size: 14px; line-height: 1.35; }
.order-pane .order-meta { font-size: 12px; }
.order-pane .qty-control { grid-template-columns: 32px 25px 32px; font-size: 14px; }
.order-pane .qty-btn { width: 32px; min-height: 34px; font-size: 16px; }
.order-pane .remove-btn { display: grid; place-items: center; width: 28px; min-height: 34px; padding: 0; color: var(--muted); }
.order-pane .remove-btn svg { width: 17px; height: 17px; }
.order-pane .remove-btn:hover { color: var(--danger); background: #fff1f1; }
.order-pane .table-tools { display: flex; gap: 8px; }
.order-pane .table-tools > button { flex: 1; }
.table-more { position: relative; }
.table-more summary { display: grid; place-items: center; width: 46px; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; list-style: none; }
.table-more summary::-webkit-details-marker { display: none; }
.table-more summary:focus-visible { outline: 3px solid #299d90; outline-offset: 2px; }
.table-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; display: grid; gap: 5px; width: 190px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px #19332f26; }
.table-more-menu button { justify-content: flex-start; }
.order-pane .payment-panel > .grand-total { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 0; border: 0; font-size: 19px; }
.order-pane .totals-box { padding: 10px 12px; font-size: 13px; }
@media (min-width: 1281px) { .sales-grid { grid-template-columns: minmax(0, 1fr) 420px; } }
@media (min-width: 961px) and (max-width: 1280px) { .sales-grid { grid-template-columns: minmax(0, 1fr) 400px; } }
@media (max-width: 400px) {
  .order-pane .order-item { grid-template-columns: 30px minmax(0, 1fr) auto 26px; gap: 5px; }
  .order-pane .order-item-thumb { width: 30px; height: 30px; }
  .order-pane .qty-control { grid-template-columns: 28px 20px 28px; }
  .order-pane .qty-btn { width: 28px; }
}

.retail-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.payment-qr-settings { display: grid; gap: 12px; margin: 14px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f6fbf8; }
.payment-qr-settings label { display: grid; gap: 6px; }
.payment-qr-settings .check-row { display: flex; align-items: center; }
.payment-qr-settings > div:not(.payment-qr-preview) { display: grid; gap: 12px; }
.payment-qr-settings [hidden], .payment-qr-panel[hidden] { display: none !important; }
.payment-qr-preview { text-align: center; }
.payment-qr-preview svg { display: block; width: min(100%, 280px); height: auto; margin: 10px auto; background: white; }
.payment-qr-preview p { font-size: 12px; overflow-wrap: anywhere; }
.payment-qr-panel { display: grid; gap: 10px; padding: 16px; border: 1px solid #a4cdbb; border-radius: 12px; background: #f4faf7; text-align: center; }
.payment-qr-panel p { font-size: 13px; overflow-wrap: anywhere; }
#payment-qr-amount { font-size: 21px; color: #116047; }
#qr-settings-status { font-size: 13px; overflow-wrap: anywhere; }
.retail-tools form { display: flex; gap: 6px; flex: 1; min-width: 210px; }
.retail-tools input { min-width: 0; width: 100%; }
.retail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.retail-grid label, #retail-dialog-body label { display: grid; gap: 6px; }
.retail-grid[hidden], #payment-manual-field[hidden] { display: none; }
#retail-dialog { width: min(680px, calc(100vw - 24px)); max-height: 90dvh; }
#retail-dialog-body { display: grid; gap: 14px; }
#retail-error { color: var(--danger); }
.retail-refund-line { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.order-item [data-line-discount] { padding: 3px 7px; min-height: 28px; margin-top: 4px; font-size: 11px; }
.retail-refund-line .check-row { display: flex !important; align-items: center; }
#transaction-list, #audit-list { margin-top: 16px; }
#audit-list small { overflow-wrap: anywhere; }
#session-lock-dialog { z-index: 1000; width: min(420px, calc(100vw - 24px)); }
body[data-workspace-mode="admin"] .workspace { background: #f1f5f9; }
@media (min-width: 961px) { #view-sales > .retail-tools { flex-shrink: 0; } }
/* Account controls stay together at the right edge of every screen. */
.account-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 8px; margin-left: auto; min-width: 0; }
.account-tools .role-pill { height: 40px; min-height: 40px; max-width: 160px; flex: 0 1 auto; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 38px; }
.account-tools .language-select { width: 126px; min-width: 0; height: 40px; min-height: 40px; flex: 0 0 auto; }
.account-menu { position: relative; flex: 0 0 40px; width: 40px; }
.account-menu-trigger { list-style: none; width: 40px; height: 40px; min-height: 40px; padding: 0; cursor: pointer; }
.account-menu-trigger::-webkit-details-marker { display: none; }
.account-menu[open] .account-menu-trigger { background: #d4f3e5; border-color: #65a98e; }
.account-menu-trigger:focus-visible { outline: 2px solid #0f766e; outline-offset: 3px; }
.account-popup { position: absolute; top: calc(100% + 10px); right: 0; z-index: 100; display: grid; gap: 12px; width: 280px; max-width: calc(100vw - 28px); padding: 18px; background: #fff; color: #183b30; border: 1px solid #d8e4de; border-radius: 14px; box-shadow: 0 12px 36px #102e2526; }
.account-popup strong { overflow-wrap: anywhere; }
.account-popup { max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; }
.account-popup .status-line { color: #62776d; font-size: 12px; align-items: baseline; }
.account-popup .logout-btn { margin: 0; min-height: 40px; color: #ad3434; background: #fff6f5; border: 1px solid #f0d4d0; }
.account-popup .logout-btn:hover { background: #fce7e4; }
.account-popup [hidden] { display: none; }
.topbar { position: relative; z-index: 10; }
@media (max-width: 760px) {
  .topbar-actions > .account-tools { grid-column: 1 / -1; width: auto; justify-self: end; order: -1; }
  .account-tools .role-pill { max-width: 125px; font-size: 12px; padding-inline: 8px; }
  .account-tools .language-select { width: 112px; }
}

/* Keep scrolling inside the active work area, rather than the whole app. */
#payment-member-name-field[hidden] { display: none; }
#payment-member-status { margin: 0; padding: 12px; background: var(--panel-soft); border-radius: 10px; }
#payment-member-policy { margin: 0; font-size: 12px; color: var(--muted); }
#payment-error { margin: 0; color: var(--danger); }
body:not(.logged-out) { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.app-shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.sidebar, .workspace, .view, .sales-grid, .menu-pane, .order-pane { min-height: 0; min-width: 0; }
.sidebar { overflow: hidden; }
.sidebar > .brand-block, .sidebar > .operator-panel { flex-shrink: 0; }
.sidebar .nav-list { flex: 1 1 0; min-height: 0; align-content: start; grid-auto-rows: max-content; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.workspace { display: flex; flex-direction: column; overflow: hidden; }
.workspace > .topbar { flex-shrink: 0; }
.workspace > .view.active { flex: 1; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.order-scroll-region { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.order-scroll-region > * { flex-shrink: 0; }
.order-scroll-region .order-list { max-height: none; overflow: visible; }

@media (min-width: 961px) {
  .workspace > #view-sales.active { display: flex; flex-direction: column; overflow: hidden; scrollbar-gutter: auto; }
  #view-sales > .shift-strip { flex-shrink: 0; }
  .sales-grid { flex: 1; overflow: hidden; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
  .menu-pane { display: flex; flex-direction: column; overflow: hidden; }
  .menu-pane > .section-head { flex-shrink: 0; }
  .menu-pane > .category-tabs { flex-shrink: 0; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior: contain; }
  .menu-pane > .menu-grid { flex: 1; min-height: 0; overflow-y: auto; align-content: start; overscroll-behavior: contain; scrollbar-gutter: stable; padding-bottom: 8px; }
  .order-pane { position: static; max-height: none; overflow: hidden; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .order-scroll-region { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .order-pane > .payment-panel { padding-top: 12px; background: var(--panel); border-top: 1px solid var(--line); }
}

@media (max-width: 960px) {
  .app-shell { display: flex; flex-direction: column; }
  .sidebar { position: static; flex-shrink: 0; }
  .sidebar .nav-list { flex: 0 1 auto; overflow-x: auto; overflow-y: hidden; }
  .workspace { flex: 1; }
  .order-pane { grid-template-rows: auto auto auto auto; max-height: none; }
  .order-scroll-region { overflow: visible; }
}

/* === Compact shift strip === */
.shift-strip {
  grid-template-columns: repeat(4, auto) !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}
.shift-tile {
  min-height: auto !important;
  padding: 8px 12px !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.shift-tile span {
  font-size: 11px !important;
}
.shift-tile strong {
  margin-top: 0 !important;
  font-size: 15px !important;
}

/* === Compact retail tools === */
.retail-tools--compact {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.retail-tools--compact #barcode-form {
  flex: 1;
  min-width: 0;
}
.retail-quick-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.retail-quick-actions .icon-btn {
  width: 40px;
  height: 40px;
  font-size: 16px;
  padding: 0;
  border-radius: 8px;
}

/* === POS mode sidebar simplification === */
[data-workspace-mode="pos"] .nav-btn[data-view="menuAdmin"],
[data-workspace-mode="pos"] .nav-btn[data-view="inventory"],
[data-workspace-mode="pos"] .nav-btn[data-view="invoice"],
[data-workspace-mode="pos"] .nav-btn[data-view="staff"],
[data-workspace-mode="pos"] .nav-btn[data-view="audit"],
[data-workspace-mode="pos"] .nav-btn[data-view="reports"] {
  display: none;
}

/* === Menu dialog tabs === */
.menu-dialog-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #dbe7e2;
  margin-bottom: 16px;
  padding: 0 4px;
}
.menu-tab {
  padding: 12px 20px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #617570;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  min-height: 44px;
}
.menu-tab.active {
  border-bottom-color: #0f766e;
  color: #075e58;
}
.menu-tab:hover:not(.active) {
  color: #19332f;
}
.menu-recipe-panel {
  display: block;
}
.menu-dialog-grid[hidden],
.menu-recipe-panel[hidden] {
  display: none;
}
.menu-recipe-panel .recipe-editor {
  padding: 16px;
  background: #f7fbf9;
  border: 1px solid #dbe7e2;
  border-radius: 12px;
}

/* === POS Numpad === */
.pos-numpad {
  margin: 16px 0 8px;
  display: grid;
  gap: 10px;
}
.numpad-quick-cash {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.numpad-denom,
.numpad-exact {
  flex: 1 1 auto;
  min-width: 60px;
  min-height: 44px;
  padding: 8px 4px;
  border: 1px solid #dbe7e2;
  border-radius: 9px;
  background: #edf7f2;
  color: #075e58;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.numpad-denom:hover,
.numpad-exact:hover {
  background: #d4f4e5;
  border-color: #0f766e;
}
.numpad-exact {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}
.numpad-exact:hover {
  background: #0a635a;
  color: #fff;
}
.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.numpad-key {
  min-height: 52px;
  border: 1px solid #dbe7e2;
  border-radius: 10px;
  background: #fff;
  color: #19332f;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background .1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.numpad-key:hover {
  background: #edf7f2;
}
.numpad-key:active {
  background: #d4f4e5;
}
.numpad-back {
  color: #b42318;
  font-size: 22px;
}
#payment-dialog .dialog-card {
  max-width: 520px;
}
