@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* Tilly UI — component classes. Every value is a token from tokens.json.
   In Angular, copy this file into src/styles/components.css inside @layer components. */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-sans); font-size: 14px; line-height: 20px; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
.pos-num { font-variant-numeric: tabular-nums; }
.pos-mono { font-family: var(--font-mono); font-size: 13px; }
.pos-muted { color: var(--ink-muted); }
.pos-subtle { color: var(--ink-subtle); }
.pos-icon { width: 16px; height: 16px; flex: none; }
.pos-icon--20 { width: 20px; height: 20px; }
.pos-icon--24 { width: 24px; height: 24px; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Preview scaffolding */
.pos-demo { padding: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.pos-demo--col { flex-direction: column; align-items: stretch; }
.pos-demo-label { width: 100%; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); margin-top: var(--space-2); }
.pos-demo-label:first-child { margin-top: 0; }

/* Button */
.pos-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-md); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; font: inherit; font-weight: 500; font-size: 14px; line-height: 20px; white-space: nowrap; cursor: pointer; transition: background-color .12s, border-color .12s, color .12s; text-decoration: none; }
.pos-btn--primary { background: var(--primary); color: var(--on-primary); }
.pos-btn--primary:hover { background: var(--primary-hover); }
.pos-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.pos-btn--secondary:hover { background: var(--surface-muted); }
.pos-btn--ghost { background: transparent; color: var(--ink-muted); }
.pos-btn--ghost:hover { background: var(--surface-muted); color: var(--ink); }
.pos-btn--danger { background: var(--danger); color: var(--on-danger); }
.pos-btn--danger:hover { background: var(--danger-hover); }
.pos-btn--sm { height: var(--control-sm); padding: 0 var(--space-3); font-size: 13px; }
.pos-btn--lg { height: var(--control-lg); padding: 0 var(--space-5); font-size: 16px; }
.pos-btn--xl { height: var(--control-xl); padding: 0 var(--space-6); font-size: 18px; font-weight: 600; border-radius: var(--radius-xl); }
.pos-btn--block { display: flex; width: 100%; }
.pos-btn--icon { width: var(--control-md); padding: 0; }
.pos-btn--icon.pos-btn--sm { width: var(--control-sm); }
.pos-btn--icon.pos-btn--lg { width: var(--control-lg); }
.pos-btn:disabled, .pos-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.pos-btn .pos-btn-spinner { width: 16px; height: 16px; border-radius: var(--radius-full); border: 2px solid currentColor; border-right-color: transparent; animation: pos-spin .7s linear infinite; }
@keyframes pos-spin { to { transform: rotate(360deg); } }
.pos-kbd { display: inline-flex; align-items: center; height: 20px; min-width: 20px; padding: 0 6px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-muted); color: var(--ink-muted); font-family: var(--font-sans); font-size: 11px; font-weight: 600; line-height: 1; }
.pos-btn--primary .pos-kbd { background: transparent; border-color: currentColor; color: inherit; opacity: .85; }

/* Text field */
.pos-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pos-label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); }
.pos-label .pos-req { color: var(--danger-ink); margin-left: 2px; }
.pos-control { position: relative; display: flex; align-items: center; }
.pos-input { width: 100%; height: var(--control-md); padding: 0 var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.pos-input::placeholder { color: var(--ink-subtle); }
.pos-input:focus { outline: 2px solid var(--focus-ring); outline-offset: 0; border-color: var(--focus-ring); }
.pos-input:disabled { background: var(--surface-muted); color: var(--ink-muted); cursor: not-allowed; }
.pos-control .pos-adorn { position: absolute; left: var(--space-3); color: var(--ink-subtle); pointer-events: none; display: flex; }
.pos-control .pos-adorn--end { left: auto; right: var(--space-3); }
.pos-control--start .pos-input { padding-left: 40px; }
.pos-control--end .pos-input { padding-right: 76px; }
.pos-input.pos-mono, .pos-scan input.pos-mono { font-family: var(--font-mono); font-size: 14px; }
.pos-help { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.pos-error { display: flex; gap: var(--space-1); align-items: center; font-size: 12px; line-height: 16px; color: var(--danger-ink); }
.pos-field--invalid .pos-input { border-color: var(--danger); }
.pos-field--invalid .pos-input:focus { outline-color: var(--danger); }

/* Scan field (POS search) */
.pos-scan { display: flex; align-items: center; gap: var(--space-3); height: var(--control-lg); padding: 0 var(--space-2) 0 var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-subtle); }
.pos-scan:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 0; border-color: var(--focus-ring); }
.pos-scan input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; line-height: 24px; color: var(--ink); }
.pos-scan input::placeholder { color: var(--ink-subtle); }
.pos-scan-state { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 var(--space-3); border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary-ink); font-size: 12px; font-weight: 600; white-space: nowrap; }

