:root {
  --ink: #1B2430;
  --ground: #F4F2EC;
  --card: #FFFFFF;
  --line: #D9D4C8;
  --soft: #ECE9E1;
  --muted: #5A6270;
  --accent: #E07A1F;
  --accent-ink: #1B2430;
  --warn: #A3470F;
  --warn-bg: #FFF4E8;
  --bad: #B3261E;
  --bad-bg: #FCEBEA;
  --ok: #2E7D4F;
  --ok-bg: #E8F4EC;
  --info: #2F6FB0;
  --info-bg: #E8F0F9;
  --role: #E07A1F;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 36, 48, .06), 0 4px 14px rgba(27, 36, 48, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 16px/1.4 "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--ink); }
img { max-width: 100%; }
h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 19px; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
h2 .ic { color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 640px; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ic.lg { width: 28px; height: 28px; }
.ic.xl { width: 40px; height: 40px; }

/* шапка */
.top { background: var(--ink); color: #F4F2EC; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.top::after { content: ""; display: block; height: 3px; background: var(--role); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 8px; padding-bottom: 8px; }
.top a { color: #F4F2EC; text-decoration: none; }
.brand { font-weight: 700; font-size: 19px; display: flex; align-items: center; gap: 8px; margin-right: auto; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--role); color: #fff; display: grid; place-items: center; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { padding: 8px 11px; border-radius: 10px; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.nav a .ic { width: 18px; height: 18px; opacity: .85; }
.nav a.on, .nav a:hover { background: #2C3846; }
.nav a.on { box-shadow: inset 0 -2px 0 var(--role); }
.who { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.who .role { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--role); color: #fff; font-weight: 600; }
.who a.out { opacity: .8; display: inline-flex; padding: 6px; border-radius: 8px; }
.who a.out:hover { background: #2C3846; opacity: 1; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; text-align: center; line-height: 20px; }
.demo-strip { background: #FFF1D6; color: #6B4A12; font-size: 13px; text-align: center; padding: 6px 12px; }
.demo-strip a { color: #6B4A12; font-weight: 700; }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; background: var(--role); }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }

/* элементы */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > section { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.btn, button {
  font: inherit; font-weight: 600; border-radius: 12px; min-height: 46px; padding: 10px 16px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: transform .05s ease, box-shadow .15s ease;
}
.btn:active, button:active { transform: translateY(1px); }
.btn.dark, button.dark { background: var(--ink); color: #F4F2EC; border-color: var(--ink); }
.btn.accent, button.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.role, button.role { background: var(--role); color: #fff; border-color: var(--role); }
.btn.ok, button.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.bad, button.bad { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.big, button.big { min-height: 60px; font-size: 18px; width: 100%; }
.btn.sm, button.sm { min-height: 40px; padding: 6px 12px; font-size: 15px; }
.btn.ghost, button.ghost { background: transparent; border-color: transparent; }
.btn.danger, button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: default; }
form.inline { display: inline; }

/* огромные кнопки для оператора и упаковщика */
.bigbtn { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-size: 20px; font-weight: 700; width: 100%; min-height: 84px; text-align: left; }
.bigbtn .ic { width: 36px; height: 36px; color: var(--role); }
.bigbtn small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.bigbtn.role { background: var(--role); color: #fff; border-color: var(--role); }
.bigbtn.role .ic, .bigbtn.role small { color: #fff; }

input, select, textarea {
  font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); min-height: 46px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--role) 35%, transparent); border-color: var(--role); }
textarea { min-height: 80px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
label.f > input, label.f > select, label.f > textarea { color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
input[type=checkbox] { width: 26px; height: 26px; min-height: 0; accent-color: var(--ink); flex: none; }

.search { display: flex; gap: 8px; }
.search input { font-size: 18px; min-height: 56px; border-radius: 14px; }
.search button { min-height: 56px; border-radius: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; text-decoration: none; color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.flash { background: var(--ink); color: #F4F2EC; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--soft); white-space: nowrap; }
.pill.new { background: var(--accent); color: var(--accent-ink); }
.pill.picking { background: #D9E3F0; }
.pill.ready, .pill.ok { background: var(--ok); color: #fff; }
.pill.issued, .pill.cancelled, .pill.taken, .pill.packed { background: var(--soft); color: var(--muted); }
.pill.qc { background: #FFE2B8; color: #7A4A06; }
.pill.rework { background: #FFE2B8; color: #7A4A06; }
.pill.scrap, .pill.bad { background: var(--bad); color: #fff; }
.pill.info { background: var(--info-bg); color: var(--info); }
.warn { color: var(--warn); font-weight: 600; }
.bad { color: var(--bad); font-weight: 600; }
.okc { color: var(--ok); font-weight: 600; }
.banner { border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.banner.accent { background: var(--accent); color: var(--accent-ink); }
.banner.ok { background: var(--ok); color: #fff; }
.banner.warn { background: var(--warn-bg); border: 1px solid #E6B98F; }
.banner.bad { background: var(--bad-bg); border: 1px solid #EBB3AF; }
.banner.info { background: var(--info-bg); border: 1px solid #B8CFE8; }
.banner.role { background: var(--role); color: #fff; }

/* приветствие на главной роли */
.hero { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, var(--role), color-mix(in srgb, var(--role) 70%, #000)); color: #fff; box-shadow: var(--shadow); }
.hero h1 { color: #fff; font-size: 22px; margin: 0; }
.hero p { margin: 2px 0 0; opacity: .9; font-size: 14px; }
.hero .avatar { background: rgba(255,255,255,.22); }

/* плитки и списки */
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { border-color: #BDB6A6; }
.ph { background: linear-gradient(180deg, #F7F5F0, var(--soft)); border-radius: 10px; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: contain; }
.ph.photo img { object-fit: cover; }
.tile b { font-size: 15px; line-height: 1.25; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.item:hover { border-color: #BDB6A6; }
.item .grow { display: flex; flex-direction: column; gap: 2px; }
.item.dim { background: var(--soft); }
.item.alert { border-left: 5px solid var(--bad); }
.item.warnl { border-left: 5px solid var(--accent); }
.thumb { width: 64px; height: 48px; flex: none; border-radius: 8px; background: linear-gradient(180deg, #F7F5F0, var(--soft)); overflow: hidden; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.lg { width: 96px; height: 72px; }
.where { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.where .ic { width: 16px; height: 16px; color: var(--role); }
.qty-ctl { display: flex; align-items: center; gap: 6px; }
.qty-ctl button { width: 46px; padding: 0; font-size: 20px; background: var(--soft); border: none; }
.qty-ctl input { width: 64px; text-align: center; }
.qty-big { display: flex; align-items: center; gap: 8px; }
.qty-big button { width: 64px; height: 64px; font-size: 28px; padding: 0; background: var(--soft); border: none; border-radius: 16px; }
.qty-big input { width: 110px; height: 64px; font-size: 30px; font-weight: 700; text-align: center; border-radius: 16px; }

table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--soft); vertical-align: top; font-size: 15px; }
th { background: var(--soft); font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* заявки на складе */
.reqcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.reqcard.new { border: 2px solid var(--accent); }
.reqcard .lines { border-top: 1px solid var(--soft); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.reqcard .line { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.reqcard .line form { display: flex; align-items: center; gap: 8px; }
.colhead { display: flex; align-items: center; gap: 8px; padding: 4px 2px; }
.colhead h2 { margin: 0; }

.steps { display: flex; flex-direction: column; gap: 6px; }
.steps div { display: flex; gap: 10px; align-items: center; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #B8B2A4; flex: none; }
.dot.done { background: var(--ink); border-color: var(--ink); }
.dot.now { background: var(--ok); border-color: #CDE6D6; border-width: 3px; }

/* сводка мастера */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.kpi .v { font-size: 30px; font-weight: 700; line-height: 1.1; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi.bad .v { color: var(--bad); }
.kpi.warn .v { color: var(--warn); }
.kpi.ok .v { color: var(--ok); }
.kpi .ic { color: var(--role); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 14px; }
.bar .track { background: var(--soft); border-radius: 999px; height: 14px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; background: var(--role); }
.bar b { text-align: right; }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 90px; padding-top: 6px; }
.spark div { flex: 1; background: color-mix(in srgb, var(--role) 75%, #fff); border-radius: 6px 6px 2px 2px; position: relative; min-height: 3px; }
.spark span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.spark i { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; font-style: normal; font-weight: 700; }

/* партии и маршрут */
.progress { height: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; display: flex; }
.progress .g { background: var(--ok); }
.progress .q { background: #F2B85B; }
.progress .r { background: var(--bad); }
.route { display: flex; gap: 0; overflow-x: auto; padding: 4px 2px 8px; }
.route .st { flex: 1 0 120px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; position: relative; font-size: 13px; padding: 0 4px; }
.route .st::before { content: ""; position: absolute; top: 17px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.route .st:first-child::before { display: none; }
.route .st.done::before, .route .st.now::before { background: var(--ok); }
.route .n { width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 3px solid var(--line); display: grid; place-items: center; font-weight: 700; z-index: 1; }
.route .done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.route .now .n { border-color: var(--ok); color: var(--ok); box-shadow: 0 0 0 5px var(--ok-bg); }
.route .st b { font-size: 14px; }
.boxcard { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.boxcard .code { font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.boxcard.scrap { border-left: 6px solid var(--bad); }
.boxcard.rework { border-left: 6px solid var(--accent); }
.boxcard.good { border-left: 6px solid var(--ok); }
.calc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: center; }
.calc > div { background: var(--soft); border-radius: 14px; padding: 10px 6px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.calc .v { font-size: 34px; font-weight: 800; }
.calc .good { background: var(--ok-bg); color: var(--ok); }
.calc .scrap { background: var(--bad-bg); color: var(--bad); }
.calc .rew { background: var(--warn-bg); color: var(--warn); }
.calc .qty-big input { width: 80px; font-size: 26px; }
.calc .qty-big button { width: 44px; height: 52px; font-size: 22px; }
.calc .qty-big { gap: 4px; }

/* вход */
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.rolecard { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); text-align: left; width: 100%; font-weight: 400; min-height: 0; }
.rolecard:hover { border-color: var(--c); }
.rolecard .avatar { background: var(--c); }
.rolecard b { font-size: 16px; }
.rolecard .r { color: var(--c); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.loginhead { text-align: center; padding: 26px 0 8px; }
.loginhead .logo { width: 64px; height: 64px; border-radius: 18px; background: var(--ink); color: #fff; display: inline-grid; place-items: center; margin-bottom: 10px; }

/* сценарии */
.story { display: flex; flex-direction: column; gap: 10px; }
.story ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.story .head { display: flex; gap: 12px; align-items: center; }

@media (max-width: 760px) {
  body.has-nav { padding-bottom: 76px; }
  .wrap { padding: 12px; }
  .top .wrap { padding-top: 6px; padding-bottom: 6px; }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); flex-wrap: nowrap; overflow-x: auto; gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgba(0,0,0,.2); }
  .nav a { flex: 1 0 64px; flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; text-align: center; }
  .nav a .ic { width: 22px; height: 22px; }
  .nav a.on { box-shadow: inset 0 3px 0 var(--role); }
  .who .nm { display: none; }
  .two { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 22px; }
  .hide-sm { display: none; }
  .bar { grid-template-columns: 84px minmax(0, 1fr) 44px; }
}
.roles form { display: flex; }
.roles .rolecard { height: 100%; }
@media (max-width: 760px) { .kpi .v { font-size: 26px; } .hero { padding: 12px; } .hero h1 { font-size: 19px; } }

/* демо: переключатель ролей в одно касание */
.demo-bar { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: 6px 10px; background: #FFF1D6; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.demo-bar form { display: contents; }
.demo-lead { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; color: #6B4A12; text-decoration: none; padding: 4px 8px; flex: none; }
.who-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid #E8D3A6; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.who-chip .avatar { width: 26px; height: 26px; background: var(--c); }
.who-chip .avatar .ic { width: 15px; height: 15px; }
.who-chip.on { background: var(--c); color: #fff; border-color: var(--c); }
.who-chip.on .avatar { background: rgba(255,255,255,.25); }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 120; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-weight: 600; transition: opacity .4s ease; }
.toast.out { opacity: 0; }
.item form[data-quick-add] button { width: 46px; height: 46px; padding: 0; border-radius: 12px; }
.chip[data-cat] { cursor: pointer; }

/* партии: карточки списка */
.lotcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.lotcard:hover { border-color: #BDB6A6; }
.lc-num { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.lc-qty { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; flex: none; }
.lc-qty b { font-size: 26px; }
.lc-qty span { font-size: 14px; color: var(--muted); }
.lc-qty small { font-size: 11px; color: var(--muted); }
.mini-route { display: flex; gap: 3px; }
.mini-route .ms { flex: 1 1 0; min-width: 0; font-size: 11px; padding: 5px 4px 4px; border-radius: 6px; background: var(--soft); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; position: relative; border-top: 3px solid #CFC9BC; }
.mini-route .ms.done { background: var(--ok-bg); color: var(--ok); border-top-color: var(--ok); }
.mini-route .ms.now { background: #FFF1D9; color: #7A4A06; border-top-color: #F2A93B; font-weight: 700; }
.mini-route .ms i { font-style: normal; margin-left: 3px; background: #F2A93B; color: #fff; border-radius: 999px; padding: 0 5px; font-size: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-g { background: var(--ok); } .lg-q { background: #F2B85B; } .lg-r { background: var(--bad); }

/* партии: страница */
.lothead { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.lotkpi { display: grid; grid-template-columns: repeat(2, minmax(92px, 1fr)); gap: 8px; }
.lotkpi > div { background: var(--soft); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; }
.lotkpi .v { font-size: 26px; font-weight: 800; line-height: 1.1; }
.lotkpi .l { font-size: 12px; color: var(--muted); }
.lotkpi .ok { background: var(--ok-bg); } .lotkpi .ok .v { color: var(--ok); }
.lotkpi .q { background: #FFF1D9; } .lotkpi .q .v { color: #9A5B08; }
.lotkpi .r { background: var(--bad-bg); } .lotkpi .r .v { color: var(--bad); }
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; align-items: stretch; scroll-snap-type: x proximity; }
.bcol { flex: 0 0 210px; background: var(--soft); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; scroll-snap-align: start; border: 2px solid transparent; }
.bcol.now { background: #FFF6E6; border-color: #F2C27A; }
.bcol.done { background: var(--ok-bg); }
.bhead { display: flex; gap: 8px; align-items: center; }
.bhead .n { width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 14px; }
.bcol.done .bhead .n { background: var(--ok); color: #fff; border-color: var(--ok); }
.bcol.now .bhead .n { border-color: #F2A93B; color: #9A5B08; }
.bstats { display: flex; flex-wrap: wrap; gap: 2px 8px; min-height: 16px; }
.minibox { background: var(--card); border-radius: 10px; padding: 8px 10px; text-decoration: none; color: var(--ink); border-left: 5px solid var(--ok); box-shadow: 0 1px 2px rgba(0,0,0,.06); display: flex; flex-direction: column; gap: 2px; }
.minibox.st-qc { border-left-color: #F2A93B; }
.minibox.rework, .minibox.st-rework { border-left-color: var(--accent); }
.minibox.st-packed { border-left-color: var(--muted); }
.timeline { display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--line); margin-left: 8px; }
.tl { display: flex; gap: 12px; padding: 6px 0 10px 0; position: relative; font-size: 14px; }
.tdot { width: 12px; height: 12px; border-radius: 50%; background: var(--role); margin-left: -7px; margin-top: 4px; flex: none; box-shadow: 0 0 0 3px var(--ground); }
@media (max-width: 760px) { .lotkpi { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; } .lotkpi .v { font-size: 20px; } .bcol { flex-basis: 78vw; } }
.grid.lots { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.dots { display: flex; align-items: center; padding: 4px 0 2px; }
.dots .d { flex: 1 1 0; position: relative; display: flex; justify-content: center; }
.dots .d::before { content: ""; position: absolute; top: 50%; left: -50%; right: 50%; height: 3px; background: var(--line); transform: translateY(-50%); }
.dots .d:first-child::before { display: none; }
.dots .d.done::before, .dots .d.now::before { background: var(--ok); }
.dots .d i { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: var(--card); border: 2px solid var(--line); color: var(--muted); }
.dots .d.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.dots .d.now i { border-color: #F2A93B; color: #9A5B08; background: #FFF1D9; box-shadow: 0 0 0 4px #FFF1D9; }
.dots .d em { position: absolute; z-index: 2; top: -9px; left: 50%; margin-left: 6px; font-style: normal; font-size: 10px; font-weight: 700; background: #F2A93B; color: #fff; border-radius: 999px; padding: 0 5px; line-height: 16px; }
@media (max-width: 760px) { .grid.lots { grid-template-columns: minmax(0, 1fr); } }
