:root {
  font-family: system-ui, -apple-system, sans-serif;
  color: #f5f3ff;
  background: #121023;
  color-scheme: dark;
  --surface: #1d1a2d;
  --border: #3b3553;
  --muted: #c1bbd7;
  --accent: #7258ee;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.topbar {
  min-height: 4.5rem;
  padding: 1rem clamp(1rem, 5vw, 4rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { color: inherit; font-size: 1.125rem; font-weight: 800; text-decoration: none; }
.brand span { color: #b1a0ff; font-weight: 650; margin-inline-start: .35rem; }
main { max-width: 75rem; margin: auto; padding: 2rem clamp(1rem, 4vw, 3rem); }
h1, h2 { margin: 0 0 1rem; line-height: 1.2; }
h1 { font-size: clamp(1.65rem, 4vw, 2.3rem); }
h2 { font-size: 1.3rem; }
.panel { padding: 1.25rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface); }
.signin { margin: 3rem auto 0; max-width: 27rem; }
.signin form { display: grid; gap: .85rem; }
label { font-weight: 650; }
input, button { font: inherit; }
input, button {
  min-height: 2.8rem;
  padding: .6rem .95rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  color: inherit;
  background: #151224;
}
button { background: var(--accent); border-color: transparent; font-weight: 700; cursor: pointer; }
button:hover:not(:disabled) { filter: brightness(1.13); }
button:disabled { cursor: default; opacity: .6; }
button.secondary { background: #27233b; border-color: var(--border); }
:focus-visible { outline: 2px solid #9ee7ff; outline-offset: 3px; }
.workbench { display: grid; grid-template-columns: minmax(0, 3fr) minmax(17rem, 2fr); gap: 1.25rem; align-items: start; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; }
.product {
  display: grid;
  gap: .65rem;
  text-align: start;
  min-height: 5.5rem;
  background: var(--surface);
  border-color: var(--border);
}
.product span { color: #b1a0ff; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.basket ul, .receipts { list-style: none; padding: 0; margin: 0; }
.basket li, .receipts > li { padding: .7rem 0; border-bottom: 1px solid var(--border); }
.basket li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
.line-details { display: grid; gap: .25rem; }
.quantity { display: flex; align-items: center; gap: .45rem; }
.quantity button { min-width: 2.6rem; padding: .25rem; }
.total { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 1rem 0; }
.total strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
#checkout { width: 100%; }
.receipt-panel { margin-top: 1.25rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.section-heading h2 { margin: 0; }
.receipts summary { cursor: pointer; overflow-wrap: anywhere; }
.receipts details ul { margin: .5rem 0; padding-inline-start: 1.5rem; }
.status { overflow-wrap: anywhere; min-height: 1.5em; }
.status[data-error] { color: #ffc1cc; }

@media (max-width: 720px) { .workbench { grid-template-columns: 1fr; } }
