/* Elara PDV — tokens from docs/DESIGN_SYSTEM_ELARA.md. Dark is the default theme. */
:root {
  color-scheme: dark;
  --bg: #181824; --nav: #1B1B29; --card: #242635; --raised: #2B2D3F; --line: #393B50;
  --text: #F7F8FC; --text-2: #A5AEC2; --text-3: #808BA3;
  --blue: #0F7FFD; --blue-hover: #3998FF; --focus: #7DB9FF;
  --positive: #35D0A0; --negative: #FB7185; --warning: #F5BC57; --info: #67C7E8; --violet: #B18BFA;
  --blue-tint: rgba(15,127,253,.14); --positive-tint: rgba(53,208,160,.13); --negative-tint: rgba(251,113,133,.13); --warning-tint: rgba(245,188,87,.13);
  --edge: inset 0 1px 0 rgba(255,255,255,.04);
  --hair: rgba(255,255,255,.06);
  --shadow: 0 24px 60px -18px rgba(5,5,14,.65);
  --ease: cubic-bezier(.16,1,.3,1);
  /* Radius scale: controls / cards & tables / dialogs & highlights / pills */
  --r-ctrl: 12px; --r-card: 16px; --r-hero: 20px; --r-pill: 999px;
  /* Highlight gradients — max one or two highlight cards per screen */
  --grad-blue: linear-gradient(135deg,#126DEB,#22B1E8); --grad-teal: linear-gradient(135deg,#155B62,#238F78);
  --grad-violet: linear-gradient(135deg,#60418F,#B34996); --grad-glass: linear-gradient(135deg,#3A3D52,#4A4D63);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-synthesis: none; -webkit-font-smoothing: antialiased;
}
:root[data-theme=light] {
  color-scheme: light;
  --bg: #F4F7FC; --nav: #FFFFFF; --card: #FFFFFF; --raised: #F7F9FD; --line: #DCE3EE;
  --text: #171B2B; --text-2: #526078; --text-3: #64728A;
  --blue: #0865D9; --blue-hover: #0755B7; --focus: #075FCB;
  --positive: #087C59; --negative: #BE2446; --warning: #925500; --info: #126987; --violet: #7046BD;
  --blue-tint: rgba(8,101,217,.09); --positive-tint: rgba(8,124,89,.09); --negative-tint: rgba(190,36,70,.08); --warning-tint: rgba(146,85,0,.09);
  --edge: 0 1px 2px rgba(23,27,43,.04);
  --hair: #E3E9F2;
  --shadow: 0 24px 60px -20px rgba(23,27,43,.28);
}

* { box-sizing: border-box }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45 }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer }
button:disabled { cursor: not-allowed; opacity: .45 }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px }
code { font-family: ui-monospace, 'Cascadia Code', monospace; font-size: 12px; background: var(--raised); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px }

/* Icons: one stroke weight everywhere */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round }

/* Fields */
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 10px 14px; background: var(--raised); outline: none; transition: border-color .2s var(--ease), box-shadow .2s var(--ease) }
input::placeholder, textarea::placeholder { color: var(--text-3) }
input:focus, select:focus, textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--blue-tint) }
input[type=checkbox] { accent-color: var(--blue) }
textarea { resize: vertical; min-height: 84px }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px }
.field small, .hint { display: block; color: var(--text-3); font-size: 12px; margin-top: 6px }
.field.wide { grid-column: 1/-1 }

/* Shell: icon rail + topbar on the same surface, content cards float above */
.shell { display: grid; grid-template-columns: 88px minmax(0,1fr); min-height: 100dvh }
.sidebar { background: var(--bg); border-right: 1px solid var(--hair); padding: 22px 0; display: flex; flex-direction: column; align-items: center; gap: 30px; position: sticky; top: 0; height: 100dvh; z-index: 6 }
.brand { color: var(--text) }
.brand-mark svg { display: block; width: 44px; height: auto }
.brand-full { display: none }
.brand-full svg { display: block; width: 120px; height: auto }
.nav { display: flex; flex-direction: column; align-items: center; gap: 6px }
.nav button, .nav-exit { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: transparent; color: var(--text-3); border-radius: var(--r-ctrl); transition: background .2s var(--ease), color .2s var(--ease) }
.nav button:hover, .nav-exit:hover { background: var(--raised); color: var(--text) }
.nav button.active { background: var(--raised); color: var(--text) }
.nav button.active::after { content: ""; position: absolute; right: -20px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px 0 0 3px; background: var(--blue) }
.nav .ico, .nav-exit .ico { display: grid; place-items: center }
.nav button.active .ico { color: var(--blue) }
.nav .ico .i, .nav-exit .ico .i { width: 22px; height: 22px }
/* Labels act as tooltips on the rail and as text in the mobile drawer */
.sidebar .label { position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-4px,-50%); white-space: nowrap; background: var(--raised); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 6px 10px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .25s var(--ease) }
.sidebar button:hover .label, .sidebar button:focus-visible .label { opacity: 1; transform: translate(0,-50%) }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 14px }
.avatar { background: var(--blue-tint); color: var(--blue); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-weight: 600; font-size: 13px; flex: none; letter-spacing: .02em }
:root:not([data-theme=light]) .avatar { color: var(--focus) }
.sidebar-bottom .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--line) }
.user-chip { display: flex; align-items: center; gap: 12px; min-width: 0 }
.user-chip .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--blue) }
.user-chip strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap }
.user-chip small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap }

