/* Copied from the POS (hospitality/pos/public/pos.css): same tokens, same bar,
   same feel. Stock gets counted on a tablet in a cellar with one hand full, so
   the same rules hold: big targets, high contrast, dark under bad lighting. */

:root {
  --bg: #14171a;
  --panel: #1d2226;
  --panel-2: #252b31;
  --line: #333b42;
  --ink: #f2f5f7;
  --muted: #98a4ae;
  --accent: #3da35d;
  --accent-ink: #0d1a11;
  --warn: #d9822b;
  --bad: #c8553d;
  --tap: 56px;
  --radius: 10px;
  font-size: 17px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

/* --- top bar --- */
.bar {
  display: flex; align-items: center; gap: 1rem;
  padding: .5rem .8rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.bar nav { display: flex; gap: .3rem; margin-left: auto; }
.bar nav a {
  color: var(--muted); text-decoration: none;
  padding: .5rem .8rem; border-radius: var(--radius);
}
.bar nav a:hover, .bar nav a:focus-visible { background: var(--panel-2); color: var(--ink); }
.who { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }
.who span { color: var(--muted); font-size: .85rem; }
.who button {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .4rem .7rem;
}

main { padding: 1rem; }
.muted { color: var(--muted); }
.empty { padding: 3rem 1rem; text-align: center; }
.error {
  background: rgba(200, 85, 61, .15); border: 1px solid var(--bad);
  color: #ffb3a3; padding: .6rem .8rem; border-radius: var(--radius);
}
.warn {
  background: rgba(217, 130, 43, .12); border: 1px solid var(--warn);
  color: #f0c08a; padding: .7rem .9rem; border-radius: var(--radius);
}

a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: .5rem; top: .5rem; background: var(--panel); padding: .5rem; z-index: 10; }
.ok {
  background: rgba(61, 163, 93, .12); border: 1px solid var(--accent);
  color: #a9e2bb; padding: .6rem .8rem; border-radius: var(--radius);
}
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: #ff9f8a; }
.pos-v { color: #8fd6a5; }

/* --- trial banner --- */
.trial {
  display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; justify-content: center;
  padding: .45rem .8rem; background: #1a2b20; border-bottom: 1px solid var(--line);
  color: #cfe9d7; font-size: .85rem;
}
.trial a { color: #fff; }
.site { color: var(--muted); font-size: .85rem; display: flex; gap: .5rem; align-items: center; }

/* --- "Full version" --- */
.full {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .7rem; border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); background: transparent; font-size: .85rem; cursor: not-allowed;
}
.full b {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--warn); border: 1px solid var(--warn); border-radius: 4px; padding: .05rem .3rem;
}
.fullnote { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin: .8rem 0; color: var(--muted); font-size: .9rem; }

/* --- page scaffolding --- */
.page { max-width: 1040px; margin: 0 auto; }
.page.narrow { max-width: 640px; }
.page h1 { font-size: 1.5rem; margin: .2rem 0 .3rem; letter-spacing: -.01em; }
.page h2 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; }
.lede { color: var(--muted); margin: 0 0 1rem; max-width: 60ch; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }

.heads { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; margin: 1rem 0; }
.heads > * { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; display: grid; gap: .2rem; color: var(--ink); text-decoration: none; }
.heads span { color: var(--muted); font-size: .8rem; }
.heads strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
a.heads-link:hover { border-color: var(--accent); }

table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; color: var(--muted); font-weight: 400; font-size: .8rem; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
.list th.num { text-align: right; }
.list td { padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr.low td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.list .area td { color: var(--accent); font-weight: 700; padding-top: 1.1rem; border-bottom-color: var(--accent); }
.tag { font-size: .75rem; padding: .1rem .4rem; border-radius: 4px; border: 1px solid var(--warn); color: #f0c08a; white-space: nowrap; }
.muted-sm { color: var(--muted); font-size: .8rem; }

/* --- forms --- */
.btn, button.primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .6rem 1.1rem;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: var(--radius); font-weight: 700; text-decoration: none;
}
.btn.ghost, button.ghost { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); font-weight: 400; }
button.danger { background: transparent; color: #ffb3a3; border: 1px solid var(--bad); min-height: 44px; padding: .5rem 1rem; border-radius: var(--radius); }
.form { display: grid; gap: .9rem; }
.form.two { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: grid; gap: .3rem; }
.field label, .field .l { color: var(--muted); font-size: .85rem; }
.field small { color: var(--muted); font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input:not([type]), input[inputmode], select, textarea {
  width: 100%; padding: .7rem .8rem; min-height: 48px;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.check { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink); }
.check input { width: 22px; height: 22px; margin-top: .1rem; accent-color: var(--accent); flex: none; }
.err { color: #ffb3a3; font-size: .85rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }

/* --- count sheet: thumb-sized inputs, one line per item --- */
.sheet .qty { width: 7.5rem; min-height: 52px; font-size: 1.25rem; text-align: right; font-variant-numeric: tabular-nums; }
.sheet td { padding-top: .4rem; padding-bottom: .4rem; }
.sheet .bad .qty { border-color: var(--bad); }
.sheetbar {
  position: sticky; bottom: 0; background: var(--bg); padding: .8rem 0;
  border-top: 1px solid var(--line); display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap;
}

/* --- landing / signup --- */
.hero { max-width: 720px; margin: 7vh auto 2rem; }
.hero h1 { font-size: 2.3rem; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 1rem; }
.hero p { color: #c9d2d9; font-size: 1.1rem; max-width: 56ch; margin: .4rem 0; }
.hero .row { margin-top: 1.6rem; }
.prose { max-width: 70ch; }
.prose p, .prose li { color: #c9d2d9; }

@media (max-width: 700px) {
  main { padding: .7rem; }
  .bar { flex-wrap: wrap; }
  .bar nav { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .bar nav a { white-space: nowrap; padding: .5rem .6rem; }
  .hide-sm { display: none; }
  .hero h1 { font-size: 1.7rem; }
  .sheet .qty { width: 5.5rem; }
}

@media print {
  .bar, .trial, .sheetbar, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .list td, .list th { border-color: #ccc; color: #000; }
}
.w-auto { width: auto; max-width: 320px; }
.gap-b { margin-bottom: .8rem; }