/* Badge */
.pos-badge { display: inline-flex; align-items: center; gap: var(--space-1); height: 22px; padding: 0 8px; border-radius: var(--radius-sm); font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.pos-badge .pos-icon { width: 14px; height: 14px; }
.pos-badge--neutral { background: var(--surface-muted); color: var(--ink-muted); }
.pos-badge--primary { background: var(--primary-soft); color: var(--primary-ink); }
.pos-badge--success { background: var(--success-soft); color: var(--success-ink); }
.pos-badge--warning { background: var(--warning-soft); color: var(--warning-ink); }
.pos-badge--danger { background: var(--danger-soft); color: var(--danger-ink); }
.pos-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: currentColor; flex: none; }

/* Alert */
.pos-alert { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.pos-alert .pos-icon { width: 20px; height: 20px; margin-top: 0; }
.pos-alert-body { flex: 1; min-width: 0; }
.pos-alert-title { font-weight: 600; font-size: 14px; line-height: 20px; color: var(--ink); }
.pos-alert-text { margin-top: 2px; color: var(--ink-muted); }
.pos-alert-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.pos-alert--info { background: var(--primary-soft); border-color: var(--primary-muted); }
.pos-alert--info > .pos-icon { color: var(--primary); }
.pos-alert--success { background: var(--success-soft); }
.pos-alert--success > .pos-icon { color: var(--success); }
.pos-alert--warning { background: var(--warning-soft); }
.pos-alert--warning > .pos-icon { color: var(--warning); }
.pos-alert--danger { background: var(--danger-soft); }
.pos-alert--danger > .pos-icon { color: var(--danger); }

/* Toast */
.pos-toast { display: flex; align-items: center; gap: var(--space-3); min-width: 320px; max-width: 420px; padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); border-radius: var(--radius-lg); background: var(--surface-inverse); color: var(--ink-inverse); box-shadow: var(--shadow-lg); }
.pos-toast-text { flex: 1; font-weight: 500; }
.pos-toast .pos-btn--ghost { color: var(--ink-inverse); height: 32px; padding: 0 var(--space-3); }
.pos-toast .pos-btn--ghost:hover { background: transparent; text-decoration: underline; }
.pos-toast--success > .pos-icon { color: var(--success); }
.pos-toast--danger > .pos-icon { color: var(--danger); }

/* Card + stat */
.pos-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.pos-card-pad { padding: var(--space-6); }
.pos-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--border); }
.pos-card-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
.pos-stat { padding: var(--space-5) var(--space-6); }
.pos-stat-label { display: flex; align-items: center; justify-content: space-between; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.pos-stat-label .pos-icon { color: var(--ink-subtle); }
.pos-stat-value { margin-top: var(--space-2); font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.pos-stat-foot { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-1); font-size: 12px; line-height: 16px; color: var(--ink-subtle); }
.pos-delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.pos-delta .pos-icon { width: 14px; height: 14px; }
.pos-delta--up { color: var(--success-ink); }
.pos-delta--down { color: var(--danger-ink); }

/* Table */
.pos-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.pos-table-toolbar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.pos-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.pos-table th { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--surface-muted); color: var(--ink-muted); font-size: 12px; line-height: 16px; font-weight: 600; text-align: left; padding: 10px var(--space-4); border-bottom: 1px solid var(--border); white-space: nowrap; }
.pos-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.pos-table tr:last-child td { border-bottom: 0; }
.pos-table tbody tr:hover { background: var(--surface-muted); }
.pos-table tbody tr[aria-selected="true"] { background: var(--primary-soft); }
.pos-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pos-table .pos-cell-main { font-weight: 500; color: var(--ink); }
.pos-table .pos-cell-sub { font-size: 12px; line-height: 16px; color: var(--ink-subtle); }
.pos-table-foot { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); color: var(--ink-muted); font-size: 13px; }
.pos-check { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
.pos-thumb { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--surface-muted); color: var(--ink-subtle); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* Empty state */
.pos-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--space-10) var(--space-6); }
.pos-empty-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--surface-muted); color: var(--ink-muted); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); }
.pos-empty-title { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
.pos-empty-text { margin: var(--space-1) 0 var(--space-5); max-width: 360px; color: var(--ink-muted); }

/* App shell */
.pos-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; min-height: 100%; background: var(--bg); }
.pos-sidebar { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4) var(--space-3); background: var(--surface); border-right: 1px solid var(--border); }
.pos-brand { display: flex; align-items: center; gap: var(--space-3); height: 40px; padding: 0 var(--space-2); margin-bottom: var(--space-4); font-weight: 600; font-size: 15px; }
.pos-brand-mark { width: 32px; height: 32px; border-radius: var(--radius-md); background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; }
.pos-nav-group { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-subtle); padding: var(--space-4) var(--space-3) var(--space-1); }
.pos-nav-item { display: flex; align-items: center; gap: var(--space-3); height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--ink-muted); font-weight: 500; text-decoration: none; }
.pos-nav-item .pos-icon { width: 18px; height: 18px; color: var(--ink-subtle); }
.pos-nav-item:hover { background: var(--surface-muted); color: var(--ink); }
.pos-nav-item[aria-current="page"] { background: var(--primary-soft); color: var(--primary-ink); }
.pos-nav-item[aria-current="page"] .pos-icon { color: var(--primary); }
.pos-nav-count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.pos-topbar { display: flex; align-items: center; gap: var(--space-3); height: var(--space-16); padding: 0 var(--space-6); background: var(--surface); border-bottom: 1px solid var(--border); }
.pos-topbar .pos-scan { height: var(--control-md); max-width: 420px; flex: 1; border-color: var(--border); background: var(--bg); border-radius: var(--radius-md); }
.pos-topbar .pos-scan input { font-size: 14px; }
.pos-spacer { flex: 1; }
.pos-select-btn { display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-md); padding: 0 var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.pos-select-btn .pos-icon { color: var(--ink-subtle); }
.pos-avatar { width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--primary-soft); color: var(--primary-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.pos-notify { position: relative; }
.pos-notify::after { content: ""; position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--danger); border: 2px solid var(--surface); }