.main { min-width: 0 }
.topbar { height: 80px; background: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; position: sticky; top: 0; z-index: 5 }
.chip { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; white-space: nowrap }
.chip .i { width: 16px; height: 16px; color: var(--text-3) }
.chip.crumb { overflow: hidden; text-overflow: ellipsis }
.chip.crumb .i { box-sizing: content-box; padding: 7px; border-radius: var(--r-ctrl); background: var(--raised); color: var(--text-2) }
.chip.crumb strong { color: var(--text); font-weight: 600 }
.top-actions:first-child { min-width: 0; gap: 24px }
.sidebar, .kanban { scrollbar-width: thin; scrollbar-color: var(--line) transparent }
.top-actions { display: flex; gap: 12px; align-items: center }
.content { padding: 8px 32px 56px; max-width: 1560px; margin: auto }

/* Theme switch */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-pill) }
.theme-switch button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--text-3); border-radius: var(--r-pill); padding: 6px 12px; min-height: 32px; font-size: 13px; font-weight: 500; transition: background .2s var(--ease), color .2s var(--ease) }
.theme-switch button:hover { color: var(--text) }
.theme-switch button[aria-pressed=true] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.18) }
.theme-switch .i { width: 16px; height: 16px }
.topbar .theme-switch button { padding: 6px 8px }
.topbar .theme-switch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }

/* Badges & pills */
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; border-radius: var(--r-pill); padding: 6px 11px; background: var(--positive-tint); color: var(--positive); white-space: nowrap }
.badge.closed { background: var(--warning-tint); color: var(--warning) }
.badge.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.low-pill { display: inline-block; font-size: 12px; padding: 5px 10px; border-radius: var(--r-pill); background: var(--warning-tint); color: var(--warning); font-weight: 600; white-space: nowrap }

/* Page head */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px }
.eyebrow { display: inline-block; color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px }
.page-head h1 { font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 6px }
.page-head p { margin: 0; color: var(--text-2); font-size: 14px; max-width: 62ch }
.muted { color: var(--text-2); font-size: 14px }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-ctrl); min-height: 44px; padding: 10px 18px; background: var(--blue); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .2s var(--ease), transform .15s var(--ease), border-color .2s var(--ease) }
.button:hover:not(:disabled) { background: var(--blue-hover) }
.button:active:not(:disabled) { transform: scale(.98) }
.button .i { width: 18px; height: 18px }
.button.secondary { background: var(--raised); color: var(--text); border-color: var(--line) }
.button.secondary:hover:not(:disabled) { background: var(--card); border-color: var(--text-3) }
.button.danger { background: var(--negative-tint); color: var(--negative) }
.button.danger:hover:not(:disabled) { background: var(--negative); color: #fff }
.button.tiny { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: var(--r-ctrl) }
.button.tiny .i { width: 16px; height: 16px }
.full { width: 100% }
.checkout-btn { justify-content: space-between; min-height: 52px; padding: 6px 6px 6px 20px; font-size: 15px; border-radius: var(--r-ctrl) }
.btn-orb { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-ctrl); background: rgba(255,255,255,.16); transition: transform .3s var(--ease) }
.checkout-btn:hover:not(:disabled) .btn-orb { transform: translateX(2px) }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); transition: background .2s var(--ease), color .2s var(--ease) }
.icon-btn:hover { background: var(--negative-tint); color: var(--negative) }
.icon-btn .i { width: 18px; height: 18px }
.mobile-menu { display: none; border: 0; background: none; color: var(--text); padding: 6px; border-radius: var(--r-ctrl) }
.menu-backdrop, .drawer-close, .mobile-cart-jump { display: none }

/* Cards */
.grid { display: grid; gap: 20px }
.stats { grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 20px }
.two { grid-template-columns: minmax(0,1.55fr) minmax(310px,1fr) }
.settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)) }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-card); box-shadow: var(--edge) }
.panel { padding: 24px }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px }
.panel h2, .panel-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0 }
.panel-head small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px }
.cur { font-size: .62em; font-weight: 500; opacity: .72; margin-right: .3em; vertical-align: .18em }

