:root {
  color-scheme: light;
  -webkit-tap-highlight-color: transparent;
  --ink: #222222;
  --paper: #F6F1E6;
  --accent: #C67652;
  --sage: #9AB6A6;
  /* Tones for surfaces, controls and status labels. */
  --surface: color-mix(in srgb, var(--paper) 28%, white);
  --muted: color-mix(in srgb, var(--ink) 76%, var(--paper));
  --subtle: color-mix(in srgb, var(--ink) 66%, var(--paper));
  --rail: color-mix(in srgb, var(--paper) 88%, var(--sage));
  --line: color-mix(in srgb, var(--sage) 47%, var(--paper));
  --field-border: color-mix(in srgb, var(--sage) 69%, var(--ink));
  --sage-tint: color-mix(in srgb, var(--sage) 28%, var(--paper));
  --on-accent: var(--ink);
  --accent-hover: color-mix(in srgb, var(--accent) 88%, var(--paper));
  --accent-ink: color-mix(in srgb, var(--accent) 52%, var(--ink));
  --accent-tint: color-mix(in srgb, var(--accent) 18%, var(--paper));
  --green: color-mix(in srgb, var(--sage) 37%, var(--ink));
  --red: color-mix(in srgb, var(--accent) 48%, var(--ink));
  --red-light: color-mix(in srgb, var(--accent) 24%, var(--paper));
  --surface-muted: color-mix(in srgb, var(--paper) 60%, var(--surface));
  --section-size: 1.24rem;
  --meta-size: .83rem;
  --radius: 4px;
  --button-radius: 12px;
  --panel-gutter: 21px;
  --sidebar-width: 228px;
  --mobile-nav-height: 66px;
  font-family: "Atkinson Hyperlegible Next", Avenir, system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select { font: inherit; }
button { cursor: pointer; border-radius: var(--button-radius); }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus { outline: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent-tint); color: var(--ink); }
svg { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.skip { position: fixed; top: 8px; left: 8px; padding: 12px; background: var(--surface); z-index: 10; transform: translateY(-150%); }
.skip:focus { transform: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--rail); color: var(--ink); display: flex; flex-direction: column; padding: 37px 20px 23px; }
.brand { display: inline-flex; align-items: center; gap: 11px; margin: 0 7px 29px; width: fit-content; }
.brand-wordmark { color: var(--ink); font: inherit; font-size: 2.05rem; font-weight: 790; line-height: 1; letter-spacing: -.042em; }
.brand-mark { flex: none; display: grid; place-items: center; width: 49px; height: 49px; border-radius: 0; background: transparent; }
.brand-mark img { width: 41px; height: 41px; display: block; object-fit: contain; }
.auth-brand { margin: 0; }
.auth-brand .brand-mark { width: 40px; height: 40px; border-radius: 0; }
.auth-brand .brand-mark img { width: 34px; height: 34px; }
.auth-brand .brand-wordmark { font-size: 28px; }
#navigation { display: grid; gap: 5px; }
.sidebar-link { min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 8px 13px; color: var(--muted); font-weight: 600; font-size: .9rem; border: 0; border-radius: var(--radius); background: transparent; width: 100%; text-align: left; white-space: nowrap; }
.sidebar-link:hover { background: var(--accent-tint); color: var(--ink); }
.sidebar-link[aria-current="page"] { color: var(--ink); background: var(--sage-tint); font-weight: 730; }
.sidebar-link svg { width: 18px; height: 18px; color: var(--ink); }

