/* Лента сборки KUMU. Крупно — читается с телефона и с экрана на складе. Тема — по настройке системы. */
:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --text: #1b1f1c;
  --muted: #5b635d;
  --line: #d9ddd6;
  --accent: #1f6b45;
  --accent-text: #ffffff;
  --fail: #a61b1b;     --fail-bg: #fbe3e1;
  --warn: #7a5200;     --warn-bg: #fbefcf;
  --ym: #7a5200;       --ym-bg: #fde9a8;
  --ozon: #0b4fa8;     --ozon-bg: #dce8fb;
  --site: #1d6b3f;     --site-bg: #e2f2e7;
  --other: #4a514c;    --other-bg: #e6e8e4;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141714;
    --surface: #1d211e;
    --text: #e8ebe6;
    --muted: #a3aba4;
    --line: #353b36;
    --accent: #6fcf97;
    --accent-text: #0e1a12;
    --fail: #ff9a92;   --fail-bg: #431a18;
    --warn: #f2c761;   --warn-bg: #3d2f0c;
    --ym: #f2c761;     --ym-bg: #3d2f0c;
    --ozon: #93c1f5;   --ozon-bg: #152c47;
    --site: #7fd9a2;   --site-bg: #17321f;
    --other: #c9cfca;  --other-bg: #2c312d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 12px 16px 32px;
  max-inline-size: 960px;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1 { margin: 0; font-size: 1.4rem; line-height: 1.2; }
p { margin: 0 0 8px; }
a { color: var(--accent); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
.muted, .empty { color: var(--muted); }
.muted { font-size: 0.85rem; }

.narrow { max-inline-size: 420px; margin: 12vh auto 0; }

.top { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; margin-block-end: 12px; }
.top h1 { grid-column: 1; }
.top .logout { grid-column: 2; grid-row: 1; }
.top .summary, .top .muted { grid-column: 1 / -1; margin: 0; }
.summary { font-size: 1.15rem; font-weight: 600; }

.login { display: grid; gap: 8px; margin-block-start: 16px; }
.login input {
  font: inherit; font-size: 1.6rem; letter-spacing: 0.3em; text-align: center;
  padding: 10px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text);
}
.login input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

button, .button {
  font: inherit; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  min-block-size: 48px; padding: 8px 18px;
  border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-text);
  text-decoration: none; cursor: pointer;
}
button.link { background: none; color: var(--accent); min-block-size: 40px; padding: 4px 8px; font-weight: 500; text-decoration: underline; }
button:focus-visible, .button:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

.error { padding: 10px 12px; border-radius: 8px; background: var(--fail-bg); color: var(--fail); }
.warn  { padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); }

.order {
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 6px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-block-end: 12px;
}
.order.u-overdue-card { border-inline-start-color: var(--fail); }
.order.u-today-card { border-inline-start-color: var(--warn); }
.order header { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.num { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.deadline { margin-inline-start: auto; }
.u-overdue { color: var(--fail); }
.u-today { color: var(--warn); }
.u-tomorrow { color: var(--muted); }

.ch { font-size: 0.85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.ch-ym { background: var(--ym-bg); color: var(--ym); }
.ch-ozon { background: var(--ozon-bg); color: var(--ozon); }
.ch-site { background: var(--site-bg); color: var(--site); }
.ch-opt, .ch-other { background: var(--other-bg); color: var(--other); }

.items { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.item img, .noimg { inline-size: 64px; block-size: 64px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.item img[width="40"], .noimg.small { inline-size: 40px; block-size: 40px; }
.noimg { display: block; background: var(--other-bg); }
.iname { overflow-wrap: anywhere; }
.art { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.qty { font-size: 1.35rem; font-weight: 700; white-space: nowrap; }
.service { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }

.order footer { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-block-start: 10px; }

details { margin-block: 12px; }
summary { cursor: pointer; font-weight: 600; padding: 8px 0; min-block-size: 44px; }
.pick { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 12px; }
.done .order { opacity: 0.85; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .deadline { margin-inline-start: 0; flex-basis: 100%; }
  .item img, .noimg { inline-size: 52px; block-size: 52px; }
}