/* Stat cards: icon tile + title on top, large value at the bottom, faint oversized icon as texture */
.stat { position: relative; overflow: hidden; padding: 18px; min-height: 176px; display: flex; flex-direction: column }
.stat-top { position: relative; display: flex; align-items: center; gap: 12px }
.stat .symbol { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--r-ctrl); background: var(--raised); color: var(--text-2) }
.stat-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.3 }
.stat small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px }
.stat strong { position: relative; display: block; font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: auto; padding-top: 24px; font-variant-numeric: tabular-nums; white-space: nowrap }
.stat-ghost { position: absolute; right: -18px; bottom: -22px; color: var(--text); opacity: .05; transform: rotate(-14deg); pointer-events: none }
.stat-ghost .i { width: 120px; height: 120px; stroke-width: 1 }
.stat.tone { color: #fff; border-color: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 20px 40px -24px rgba(0,0,0,.6) }
.stat.tone small { color: rgba(255,255,255,.78) }
.stat.tone .symbol { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2) }
.stat.tone .stat-ghost { color: #fff; opacity: .09 }
.tone-blue { background: radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.14), transparent 55%), var(--grad-blue) }
.tone-violet { background: radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.12), transparent 55%), var(--grad-violet) }
.tone-teal { background: radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.12), transparent 55%), var(--grad-teal) }
.tone-glass { background: radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.12), transparent 55%), var(--grad-glass) }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--hair); padding: 12px 0 }
.list-row:first-of-type { border-top: 0 }
.list-row small, small.sub { display: block; color: var(--text-3); font-size: 12px; margin-top: 3px }
.list-row > strong:last-child { font-variant-numeric: tabular-nums }

/* Dashboard: main column + tall side panel, as in the reference */
.dash { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 20px; align-items: start }
.dash-main { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; min-width: 0 }
.dash .page-head, .dash .stats { margin: 0 }
.dash-row { grid-template-columns: minmax(0,1.5fr) minmax(260px,1fr) }
.side-panel { position: sticky; top: 92px; padding: 22px; border-radius: var(--r-hero); display: grid; gap: 18px; align-content: start }
.side-panel .panel-head { margin: 0 }
.round-btn { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 0; border-radius: var(--r-ctrl); background: var(--blue); color: #fff; box-shadow: 0 10px 24px -10px var(--blue); transition: background .2s var(--ease), transform .15s var(--ease) }
.round-btn:hover { background: var(--blue-hover) }
.round-btn:active { transform: scale(.95) }
.balance { display: flex; align-items: center; gap: 12px }
.balance-ico { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: var(--r-ctrl); background: var(--raised); color: var(--text-2) }
.balance strong { display: block; font-size: 14px; font-weight: 600 }
.balance small { display: block; font-size: 12px; color: var(--blue) }
:root:not([data-theme=light]) .balance small { color: var(--focus) }
.balance b { margin-left: auto; font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.duo .button { min-height: 48px; border-radius: var(--r-ctrl) }
.order-stack { display: grid; gap: 12px }
.mini-order { position: relative; overflow: hidden; display: grid; gap: 3px; padding: 16px 18px; border-radius: var(--r-hero); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 18px 34px -22px rgba(0,0,0,.7); background: linear-gradient(140deg,#1B5FD0,#1E8FD8) }
.mini-order::after { content: ""; position: absolute; width: 150px; height: 150px; right: -50px; top: -60px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); box-shadow: 0 0 0 22px rgba(255,255,255,.04) }
.mini-order.stage-separating { background: linear-gradient(140deg,#5E3B0F,#9A6419) }
.mini-order.stage-ready { background: var(--grad-violet) }
.mini-order.stage-transit { background: var(--grad-teal) }
.mini-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: rgba(255,255,255,.86); margin-bottom: 6px }
.mini-pay { padding: 3px 9px; border-radius: var(--r-pill); background: rgba(255,255,255,.16); white-space: nowrap }
.mini-order strong { font-size: 15px; font-weight: 600 }
.mini-order small { font-size: 12px; color: rgba(255,255,255,.8) }
.mini-order b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums }
.button.pill { justify-self: center; border-radius: var(--r-pill); padding: 10px 22px }

/* Revenue chart */
.chart { display: grid; grid-template-columns: auto minmax(0,1fr); column-gap: 12px }
.chart-y { position: relative; width: 70px; height: 200px; font-size: 12px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums }
.chart-y span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap }
.chart-y span:nth-child(1) { top: 40px } .chart-y span:nth-child(2) { top: 115px } .chart-y span:nth-child(3) { top: 190px }
.chart-plot { position: relative }
.chart-plot svg { display: block; width: 100%; height: 200px; overflow: visible }
.chart-grid { fill: none; stroke: var(--line); stroke-dasharray: 3 6; vector-effect: non-scaling-stroke }
.chart-cursor { fill: none; stroke: var(--text-3); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke }
.chart-line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 6px 10px rgba(15,127,253,.55)) }
.chart-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--text); transform: translate(-50%,-50%); box-shadow: 0 0 0 6px var(--blue-tint) }
.chart-tip { position: absolute; transform: translate(-50%,calc(-100% - 18px)); background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 6px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); font-variant-numeric: tabular-nums }
.chart-tip.start { transform: translate(-12px,calc(-100% - 18px)) }
.chart-tip.end { transform: translate(calc(-100% + 12px),calc(-100% - 18px)) }
.chart-tip small { display: block; font-size: 12px; font-weight: 500; color: var(--text-3) }
.chart-x { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--text-3) }
.chart-empty { grid-column: 1/-1; margin: 10px 0 0; color: var(--text-3); font-size: 13px }