.sidebar-bottom { display: grid; gap: 4px; margin-top: auto; border-top: 1px solid var(--line); padding-top: 13px; }
.sidebar-guide { color: var(--muted); }
.shell { margin-left: var(--sidebar-width); min-height: 100vh; background: var(--paper); }
.topbar { min-height: 67px; background: var(--surface); padding: 12px clamp(20px, 3.4vw, 54px); display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.topbar p { margin: 0; font-weight: 700; font-size: .88rem; }
.top-end { display: flex; gap: 16px; align-items: center; font-size: .85rem; color: var(--muted); }
.top-end time:first-letter { text-transform: capitalize; }
.demo { color: var(--muted); padding: 4px 0; white-space: nowrap; font-size: .75rem; font-weight: 750; }
main { max-width: 1510px; margin: auto; padding: 38px clamp(20px, 3.4vw, 54px) 60px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 3.1vw, 2.95rem); font-weight: 810; line-height: 1.06; letter-spacing: -.04em; }
h2 { font-size: var(--section-size); font-weight: 700; line-height: 1.16; letter-spacing: -.018em; }
h3 { font-size: 1rem; font-weight: 660; line-height: 1.25; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 27px; }
.page-heading p { max-width: 62ch; margin-top: 8px; color: var(--muted); line-height: 1.5; }
.header-actions, .inline-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--button-radius); padding: 9px 15px; font-weight: 710; font-size: .94rem; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary:disabled { background: var(--rail); color: var(--muted); opacity: .8; }
.btn.secondary { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 650; }
.btn.secondary:hover, .btn.small:hover { background: var(--paper); }
.btn.small { min-height: 33px; font-size: .81rem; padding: 5px 9px; color: var(--accent-ink); background: transparent; }
.btn.danger { color: var(--red); border-color: var(--line); background: var(--surface); }
.btn.danger:hover { background: var(--red-light); }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--button-radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.icon-button:hover { background: var(--accent-tint); color: var(--accent-ink); }
.shift { background: var(--surface); border-block: 1px solid var(--line); display: grid; padding: 22px var(--panel-gutter); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.section-heading .secondary-text { margin-top: 4px; }
.shift-list { margin: 17px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shift-list div { display: flex; flex-direction: column; min-width: 0; padding: 3px 16px; border-left: 1px solid var(--line); }
.shift-list div:first-child { border: 0; padding-left: 0; }
.shift-list dt { flex: 1; color: var(--muted); font-size: .88rem; font-weight: 580; }
.shift-list dd { margin: 4px 0 0; font-size: clamp(1.25rem, 2.1vw, 2.05rem); font-weight: 680; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.shift-list .metric-lead dd { color: var(--green); font-weight: 790; }
.panel { background: var(--surface); border-block: 1px solid var(--line); min-width: 0; }
.panel-header { padding: 17px var(--panel-gutter); border-bottom: 1px solid var(--line); }
.panel-body { padding: 19px var(--panel-gutter); }
.stack > * + * { margin-top: 16px; }
.table-wrap { position: relative; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th { background: var(--surface-muted); color: var(--muted); font-size: var(--meta-size); font-weight: 665; text-align: left; white-space: nowrap; }
th, td { padding: 12px 14px; }
th:first-child, td:first-child { padding-left: var(--panel-gutter); }
th:last-child, td:last-child { padding-right: var(--panel-gutter); }
tbody tr { border-top: 1px solid var(--line); }
tbody tr:hover { background: var(--rail); }
td strong { font-weight: 690; }
td.num strong { font-weight: 725; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-primary { min-width: 155px; }
.cell-meta, .secondary-text { display: block; color: var(--muted); font-size: var(--meta-size); line-height: 1.45; }
.cell-meta { margin-top: 2px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.tag::before { content: ""; width: 5px; height: 5px; flex: none; border-radius: 50%; background: currentColor; }
.tag.available { color: var(--green); }
.tag.available::before { background: var(--field-border); }
.tag.sold { background: transparent; color: var(--muted); }
.tag.returned { color: var(--muted); }
.tag.voided { background: transparent; color: var(--red); }
.actions-cell { text-align: right; white-space: nowrap; }
.record-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px var(--panel-gutter); border-top: 1px solid var(--line); }
.empty { min-height: 116px; display: grid; align-content: center; justify-items: start; gap: 6px; color: var(--muted); padding: 21px var(--panel-gutter); line-height: 1.5; }
.empty strong { color: var(--ink); }
.panel-body > .empty { padding: 0; }
.search-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-header.search-tools { background: var(--surface-muted); }
input, select { min-height: 43px; border: 1px solid var(--field-border); border-radius: var(--radius); padding: 8px 11px; background: var(--surface); color: var(--ink); width: 100%; min-width: 0; }
input::placeholder { color: var(--subtle); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
input::file-selector-button {
  margin-inline-end: 8px;
  padding: 3px 8px;
  border: 1px solid var(--field-border);
  border-radius: var(--button-radius);
  background: var(--sage-tint);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
input::file-selector-button:hover { background: var(--sage); }
label { display: grid; gap: 6px; font-weight: 685; font-size: .89rem; }
label .secondary-text { font-weight: 520; }
.input-search { min-width: 215px; width: min(100%, 275px); }
.filter { width: auto; }
select { appearance: none; padding-right: 31px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23222222' stroke-width='1.6'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-position: right 8px center; background-size: 17px; background-repeat: no-repeat; }
.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(255px, .75fr); align-items: start; gap: 20px; }
.scan-form { display: flex; align-items: end; gap: 8px; }
.scan-form label { flex: 1; }
.results { display: grid; gap: 5px; margin-top: 11px; }
.result { display: flex; justify-content: space-between; align-items: center; gap: 9px; text-align: left; border: 1px solid var(--line); border-radius: var(--button-radius); padding: 8px 10px; background: var(--paper); color: var(--ink); }
.result:hover { background: var(--accent-tint); }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); padding: 10px 0; font-size: .9rem; }
.cart-line:first-child { padding-top: 0; }
.pay-total { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 17px 0 15px; font-weight: 750; }
.pay-total strong { font-size: 1.75rem; letter-spacing: -.06em; }
.pay-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border: 0; margin: 0; padding: 0; }
.pay-options legend { font-size: .85rem; font-weight: 700; margin-bottom: 6px; }
.pay-options label { display: block; text-align: center; border: 1px solid var(--line); padding: 8px 4px; border-radius: var(--button-radius); cursor: pointer; }
.pay-options label:has(:checked) { border-color: var(--field-border); background: var(--sage-tint); color: var(--ink); font-weight: 730; }
.pay-options input, .visually-hidden { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.full { width: 100%; }
.form-error { color: var(--red); font-size: .875rem; font-weight: 650; line-height: 1.5; }
.form-error:empty { display: none; }
dialog {
  --dialog-width: 1120px;
  --dialog-gutter: clamp(24px, 3vw, 36px);
  --dialog-body-padding: 24px;
  width: min(var(--dialog-width), calc(100% - 32px));
  max-height: min(96vh, 1024px);
  max-height: min(96dvh, 1024px);
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block-start: 84px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 85px color-mix(in srgb, var(--ink) 16%, transparent);
}
dialog[data-kind="person-record"] {
  --dialog-width: 1280px;
  min-height: min(660px, 82vh);
  min-height: min(660px, 82dvh);
}
dialog[data-kind="platform-assistant-removal"] { --dialog-width: 760px; }
dialog:has(> .dialog-body > .label-preview) { --dialog-width: 880px; }
dialog::backdrop { background: color-mix(in srgb, var(--ink) 40%, transparent); }
.dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px var(--dialog-gutter);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.dialog-header h2 { min-width: 0; font-size: clamp(1.22rem, 2.3vw, 1.52rem); overflow-wrap: anywhere; }
.dialog-header > button { flex: none; }
.dialog-body { padding: var(--dialog-body-padding) var(--dialog-gutter); }
dialog[data-kind="person-record"] > .dialog-body { overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
fieldset { min-inline-size: 0; }
.item-fields { margin: 0; padding: 10px 0 15px; border: 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.item-fields + .item-fields { margin-top: 9px; }
.item-fields legend { color: var(--muted); font-weight: 700; font-size: .82rem; padding: 0; }
.field-row { display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 9px; align-items: end; }
.new-customer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.new-customer legend { font-size: .82rem; color: var(--muted); }
.notification { display: none; position: fixed; z-index: 4; bottom: 20px; right: 20px; width: max-content; max-width: calc(100vw - 40px); padding: 11px 16px; background: var(--ink); color: var(--surface); border-radius: var(--radius); box-shadow: 0 5px 20px color-mix(in srgb, var(--ink) 10%, transparent); }
.notification.visible { display: block; }
#print-area { display: none; }
.label-preview { display: grid; justify-items: center; padding-block: 4px 12px; }
.label-paper {
  width: 62mm;
  max-width: 100%;
  min-height: 33mm;
  padding: 3mm;
  border: 1px solid #aaa;
  background: white;
  color: black;
  break-inside: avoid;
}
.label-paper p { margin: 0 0 2mm; font-size: 10pt; overflow-wrap: anywhere; }
.barcode { display: flex; align-items: stretch; justify-content: center; height: 10mm; margin: 1mm 0; }
.barcode span { display: block; flex-shrink: 0; }
.barcode .bar { background: black; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.label-paper .barcode-caption { text-align: center; font-size: 9pt; font-family: monospace; }
.load-message { color: var(--muted); }
@media print {
  @page { margin: 8mm; }
  :root, body { background: white; color: black; }
  body > :not(#print-area) { display: none !important; }
  #print-area { display: block; }
  .labels { display: flex; gap: 3mm; flex-wrap: wrap; }
  .receipt { max-width: 90mm; }
  .receipt p { margin: 2mm 0; }
  .receipt table td, .receipt table th { padding: 1.5mm 1mm; }
  .receipt table th { background: white; color: black; }
}
.movement-totals { margin-bottom: 20px; min-height: 123px; }
ul { padding-left: 19px; line-height: 1.6; }
.tag.expired, .tag.charity { color: var(--muted); }
.tag.donated { color: var(--muted); }
#navigation { overflow-y: auto; min-height: 0; }
#account-menu { min-height: 34px; padding-block: 5px; }
.auth-required .sidebar, .auth-required .topbar { display: none; }
.auth-required .shell { margin: 0; }
.auth-required main { min-height: 100vh; display: grid; place-items: center; }
.auth-card { width: min(100%, 455px); border: 1px solid var(--line); border-radius: var(--radius); }
.auth-card .panel-header { background: var(--sage-tint); }
.auth-card .panel-body { padding: clamp(18px, 5vw, 36px); }
.auth-card h1 { font-size: clamp(1.85rem, 4vw, 2.4rem); }
.auth-recovery-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--accent-ink); font-size: .9rem; font-weight: 650; text-decoration: underline; text-underline-offset: .18em; }
.auth-recovery-link:focus-visible { text-decoration-thickness: .14em; }
.module-setting { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); }
.module-settings-list { margin: 10px 0 18px; }
.module-status { font-weight: 700; }
.module-setting .form-error { margin-top: 4px; }
.wallet-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.wallet-fields label:first-child { grid-column: 1 / -1; }
.pay-options.four-options { grid-template-columns: repeat(4, 1fr); }
.wallet-payment { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-inline: 0; }
.checkbox-confirm { display: flex; gap: 8px; align-items: center; }
.checkbox-confirm input { width: 1.15rem; height: 1.15rem; min-height: 0; flex: none; }
