/* OmniePOS - orange and white */
:root {
  --orange-50: #FFF7ED; --orange-100: #FFEDD5; --orange-200: #FED7AA;
  --orange-500: #F97316; --orange-600: #EA580C; --orange-700: #C2410C;
  --ink: #1C1917; --ink-2: #44403C; --muted: #78716C; --line: #E7E5E4; --line-2: #F5F5F4; --wash: #FAFAF9;
  --ok: #166534; --ok-bg: #DCFCE7; --bad: #B91C1C; --bad-bg: #FEE2E2;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: #fff; font-variant-numeric: tabular-nums; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange-500); outline-offset: 2px; }
.icon { flex: none; }

/* Layout */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px 24px; border-right: 1px solid var(--line); background: #fff; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--orange-600); color: #fff; display: grid; place-items: center; font-size: 16px; }
.nav-label { padding: 18px 10px 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--wash); }
.nav a.active { background: var(--orange-50); color: var(--orange-700); box-shadow: inset 3px 0 0 var(--orange-600); font-weight: 700; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; padding: 0 28px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ctx { display: flex; align-items: center; gap: 8px; margin: 0; }
.ctx select { padding: 7px 30px 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; max-width: 220px; }
.ctx.business select { border-color: var(--orange-200); background: var(--orange-50); color: var(--orange-700); font-weight: 700; }
.ctx-static { display: flex; align-items: baseline; gap: 10px; font-weight: 700; }
.ctx-static span { color: var(--muted); font-weight: 600; }
.who { text-align: right; line-height: 1.25; }
.who strong { display: block; font-weight: 700; }
.who span { font-size: 12.5px; color: var(--muted); }
.menu-btn { display: none; }
.content { padding: 28px 32px 56px; width: 100%; max-width: 1240px; }
.scrim { display: none; }

/* Page head */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--wash); }
.btn-primary { background: var(--orange-600); border-color: var(--orange-600); color: #fff; }
.btn-primary:hover { background: var(--orange-700); border-color: var(--orange-700); }
.btn-danger { color: var(--bad); border-color: #FCA5A5; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { color: var(--orange-700); font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* Panels and layout helpers */
.panel { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.panel + .panel, .stats + .panel, .panel + .stats, .filters + .panel { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 15px; font-weight: 700; }
.panel-body { padding: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.split > .panel { margin-top: 0; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; align-items: start; }
.cols-2 > .panel { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stat { background: #fff; padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { margin-top: 4px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.stat .note { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.stat.accent .value { color: var(--orange-600); }
.text-muted { color: var(--muted); }
.text-bad { color: var(--bad); }
.text-ok { color: var(--ok); }
.text-orange { color: var(--orange-700); }
.right { text-align: right; }
.strong { font-weight: 700; }
.small { font-size: 13px; }
.mt { margin-top: 20px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 14px; text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--wash); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #FFFBF7; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 800; background: var(--wash); border-top: 1px solid var(--line); }
.table .sub { display: block; font-size: 12.5px; color: var(--muted); }
.table tr.is-void td { color: var(--muted); text-decoration: line-through; }
.table tr.is-void td:last-child, .table tr.is-void td .badge { text-decoration: none; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border: 0; border-radius: 999px; font-size: 12px; font-family: inherit; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--muted); }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--orange-100); color: var(--orange-700); }
.b-bad { background: var(--bad-bg); color: var(--bad); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 13px; }
.field .req { color: var(--orange-600); margin-left: 3px; }
.field small { color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=search], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #D6D3D1; border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange-500); box-shadow: 0 0 0 3px rgba(249, 115, 22, .18); }
.is-invalid { border-color: var(--bad) !important; }
textarea { min-height: 84px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--orange-600); flex: none; }
.check span { display: block; font-weight: 700; }
.check small { display: block; color: var(--muted); font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.filters .field { margin: 0; min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 220px; }
.form-narrow { max-width: 720px; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; border: 1px solid; font-weight: 600; }
.flash-ok { background: var(--ok-bg); border-color: #86EFAC; color: var(--ok); }
.flash-err { background: var(--bad-bg); border-color: #FCA5A5; color: var(--bad); }
.flash-info { background: var(--orange-50); border-color: var(--orange-200); color: var(--orange-700); }
.flash ul { margin: 0; padding-left: 18px; }

/* Pagination */
.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.pager a, .pager span { padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 13px; }
.pager a:hover { background: var(--orange-50); border-color: var(--orange-200); }
.pager .current { background: var(--orange-600); border-color: var(--orange-600); color: #fff; }
.pager .disabled, .pager .gap { color: #A8A29E; }

/* Charts */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 8px; }
.chart .col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.chart .bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: calc(100% - 22px); }
.chart .bar { flex: 1; min-height: 2px; background: var(--orange-500); border-radius: 3px 3px 0 0; }
.chart .bar.alt { background: var(--orange-200); }
.chart .lbl { height: 22px; padding-top: 6px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--orange-500); }
.legend i.alt { background: var(--orange-200); }

/* Sales screen */
.pos { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr); gap: 20px; align-items: start; }
.pos-cart { position: sticky; top: 82px; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.result { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 92px; }
.result:hover { border-color: var(--orange-500); background: var(--orange-50); }
.result .name { font-weight: 700; line-height: 1.3; }
.result .price { font-weight: 800; color: var(--orange-700); margin-top: auto; }
.result .stock { font-size: 12.5px; color: var(--muted); }
.result.out { opacity: .6; }
.cart-empty { padding: 26px 0; text-align: center; color: var(--muted); }
.cart-row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 92px 28px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-row .name { font-weight: 700; line-height: 1.3; }
.cart-row .meta { font-size: 12.5px; color: var(--muted); }
.cart-row.warn .meta { color: var(--bad); font-weight: 700; }
.cart-row input { padding: 7px 8px; text-align: right; }
.cart-row .remove { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; }
.cart-row .remove:hover { color: var(--bad); }
.cart-row .line { text-align: right; font-weight: 700; }
.totals .line { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 22px; font-weight: 800; }
.totals .owed { color: var(--bad); font-weight: 700; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 8px 14px; border: 1px solid #D6D3D1; border-radius: 8px; cursor: pointer; font-weight: 600; }
.seg input:checked + label { border-color: var(--orange-600); background: var(--orange-50); color: var(--orange-700); font-weight: 700; }
.seg input:focus-visible + label { outline: 2px solid var(--orange-500); outline-offset: 2px; }
.inline-add { display: none; margin-top: 8px; padding: 12px; border: 1px dashed var(--orange-200); border-radius: 8px; background: var(--orange-50); }
.inline-add.open { display: block; }
.inline-add .field { margin-bottom: 10px; }

/* Purchase rows */
.line-row { display: grid; grid-template-columns: minmax(0, 2fr) 110px 130px 32px; gap: 10px; align-items: end; margin-bottom: 10px; }
.line-row.staff { grid-template-columns: minmax(0, 2fr) 130px 32px; }
.line-row .field { margin: 0; }
.line-row .remove { height: 40px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }

/* Receipt */
.receipt-wrap { display: flex; justify-content: center; }
.receipt { width: 360px; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 26px 24px; background: #fff; }
.receipt h2 { font-size: 18px; text-align: center; font-weight: 800; }
.receipt .center { text-align: center; color: var(--muted); font-size: 13px; }
.receipt hr { border: 0; border-top: 1px dashed #D6D3D1; margin: 14px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.receipt .item { padding: 6px 0; }
.receipt .item .sub { font-size: 12.5px; color: var(--muted); }
.receipt .grand { font-size: 18px; font-weight: 800; }
.receipt .void { text-align: center; padding: 8px; margin-bottom: 12px; border-radius: 8px; background: var(--bad-bg); color: var(--bad); font-weight: 800; }

/* Audit */
.audit-detail summary { cursor: pointer; color: var(--orange-700); font-weight: 700; font-size: 13px; }
.audit-detail pre { margin: 8px 0 0; padding: 10px; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Sign in */
.login { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.login-art { background: var(--orange-600); color: #fff; padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; overflow: hidden; }
.login-art .brand { padding: 0; color: #fff; }
.login-art .brand .mark { background: #fff; color: var(--orange-600); }
.login-art h1 { font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; max-width: 440px; }
.login-art p { margin-top: 14px; max-width: 420px; font-size: 16px; color: #FFEDD5; }
.paper { position: relative; width: min(330px, 100%); padding: 24px 24px 22px; background: #fff; color: var(--ink); border-radius: 4px 4px 0 0; transform: rotate(-2.5deg); align-self: flex-start; margin-bottom: 12px; box-shadow: 0 30px 50px rgba(124, 45, 18, .35); }
.paper::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px; background: linear-gradient(135deg, #fff 5px, transparent 0) 0 0 / 10px 10px repeat-x, linear-gradient(225deg, #fff 5px, transparent 0) 0 0 / 10px 10px repeat-x; }
.paper .title { font-weight: 800; text-align: center; margin-bottom: 2px; }
.paper .sub { text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.paper .row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.paper .row.total { border-bottom: 0; font-weight: 800; font-size: 16px; padding-top: 10px; }
.paper .row.owed { color: var(--bad); font-weight: 700; border-bottom: 0; }
.login-form-side { display: grid; place-items: center; padding: 40px 24px; }
.login-form { width: 100%; max-width: 380px; }
.login-form h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.login-form .lead { color: var(--muted); margin: 6px 0 24px; }
.login-form .foot { margin-top: 22px; color: var(--muted); font-size: 13px; }

/* Sync status toggle - one control shows online/offline/pending, doubles as a manual sync button */
.sync-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }
.sync-toggle .dot { width: 9px; height: 9px; border-radius: 999px; background: #A8A29E; flex: none; }
.sync-toggle.is-online .dot { background: var(--ok); }
.sync-toggle.is-online { color: var(--ok); border-color: #86EFAC; background: var(--ok-bg); }
.sync-toggle.is-pending .dot { background: var(--orange-600); animation: sync-pulse 1s infinite; }
.sync-toggle.is-pending { color: var(--orange-700); border-color: var(--orange-200); background: var(--orange-50); }
.sync-toggle.is-failed .dot { background: var(--bad); }
.sync-toggle.is-failed { color: var(--bad); border-color: #FCA5A5; background: var(--bad-bg); }
.sync-toggle.is-offline .dot { background: var(--bad); }
.sync-toggle.is-offline { color: var(--bad); border-color: #FCA5A5; background: var(--bad-bg); }
@keyframes sync-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Install popup - small, dismissible, never blocks the page */
.install-popup { position: fixed; right: 20px; bottom: 20px; z-index: 45; max-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 34px 16px 16px; box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.install-popup p { font-size: 13.5px; margin-bottom: 10px; }
.install-popup-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px; }
.install-popup-close:hover { color: var(--ink); }
@media (max-width: 1000px) { .install-popup { left: 16px; right: 16px; max-width: none; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); } }

/* Mobile account bar + sheet (mobile-only; hidden entirely on desktop) */
.mobile-only { display: none; }
.mobile-bottom-bar { display: none; }
.mobile-bottom-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: var(--ink-2); font-size: 11px; font-weight: 700; padding: 6px 18px; }
.mobile-bottom-btn .dot { position: absolute; top: 2px; right: 12px; width: 9px; height: 9px; border-radius: 999px; background: var(--orange-600); border: 2px solid #fff; }
.mobile-sheet { position: fixed; inset: 0; z-index: 50; }
.mobile-sheet-backdrop { position: absolute; inset: 0; background: rgba(28, 25, 23, .4); }
.mobile-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
.mobile-sheet-panel .who { margin-bottom: 16px; }
.mobile-sheet-panel .who strong { font-size: 16px; }
.mobile-sheet-panel .badge { display: block; width: 100%; text-align: center; padding: 8px; border: 0; }

/* Responsive */
@media (max-width: 1000px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: -280px; width: 264px; transition: left .18s ease; box-shadow: none; }
  body.nav-open .sidebar { left: 0; box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(28, 25, 23, .35); z-index: 25; }
  .menu-btn { display: inline-flex; padding: 7px 9px; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px calc(72px + env(safe-area-inset-bottom, 0px)); }
  .split, .cols-2, .pos { grid-template-columns: minmax(0, 1fr); }
  .pos-cart { position: static; }
  .who span { display: none; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 28px 24px; }
  .login-art h1 { font-size: 28px; }
  .paper { display: none; }
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
  .mobile-bottom-bar { display: flex; justify-content: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
  .line-row, .line-row.staff { grid-template-columns: minmax(0, 1fr) 100px 32px; }
  .line-row .cost { grid-column: 1 / 3; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
  .ctx select { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .sidebar, .topbar, .no-print, .scrim, .flash { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .receipt { border: 0; width: 100%; padding: 0; }
  body { font-size: 13px; }
}

/* ---- POS cart ---- */
.cart-line { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.cart-line:last-child { border-bottom: 0; }
.cart-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cart-info strong { font-weight: 700; line-height: 1.25; }
.cart-info .meta { font-size: 12.5px; color: var(--muted); }
.cart-info .opts { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.cart-info select.unit { padding: 3px 22px 3px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.cart-info input.note { flex: 1 1 120px; min-width: 0; padding: 3px 8px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cart-qty button { width: 28px; height: 30px; border: 0; background: #fff; font-weight: 800; cursor: pointer; color: var(--ink); }
.cart-qty button:hover { background: var(--wash); }
.cart-qty input { width: 44px; height: 30px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-total { font-weight: 800; text-align: right; min-width: 84px; font-variant-numeric: tabular-nums; }
.cart-remove { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0 4px; }
.cart-remove:hover { color: var(--bad); }



/* ---- POS cart line (flex, responsive) ---- */
#cart { display: flex; flex-direction: column; gap: 10px; }
.cart-line {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.cart-line .head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  min-width: 0;
}
.cart-line .head .name {
  font-weight: 700; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.cart-line .head .total {
  font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cart-line .meta { font-size: 12.5px; color: var(--muted); }
.cart-line .controls {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
  width: 100%;
}
.cart-line .controls .note {
  flex: 1 1 auto; min-width: 0;
  padding: 5px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px;
  box-sizing: border-box;
}
.cart-line .qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  flex: 0 0 auto;
}
.cart-line .qty button {
  width: 28px; height: 30px; border: 0; background: #fff;
  font-weight: 800; cursor: pointer; color: var(--ink);
  padding: 0;
}
.cart-line .qty button:hover { background: var(--wash); }
.cart-line .qty input {
  width: 40px; height: 30px; border: 0; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  padding: 0;
}
.cart-line .remove {
  flex: 0 0 auto;
  border: 0; background: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.cart-line .remove:hover { color: var(--bad); }

@media (max-width: 420px) {
  .cart-line .controls { flex-wrap: wrap; }
  .cart-line .controls .note { flex-basis: 100%; }
}