/* Tables */
.table-wrap { overflow: auto }
.table { width: 100%; border-collapse: collapse; text-align: left }
.table th { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap }
.table td { font-size: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums }
.table td strong { font-weight: 600 }
.table td small { display: block; color: var(--text-3); font-size: 12px; margin-top: 3px }
.table tr:last-child td { border-bottom: 0 }
.table tbody tr { transition: background .15s var(--ease) }
.table tbody tr:hover { background: var(--raised) }
.table .money { font-weight: 600; white-space: nowrap }
.item-id { display: flex; gap: 12px; align-items: center; min-width: 0 }
.item-id strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.item-id small { color: var(--text-3); font-size: 12px }
.product-avatar { width: 40px; height: 40px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-ctrl); display: grid; place-items: center; color: var(--text-2); font-weight: 600; font-size: 13px; flex: none }
.item-id img.product-avatar { object-fit: cover; padding: 0 }

/* Toolbar */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px }
.toolbar:has(#sales-period) { flex-wrap: wrap; align-items: flex-end }
.toolbar .field { font-size: 12px; font-weight: 600; color: var(--text-2) }
.toolbar .field input, .toolbar .field select { margin-top: 8px }
.search { flex: 1; min-width: 0; max-width: 360px;padding-left: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808BA3' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.4-4.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 13px center; background-size: 18px }
.filter { width: 200px; flex: none }

/* Point of sale */
.pos-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 20px; align-items: start }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 12px }
.product-tile { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: var(--r-hero); padding: 14px; text-align: left; min-height: 168px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; box-shadow: var(--edge); transition: transform .25s var(--ease), border-color .2s var(--ease), background .2s var(--ease) }
.product-tile:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--blue) }
.product-tile:active:not(:disabled) { transform: scale(.98) }
.product-tile .tile-icon { width: 44px; height: 44px; background: var(--raised); color: var(--text-2); border-radius: var(--r-ctrl); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); display: grid; place-items: center; margin-bottom: 8px }
.product-tile img.tile-icon { width: 100%; height: 112px; object-fit: cover; border-radius: var(--r-ctrl) }
.product-tile strong { font-size: 14px; font-weight: 600; line-height: 1.3 }
.product-tile small { color: var(--text-3); font-size: 12px }
.product-tile b { font-size: 19px; font-weight: 650; letter-spacing: -.01em; margin-top: auto; padding-top: 8px; font-variant-numeric: tabular-nums }
.cart { position: sticky; top: 92px }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line) }
.cart-item strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums }
.cart-item small { display: block; color: var(--text-3); font-size: 12px; margin-top: 3px }
.qty { display: flex; align-items: center; gap: 6px; margin-top: 10px }
.qty button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); background: var(--raised); border-radius: 8px; color: var(--text); transition: border-color .2s var(--ease) }
.qty button:hover { border-color: var(--text-3) }
.qty button .i { width: 16px; height: 16px }
.qty span { min-width: 24px; text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums }
.qty .icon-btn { border: 0; background: transparent; margin-left: 4px }
.totals { padding-top: 8px; margin: 8px 0 20px }
.total-line { display: flex; justify-content: space-between; margin: 10px 0; font-size: 14px; color: var(--text-2) }
.total-line strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums }
.total-line.grand { align-items: baseline; color: var(--text); font-weight: 600; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px }
.total-line.grand strong { font-size: 32px; font-weight: 700; letter-spacing: -.02em }

/* Empty states */
.empty { padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 14px }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 14px; border-radius: var(--r-card); background: var(--raised); border: 1px solid var(--line); color: var(--text-2) }
.empty-icon .i { width: 24px; height: 24px }

