/* Compact visual system. Layout changes only; transaction rules stay in app.js. */
:root { --bg: #f4f6f8; --ink: #20342f; --muted: #6c7b76; --line: #e3e9e6; --shadow: 0 2px 8px #183a3005; --touch: 40px; }
body { font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; }
button, input, select, textarea { font-family: inherit; }
button { font-size: 13px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; color: var(--ink); }
input::placeholder { color: #85918c; }
.secondary-btn, .primary-btn, .icon-btn { min-height: 40px; border-radius: 8px; box-shadow: none; }
.secondary-btn { background: #fff; }
.icon-btn { width: 40px; }
.eyebrow { font-size: 9px; letter-spacing: .08em; color: var(--muted); }
.app-shell { grid-template-columns: 184px minmax(0, 1fr); }
.sidebar { background: #14352d; padding: 20px 10px 12px; gap: 24px; }
.sidebar .brand-block { padding: 0 8px; gap: 10px; }
.sidebar .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.sidebar .brand-block strong { font-size: 16px; }
.sidebar .brand-block span { font-size: 10px; margin-top: 3px; }
.nav-list { gap: 4px; }
.nav-btn { min-height: 42px; padding: 10px 12px; gap: 10px; border-radius: 8px; font-size: 13px; font-weight: 500; }
.nav-btn svg { width: 18px; height: 18px; }
.nav-btn.active { font-weight: 650; background: #d9eee3; }
.workspace { padding: 18px 20px; }
.topbar { min-height: 44px; margin-bottom: 16px; gap: 12px; }
.topbar h1 { margin: 0; font-size: 23px; letter-spacing: -.6px; }
.topbar-actions { gap: 6px; }
.topbar-actions .primary-btn, .topbar-actions .secondary-btn { padding-inline: 12px; }
.account-tools { gap: 6px; }
.account-tools .role-pill { font-size: 11px; padding: 7px 10px; }
.account-tools .language-select { min-height: 38px; width: 112px; font-size: 12px; }
.account-popup { padding: 14px; border-radius: 12px; box-shadow: 0 12px 40px #14352d24; }
.retail-tools--compact { margin-bottom: 10px; padding: 0; }
#barcode-form input { height: 40px; font-size: 13px; }
.retail-quick-actions { gap: 5px; }
.retail-quick-actions .secondary-btn { padding: 0 10px; font-size: 12px; white-space: nowrap; }
.retail-quick-actions svg { width: 16px; height: 16px; }
.shift-strip { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 0 !important; border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow: hidden; margin-bottom: 14px !important; }
.shift-tile { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; padding: 9px 12px !important; gap: 7px; flex-wrap: wrap; justify-content: flex-start; }
.shift-tile:first-child { border-color: var(--line); background: #edf6f1; }
.shift-tile:last-child { border-right: 0; }
.shift-tile span { color: var(--muted); font-weight: 400; }
.shift-tile strong { font-size: 13px !important; font-weight: 650; }
.sales-grid { grid-template-columns: minmax(0, 1fr) 350px; gap: 18px; }
.menu-pane .section-head { gap: 12px; align-items: center; }
.menu-pane .section-head .eyebrow { display: none; }
.menu-pane h2 { margin: 0; font-size: 17px; }
.menu-pane .search-box { min-height: 38px; max-width: 300px; border-radius: 8px; }
.search-box input { border: 0 !important; padding: 0 !important; background: transparent !important; font-size: 13px; }
.category-tabs { gap: 6px; padding: 12px 0; }
.category-tabs button { min-height: 34px; padding: 7px 12px; font-size: 12px; border-radius: 7px; white-space: nowrap; }
.menu-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; grid-auto-rows: max-content; }
.menu-item { display: flex; flex-direction: column; min-height: 0; height: auto; border-radius: 10px; padding: 0; font: inherit; }
.menu-item .dish-art { flex: 0 0 76px; height: 76px; width: 100%; font-size: 20px; }
.dish-art span { width: 38px; height: 38px; border-radius: 10px; background: #ffffff80; }
.menu-info { display: flex; flex-direction: column; justify-content: space-between; flex: 1; gap: 8px; padding: 10px; width: 100%; }
.menu-info strong { min-height: 36px; font-size: 13px; font-weight: 600; line-height: 18px; overflow-wrap: anywhere; }
.menu-info small { display: block; font-size: 10px; line-height: 15px; color: var(--muted); }
.price-line { gap: 4px; }
.price-line > span { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-line svg { width: 26px; height: 26px; padding: 5px; border-radius: 7px; }
.order-pane { border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.order-title { padding-bottom: 12px; }
.order-title h2 { margin: 3px 0 0; font-size: 18px; }
.order-title select { min-height: 36px; max-width: 140px; font-size: 12px; }
.order-pane .table-tools { margin: 10px 0; gap: 6px; }
.order-pane .table-tools .secondary-btn, .table-more summary { min-height: 36px; font-size: 12px; }
.table-more summary { width: 38px; border-radius: 8px; }
.order-scroll-region { gap: 10px; }
.order-pane .empty-state { min-height: 130px; padding: 24px 12px; border: 0; border-radius: 8px; background: #f8faf9; font-size: 13px; color: #85918c; }
.order-pane .order-item { padding: 9px 0; }
.order-pane .order-item strong { font-size: 13px; }
.note-box, .discount-row label { font-size: 11px; gap: 5px; color: var(--muted); }
.order-pane input { min-height: 36px; font-size: 12px; }
.order-pane .totals-box { background: #f8faf9; border: 0; padding: 10px; font-size: 12px; border-radius: 8px; }
.order-pane .payment-panel > .grand-total { margin-bottom: 10px; font-size: 15px; color: var(--ink); }
.grand-total strong { font-size: 23px; color: var(--brand); }
.payment-methods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px; }
.payment-chip { min-height: 38px; padding: 5px 3px; font-size: 11px; border-radius: 7px; }
.checkout-btn { min-height: 46px; border-radius: 8px; font-size: 14px; }
.section-head h2 { font-size: 21px; }
.settings-form, .settings-record, .crm-toolbar, .crm-overview article { border-radius: 10px; padding: 14px; }
.settings-form { gap: 12px; margin-block: 12px; }
.settings-record { margin-block: 8px; }
#view-reports .metric { padding: 16px; border-top-width: 1px; border-radius: 10px; }
#view-reports .metric strong { font-size: 24px; }
#view-tables .table-card { min-height: 120px; padding: 16px; border-radius: 10px; box-shadow: none; background-image: none; }
#view-tables .section-head h2, #view-booking .booking-header h2 { font-size: 23px; }
#view-booking .booking-stat { min-height: 94px; padding: 12px; border-radius: 10px; box-shadow: none; }
.dialog-card { border-radius: 14px; padding: 20px; gap: 12px; box-shadow: 0 20px 80px #14352d30; }
.dialog-head h2 { font-size: 20px; }
.dialog-card label { font-size: 12px; gap: 5px; }
.dialog-card p { font-size: 12px; }
.dialog-card menu { padding: 12px 0 0; background: #fff; border-top: 1px solid var(--line); }
.dialog-card menu > button { flex: 1; }
#payment-member-status { padding: 8px 10px; font-size: 12px; }
#payment-verification-note:empty, #payment-error:empty { display: none; }
.pos-numpad { margin: 4px 0; gap: 8px; }
.numpad-key { min-height: 42px; border-radius: 7px; font-size: 18px; }
.numpad-denom, .numpad-exact { min-height: 36px; min-width: 52px; font-size: 12px; }
.payment-qr-panel { padding: 12px; gap: 6px; }
.payment-qr-panel h3 { font-size: 15px; margin: 0; }
.payment-qr-panel p { margin: 0; }
.payment-qr-preview svg { width: min(100%, 280px); }
@media (min-width: 961px) and (max-width: 1150px) {
  .app-shell { grid-template-columns: 164px minmax(0, 1fr); }
  .workspace { padding: 14px; }
  .sales-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; }
  .nav-btn { padding-inline: 9px; font-size: 12px; }
  .topbar { flex-wrap: wrap; }
  .topbar-actions { flex: 1; }
  .topbar-actions .secondary-btn { padding-inline: 8px; }
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { padding: 7px 10px; }
  .nav-btn { min-height: 42px; flex-direction: row; padding: 8px 10px; min-width: auto; gap: 6px; font-size: 12px; }
  .workspace { padding: 12px; }
  .topbar { margin-bottom: 12px; }
  .topbar-actions { justify-content: flex-end; }
  .sales-grid { grid-template-columns: 1fr; }
  .order-pane { min-height: 360px; }
}
@media (min-width: 820px) and (max-width: 960px) {
  .workspace > #view-sales.active { display: flex; flex-direction: column; overflow: hidden; }
  #view-sales > .retail-tools, #view-sales > .shift-strip { flex-shrink: 0; }
  .sales-grid { flex: 1; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(0, 1fr); overflow: hidden; align-items: stretch; gap: 12px; }
  .menu-pane { display: flex; flex-direction: column; overflow: hidden; }
  .menu-pane > .section-head, .menu-pane > .category-tabs { flex-shrink: 0; }
  .category-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .menu-grid { flex: 1; overflow-y: auto; align-content: start; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .order-pane { min-height: 0; overflow: hidden; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .order-scroll-region { overflow-y: auto; }
  .order-pane > .payment-panel { border-top: 1px solid var(--line); padding-top: 10px; }
}
@media (max-width: 600px) {
  .topbar-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; gap: 6px; }
  .topbar-actions > .account-tools { grid-column: 1 / -1; justify-self: end; order: -1; margin-bottom: 2px; }
  .topbar-actions > button { width: 100%; min-width: 0; padding-inline: 5px; font-size: 12px; }
  .topbar-actions > button svg { width: 16px; height: 16px; }
  .topbar h1 { font-size: 20px; }
  .retail-tools--compact { flex-wrap: wrap; }
  #barcode-form { flex-basis: 100%; }
  .retail-quick-actions { width: 100%; }
  .retail-quick-actions .secondary-btn { flex: 1; justify-content: center; }
  .shift-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .shift-tile:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .shift-tile:nth-child(2) { border-right: 0; }
  .shift-tile { padding: 8px !important; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-pane .section-head { flex-direction: row; flex-wrap: nowrap; align-items: center; text-align: left; }
  .menu-pane .section-head > div { flex-shrink: 0; }
  .menu-pane .search-box { flex: 1 1 120px; width: auto; height: 40px; min-height: 40px; margin: 0; padding: 8px 10px; }
  .account-tools .role-pill { max-width: 120px; }
  .dialog-card { padding: 16px; }
}