/* Page header */
.pos-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) var(--space-8); }
.pos-crumbs { display: flex; align-items: center; gap: var(--space-1); font-size: 13px; color: var(--ink-subtle); margin-bottom: var(--space-2); }
.pos-crumbs a { color: var(--ink-muted); text-decoration: none; }
.pos-crumbs a:hover { color: var(--ink); }
.pos-page-title { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.015em; }
.pos-page-desc { margin: var(--space-1) 0 0; color: var(--ink-muted); }
.pos-page-actions { display: flex; gap: var(--space-2); }

/* Tabs */
.pos-tabs { display: flex; gap: var(--space-6); border-bottom: 1px solid var(--border); }
.pos-tab { position: relative; display: inline-flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0; border: 0; background: none; color: var(--ink-muted); font: inherit; font-weight: 500; cursor: pointer; }
.pos-tab:hover { color: var(--ink); }
.pos-tab[aria-selected="true"] { color: var(--ink); }
.pos-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px; }

/* Segmented control (payment method) */
.pos-segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-1); padding: var(--space-1); border-radius: var(--radius-lg); background: var(--surface-muted); }
.pos-segment button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); height: 64px; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); font: inherit; font-weight: 500; cursor: pointer; }
.pos-segment button .pos-icon { width: 20px; height: 20px; }
.pos-segment button[aria-pressed="true"] { background: var(--surface); color: var(--ink); border-color: var(--border); box-shadow: var(--shadow-xs); }
.pos-segment button[aria-pressed="true"] .pos-icon { color: var(--primary); }