/* Forms & dialogs */
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px }
.dialog { border: 1px solid var(--line); border-radius: var(--r-hero); padding: 0; width: min(560px,calc(100vw - 32px)); max-height: 90dvh; overflow: auto; background: var(--card); color: var(--text); box-shadow: var(--shadow) }
.dialog[open] { animation: rise .35s var(--ease) }
.dialog::backdrop { background: rgba(10,10,20,.62); backdrop-filter: blur(6px) }
.dialog-content { padding: 28px }
.dialog h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 6px }
.dialog p { margin: 0 0 22px; color: var(--text-2); font-size: 14px }
.order-review { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--raised); margin: 18px 0 }
.order-review-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: var(--r-ctrl); background: var(--blue-tint); color: var(--blue) }
.order-review-icon.danger { background: var(--negative-tint); color: var(--negative) }
.order-review-icon .i { width: 23px; height: 23px }
.order-review small { display: block; color: var(--text-3); font-size: 13px }
.order-review strong { display: block; margin-top: 3px; font-size: 24px; font-variant-numeric: tabular-nums }
.refund-check { display: flex; align-items: flex-start; gap: 10px; padding: 14px; margin-top: 16px; border: 1px solid var(--negative); border-radius: var(--r-ctrl); font-size: 14px; line-height: 1.45 }
.refund-check input { width: 18px; height: 18px; flex: none; margin-top: 1px; accent-color: var(--negative) }
.dialog .form-actions { flex-wrap: wrap }
.summary-box { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-ctrl); padding: 16px; margin: 16px 0; font-size: 13px; color: var(--text-2) }
.summary-box strong { display: block; color: var(--text); font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums }
.summary-box small { display: block; color: var(--text-3); font-size: 12px; margin-top: 4px }
.payment-row { display: grid; grid-template-columns: 1fr 140px 36px; gap: 8px; margin-bottom: 10px; align-items: center }
.payment-row.single { grid-template-columns: 1fr }
.amount-with-toggle { display: flex; gap: 8px }
.amount-with-toggle .button { padding: 8px 12px }
.customer-select { justify-content: flex-start; text-align: left; white-space: normal }
.customer-picker { width: min(620px,calc(100vw - 32px)) }
.customer-picker #customer-find { margin-bottom: 14px }
.customer-option { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 14px 10px; border-radius: var(--r-ctrl); color: var(--text); transition: background .15s var(--ease) }
.customer-option:hover, .customer-option:focus { background: var(--raised) }
.customer-option strong, .customer-option small { display: block }
.customer-option small { color: var(--text-3); margin-top: 3px; font-size: 12px }
.photo-preview { display: block; width: 100%; max-height: 180px; object-fit: contain; margin-top: 10px; border-radius: var(--r-ctrl); background: var(--raised) }
.cash-check-row { display: grid; grid-template-columns: 1fr 170px; gap: 12px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px }
.cash-check-row span strong { display: block; margin-top: 4px; color: var(--text-2); font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums }
.permission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px }
.permission-grid label { font-size: 14px; display: flex; gap: 10px; align-items: center }
.permission-grid input { width: 18px; min-height: 18px }
.integration-key { word-break: break-all; background: var(--raised); border: 1px solid var(--line); padding: 12px; border-radius: var(--r-ctrl); font-family: ui-monospace, 'Cascadia Code', monospace; font-size: 13px }

/* Notices */
.notice { border: 1px solid var(--line); border-left: 3px solid var(--info); background: var(--raised); color: var(--text-2); font-size: 13px; line-height: 1.55; border-radius: var(--r-ctrl); padding: 12px 14px; margin-top: 20px }
.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: var(--r-ctrl); padding: 12px 16px; margin-bottom: 24px }
.demo-banner strong { font-size: 14px; font-weight: 600; display: block }
.demo-banner small { font-size: 12px; display: block; margin-top: 2px; color: var(--text-2) }
.section-gap { margin-top: 20px }
.section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px }
.feature { border: 1px solid var(--line); background: var(--raised); border-radius: var(--r-ctrl); padding: 16px; margin-bottom: 10px }
.feature strong { font-size: 14px; font-weight: 600 }
.feature p { color: var(--text-2); font-size: 13px; line-height: 1.55; margin: 6px 0 0 }

/* Settings */
.method-row { display: grid; grid-template-columns: minmax(0,1fr) 80px 90px 44px 68px; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line) }
.method-row:last-child { border: 0 }
.method-row label { font-size: 14px; font-weight: 500 }
.method-name { font-size: 14px; font-weight: 500 }
.method-field { min-width: 0 }
.method-field > span, .method-enabled > span { display: none }
.method-enabled { display: flex; align-items: center }
.method-row input { min-height: 38px }
.method-row input[type=checkbox] { width: 18px; min-height: 18px }
.method-row small { color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .04em }
.subtabs { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 18px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-ctrl) }
.subtabs button { border: 0; background: transparent; color: var(--text-2); border-radius: var(--r-ctrl); padding: 8px 14px; font-size: 13px; font-weight: 600 }
.subtabs button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.18) }

