:root { color-scheme: light dark; --bg: #fff; --fg: #1d2330; --muted: #5b6475; --accent: #2d6cdf; --line: #d9dee8; --warn: #c0392b; --warn-bg: #fdecea; }
@media (prefers-color-scheme: dark) { :root { --bg: #11151c; --fg: #e8ecf3; --muted: #9aa3b5; --line: #2a3140; --warn-bg: #3a2020; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, sans-serif; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.site-header { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.home-link { display: flex; align-items: center; min-height: 44px; padding: 0 16px; color: inherit; font-weight: 700; text-decoration: none; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; text-decoration: none; margin: 8px 0; }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.small { min-height: 44px; padding: 0 12px; font-size: 14px; }
.btn.add-btn { width: 100%; font-size: 18px; }
label { display: block; margin: 12px 0 4px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; font: inherit; }
form { display: flex; flex-direction: column; }
table { width: 100%; border-collapse: collapse; } th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: start; }
img, table { max-width: 100%; }
tr.low { background: var(--warn-bg); }
.reorder { border: 1px solid var(--warn); border-radius: 8px; padding: 8px 12px; margin: 12px 0; }
.reorder h2 { color: var(--warn); margin-top: 4px; }
.reorder-list { margin: 0; padding-inline-start: 20px; }
.flash { background: var(--warn-bg); border-radius: 8px; padding: 10px 12px; }
.product-name { font-size: 20px; font-weight: 700; }
@media (max-width: 420px) {
  table, thead, tbody, tr { display: block; width: 100%; }
  thead { display: none; }
  tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; padding: 4px; }
  td { display: flex; justify-content: space-between; border-bottom: 0; padding: 6px 8px; }
  td::before { content: attr(data-label); font-weight: 600; color: var(--muted); }
}