/* Product tile */
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-4); }
.pos-tile { position: relative; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.pos-tile:hover { border-color: var(--primary-muted); box-shadow: var(--shadow-md); }
.pos-tile-media { aspect-ratio: 4 / 3; border-radius: var(--radius-md); background: var(--surface-muted); color: var(--ink-subtle); display: flex; align-items: center; justify-content: center; }
.pos-tile-media .pos-icon { width: 28px; height: 28px; }
.pos-tile-name { font-weight: 500; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.pos-tile-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.pos-tile-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.pos-tile-stock { font-size: 12px; line-height: 16px; color: var(--ink-subtle); font-variant-numeric: tabular-nums; }
.pos-tile-qty { position: absolute; top: var(--space-2); right: var(--space-2); min-width: 24px; height: 24px; padding: 0 6px; border-radius: var(--radius-full); background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.pos-tile--in-cart { border-color: var(--primary-muted); background: var(--primary-soft); }
.pos-tile--in-cart .pos-tile-media { background: var(--surface); }
.pos-tile[aria-disabled="true"] { cursor: not-allowed; }
.pos-tile[aria-disabled="true"] .pos-tile-media, .pos-tile[aria-disabled="true"] .pos-tile-name, .pos-tile[aria-disabled="true"] .pos-tile-price { opacity: .55; }
.pos-tile[aria-disabled="true"]:hover { border-color: var(--border); box-shadow: none; }

/* Quantity stepper */
.pos-qty { display: inline-flex; align-items: center; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface); }
.pos-qty button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--ink-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: var(--radius-md); }
.pos-qty button:hover { background: var(--surface-muted); color: var(--ink); }
.pos-qty span { min-width: 32px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.pos-qty--lg { height: var(--control-lg); }
.pos-qty--lg button { width: 46px; height: 46px; }

/* Cart */
.pos-cart { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; min-height: 0; }
.pos-cart-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-4); border-bottom: 1px solid var(--border); }
.pos-cart-title { margin: 0; font-size: 18px; line-height: 28px; font-weight: 600; }
.pos-cart-customer { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); color: var(--ink-muted); }
.pos-cart-lines { flex: 1; overflow: auto; }
.pos-cart-line { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.pos-cart-line-name { font-weight: 500; }
.pos-cart-line-meta { font-size: 12px; line-height: 16px; color: var(--ink-subtle); }
.pos-cart-line-total { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pos-cart-line-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.pos-cart-line-disc { font-size: 12px; color: var(--success-ink); font-weight: 500; }
.pos-totals { padding: var(--space-4); border-top: 1px solid var(--border); background: var(--bg); display: flex; flex-direction: column; gap: var(--space-2); }
.pos-totals-row { display: flex; justify-content: space-between; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.pos-totals-row strong { color: var(--ink); font-weight: 500; }
.pos-totals-due { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--space-3); margin-top: var(--space-1); border-top: 1px dashed var(--border-strong); }
.pos-totals-due span { font-weight: 600; font-size: 15px; }
.pos-totals-due strong { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pos-cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); padding: 0 var(--space-4) var(--space-4); background: var(--bg); }
.pos-cart-actions .pos-btn--xl { grid-column: 1 / -1; }

/* Tender */
.pos-tender-due { text-align: center; padding: var(--space-4) 0 var(--space-2); }
.pos-tender-due-label { font-size: 13px; color: var(--ink-muted); font-weight: 500; }
.pos-tender-due-value { font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pos-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.pos-quick button { height: var(--control-lg); border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.pos-quick button:hover { background: var(--surface-muted); }
.pos-change { display: flex; justify-content: space-between; align-items: center; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--success-soft); color: var(--success-ink); font-weight: 600; }
.pos-change strong { font-size: 24px; line-height: 32px; font-variant-numeric: tabular-nums; }

/* Register status bar */
.pos-statusbar { display: flex; align-items: center; gap: var(--space-4); height: 40px; padding: 0 var(--space-4); background: var(--surface); border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-muted); }
.pos-statusbar-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pos-statusbar-item strong { color: var(--ink); font-weight: 500; }
.pos-statusbar-item .pos-icon { width: 14px; height: 14px; color: var(--ink-subtle); }
.pos-statusbar-sep { width: 1px; height: 16px; background: var(--border); }
.pos-conn { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; }
.pos-conn--online { background: var(--success-soft); color: var(--success-ink); }
.pos-conn--online .pos-dot { background: var(--success); }
.pos-conn--offline { background: var(--warning-soft); color: var(--warning-ink); }
.pos-conn--offline .pos-dot { background: var(--warning); }

/* Dialog */
.pos-scrim { position: relative; display: flex; align-items: center; justify-content: center; padding: var(--space-6); background: var(--overlay); min-height: 100%; }
.pos-dialog { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.pos-dialog-body { display: flex; gap: var(--space-4); padding: var(--space-6) var(--space-6) var(--space-5); }
.pos-dialog-icon { width: 40px; height: 40px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; flex: none; }
.pos-dialog-icon--danger { background: var(--danger-soft); color: var(--danger); }
.pos-dialog-icon--primary { background: var(--primary-soft); color: var(--primary); }
.pos-dialog-title { margin: 0; font-size: 18px; line-height: 28px; font-weight: 600; }
.pos-dialog-text { margin: var(--space-1) 0 0; color: var(--ink-muted); }
.pos-dialog-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border); background: var(--bg); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }

/* Simple bar chart (dashboard) */
.pos-bars { display: flex; align-items: flex-end; gap: var(--space-2); height: 160px; padding-top: var(--space-2); }
.pos-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: var(--space-2); height: 100%; }
.pos-bar-fill { width: 100%; max-width: 28px; border-radius: 4px 4px 0 0; background: var(--primary); }
.pos-bar-fill--prev { background: var(--primary-muted); }
.pos-bar-x { font-size: 12px; line-height: 16px; color: var(--ink-subtle); }
.pos-legend { display: flex; gap: var(--space-4); font-size: 12px; color: var(--ink-muted); }
.pos-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pos-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