/* Orders kanban */
.kanban { display: grid; grid-template-columns: repeat(5,minmax(240px,1fr)); gap: 14px; overflow-x: auto; align-items: start; padding-bottom: 6px }
.kanban-column { min-height: 240px; padding: 18px; transition: border-color .2s var(--ease), background .2s var(--ease) }
.kanban-column .panel-head h2 { font-size: 15px }
.kanban-column .panel-head small { display: grid; place-items: center; min-width: 26px; height: 24px; padding: 0 8px; border-radius: var(--r-pill); background: var(--raised); font-weight: 600 }
.kanban-column.drag-over { border: 1px dashed var(--focus); background: var(--blue-tint) }
.delivered-drop { border-style: dashed }
.order-card { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; margin: 10px 0; background: var(--raised); transition: transform .2s var(--ease), border-color .2s var(--ease) }
.order-card[draggable] { cursor: grab }
.order-card:hover { border-color: var(--text-3) }
.order-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px }
.order-delete { color: var(--text-3) }
.order-delete:hover { color: var(--negative) }
.order-card.dragging { opacity: .45; transform: rotate(-1deg) }
.order-card strong { font-size: 14px; font-weight: 600 }
.order-card small { color: var(--text-3); font-size: 12px }
.order-card b { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 4px }
.order-card .badge { justify-self: start }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px }
.cancelled-orders { margin-top: 20px }
.cancelled-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px }
.cancelled-row:first-of-type { border-top: 0 }
.cancelled-row > span:first-child { flex: 1; min-width: 0 }
.cancelled-row strong, .cancelled-row small { display: block }
.cancelled-row small { color: var(--text-3); margin-top: 4px; font-size: 12px }
.cancelled-row b { font-variant-numeric: tabular-nums }
@media (max-width: 600px) { .cancelled-row { flex-wrap: wrap } .cancelled-row > span:first-child { flex-basis: 100% } .dialog .form-actions > button { flex: 1 } }

/* Toast */
#toast { position: fixed; bottom: 24px; right: 24px; z-index: 100; background: var(--raised); color: var(--text); border: 1px solid var(--line); padding: 12px 18px; border-radius: var(--r-ctrl); box-shadow: var(--shadow); font-size: 14px; opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: none; max-width: calc(100vw - 48px) }
#toast.show { opacity: 1; transform: translateY(0) }
#toast.error { border-color: var(--negative); border-left: 3px solid var(--negative) }

/* Sign-in */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr }
.auth-left { position: relative; overflow: hidden; background: var(--nav); border-right: 1px solid var(--line); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px }
.auth-logo { color: var(--text); position: relative; z-index: 1 }
.auth-logo svg { display: block; width: 176px; height: auto }
.auth-copy { position: relative; z-index: 1; max-width: 480px }
.auth-copy h1 { font-size: clamp(32px,3.4vw,46px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; margin: 0 0 16px; text-wrap: balance }
.auth-copy p { color: var(--text-2); font-size: 16px; line-height: 1.6; max-width: 40ch; margin: 0 }
.auth-left > small { position: relative; z-index: 1; color: var(--text-3); font-size: 12px }
.orbit { position: absolute; width: 620px; height: 620px; right: -260px; bottom: -280px; border-radius: 50%; border: 1px solid var(--line); pointer-events: none }
.orbit::before { content: ""; position: absolute; inset: 70px; border-radius: 50%; border: 1px dashed var(--line); opacity: .7 }
.orbit::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--blue); top: 84px; left: 118px; box-shadow: 0 0 0 6px var(--blue-tint) }
.auth-right { display: grid; place-items: center; padding: 40px 24px }
.auth-box { width: min(400px,100%) }
.auth-box h2 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px }
.auth-box > p { color: var(--text-2); font-size: 14px; margin: 0 0 28px }
.auth-box .field { margin-bottom: 16px }
.auth-box form .button { width: 100%; margin-top: 4px }
.profile-list { display: grid; gap: 10px }
.profile { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 12px 16px; text-align: left; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--edge); transition: transform .25s var(--ease), border-color .2s var(--ease) }
.profile:hover { transform: translateY(-1px); border-color: var(--blue) }
.profile:active { transform: scale(.99) }
.profile > span:nth-child(2) { flex: 1; min-width: 0 }
.profile strong { display: block; font-weight: 600 }
.profile small { color: var(--text-3); font-size: 12px }
.profile > .i { color: var(--text-3); width: 18px; height: 18px }
.profile.skeleton { background: linear-gradient(90deg,var(--card) 0%,var(--raised) 50%,var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite }

/* PIN pad: double-bezel shell around the keypad */
.pin-dialog { width: min(380px,calc(100vw - 24px)); background: transparent; border: 0; box-shadow: none; overflow: visible }
.pin-shell { padding: 6px; border-radius: var(--r-hero); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); box-shadow: var(--shadow) }
:root[data-theme=light] .pin-shell { background: rgba(23,27,43,.04); border-color: rgba(23,27,43,.08) }
.pin-core { position: relative; text-align: center; background: var(--card); border-radius: var(--r-hero); padding: 32px 24px 24px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06) }
.pin-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--raised); color: var(--text-2) }
.pin-close:hover { color: var(--text) }
.pin-avatar { width: 56px; height: 56px; margin: 0 auto 14px; font-size: 18px }
.pin-core h2 { font-size: 20px; margin: 0 0 4px }
.pin-core p { margin: 0; color: var(--text-2); font-size: 13px }
.pin-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; min-height: 0; padding: 0; border: 0 }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 26px 0 28px; min-height: 14px }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--text-3); transition: background .2s var(--ease), border-color .2s var(--ease), transform .25s var(--ease) }
.pin-dots i.on { background: var(--blue); border-color: var(--blue); transform: scale(1.1) }
.pin-dots.shake { animation: shake .4s var(--ease) }
.pin-input:focus-visible + .pin-dots i:not(.on):first-of-type { border-color: var(--focus) }
.pin-keys { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px }
.pin-keys button { display: grid; place-items: center; height: 60px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--raised); color: var(--text); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background .15s var(--ease), transform .12s var(--ease), border-color .15s var(--ease) }
.pin-keys button:hover { border-color: var(--text-3) }
.pin-keys button:active:not(:disabled) { transform: scale(.95); background: var(--card) }
.pin-keys .pin-fn { background: transparent; border-color: transparent; color: var(--text-2) }
.pin-keys .pin-fn .i { width: 24px; height: 24px }
.pin-keys .pin-enter { background: var(--blue); color: #fff }
.pin-keys .pin-enter:hover:not(:disabled) { background: var(--blue-hover) }

@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98) } }
@keyframes shimmer { to { background-position: -200% 0 } }
@keyframes shake { 20%, 60% { transform: translateX(-8px) } 40%, 80% { transform: translateX(8px) } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } }

