/* Цех 59 — приложение сотрудников. Крупные кнопки под палец (≥48 px).
   Цвета — фирменные AviraKids (логотип на plasticshariki.ru): бирюзовый #17AEC1 и малиновый #E51A4B.
   Для текста и кнопок — более глубокие оттенки тех же цветов, чтобы читалось (контраст ≥ 4,5). */
:root {
  --bg: #F2F6F7;
  --card: #FFFFFF;
  --ink: #17201C;
  --muted: #4F5B55;
  --line: #E0E8EA;
  --field: #C6D5D8;
  --brand: #17AEC1;        /* фирменный бирюзовый — полоски, выбор, значок */
  --brand2: #E51A4B;       /* фирменный малиновый */
  --brand2-ink: #C8153F;   /* малиновый для текста и карточек с белым текстом */
  --accent: #0B7F8C;       /* кнопки (белый текст: контраст 4,7) */
  --accent-text: #0A7380;  /* бирюзовый текст на светлом фоне (5,1) */
  --accent-ink: #075F69;
  --accent-soft: #DDF3F6;
  --accent-line: #8FD5DE;
  --warn: #8A4B00;
  --warn-soft: #FBF0DE;
  --bad: #C8153F;
  --bad-soft: #FDE4EA;
  --shadow: 0 1px 2px rgba(23, 32, 28, 0.08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { border-top: 4px solid var(--brand); }
body {
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  font-size: 16px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
main {
  max-width: 520px; margin: 0 auto; min-height: 100vh;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 16px;
}
.screen.center { align-items: center; justify-content: center; text-align: center; gap: 12px; }
h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 700; text-wrap: balance; }
h2 { margin: 0; font-size: 17px; font-weight: 650; }
p { margin: 0; }
.loading { color: var(--muted); text-align: center; margin-top: 40vh; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand2-ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px;
        display: flex; flex-direction: column; gap: 10px; }
.section { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.pill.on { background: var(--accent-soft); color: var(--accent-ink); }
.pill.off { background: #E7EBE9; color: var(--muted); }
.kv { display: flex; flex-direction: column; gap: 1px; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-size: 15px; font-weight: 600; }

/* кнопки */
button, .btn {
  font: inherit; cursor: pointer; border-radius: 14px; min-height: 52px; padding: 0 18px;
  border: 1.5px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 17px;
}
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent-line); outline-offset: 2px;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--accent-text); border-color: var(--accent-line); }
.btn.dashed { background: transparent; color: var(--accent-text); border: 1.5px dashed var(--brand); }
.btn.danger { background: transparent; color: var(--bad); border-color: #F0B3C2; }
.btn.small { min-height: 40px; font-size: 14px; padding: 0 12px; border-radius: 10px; }
.btn.block { width: 100%; }
.menu-btn { justify-content: flex-start; min-height: 68px; text-align: left; padding: 12px 18px; }
.menu-btn .t { display: block; font-size: 19px; }
.menu-btn .s { display: block; font-size: 13px; font-weight: 400; opacity: .85; }
.menu-btn.secondary .s { color: var(--muted); opacity: 1; }
.back { background: none; border: none; color: var(--accent-text); min-height: 44px; padding: 0; justify-content: flex-start;
        font-size: 15px; font-weight: 500; }

/* выбор (чипы и сегменты) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--field); background: var(--card);
        color: var(--ink); font-weight: 500; font-size: 16px; }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.seg { display: flex; gap: 6px; background: #E3E8E5; padding: 4px; border-radius: 14px; }
.seg button { flex: 1; min-height: 46px; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 500; }
/* 4 вкладки на узком телефоне («Премии»: Все / Операторы / Склад / Цех) — не обрезать (Алексей, 13.11.2026) */
.seg button { min-width: 0; padding: 0 4px; white-space: nowrap; }
.seg:has(> button:nth-child(4)) { gap: 2px; }
.seg:has(> button:nth-child(4)) button { font-size: 14px; }
.seg:has(> button:nth-child(4)) button[aria-pressed="true"] { flex: 0 0 auto; padding: 0 12px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(23,32,28,.12); }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); flex: none; display: inline-block; }

