:root {
  /* Velocity POS design tokens from the supplied UI reference. */
  --bg: #f8f9ff;
  --panel: #ffffff;
  --surface-low: #eff4ff;
  --surface-container: #e5eeff;
  --surface-high: #dce9ff;
  --border: #c3c6d6;
  --text: #0b1c30;
  --muted: #434654;
  --outline: #737685;
  --primary: #003d9b;
  --primary-dark: #002c73;
  --primary-container: #0052cc;
  --danger: #ba1a1a;
  --green: #006e2f;
  --green-bright: #6bff8f;
  --amber: #805000;
  --shadow: 0 10px 15px -12px rgba(11, 28, 48, .22);
}

/* ---------- Stitch finance/admin reference shell ---------- */
@media (min-width: 769px) {
  .stitch-shell { background: var(--bg); }
  .stitch-shell .sidebar { width: 320px; background: #eef3ff; color: var(--text); border-right: 1px solid var(--border); }
  .stitch-shell .side-head { height: 150px; padding: 20px 30px; display: block; }
  .stitch-shell .brand { padding: 9px 0 0 0; border: 0; color: var(--primary); font-size: 29px; line-height: 1.15; }
  .stitch-shell .brand small { color: var(--text); font-size: 16px; margin-top: 6px; }
  .stitch-shell .side-close { display: none; }
  .stitch-shell .nav { padding: 10px 20px; overflow: hidden; }
  .stitch-shell .nav-item { min-height: 52px; padding: 12px 18px; margin-bottom: 8px; border-radius: 10px; color: #30384d; font-size: 18px; }
  .stitch-shell .nav-item:hover { background: #dce8ff; color: var(--primary); }
  .stitch-shell .nav-item.active { background: #63f589; color: #087a32; }
  .stitch-shell .nav-icon { width: 28px; font-size: 21px; }
  .stitch-shell .side-foot { padding: 18px 20px 24px; border-top: 1px solid var(--border); background: #eef3ff; }
  .stitch-shell .side-foot .who, .stitch-shell .side-foot .sync-data { display: none; }
  .stitch-shell .side-foot::before { content: '?  Help & Support'; display: block; padding: 15px 12px 16px; color: var(--text); font-size: 16px; }
  .stitch-shell .side-foot .logout { display: block; width: 100%; min-height: 48px; margin: 6px 0 0; border-radius: 9px; font-size: 16px; text-align: center; }
  .stitch-shell .side-foot [data-switchcashier] { background: #dce8ff; color: var(--text); }
  .stitch-shell .side-foot [data-logout] { background: transparent; color: var(--danger); }
  .stitch-shell .topbar { height: 80px; min-height: 80px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: none; }
  .stitch-shell .topbar > .menu-btn, .stitch-shell .topbar > .app-back, .stitch-shell .topbar > h2, .stitch-shell .topbar > .lang-toggle, .stitch-shell .topbar > .spacer { display: none !important; }
  .stitch-top-brand { color: var(--primary); font-size: 25px; font-weight: 700; white-space: nowrap; }
  .stitch-top-search { position: relative; flex: 0 1 480px; margin-left: 28px; }
  .stitch-top-search span { position: absolute; left: 18px; top: 7px; font-size: 26px; z-index: 1; color: var(--text); }
  .stitch-top-search input { width: 100%; height: 52px; padding: 0 18px 0 52px; border: 1px solid var(--border); border-radius: 10px; background: #f7f9ff; color: var(--text); font-size: 17px; }
  .stitch-top-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; white-space: nowrap; }
  .stitch-top-actions > button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 23px; }
  .stitch-top-actions > button:hover { background: var(--surface-low); }
  .stitch-lang { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 15px; cursor: pointer; }
  .stitch-lang input { accent-color: var(--primary); }
  .stitch-top-actions .pos-avatar { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: linear-gradient(135deg,#edf4ff,#dce9ff); color: var(--primary); font-weight: 700; }
  .stitch-shell .content { padding: 42px 40px; background: var(--bg); overflow: auto; }
  .stitch-page { max-width: 1240px; margin: 0 auto; }
  .stitch-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
  .stitch-page-head h1 { margin: 0; font-size: 30px; letter-spacing: -.5px; }
  .stitch-page-head p { margin: 10px 0 0; color: var(--muted); font-size: 17px; }
  .stitch-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 26px; margin-bottom: 30px; }
  .stitch-kpi { min-height: 142px; padding: 24px 22px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
  .stitch-kpi span, .stitch-kpi strong, .stitch-kpi small { display: block; }
  .stitch-kpi span { font-size: 16px; color: var(--muted); }
  .stitch-kpi strong { margin: 15px 0 7px; font-size: 32px; letter-spacing: -.7px; }
  .stitch-kpi small { color: #087a32; font-size: 14px; }
  .stitch-kpi.accent { background: var(--primary-container); color: #fff; }
  .stitch-kpi.accent span, .stitch-kpi.accent small { color: #fff; opacity: .9; }
  .stitch-toolbar { display: flex; align-items: center; gap: 14px; padding: 20px; margin-bottom: 24px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
  .stitch-toolbar input, .stitch-toolbar select { height: 52px; border: 1px solid var(--border); border-radius: 9px; background: #f7f9ff; font-size: 16px; padding: 0 14px; }
  .stitch-card { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
  .stitch-card table { margin: 0; width: 100%; }
  .stitch-table th { padding: 18px 20px; background: #eaf0ff; color: #2c3448; font-size: 15px; text-transform: none; }
  .stitch-table td { padding: 20px; font-size: 16px; border-bottom: 1px solid var(--border); }
  .stitch-table tbody tr:hover td { background: #f7f9ff; }
  .stitch-view-reports .cards-row, .stitch-view-tax .cards-row, .stitch-view-vatreturns .cards-row, .stitch-view-payroll .cards-row { gap: 26px; }
  .stitch-view-reports .stat, .stitch-view-tax .stat, .stitch-view-vatreturns .stat, .stitch-view-payroll .stat { min-height: 145px; padding: 24px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
  .stitch-view-reports .stat .val, .stitch-view-tax .stat .val, .stitch-view-payroll .stat .val { font-size: 32px; }
}
@media (max-width: 768px) {
  .stitch-shell .side-head { height: 84px; padding: 18px 20px 0; }
  .stitch-shell .brand { font-size: 19px; padding-left: 48px; }
  .stitch-shell .brand small { font-size: 12px; }
  .stitch-shell .topbar { min-height: 54px; height: 54px; padding: 7px 10px; background: var(--bg); }
  .stitch-shell .topbar > .menu-btn { display: inline-flex !important; order: -2; }
  .stitch-top-brand, .stitch-top-search, .stitch-top-actions > button, .stitch-lang { display: none; }
  .stitch-top-actions { margin-left: auto; }
  .stitch-top-actions .pos-avatar { width: 32px; height: 32px; }
  .stitch-shell .content { padding: 18px 12px 78px; }
  .stitch-page-head { display: block; margin-bottom: 17px; }
  .stitch-page-head h1 { font-size: 23px; }
  .stitch-page-head p { margin-top: 5px; font-size: 13px; }
  .stitch-kpis { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
  .stitch-kpi { min-height: 105px; padding: 15px; }
  .stitch-kpi span { font-size: 12px; }.stitch-kpi strong { margin: 9px 0 4px; font-size: 22px; }.stitch-kpi small { font-size: 11px; }
  .stitch-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 12px; margin-bottom: 14px; border-radius: 10px; }
  .stitch-toolbar input, .stitch-toolbar select { width: 100% !important; height: 42px; font-size: 12px; }
  .stitch-card { overflow-x: auto; border-radius: 10px; }
  .stitch-table { min-width: 760px; }
  .stitch-table th { padding: 13px 12px; font-size: 11px; }
  .stitch-table td { padding: 13px 12px; font-size: 12px; }
}

/* ---------- Stitch inventory management full-page layout ---------- */
@media (min-width: 769px) {
  .inventory-shell { background: var(--bg); }
  .inventory-shell .sidebar { width: 320px; background: #fff; color: var(--text); border-right: 1px solid var(--border); }
  .inventory-shell .side-head { height: 150px; padding: 20px; display: block; }
  .inventory-shell .brand { padding: 28px 0 0 78px; border: 0; color: var(--primary); font-size: 20px; line-height: 1.2; }
  .inventory-shell .brand::before { content: '◌'; display: grid; place-items: center; position: absolute; margin: -8px 0 0 -66px; width: 52px; height: 52px; border-radius: 50%; background: #f1f5ff; color: var(--primary); font-size: 25px; }
  .inventory-shell .brand small { color: var(--text); font-size: 15px; margin-top: 5px; }
  .inventory-shell .side-close { display: none; }
  .inventory-shell .nav { padding: 10px 27px; overflow: hidden; }
  .inventory-shell .nav-item { min-height: 48px; padding: 10px 16px; margin-bottom: 7px; border-radius: 8px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .inventory-shell .nav-item:hover { background: var(--surface-low); color: var(--text); }
  .inventory-shell .nav-item.active { background: var(--primary-container); color: #fff; }
  .inventory-shell .nav-icon { width: 24px; font-size: 18px; }
  .inventory-shell .side-foot { padding: 18px 20px 22px; border-top: 1px solid var(--border); background: #fff; }
  .inventory-shell .side-foot .who, .inventory-shell .side-foot .sync-data { display: none; }
  .inventory-shell .side-foot::before { content: '?  Help'; display: block; padding: 15px 23px 16px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .inventory-shell .side-foot .logout { display: block; width: 100%; min-height: 48px; margin: 6px 0 0; border-radius: 8px; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; text-align: center; }
  .inventory-shell .side-foot [data-switchcashier] { background: var(--primary-container); color: #fff; }
  .inventory-shell .side-foot [data-logout] { background: transparent; color: var(--text); }
  .inventory-shell .topbar { position: relative; height: 70px; min-height: 70px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: none; }
  .inventory-shell .topbar > .menu-btn { display: none; }
  .inventory-top-brand { position: absolute; left: 50%; transform: translateX(-50%); color: var(--primary); font-size: 24px; font-weight: 700; white-space: nowrap; }
  .inventory-top-search { position: relative; flex: 0 1 404px; }
  .inventory-top-search span { position: absolute; left: 17px; top: 7px; font-size: 25px; color: var(--muted); z-index: 1; }
  .inventory-top-search input { width: 100%; height: 50px; padding: 0 14px 0 50px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 17px; }
  .inventory-top-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; white-space: nowrap; }
  .inventory-top-actions > button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: 23px; }
  .inventory-top-actions > button:hover { background: var(--surface-low); }
  .inventory-top-actions .inventory-new-sale { width: auto; height: 50px; padding: 0 22px; border: 1px solid var(--primary); border-radius: 0; background: var(--primary); color: #fff; font-size: 18px; font-weight: 700; }
  .inventory-shift-status { display: flex; align-items: center; gap: 8px; font: 16px/1.05 "JetBrains Mono", Consolas, monospace; }
  .inventory-shift-status i { width: 9px; height: 9px; border-radius: 50%; background: #19d66d; }
  .inventory-top-actions .pos-avatar { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 50%; background: linear-gradient(135deg, #edf4ff, #dce9ff); color: var(--primary); font-weight: 700; }
  .inventory-shell .content { padding: 42px 40px; background: var(--bg); overflow: auto; }
  .inventory-page { max-width: 1240px; margin: 0 auto; }
  .inventory-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
  .inventory-heading h1 { margin: 0; font-size: 30px; letter-spacing: -.5px; }.inventory-heading h1 span { font-size: 27px; }.inventory-heading p { margin: 10px 0 0; color: var(--muted); font-size: 17px; }
  .inventory-heading-actions { display: flex; gap: 15px; }.inventory-heading-actions button { height: 56px; padding: 0 24px; border-radius: 0; font-size: 18px; font-weight: 700; }.inventory-outline { border: 1px solid var(--border); background: #fff; color: var(--text); }.inventory-primary { border: 1px solid var(--primary); background: var(--primary-container); color: #fff; }
  .inventory-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: start; }.inventory-main-column, .inventory-side-column { min-width: 0; }.inventory-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-bottom: 50px; }.inventory-kpi { display: flex; align-items: flex-start; justify-content: space-between; min-height: 160px; padding: 29px 30px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }.inventory-kpi span, .inventory-kpi small { display: block; }.inventory-kpi span { font-size: 18px; line-height: 1.45; }.inventory-kpi small { margin-top: 3px; font-size: 15px; }.inventory-kpi strong { display: block; margin-top: 7px; font-size: 30px; letter-spacing: -.7px; white-space: nowrap; }.inventory-kpi-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #d7e6ff; color: var(--primary); font-size: 29px; font-style: normal; }.inventory-kpi-icon-warm { background: #eee7d9; color: #805000; }
  .inventory-card { border: 1px solid var(--border); border-radius: 10px; background: #fff; }.inventory-card-head { display: flex; align-items: center; justify-content: space-between; padding: 24px 20px; border-bottom: 1px solid var(--border); }.inventory-card-head h2 { margin: 0; font-size: 20px; }.inventory-card-head h2 span { font-size: 17px; }.inventory-card-head button { border: 0; background: transparent; color: var(--primary); font-size: 16px; }.inventory-table-wrap { overflow-x: auto; }.inventory-table-wrap table { width: 100%; min-width: 700px; margin: 0; }.inventory-table-wrap th { padding: 18px 20px; background: var(--surface-low); color: var(--text); font: 600 15px/1.2 "JetBrains Mono", Consolas, monospace; text-transform: none; }.inventory-table-wrap td { padding: 22px 20px; border-bottom: 1px solid var(--border); font-size: 16px; }.inventory-table-wrap tbody tr:last-child td { border-bottom: 0; }.inventory-change { color: var(--text); }.inventory-change.positive { color: #0a7d38; }.inventory-change.negative { color: #e01818; }.inventory-operator { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 6px; border-radius: 50%; background: var(--primary-container); color: #fff; font-size: 12px; font-weight: 700; }.inventory-empty { padding: 34px 20px !important; text-align: center; color: var(--muted); }
  .inventory-side-column { display: grid; gap: 30px; }.inventory-low-card { overflow: hidden; }.inventory-low-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 26px 22px 20px; border-bottom: 1px solid var(--border); }.inventory-low-head h2 { margin: 0; font-size: 20px; line-height: 1.35; }.inventory-low-head h2 span { color: var(--danger); margin-right: 7px; }.inventory-low-head h2 small { font-size: 16px; }.inventory-low-head > b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--danger); color: #fff; }.inventory-low-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; width: 100%; gap: 13px; padding: 22px; border: 0; border-bottom: 1px solid #edf0f7; background: #fff; text-align: left; }.inventory-low-row:hover { background: #f7f9ff; }.inventory-low-icon { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid var(--border); background: var(--surface-low); color: var(--muted); font-size: 27px; }.inventory-low-name b, .inventory-low-name small, .inventory-low-qty strong, .inventory-low-qty small { display: block; }.inventory-low-name b { font-size: 17px; }.inventory-low-name small, .inventory-low-qty small { margin-top: 3px; color: var(--muted); font-size: 14px; }.inventory-low-qty { text-align: right; }.inventory-low-qty strong { color: var(--danger); font-size: 17px; }.inventory-purchase-link { width: 100%; min-height: 90px; border: 0; background: #fff; color: var(--primary); font-size: 18px; font-weight: 700; }.inventory-count-card { padding: 30px 30px 32px; text-align: center; }.inventory-count-icon { display: grid; place-items: center; width: 80px; height: 80px; margin: 0 auto 23px; border-radius: 50%; background: #e0ebff; color: var(--primary); font-size: 39px; }.inventory-count-card h2 { margin: 0; font-size: 24px; }.inventory-count-card p { margin: 16px 0 30px; color: var(--muted); font-size: 16px; line-height: 1.45; }.inventory-count-card .inventory-primary { width: 100%; height: 55px; font-size: 18px; font-weight: 700; }
}

@media (max-width: 768px) {
  .inventory-shell .content { padding: 18px 12px 78px; }.inventory-shell .side-head { height: 84px; padding: 18px 20px 0; }.inventory-shell .brand { padding-left: 48px; font-size: 18px; }.inventory-shell .brand::before { width: 40px; height: 40px; margin-left: -46px; font-size: 18px; }.inventory-shell .brand small { font-size: 12px; }
  .inventory-shell .topbar { min-height: 52px; height: 52px; padding: 7px 10px; background: var(--bg); }.inventory-shell .topbar > .menu-btn { display: inline-flex; order: -2; }.inventory-top-brand, .inventory-top-search, .inventory-top-actions > button:not(.inventory-new-sale), .inventory-top-actions > span:not(.pos-avatar), .inventory-top-actions .inventory-new-sale { display: none; }.inventory-top-actions { margin-left: auto; }.inventory-top-actions .pos-avatar { width: 30px; height: 30px; }.inventory-shell .topbar .menu-btn { width: 38px; height: 38px; border: 0; background: transparent; font-size: 20px; }
  .inventory-heading { display: block; margin-bottom: 17px; }.inventory-heading h1 { font-size: 22px; }.inventory-heading h1 span { font-size: 18px; }.inventory-heading p { margin-top: 5px; font-size: 13px; }.inventory-heading-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }.inventory-heading-actions button { height: 44px; padding: 0 7px; font-size: 12px; }
  .inventory-layout { display: block; }.inventory-kpis { grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }.inventory-kpi { min-height: 112px; padding: 18px; }.inventory-kpi span { font-size: 15px; }.inventory-kpi small { font-size: 12px; }.inventory-kpi strong { font-size: 24px; }.inventory-kpi-icon { width: 42px; height: 42px; font-size: 23px; }.inventory-side-column { margin-top: 14px; }.inventory-card-head { padding: 15px 13px; }.inventory-card-head h2 { font-size: 15px; }.inventory-card-head h2 span { font-size: 12px; }.inventory-card-head button { font-size: 12px; }.inventory-table-wrap table { min-width: 660px; }.inventory-table-wrap th { padding: 12px; font-size: 11px; }.inventory-table-wrap td { padding: 14px 12px; font-size: 12px; }.inventory-low-head { padding: 17px 14px; }.inventory-low-head h2 { font-size: 16px; }.inventory-low-head h2 small { font-size: 12px; }.inventory-low-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 9px; padding: 14px; }.inventory-low-icon { width: 42px; height: 42px; font-size: 21px; }.inventory-low-name b, .inventory-low-qty strong { font-size: 13px; }.inventory-low-name small, .inventory-low-qty small { font-size: 11px; }.inventory-purchase-link { min-height: 60px; font-size: 14px; }.inventory-count-card { padding: 22px 18px; }.inventory-count-icon { width: 62px; height: 62px; font-size: 30px; }.inventory-count-card h2 { font-size: 20px; }.inventory-count-card p { font-size: 13px; margin: 12px 0 20px; }.inventory-count-card .inventory-primary { height: 46px; font-size: 14px; }
}

/* ---------- Stitch customer management full-page layout ---------- */
@media (min-width: 769px) {
  .customers-shell { background: #fff; }
  .customers-shell .sidebar { width: 320px; background: #fff; color: var(--text); border-right: 1px solid var(--border); }
  .customers-shell .side-head { height: 150px; padding: 20px 20px; display: block; }
  .customers-shell .brand { padding: 28px 0 0 76px; border: 0; color: var(--primary); font-size: 20px; line-height: 1.2; }
  .customers-shell .brand::before { content: '▰'; display: grid; place-items: center; position: absolute; margin: -8px 0 0 -66px; width: 52px; height: 52px; border-radius: 10px; background: var(--primary-container); color: #fff; font-size: 24px; }
  .customers-shell .brand small { color: var(--text); font-size: 15px; margin-top: 5px; }
  .customers-shell .side-close { display: none; }
  .customers-shell .nav { padding: 10px 27px; overflow: hidden; }
  .customers-shell .nav-item { min-height: 48px; padding: 10px 16px; margin-bottom: 7px; border-radius: 8px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .customers-shell .nav-item:hover { background: var(--surface-low); color: var(--text); }
  .customers-shell .nav-item.active { background: var(--primary-container); color: #fff; }
  .customers-shell .nav-icon { width: 24px; font-size: 18px; }
  .customers-shell .side-foot { padding: 18px 20px 22px; border-top: 1px solid var(--border); background: #fff; }
  .customers-shell .side-foot .who, .customers-shell .side-foot .sync-data { display: none; }
  .customers-shell .side-foot::before { content: '?  Help'; display: block; padding: 15px 23px 16px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .customers-shell .side-foot .logout { display: block; width: 100%; min-height: 48px; margin: 6px 0 0; border-radius: 8px; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; text-align: center; }
  .customers-shell .side-foot [data-switchcashier] { background: var(--surface-container); color: var(--text); }
  .customers-shell .side-foot [data-logout] { background: transparent; color: var(--danger); }
  .customers-shell .topbar { height: 70px; min-height: 70px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: none; }
  .customers-shell .topbar > .app-back, .customers-shell .topbar > .menu-btn, .customers-shell .topbar > h2, .customers-shell .topbar > .mock-pill, .customers-shell .topbar > .lang-toggle, .customers-shell .topbar > .spacer { display: none !important; }
  .customers-top-brand { color: var(--primary); font-size: 24px; font-weight: 700; white-space: nowrap; }
  .customers-top-search { position: relative; flex: 0 1 320px; margin-left: auto; }
  .customers-top-search span { position: absolute; left: 17px; top: 8px; font-size: 23px; z-index: 1; }
  .customers-top-search input { width: 100%; height: 42px; padding: 0 15px 0 45px; border: 0; border-radius: 24px; background: var(--surface-low); color: var(--text); font-size: 16px; }
  .customers-top-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; font: 14px/1.2 "JetBrains Mono", Consolas, monospace; }
  .customers-top-actions > button { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: 22px; }
  .customers-top-actions > button:hover { background: var(--surface-low); }
  .customers-top-actions .customers-new-sale { width: auto; height: 50px; padding: 0 22px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 18px; font-weight: 700; }
  .customers-top-actions .pos-avatar { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; background: linear-gradient(135deg, #edf4ff, #dce9ff); color: var(--primary); font-weight: 700; }
  .customers-shell .content { padding: 40px; background: #fff; overflow: auto; }
  .customers-page { max-width: 1240px; margin: 0 auto; }
  .customers-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
  .customers-heading h1 { margin: 0; font-size: 30px; letter-spacing: -.5px; }
  .customers-heading p { margin: 10px 0 0; color: var(--muted); font-size: 17px; }
  .customers-heading-actions { display: flex; gap: 15px; }
  .customers-heading-actions button { height: 60px; padding: 0 24px; border-radius: 10px; font-size: 18px; font-weight: 700; }
  .customers-export { border: 1px solid var(--border); background: var(--surface-container); color: var(--text); }
  .customers-add { border: 1px solid var(--primary); background: var(--primary); color: #fff; }
  .customers-filter { display: flex; align-items: center; gap: 18px; padding: 20px; margin-bottom: 30px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
  .customers-search { position: relative; flex: 1; }
  .customers-search span { position: absolute; left: 20px; top: 9px; font-size: 25px; }
  .customers-search input { width: 100%; height: 60px; padding: 0 16px 0 60px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); font-size: 17px; }
  .customers-levels { display: flex; align-items: center; gap: 12px; }
  .customers-levels button { height: 50px; padding: 0 22px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; white-space: nowrap; }
  .customers-levels button.active { background: var(--primary-container); border-color: var(--primary-container); color: #fff; }
  .customers-levels .customers-filter-icon { width: 50px; padding: 0; font-size: 24px; }
  .customers-table-card { overflow: visible; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
  .customers-table-card table { margin: 0; }
  .customers-table-card th { padding: 20px; background: var(--surface-low); color: var(--text); font: 600 15px/1.2 "JetBrains Mono", Consolas, monospace; text-transform: none; }
  .customers-table-card td { padding: 20px; font-size: 16px; background: transparent; }
  .customers-table-card tbody tr:hover td { background: #f3f6ff; }
  .customers-identity, .customer-contact { display: flex; align-items: center; gap: 14px; }
  .customer-avatar { display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 50px; border-radius: 50%; background: #d9e7ff; color: var(--primary); font-size: 18px; font-weight: 700; }
  .customer-identity b, .customer-identity small, .customer-contact span, .customer-balance { display: block; }
  .customer-identity small, .customer-contact span + span, .customer-balance { margin-top: 4px; color: var(--muted); font-size: 15px; }
  .customer-contact { flex-direction: column; align-items: flex-start; gap: 0; }
  .customer-level { display: inline-block; padding: 8px 14px; border-radius: 999px; background: #dce9ff; font-size: 14px; white-space: nowrap; }
  .customer-level.vip { background: #ffe0b5; color: #714100; }.customer-level.gold { background: #d7e1ff; color: #173f95; }.customer-level.standard { background: #dce9ff; }
  .customers-actions-head { width: 155px; }
  .customer-row-actions { display: flex; align-items: center; gap: 6px; }
  .customer-row-actions button { width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--primary); font-size: 20px; }
  .customer-row-actions button:hover { background: var(--surface-container); }
  .customer-more-menu { display: none; position: absolute; z-index: 5; margin-top: 6px; min-width: 130px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
  .customer-more-menu.open { display: grid; }.customer-more-menu button { border: 0; background: transparent; padding: 8px 10px; text-align: left; }.customer-more-menu button:hover { background: var(--surface-low); }
  .customers-table-card td:last-child { position: relative; }.customers-empty { padding: 44px 20px !important; text-align: center; }
  .customers-pagination { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-top: 1px solid var(--border); font-size: 16px; }
  .customers-page-btn { width: 50px; height: 50px; margin-left: 8px; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: var(--text); font-size: 30px; line-height: 1; }.customers-page-btn:disabled { opacity: .35; }
}

@media (max-width: 768px) {
  .customers-shell .content { padding: 18px 12px 78px; background: #fff; }
  .customers-shell .side-head { height: 84px; padding: 18px 20px 0; }.customers-shell .brand { font-size: 18px; padding-left: 56px; }.customers-shell .brand::before { width: 40px; height: 40px; margin: -5px 0 0 -50px; font-size: 18px; }.customers-shell .brand small { font-size: 12px; }
  .customers-top-brand, .customers-top-search, .customers-top-actions > button:not(.customers-new-sale), .customers-top-actions > span:not(.pos-avatar), .customers-top-actions .customers-new-sale { display: none; }
  .customers-shell .topbar { min-height: 52px; height: 52px; padding: 7px 10px; background: var(--bg); }.customers-shell .topbar > .menu-btn { display: inline-flex !important; order: -2; }.customers-shell .topbar > h2 { display: block !important; flex: 1; text-align: center; font-size: 17px; color: var(--primary); }
  .customers-page { width: 100%; }.customers-heading { display: block; margin-bottom: 16px; }.customers-heading h1 { font-size: 22px; }.customers-heading p { margin-top: 5px; font-size: 13px; }.customers-heading-actions { margin-top: 13px; gap: 8px; }.customers-heading-actions button { height: 44px; flex: 1; padding: 0 8px; font-size: 13px; }
  .customers-filter { display: block; padding: 12px; margin-bottom: 14px; border-radius: 10px; }.customers-search input { height: 44px; padding-left: 43px; font-size: 13px; }.customers-search span { left: 13px; top: 6px; font-size: 22px; }.customers-levels { gap: 5px; margin-top: 9px; overflow-x: auto; padding-bottom: 2px; }.customers-levels button { height: 36px; padding: 0 12px; font-size: 11px; }.customers-levels .customers-filter-icon { width: 36px; font-size: 18px; }
  .customers-table-card { overflow-x: auto; border-radius: 10px; }.customers-table-card table { min-width: 720px; }.customers-table-card th { padding: 13px 12px; font-size: 12px; }.customers-table-card td { padding: 13px 12px; font-size: 13px; }.customer-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 13px; }.customer-identity small, .customer-contact span + span, .customer-balance { font-size: 11px; }.customer-level { padding: 6px 9px; font-size: 11px; }.customers-pagination { min-width: 720px; padding: 12px; font-size: 12px; }.customers-page-btn { width: 38px; height: 38px; font-size: 22px; }
}

/* ---------- Stitch product management full-page layout ---------- */
@media (min-width: 769px) {
  .products-shell { background: var(--bg); }
  .products-shell .sidebar { width: 320px; background: #fff; color: var(--text); border-right: 1px solid var(--border); }
  .products-shell .side-head { height: 230px; padding: 20px; display: block; position: relative; }
  .products-shell .brand { padding: 136px 0 0; border: 0; color: var(--primary); text-align: center; font-size: 20px; line-height: 1.2; }
  .products-shell .brand::before { content: '◎'; display: grid; place-items: center; position: absolute; top: 40px; left: 50%; transform: translateX(-50%); width: 80px; height: 80px; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--primary); font-size: 35px; }
  .products-shell .brand small { display: block; color: var(--text); font-size: 17px; margin-top: 7px; }
  .products-shell .side-close { display: none; }
  .products-shell .nav { padding: 0 27px; overflow: hidden; }
  .products-shell .nav-item { min-height: 48px; padding: 10px 16px; margin-bottom: 7px; border-radius: 8px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .products-shell .nav-item:hover { background: var(--surface-low); color: var(--text); }.products-shell .nav-item.active { background: var(--primary-container); color: #fff; }.products-shell .nav-icon { width: 24px; font-size: 18px; }
  .products-shell .side-foot { display: flex; flex-direction: column; padding: 18px 20px 22px; border-top: 1px solid var(--border); background: #fff; }.products-shell .side-foot .who, .products-shell .side-foot .sync-data { display: none; }.products-shell .side-foot::before { content: '?  Help'; display: block; order: 1; padding: 15px 23px 16px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }.products-shell .side-foot .logout { display: block; width: 100%; min-height: 48px; margin: 6px 0 0; border-radius: 0; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; text-align: center; }.products-shell .side-foot [data-switchcashier] { order: 3; background: #fff; border: 1px solid var(--outline); color: var(--text); }.products-shell .side-foot [data-logout] { order: 2; background: transparent; color: var(--text); }
  .products-shell .topbar { display: grid; grid-template-columns: 240px 322px minmax(0, 1fr); align-items: center; height: 70px; min-height: 70px; padding: 2px 20px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: none; }.products-shell .topbar > .app-back, .products-shell .topbar > .menu-btn, .products-shell .topbar > h2, .products-shell .topbar > .mock-pill, .products-shell .topbar > .lang-toggle, .products-shell .topbar > .spacer { display: none !important; }
  .products-top-brand { color: var(--primary); font-size: 24px; font-weight: 700; white-space: nowrap; }.products-top-search { position: relative; width: 322px; }.products-top-search span { position: absolute; left: 22px; top: 16px; z-index: 1; color: var(--text); font-size: 25px; }.products-top-search input { width: 100%; height: 66px; padding: 0 16px 0 75px; border: 1px solid var(--border); border-radius: 34px; background: #fff; color: var(--text); font-size: 17px; }.products-top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; white-space: nowrap; font: 16px/1.2 "JetBrains Mono", Consolas, monospace; }.products-top-actions > button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--primary); font-size: 23px; }.products-top-actions > button:hover { background: var(--surface-low); }.products-top-actions .products-new-sale { order: 1; width: auto; height: 54px; padding: 0 26px; border-radius: 0; background: var(--primary); color: #fff; font: 700 18px/1 Inter, sans-serif; }.products-top-actions > span:first-child { order: 0; }.products-top-actions > button[title="Notifications"] { order: 2; }.products-top-actions > button[title="Language"] { order: 3; }.products-top-actions > button[title="Help"] { order: 4; }.products-top-actions .pos-avatar { order: 5; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 50%; background: linear-gradient(135deg, #edf4ff, #dce9ff); color: var(--primary); font-weight: 700; }
  .products-shell .content { padding: 40px; background: var(--bg); overflow: auto; }.products-page { max-width: 1200px; margin: 0 auto; }.products-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 20px; margin-bottom: 30px; border-bottom: 1px solid var(--border); }.products-heading h1 { margin: 0 0 4px; color: var(--primary); font-size: 30px; letter-spacing: -.4px; }.products-heading h1 span { font-size: 27px; }.products-heading p { margin: 0; color: var(--muted); font-size: 17px; }.products-heading-actions { display: flex; gap: 15px; }.products-heading-actions button { height: 56px; padding: 0 20px; border-radius: 0; font-size: 18px; font-weight: 700; white-space: nowrap; }.products-outline { border: 1px solid var(--outline); background: #fff; color: var(--text); }.products-add { border: 1px solid var(--primary); background: var(--primary); color: #fff; }.material-symbol { margin-right: 8px; font-size: 22px; }
  .products-filter-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; margin-bottom: 30px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }.products-search { position: relative; flex: 1; min-width: 0; }.products-search span { position: absolute; left: 17px; top: 11px; font-size: 27px; }.products-search input, .products-filter-card select { height: 56px; border: 1px solid var(--border); border-radius: 0; background: var(--bg); color: var(--text); font-size: 17px; }.products-search input { width: 100%; padding: 0 15px 0 50px; }.products-filter-card select { min-width: 180px; padding: 0 15px; }.products-bulk { display: flex; align-items: center; gap: 8px; padding-left: 20px; border-left: 1px solid var(--border); white-space: nowrap; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }.products-bulk button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--outline); font-size: 24px; }.products-bulk button:hover { color: var(--primary); }
  .products-table-card { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }.products-table-wrap { overflow-x: auto; }.products-table-card table { width: 100%; min-width: 1100px; margin: 0; }.products-table-card th { padding: 18px 20px; background: var(--surface-low); color: var(--text); font: 600 15px/1.2 "JetBrains Mono", Consolas, monospace; text-transform: uppercase; white-space: nowrap; }.products-table-card td { padding: 24px 20px; border-bottom: 1px solid var(--border); background: #fff; font-size: 16px; }.products-table-card tbody tr:hover td { background: #f6f8ff; }.products-table-card tbody tr.product-out-row td { background: #fff9f9; }.products-check { width: 58px; text-align: center; }.product-image-box { display: grid; place-items: center; width: 60px; height: 60px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); overflow: hidden; }.product-table-image { width: 100%; height: 100%; object-fit: cover; }.product-image-placeholder { color: var(--outline); font-size: 27px; }.product-sku { font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }.product-stock { display: inline-block; padding: 6px 11px; border-radius: 999px; background: #e4f7eb; color: #0a9b4c; font: 700 14px/1.1 "JetBrains Mono", Consolas, monospace; }.product-stock.zero { background: #ffd9d5; color: var(--danger); }.product-status { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; white-space: nowrap; font-size: 14px; }.product-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }.product-status.active { background: var(--green-bright); color: #087a32; }.product-status.out { background: var(--surface-container); color: var(--muted); }.product-status.inactive { background: #ffe2e0; color: var(--danger); }.products-actions { position: relative; width: 120px; text-align: right; white-space: nowrap; }.products-actions > button { width: 35px; height: 35px; border: 0; background: transparent; color: var(--outline); font-size: 23px; }.products-actions > button:hover { color: var(--primary); }.product-more-menu { display: none; position: absolute; right: 10px; z-index: 10; min-width: 125px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow); text-align: left; }.product-more-menu.open { display: grid; }.product-more-menu button { padding: 9px; border: 0; background: transparent; text-align: left; }.product-more-menu button:hover { background: var(--surface-low); }.products-empty { padding: 50px !important; text-align: center; color: var(--muted); }.products-pagination { display: flex; align-items: center; justify-content: space-between; padding: 20px; background: #fff; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }.products-page-buttons { display: flex; align-items: center; gap: 7px; }.products-page-buttons button { min-width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text); font-size: 17px; }.products-page-buttons button.active { border-color: var(--primary); background: var(--primary); color: #fff; }.products-page-buttons button:disabled { opacity: .4; }
}
@media (max-width: 768px) {
  .products-shell .side-head { height: 84px; padding: 18px 20px 0; }.products-shell .brand { padding: 45px 0 0 48px; text-align: left; font-size: 18px; }.products-shell .brand::before { margin: -43px 0 0 -47px; width: 40px; height: 40px; line-height: 40px; font-size: 18px; }.products-shell .brand::after { display: none; }.products-shell .topbar { min-height: 52px; height: 52px; padding: 7px 10px; }.products-top-brand, .products-top-search, .products-top-actions > span:not(.pos-avatar), .products-top-actions > button { display: none; }.products-top-actions { margin-left: auto; }.products-top-actions .pos-avatar { width: 30px; height: 30px; }.products-shell .content { padding: 18px 12px 78px; }.products-heading { display: block; margin-bottom: 16px; }.products-heading h1 { font-size: 22px; }.products-heading p { margin-top: 5px; font-size: 13px; }.products-heading-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }.products-heading-actions button { height: 42px; padding: 0 8px; font-size: 12px; }.products-add { grid-column: 1 / -1; }.products-filter-card { display: block; padding: 12px; margin-bottom: 14px; border-radius: 10px; }.products-search input, .products-filter-card select { width: 100%; height: 42px; margin-bottom: 8px; font-size: 12px; }.products-bulk { justify-content: space-between; padding: 9px 0 0; border-left: 0; }.products-table-card { overflow-x: auto; border-radius: 10px; }.products-table-card table, .products-pagination { min-width: 1120px; }.products-table-card th { padding: 13px 12px; font-size: 11px; }.products-table-card td { padding: 13px 12px; font-size: 12px; }.product-table-image, .product-image-placeholder { width: 42px; height: 42px; font-size: 20px; }.product-status, .product-stock { padding: 5px 8px; font-size: 11px; }.products-pagination { padding: 12px; font-size: 12px; }
}

/* ---------- Stitch expenses full-page layout ---------- */
@media (min-width: 769px) {
  .expenses-shell .nav-item.active { background: #64ff8b; color: #087a32; }
  .expenses-shell .content { padding: 38px 30px; }
  .expenses-page { max-width: 1240px; margin: 0 auto; }
  .expenses-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }.expenses-heading h1 { margin: 0; font-size: 30px; }.expenses-heading p { margin: 9px 0 0; color: var(--muted); font-size: 17px; }.expenses-heading-actions { display: flex; gap: 15px; }.expenses-heading-actions button { height: 56px; padding: 0 25px; border-radius: 9px; font-size: 18px; font-weight: 700; }.expenses-export { border: 1px solid transparent; background: var(--surface-container); color: var(--primary); }.expenses-add { border: 1px solid var(--primary); background: var(--primary); color: #fff; }
  .expenses-filter-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 30px; margin-bottom: 30px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }.expenses-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: end; }.expenses-filters label { display: block; margin: 0 0 7px; color: var(--text); font-size: 16px; }.expenses-filters select { width: 100%; height: 52px; padding: 0 15px; border: 0; border-radius: 9px; background: var(--surface-container); color: var(--text); font-size: 16px; }.expenses-more, .expenses-manage-cats { align-self: end; height: 46px; border: 0; background: transparent; color: var(--primary); font-size: 16px; text-align: left; }.expenses-manage-cats { color: var(--muted); font-size: 13px; }.expenses-total-card { grid-column: 2; grid-row: 1 / span 2; padding: 20px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }.expenses-total-card span, .expenses-total-card small { display: block; }.expenses-total-card span { font-size: 16px; }.expenses-total-card strong { display: block; margin: 12px 0 9px; font-size: 38px; letter-spacing: -.8px; white-space: nowrap; }.expenses-total-card small { display: inline-block; padding: 8px 12px; border-radius: 999px; background: #e8fff0; color: #087a32; font-size: 14px; }.expenses-custom-range { display: none; grid-column: 1; align-items: center; gap: 8px; }.expenses-custom-range.open { display: flex; }.expenses-custom-range input { height: 38px; padding: 0 8px; border: 1px solid var(--border); border-radius: 7px; }
  .expenses-table-card { overflow: visible; border: 1px solid var(--border); border-radius: 14px; background: #fff; }.expenses-table-card table { margin: 0; }.expenses-table-card th { padding: 18px 20px; background: var(--surface-low); color: var(--text); font: 600 15px/1.2 "JetBrains Mono", Consolas, monospace; }.expenses-table-card td { padding: 22px 20px; font-size: 16px; }.expenses-table-card tbody tr:hover td { background: #f6f8ff; }.expense-category-pill { display: inline-block; padding: 7px 13px; border-radius: 999px; background: #dce9ff; color: var(--primary); }.expense-receipt { border: 0; background: transparent; color: var(--primary); font-size: 24px; }.expense-row-actions { display: flex; gap: 5px; }.expense-row-actions button { width: 30px; height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 23px; }.expense-row-actions button:hover { background: var(--surface-low); color: var(--primary); }.expense-more-menu { display: none; position: absolute; right: 10px; z-index: 5; margin-top: 5px; min-width: 120px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }.expense-more-menu.open { display: grid; }.expense-more-menu button { padding: 8px 10px; border: 0; background: transparent; text-align: left; }.expense-more-menu button:hover { background: var(--surface-low); }.expenses-table-card td:last-child { position: relative; }.expenses-actions-head { width: 115px; }.expenses-empty { padding: 50px !important; text-align: center; }.expenses-pagination { display: flex; justify-content: space-between; align-items: center; padding: 17px 20px; border-top: 1px solid var(--border); font-size: 16px; }.expenses-pagination button { width: 48px; height: 48px; margin-left: 8px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text); font-size: 28px; }.expenses-pagination button:disabled { opacity: .35; }
}

@media (max-width: 768px) {
  .expenses-shell .content { padding: 18px 12px 78px; }.expenses-heading { display: block; margin-bottom: 16px; }.expenses-heading h1 { font-size: 22px; }.expenses-heading p { margin-top: 5px; font-size: 13px; }.expenses-heading-actions { gap: 8px; margin-top: 13px; }.expenses-heading-actions button { height: 44px; flex: 1; padding: 0 8px; font-size: 13px; }.expenses-filter-wrap { display: block; padding: 12px; margin-bottom: 14px; border-radius: 10px; }.expenses-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.expenses-filters > div:last-of-type { grid-column: 1 / -1; }.expenses-filters label { margin-bottom: 4px; font-size: 11px; }.expenses-filters select { height: 40px; padding: 0 8px; font-size: 12px; }.expenses-more, .expenses-manage-cats { height: 36px; font-size: 12px; }.expenses-total-card { margin-top: 10px; padding: 14px; }.expenses-total-card strong { margin: 7px 0; font-size: 27px; }.expenses-total-card small { font-size: 11px; }.expenses-custom-range { flex-wrap: wrap; }.expenses-table-card { overflow-x: auto; border-radius: 10px; }.expenses-table-card table, .expenses-pagination { min-width: 920px; }.expenses-table-card th { padding: 13px 12px; font-size: 11px; }.expenses-table-card td { padding: 13px 12px; font-size: 12px; }.expense-category-pill { padding: 5px 8px; font-size: 11px; }.expenses-pagination { padding: 12px; font-size: 12px; }.expenses-pagination button { width: 38px; height: 38px; font-size: 22px; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #0e2a47, #1f6feb); }
.login-card { background: #fff; padding: 32px; border-radius: 14px; width: 340px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-card h1 { margin: 0 0 4px; font-size: 24px; }
.login-card p.sub { color: var(--muted); margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 5px; font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfc; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); background: #fff; }
.password-control { position: relative; display: flex; align-items: center; }
.password-control input { padding-right: 46px; }
.password-toggle { position: absolute; right: 6px; width: 36px; height: 34px; min-height: 34px; border: 0; border-radius: 7px; background: transparent; color: #6b7686; font-size: 17px; line-height: 1; }
.password-toggle:hover, .password-toggle:focus { background: #edf4ff; color: var(--primary); outline: none; }
.security-toggle { cursor: pointer; }
.security-toggle input { accent-color: var(--primary); }
.security-toggle small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.btn { border: 1px solid transparent; border-radius: 8px; padding: 10px 16px; min-height: 44px; font-weight: 600; background: var(--surface-container); color: var(--text); letter-spacing: .01em; }
.btn.primary { background: var(--primary-container); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { background: #fbeaec; color: var(--danger); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.row-actions { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; white-space: nowrap; }
.row-actions .btn.sm { padding: 5px 7px; font-size: 13px; line-height: 1; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.err { color: var(--danger); min-height: 18px; font-size: 13px; margin-top: 6px; }

/* ---------- App shell ---------- */
.app { display: flex; height: 100vh; }
.sidebar { width: 210px; background: #0e1a29; color: #cbd6e4; display: flex; flex-direction: column; flex-shrink: 0; }
.brand { padding: 18px; font-size: 17px; font-weight: 700; color: #fff; border-bottom: 1px solid #1e3147; }
.brand small { display: block; color: #7f93ad; font-size: 11px; font-weight: 400; margin-top: 2px; }
.nav { flex: 1; padding: 10px; overflow-y: auto; }
.nav-group { margin-bottom: 6px; }
.nav-head { display: flex; width: 100%; align-items: center; gap: 8px; padding: 10px 12px 7px; margin-top: 4px; background: none; border: none; color: #e8eef7; border-bottom: 1px solid rgba(120, 150, 185, .25); border-radius: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.nav-head:hover { color: #fff; }
.nav-caret { margin-left: auto; font-size: 11px; opacity: .75; }
.nav-body { display: none; padding-top: 4px; }
.nav-body.open { display: block; }
.nav-item { display: flex; width: 100%; align-items: center; gap: 9px; text-align: left; padding: 8px 12px; margin-bottom: 2px; background: none; border: none; color: #9db0c8; border-radius: 8px; font-size: 13.5px; }
.nav-badge { margin-left: auto; background: #e64545; color: #fff; border-radius: 10px; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 6px; min-width: 16px; text-align: center; }.nav-item.active .nav-badge { background: rgba(255,255,255,.85); color: var(--primary); }
.memo-banner { display: flex; align-items: center; gap: 10px; padding: 9px 22px; font-size: 13px; background: #fff7e0; border-bottom: 1px solid #f0d98c; color: #6b4f00; }
.mock-banner { display: flex; align-items: center; gap: 10px; padding: 10px 22px; font-size: 13px; font-weight: 700; background: repeating-linear-gradient(45deg, #d64545, #d64545 14px, #b03535 14px, #b03535 28px); color: #fff; border-bottom: 2px solid #8f2020; }
.mock-banner-ico { font-size: 16px; }
.mock-banner-txt { flex: 1; letter-spacing: .3px; }
.mock-pill { display: inline-block; background: #d64545; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 1px; padding: 3px 10px; border-radius: 20px; margin-left: 8px; }
.memo-banner.bad { background: #fdeaea; border-bottom-color: #eeb9b9; color: #7a2020; }
.memo-banner-ico { font-size: 15px; }
.memo-banner-txt { font-weight: 600; }
.nav-item:hover { background: #16283d; color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 15px; }
.side-foot { padding: 14px; border-top: 1px solid #1e3147; }
.side-foot .who { font-size: 13px; }
.side-foot .who b { color: #fff; }
.side-foot .logout { margin-top: 8px; background: none; color: #f2b8b8; border: none; }

.lang-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin-top: 0; font-size: 12px; color: #4a5568; }
.lang-toggle input { display: none; }
.lang-toggle .track { width: 44px; height: 22px; border-radius: 11px; background: #cbd5e0; position: relative; transition: background .15s; flex-shrink: 0; }
.lang-toggle input:checked + .track { background: #1f6feb; }
.lang-toggle .thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; font-size: 10px; line-height: 18px; text-align: center; color: #1f6feb; font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.lang-toggle input:checked + .track .thumb { left: 24px; color: #fff; background: #fff; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { background: var(--bg); border-bottom: 1px solid var(--border); padding: 14px 22px; display: flex; align-items: center; gap: 14px; box-shadow: none; z-index: 2; }
.topbar h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.topbar .spacer { flex: 1; }
.app-back { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--primary); font-size: 22px; line-height: 1; }
.app-back:hover, .app-back:focus { background: #edf4ff; border-color: #a8c8f7; outline: none; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; background: #fff; color: var(--text); cursor: pointer; font-size: 13px; }
.tabs button:hover { border-color: var(--primary); }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.content { flex: 1; overflow: auto; padding: 22px; }
.repair-workspace { display:flex; flex-direction:column; gap:16px; }
.repair-hero { display:flex; justify-content:space-between; align-items:center; padding:24px 28px; border-radius:16px; color:#fff; background:linear-gradient(135deg,#0e2a47,#1f6feb); box-shadow:0 10px 26px rgba(14,42,71,.2); }
.repair-hero h3 { margin:5px 0 4px; font-size:24px; }
.repair-hero p { margin:0; color:#c9def7; }
.repair-hero .eyebrow { font-size:11px; letter-spacing:1.5px; opacity:.8; }
.repair-hero .btn { background:#fff; color:#1559c9; }
.repair-actions { display:flex; gap:8px; }
.repair-actions .btn.primary { background:#fff; color:#1559c9; }
.repair-actions .btn:not(.primary) { background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.35); }
.repair-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.repair-metrics > div { padding:16px 18px; background:#fff; border:1px solid var(--border); border-radius:12px; box-shadow:var(--shadow); }
.repair-metrics span { display:block; color:var(--muted); font-size:12px; }
.repair-metrics b { display:block; margin-top:7px; font-size:24px; color:#0e2a47; }
.repair-toolbar { display:flex; gap:10px; padding:12px; background:#fff; border:1px solid var(--border); border-radius:12px; }
.repair-toolbar input,.repair-toolbar select { min-height:38px; padding:8px 12px; border:1px solid var(--border); border-radius:8px; background:#fafbfc; }
.repair-toolbar input { flex:1; }
.repair-table-card { background:#fff; border:1px solid var(--border); border-radius:12px; box-shadow:var(--shadow); overflow:hidden; }
.repair-table-card table { margin:0; }
.repair-table-card th { background:#f7f9fc; color:#526173; font-size:11px; text-transform:uppercase; letter-spacing:.4px; }
.repair-table-card td { padding:13px 12px; }
@media (max-width:700px){ .repair-metrics{grid-template-columns:repeat(2,minmax(0,1fr));}.repair-hero{padding:18px;}.repair-hero h3{font-size:20px;}.repair-toolbar{flex-direction:column;} }
.repair-row-actions { display:flex; gap:5px; flex-wrap:wrap; }
.repair-row-actions .btn { padding:6px 8px; font-size:12px; white-space:nowrap; }

/* ---------- Cards / tables ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: none; }
.grid { display: grid; gap: 16px; }
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: none; }
.stat .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.stat .val { font-size: 24px; font-weight: 700; margin-top: 6px; }
.stat .val.green { color: var(--green); }
.stat .val.red { color: var(--danger); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
tr:hover td { background: #f7f9fc; }
.money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.right { text-align: right; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill.ok { background: #e6f6ea; color: var(--green); }
.pill.bad { background: #fdecec; color: var(--danger); }
.pill.warn { background: #fbf1da; color: #8a6d1a; }
.alert-warn { background: #fbf1da; border: 1px solid #e8cf8e; color: #7a5b14; border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.alert-danger { background: #fdecec; border: 1px solid #eab1b1; color: var(--danger); border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; }
.spacer { flex: 1; }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: 1fr 340px; gap: 16px; height: 100%; }
.catbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.catbar button { background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 9px 18px; min-height: 44px; color: var(--muted); font-weight: 600; }
.catbar button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.searchbar { display: flex; gap: 8px; margin-bottom: 16px; }
.searchbar input { flex: 1; padding: 12px 16px 12px 44px; min-height: 56px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); color: var(--text); font-size: 16px; background-image: linear-gradient(var(--muted),var(--muted)); background-size: 13px 13px; background-repeat: no-repeat; background-position: 17px center; }
.searchbar input:focus { outline: 2px solid rgba(0,82,204,.18); border-color: var(--primary-container); }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.prod-tile { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: left; box-shadow: none; display: flex; flex-direction: column; gap: 5px; cursor: pointer; min-height: 190px; }
.prod-tile:hover { border-color: var(--primary-container); }
.prod-tile.selected { border-color: var(--primary-container); outline: 2px solid var(--primary-container); background: var(--surface-low); }
.prod-tile .name { font-weight: 600; }
.prod-tile .price { color: var(--primary); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", Consolas, monospace; }
.prod-tile .stock { color: var(--muted); font-size: 12px; }
.prod-tile.out { opacity: .5; }
.prod-tile .tile-media { position: relative; margin: -1px -1px 4px; }
.prod-tile .tile-img { width: 100%; height: 112px; object-fit: cover; border-radius: 9px; margin-bottom: 0; background: var(--surface-low); display: block; }
.prod-tile .tile-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, var(--surface-high), var(--surface-low)); color: var(--primary); font-size: 34px; font-weight: 700; }
.prod-tile .tile-price { position: absolute; right: 8px; bottom: 8px; padding: 4px 8px; border-radius: 6px; background: rgba(255,255,255,.94); color: var(--text); font-family: "JetBrains Mono", Consolas, monospace; font-size: 14px; font-weight: 700; line-height: 1.15; }
.prod-tile .tile-count { position: absolute; right: 8px; top: 8px; min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: var(--primary-container); color: #fff; font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px; font-weight: 700; }
.prod-tile .price { display: none; }
.prod-tile .unit-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.prod-tile .unit-chip { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; font-size: 11px; padding: 2px 8px; color: var(--primary); cursor: pointer; }
.prod-tile .unit-chip:hover { background: var(--primary); color: #fff; }
.cart { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; box-shadow: none; }
.cart-head { padding: 14px; border-bottom: 1px solid var(--border); font-weight: 700; }
.cart-items { flex: 1; overflow: auto; padding: 8px; }
.cart-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; }
.cart-item:hover { background: #f7f9fc; }
.cart-item .ci-name { flex: 1; }
.cart-item .ci-name .u { color: var(--muted); font-size: 12px; }
.cart-item .qtybox { display: flex; align-items: center; gap: 6px; }
.cart-item .qtybox button { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.cart-item .line { width: 88px; text-align: right; font-weight: 600; }
.cart-foot { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.cart-foot .row { display: flex; justify-content: space-between; }
.cart-foot .row.total { font-size: 18px; font-weight: 700; }
.cart-actions { display: flex; gap: 8px; }
.cart-actions .btn { flex: 1; }
.btn.checkout { background: var(--green); color: #fff; font-size: 16px; padding: 14px; min-height: 56px; }
.btn.checkout:hover { background: #2b8a3a; }
.member-box { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: #f7f9fc; font-size: 12px; }
.member-box-inner { display: flex; flex-direction: column; gap: 2px; }
.member-box input[type=number] { padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; }
.vat-sheet .field label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.vat-sheet .field label .auto { font-size: 10px; color: var(--green); font-weight: 600; text-transform: uppercase; }
.vat-sheet input[readonly] { background: #f5f7fa; }
.grid { display: grid; gap: 10px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10,20,35,.5); display: grid; place-items: center; z-index: 50; }
.modal { background: #fff; border-radius: 14px; width: min(520px, 92vw); max-height: 90vh; overflow: auto; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; position: relative; }
.modal-head h3 { margin: 0; flex: 1; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Receipt modal ---------- */
.product-editor-modal { width: min(720px, 94vw) !important; max-height: 92vh; border: 1px solid var(--border); border-radius: 14px !important; box-shadow: 0 24px 70px rgba(11, 28, 48, .24); }
.product-editor-modal { max-height: calc(100vh - 28px); overflow-y: auto; scrollbar-width: none; }
.product-editor-modal::-webkit-scrollbar { display: none; width: 0; height: 0; }
.product-editor-modal .modal-head { padding: 22px 26px; background: var(--surface-low); border-bottom: 1px solid var(--border); }
.product-editor-modal .modal-head::before { content: '▣'; display: grid; place-items: center; width: 36px; height: 36px; margin-right: 13px; border-radius: 8px; background: var(--primary-container); color: #fff; font-size: 19px; }
.product-editor-modal .modal-head h3 { color: var(--primary); font-size: 22px; letter-spacing: -.2px; }
.product-editor-modal .modal-body { padding: 17px 22px; background: #fff; }
.product-editor-modal .modal-body > div:first-child { display: grid !important; grid-template-columns: 96px minmax(0, 1fr); gap: 17px !important; align-items: start; }
.product-editor-modal .modal-body > div:first-child > div:first-child { width: 96px !important; }
.product-editor-modal #pf-imgwrap { width: 92px !important; height: 92px !important; border: 1px solid var(--border) !important; border-radius: 9px !important; background: var(--surface-low) !important; color: var(--muted); }
.product-editor-modal [data-img-up], .product-editor-modal [data-img-rm] { width: 92px; min-height: 30px; padding: 5px 6px !important; border-radius: 6px !important; font-size: 11px !important; }
.product-editor-modal [data-img-up] { border: 1px solid var(--border) !important; background: #fff !important; color: var(--primary) !important; }
.product-editor-modal [data-img-rm] { border: 1px solid #f1b7b7 !important; background: #fff1f1 !important; color: var(--danger) !important; }
.product-editor-modal .field { margin-bottom: 9px; }.product-editor-modal .field label { margin-bottom: 4px; color: var(--text); font-size: 12px; font-weight: 700; }.product-editor-modal .field input, .product-editor-modal .field select { height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text); font-size: 14px; }.product-editor-modal .field input:focus, .product-editor-modal .field select:focus { border-color: var(--primary); outline: 2px solid rgba(0, 82, 204, .12); }
.product-editor-modal .modal-body > .grid { gap: 10px !important; }.product-editor-modal #pf-units { padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); }.product-editor-modal #pf-units > div { padding: 3px 0 !important; border-bottom: 1px solid #e5e9f3; }.product-editor-modal #pf-units > div:last-child { border-bottom: 0; }.product-editor-modal #pf-units input { height: 32px !important; width: auto !important; min-width: 0; padding: 0 6px; border: 1px solid var(--border); border-radius: 5px; background: #fff; font-size: 12px; }.product-editor-modal [data-add-unit] { min-height: 30px !important; border: 1px solid var(--border) !important; background: #fff !important; color: var(--primary) !important; border-radius: 6px !important; }.product-editor-modal #pf-active { width: 16px; height: 16px; accent-color: var(--primary); }.product-editor-modal .modal-foot { padding: 12px 22px; background: #fbfcff; border-top: 1px solid var(--border); }.product-editor-modal .modal-foot [data-cancel], .product-editor-modal .modal-foot [data-save] { min-width: 102px; min-height: 38px; border-radius: 7px; font-size: 14px; font-weight: 700; }.product-editor-modal .modal-foot [data-cancel] { border: 1px solid var(--border) !important; background: #fff !important; color: var(--text) !important; }.product-editor-modal .modal-foot [data-save] { border: 1px solid var(--primary) !important; background: var(--primary) !important; color: #fff !important; }
@media (max-width: 768px) { .product-editor-modal .modal-head { padding: 17px 18px; }.product-editor-modal .modal-body { padding: 18px; }.product-editor-modal .modal-body > div:first-child { grid-template-columns: 1fr; gap: 12px !important; }.product-editor-modal .modal-body > div:first-child > div:first-child { margin: 0 auto; }.product-editor-modal .modal-body > .grid { grid-template-columns: 1fr !important; gap: 0 !important; }.product-editor-modal .modal-foot { padding: 13px 18px; }.product-editor-modal .modal-foot button { flex: 1; } }

.receipt-sheet { font-size: 12px; line-height: 1.5; }
.receipt-sheet .r-head { text-align: center; }
.receipt-sheet .r-items td { padding: 2px 6px; }
.receipt-actions { display: flex; gap: 8px; }

/* ---------- Print ---------- */
#print-root { display: none; }
@media print {
  html, body { margin: 0; padding: 0; background: #fff; }
  body * { visibility: hidden; }
  #print-root, #print-root * { visibility: visible; }
  #print-root { display: block; position: absolute; left: 0; top: 0; width: 100%; }
  .sheet.thermal { margin: 0 auto; }
  .sheet.thermal58 { width: 58mm; }
  .sheet.thermal80 { width: 80mm; }
  .sheet.a4 { width: 190mm; padding: 12mm; }
  .sheet a, .sheet button { display: none; }
  .t-receipt, .t-receipt * { color: #000 !important; }
}
.sheet.a4.printable { page: printA4; }
@page printA4 { size: A4; margin: 10mm; }
@page { size: 80mm auto; margin: 0; }

/* ---------- Professional thermal receipt ---------- */
.t-receipt { font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Noto Sans CJK SC', 'SimSun', '宋体', 'Consolas', monospace; color: #111; font-size: 11px; line-height: 1.35; }
.t-receipt .t-center { text-align: center; }
.t-receipt .t-name { font-size: 13px; font-weight: 700; letter-spacing: .3px; }
.t-receipt .t-shop { color: #333; font-size: 10px; }
.t-receipt .t-shop .t-phone { color: #555; }
.t-receipt .t-tax { font-size: 10px; }
.t-receipt .t-divider { border: none; border-top: 1px dashed #333; margin: 6px 0; }
.t-receipt .t-divider.solid { border-top-style: solid; }
.t-receipt .t-receipt-no { font-size: 12px; font-weight: 700; }
.t-receipt .t-meta { font-size: 10px; color: #222; }
.t-receipt table.t-items { width: 100%; border-collapse: collapse; font-size: 11px; }
.t-receipt table.t-items th { text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid #333; padding: 3px 2px; }
.t-receipt table.t-items td { padding: 2px 2px; vertical-align: top; }
.t-receipt table.t-items tr.t-sub td { border-top: 1px dashed #999; padding-top: 4px; }
.t-receipt .t-total { font-size: 13px; font-weight: 700; }
.t-receipt .t-total .t-amt { font-size: 15px; }
.t-receipt .t-paid { font-size: 11px; }
.t-receipt .t-fiscal { border: 1px solid #333; padding: 6px 5px; margin-top: 6px; font-size: 9px; line-height: 1.4; }
.t-receipt .t-fiscal .t-f-head { text-align: center; font-weight: 700; letter-spacing: .5px; border-bottom: 1px solid #333; padding-bottom: 3px; margin-bottom: 4px; }
.t-receipt .t-qr { text-align: center; margin: 6px 0 2px; }
.t-receipt .t-url { word-break: break-all; word-wrap: break-word; font-size: 8.5px; color: #333; }
.t-receipt .t-footer { text-align: center; font-size: 9px; color: #555; margin-top: 8px; border-top: 1px solid #999; padding-top: 4px; }
.t-receipt .t-row { display: flex; justify-content: space-between; padding: 1px 0; font-size: 10px; }
.t-receipt .right { text-align: right; }
.t-receipt .t-totals { margin-top: 4px; }
.t-receipt .t-total { border-top: 1px dashed #333; margin-top: 2px; padding-top: 3px; }
.t-receipt .t-total .t-amt { color: #000; }
.t-receipt .t-itemline { margin: 2px 0; }
.t-receipt .t-itemline .t-il-name { font-size: 10px; }
.t-receipt .t-itemline .t-il-line { display: flex; justify-content: space-between; font-size: 10px; }

.stat .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.dash-hourbars { display: flex; align-items: flex-end; gap: 2px; height: 110px; padding: 4px 0; overflow-x: auto; }
.dash-hour { flex: 1; min-width: 12px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.dash-bar { width: 70%; background: var(--primary); border-radius: 2px 2px 0 0; min-height: 2px; }
.dash-hlbl { font-size: 9px; color: var(--muted); margin-top: 2px; }

/* ---------- Responsive (desktop default above) ---------- */
/* New structural helpers (desktop: mostly hidden / static) */
.menu-btn { display: none; }
.side-close { display: none; background: none; border: none; color: #9db0c8; font-size: 16px; padding: 4px 8px; }
.side-head { display: flex; align-items: center; justify-content: space-between; }
.nav-backdrop { display: none; }
.cart-open { display: none; }
.cart-close { display: none; }
.cart-backdrop { display: none; }
.mobile-cart-dock { display: none; }
.mobile-nav { display: none; }
.pos-goods { display: flex; flex-direction: column; min-width: 0; }
.mobile-hub { display: grid; gap: 14px; }
.mobile-hub-hero { padding: 18px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #1f6feb, #174ea6); box-shadow: 0 10px 24px rgba(31,111,235,.18); }
.mobile-hub-hero h3 { margin: 4px 0 3px; font-size: 22px; }
.mobile-hub-hero p { margin: 0; color: rgba(255,255,255,.8); font-size: 13px; }
.mobile-hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mobile-hub-card { display: flex; align-items: center; gap: 10px; min-height: 94px; padding: 14px; text-align: left; border: 1px solid var(--border); border-radius: 15px; background: var(--panel); color: var(--text); box-shadow: 0 5px 15px rgba(25,45,75,.06); cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.mobile-hub-card:active { transform: scale(.98); }
.mobile-hub-card:hover { border-color: #a8c8f7; box-shadow: 0 8px 20px rgba(31,111,235,.12); }
.mobile-hub-icon { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; background: #edf4ff; color: var(--primary); font-size: 22px; font-weight: 800; }
.mobile-hub-copy { display: grid; gap: 3px; min-width: 0; }
.mobile-hub-copy b { font-size: 14px; }
.mobile-hub-copy small { color: var(--muted); font-size: 11px; }
.mobile-hub-arrow { margin-left: auto; color: #8da1ba; font-size: 24px; line-height: 1; }
.cashier-quick-actions { display: flex; justify-content: flex-end; margin: -2px 0 9px; }
.system-update-card { border-color: #cfe0f5; }

/* ---------- Tablet (≤1024px) ---------- */
@media (max-width: 1024px) {
  .sidebar { width: 190px; }
  .content { padding: 16px; }
  .pos { grid-template-columns: 1fr 300px; }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ---------- Mobile (≤768px) ---------- */
@media (max-width: 768px) {
  :root { --mobile-nav-height: 72px; --mobile-cart-height: 88px; }
  html, body { min-height: 100%; background: var(--bg); }
  body.nav-open { overflow: hidden; }

  /* Sidebar becomes a slide-in drawer with a hamburger opener. */
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; font-size: 20px; color: var(--text); padding: 4px 8px; margin-right: 2px; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 78vw; max-width: 300px;
    z-index: 60; transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,.2);
  }
  .sidebar.open { transform: translateX(0); }
  .side-close { display: block; }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,16,26,.5); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .22s ease; }
  .nav-backdrop.show { opacity: 1; pointer-events: auto; }

  /* Topbar stays visible with hamburger. */
  .topbar { padding: max(10px, env(safe-area-inset-top)) 16px 10px; min-height: 64px; border-bottom: 1px solid var(--border); box-shadow: none; }
  .topbar h2 { flex: 1; text-align: center; font-size: 22px; color: var(--primary); letter-spacing: -.2px; }
  .topbar .lang-toggle { margin-left: auto; }

  /* Content */
  .content { padding: 16px 16px calc(var(--mobile-nav-height) + var(--mobile-cart-height) + 24px); }

  /* Native-style quick navigation keeps daily POS actions one tap away. */
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    min-height: var(--mobile-nav-height); padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    background: rgba(248,249,255,.98); border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(11,28,48,.08); backdrop-filter: blur(14px);
  }
  .mobile-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0; border-radius: 999px; padding: 5px 2px; touch-action: manipulation; }
  .mobile-nav-item:active { transform: scale(.94); }
  .mobile-nav-item.active { color: #fff; background: var(--primary-container); }
  .mobile-nav-icon { display: grid; place-items: center; width: 28px; height: 24px; font-size: 19px; line-height: 1; font-weight: 700; }
  .mobile-nav-item.active .mobile-nav-icon { color: #fff; }
  .mobile-nav:not(.mobile-nav-five) { display: none; }
  .mobile-hub-hero { padding: 11px 14px; border-radius: 12px; }
  .mobile-hub-hero h3 { margin: 2px 0; font-size: 18px; }
  .mobile-hub-hero p { font-size: 11px; }
  .mobile-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mobile-hub-card { min-height: 68px; padding: 9px; gap: 7px; border-radius: 11px; }
  .mobile-hub-icon { flex-basis: 30px; width: 30px; height: 30px; border-radius: 9px; font-size: 17px; }
  .mobile-hub-copy { gap: 1px; }
  .mobile-hub-copy b { font-size: 12px; }
  .mobile-hub-copy small { font-size: 9px; }
  .mobile-hub-arrow { font-size: 20px; }
  .catbar { flex-wrap: nowrap; overflow-x: auto; gap: 5px; margin: 0 -2px 10px; padding: 0 2px 3px; scrollbar-width: thin; }
  .catbar button { flex: 0 0 auto; padding: 8px 16px; font-size: 14px; white-space: nowrap; }
  .cashier-quick-actions { margin: -2px 0 6px; }

  /* POS: goods on top; cart becomes a bottom drawer. */
  .pos { display: block; height: auto; }
  .pos-goods { padding-bottom: 12px; }
  .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .prod-tile { padding: 10px; min-height: 184px; }
  .prod-tile .tile-img { height: 106px; }
  .cart-open { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
  .cart {
    position: fixed; left: 0; right: 0; bottom: 0; max-height: 82vh;
    border-radius: 16px 16px 0 0; z-index: 65;
    transform: translateY(110%); transition: transform .25s ease;
    box-shadow: 0 -6px 24px rgba(0,0,0,.22);
  }
  .cart.open { transform: translateY(0); }
  .cart-close { display: block; }
  .cart-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,16,26,.45); z-index: 62; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  .cart-backdrop.show { opacity: 1; pointer-events: auto; }
  .cart-head { position: sticky; top: 0; background: var(--panel); display: flex; align-items: center; justify-content: space-between; }
  .cart-foot { padding: 12px; }

  /* The reference design keeps a compact order summary docked above the
     five-tab navigation. Tapping the summary opens the full cart sheet. */
  .mobile-cart-dock { position: fixed; display: flex; align-items: center; gap: 10px; left: 0; right: 0; bottom: var(--mobile-nav-height); min-height: var(--mobile-cart-height); z-index: 44; padding: 12px 16px; background: var(--panel); border-top: 1px solid var(--border); box-shadow: 0 -8px 22px rgba(11,28,48,.08); }
  .mobile-cart-dock .dock-summary { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .mobile-cart-dock .dock-summary small { color: var(--muted); font-size: 13px; }
  .mobile-cart-dock .dock-summary strong { color: var(--primary); font-family: "JetBrains Mono", Consolas, monospace; font-size: 28px; line-height: 1.15; }
  .mobile-cart-dock .dock-pay { flex: 0 0 46%; }
  .mobile-cart-dock .dock-pay .btn { width: 100%; border-radius: 10px; }
  .mobile-cart-dock .dock-open { border: 0; background: none; color: var(--muted); padding: 0; text-align: left; min-height: 0; }

  /* Toolbars wrap cleanly. */
  .toolbar { gap: 8px; flex-wrap: wrap; }
  .toolbar input, .toolbar select { max-width: 100%; }
  .row-actions { flex-wrap: wrap; }

  /* Cards row stats */
  .cards-row { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }

  /* Modal fits small screens. */
  .modal { width: 92vw !important; max-height: 90vh; overflow-y: auto; }
  .login-card { width: 90vw; }

  /* List tables become stacked cards on narrow screens.
     Each td is labelled by applyResponsiveTables() (data-label attr). */
  .card table { min-width: 0; }
  table { min-width: 0; }
  .card { overflow-x: visible; }
  .card table.rwd-done thead { display: none; }
  .card table.rwd-done tbody tr { display: block; margin: 0 0 12px; border: 1px solid var(--border); border-radius: 12px; padding: 6px 10px; background: #fff; }
  .card table.rwd-done tbody tr.row-empty { border: none; padding: 6px; }
  .card table.rwd-done tbody td { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 6px; border: none; border-bottom: 1px dashed var(--border); font-size: 13px; text-align: left; }
  .card table.rwd-done tbody td:last-child { border-bottom: none; }
  .card table.rwd-done tbody td::before { content: attr(data-label); flex-shrink: 0; color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; min-width: 78px; }
  .card table.rwd-done tbody td.right { justify-content: space-between; text-align: left; }
  .card table.rwd-done tbody td.cell-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .card table.rwd-done tbody td.cell-actions::before { content: ''; display: none; }
  .card table.rwd-done tbody td .row-actions { flex-wrap: wrap; }
  .card table.rwd-done tbody td img { max-width: 100%; }
}

/* ---------- Small phones (≤480px) ---------- */
@media (max-width: 480px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .brand { font-size: 15px; }
  .mobile-nav-item { font-size: 9px; }
  .memo-banner { flex-wrap: wrap; padding: 8px 12px; }
  .memo-banner .btn { padding: 4px 8px; font-size: 12px; }
  .card table.rwd-done tbody td { flex-wrap: wrap; }
}

/* ---------- Touch numeric keypad ---------- */
.numpad-backdrop { position: fixed; inset: 0; background: rgba(10,16,26,.5); z-index: 90; display: none; align-items: flex-end; justify-content: center; }
.numpad-backdrop.show { display: flex; }
.numpad { width: 100%; max-width: 520px; background: #1c2733; border-radius: 18px 18px 0 0; padding: 14px 16px 20px; box-shadow: 0 -8px 30px rgba(0,0,0,.35); }
.numpad-head { display: flex; align-items: center; justify-content: space-between; color: #e8eef7; padding: 4px 4px 12px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 12px; }
.numpad-head .np-label { font-size: 15px; font-weight: 700; }
.numpad-head .np-value { font-size: 22px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.numpad-head .np-close { background: none; border: none; color: #9db0c8; font-size: 20px; cursor: pointer; }
.numpad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.numpad-grid button { height: 62px; border: none; border-radius: 12px; font-size: 24px; font-weight: 700; background: #2b3a4c; color: #fff; cursor: pointer; touch-action: manipulation; }
.numpad-grid button:active { background: #3a4d63; }
.numpad-grid button.np-fn { background: #17222e; color: #8fb0d6; font-size: 16px; }
.numpad-grid button.np-ok { background: var(--primary); color: #fff; }
.numpad-grid button.np-ok:active { background: var(--primary-dark); }
.numpad-grid .np-zero { grid-column: span 2; }
.pm-btn.pm-active { border-color: var(--primary) !important; background: var(--primary) !important; }
.pm-btn:focus { outline: none; }
@media (max-width: 480px) {
  .numpad-grid button { height: 56px; font-size: 22px; }
}

/* ---------- Dashboard reference layout ---------- */
@media (min-width: 769px) {
  .dashboard-shell { background: var(--bg); }
  .dashboard-shell .sidebar { width: 320px; background: #fff; color: var(--text); border-right: 1px solid var(--border); }
  .dashboard-shell .side-head { height: 110px; padding: 24px 30px 0; display: block; }
  .dashboard-shell .brand { padding: 0; border: 0; color: var(--primary); font-size: 21px; line-height: 1.2; }
  .dashboard-shell .brand small { color: var(--text); font-size: 15px; margin-top: 6px; }
  .dashboard-shell .side-close { display: none; }
  .dashboard-shell .nav { padding: 15px 27px; overflow: hidden; }
  .dashboard-shell .nav-item { min-height: 48px; padding: 10px 16px; margin-bottom: 7px; border-radius: 8px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .dashboard-shell .nav-item:hover { background: var(--surface-low); color: var(--text); }
  .dashboard-shell .nav-item.active { background: var(--primary-container); color: #fff; }
  .dashboard-shell .nav-icon { width: 24px; font-size: 18px; }
  .dashboard-shell .side-foot { padding: 18px 20px 22px; border-top: 1px solid var(--border); background: #fff; }
  .dashboard-shell .side-foot .who { display: none; }
  .dashboard-shell .side-foot::before { content: '?  Help'; display: block; padding: 15px 23px 16px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .dashboard-shell .side-foot .sync-data { display: none; }
  .dashboard-shell .side-foot .logout { display: block; width: 100%; min-height: 48px; margin: 6px 0 0; border-radius: 8px; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; text-align: center; }
  .dashboard-shell .side-foot [data-switchcashier] { background: #087a32; color: #fff; }
  .dashboard-shell .side-foot [data-logout] { background: transparent; color: var(--text); }
  .dashboard-shell .topbar { height: 70px; min-height: 70px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--border); }
  .dashboard-shell .topbar > .app-back, .dashboard-shell .topbar > .menu-btn, .dashboard-shell .topbar > h2, .dashboard-shell .topbar > .mock-pill, .dashboard-shell .topbar > .lang-toggle, .dashboard-shell .topbar > .spacer { display: none !important; }
  .dashboard-top-spacer { flex: 1; }
  .dashboard-shift-status { display: flex; align-items: center; gap: 8px; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .dashboard-shift-status span { width: 9px; height: 9px; border-radius: 50%; background: #35dc68; }
  .dashboard-top-actions { display: flex; align-items: center; gap: 10px; }
  .dashboard-top-actions > button { width: 38px; height: 38px; border: 0; background: transparent; color: var(--text); font-size: 21px; border-radius: 6px; }
  .dashboard-top-actions > button:hover { background: var(--surface-low); }
  .dashboard-top-actions .dashboard-new-sale { width: auto; padding: 0 20px; background: var(--primary); color: #fff; font-size: 17px; font-weight: 700; }
  .dashboard-top-actions .pos-avatar { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-container); color: var(--primary); font-weight: 700; }
  .dashboard-shell .mock-banner { display: none; }
  .dashboard-shell .content { padding: 38px 40px; background: var(--bg); }
  .dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 38px; }
  .dashboard-heading h1 { margin: 0; font-size: 29px; line-height: 1.2; letter-spacing: -.4px; }
  .dashboard-heading h1 span { font-weight: 600; }
  .dashboard-heading p { margin: 10px 0 0; font-size: 18px; color: var(--muted); }
  .dashboard-range { display: flex; align-items: center; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
  .dashboard-range button { min-width: 90px; min-height: 50px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: 16px; }
  .dashboard-range button.active, .dashboard-range button:hover { background: var(--primary-container); color: #fff; }
  .dashboard-legacy-toolbar, .dashboard-shell .tabs { display: none !important; }
  .dash-ref-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin-bottom: 40px; }
  .dash-ref-kpi { min-height: 182px; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
  .dash-ref-kpi-head { display: flex; justify-content: space-between; gap: 8px; color: var(--text); font-size: 17px; }
  .dash-ref-kpi-head b { color: var(--primary); font-size: 23px; }
  .dash-ref-kpi strong { display: block; margin-top: 22px; font-size: 26px; letter-spacing: -.5px; }
  .dash-ref-kpi small { display: block; margin-top: 8px; font-size: 16px; }
  .dash-ref-kpi small em { color: #35dc68; font-style: normal; }
  .dash-ref-kpi small i { color: var(--danger); font-style: normal; }
  .dash-ref-kpi.alert { border-left: 5px solid var(--danger); }
  .dash-ref-kpi.alert .dash-ref-kpi-head b, .dash-ref-kpi.refund .dash-ref-kpi-head b { color: var(--danger); }
  .dash-ref-main-grid, .dash-ref-bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr) 375px; gap: 40px; margin-bottom: 40px; }
  .dash-ref-bottom-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  .dash-ref-panel { border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
  .dash-ref-panel h2 { margin: 0; padding: 24px 20px; font-size: 24px; }
  .dash-ref-chart { display: flex; align-items: flex-end; gap: 10px; height: 326px; margin: 0 20px; padding: 24px 20px 20px; background: var(--surface-low); border-radius: 10px; }
  .dash-ref-bar-wrap { display: flex; align-items: flex-end; flex: 1; height: 100%; }
  .dash-ref-bar { width: 100%; min-height: 16px; background: var(--primary); border-radius: 2px 2px 0 0; }
  .dash-ref-axis { display: flex; justify-content: space-between; padding: 10px 40px 18px; font: 14px/1.2 "JetBrains Mono", Consolas, monospace; }
  .dash-ref-category { padding-bottom: 18px; }
  .dash-ref-donut { position: relative; display: grid; place-items: center; width: 245px; height: 245px; margin: 0 auto 20px; border-radius: 50%; background: conic-gradient(var(--primary) 0 45%, #087a32 45% 75%, #ffb454 75% 100%); }
  .dash-ref-donut::before { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: #fff; }
  .dash-ref-donut > div { position: relative; z-index: 1; text-align: center; }
  .dash-ref-donut strong, .dash-ref-donut span { display: block; }
  .dash-ref-donut strong { font-size: 25px; }
  .dash-ref-donut span { font-size: 15px; }
  .dash-ref-legend { padding: 0 20px; }
  .dash-ref-legend > div { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; }
  .dash-ref-legend b { margin-left: auto; }
  .dash-ref-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--primary); }
  .dash-ref-dot.dot-1 { background: #087a32; }.dash-ref-dot.dot-2 { background: #ffb454; }
  .dash-ref-panel-title { display: flex; align-items: center; justify-content: space-between; }
  .dash-ref-panel-title button { margin-right: 20px; border: 0; background: transparent; color: var(--primary); font-size: 16px; }
  .dash-ref-transactions table { margin: 0; }.dash-ref-transactions th { background: var(--surface-low); font-size: 14px; }.dash-ref-transactions td { padding: 15px 20px; font-size: 14px; }
  .dash-ref-status { padding: 5px 10px; border-radius: 999px; background: #52f27c; color: #075822; }.dash-ref-status.bad { background: #ffd9d5; color: var(--danger); }
  .dash-ref-products { padding-bottom: 14px; }.dash-ref-product { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }.dash-ref-product-image { display: grid; place-items: center; flex: 0 0 80px; height: 80px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-low); color: var(--primary); font-size: 25px; overflow: hidden; }.dash-ref-product-image img { width: 100%; height: 100%; object-fit: cover; }.dash-ref-product > div:nth-child(2) { min-width: 0; flex: 1; }.dash-ref-product b, .dash-ref-product small { display: block; }.dash-ref-product b { font-size: 16px; }.dash-ref-product small { margin-top: 6px; color: var(--muted); }.dash-ref-product > strong { text-align: right; font-size: 20px; }.dash-ref-product > strong small { color: #35dc68; font-size: 14px; font-weight: 400; }
}

@media (max-width: 1100px) and (min-width: 769px) {
  .dashboard-shell .content { padding: 24px; }.dash-ref-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }.dash-ref-main-grid { grid-template-columns: 1fr; }.dash-ref-bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .dashboard-shell .side-head { height: 88px; padding: 18px 20px 0; }.dashboard-shell .brand { font-size: 18px; }.dashboard-shell .brand small { font-size: 12px; }
  .dashboard-shell .content { padding: 18px 12px 80px; }.dashboard-heading { display: block; margin-bottom: 14px; }.dashboard-heading h1 { font-size: 21px; }.dashboard-heading p { margin-top: 5px; font-size: 13px; }.dashboard-range { margin-top: 12px; width: 100%; }.dashboard-range button { min-width: 0; flex: 1; min-height: 40px; font-size: 12px; }
  .dash-ref-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }.dash-ref-kpi { min-height: 120px; padding: 12px; border-radius: 10px; }.dash-ref-kpi-head { font-size: 12px; }.dash-ref-kpi-head b { font-size: 17px; }.dash-ref-kpi strong { margin-top: 12px; font-size: 18px; }.dash-ref-kpi small { font-size: 11px; }
  .dash-ref-main-grid, .dash-ref-bottom-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }.dash-ref-panel h2 { padding: 14px; font-size: 18px; }.dash-ref-chart { height: 180px; margin: 0 12px; padding: 12px; gap: 5px; }.dash-ref-axis { padding: 7px 14px 12px; font-size: 10px; }.dash-ref-donut { width: 170px; height: 170px; }.dash-ref-donut::before { width: 122px; height: 122px; }.dash-ref-legend { padding: 0 14px; }.dash-ref-legend > div { font-size: 12px; }.dash-ref-transactions td { padding: 10px 12px; font-size: 11px; }.dash-ref-product { padding: 10px 12px; }.dash-ref-product-image { flex-basis: 56px; height: 56px; }.dash-ref-product b { font-size: 13px; }.dash-ref-product > strong { font-size: 16px; }
  .dashboard-top-spacer, .dashboard-shift-status, .dashboard-top-actions { display: none; }
}

/* ---------- Checkout / tendering screen ---------- */
@media (min-width: 769px) {
  .checkout-shell { background: var(--bg); }
  .checkout-shell .sidebar { width: 320px; background: #fff; color: var(--text); border-right: 1px solid var(--border); }
  .checkout-shell .side-head { height: 120px; padding: 25px 20px; display: block; }
  .checkout-shell .brand { padding: 4px 0 0 76px; border: 0; color: var(--primary); font-size: 29px; line-height: 34px; }
  .checkout-shell .brand::before { content: 'V'; display: grid; place-items: center; position: absolute; margin: -4px 0 0 -76px; width: 60px; height: 60px; border-radius: 9px; background: var(--primary-container); color: #fff; font-size: 25px; }
  .checkout-shell .brand::after { content: 'Station 01'; display: block; color: var(--text); font: 15px/18px "JetBrains Mono", Consolas, monospace; }
  .checkout-shell .brand small, .checkout-shell .side-close { display: none; }
  .checkout-shell .nav { padding: 15px; overflow: hidden; }
  .checkout-shell .nav-group { margin: 0 0 7px; }
  .checkout-shell .nav-head { min-height: 52px; padding: 10px 18px; border: 0; border-radius: 9px; color: var(--text); text-transform: none; letter-spacing: 0; font: 16px/1.2 "JetBrains Mono", Consolas, monospace; }
  .checkout-shell .nav-group:first-child .nav-head { background: var(--surface-low); color: var(--primary); border-right: 4px solid var(--primary); }
  .checkout-shell .nav-head .nav-caret, .checkout-shell .nav-body { display: none !important; }
  .checkout-shell .nav-icon { width: 26px; font-size: 18px; }
  .checkout-shell .side-foot { padding: 20px; border: 0; background: #fff; }
  .checkout-shell .side-foot .who, .checkout-shell .side-foot .logout { display: none; }
  .checkout-shell .sync-data { display: block; width: 100%; min-height: 58px; border: 0; border-radius: 9px; background: var(--surface-container); color: var(--primary); font: 16px/1.2 "JetBrains Mono", Consolas, monospace; }

  .checkout-shell .checkout-topbar { height: 80px; min-height: 80px; padding: 0 20px 0 34px; background: #fff; border-bottom: 1px solid var(--border); }
  .checkout-shell .mock-banner { display: none; }
  .checkout-shell .checkout-topbar > .app-back, .checkout-shell .checkout-topbar > .menu-btn, .checkout-shell .checkout-topbar > h2, .checkout-shell .checkout-topbar > .mock-pill, .checkout-shell .checkout-topbar > .lang-toggle, .checkout-shell .checkout-topbar > .spacer { display: none !important; }
  .checkout-back { border: 0; background: transparent; color: var(--text); font-size: 34px; line-height: 1; padding: 4px 12px 6px 0; }
  .checkout-heading { display: flex; align-items: baseline; gap: 12px; }
  .checkout-heading b { font-size: 28px; }
  .checkout-heading span { font-size: 16px; color: var(--muted); }
  .checkout-order-no { margin-left: auto; padding: 8px 16px; border-radius: 999px; background: var(--surface-low); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .checkout-help { margin-left: 14px; width: 32px; height: 32px; border: 2px solid var(--text); border-radius: 50%; background: #fff; color: var(--text); font-weight: 700; font-size: 18px; }
  .checkout-shell .content { padding: 20px; background: var(--bg); overflow: auto; }
  .checkout-shell .checkout-page, .checkout-shell .checkout-page button { font-family: Inter, "Segoe UI", system-ui, sans-serif; }
  .checkout-page { display: grid; grid-template-columns: 405px minmax(0, 1fr); gap: 20px; min-height: 100%; }
  .checkout-summary, .checkout-payment-card, .checkout-tender-card, .checkout-change-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
  .checkout-summary { display: flex; flex-direction: column; min-height: calc(100vh - 120px); }
  .checkout-summary-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: var(--surface-low); border-bottom: 1px solid var(--border); }
  .checkout-receipt-icon { color: var(--primary); font-size: 25px; }
  .checkout-summary-head h3 { margin: 0; font-size: 22px; line-height: 1.1; }
  .checkout-summary-cn { margin-left: auto; font-size: 15px; }
  .checkout-item-count { padding: 8px 12px; border-radius: 5px; background: #d6e5ff; color: var(--primary); font: 17px/1 "JetBrains Mono", Consolas, monospace; }
  .checkout-item-count small { display: block; font-size: 12px; font-weight: 400; }
  .checkout-lines { flex: 1; padding: 0 20px; overflow: auto; }
  .checkout-line { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid #d8e0ef; }
  .checkout-line b, .checkout-line span, .checkout-line small { display: block; }
  .checkout-line b { font-size: 17px; }
  .checkout-line span { margin-top: 4px; font-size: 14px; }
  .checkout-line small { margin-top: 8px; color: var(--primary); font: 14px/1.2 "JetBrains Mono", Consolas, monospace; }
  .checkout-line strong { font: 16px/1.2 "JetBrains Mono", Consolas, monospace; white-space: nowrap; }
  .checkout-totals { padding: 13px 18px 16px; background: var(--surface-container); }
  .checkout-totals > div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 15px; }
  .checkout-totals i { font-style: normal; color: var(--muted); }
  .checkout-totals hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
  .checkout-grand { align-items: baseline; font-size: 22px !important; font-weight: 700; }
  .checkout-grand strong { color: var(--primary); font-size: 39px; font-family: "JetBrains Mono", Consolas, monospace; }
  .checkout-workspace { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; }
  .checkout-payment-card { padding: 16px; }
  .checkout-payment-card h3 { margin: 0 0 13px; font-size: 18px; }
  .checkout-payment-card h3 span { margin-left: 8px; color: var(--muted); font-size: 15px; font-weight: 400; }
  .checkout-payments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .checkout-payment { min-height: 96px; padding: 9px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); }
  .checkout-payment.active { border: 2px solid var(--primary); background: var(--surface-low); color: var(--primary); }
  .checkout-payment b, .checkout-payment strong, .checkout-payment small { display: block; }
  .checkout-payment b { font-size: 32px; line-height: 36px; }
  .checkout-payment strong { margin-top: 7px; font-size: 20px; }
  .checkout-payment small { margin-top: 4px; color: var(--muted); }
  .checkout-tender-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 14px; flex: 1; min-height: 0; }
  .checkout-tender-card { padding: 16px; min-height: 0; }
  .checkout-amount-label { position: relative; display: flex; align-items: baseline; gap: 6px; padding: 12px 0 9px; border-bottom: 2px solid var(--primary); font-size: 17px; }
  .checkout-amount-label span { margin-left: 6px; color: var(--muted); font-size: 15px; }
  .checkout-amount-label strong { margin-left: auto; color: var(--text); font: 38px/1 "JetBrains Mono", Consolas, monospace; white-space: nowrap; }
  .checkout-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 18px 0 13px; }
  .checkout-quick button { min-height: 44px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg); color: var(--text); font: 14px/1.2 "JetBrains Mono", Consolas, monospace; }
  .checkout-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .checkout-keypad button { min-height: 84px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: 23px/1 "JetBrains Mono", Consolas, monospace; }
  .checkout-keypad button.backspace { background: #ffd7d2; color: var(--danger); }
  .checkout-change-card { align-self: start; padding: 28px 16px; text-align: center; }
  .checkout-change-card h3 { margin: 0; font-size: 20px; }
  .checkout-change-card span { display: block; margin-top: 4px; }
  .checkout-change-card strong { display: block; margin-top: 12px; color: var(--green); font: 40px/1 "JetBrains Mono", Consolas, monospace; }
  .checkout-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .checkout-actions button { min-height: 56px; border-radius: 8px; font-size: 16px; }
  .checkout-print { border: 1px solid var(--border); background: var(--surface-container); color: var(--text); }
  .checkout-complete { border: 0; background: var(--green); color: #fff; }
  .checkout-actions b, .checkout-actions span { margin-left: 8px; }
}

@media (max-width: 768px) {
  .checkout-shell .mock-banner { display: none; }
  .checkout-shell .side-foot .sync-data { display: none; }
  .checkout-shell .checkout-topbar { min-height: 54px; height: 54px; padding: 7px 10px; }
  .checkout-shell .checkout-topbar > .app-back, .checkout-shell .checkout-topbar > .menu-btn, .checkout-shell .checkout-topbar > h2, .checkout-shell .checkout-topbar > .lang-toggle, .checkout-shell .checkout-topbar > .spacer { display: none !important; }
  .checkout-shell .checkout-order-no { margin-left: auto; font-size: 11px; padding: 6px 9px; }
  .checkout-heading b { font-size: 18px; }
  .checkout-heading span { font-size: 12px; }
  .checkout-shell .content { padding: 8px 9px 70px; }
  .checkout-page { display: flex; flex-direction: column; gap: 10px; }
  .checkout-summary { min-height: 0; max-height: 48vh; }
  .checkout-summary-head { padding: 12px; }
  .checkout-summary-head h3 { font-size: 18px; }
  .checkout-line { padding: 10px 0; }
  .checkout-totals { padding: 10px 12px; }
  .checkout-grand strong { font-size: 28px; }
  .checkout-payment-card, .checkout-tender-card { padding: 12px; }
  .checkout-payment-card h3 { margin-bottom: 10px; font-size: 15px; }
  .checkout-payments { gap: 5px; }
  .checkout-payment { min-height: 74px; padding: 5px; border-radius: 8px; }
  .checkout-payment b { font-size: 21px; line-height: 22px; }
  .checkout-payment strong { margin-top: 2px; font-size: 12px; }
  .checkout-payment small { font-size: 10px; }
  .checkout-tender-grid { display: flex; flex-direction: column; gap: 10px; }
  .checkout-amount-label { padding: 8px 0; font-size: 14px; }
  .checkout-amount-label strong { font-size: 28px; }
  .checkout-quick { gap: 5px; margin: 10px 0; }
  .checkout-quick button { min-height: 40px; font-size: 12px; }
  .checkout-keypad { gap: 5px; }
  .checkout-keypad button { min-height: 57px; font-size: 21px; }
  .checkout-change-card { padding: 12px; }
  .checkout-change-card strong { margin-top: 6px; font-size: 30px; }
  .checkout-actions { gap: 6px; }
  .checkout-actions button { min-height: 50px; font-size: 12px; }
}

/* ---------- RetailPro desktop cashier shell ---------- */
/* The supplied cashier reference is a light, three-column register.  These
   rules are scoped to .pos-shell so the other back-office screens keep their
   existing navigation and card treatment. */
@media (min-width: 769px) {
  .pos-shell { background: var(--bg); }
  .pos-shell .sidebar { width: 320px; background: #fff; color: var(--text); border-right: 1px solid var(--border); }
  .pos-shell .side-head { height: 190px; padding: 22px 20px 0; display: block; }
  .pos-shell .brand { padding: 86px 0 0; border: 0; text-align: center; color: var(--primary); font-size: 0; line-height: 1.15; }
  .pos-shell .brand::before { content: '◈'; display: block; position: absolute; margin: -77px 0 0 128px; width: 64px; height: 64px; line-height: 64px; border-radius: 4px; background: #edf4ff; color: var(--primary); font-size: 29px; }
  .pos-shell .brand::after { content: 'Global Retail\A Terminal #01'; white-space: pre; display: block; color: var(--text); font-size: 15px; font-weight: 400; margin-top: 5px; }
  .pos-shell .brand small { display: none; }
  .pos-shell .side-close { display: none; }
  .pos-shell .nav { padding: 0 20px; overflow: hidden; }
  .pos-shell .nav-item { min-height: 48px; padding: 10px 16px; margin-bottom: 7px; border-radius: 8px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .pos-shell .nav-item:hover { background: var(--surface-low); color: var(--text); }
  .pos-shell .nav-item.active { background: var(--primary-container); color: #fff; }
  .pos-shell .nav-group { margin: 0 0 5px; }
  .pos-shell .nav-head { min-height: 48px; padding: 10px 16px; margin: 0; border: 0; border-radius: 8px; color: var(--text); text-transform: none; letter-spacing: 0; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; }
  .pos-shell .nav-head:hover { background: var(--surface-low); color: var(--text); }
  .pos-shell .nav-group:first-child .nav-head { background: var(--primary-container); color: #fff; }
  .pos-shell .nav-head .nav-caret { display: none; }
  .pos-shell .nav-body { display: none !important; }
  .pos-shell .nav-icon { font-size: 17px; width: 23px; }
  .pos-shell .side-foot { padding: 18px 20px 20px; background: #fff; border-top: 1px solid var(--border); }
  .pos-shell .side-foot .who { display: none; }
  .pos-shell .side-foot::before { content: '?  Help'; display: block; padding: 10px 16px 18px; color: var(--text); font: 15px/1.2 "JetBrains Mono", Consolas, monospace; border-top: 1px solid var(--border); }
  .pos-shell .side-foot .logout { display: block; width: 100%; min-height: 48px; margin: 6px 0 0; border-radius: 7px; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; text-align: center; }
  .pos-shell .side-foot [data-switchcashier] { background: var(--surface-container); color: var(--text); }
  .pos-shell .side-foot [data-logout] { background: transparent; color: var(--danger); }

  .pos-shell .main { min-width: 0; }
  .pos-shell .topbar { height: 70px; min-height: 70px; padding: 10px 20px; gap: 14px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: none; }
  .pos-shell .pos-brand { color: var(--primary); font-size: 24px; font-weight: 700; white-space: nowrap; letter-spacing: -.6px; }
  .pos-shell .pos-header-search { position: relative; flex: 0 0 320px; height: 48px; }
  .pos-shell .pos-header-search input { width: 100%; height: 48px; padding: 0 14px 0 44px; border: 1px solid var(--primary); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-low); color: var(--text); font-size: 16px; }
  .pos-shell .pos-header-search input:focus { outline: 2px solid rgba(0,82,204,.15); }
  .pos-shell .pos-search-icon { position: absolute; left: 16px; top: 10px; z-index: 1; color: var(--text); font-size: 22px; line-height: 28px; }
  .pos-shell .pos-shift-status { margin-left: auto; white-space: nowrap; font: 14px/1.2 "JetBrains Mono", Consolas, monospace; color: var(--text); }
  .pos-shell .pos-header-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
  .pos-shell .pos-header-actions > button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 22px; }
  .pos-shell .pos-header-actions > button:hover { background: var(--surface-low); }
  .pos-shell .pos-header-actions .pos-new-sale { width: auto; height: 48px; padding: 0 18px; border-radius: 5px; background: var(--primary); color: #fff; font-size: 16px; font-weight: 700; }
  .pos-shell .pos-avatar { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; background: linear-gradient(135deg, #edf4ff, #dce9ff); color: var(--primary); font-weight: 700; }
  .pos-shell .topbar > .app-back, .pos-shell .topbar > .menu-btn, .pos-shell .topbar > h2, .pos-shell .topbar > .mock-pill, .pos-shell .topbar > .lang-toggle, .pos-shell .topbar > .spacer { display: none !important; }
  .pos-shell .mock-banner { display: none; }
  .pos-shell .content { padding: 16px; background: var(--bg); overflow: hidden; }
  .pos-shell .pos { grid-template-columns: minmax(0, 1fr) 480px; gap: 16px; height: 100%; }
  .pos-shell .pos-goods { min-height: 0; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 9px; }
  .pos-shell .pos-search-inline { display: none; }
  .pos-shell .cashier-quick-actions { display: none; }
  .pos-shell .catbar { flex: 0 0 auto; margin: 0; padding: 16px; gap: 8px; border-bottom: 1px solid var(--border); background: var(--bg); }
  .pos-shell .catbar button { min-height: 42px; padding: 8px 18px; border-radius: 999px; font: 16px/1.2 "JetBrains Mono", Consolas, monospace; }
  .pos-shell .prod-grid { flex: 1; min-height: 0; overflow: auto; align-content: start; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; padding: 16px; }
  .pos-shell .prod-tile { min-height: 200px; height: 200px; padding: 10px; border-radius: 5px; box-shadow: none; }
  .pos-shell .prod-tile.selected { outline: none; background: #fff; }
  .pos-shell .prod-tile .tile-img { height: 96px; border-radius: 6px; }
  .pos-shell .prod-tile .tile-price { right: 6px; bottom: 6px; padding: 3px 6px; font-size: 15px; }
  .pos-shell .prod-tile .name { font-size: 15px; line-height: 18px; }
  .pos-shell .prod-tile .stock, .pos-shell .prod-tile .unit-chips, .pos-shell .prod-tile > [data-add] { display: none; }
  .pos-shell .cart { min-width: 0; overflow: hidden; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; box-shadow: none; }
  .pos-shell .cart-head { min-height: 74px; padding: 16px 20px; display: flex; align-items: center; gap: 10px; background: var(--surface-low); border-bottom: 1px solid var(--border); font-size: 16px; }
  .pos-shell .cart-customer { display: inline-flex; align-items: center; gap: 10px; }
  .pos-shell .cart-customer-icon { font-size: 23px; }
  .pos-shell .cart-customer-edit { margin-left: auto; border: 0; background: transparent; color: var(--primary); font-size: 22px; cursor: pointer; }
  .pos-shell .cart-head .mock-pill { display: none; }
  .pos-shell .cart-items { min-height: 0; padding: 10px; overflow: auto; background: var(--bg); }
  .pos-shell .cart-item { margin-bottom: 6px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
  .pos-shell .cart-item .ci-name { font-size: 15px; font-weight: 700; }
  .pos-shell .cart-item .u { font-size: 13px; }
  .pos-shell .cart-foot { padding: 16px 20px 20px; background: #fff; border-top: 1px solid var(--border); }
  .pos-shell .cart-foot .field, .pos-shell .cart-foot .member-box, .pos-shell .cart-foot #pay-received, .pos-shell .cart-foot #change, .pos-shell .cart-foot [data-drawer] { display: none; }
  .pos-shell .cart-foot .pos-discount-row { display: none; }
  .pos-shell .cart-foot .pos-discount-row.open { display: flex; }
  .pos-shell .cart-foot .row { min-height: 34px; font-size: 15px; }
  .pos-shell .cart-foot .row.total { margin-top: 3px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 24px; font-weight: 700; }
  .pos-shell .cart-foot .row.total span:last-child { font-family: "JetBrains Mono", Consolas, monospace; }
  .pos-shell .cart-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
  .pos-shell .cart-actions [data-clear] { grid-column: 3; grid-row: 1; border: 1px solid var(--danger); background: #fff; color: var(--danger); }
  .pos-shell .cart-actions [data-discount-toggle], .pos-shell .cart-actions [data-hold] { border: 1px solid var(--border); background: #fff; color: var(--text); }
  .pos-shell .cart-actions .checkout { grid-column: 1 / -1; grid-row: 2; min-height: 70px; border-radius: 5px; background: var(--green); color: #fff; font-size: 24px; font-weight: 700; }
  .pos-shell .mobile-cart-dock { display: none; }
}

/* Stitch cashier layout: intentionally tighter than the generic mobile
   pages so a cashier can see four product cards without scrolling. */
@media (max-width: 768px) {
  .pos-shell { --mobile-nav-height: 54px; --mobile-cart-height: 58px; }
  .pos-shell .topbar { min-height: 52px; padding: 7px 10px; gap: 7px; }
  .pos-shell .topbar h2 { font-size: 17px; }
  .pos-shell .topbar .app-back { display: none; }
  .pos-shell .topbar .lang-toggle { margin-left: 0; transform: scale(.82); transform-origin: right center; }
  .pos-shell .content { padding: 8px 9px calc(var(--mobile-nav-height) + var(--mobile-cart-height) + 12px); }
  .pos-shell .searchbar { gap: 5px; margin-bottom: 7px; }
  .pos-shell .searchbar input { min-height: 34px; height: 34px; padding: 6px 9px 6px 28px; border-radius: 5px; font-size: 11px; background-size: 9px 9px; background-position: 10px center; }
  .pos-shell .cart-open, .pos-shell .cashier-quick-actions { display: none; }
  .pos-shell .catbar { gap: 5px; margin: 0 0 9px; padding: 0 0 2px; }
  .pos-shell .catbar button { min-height: 24px; height: 24px; padding: 2px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; }
  .pos-shell .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .pos-shell .prod-tile { min-height: 0; height: 126px; padding: 4px; gap: 1px; border-radius: 7px; overflow: hidden; }
  .pos-shell .prod-tile .tile-media { margin: -4px -4px 2px; }
  .pos-shell .prod-tile .tile-img { height: 66px; border-radius: 6px 6px 0 0; }
  .pos-shell .prod-tile .tile-placeholder { font-size: 22px; }
  .pos-shell .prod-tile .tile-price { right: 4px; bottom: 4px; padding: 2px 4px; border-radius: 4px; font-size: 9px; }
  .pos-shell .prod-tile .tile-count { right: 4px; top: 4px; min-width: 20px; height: 20px; font-size: 10px; }
  .pos-shell .prod-tile .name { padding: 0 3px; font-size: 10px; line-height: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pos-shell .prod-tile .stock, .pos-shell .prod-tile .unit-chips, .pos-shell .prod-tile > [data-add] { display: none; }
  .pos-shell .mobile-cart-dock { min-height: 58px; padding: 7px 9px; gap: 8px; }
  .pos-shell .mobile-cart-dock .dock-summary small { font-size: 10px; }
  .pos-shell .mobile-cart-dock .dock-summary strong { font-size: 17px; }
  .pos-shell .mobile-cart-dock .dock-pay { flex-basis: 41%; }
  .pos-shell .mobile-cart-dock .dock-pay .btn { min-height: 34px; height: 34px; padding: 4px 8px; border-radius: 5px; font-size: 12px; }
  .pos-shell .mobile-nav-five { grid-template-columns: repeat(4, 1fr); min-height: 54px; padding: 3px 5px max(3px, env(safe-area-inset-bottom)); }
  .pos-shell .mobile-nav-five .mobile-nav-item:last-child { display: none; }
  .pos-shell .mobile-nav-five .mobile-nav-item { font-size: 9px; gap: 0; border-radius: 999px; padding: 2px 1px; }
  .pos-shell .mobile-nav-five .mobile-nav-icon { width: 22px; height: 18px; font-size: 15px; }
  .pos-shell .mobile-nav-five .mobile-nav-item.active { background: var(--primary-container); color: #fff; }
}

/* Shared touch and viewport polish for phones and tablets. */
@media (max-width: 1024px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .content { min-width: 0; }
  .topbar { gap: 8px; }
  .topbar .actions { flex-wrap: wrap; }
  .form-grid, .settings-grid, .two-col { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 768px) {
  button, .btn, input, select, textarea { min-height: 42px; }
  .topbar { position: sticky; top: 0; z-index: 40; background: var(--bg); }
  .topbar .actions .btn { flex: 0 1 auto; }
  .pos-goods, .cart, .panel, .card { min-width: 0; }
  .prod-tile { min-height: 132px; touch-action: manipulation; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 140px; }
}

/* Mobile cashier keeps the compact Stitch header, while the desktop-only
   RetailPro header is reduced to the title and profile affordance. */
@media (max-width: 768px) {
  .pos-shell .pos-topbar { min-height: 52px; height: 52px; padding: 7px 10px; background: var(--bg); }
  .pos-shell .pos-brand, .pos-shell .pos-header-search, .pos-shell .pos-shift-status { display: none; }
  .pos-shell .pos-header-actions { margin-left: auto; }
  .pos-shell .pos-header-actions > button { display: none; }
  .pos-shell .pos-header-actions .pos-avatar { display: grid; width: 30px; height: 30px; font-size: 12px; }
  .pos-shell .pos-topbar > .menu-btn { display: inline-flex !important; order: -2; }
  .pos-shell .pos-topbar > h2 { display: block !important; flex: 1; text-align: center; font-size: 17px; color: var(--primary); }
  .pos-shell .pos-topbar > .app-back, .pos-shell .pos-topbar > .lang-toggle, .pos-shell .pos-topbar > .spacer { display: none !important; }
  .pos-shell .pos-goods { border: 0; border-radius: 0; background: transparent; }
  .pos-shell .cart { border-radius: 16px 16px 0 0; }
  .pos-shell .cart-head { min-height: 50px; padding: 10px 14px; }
  .pos-shell .cart-customer { font-size: 14px; }
  .pos-shell .cart-customer-edit { font-size: 18px; }
  .pos-shell .cart-foot .row.total { font-size: 20px; }
  .pos-shell .cart-actions .checkout { min-height: 48px; font-size: 17px; }
}

/* ---------- Stitch employee management full-page layout ---------- */
@media (min-width: 769px) {
  .employees-shell { background: var(--bg); }
  .employees-shell .sidebar { width: 320px; background: #edf2ff; color: var(--text); border-right: 1px solid var(--border); }
  .employees-shell .side-head { height: 122px; padding: 20px 36px; display: block; }
  .employees-shell .brand { padding: 0 0 0 54px; border: 0; color: var(--primary); font-size: 29px; line-height: 1.15; }
  .employees-shell .brand::before { content: '▰'; display: grid; place-items: center; position: absolute; margin: 6px 0 0 -53px; color: var(--primary); font-size: 32px; }
  .employees-shell .brand small { color: var(--text); font-size: 16px; margin-top: 5px; }
  .employees-shell .side-close { display: none; }
  .employees-shell .nav { padding: 0 15px; overflow: hidden; }
  .employees-shell .nav-item { min-height: 61px; padding: 10px 22px; margin-bottom: 2px; border-radius: 10px; color: var(--text); font: 17px/1.2 "JetBrains Mono", Consolas, monospace; }
  .employees-shell .nav-item:hover { background: #e0e9ff; color: var(--text); }
  .employees-shell .nav-item.active { background: #64ff8b; color: #087a32; }
  .employees-shell .nav-icon { width: 26px; font-size: 23px; }
  .employees-shell .side-foot { padding: 18px 20px 22px; border-top: 1px solid var(--border); background: #edf2ff; }
  .employees-shell .side-foot .who, .employees-shell .side-foot .sync-data { display: none; }
  .employees-shell .side-foot::before { content: '?  Help & Support'; display: block; padding: 18px 23px 16px; color: var(--text); font: 17px/1.2 "JetBrains Mono", Consolas, monospace; }
  .employees-shell .side-foot .logout { display: block; width: 100%; min-height: 48px; margin: 6px 0 0; border-radius: 8px; font: 15px/1.2 "JetBrains Mono", Consolas, monospace; text-align: center; }
  .employees-shell .side-foot [data-switchcashier] { background: var(--surface-container); color: var(--text); }
  .employees-shell .side-foot [data-logout] { background: transparent; color: var(--text); }
  .employees-shell .topbar { height: 80px; min-height: 80px; padding: 16px 40px; background: #fff; border-bottom: 1px solid var(--border); box-shadow: none; }
  .employees-shell .topbar > .app-back, .employees-shell .topbar > .menu-btn, .employees-shell .topbar > h2, .employees-shell .topbar > .mock-pill, .employees-shell .topbar > .lang-toggle, .employees-shell .topbar > .spacer { display: none !important; }
  .employees-top-search { position: relative; flex: 0 1 480px; }
  .employees-top-search span { position: absolute; left: 18px; top: 8px; z-index: 1; font-size: 25px; color: var(--muted); }
  .employees-top-search input { width: 100%; height: 48px; padding: 0 16px 0 52px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-low); color: var(--text); font-size: 18px; }
  .employees-top-actions { display: flex; align-items: center; gap: 24px; margin-left: auto; }
  .employees-top-actions > button { width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 24px; }
  .employees-top-actions > button:hover { background: var(--surface-low); }
  .employees-top-actions .pos-avatar { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 50%; background: linear-gradient(135deg, #edf4ff, #dce9ff); color: var(--primary); font-weight: 700; }
  .employees-shell .content { padding: 42px 40px; background: var(--bg); overflow: auto; }
  .employees-page { max-width: 1240px; margin: 0 auto; }
  .employees-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 42px; }
  .employees-heading h1 { margin: 0; font-size: 30px; letter-spacing: -.5px; }
  .employees-heading p { margin: 10px 0 0; color: var(--muted); font-size: 17px; }
  .employees-add { height: 56px; padding: 0 28px; border: 1px solid var(--primary); border-radius: 9px; background: var(--primary-container); color: #fff; font-size: 18px; font-weight: 700; }
  .employees-table-card { overflow: visible; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
  .employees-table-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--border); background: #fff; font: 16px/1.2 "JetBrains Mono", Consolas, monospace; }
  .employees-filters { display: flex; gap: 10px; }.employees-filters select { min-width: 132px; height: 44px; padding: 0 15px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text); font-size: 16px; }
  .employees-table-card table { margin: 0; }.employees-table-card th { padding: 22px 20px; background: var(--surface-low); color: var(--text); font: 600 16px/1.2 "JetBrains Mono", Consolas, monospace; text-transform: none; }.employees-table-card td { padding: 21px 20px; font-size: 16px; }.employees-table-card tbody tr:hover td { background: #f6f8ff; }
  .employee-identity { display: flex; align-items: center; gap: 14px; }.employee-identity img, .employee-avatar { display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 50px; border-radius: 50%; object-fit: cover; background: #dce9ff; color: var(--primary); font-size: 19px; font-weight: 700; }.employee-identity b { font-size: 18px; white-space: nowrap; }.employee-contact span, .employee-contact span + span { display: block; }.employee-contact span + span { margin-top: 4px; color: var(--muted); font-size: 15px; }.employee-role { display: inline-block; padding: 7px 14px; border-radius: 999px; background: #dce9ff; white-space: nowrap; }.employee-status { display: inline-block; padding: 7px 13px; border-radius: 999px; white-space: nowrap; }.employee-status.active { background: #ddffe8; color: #087a32; }.employee-status.inactive { background: #ffeded; color: #ba1a1a; }.employees-actions-head { width: 110px; }.employee-row-actions { display: flex; align-items: center; gap: 5px; }.employee-row-actions button { width: 30px; height: 34px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 23px; }.employee-row-actions button:hover { background: var(--surface-low); color: var(--primary); }.employee-more-menu { display: none; position: absolute; z-index: 5; right: 10px; margin-top: 5px; min-width: 120px; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }.employee-more-menu.open { display: grid; }.employee-more-menu button { padding: 8px 10px; border: 0; background: transparent; text-align: left; }.employee-more-menu button:hover { background: var(--surface-low); }.employees-table-card td:last-child { position: relative; }.employees-empty { padding: 44px 20px !important; text-align: center; }
  .employees-pagination { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-top: 1px solid var(--border); font-size: 16px; }.employees-pagination > button { border: 0; background: transparent; color: var(--text); font-size: 16px; }.employees-pagination > button:disabled { color: #a9adb8; }.employees-pages { display: flex; align-items: center; gap: 8px; }.employees-pages button { width: 40px; height: 40px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font-size: 18px; }.employees-pages button.active { background: var(--primary-container); color: #fff; }
}

@media (max-width: 768px) {
  .employees-shell .content { padding: 18px 12px 78px; }.employees-shell .side-head { height: 84px; padding: 18px 20px 0; }.employees-shell .brand { padding-left: 48px; font-size: 18px; }.employees-shell .brand::before { margin-left: -46px; font-size: 21px; }.employees-shell .brand small { font-size: 12px; }
  .employees-shell .topbar { min-height: 52px; height: 52px; padding: 7px 10px; background: var(--bg); }.employees-shell .topbar > .menu-btn { display: inline-flex !important; order: -2; }.employees-shell .topbar > h2 { display: block !important; flex: 1; text-align: center; font-size: 17px; color: var(--primary); }.employees-top-search { display: none; }.employees-top-actions { margin-left: auto; gap: 5px; }.employees-top-actions > button:not(:last-child) { display: none; }.employees-top-actions .pos-avatar { width: 30px; height: 30px; font-size: 12px; }
  .employees-heading { display: block; margin-bottom: 16px; }.employees-heading h1 { font-size: 22px; }.employees-heading p { margin-top: 5px; font-size: 13px; }.employees-add { width: 100%; height: 44px; margin-top: 13px; font-size: 14px; }.employees-table-card { overflow-x: auto; border-radius: 10px; }.employees-table-toolbar, .employees-table-card table, .employees-pagination { min-width: 760px; }.employees-table-toolbar { padding: 12px; font-size: 12px; }.employees-filters select { height: 38px; font-size: 12px; }.employees-table-card th { padding: 13px 12px; font-size: 12px; }.employees-table-card td { padding: 13px 12px; font-size: 13px; }.employee-identity img, .employee-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 13px; }.employee-identity b { font-size: 13px; }.employee-contact span + span { font-size: 11px; }.employee-role, .employee-status { padding: 6px 9px; font-size: 11px; }.employees-pagination { padding: 12px; font-size: 12px; }.employees-pages button { width: 34px; height: 34px; font-size: 14px; }
}

/* ---------- DEMO unified sidebar ----------
   Every POS page uses the same left navigation shell.  Page-specific
   content may change, but the rail itself stays visually identical. */
@media (min-width: 769px) {
  .app .sidebar {
    width: 320px !important;
    background: #fff !important;
    color: var(--text) !important;
    border-right: 1px solid var(--border) !important;
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  }
  .app .side-head {
    height: 150px !important;
    padding: 20px 30px !important;
    display: block !important;
    background: #fff !important;
  }
  .app .brand {
    position: relative;
    padding: 28px 0 0 76px !important;
    border: 0 !important;
    color: var(--primary) !important;
    font: 700 25px/1.15 Inter, "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif !important;
  }
  .app .brand::before {
    content: '◈' !important;
    display: grid !important;
    place-items: center !important;
    position: absolute !important;
    margin: -8px 0 0 -62px !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 10px !important;
    background: var(--primary-container) !important;
    color: #fff !important;
    font-size: 24px !important;
  }
  .app .brand small {
    color: var(--text) !important;
    font: 400 15px/1.2 Inter, "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif !important;
    margin-top: 5px !important;
  }
  .app .brand::after { content: none !important; display: none !important; }
  .app .side-close { display: none !important; }
  .app .nav { padding: 14px 27px !important; overflow: hidden !important; }
  .app .nav-item {
    min-height: 48px !important;
    padding: 10px 16px !important;
    margin-bottom: 7px !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font: 400 16px/1.2 Inter, "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif !important;
  }
  .app .nav-item:hover { background: var(--surface-low) !important; color: var(--text) !important; }
  .app .nav-item.active { background: var(--primary-container) !important; color: #fff !important; }
  .app .nav-icon { width: 24px !important; font-size: 18px !important; }
  .app .side-foot {
    display: block !important;
    padding: 18px 20px 22px !important;
    border-top: 1px solid var(--border) !important;
    background: #fff !important;
  }
  .app .side-foot .who, .app .side-foot .sync-data { display: none !important; }
  .app .side-foot::before {
    content: '?  Help' !important;
    display: block !important;
    padding: 15px 23px 16px !important;
    border: 0 !important;
    color: var(--text) !important;
    font: 400 15px/1.2 Inter, "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif !important;
  }
  .app .side-foot .logout {
    display: block !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 6px 0 0 !important;
    border-radius: 8px !important;
    font: 400 15px/1.2 Inter, "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif !important;
    text-align: center !important;
  }
  .app .side-foot [data-switchcashier] { background: var(--surface-container) !important; color: var(--text) !important; }
  .app .side-foot [data-logout] { background: transparent !important; color: var(--danger) !important; }
}

@media (max-width: 768px) {
  .app .sidebar {
    width: min(86vw, 320px) !important;
    background: #fff !important;
    color: var(--text) !important;
    border-right: 1px solid var(--border) !important;
  }
  .app .side-head { height: 84px !important; padding: 18px 20px 0 !important; }
  .app .brand { padding: 45px 0 0 48px !important; font-size: 19px !important; }
  .app .brand::before { margin: -43px 0 0 -47px !important; width: 40px !important; height: 40px !important; border-radius: 9px !important; font-size: 18px !important; }
  .app .brand::after { content: none !important; display: none !important; }
  .app .brand small { font-size: 12px !important; }
  .app .nav { padding: 10px 12px 90px !important; }
  .app .nav-item { min-height: 44px !important; padding: 9px 13px !important; margin-bottom: 5px !important; border-radius: 8px !important; font-size: 14px !important; }
  .app .nav-icon { width: 22px !important; font-size: 16px !important; }
  .app .side-foot { display: block !important; padding: 12px 14px !important; background: #fff !important; }
  .app .side-foot::before { padding: 10px 14px !important; font-size: 13px !important; }
  .app .side-foot .logout { min-height: 44px !important; font-size: 13px !important; }
}