/* Responsive */
@media (max-width: 1360px) {
  .dash .stats { grid-template-columns: repeat(2,minmax(0,1fr)) }
}
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2,1fr) }
  .two, .dash, .dash-row { grid-template-columns: minmax(0,1fr) }
  .side-panel { position: static }
  .content { padding: 8px 24px 48px }
  .topbar { padding: 0 24px }
  .pos-layout { grid-template-columns: 1fr }
  .cart { position: static }
  .top-actions .muted { display: none }
  .method-row { grid-template-columns: minmax(0,1fr) 68px 82px 35px 64px; gap: 6px }
  .method-row input { padding: 7px }
}
@media (max-width: 760px) {
  .shell { display: block }
  /* The rail becomes a drawer with full labels */
  .sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: min(290px,calc(100vw - 40px)); align-items: stretch; padding: 22px 16px; overflow-y: auto; background: var(--nav); transform: translateX(-100%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s; box-shadow: var(--shadow) }
  .sidebar.open { transform: translateX(0); visibility: visible }
  .sidebar.open + .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 19; border: 0; background: rgba(10,10,20,.65) }
  body:has(.sidebar.open) { overflow: hidden }
  .drawer-close { display: grid; position: absolute; top: 20px; right: 12px }
  .brand { padding: 0 8px }
  .brand-mark { display: none }
  .brand-full { display: block }
  .nav { align-items: stretch }
  .nav button, .nav-exit { display: flex; justify-content: flex-start; gap: 12px; width: 100%; padding: 0 12px; color: var(--text-2) }
  .nav button.active::after { right: auto; left: -16px; border-radius: 0 3px 3px 0 }
  .sidebar .label { position: static; transform: none; opacity: 1; background: none; border: 0; box-shadow: none; padding: 0; font-size: 14px; color: inherit }
  .sidebar-bottom { align-items: stretch }
  .sidebar-bottom .avatar { display: none }
  .mobile-menu { display: grid; place-items: center; width: 44px; height: 44px }
  .topbar { height: 68px; padding: 0 16px }
  .topbar .user-chip span:last-child, .chip.muted { display: none }
  .content { padding: 8px 16px 48px }
  .page-head { flex-direction: column; align-items: stretch }
  .page-head h1 { font-size: 24px }
  .pos-layout, .section-grid { grid-template-columns: 1fr }
  .auth { grid-template-columns: 1fr }
  .auth-left { padding: 28px 20px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line) }
  .auth-logo svg { width: 128px }
  .auth-copy h1 { font-size: 28px; margin: 0 }
  .auth-copy p, .auth-left > small { display: none }
  .orbit { width: 360px; height: 360px; right: -180px; bottom: -220px }
  .table td, .table th { padding: 10px 12px }
  .topbar .theme-switch button { padding: 6px }
  .topbar .top-actions { gap: 10px }
  .kanban { grid-template-columns: repeat(5,264px) }
  .cash-check-row { grid-template-columns: 1fr 130px }
  .chart-y { width: 56px }
  input, select, textarea { min-width: 0; font-size: 16px }
  .panel, .side-panel { padding: 18px; min-width: 0 }
  .panel-head { flex-wrap: wrap; gap: 12px }
  .panel-head > span { min-width: 0 }
  .demo-banner { flex-wrap: wrap; gap: 10px; padding: 12px 14px; margin-bottom: 20px }
  .demo-banner > span { flex: 1 1 220px }
  .demo-banner .button { min-height: 44px }
  .toolbar { flex-wrap: wrap }
  .toolbar .field { flex: 1 1 150px; min-width: 0 }
  .search { max-width: none }
  .form-grid { grid-template-columns: minmax(0,1fr) }
  .field.wide { grid-column: auto }
  .dialog-content { padding: 20px }
  .dialog .form-actions { flex-direction: column-reverse; align-items: stretch }
  .dialog .form-actions > button { white-space: normal }
  .payment-row { grid-template-columns: minmax(0,1fr) 44px }
  .payment-row:not(.single) select { grid-column: 1/-1 }
  .payment-row.single { grid-template-columns: minmax(0,1fr) }
  .button.tiny, .icon-btn, .qty button { min-height: 44px }
  .icon-btn, .qty button { width: 44px; flex: none }
  .topbar .theme-switch button { min-width: 34px; min-height: 38px }
  .topbar .top-actions { gap: 6px }
  .topbar .user-chip { display: none }
  .topbar .crumb { display: none }
  .mobile-cart-jump { display: flex; position: fixed; z-index: 7; bottom: max(12px,env(safe-area-inset-bottom)); left: 16px; right: 16px; min-height: 56px; box-shadow: var(--shadow); text-decoration: none; padding: 12px }
  .mobile-cart-jump strong { margin-left: auto }
  .content:has(.mobile-cart-jump) { padding-bottom: 100px }
  #cart { scroll-margin-top: 84px }
  .cart-item { grid-template-columns: minmax(0,1fr) auto }
  .cart-item strong, .list-row strong { overflow-wrap: anywhere }
  .method-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; padding: 18px 0 }
  .method-row.method-heading { display: none }
  .method-name { grid-column: 1/-1; font-weight: 600 }
  .method-field > span, .method-enabled > span { display: block; font-size: 12px; color: var(--text-2) }
  .method-field > span { margin-bottom: 6px }
  .method-enabled { gap: 10px }
  .method-row input { min-height: 44px; padding: 10px }
  .method-enabled input { margin: 0; order: -1 }
  .method-enabled { min-height: 44px }
  .method-enabled > span { font-size: 14px }
}
@media (max-width: 600px) {
  .table, .table tbody { display: block; width: 100% }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }
  .table tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 18px; border-bottom: 1px solid var(--line) }
  .table tbody tr:last-child { border-bottom: 0 }
  .table td { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; border: 0; padding: 0; overflow-wrap: anywhere; white-space: normal }
  .table td::before { content: attr(data-label); color: var(--text-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em }
  .table td:first-child, .table td[data-label=""] { grid-column: 1/-1 }
  .table td[data-label=""] { flex-direction: row; flex-wrap: wrap }
  .table td[data-label=""]::before { display: none }
  .table .item-id strong { white-space: normal }
  .kanban { grid-template-columns: minmax(0,1fr); overflow: visible; gap: 16px }
  .kanban-column { min-height: 0 }
  .kanban-column .empty { padding: 20px 12px }
  .list-row > :first-child { min-width: 0 }
  .item-id > span { min-width: 0 }
  .balance { flex-wrap: wrap }
  .balance b { font-size: 20px }
  .total-line { gap: 10px; flex-wrap: wrap }
}
@media (max-width: 450px) {
  .crumb { display: none }
  .stats, .dash .stats { grid-template-columns: 1fr 1fr; gap: 10px }
  .stat { padding: 14px; min-height: 150px }
  .stat .symbol { width: 38px; height: 38px; border-radius: var(--r-ctrl) }
  .stat-top { flex-direction: column; align-items: flex-start; gap: 10px }
  .stat-ghost .i { width: 90px; height: 90px }
  .stat strong { font-size: 20px }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px }
  .product-tile { padding: 12px; min-height: 150px }
  .form-grid { grid-template-columns: 1fr }
  .field.wide { grid-column: auto }
  .toolbar { flex-wrap: wrap }
  .filter, .search { max-width: none; width: 100%; flex: auto }
  .duo { grid-template-columns: 1fr }
}

/* Order stage accents (DS badge colors), always paired with the stage column title */
.order-card { box-shadow: inset 3px 0 0 var(--stage, var(--info)) }
.order-card[data-order-stage=separating] { --stage: var(--warning) }
.order-card[data-order-stage=ready] { --stage: var(--violet) }
.order-card[data-order-stage=transit] { --stage: #22B1E8 }

/* Category accent tiles for product icons */
.product-tile .tile-icon[class*=accent-], .product-avatar[class*=accent-] { color: #fff; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.2) }
.accent-blue { background: var(--grad-blue) }
.accent-violet { background: var(--grad-violet) }
.accent-cyan { background: linear-gradient(150deg,#14506E,#1E8FD8) }
.accent-glass { background: var(--grad-glass) }
