:root { --green: #14532d; --green-fg: #fff; --bg: #f6f7f4; --card: #fff; --fg: #1c1f1a; --muted: #5d625a; --line: #dcdfd6; --warn: #b45309; --bad: #b91c1c; --ok: #15803d; }
@media (prefers-color-scheme: dark) { :root { --green: #4ade80; --green-fg: #052e16; --bg: #131512; --card: #1b1e19; --fg: #ecefe8; --muted: #a0a69a; --line: #2f342b; --warn: #fbbf24; --bad: #f87171; --ok: #4ade80; } }
* { box-sizing: border-box; }
body { margin: 0; font: 18px/1.4 system-ui, sans-serif; background: var(--bg); color: var(--fg); }
h1 { font-size: 1.6rem; margin: 0 0 1rem; } h2 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
main { max-width: 640px; margin: 0 auto; padding: 0 1rem 7.5rem; }
header { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); }
.status { font-weight: 600; } .status.ok { color: var(--ok); } .status.wait { color: var(--warn); } .status.bad { color: var(--bad); }
button { font: inherit; min-height: 44px; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--green); background: var(--green); color: var(--green-fg); cursor: pointer; }
button.secondary { background: transparent; color: var(--fg); border-color: var(--line); }
button.small { min-height: 36px; padding: .25rem .7rem; font-size: .9rem; }
button.big { min-height: 52px; font-size: 1.1rem; width: 100%; }
button:disabled { opacity: .5; }
input, select { font: inherit; min-height: 44px; width: 100%; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; }
label { display: block; margin-bottom: .8rem; font-weight: 600; } label input { margin-top: .25rem; font-weight: 400; } label small { display: block; font-weight: 400; color: var(--muted); }
.login { max-width: 420px; margin: 0 auto; padding: 3rem 1rem; }
.error { color: var(--bad); min-height: 1.4em; } .muted { color: var(--muted); font-size: .9rem; }
.banner { margin: .6rem 1rem; padding: .6rem .8rem; border: 1px solid var(--warn); border-radius: 10px; }
.cards { display: grid; gap: .6rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .8rem; display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.card .name { font-weight: 700; } .card .meta { color: var(--muted); font-size: .9rem; }
.card.low .meta .qty { color: var(--bad); font-weight: 700; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.stepper { display: flex; align-items: center; gap: .5rem; } .stepper button { width: 48px; padding: 0; font-size: 1.4rem; } .stepper output { min-width: 2ch; text-align: center; font-size: 1.3rem; font-weight: 700; }
.checkout { position: fixed; left: 0; right: 0; bottom: 64px; background: var(--card); border-top: 1px solid var(--line); padding: .6rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; z-index: 4; }
.checkout strong { font-size: 1.4rem; display: block; } .checkout .row { display: flex; gap: .5rem; } .checkout button { white-space: nowrap; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tabs button { padding: .5rem .2rem; font-size: .95rem; border: 0; border-radius: 0; background: transparent; color: var(--muted); min-height: 64px; font-weight: 600; }
.tabs button.active { color: var(--green); box-shadow: inset 0 3px 0 var(--green); }
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; } .titlebar h2 { margin: 1.25rem 0 .5rem; }
.weeknav { display: flex; align-items: center; justify-content: space-between; margin: 1rem 0; } .weeknav strong { text-align: center; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .8rem; } .stat span { color: var(--muted); font-size: .85rem; display: block; } .stat b { font-size: 1.3rem; }
.stat.main { grid-column: 1 / -1; border-color: var(--green); } .stat.main b { font-size: 1.8rem; color: var(--ok); } .stat b.neg { color: var(--bad); }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: .5rem .3rem; border-bottom: 1px solid var(--line); } .num { text-align: right; font-variant-numeric: tabular-nums; }
.list { list-style: none; padding: 0; margin: 0; } .list li { padding: .6rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.tag { font-size: .75rem; color: var(--warn); font-weight: 700; } .void { text-decoration: line-through; color: var(--muted); }
dialog { width: min(92vw, 440px); border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--fg); padding: 1.2rem; }
dialog::backdrop { background: rgba(0, 0, 0, .5); } dialog h3 { margin: 0 0 1rem; } dialog .row { display: flex; gap: .5rem; } dialog .row button { flex: 1; }
input[type=search] { margin-bottom: .6rem; }
.dayhead { margin: 1.2rem 0 .2rem; } .dayhead strong { text-transform: capitalize; }
.badge { font-size: .75rem; padding: .1rem .5rem; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); margin-left: .3rem; white-space: nowrap; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0 .6rem; } .choices button { min-height: 60px; }
dialog .list { margin-bottom: .6rem; } dialog .total { font-size: 1.5rem; font-weight: 700; margin: .4rem 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 150px; background: var(--fg); color: var(--bg); padding: .6rem 1rem; border-radius: 99px; z-index: 20; font-weight: 600; max-width: 90vw; }
