feat(waiter): the look on the shared tokens; the venue's colour (platform-v2 step 4.6)

- The waiter's --bg/--text/--accent… are made of @xenia/ui tokens: light / dark (user
  menu) and the venue's accent reach every screen; the 751 colour literals in
  waiter_pwa/src became tokens (by hue family and lightness), hex-alpha suffixes became
  fade() (color-mix), fixing 'var(--accent)18' tints that never showed.
- @xenia/ui: new `special` (violet: offers, discounts, deals; contrast-tested) and
  `on-colour` tokens.
- Setting venue.theme (teal | amber | blue | violet | rose, default amber), bootstrap
  venue.theme, manager Settings → Venue → Colour; the waiter sets data-venue-theme and
  the theme before the first render.
- Guard tests/no-colours.test.mjs; tests/e2e/waiter_look.mjs (every page light + dark,
  side-by-side compare page); waiter e2e +3; backend test_venue_theme.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 09:08:39 +02:00
co-authored by Claude Opus 5.5
parent d8c3a6c57c
commit beb53c65bb
41 changed files with 798 additions and 585 deletions
+44 -44
View File
@@ -104,8 +104,8 @@ function CheckCircle({ selected }) {
return (
<div style={{
width: 24, height: 24, borderRadius: '50%', flexShrink: 0,
border: `2px solid ${selected ? '#f59e0b' : 'var(--border)'}`,
background: selected ? '#f59e0b' : 'transparent',
border: `2px solid ${selected ? 'var(--x-warning)' : 'var(--border)'}`,
background: selected ? 'var(--x-warning)' : 'transparent',
display: 'flex', alignItems: 'center', justifyContent: 'center',
transition: 'all 120ms ease',
}}>
@@ -118,12 +118,12 @@ function RadioDot({ selected }) {
return (
<div style={{
width: 22, height: 22, borderRadius: '50%', flexShrink: 0,
border: `2px solid ${selected ? '#f59e0b' : 'var(--border)'}`,
border: `2px solid ${selected ? 'var(--x-warning)' : 'var(--border)'}`,
background: 'transparent',
display: 'flex', alignItems: 'center', justifyContent: 'center',
transition: 'all 120ms ease',
}}>
{selected && <div style={{ width: 10, height: 10, borderRadius: '50%', background: '#f59e0b' }} />}
{selected && <div style={{ width: 10, height: 10, borderRadius: '50%', background: 'var(--x-warning)' }} />}
</div>
)
}
@@ -132,8 +132,8 @@ function Row({ selected, onClick, children, right, left, style = {} }) {
return (
<div onClick={onClick} style={{
padding: '12px 14px',
background: selected ? 'rgba(245,158,11,0.12)' : 'var(--bg2)',
border: `1px solid ${selected ? 'rgba(245,158,11,0.4)' : 'var(--border)'}`,
background: selected ? 'rgb(var(--x-warning-rgb) / 0.12)' : 'var(--bg2)',
border: `1px solid ${selected ? 'rgb(var(--x-warning-rgb) / 0.4)' : 'var(--border)'}`,
borderRadius: 12,
display: 'flex', alignItems: 'center', gap: 12,
cursor: onClick ? 'pointer' : 'default',
@@ -249,16 +249,16 @@ function ExtraOptionRow({ opt, extrasState, setExtrasState, expandedExtra, setEx
<div style={{ fontSize: compact ? 13 : 15, fontWeight: 500, color: 'var(--text)', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{opt.name}</div>
<div style={{ fontSize: 12, color: 'var(--muted)', marginTop: 2 }}>
{(opt.extra_cost ?? 0) !== 0 ? `+${money(opt.extra_cost)}` : t('drawer.included')}
{subLabel && <span style={{ color: '#f59e0b', fontWeight: 600 }}> · {subLabel}</span>}
{subLabel && <span style={{ color: 'var(--x-warning)', fontWeight: 600 }}> · {subLabel}</span>}
{isMultiSelect && selectedSubCount > 0 && (
<span style={{ color: '#f59e0b', fontWeight: 600 }}> · {t('drawer.selectedCount', { count: selectedSubCount })}</span>
<span style={{ color: 'var(--x-warning)', fontWeight: 600 }}> · {t('drawer.selectedCount', { count: selectedSubCount })}</span>
)}
</div>
</Row>
{/* Single-select sub-choices (radio) */}
{selected && open && hasSubs && !isMultiSelect && (
<div style={{ margin: '6px 0 2px 16px', paddingLeft: 14, borderLeft: '2px solid rgba(245,158,11,0.3)', display: 'flex', flexWrap: 'wrap', gap: 6 }}>
<div style={{ margin: '6px 0 2px 16px', paddingLeft: 14, borderLeft: '2px solid rgb(var(--x-warning-rgb) / 0.3)', display: 'flex', flexWrap: 'wrap', gap: 6 }}>
<div style={{ width: '100%', fontSize: 11, fontWeight: 700, color: 'var(--muted)', textTransform: 'uppercase', letterSpacing: 0.6, padding: '6px 2px 2px' }}>{t('drawer.choose')}</div>
{opt.sub_choices.map((sub, si) => {
const isSel = sel.subName === sub.name
@@ -281,7 +281,7 @@ function ExtraOptionRow({ opt, extrasState, setExtrasState, expandedExtra, setEx
{/* Multi-select sub-choices (checkboxes, optional qty stepper per sub) */}
{selected && open && hasSubs && isMultiSelect && (
<div style={{ margin: '6px 0 2px 16px', paddingLeft: 14, borderLeft: '2px solid rgba(245,158,11,0.3)', display: 'flex', flexWrap: 'wrap', gap: 6 }}>
<div style={{ margin: '6px 0 2px 16px', paddingLeft: 14, borderLeft: '2px solid rgb(var(--x-warning-rgb) / 0.3)', display: 'flex', flexWrap: 'wrap', gap: 6 }}>
<div style={{ width: '100%', fontSize: 11, fontWeight: 700, color: 'var(--muted)', textTransform: 'uppercase', letterSpacing: 0.6, padding: '6px 2px 2px' }}>{t('drawer.chooseMany')}</div>
{opt.sub_choices.map((sub, si) => {
const subQty = subs[sub.name] || 0
@@ -335,7 +335,7 @@ function IngredientRow({ ing, removedState, setRemovedState, compact }) {
height: 32, padding: '0 12px', borderRadius: 16,
background: removed ? 'var(--danger)' : 'var(--bg3)',
border: `1px solid ${removed ? 'var(--danger)' : 'var(--border)'}`,
color: removed ? '#fff' : 'var(--text)',
color: removed ? 'var(--x-ink)' : 'var(--text)',
fontSize: compact ? 11 : 13, fontWeight: 600,
display: 'inline-flex', alignItems: 'center',
transition: 'all 120ms ease', whiteSpace: 'nowrap',
@@ -371,8 +371,8 @@ function PrefSetBlock({ ps, prefs, setPrefs, subChoices, setSubChoices, sharedSu
return (
<div>
<div style={{ display: 'flex', alignItems: 'baseline', gap: 8, padding: '0 2px 10px' }}>
<div style={{ fontSize: 14, fontWeight: 700, color: complete ? 'var(--text)' : '#ef4444' }}>{ps.name}</div>
{!complete && <div style={{ fontSize: 11, fontWeight: 700, color: '#ef4444', textTransform: 'uppercase', letterSpacing: 0.6 }}>{t('drawer.required')}</div>}
<div style={{ fontSize: 14, fontWeight: 700, color: complete ? 'var(--text)' : 'var(--x-danger)' }}>{ps.name}</div>
{!complete && <div style={{ fontSize: 11, fontWeight: 700, color: 'var(--x-danger)', textTransform: 'uppercase', letterSpacing: 0.6 }}>{t('drawer.required')}</div>}
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 8 }}>
{ps.choices.map(ch => {
@@ -389,8 +389,8 @@ function PrefSetBlock({ ps, prefs, setPrefs, subChoices, setSubChoices, sharedSu
</Row>
{isSel && hasSubs && (
<div style={{ margin: '6px 0 2px 16px', paddingLeft: 14, borderLeft: `2px solid ${subMissing ? '#ef4444' : 'rgba(245,158,11,0.3)'}`, display: 'flex', flexWrap: 'wrap', gap: 6 }}>
{subMissing && <p style={{ width: '100%', fontSize: 12, color: '#ef4444', margin: '4px 2px 2px' }}>{t('drawer.choiceRequired')}</p>}
<div style={{ margin: '6px 0 2px 16px', paddingLeft: 14, borderLeft: `2px solid ${subMissing ? 'var(--x-danger)' : 'rgb(var(--x-warning-rgb) / 0.3)'}`, display: 'flex', flexWrap: 'wrap', gap: 6 }}>
{subMissing && <p style={{ width: '100%', fontSize: 12, color: 'var(--x-danger)', margin: '4px 2px 2px' }}>{t('drawer.choiceRequired')}</p>}
{ch.sub_choices.map((sub, si) => {
const subSel = subChoices[ch.id]?.name === sub.name
return (
@@ -410,7 +410,7 @@ function PrefSetBlock({ ps, prefs, setPrefs, subChoices, setSubChoices, sharedSu
})}
{showShared && (
<div style={{ marginTop: 4, marginLeft: 8, paddingLeft: 14, borderLeft: '2px solid rgba(245,158,11,0.3)', width: '100%' }}>
<div style={{ marginTop: 4, marginLeft: 8, paddingLeft: 14, borderLeft: '2px solid rgb(var(--x-warning-rgb) / 0.3)', width: '100%' }}>
<div style={{ fontSize: 11, fontWeight: 700, color: 'var(--muted)', textTransform: 'uppercase', letterSpacing: 0.6, padding: '4px 2px 6px' }}>{ps.shared_subset.name}</div>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 6 }}>
{ps.shared_subset.choices.map((sub, si) => {
@@ -493,12 +493,12 @@ function QuickTab({ product, quickState, setQuickState }) {
// Static group colours — cycle by index passed from parent
const GROUP_COLORS = [
{ bg: '#e0e7ff', border: '#a5b4fc', text: '#3730a3' }, // indigo
{ bg: '#fce7f3', border: '#f9a8d4', text: '#9d174d' }, // pink
{ bg: '#d1fae5', border: '#6ee7b7', text: '#065f46' }, // emerald
{ bg: '#fef3c7', border: '#fcd34d', text: '#92400e' }, // amber
{ bg: '#e0f2fe', border: '#7dd3fc', text: '#075985' }, // sky
{ bg: '#f3e8ff', border: '#d8b4fe', text: '#581c87' }, // purple
{ bg: 'var(--x-info-soft)', border: 'var(--x-info-ink)', text: 'var(--x-info)' }, // indigo
{ bg: 'var(--x-special-soft)', border: 'var(--x-special-ink)', text: 'var(--x-special)' }, // pink
{ bg: 'var(--x-success-soft)', border: 'var(--x-success)', text: 'var(--x-success-soft)' }, // emerald
{ bg: 'var(--x-warning-soft)', border: 'var(--x-warning)', text: 'var(--x-warning)' }, // amber
{ bg: 'var(--x-info-soft)', border: 'var(--x-info-ink)', text: 'var(--x-info)' }, // sky
{ bg: 'var(--x-special-soft)', border: 'var(--x-special-ink)', text: 'var(--x-special)' }, // purple
]
function PWAGroupHeader({ name, collapsed, onToggle, colorIdx = 0 }) {
@@ -788,7 +788,7 @@ function QuantityTab({ unitCfg, qty, setQty }) {
onClick={() => setQty(q => clamp(q + off))}
style={{
padding: '10px 4px', borderRadius: 12, border: 'none',
background: 'rgba(34,197,94,0.12)', color: '#4ade80',
background: 'rgb(var(--x-success-rgb) / 0.12)', color: 'var(--x-success)',
fontSize: 13, fontWeight: 700, cursor: 'pointer', textAlign: 'center',
}}
>+{fmtDecimalQty(off, unitCfg)}{unitCfg.label}</button>
@@ -799,7 +799,7 @@ function QuantityTab({ unitCfg, qty, setQty }) {
onClick={() => setQty(q => clamp(q - off))}
style={{
padding: '10px 4px', borderRadius: 12, border: 'none',
background: 'rgba(239,68,68,0.12)', color: '#fca5a5',
background: 'rgb(var(--x-danger-rgb) / 0.12)', color: 'var(--x-danger-ink)',
fontSize: 13, fontWeight: 700, cursor: 'pointer', textAlign: 'center',
}}
>−{fmtDecimalQty(off, unitCfg)}{unitCfg.label}</button>
@@ -843,7 +843,7 @@ function PriceAdjustTab({ basePrice, priceAdj, setPriceAdj }) {
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: 20 }}>
<div style={{ padding: '10px 14px', background: 'rgba(245,158,11,0.08)', border: '1px solid rgba(245,158,11,0.2)', borderRadius: 10, fontSize: 13, color: '#f59e0b' }}>
<div style={{ padding: '10px 14px', background: 'rgb(var(--x-warning-rgb) / 0.08)', border: '1px solid rgb(var(--x-warning-rgb) / 0.2)', borderRadius: 10, fontSize: 13, color: 'var(--x-warning)' }}>
{t('drawer.price.intro')}
</div>
@@ -859,14 +859,14 @@ function PriceAdjustTab({ basePrice, priceAdj, setPriceAdj }) {
onChange={e => setRawInput(e.target.value)}
onBlur={commitInput}
onKeyDown={e => { if (e.key === 'Enter') e.target.blur() }}
style={{ width: 110, height: 52, border: '2px solid #f59e0b', borderRadius: 14, background: 'var(--bg2)', textAlign: 'center', fontSize: 22, fontWeight: 800, color: '#f59e0b', outline: 'none', fontFamily: 'inherit' }}
style={{ width: 110, height: 52, border: '2px solid var(--x-warning)', borderRadius: 14, background: 'var(--bg2)', textAlign: 'center', fontSize: 22, fontWeight: 800, color: 'var(--x-warning)', outline: 'none', fontFamily: 'inherit' }}
/>
) : (
<button onClick={() => { setRawInput(effectivePrice.toFixed(2)); setEditing(true) }} style={{
minWidth: 110, height: 52, borderRadius: 14,
border: `2px solid ${priceAdj !== 0 ? '#f59e0b' : 'var(--border)'}`,
background: priceAdj !== 0 ? 'rgba(245,158,11,0.12)' : 'var(--bg2)',
color: priceAdj !== 0 ? '#f59e0b' : 'var(--text)',
border: `2px solid ${priceAdj !== 0 ? 'var(--x-warning)' : 'var(--border)'}`,
background: priceAdj !== 0 ? 'rgb(var(--x-warning-rgb) / 0.12)' : 'var(--bg2)',
color: priceAdj !== 0 ? 'var(--x-warning)' : 'var(--text)',
fontSize: 22, fontWeight: 800, cursor: 'pointer', fontFamily: 'inherit',
}}>
{money(effectivePrice)}
@@ -878,7 +878,7 @@ function PriceAdjustTab({ basePrice, priceAdj, setPriceAdj }) {
{priceAdj !== 0 && (
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 10 }}>
<span style={{ fontSize: 13, color: 'var(--muted)' }}>{t('drawer.price.base', { price: money(basePrice) })}</span>
<span style={{ fontSize: 13, fontWeight: 700, color: priceAdj > 0 ? '#4ade80' : '#f87171' }}>
<span style={{ fontSize: 13, fontWeight: 700, color: priceAdj > 0 ? 'var(--x-success)' : 'var(--x-danger)' }}>
{priceAdj > 0 ? '+' : ''}{money(priceAdj)}
</span>
<button onClick={() => setPriceAdj(0)} style={{ padding: '3px 10px', borderRadius: 8, border: '1px solid var(--border)', background: 'var(--bg3)', color: 'var(--muted)', fontSize: 12, cursor: 'pointer' }}>{t('settings.reset.title')}</button>
@@ -893,8 +893,8 @@ function PriceAdjustTab({ basePrice, priceAdj, setPriceAdj }) {
onClick={() => applyDelta(d)}
style={{
padding: '11px 4px', borderRadius: 12, border: 'none',
background: d < 0 ? 'rgba(239,68,68,0.12)' : 'rgba(34,197,94,0.12)',
color: d < 0 ? '#fca5a5' : '#4ade80',
background: d < 0 ? 'rgb(var(--x-danger-rgb) / 0.12)' : 'rgb(var(--x-success-rgb) / 0.12)',
color: d < 0 ? 'var(--x-danger-ink)' : 'var(--x-success)',
fontSize: 14, fontWeight: 700, cursor: 'pointer',
}}
>
@@ -947,7 +947,7 @@ function Section({ title, tab, lines, onJumpTab }) {
<div style={{ marginBottom: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0 2px 8px' }}>
<div style={{ fontSize: 11, fontWeight: 700, color: 'var(--muted)', textTransform: 'uppercase', letterSpacing: 0.6 }}>{title}</div>
<button onClick={() => onJumpTab(tab)} style={{ background: 'none', border: 'none', fontSize: 12, fontWeight: 700, color: '#f59e0b', cursor: 'pointer', textTransform: 'uppercase', letterSpacing: 0.6 }}>{t('common.change')}</button>
<button onClick={() => onJumpTab(tab)} style={{ background: 'none', border: 'none', fontSize: 12, fontWeight: 700, color: 'var(--x-warning)', cursor: 'pointer', textTransform: 'uppercase', letterSpacing: 0.6 }}>{t('common.change')}</button>
</div>
<div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>
{lines.map((l, i) => (
@@ -1006,9 +1006,9 @@ function SummaryTab({ _product, summaryLines, note, onJumpTab }) {
<div style={{ marginBottom: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', padding: '0 2px 8px' }}>
<div style={{ fontSize: 11, fontWeight: 700, color: 'var(--muted)', textTransform: 'uppercase', letterSpacing: 0.6 }}>{t('drawer.tabs.note')}</div>
<button onClick={() => onJumpTab('notes')} style={{ background: 'none', border: 'none', fontSize: 12, fontWeight: 700, color: '#f59e0b', cursor: 'pointer', textTransform: 'uppercase', letterSpacing: 0.6 }}>{t('common.change')}</button>
<button onClick={() => onJumpTab('notes')} style={{ background: 'none', border: 'none', fontSize: 12, fontWeight: 700, color: 'var(--x-warning)', cursor: 'pointer', textTransform: 'uppercase', letterSpacing: 0.6 }}>{t('common.change')}</button>
</div>
<div style={{ padding: '12px 14px', background: 'rgba(245,158,11,0.08)', border: '1px solid rgba(245,158,11,0.2)', borderRadius: 10, fontSize: 14, color: 'var(--text)', lineHeight: 1.4, whiteSpace: 'pre-wrap' }}>{note}</div>
<div style={{ padding: '12px 14px', background: 'rgb(var(--x-warning-rgb) / 0.08)', border: '1px solid rgb(var(--x-warning-rgb) / 0.2)', borderRadius: 10, fontSize: 14, color: 'var(--text)', lineHeight: 1.4, whiteSpace: 'pre-wrap' }}>{note}</div>
</div>
)}
</>
@@ -1027,7 +1027,7 @@ function CoursesTab({ courses, courseId, setCourseId }) {
style={{
padding: '10px 14px', borderRadius: 10, textAlign: 'left',
background: courseId === null ? 'var(--accent)' : 'var(--card)',
color: courseId === null ? '#fff' : 'var(--text)',
color: courseId === null ? 'var(--x-ink)' : 'var(--text)',
border: `2px solid ${courseId === null ? 'var(--accent)' : 'var(--line)'}`,
fontWeight: 600, fontSize: 14, cursor: 'pointer', fontFamily: 'inherit',
}}
@@ -1041,7 +1041,7 @@ function CoursesTab({ courses, courseId, setCourseId }) {
style={{
padding: '10px 14px', borderRadius: 10, textAlign: 'left',
background: courseId === c.id ? c.color : 'var(--card)',
color: courseId === c.id ? '#fff' : 'var(--text)',
color: courseId === c.id ? 'var(--x-ink)' : 'var(--text)',
border: `2px solid ${courseId === c.id ? c.color : 'var(--line)'}`,
fontWeight: 600, fontSize: 14, cursor: 'pointer', fontFamily: 'inherit',
display: 'flex', alignItems: 'center', gap: 10,
@@ -1049,7 +1049,7 @@ function CoursesTab({ courses, courseId, setCourseId }) {
>
<span style={{
width: 12, height: 12, borderRadius: '50%',
background: courseId === c.id ? 'rgba(255,255,255,0.5)' : c.color,
background: courseId === c.id ? 'rgb(var(--x-ink-rgb) / 0.5)' : c.color,
flexShrink: 0,
}} />
{c.name}
@@ -1398,7 +1398,7 @@ export default function OrderDrawer({ product, isOpen, onClose, onAdd, initialSt
{/* Backdrop */}
<div onClick={onClose} style={{
position: 'fixed', inset: 0,
background: 'rgba(0,0,0,0.6)',
background: 'rgb(var(--x-scrim-rgb) / 0.6)',
opacity: isOpen ? 1 : 0,
pointerEvents: isOpen ? 'auto' : 'none',
transition: 'opacity 260ms ease',
@@ -1416,7 +1416,7 @@ export default function OrderDrawer({ product, isOpen, onClose, onAdd, initialSt
zIndex: 41,
display: 'flex', flexDirection: 'column',
overflow: 'hidden',
boxShadow: '0 -4px 20px rgba(0,0,0,0.4)',
boxShadow: '0 -4px 20px rgb(var(--x-scrim-rgb) / 0.4)',
}}>
{/* Grab handle */}
<div style={{ padding: '10px 0 4px', display: 'flex', justifyContent: 'center', flexShrink: 0 }}>
@@ -1431,7 +1431,7 @@ export default function OrderDrawer({ product, isOpen, onClose, onAdd, initialSt
)}
<div style={{ flex: 1, minWidth: 0 }}>
<div style={{ fontSize: 18, fontWeight: 700, color: 'var(--text)', lineHeight: 1.2 }}>{product.name}</div>
<div style={{ fontSize: 13, color: priceAdj !== 0 ? '#f59e0b' : 'var(--muted)', marginTop: 2 }}>
<div style={{ fontSize: 13, color: priceAdj !== 0 ? 'var(--x-warning)' : 'var(--muted)', marginTop: 2 }}>
{priceAdj !== 0
? <><span style={{ textDecoration: 'line-through', opacity: 0.5 }}>{money(product.base_price)}</span> → {money(product.base_price + priceAdj)}</>
: <>{money(product.base_price)}</>
@@ -1450,12 +1450,12 @@ export default function OrderDrawer({ product, isOpen, onClose, onAdd, initialSt
const active = activeTab === tb.id
const badge = badgeFor(tb.id)
const isAlert = (tb.id === 'prefs' && prefsTabAlert) || (tb.id === 'favorites' && favTabAlert)
const tabColor = isAlert ? '#f87171' : active ? '#f59e0b' : 'var(--muted)'
const tabColor = isAlert ? 'var(--x-danger)' : active ? 'var(--x-warning)' : 'var(--muted)'
return (
<button key={tb.id} ref={el => { tabButtonRefs.current[tb.id] = el }} onClick={() => setActiveTab(tb.id)} style={{
padding: '12px 6px',
background: 'none', border: 'none',
borderBottom: `2px solid ${active ? '#f59e0b' : isAlert ? '#f87171' : 'transparent'}`,
borderBottom: `2px solid ${active ? 'var(--x-warning)' : isAlert ? 'var(--x-danger)' : 'transparent'}`,
color: tabColor,
fontSize: 13, fontWeight: (active || isAlert) ? 700 : 500,
fontFamily: 'inherit', cursor: 'pointer',
@@ -1510,7 +1510,7 @@ export default function OrderDrawer({ product, isOpen, onClose, onAdd, initialSt
</div>
{/* Footer: qty stepper + ADD */}
<div style={{ padding: '12px 16px 20px', background: 'var(--bg2)', borderTop: '1px solid var(--border)', display: 'flex', alignItems: 'center', gap: 12, flexShrink: 0, boxShadow: '0 -4px 16px rgba(0,0,0,0.3)' }}>
<div style={{ padding: '12px 16px 20px', background: 'var(--bg2)', borderTop: '1px solid var(--border)', display: 'flex', alignItems: 'center', gap: 12, flexShrink: 0, boxShadow: '0 -4px 16px rgb(var(--x-scrim-rgb) / 0.3)' }}>
{isDecimal ? (
<div
onClick={() => setActiveTab('quantity')}