/* поля */
label.lbl { font-size: 15px; font-weight: 600; }
input, select, textarea {
  font: inherit; width: 100%; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--field);
  background: var(--card); color: var(--ink); padding: 0 14px; font-size: 18px;
}
/* галочки не растягивать как поля ввода (на iPhone были огромные квадраты, 16.11.2026) */
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0; flex: none; }
textarea { min-height: 96px; padding: 12px 14px; font-size: 16px; resize: vertical; }
input.big { min-height: 64px; font-size: 28px; font-weight: 700; }
.hint { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--accent-soft);
        border-radius: 12px; padding: 8px 10px 8px 14px; font-size: 14px; color: var(--accent-ink); }
.note { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.error { background: var(--bad-soft); color: var(--bad); border-radius: 12px; padding: 10px 14px; font-size: 15px; }

/* списки */
.list { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 2px 14px; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: none; }
.li .grow { flex: 1; min-width: 0; }
.li .sub { font-size: 13px; color: var(--muted); }
.li .num { font-weight: 700; white-space: nowrap; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { min-height: 44px; width: 44px; padding: 0; border-radius: 10px; background: #E7EBE9; color: var(--ink); font-size: 22px; }
.stepper .n { min-width: 36px; text-align: center; font-weight: 700; font-size: 18px; }

.total { display: flex; justify-content: space-between; align-items: center; background: var(--accent-soft);
         border-radius: 14px; padding: 14px 16px; color: var(--accent-ink); }
.total .v { font-size: 24px; font-weight: 700; }
.hero { background: var(--brand2-ink); color: #fff; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.hero .v { font-size: 36px; font-weight: 700; line-height: 1.1; }
.summary { white-space: pre-line; font-size: 15px; line-height: 1.5; }
.footer { margin-top: auto; text-align: center; font-size: 12px; color: var(--muted); }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(24px, env(safe-area-inset-bottom));
         background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px;
         max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 10; }
@media (prefers-reduced-motion: no-preference) { button, .btn { transition: background-color .15s, border-color .15s; } }
input::placeholder, textarea::placeholder { color: #9AA5A0; font-weight: 400; }

/* премия за месяц на главной (Алексей, 10.11.2026) */
.premium { width: 100%; display: grid; gap: 2px; text-align: left; justify-items: start; justify-content: start; padding: 14px 18px; min-height: 0;
  background: var(--brand2-ink); color: #fff; border: none; border-radius: 18px; }
.premium .pl { font-size: 14px; font-weight: 500; opacity: .9; }
.premium .pv { font-size: 34px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.premium .ps { font-size: 13px; font-weight: 400; opacity: .9; }

/* экраны руководителя (10.11.2026) */
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.shiftnow { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.okline { color: var(--accent-text); }
.badline { color: var(--bad); font-weight: 600; }
.badtxt { color: var(--bad); }
.warntxt { color: var(--warn); }
.kpi { gap: 2px; }
.kpi strong { font-size: 20px; }
.att { display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 9px 0 9px 12px; border: none;
  border-left: 4px solid var(--line); background: none; font: inherit; color: var(--ink); width: 100%; min-height: 0;
  border-radius: 0; justify-content: flex-start; align-items: flex-start; cursor: default; }
button.att { cursor: pointer; }
.att.red { border-left-color: var(--bad); }
.att.amber { border-left-color: #E08A00; }
.att .at { font-size: 14px; font-weight: 600; }
.att .as { font-size: 13px; color: var(--muted); font-weight: 400; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { display: grid; gap: 2px; justify-items: start; justify-content: start; text-align: left; min-height: 92px;
  padding: 14px; border-radius: 16px; border: none; font: inherit; }
.tile .tl { font-size: 13px; font-weight: 500; }
.tile .tv { font-size: 20px; font-weight: 700; }
.tile .ts { font-size: 12px; font-weight: 400; }
.tile.crimson { background: var(--brand2-ink); color: #fff; }
.tile.teal { background: var(--accent); color: #fff; }
.tile.plain { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.tile.plain .tl, .tile.plain .ts { color: var(--muted); }
.flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.flag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: #E7EBE9; color: var(--muted); }
.flag.red { background: var(--bad-soft); color: var(--bad); }
.flag.amber { background: var(--warn-soft); color: var(--warn); }
.rowbtn { width: 100%; background: none; border: none; border-bottom: 1px solid var(--line); border-radius: 0; font: inherit;
  color: var(--ink); text-align: left; min-height: 0; justify-content: flex-start; padding: 12px 0; font-weight: 400; }
.li.col { flex-direction: column; align-items: stretch; gap: 6px; }

/* заготовки разделов других должностей (11.11.2026) */
.plan { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.list.flat { box-shadow: none; padding: 0; }

/* приглашение: крупное предупреждение (10.11.2026) */
.warnbig { background: #FDE7EC; color: var(--brand2-ink, #C8153F); border: 2px solid #E51A4B; border-radius: 12px;
  padding: 12px 14px; font-size: 17px; font-weight: 800; line-height: 1.3; }

/* сторож партии WB (11.11.2026): на компьютере склада — шире, крупные номера */
body.wide main { max-width: 980px; }
.pill.ok { background: #E1F3E8; color: #1D7A45; }
.supply { display: grid; gap: 8px; }
.supply.hasbad { box-shadow: 0 0 0 2px var(--bad), var(--shadow); }
.meter { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #E7EBE9; }
.meter i { display: block; height: 100%; }
.m-ok { background: #1D9A55; } .m-wait { background: var(--brand); } .m-bad { background: var(--bad); }
.counts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; font-variant-numeric: tabular-nums; }
.probs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.prob { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start;
  background: var(--bad-soft); border-radius: 12px; padding: 12px 14px; }
.pnum { font: 800 34px/1 ui-monospace, Consolas, monospace; color: var(--bad); letter-spacing: .02em; }
.pwhat { font-weight: 800; color: var(--bad); font-size: 16px; }
.pbody { display: grid; gap: 3px; min-width: 0; }

/* «Нет зелёного» (11.11.2026) */
.missing { border-top: 1px dashed var(--accent-line, #BFE3E8); padding-top: 8px; display: grid; gap: 6px; }
.missing summary { cursor: pointer; }
.mgrid { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mgroup { flex-basis: 100%; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.mchip { font: 700 17px/1 ui-monospace, Consolas, monospace; padding: 6px 9px; border-radius: 8px;
  background: #E7EBE9; color: var(--ink, #18282B); font-variant-numeric: tabular-nums; }
.mchip.wait { background: var(--warn-soft); color: var(--warn); }
/* кто собирал страницу (17.11.2026) */
.who { justify-self: start; max-width: 100%; background: #fff; border: 1.5px solid var(--bad); border-radius: 10px;
  padding: 5px 10px; font-weight: 700; font-size: 15px; margin-top: 4px; }
.who.none { border-color: #B9C3C0; color: var(--muted); font-weight: 600; }
.seg2 { display: inline-flex; border: 1.5px solid var(--brand); border-radius: 10px; overflow: hidden; margin: 0 6px 0 10px; vertical-align: middle; }
.seg2 button { all: unset; cursor: pointer; padding: 4px 12px; font-size: 14px; font-weight: 700; color: var(--brand); }
.seg2 button.on { background: var(--brand); color: #fff; }
.pg { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-top: 6px; font-size: 14.5px; }
.pg b { font-size: 15.5px; } .pg .nm { font-weight: 800; } .pg .t { color: var(--muted); font-size: 13px; }
.pg.nos .nm { color: var(--muted); font-weight: 600; }

/* текст приглашения — виден сразу, выделяется (11.11.2026) */
.invmsg { width: 100%; font: 14px/1.4 inherit; padding: 10px 12px; border: 1.5px solid var(--brand); border-radius: 12px;
  background: var(--card); color: inherit; resize: vertical; }

/* полный номер стикера (11.11.2026): первая часть мельче, последние цифры крупно */
.mchip small, .pnum small { font-size: .72em; font-weight: 600; opacity: .8; }
.pnum { display: grid; justify-items: start; }
.pnum span { display: grid; line-height: 1.05; }
.mchip span { display: inline; }

/* «Установить на телефон» (11.11.2026) */
.card.install { border: 2px solid var(--brand); display: grid; gap: 8px; }
.card.install p { margin: 0; }
.isteps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.card.install.ok { border-color: #1D9A55; }

/* «Снять партию WB» (12.11.2026) */
.pickc { cursor: pointer; align-items: center; }
.pickc input[type=checkbox] { width: 22px; height: 22px; min-height: 0; flex: none; accent-color: var(--bad); }
.pickc.off strong { text-decoration: line-through; color: var(--muted); }
.card .row input.big { max-width: 180px; }
.section > * { min-width: 0; }  /* сетка не растягивается шире экрана из-за длинных строк */
@media (max-width: 520px) {
  .pickc { flex-wrap: wrap; }
  .pickc .num { margin-left: 34px; white-space: normal; }
}

/* снабжение (12.11.2026) */
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.sup-in { min-height: 44px; padding: 8px 10px; font: inherit; border: 1.5px solid var(--field); border-radius: 10px; background: #fff; width: 130px; max-width: 100%; }
select.sup-in { width: auto; }
.supopen { background: #F7FAFB; border-radius: 12px; padding: 0 10px 12px; margin: 4px -10px; }
.supf { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.row.end { align-items: flex-end; }
.suppill { margin-top: 6px; white-space: normal; }
/* швейный цех (12.11.2026) */
.sewline { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.chip.sewop.done { background: #E1F3E8; color: #1D7A45; border-color: #bfe3cc; }
.chip.sewop.on { border-color: var(--accent); background: var(--accent-soft); }
.supf { min-width: 0; max-width: 100%; }
.supf select.sup-in { width: 100%; max-width: 100%; }
.att .aw { font-size: 12px; color: var(--muted); font-weight: 600; }
.att.solved { border-left-color: #9FD3B4; opacity: .8; }
.linkbtn { background: none; border: none; padding: 4px 0; color: var(--accent-text); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; margin-right: 14px; }
.attmini { width: 100%; padding-top: 6px; padding-bottom: 6px; }
.attmini .at { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
.attnow { gap: 6px; }
.btn.attmore { border: 1.5px solid var(--accent); color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; margin-top: 4px; }
/* заказы МП по неделям (12.11.2026) */
.kpibtn { text-align: left; border: none; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; width: 100%; background: var(--card); }
.bignum { font-size: 28px; }
.oktxt { color: #1D7A45; font-weight: 700; }
.badtxt { font-weight: 700; }
.wchart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.wday { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.wbars { display: flex; align-items: flex-end; gap: 2px; height: 145px; }
.wbar { width: 14px; border-radius: 4px 4px 0 0; }
.wbar.prev { background: #CCD6D9; }
.wbar.cur { background: var(--accent); }
.wbar.cur.low { background: var(--bad); }
.wbar.empty { width: 14px; }
.wval { font-size: 11px; font-weight: 700; color: var(--ink); min-height: 15px; }
.wlab { font-size: 12px; color: var(--muted); padding: 4px 0; }
.wday.today .wlab { color: var(--ink); font-weight: 800; }
.wlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.wlegend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.sw.cur { background: var(--accent); } .sw.prev { background: #CCD6D9; } .sw.low { background: var(--bad); }
.mpparts { display: flex; flex-direction: column; width: 100%; font-size: 13px; margin: 2px 0; }
.mprow { display: flex; justify-content: space-between; gap: 8px; max-width: 140px; }
.nowrap { white-space: nowrap; }
.sewfiles { display: flex; gap: 8px; flex-wrap: wrap; }
.sewfiles img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.sewfiles .pdf { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--accent-text); }
.ychart .wbar.ymb { width: 9px; }
.ychart { gap: 3px; height: 175px; }
.ychart .wbars { height: 135px; }
.ychart .wval { font-size: 10px; }
.ychart .wlab { font-size: 10px; }

/* станция сборки (13.11.2026) */
.asm-in { width: 100%; font-size: 22px; padding: 16px; border: 3px dashed var(--accent-line, #8FD5DE); border-radius: 14px; }
.asm-who { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; background: #DDF3F6;
           border-radius: 14px; padding: 12px 16px; font-size: 20px; }
.asm-mine { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 18px; }
.asm-mine .small { font-size: 14px; }
.asm-who.idle { background: #FBF0DE; color: #8A4B00; font-weight: 700; justify-content: center; }
.asm-note { border-radius: 12px; padding: 12px 14px; font-size: 17px; background: #fff; }
.asm-note.ok { background: #E3F4EA; } .asm-note.warn { background: #FBF0DE; } .asm-note.bad { background: #FCE4E8; color: #8a0f2c; }
.asm-close .ord, .ords .ord { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
           border-bottom: 1px solid var(--line, #E0E8EA); padding: 8px 0; font-size: 16px; }
.ord.canc { color: #8a0f2c; text-decoration: line-through; }
.pill { display: inline-block; border: 1px solid var(--line, #E0E8EA); border-radius: 10px; padding: 3px 8px; margin: 3px; font-size: 14px; }
.li.off { opacity: .55; }
.warnbox { background: #FBF0DE; }

/* «Деньги» на главной (13.11.2026) */
.moneycard { display: flex; flex-direction: column; align-items: stretch; gap: 2px; text-align: left; width: 100%; border: 0; cursor: pointer;
             background: linear-gradient(135deg, var(--accent), var(--brand)); color: #fff; }
.moneycard strong { font-size: 30px; line-height: 1.1; } .moneycard .small { color: #e8fbfd; }
.moneycard.empty strong { font-size: 20px; }
.nowrap { white-space: nowrap; }
.wbar.mi, .sw.mi { background: #1D9A5A; } .wbar.mo, .sw.mo { background: #C8153F; }
.moneycard > * { text-align: left; }
.li.money-u { flex-direction: column; align-items: stretch; gap: 6px; }
.li.money-u select { width: 100%; }
.devs summary { cursor: pointer; color: var(--accent-text, #0A7380); font-weight: 600; padding: 4px 0; list-style: none; }
.devs summary::-webkit-details-marker { display: none; }
/* премия сотрудника по дням (13.11.2026) */
.pday { font-weight: 800; font-size: 14px; color: #2a3a40; margin-top: 8px; }
.ptag { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-right: 6px; }
.ptag.t1 { background: #DDF3F6; color: #0A7380; } .ptag.t2 { background: #E3F4EA; color: #1D7A45; } .ptag.t3 { background: #F3E8FB; color: #6B2C91; }
.pchip { display: inline-flex; flex-direction: column; background: #fff; border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.pchip b { font-size: 16px; }

/* старший комплектовщик (16.11.2026) */
.sprog { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #EEF2F3; margin: 6px 0; }
.sprog i { display: block; } .sprog .p1 { background: #1D7A45; } .sprog .p2 { background: #E2A100; }
.spages { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.spg { width: 34px; height: 30px; border-radius: 7px; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.spg.done { background: #E3F4EA; color: #1D7A45; } .spg.work { background: #FFF1CC; color: #8A5A00; }
.spg.none { background: #EEF2F3; color: #7a878c; } .spg.x { background: #FDE7EC; color: #C8153F; }
.kpi.kwarn { border-left: 5px solid #E2A100; } .kpi.kbad { border-left: 5px solid #C8153F; }
.pill.warn { background: #FFF1CC; color: #8A5A00; }
.bigmoney { font-size: 26px; font-weight: 800; color: #1D7A45; }
.slegend { display: flex; flex-wrap: wrap; gap: 12px; } .slegend span { display: inline-flex; align-items: center; gap: 5px; }
.slegend .spg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
/* бейджи у руководителя: галочка + имя, кнопки — второй строкой (16.11.2026) */
.li.bdg { flex-direction: column; align-items: stretch; gap: 8px; }
.bdgtop { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.bdgtop input[type=checkbox] { width: 22px; height: 22px; min-height: 0; flex: none; margin: 0; padding: 0; }
.bdgbtns { display: flex; gap: 8px; padding-left: 34px; }
.bdgbtns .btn { flex: 1; }
/* старший: плашка «пора заказывать сырьё» (17.11.2026) */
.rawalert { display: block; width: 100%; text-align: left; border: 2px solid #E8A33D; background: #FFF6E5; cursor: pointer; font: inherit; color: inherit; }
.rawalert.bad { border-color: #D64545; background: #FDECEC; }
.rawalert .sub { margin-top: 4px; }

/* станция: оба скана в конце (17.11.2026) */
.asm-quick { margin-top: 8px; border: 2px solid #E8A33D; line-height: 1.45; }


/* ===================== Оформление: тёмная тема и цвет акцента (19.11.2026) =====================
   Сигнальные цвета (ошибка / внимание / готово) и малиновая «Премия» от акцента НЕ зависят. Печатные листы — свои страницы,
   тема на них не действует. */
:root[data-accent="blue"]   { --brand: #3B82F6; --accent: #1D4ED8; --accent-text: #1D4ED8; --accent-ink: #1E3A8A; --accent-soft: #DBEAFE; --accent-line: #93C5FD; }
:root[data-accent="green"]  { --brand: #10B981; --accent: #047857; --accent-text: #047857; --accent-ink: #065F46; --accent-soft: #D1FAE5; --accent-line: #6EE7B7; }
:root[data-accent="orange"] { --brand: #F97316; --accent: #C2410C; --accent-text: #C2410C; --accent-ink: #9A3412; --accent-soft: #FFEDD5; --accent-line: #FDBA74; }
:root[data-accent="purple"] { --brand: #8B5CF6; --accent: #6D28D9; --accent-text: #6D28D9; --accent-ink: #5B21B6; --accent-soft: #EDE9FE; --accent-line: #C4B5FD; }

:root[data-theme="dark"] {
  --bg: #0F1417; --card: #182024; --ink: #E7EEF0; --muted: #A3B1B6; --line: #2A353A; --field: #3A4A52;
  --warn: #F2B661; --warn-soft: #3A2C14; --bad: #FF6B86; --bad-soft: #3A1720;
  --accent-text: #5FD3E2; --accent-ink: #8FE3EE; --accent-soft: #0B3A41; --accent-line: #1E6E78;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
:root[data-theme="dark"][data-accent="blue"]   { --accent-text: #8DB6FF; --accent-ink: #B4CEFF; --accent-soft: #14284A; --accent-line: #2E5AA8; }
:root[data-theme="dark"][data-accent="green"]  { --accent-text: #5FE0B2; --accent-ink: #8EEBC9; --accent-soft: #0D3A2C; --accent-line: #1B7A58; }
:root[data-theme="dark"][data-accent="orange"] { --accent-text: #FFB07A; --accent-ink: #FFCBA4; --accent-soft: #43260F; --accent-line: #A9531A; }
:root[data-theme="dark"][data-accent="purple"] { --accent-text: #C4A9FF; --accent-ink: #DCCBFF; --accent-soft: #2A1F4A; --accent-line: #5B43A8; }

[data-theme="dark"] .pill.off, [data-theme="dark"] .stepper button, [data-theme="dark"] .flag, [data-theme="dark"] .meter,
[data-theme="dark"] .sprog { background: #26323A; }
[data-theme="dark"] .seg { background: #11181B; }
[data-theme="dark"] .seg button[aria-pressed="true"] { background: #2A353A; }
[data-theme="dark"] .btn.danger { border-color: #5A2733; }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #6F7E84; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea, [data-theme="dark"] .sup-in { background: #11181B; color: var(--ink); }
[data-theme="dark"] #toast { color: #0F1417; }
[data-theme="dark"] .warnbig { background: #3A1720; color: #FF9DB0; }
[data-theme="dark"] .pill.ok, [data-theme="dark"] .chip.sewop.done, [data-theme="dark"] .spg.done, [data-theme="dark"] .ptag.t2,
[data-theme="dark"] .asm-note.ok { background: #12301F; color: #6FD49A; }
[data-theme="dark"] .chip.sewop.done { border-color: #24553A; }
[data-theme="dark"] .oktxt { color: #6FD49A; }
[data-theme="dark"] .who { background: var(--card); }
[data-theme="dark"] .who.none { border-color: #4A5A60; }
[data-theme="dark"] .supopen { background: #141B1E; }
[data-theme="dark"] .wbar.prev, [data-theme="dark"] .sw.prev { background: #3A474D; }
[data-theme="dark"] .asm-who, [data-theme="dark"] .ptag.t1 { background: var(--accent-soft); color: var(--accent-text); }
[data-theme="dark"] .asm-who.idle, [data-theme="dark"] .asm-note.warn, [data-theme="dark"] .warnbox, [data-theme="dark"] .spg.work { background: #3A2C14; color: #F2B661; }
[data-theme="dark"] .asm-note { background: var(--card); }
[data-theme="dark"] .asm-note.bad { background: #3A1720; color: #FF9DB0; }
[data-theme="dark"] .ord.canc { color: #FF9DB0; }
[data-theme="dark"] .pday { color: #C9D6DA; }
[data-theme="dark"] .ptag.t3 { background: #2E2142; color: #D3B5F0; }
[data-theme="dark"] .pchip { background: #11181B; }

.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gear { flex: none; width: 46px; height: 46px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid var(--line);
        background: var(--card); font-size: 22px; box-shadow: var(--shadow); cursor: pointer; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); color: var(--ink); width: 100%; max-width: 560px; border-radius: 22px 22px 0 0;
         padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); }
.sheet h2 { margin: 0 0 14px; }
.dots { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
.dot { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; border: 0; cursor: pointer; }
.dot.on { outline: 3px solid var(--ink); outline-offset: 3px; }
