/* Мини-хаб: оболочка как у портала EUPHORIA HUB (тёплый светлый фон, Manrope, красный бренд) + раздел «Продукт» */
:root {
  --red: #DF332A; --red-dark: #C22A22; --red-pale: #FBE3E1;
  --ink: #1A1A1A; --ink-2: #4C4A47; --muted: #8A8A8A; --line: #E8E6E2; --line-soft: #F0EEEA;
  --bg: #FAF9F7; --card: #FFFFFF; --sand: #F4E9E5; --band: #F5F3EF;
  --go: #17805A; --go-pale: #E4F1EB; --care: #C07A16; --care-pale: #FBF0DB;
  /* статусы (Софья 07.11: чёрный как «сделано» плохо читается): у цвета один смысл везде */
  --done: #2E8B62; --done-soft: #A8D5BD; --done-pale: #E3F2EA;      /* сделано · сделано задним числом */
  --cur: #2F66D0; --cur-pale: #E3EBFA;                               /* сейчас в работе */
  --wait: #B9B6B0;                                                   /* ждёт очереди */
  --f: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: 0 12px 40px rgba(26, 26, 26, .14);
  --side-w: 208px;
}
* { box-sizing: border-box }
/* Класс со своим display перекрывал бы встроенное правило браузера для hidden — поэтому явно. */
[hidden] { display: none !important }
html, body { margin: 0 }
body { font-family: var(--f); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased }
body.locked { overflow: hidden }
h1, h2, h3 { margin: 0; text-wrap: balance }
p { margin: 0 }
button, input, select { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px }
.muted { color: var(--muted) }
.code { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) }
.sub { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.num { font-variant-numeric: tabular-nums }
.late { color: var(--red); font-weight: 700 }
.unk { color: var(--care); font-weight: 700 }
.stack { display: grid; gap: 8px }

/* вход */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 36px 32px 28px; width: 100%; max-width: 400px; display: grid; gap: 6px }
.login-card h1 { font-size: 22px; margin-top: 18px }
.login-card label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 10px }
.login-card input { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 16px }
.login-card input:focus { border-color: var(--red); outline: none }
.login-card button { margin-top: 18px; border: 0; border-radius: 12px; padding: 14px; background: var(--red); color: #fff; font-weight: 700; font-size: 15px }
.err { color: var(--red); font-size: 13px; margin: 8px 0 0 }
/* фирменный блок: словесный знак euphoria (белый SVG из factories/data/Логотип) на красном, как на входе в портал */
.brand-block { background: var(--red); color: #fff; border-radius: 16px; padding: 22px 20px 16px; text-decoration: none; display: grid; justify-items: center; gap: 8px }
.brand-logo { display: block; width: 150px; height: auto }
.brand-sub { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; opacity: .85; line-height: 1 }
.brand-block.small { padding: 14px 12px 11px; border-radius: 12px; gap: 6px }
.brand-block.small .brand-logo { width: 104px }
.brand-block.small .brand-sub { font-size: 10px }

/* оболочка */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh }
.side { border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; background: var(--bg) }
.side-group { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 8px }
.side nav { display: grid; gap: 2px }
.side nav a { text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 9px; font-weight: 600 }
.side nav a:hover { background: var(--card) }
.side nav a[aria-current="page"] { background: var(--ink); color: #fff }
.side-user { margin-top: auto; display: grid; gap: 2px; font-size: 13px; border-top: 1px solid var(--line); padding-top: 12px }
.side-user small { color: var(--muted) }
.side-user a { color: var(--muted); font-size: 12px; margin-top: 4px }
.main { padding: 22px 28px 110px; display: grid; gap: 20px; align-content: start; min-width: 0 }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 14px }
.page-head h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05 }
.meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums }
.meta b { color: var(--ink) }
#view { display: grid; gap: 22px; min-width: 0 }
.intro { color: var(--ink-2); max-width: 72ch }
.empty { padding: 28px 6px; color: var(--muted) }
.loading { padding: 40px 0; color: var(--muted); text-align: center }

/* общее */
.btn { border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 700; background: var(--ink); color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px }
.btn.red { background: var(--red) }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line) }
.btn.small { padding: 6px 10px; font-size: 12.5px; border-radius: 8px }
.btn[disabled] { opacity: .5; cursor: default }
.link { border: 0; background: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; padding: 0; cursor: pointer }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--card); border: 1px solid var(--line); color: var(--muted); white-space: nowrap }
/* где шьём и что делаем — разные метки (Софья 07.11) */
.tag.make-china { background: var(--sand); border-color: var(--sand); color: var(--ink) }
.tag.make-own { background: #ECEEF4; border-color: #ECEEF4; color: #2E3550 }
.tag.kind-color { background: var(--care-pale); border-color: var(--care-pale); color: #8A5A10 }
.tag.warn { background: var(--care-pale); border-color: var(--care-pale); color: var(--care) }
button.tag { cursor: pointer }
.tags { display: flex; flex-wrap: wrap; gap: 5px }
.note { font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; overflow-wrap: anywhere }
.note small { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 2px }
.note.warn { background: var(--care-pale); border-color: var(--care-pale) }
.note.alarm { background: var(--red-pale); border-color: var(--red-pale) }
.note.alarm small { color: var(--red); font-weight: 700 }
.tag.alarm { background: var(--red-pale); border-color: var(--red-pale); color: var(--red) }
.tag.approved { background: var(--go-pale); border-color: var(--go-pale); color: var(--go) }
.tag.rework { background: var(--care-pale); border-color: var(--care-pale); color: var(--care) }
.tag.cancelled { background: var(--line-soft); color: var(--muted) }
.x { border: 1px solid var(--line); background: var(--card); border-radius: 9px; width: 36px; height: 36px; padding: 0; font-size: 20px; line-height: 1; flex: none; color: var(--ink-2) }
.x:hover { background: var(--bg) }

/* внимание (сезон) */
.attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px }
.attn-list .why { display: block; font-size: 12px; color: var(--muted); font-weight: 400 }
.attn-list .when br { display: block }
.attn-col { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; align-content: start }
.attn-h { display: flex; align-items: baseline; gap: 8px; font-weight: 700 }
.attn-h .n { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums }
.attn-h .n.red { color: var(--red) }
.attn-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none }
.attn-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 6px 6px; border-radius: 8px; font-size: 13px; align-items: baseline }
.attn-list button:hover { background: var(--bg) }
.attn-list b { font-weight: 700 }
.attn-list .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums }
.attn-list .when.late { color: var(--red) }
.attn-ok { color: var(--go); font-weight: 600; font-size: 13px }
.attn-links { display: grid; gap: 6px }
.attn-links a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 6px 8px; border-radius: 8px; display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--line) }
.attn-links a:hover { background: var(--bg) }
.attn-links a .v { font-variant-numeric: tabular-nums }

/* шкала сезона */
.legend { display: flex; flex-wrap: wrap; gap: 14px 18px; font-size: 12.5px; color: var(--muted); align-items: center }
/* карта сезона: у партии две строки — основная и съёмка; ключевая дата — значок, этап — цветная полоса до неё */
:root { --ph-dev: #E6C3BC; --ph-buy: #EED9A6; --ph-make: #BFD0E4; --ph-log: #C4DFCD; --ph-go: #F0A9A3; --ph-shoot: #D6C8E8 }
.gantt-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card) }
.gantt { display: grid; grid-template-columns: 260px minmax(0, 1fr) }
.g-head, .g-lane { display: contents }
.g-info { padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: grid; gap: 2px; align-content: center; background: var(--card); position: sticky; left: 0; z-index: 3; text-align: left; min-width: 0 }
.g-info b { font-size: 14px; overflow-wrap: anywhere }
.g-info .s { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums }
.g-lane .g-info { cursor: pointer }
.g-lane:hover .g-info, .g-lane:hover .g-time { background: #FCFBF9 }
.g-time { position: relative; border-bottom: 1px solid var(--line); min-height: 104px; cursor: pointer; overflow: hidden }
.g-info:not(.g-sub), .g-time:not(.g-sub) { border-bottom-style: dashed; border-bottom-color: var(--line-soft) }
.g-sub.g-info { padding-top: 6px; padding-bottom: 8px; background: #FDFCFB }
.g-sub.g-time { min-height: 74px; background: #FDFCFB }
.g-sub .sub-h { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2) }
.g-head .g-time, .g-head .g-info { height: 58px; min-height: 0; cursor: default; background: var(--bg); z-index: 4; border-bottom: 1px solid var(--line) }
.tl { position: absolute; top: 0; bottom: 0; left: 16px; right: 16px }
.band { position: absolute; top: 0; bottom: 0; background: var(--band) }
.gline { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-soft) }
.month { position: absolute; top: 6px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; padding-left: 6px; border-left: 1px solid var(--line); line-height: 1.3 }
.today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--red); z-index: 2; pointer-events: none }
.today-l { position: absolute; top: 41px; transform: translateX(-50%); font-size: 10.5px; font-weight: 800; color: var(--red); background: var(--bg); padding: 0 4px; white-space: nowrap; z-index: 3; line-height: 1.3 }
.ev { position: absolute; top: 22px; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; background: var(--ink); color: #fff; border-radius: 4px; padding: 1px 6px; white-space: nowrap; line-height: 1.5 }
/* полоса этапа: цвет — группа этапов; впереди — бледнее */
.seg { position: absolute; top: calc(50% - 17px); height: 10px; border-radius: 5px; background: var(--ph); z-index: 1 }
.g-sub .seg { top: calc(50% - 13px); height: 7px }
.seg.next, .seg.guess { opacity: .55 } .seg.guess { background: repeating-linear-gradient(90deg, var(--ph) 0 6px, transparent 6px 10px) }
.seg.late { box-shadow: inset 0 0 0 1.5px var(--red) } .seg.shift { box-shadow: inset 0 0 0 1.5px var(--care) }
.seg:hover { filter: brightness(.93); opacity: 1 }
.ph-dev { --ph: var(--ph-dev) } .ph-buy { --ph: var(--ph-buy) } .ph-make { --ph: var(--ph-make) } .ph-log { --ph: var(--ph-log) } .ph-go { --ph: var(--ph-go) } .ph-shoot { --ph: var(--ph-shoot) }
/* значок ключевой даты: кружок со своим рисунком, цвет — состояние */
.ico { position: absolute; top: calc(50% - 27px); width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); color: var(--ink); display: grid; place-items: center; z-index: 2 }
.ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round }
.ico svg text { stroke: none }
.g-sub .ico { top: calc(50% - 21px); width: 24px; height: 24px; margin-left: -12px; border-width: 1.5px } .g-sub .ico svg { width: 14px; height: 14px }
.ico.done { background: var(--done); border-color: var(--done); color: #fff }
.ico.next { border-color: var(--ink-2) }
.ico.late { background: var(--red); border-color: var(--red); color: #fff }
.ico.shift { background: var(--care-pale); border-color: var(--care); color: var(--care) }
.ico.guess { border-style: dashed; border-color: var(--muted); color: var(--muted) }
.ico i { position: absolute; top: -8px; right: -10px; font-style: normal; font-size: 10.5px; font-weight: 800; background: var(--ink); color: #fff; border-radius: 8px; padding: 0 5px; line-height: 1.5 }
.ico:hover { box-shadow: 0 0 0 4px var(--line) }
/* где было по плану: пустой кружок и пунктир до нынешнего срока */
.ms-ghost { position: absolute; top: calc(50% - 20px); width: 16px; height: 16px; margin-left: -8px; border: 2px dashed var(--muted); border-radius: 50%; background: var(--card); z-index: 2 }
.ms-ghost.shift { border-color: var(--care) } .ms-ghost.late { border-color: var(--red) }
.ms-arrow { position: absolute; top: calc(50% - 13px); height: 0; border-top: 2px dashed var(--muted); z-index: 1 }
.ms-arrow.shift { border-color: var(--care) } .ms-arrow.late { border-color: var(--red) }
.ms-l { position: absolute; transform: translateX(-50%); display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.3; pointer-events: none }
.ms-l.r0 { top: calc(50% + 9px) } .ms-l.r1 { top: calc(50% + 29px) }
.g-sub .ms-l { font-size: 11px } .g-sub .ms-l.r0 { top: calc(50% + 7px) } .g-sub .ms-l.r1 { top: calc(50% + 23px) }
.ms-l .dl { font-size: 11.5px; font-weight: 800; color: #fff; background: var(--care); border-radius: 6px; padding: 0 5px; line-height: 1.5 }
.ms-l.late { color: var(--red); font-weight: 700 } .ms-l.late .dl { background: var(--red) } .ms-l.shift { color: var(--care); font-weight: 700 }
.ms-l.done { color: var(--done) } .ms-l.guess { font-style: italic; color: var(--muted); font-weight: 500 }
.nodates { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); white-space: nowrap; z-index: 2; background: var(--card); padding: 2px 8px; border-radius: 6px }
.nodates b { color: var(--ink) }
/* подсказка: окно постоянного размера, длинный текст делается мельче */
.tip { position: fixed; z-index: 40; width: 300px; height: 116px; overflow: hidden; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.4; padding: 9px 12px; border-radius: 10px; box-shadow: var(--shadow); pointer-events: none; display: flex; flex-direction: column; gap: 1px }
.tip b { font-weight: 800 } .tip span { color: #D9D6D2 } .tip .tip-tap { color: #fff; opacity: .7; font-style: italic; margin-top: auto }
.legend i.ico, .order-hint i.ico { position: relative; top: auto; margin: 0 6px 0 0; display: inline-grid; vertical-align: middle; width: 18px; height: 18px }
.legend i.ico svg, .order-hint i.ico svg { width: 10px; height: 10px }
.legend .ms-ghost-l { display: inline-block; width: 14px; height: 14px; border: 2px dashed var(--care); border-radius: 50%; margin-right: 7px; vertical-align: -2px }
.legend .dl-l { font-size: 11.5px; font-weight: 800; color: #fff; background: var(--care); border-radius: 6px; padding: 0 5px; margin-right: 6px; font-style: normal }
.order-hint { display: grid; gap: 6px; font-size: 12px; color: var(--ink-2) }
.order-hint > div { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center }
.order-hint b { color: var(--ink); font-weight: 700; min-width: 132px }
.step-chip { display: inline-flex; align-items: center; padding: 2px 9px 2px 3px; border-radius: 999px; background: color-mix(in srgb, var(--ph) 45%, transparent); white-space: nowrap }
.legend i.ghost-l { border: 1.5px dashed var(--muted); background: transparent; width: 8px; height: 8px }
.nodates { position: absolute; left: 12px; right: 12px; top: 20px; bottom: 16px; border: 1.5px dashed var(--line); border-radius: 8px; display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: 12.5px; gap: 10px }
.nodates b { color: var(--ink); font-weight: 700 }

/* модели */
.summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px }
.sum { display: grid; gap: 5px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 12px; min-width: 0 }
.sum:hover { background: #FCFBF9 }
.sum[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink) }
.sum .n { font-size: 22px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums }
.sum .t { font-weight: 700; font-size: 13px; overflow-wrap: anywhere }
.sum .s { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums }
.sbar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; background: var(--bg) }
.sbar i { display: block }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.filters input[type="search"], .filters select { border: 1px solid var(--line); background: var(--card); border-radius: 9px; padding: 8px 10px; min-width: 0; max-width: 100% }
.filters input[type="search"] { flex: 1 1 200px }
.count { font-size: 13px; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums }
.list { display: grid; border-top: 1px solid var(--line) }
.row { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 2.2fr) minmax(0, 1.9fr); gap: 16px; align-items: center; padding: 11px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; width: 100%; border-radius: 0 }
.row:hover { background: var(--card) }
.row .title { display: grid; gap: 3px; min-width: 0 }
.row .title b { font-size: 14.5px; overflow-wrap: anywhere }
.trk { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; min-width: 0 }
.trk .k { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap }
.track { display: flex; gap: 3px; align-items: center; min-width: 0 }
.track i { flex: 1; height: 10px; border-radius: 2px; background: var(--card); border: 1px solid var(--line); min-width: 4px }
.track i.done { background: var(--done); border-color: var(--done) }
.track i.implied { background: var(--done-soft); border-color: var(--done-soft) }
.track.par { flex: none; gap: 2px; min-width: 0 }
.track.par i { border-radius: 50%; width: 9px; height: 9px; flex: none; min-width: 0 }
.track i.current { background: var(--cur-pale); border: 2px solid var(--cur) }
.track i.overdue { background: var(--red); border-color: var(--red) }
.now { display: grid; gap: 2px; min-width: 0; font-size: 13px }
.now b { font-weight: 700 }
.now .late, .now .unk { font-size: 12.5px }
.now .muted { font-size: 12.5px }

/* панель */
.shade { position: fixed; inset: 0; background: rgba(26, 26, 26, .35); z-index: 20 }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100%); background: var(--bg); z-index: 21; overflow-y: auto; border-left: 1px solid var(--line); box-shadow: var(--shadow) }
.panel.wide { width: calc(100% - var(--side-w)) }
.panel.wide .p-head, .panel.wide .p-body { padding-left: 32px; padding-right: 32px; max-width: 1100px }
.p-head { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 16px 22px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 8px }
.p-head .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px }
.p-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em }
.p-head .acts { display: flex; gap: 6px; flex: none }
.p-body { padding: 16px 22px 40px; display: grid; gap: 18px }
.back { border: 1px solid var(--line); background: var(--card); border-radius: 9px; height: 36px; padding: 0 12px; font-size: 13px; font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.colors { display: flex; flex-wrap: wrap; gap: 6px }
.color-chip { display: grid; gap: 1px; text-align: left; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); min-width: 0 }
.color-chip:hover { border-color: var(--ink) }
.color-chip small { color: var(--muted); font-size: 11px }
.plink { color: var(--ink); font-weight: 600; overflow-wrap: anywhere }
.stages { display: grid; border-top: 1px solid var(--line) }
.st { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start }
.st.par { background: transparent }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); margin-top: 3px; background: var(--card) }
.st.done .dot { background: var(--done); border-color: var(--done); position: relative }
.st.done .dot::after { content: ""; position: absolute; left: 3px; top: 0; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) }
.st.implied .dot { background: var(--done-pale); border-color: var(--done-soft) }
.st.implied .nm { color: var(--ink-2) }
.st .fact.muted { color: var(--muted) }
.st.current .dot { border-color: var(--cur); background: var(--cur-pale); box-shadow: 0 0 0 3px var(--cur-pale) }
.st.current .nm { color: var(--cur) }
.st.overdue .dot { background: var(--red); border-color: var(--red) }
.st .nm { font-weight: 700 }
.st .who, .st .pl, .st .src { font-size: 12.5px; color: var(--muted) }
.st .fact { font-size: 12.5px; color: var(--go) }
.st.overdue .pl { color: var(--red); font-weight: 700 }
.st.shifted .dot { border-color: var(--care); background: var(--care-pale) }
.st .pl .shift { color: var(--red); font-weight: 700 }
.st.shifted .pl .shift { color: var(--care) }
.st .pl .why { color: var(--ink-2); font-weight: 400 }
.st .acts { display: grid; gap: 6px; justify-items: end }
.mark { font-size: 12px; font-weight: 700; border-radius: 8px; padding: 5px 10px; border: 1.5px solid var(--ink); background: var(--card); white-space: nowrap }
.mark.on { background: var(--done-pale); color: var(--done); border-color: var(--done-soft) }
.mark.ghost { border-color: var(--line); color: var(--ink-2) }
.mark[disabled] { opacity: .5; cursor: default }

/* встроенные формы: когда сделано, перенос срока, образец */
.fslot:empty { display: none }
.inline { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px }
.inline.col { flex-direction: column; align-items: stretch }
.inline label { display: grid; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); min-width: 0 }
.inline label.grow { flex: 1 1 180px }
.inline input, .inline select, .inline textarea { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; background: var(--card); color: var(--ink); font-weight: 500; width: 100%; font-family: inherit }
.inline textarea { resize: vertical }
.inline input:focus, .inline select:focus, .inline textarea:focus { border-color: var(--ink); outline: none }
.inline .w60 { width: 64px }
.frow { display: flex; flex-wrap: wrap; gap: 8px; align-items: end }
.inline.col .frow label { flex: 1 1 120px }

/* коллекции */
.col-box { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; background: var(--sand); border-radius: 10px; padding: 8px 12px; font-size: 13px }
.w90 { width: 90px }
.file-btn { cursor: pointer }

/* интерактив этапа */
.extras { display: grid; gap: 5px; margin-top: 6px }
.slots { display: flex; flex-wrap: wrap; gap: 6px; align-items: center }
.slot { font-size: 12.5px; border-radius: 8px; padding: 3px 9px; display: inline-flex; gap: 8px; align-items: center }
.slot.add { border: 1.5px dashed var(--line); background: var(--card); color: var(--ink-2); cursor: pointer }
.slot.add:hover { border-color: var(--ink); color: var(--ink) }
.slot.add.strong { border-style: solid; border-color: var(--ink); color: var(--ink); font-weight: 700 }
.slot.ok { background: var(--go-pale); color: var(--go) }
.slot.ok a { color: var(--go); font-weight: 700 }
.decision { font-size: 12.5px; border-radius: 8px; padding: 3px 9px; display: inline-flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline }
.decision.go { background: var(--go-pale); color: var(--go) }
.decision.no { background: var(--red-pale); color: var(--red) }
.mini-list { display: grid; gap: 2px; font-size: 12.5px; color: var(--ink-2) }
.cmt { overflow-wrap: anywhere }
.tools { display: flex; gap: 14px }
.tools .link { font-size: 12px }

/* образцы */
.smp { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px }
.smp-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px }
.smp-h .link { margin-left: auto }
.smp-t { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere }
.smp-t small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.smp-t.fx { background: var(--care-pale); border-radius: 8px; padding: 6px 8px }
.smp-t.en { background: var(--go-pale); border-radius: 8px; padding: 6px 8px; white-space: pre-wrap }
.smp-t.en.muted { background: var(--bg); color: var(--muted) }
.smp-t small .link { font-size: 11px; letter-spacing: 0; text-transform: none }
.colors-toggle { justify-self: start; text-decoration: none; font-weight: 600; color: var(--ink-2) }
.colors-toggle:hover { text-decoration: underline }
.smp-by { font-size: 11.5px; color: var(--muted) }
.mini { display: grid; border-top: 1px solid var(--line) }
.mini button { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 8px 4px; align-items: center; border-radius: 0 }
.mini button:hover { background: var(--card) }
.mini .nm { display: grid; gap: 1px; min-width: 0 }
.mini .nm small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.dist { display: grid; gap: 6px }
.dist-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line-soft) }
.dist-bar i { display: block }
.dist-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) 36px; gap: 8px; align-items: center; font-size: 13px }
.dist-row i { width: 10px; height: 10px; border-radius: 3px; display: block }
.dist-row b { text-align: right; font-variant-numeric: tabular-nums }

/* помощник */
.dock { position: fixed; right: 24px; bottom: 20px; z-index: 15; display: grid; justify-items: end; gap: 10px; width: min(440px, calc(100vw - 48px)) }
.dock-pill { border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; padding: 11px 18px; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow); font-size: 14px }
.dock-pill:hover { background: #000 }
.badge { background: var(--red); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800 }
.dock-box { width: 100%; max-height: min(640px, calc(100vh - 110px)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden }
.dock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--sand) }
.dock-head b { display: block; font-weight: 800; font-size: 15px }
.dock-head small { color: var(--ink-2); font-size: 12px }
.dock-acts { display: flex; align-items: center; gap: 10px }
.chat-log { display: grid; gap: 8px; overflow-y: auto; align-content: start; padding: 12px 14px; min-height: 160px; max-height: 440px; background: var(--bg) }
.bubble { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; white-space: pre-wrap; max-width: 92%; justify-self: start; font-size: 13.5px; overflow-wrap: anywhere }
.bubble.me { justify-self: end; background: var(--ink); color: #fff; border-color: var(--ink) }
.bubble .who { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px }
.bubble.me .who { color: rgba(255, 255, 255, .7) }
.bubble.wait { color: var(--muted) }
.card-act { background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; font-size: 13.5px; max-width: 96% }
.card-act.done { border-color: var(--go) } .card-act.rejected { border-color: var(--line); opacity: .7 } .card-act.failed { border-color: var(--red) }
.card-act .res { font-size: 12.5px; font-weight: 700; color: var(--go) }
.card-act.failed .res { color: var(--red) } .card-act.rejected .res { color: var(--muted) }
.acts-row { display: flex; gap: 8px; flex-wrap: wrap }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--ink-2) }
.chip:hover { border-color: var(--ink); color: var(--ink) }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--card) }
.chat-form input { flex: 1; min-width: 0; border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px 12px; font-size: 14px }
.chat-form input:focus { border-color: var(--ink); outline: none }
.chat-form input:disabled { color: var(--muted); background: var(--bg) }

/* уведомления */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; display: grid; gap: 6px; pointer-events: none; width: min(520px, calc(100vw - 32px)) }
.toast div { background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); text-align: center }
.toast div.bad { background: var(--red) }

/* съёмка */
.shoot-group { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden }
.shoot-lane { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; padding: 12px 14px; background: var(--sand); font-size: 13px }
.shoot-lane b { font-size: 15px }
.shoot-lane .link { margin-left: auto }
.shoot-head, .shoot-row { display: grid; grid-template-columns: minmax(200px, 1.4fr) repeat(3, minmax(150px, 1fr)); gap: 10px 14px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: start }
.shoot-head { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; background: var(--bg) }
.shoot-row.color { background: #FCFBF9; padding-top: 6px; padding-bottom: 6px }
.shoot-row.color .shoot-model { padding-left: 18px }
.shoot-row.color .link-model { font-size: 13px; font-weight: 600 }
.shoot-row.color .chip { font-size: 11.5px }
.fit-row { display: grid; grid-template-columns: minmax(200px, 1.2fr) 130px minmax(200px, 2fr); gap: 10px 14px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: start }
.fit-block { display: grid; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px }
.fit-block .x { align-self: end }
.frow .grow { flex: 1 1 auto }
.fit-row .when { font-weight: 700; font-variant-numeric: tabular-nums }
.fit-text { font-size: 13px; display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere }
.fit-text .fx { background: var(--care-pale); border-radius: 8px; padding: 4px 8px }
.inline.fit { background: var(--sand); border-color: var(--sand) }
.inline.col .frow label.toggle, .inline.fit label.toggle { display: inline-flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card) }
.inline.fit label.toggle input { width: auto }
.inline.fit label.toggle .code { font-size: 11.5px }
@media (max-width: 900px) { .fit-row { grid-template-columns: minmax(0, 1fr) } }
.shoot-model { display: grid; gap: 2px; min-width: 0 }
.shoot-model small { color: var(--muted); font-size: 12px }
.link-model { border: 0; background: none; text-align: left; font-weight: 700; padding: 0; cursor: pointer; font-size: 14px; color: var(--ink) }
.link-model:hover { text-decoration: underline }
.shoot-cell { display: grid; gap: 6px; min-width: 0; align-content: start }
.shoot-cell small { font-size: 11.5px }
.chip { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--ink-2); justify-self: start; white-space: nowrap }
.chip.done { background: var(--go-pale); color: var(--go) }
.chip.late { background: var(--red-pale); color: var(--red) }
.chip.cur { background: var(--sand); color: var(--ink) }
.chip.muted { color: var(--muted) }
.mark.small { font-size: 11.5px; padding: 3px 8px }
@media (max-width: 900px) {
  .shoot-head { display: none }
  .shoot-row { grid-template-columns: minmax(0, 1fr) }
  .shoot-cell::before { content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
}

/* RACI и журнал */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px }
.person { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px 12px; display: grid }
.person small { color: var(--muted) }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card) }
table { border-collapse: collapse; width: 100%; font-size: 13px }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top }
tr:last-child td { border-bottom: 0 }
th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg); white-space: nowrap; position: sticky; top: 0 }
td.c { text-align: center; font-family: var(--mono); font-weight: 600; white-space: nowrap }
td.c.R { color: var(--red) }
td.c.A { background: var(--cur-pale); color: var(--cur); font-weight: 800 }
.raci th:first-child, .raci td:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 200px }
.raci th:first-child { background: var(--bg); z-index: 2 }
td.when { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted) }
td .small { display: block; color: var(--muted); font-size: 12px }

@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0, 1fr) }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px }
  .side nav { display: flex; flex-wrap: wrap }
  .side-group { display: none }
  .side-user { margin: 0 0 0 auto; border: 0; padding: 0; grid-template-columns: auto auto; gap: 0 10px; align-items: baseline }
  .side-user small { display: none }
  .main { padding: 18px 16px 110px }
}
@media (max-width: 700px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px }
  .dock { right: 0; bottom: 0; width: 100%; justify-items: end; padding: 0 12px 12px }
  .dock-box { border-radius: 16px; max-height: 80vh }
  .chat-form { flex-direction: column }
  .gantt { grid-template-columns: 180px minmax(0, 1fr) }
  .order-hint b { min-width: 0; width: 100% }
  .p-head, .p-body { padding-left: 16px; padding-right: 16px }
}
@media (prefers-reduced-motion: no-preference) {
  .row, .sum, .g-lane .g-info, .g-time, .chip { transition: background .12s }
}
/* актуальный статус наверху карточки */
.now-box { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--cur); font-size: 13.5px }
.now-box > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: baseline }
.now-box small { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em }
.now-box b { font-size: 15px }
.now-box.alarm { border-left-color: var(--red); background: var(--red-pale) }
.now-box.shift, .now-box.warn { border-left-color: var(--care); background: var(--care-pale) }
.now-box.go { border-left-color: var(--done); background: var(--done-pale) }
.now-box .shift { color: var(--care); font-weight: 700 }
@media (max-width: 700px) { .now-box > div { grid-template-columns: minmax(0, 1fr); gap: 0 } }
/* рекомендованный таймлайн коллекции */
.tl-box { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 13.5px }
.tl-box.alarm { border-color: var(--red); background: var(--red-pale) }
.tl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: st }
.tl-list li { display: grid; grid-template-columns: minmax(0, 1fr) 56px 48px; gap: 8px; font-size: 13px; padding: 2px 0; border-bottom: 1px dashed var(--line-soft) }
.tl-list li.past { color: var(--muted) }
.tl-list .d { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right }
.tl-list .muted { text-align: right; font-size: 12px }
.tl-path summary { cursor: pointer; padding: 4px 0; font-size: 13px }
.unsure { font-style: normal; color: var(--care); font-weight: 800; margin-left: 3px; cursor: help }
/* правило ролей: этап и задача ждут очереди — серые; кто закрывает */
.st.locked .nm, .st.locked .who, .st.locked .pl { color: var(--wait) }
.st.locked .dot { border-style: dashed; border-color: var(--wait) }
.lock-note { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-left: 6px }
.lock-note.par-note { color: var(--cur, #2F66D0) }
.closer { font-size: 12px; color: var(--muted); white-space: nowrap }
.task { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; justify-content: space-between }
.task.locked, tr.locked { color: var(--wait) }
.task.locked b, tr.locked b { color: var(--wait) }
.task.done > span:first-child, tr.done td:nth-child(2) { text-decoration: line-through; color: var(--muted) }
.ok { color: var(--done); font-weight: 700; font-size: 12.5px }
.mark.small { padding: 3px 10px; font-size: 12px }
/* путь коллекции до выпуска */
.st.release { border-top: 2px solid var(--ink); padding-top: 10px }
.st.release .nm { font-weight: 800 }
/* фото и видео с примерки */
.media-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 }
.media { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--sand); border: 1px solid var(--line); display: block }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block }
.media i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 18px; text-shadow: 0 1px 4px rgba(0,0,0,.5) }
.media .dr { position: absolute; right: 4px; bottom: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); border: 1.5px solid #fff }
.media .dr.wait { background: var(--care) } .media .dr.failed { background: var(--red) }
.media-add { width: 72px; height: 72px; border-radius: 8px; border: 1.5px dashed var(--line); display: grid; place-items: center; text-align: center; font-size: 11.5px; color: var(--ink-2); cursor: pointer; padding: 4px; line-height: 1.25 }
.media-add:hover { border-color: var(--ink); color: var(--ink) }
/* файлы этапа */
.fchips { display: flex; flex-wrap: wrap; gap: 6px }
.fchip { position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 12px; color: var(--ink); text-decoration: none }
.fchip img { width: 28px; height: 28px; object-fit: cover; border-radius: 5px }
.fchip .ext { width: 28px; height: 28px; border-radius: 5px; background: var(--sand); display: grid; place-items: center; font-size: 9.5px; font-weight: 800; text-transform: uppercase; color: var(--ink-2) }
.fchip .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.fchip .dr { position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); border: 1.5px solid #fff }
.fchip .dr.wait { background: var(--care) } .fchip .dr.failed { background: var(--red) }
.file-link { cursor: pointer }
/* сезоны и коллекции */
.season-block { display: grid; gap: 10px }
.season-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--sand); text-align: left; cursor: pointer }
.season-head b { font-size: 18px }
.season-head .track { min-width: 90px }
.season-head:hover { border-color: var(--ink) }
/* правка и удаление в примерках */
.fit-acts { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto }
.link.danger { color: var(--red) }
.confirm { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--red-pale); font-size: 13px; margin: 6px 0 }
.mdel { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(26,26,26,.7); color: #fff; font-size: 12px; line-height: 1; display: grid; place-items: center; cursor: pointer; opacity: 0 }
.media:hover .mdel, .fchip:hover .mdel, .mdel:focus { opacity: 1 }
@media (hover: none) { .mdel { opacity: .85 } }
.fchip .mdel { position: static; margin-left: 2px; background: var(--line); color: var(--ink) }

/* выпадающие списки: своя стрелка с отступом от края, как у полей ввода */
.filters select, .inline select, .fit select {
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%234C4A47' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 10px 6px }
.filters select:hover, .inline select:hover { border-color: var(--ink-2) }
.filters select:focus-visible, .inline select:focus-visible { outline: 2px solid var(--cur); outline-offset: 1px }
.filters select { flex: 0 1 220px }
@media (max-width: 700px) { .filters select, .filters input[type="search"] { flex: 1 1 100% } }
/* задачи: снятые и пометки */
.task.cancelled > span:first-child { text-decoration: line-through; color: var(--muted) }
.task.request { background: var(--cur-pale); border-radius: 8px; padding: 6px 10px }
.requests { margin-bottom: 14px }
.answer-slot { margin-top: 6px; gap: 6px; flex-basis: 100% }
.answer-slot input { flex: 1; min-width: 0 }
.task-note { flex-basis: 100%; font-size: 12px; color: #8A5A10; background: var(--care-pale); border-radius: 6px; padding: 2px 8px; display: inline-block }
.cancelled-list { margin-top: 12px; font-size: 13px }
.cancelled-list summary { cursor: pointer; color: var(--muted); font-weight: 700; padding: 6px 0 }
.cancelled-list .task { padding: 4px 0; border-bottom: 1px dashed var(--line-soft) }
/* задачи: вкладки и коллеги */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 8px }
.tab { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; cursor: pointer }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink) }
.tab .n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--cur-pale); color: var(--cur); font-size: 11.5px; margin-left: 4px }
.person-tasks { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 8px 12px; margin-top: 8px }
.person-tasks summary { cursor: pointer; padding: 4px 0 }
/* производство модели и отмена цветов */
.prod-box { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 13.5px }
.prod-box small { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-right: 6px }
.prod-cand { border-top: 1px dashed var(--line); padding-top: 8px }
.prod-cand.chosen .prod-h b { color: var(--done) }
.prod-h { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline }
.prod-hist { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); display: grid; gap: 2px }
.color-wrap { display: inline-grid; gap: 2px; justify-items: start }
.cc-x { font-size: 11.5px; color: var(--muted) }
.color-off { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed var(--line-soft) }
.color-off > span:first-child { text-decoration: line-through; color: var(--muted) }
/* параллельный запуск */
.tag.par-tag { background: #EEF0FA; border-color: #EEF0FA; color: #3B4690 }
.branch-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 8px 12px; cursor: pointer }
.branch-row:hover { border-color: var(--ink-2) }
.branch-colors { display: flex; flex-wrap: wrap; gap: 6px 14px }
.branch-colors .toggle { display: inline-flex; align-items: center; gap: 6px }
.branch-colors .w60 { width: 64px }
.inline .branch-colors .toggle { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500 }
.inline .branch-colors input[type="checkbox"] { width: auto; flex: none }
.inline .branch-colors input[type="number"] { width: 70px; flex: none }
.season-drive { justify-self: start; font-size: 12.5px; margin-top: -4px }

/* права на изменение данных (Софья 08.11.2026): кнопки видят только те, кому сервер это разрешит */
body.no-edit :is([data-form="move"], [data-form="make"], [data-form="branch"], [data-form="cancelcolor"], [data-form="hubmodel"], [data-color-back], [data-choose],
  [data-branch-close], #season-new, #col-new, form[data-kind="release"], [data-import], [data-simport], .file-btn:has([data-upload], [data-supload]), .ms-acts) { display: none !important }
body.no-fit :is([data-form="sample"], [data-english], .media-add, .fit-acts, #fit-new, [data-fit-add], [data-fit-edit], [data-fit-del], [data-smp-del]) { display: none !important }
/* выкрасы: решение у каждого цвета прямо в этапе модели */
.per-color { flex-basis: 100%; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card) }
.pc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 10px; font-size: 13px; border-top: 1px solid var(--line) }
.pc-row:first-child { border-top: 0 }
.pc-name { min-width: 0; overflow-wrap: anywhere } .pc-name .code { color: var(--muted); font-size: 11.5px; margin-left: 4px }
/* промежуточные проверки этапа: дата, комментарий, файлы */
.checks { flex-basis: 100%; display: grid; gap: 6px; justify-items: start }
.chk { font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center }
.slot.late { border-color: var(--red); color: var(--red) }
form.inline label.check { display: flex; flex-direction: row; gap: 8px; align-items: center; font-size: 13px; color: var(--ink) }
form.inline label.check input { width: auto; flex: none; margin: 0 }
.go-t { color: var(--go); font-weight: 700 }

/* ---------- карточка модели: три вида — Фокус, Доска, Сроки (Софья 10.11) ---------- */
.mv-headrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
.mv-sw { display: inline-flex; background: var(--band); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex: none }
.mv-sw button { border: 0; background: none; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 7px; color: var(--muted) }
.mv-sw button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(26, 26, 26, .12) }
.mv-main { display: grid; gap: 16px; min-width: 0 }
.mv-side { display: grid; gap: 18px; align-content: start; min-width: 0 }
.panel.wide .p-body:has(> .mv-main.mv-v-focus) { grid-template-columns: minmax(0, 1fr) 340px; align-items: start }
.panel.wide .p-body:has(> .mv-main.mv-v-focus) > :not(.mv-main):not(.mv-side) { grid-column: 1 / -1 }
.panel.wide .p-body:has(> .mv-main.mv-v-board), .panel.wide .p-body:has(> .mv-main.mv-v-time) { max-width: 1400px }
.panel.wide .p-body:has(> .mv-main.mv-v-board) > .mv-side, .panel.wide .p-body:has(> .mv-main.mv-v-time) > .mv-side { grid-template-columns: repeat(2, minmax(0, 1fr)) }
/* полоса фаз */
.mv-phases { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px }
.mv-ph { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 6px }
.mv-ph.done { background: var(--done-pale); border-color: var(--done-soft) }
.mv-ph.current { border: 2px solid var(--cur); padding: 7px 9px }
.mv-ph.overdue { border: 2px solid var(--red); padding: 7px 9px }
.mv-ph-t { display: flex; justify-content: space-between; gap: 6px; align-items: baseline } .mv-ph-t b { font-size: 13px } .mv-ph-t span { font-size: 12px; font-weight: 700; color: var(--muted) }
.mv-ph small { font-size: 11.5px; color: var(--muted) }
.mv-dots { display: flex; gap: 3px }
.mv-dots button { flex: 1; min-width: 6px; height: 11px; padding: 0; border-radius: 3px; border: 1px solid #D9D5CE; background: var(--card) }
.mv-dots button.done { background: var(--done); border-color: var(--done) } .mv-dots button.implied { background: var(--done-soft); border-color: var(--done-soft) }
.mv-dots button.current, .mv-dots button.shifted { background: var(--cur-pale); border: 2px solid var(--cur) } .mv-dots button.shifted { border-color: var(--care) }
.mv-dots button.overdue { background: var(--red); border-color: var(--red) }
.mv-dots button.on { outline: 2px solid var(--ink); outline-offset: 1px }
/* фокус */
.mv-chips { display: flex; flex-wrap: wrap; gap: 6px }
.mv-chip { border: 0; display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; font-weight: 600; padding: 4px 10px 4px 8px; border-radius: 99px; background: var(--done-pale); color: var(--done) }
.mv-chip i { font-style: normal; font-weight: 800 } .mv-chip small { color: var(--ink-2); font-weight: 500 }
.mv-chip.on { box-shadow: inset 0 0 0 2px var(--done) }
.mv-queue { display: flex; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px }
.mv-q { border: 0; background: none; text-align: left; display: grid; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.3 }
.mv-q b { font-weight: 600 } .mv-q small { color: var(--muted); font-size: 11.5px }
.mv-q:hover, .mv-q.on { background: var(--band) } .mv-q.on { box-shadow: inset 0 0 0 2px var(--ink) }
.mv-q.overdue small { color: var(--red); font-weight: 700 } .mv-q.shifted small { color: var(--care); font-weight: 700 } .mv-q.current b { color: var(--cur) }
.mv-q.done small, .mv-q.implied small { color: var(--done) }
.mv-detail { display: grid; gap: 6px; border: 2px solid var(--ink); border-radius: 14px; padding: 8px 12px 4px; background: var(--card) }
.mv-dh { display: flex; justify-content: space-between; align-items: center }
/* доска */
.mv-board-wrap { overflow-x: auto; display: grid; gap: 10px }
.mv-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; align-items: start; min-width: 760px }
.mv-col { background: var(--band); border-radius: 12px; padding: 8px; display: grid; gap: 6px }
.mv-col.current { background: var(--cur-pale) } .mv-col.done { background: var(--done-pale) }
.mv-ch { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 0 2px 2px } .mv-ch b { font-size: 13.5px } .mv-ch span { font-size: 11.5px; color: var(--muted); font-weight: 700 }
.mv-tile { text-align: left; background: var(--card); border: 1px solid var(--line); border-left: 4px solid #D9D5CE; border-radius: 9px; padding: 6px 8px; display: grid; gap: 3px; font-size: 12.5px; line-height: 1.3 }
.mv-tile.done { border-left-color: var(--done) } .mv-tile.implied { border-left-color: var(--done-soft) } .mv-tile.done .mv-tt, .mv-tile.implied .mv-tt { color: var(--ink-2); font-weight: 500 }
.mv-tile.current { border-left-color: var(--cur) } .mv-tile.current .mv-tt { color: var(--cur) }
.mv-tile.shifted { border-left-color: var(--care) } .mv-tile.overdue { border-left-color: var(--red) } .mv-tile.overdue b { color: var(--red) }
.mv-tile.on { border-color: var(--ink); border-left-width: 4px; box-shadow: 0 4px 14px rgba(26, 26, 26, .14) }
.mv-tt { font-weight: 700 } .mv-tt i { font-style: normal; color: var(--done); margin-right: 4px }
.mv-tf { display: flex; gap: 6px; align-items: baseline; font-size: 11.5px; color: var(--muted); flex-wrap: wrap } .mv-tf b { margin-left: auto; color: var(--ink-2) } .mv-tf em { font-style: normal; color: var(--cur); font-weight: 700 }
.mv-shoot { background: var(--band); border-radius: 12px; padding: 8px; display: grid; gap: 6px; min-width: 760px }
.mv-srow { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 8px }
/* сроки */
.mv-time-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px }
.mv-time { position: relative; min-width: 760px; --nw: 250px }
.mv-thead, .mv-tr { display: grid; grid-template-columns: var(--nw) minmax(0, 1fr); width: 100% }
.mv-thead { height: 40px; background: var(--band); border-bottom: 1px solid var(--line) }
.mv-tr { border: 0; border-top: 1px solid var(--line-soft); background: none; padding: 0; text-align: left; min-height: 30px }
.mv-tr:hover { background: var(--band) } .mv-tr.on { background: var(--cur-pale) }
.mv-tn { display: flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12.5px; line-height: 1.25 } .mv-tn small { margin-left: auto; color: var(--muted); font-size: 11px }
.mv-tn i { font-style: normal; color: var(--done) } .mv-tn.current { color: var(--cur); font-weight: 700 } .mv-tn.overdue { color: var(--red); font-weight: 700 }
.mv-tn.done, .mv-tn.implied { color: var(--ink-2) }
.mv-time .mv-tt { position: relative; display: block; border-left: 1px solid var(--line); font-weight: 400 }
.mv-tg { padding: 5px 10px 3px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--band); border-top: 1px solid var(--line) }
.mv-mo { position: absolute; top: 6px; padding-left: 5px; font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap }
.mv-gl { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-soft) }
.mv-today { position: absolute; top: 0 }
.mv-today i { position: absolute; top: 22px; transform: translateX(-50%); font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--red); white-space: nowrap; background: var(--band); padding: 0 3px }
.mv-tline { position: absolute; top: 40px; bottom: 0; left: calc(var(--nw) + (100% - var(--nw)) * var(--x)); border-left: 2px solid var(--red); opacity: .6; pointer-events: none }
.mv-bar { position: absolute; top: 8px; height: 13px; border-radius: 4px; background: #E4E1DB }
.mv-bar.current { background: var(--cur) } .mv-bar.done, .mv-bar.implied { background: var(--done) } .mv-bar.overdue { background: var(--red) } .mv-bar.shifted { background: var(--care) }
.mv-bar.guess { background: repeating-linear-gradient(135deg, #E4E1DB 0 4px, #F4F2EE 4px 8px); border: 1px dashed #C9C5BE }
.mv-bar.current.guess { background: repeating-linear-gradient(135deg, #BFD0F2 0 4px, var(--cur-pale) 4px 8px); border-color: var(--cur) }
.mv-bl { position: absolute; top: 7px; padding-left: 5px; font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap }
.mv-bnote { position: absolute; left: 8px; top: 7px; font-size: 11px; color: var(--done) } .mv-bnote.muted { color: var(--muted) }
.mv-hint { font-size: 12px }
@media (max-width: 700px) { .mv-time { --nw: 170px } }

/* ---------- карточка коллекции: дорожка, матрица модели × этапы, этап по всем моделям (Софья 10.11) ---------- */
.panel.wide .p-body:has(> .mv-main.mv-v-col) { max-width: 1400px }
.panel.wide .col-side { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start }
.cpath { display: grid; grid-template-columns: minmax(0, 1.3fr) 18px minmax(0, 1fr); gap: 6px; align-items: end }
.cp-l { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px }
.cp-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px }
.cp-arrow { color: var(--muted); font-size: 18px; text-align: center; padding-bottom: 14px }
.cp-o, .cp-p { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px 7px; display: grid; gap: 1px; align-content: start; min-height: 48px; font-size: 12px; line-height: 1.25; min-width: 0 }
.cp-o b, .cp-p b { font-size: 12px; overflow-wrap: break-word; hyphens: auto } .cp-o small, .cp-p small { font-size: 11px; color: var(--muted) }
.cp-o.done, .cp-o.implied { background: var(--done-pale); border-color: var(--done-soft) } .cp-o.done b, .cp-o.implied b { color: var(--done) }
.cp-o.current, .cp-p.current { border: 2px solid var(--cur); background: var(--cur-pale); padding: 5px 6px } .cp-o.current b, .cp-p.current b { color: var(--cur) }
.cp-o.overdue, .cp-p.overdue { border: 2px solid var(--red); padding: 5px 6px } .cp-o.overdue b { color: var(--red) }
.cp-p.done { background: var(--done-pale); border-color: var(--done-soft) } .cp-p.todo { opacity: .8 }
.cp-o.on { outline: 2px solid var(--ink); outline-offset: 1px }
@media (max-width: 900px) { .cpath { grid-template-columns: minmax(0, 1fr) } .cp-arrow { display: none } }
.mats { display: grid; gap: 6px }
.mat { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 8px; align-items: center; font-size: 13px; color: var(--ink); text-decoration: none }
.mat:hover span:nth-child(2) { text-decoration: underline }
.mat small { grid-column: 2; color: var(--muted); font-size: 11.5px } .mat .ext { grid-row: span 2; font: 700 10px var(--mono); text-transform: uppercase; background: var(--band); border-radius: 6px; height: 30px; display: grid; place-items: center; color: var(--ink-2) }
/* матрица */
.cm-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px }
.cm { display: grid; min-width: 720px }
.cm > * { border-top: 1px solid var(--line-soft) }
.cm-hd, .cm-ph { background: var(--band); border-top: 0 }
.cm-ph { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); text-align: center; padding: 6px 2px 4px; border-left: 2px solid var(--card); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cm-h { border: 0; border-top: 0; background: var(--band); display: grid; align-items: end; justify-items: center; padding: 4px 0 6px; min-height: 76px; cursor: pointer }
.cm-h span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap }
.cm-h:hover span { color: var(--ink) }
.cm-m { border: 0; border-top: 1px solid var(--line-soft); background: none; text-align: left; padding: 5px 10px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 7px; align-content: center; font-size: 12.5px; min-width: 0 }
.cm-m b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis } .cm-m small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
button.cm-m:hover b { text-decoration: underline }
.cm-hd.cm-m { align-content: end; padding-bottom: 8px }
.cm-c { border: 0; border-top: 1px solid var(--line-soft); background: none; display: grid; place-items: center; padding: 4px 1px; min-height: 38px }
.cm-c i { display: block; width: 20px; height: 20px; border-radius: 5px; background: var(--card); border: 1px solid #D9D5CE }
.cm-c i.done { background: var(--done); border-color: var(--done) } .cm-c i.implied { background: var(--done-soft); border-color: var(--done-soft) }
.cm-c i.current { background: var(--cur-pale); border: 2px solid var(--cur) } .cm-c i.shifted { background: var(--care-pale); border: 2px solid var(--care) }
.cm-c i.overdue { background: var(--red); border-color: var(--red) } .cm-c i.none { background: none; border: 0 }
button.cm-c:hover i { outline: 2px solid var(--ink-2); outline-offset: 1px }
.cm-l { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-2) } .cm-l.late { color: var(--red) } .cm-l.cm-hd span { font-size: 10.5px; color: var(--muted); align-self: end; padding-bottom: 8px }
.cm-tot { background: var(--band); font-size: 11px; font-weight: 800; min-height: 30px; display: grid; place-items: center } .cm-m.cm-tot { place-items: center start }
.cm-tot.all { color: var(--done) } .cm-tot.zero { color: var(--muted) }
.cm .sel { background: var(--cur-pale) !important; box-shadow: inset 2px 0 0 var(--cur), inset -2px 0 0 var(--cur) }
.cm-h.sel span { color: var(--cur) }
/* этап по всем моделям */
.cs-panel { background: var(--card); border: 2px solid var(--cur); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px }
.cs-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start } .cs-h h3 { font-size: 17px; margin: 2px 0 } .cs-h h3 .muted { font-size: 13px; font-weight: 600 }
.cs-bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--band); border-radius: 10px; padding: 7px 10px; font-size: 13px }
.cs-rows { display: grid }
.cs-row { display: grid; grid-template-columns: 20px minmax(150px, 220px) minmax(0, 1fr) 150px auto; gap: 10px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line-soft) }
.cs-row.is-done { opacity: .6 }
.cs-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--cur) }
.cs-m { border: 0; background: none; padding: 0; text-align: left; display: grid; font-size: 13px; min-width: 0 } .cs-m b { font-weight: 700 } .cs-m:hover b { text-decoration: underline }
.cs-s { font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 3px 6px; align-items: center; min-width: 0 } .cs-s small { flex-basis: 100%; color: var(--muted); font-size: 11.5px; line-height: 1.35 }
.cs-w { font-size: 12px; color: var(--ink-2) } .cs-w.late { color: var(--red); font-weight: 700 }
.cs-a { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap }
.cs-slot { grid-column: 2 / -1 } .cs-slot:empty { display: none }
.pill { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; white-space: nowrap; background: var(--line-soft); color: var(--muted) }
.pill.cur { background: var(--cur-pale); color: var(--cur) } .pill.done { background: var(--done-pale); color: var(--done) } .pill.late { background: var(--red-pale); color: var(--red) } .pill.warn { background: var(--care-pale); color: var(--care) }
@media (max-width: 760px) { .cs-row { grid-template-columns: 20px minmax(0, 1fr); } .cs-s, .cs-w, .cs-a { grid-column: 2 } .cs-a { justify-content: flex-start } }

/* ---------- сезон: пульт коллекций с планом и прогнозом запуска (Софья 10.11) ---------- */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start }
.pc { min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; cursor: pointer; text-align: left }
.pc:hover { border-color: var(--ink-2) } .pc.alarm { border: 2px solid var(--red); padding: 13px 15px }
.pc-top { display: flex; justify-content: space-between; gap: 10px } .pc-top h3 { font-size: 18px; margin: 0 0 2px } .pc .small { font-size: 12px }
.pc-ring { width: 64px; height: 64px; flex: none } .pc-ring .rg { fill: none; stroke: var(--line-soft); stroke-width: 7 } .pc-ring .rf { fill: none; stroke: var(--cur); stroke-width: 7; stroke-linecap: round }
.pc-ring text { font: 800 14px var(--f); fill: var(--ink) }
.pc .track { display: flex; gap: 3px }
.pc-now { display: grid; font-size: 13px } .pc-now b { font-size: 14.5px }
.pc small:not(.muted) { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700 }
.pc-pf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; background: var(--band); border-radius: 10px; padding: 8px 10px }
.pc-pf > div { display: grid } .pc-pf b { font-size: 14.5px } .pc-pf .pill { margin-left: auto } .pc-pf.bad { background: var(--red-pale) }
.pc-arr { color: var(--muted); font-weight: 800 }
.pc-why { font-size: 12.5px; font-weight: 600; color: var(--red) }
.pc-lns { display: grid; gap: 2px }
.pc-ln { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; padding: 4px 0; border-top: 1px solid var(--line-soft) }
.pc-ln small.muted { font-size: 11px }
.pc-warn { flex-basis: 100%; color: var(--care); font-weight: 700; font-size: 12px }
.pc-kdh { display: grid; gap: 4px }
.pc-kd { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 4px }
.pc-kd > div { background: var(--band); border-radius: 8px; padding: 4px 7px; display: grid; font-size: 12px; line-height: 1.3 }
.pc-kd b { font-size: 12.5px } .pc-kd i { font-style: normal; font-weight: 800; color: var(--care) }
.pc-kd .late { background: var(--red-pale) } .pc-kd .late b, .pc-kd .late i { color: var(--red) } .pc-kd .shift { background: var(--care-pale) } .pc-kd .none b { color: var(--muted) }
.pc-flags { display: flex; gap: 5px; flex-wrap: wrap }
.pc-alarm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: 13px }
.pc-alarm .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px }
/* запуски сезона */
.ls { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: grid; gap: 4px }
.ls-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr) }
.ls-n { border: 0; background: none; text-align: left; font-size: 13px; font-weight: 700; padding: 6px 0; border-top: 1px solid var(--line-soft) } .ls-n:hover { text-decoration: underline }
.ls-t { position: relative; border-top: 1px solid var(--line-soft); min-height: 30px }
.ls-h { border-top: 0; min-height: 20px } .ls-grid > span:first-child { min-height: 20px }
.ls-mo { position: absolute; top: 2px; font-size: 11px; font-weight: 700; color: var(--ink-2); border-left: 1px solid var(--line); padding-left: 5px; white-space: nowrap }
.ls-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--red); opacity: .45 }
.ls-p, .ls-f { position: absolute; top: 9px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50% }
.ls-p { border: 2px solid var(--ink-2); background: var(--card) } .ls-f { background: var(--done) } .ls-f.late { background: var(--red) }
.ls-f em { position: absolute; left: 15px; top: -3px; font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--ink-2); white-space: nowrap } .ls-f.late em { color: var(--red) }
.ls-arr { position: absolute; top: 14px; height: 2px; background: var(--red) }
.ls-none { position: absolute; left: 6px; top: 7px }
@media (max-width: 700px) { .ls-grid { grid-template-columns: 110px minmax(0, 1fr) } .pc-grid { grid-template-columns: minmax(0, 1fr) } }

/* ---------- порядок внутри этапа и в карточке (Софья 10.11: «каша») ---------- */
/* полоса фаз: ничего не вылезает, сдвинутое — оранжевым */
.mv-ph { min-width: 0; overflow: hidden }
.mv-ph-t { flex-wrap: wrap; row-gap: 0 }
.mv-dots button.shifted { background: var(--care-pale); border: 2px solid var(--care) }
.mv-dots button.on { outline: 1.5px solid var(--ink); outline-offset: 2px }
/* группы этапа: подпись слева, содержимое справа */
.ex-g { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 5px 0; border-top: 1px dashed var(--line) }
.ex-g:first-child { border-top: 0 }
.ex-l { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding-top: 5px }
.ex-v { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0 }
.ex-docs .slot::before { content: ""; width: 11px; height: 11px; flex: none; background: currentColor; opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10.5 3.5 5 9a1.8 1.8 0 0 0 2.5 2.5l6-6a3 3 0 0 0-4.2-4.2L3 7.6a4.2 4.2 0 0 0 6 6L14 8.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10.5 3.5 5 9a1.8 1.8 0 0 0 2.5 2.5l6-6a3 3 0 0 0-4.2-4.2L3 7.6a4.2 4.2 0 0 0 6 6L14 8.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat }
.ex-docs .slot.add { border-width: 1px }
.ex-data { display: grid; gap: 0 }
.ex-data .slot { display: flex; flex-wrap: wrap; gap: 4px 6px; border: 0; background: none; border-radius: 0; padding: 4px 0; color: var(--ink-2); border-bottom: 1px solid var(--line-soft); cursor: default }
.ex-data .slot:last-child { border-bottom: 0 }
.ex-data .slot.ok { color: var(--ink) } .ex-data .slot b { color: var(--ink) }
.ex-data .slot.add b { color: var(--muted) }
.ex-data .checks { padding: 2px 0 }
.ex-dec .slot.add.strong { background: var(--ink); color: #fff; border-color: var(--ink) }
.ex-dec .slot.add.strong:hover { background: var(--ink-2) }
.ex-hint { font-size: 12px; color: var(--muted); padding: 2px 0 2px 106px }
@media (max-width: 600px) { .ex-g { grid-template-columns: minmax(0, 1fr) } .ex-l { padding-top: 0 } .ex-hint { padding-left: 0 } }
/* «Дальше»: по фазам, строка — этап, кто, срок */
.mv-next { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; align-items: start }
.mv-next.one { grid-template-columns: minmax(0, 1fr) }
.mv-ng { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 4px; display: grid }
.mv-nh { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 5px 8px 3px }
.mv-nr { border: 0; background: none; text-align: left; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; font-size: 12.5px }
.mv-nr:hover { background: var(--band) } .mv-nr.on { background: var(--cur-pale); box-shadow: inset 0 0 0 1.5px var(--cur) }
.mv-nr > i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #C9C5BE }
.mv-nr.current > i { border-color: var(--cur); background: var(--cur-pale) } .mv-nr.overdue > i { background: var(--red); border-color: var(--red) }
.mv-nr.shifted > i { border-color: var(--care); background: var(--care-pale) } .mv-nr.done > i { background: var(--done); border-color: var(--done) }
.mv-nn { font-weight: 600; min-width: 0 } .mv-nw { color: var(--muted); font-size: 11.5px; white-space: nowrap }
.mv-nt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); min-width: 64px; text-align: right }
.mv-nr.overdue .mv-nt { color: var(--red) } .mv-nr.shifted .mv-nt { color: var(--care) } .mv-nr.done .mv-nt { color: var(--done) }
.mv-next.one .mv-ng { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) }
.mv-next.one .mv-nh { grid-column: 1 / -1 }
/* боковая колонка: каждый раздел — своя карточка с заголовком */
.mv-side > .stack, .mv-side > .col-box, .mv-side > .note { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; gap: 8px }
.mv-side > .stack > .sub:first-child { padding-bottom: 7px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2) }
.mv-side .prod-box { border: 0; padding: 0; background: none }
.mv-side .col-box { display: grid; gap: 4px }
.mv-side .smp { border: 0; border-radius: 0; padding: 8px 0 0; border-top: 1px solid var(--line-soft) }
.mv-side .stack > .smp:first-of-type, .mv-side .sub + .smp { border-top: 0; padding-top: 0 }
.mv-side .note { background: var(--band); border: 0 }
.mv-side > .muted { padding: 0 4px }
/* цвета — компактный список */
.mv-side .colors { display: grid; gap: 0 }
.mv-side .color-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; border-top: 1px solid var(--line-soft) }
.mv-side .color-wrap:first-child { border-top: 0 }
.mv-side .color-chip { border: 0; background: none; padding: 6px 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: baseline }
.mv-side .color-chip:hover { text-decoration: underline }
.mv-side .color-chip small { grid-column: 1 / -1 }
.mv-side .color-wrap .cc-x { font-size: 11.5px; color: var(--muted) }
.mv-side .color-wrap .fslot { grid-column: 1 / -1 }
.st .pl .derived { color: var(--ink-2); font-weight: 600 }

/* ---------- разделы без каши (Софья 10.11) ---------- */
.attn { align-items: start }
.howto { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 14px }
.howto > summary { cursor: pointer; padding: 10px 0; font-size: 13px; font-weight: 700; color: var(--ink-2) }
.howto[open] { padding-bottom: 12px } .howto[open] > summary { border-bottom: 1px solid var(--line-soft); margin-bottom: 10px }
.ev { top: 24px; background: var(--sand); color: var(--ink); font-weight: 700; border: 1px solid #E6D2CB; z-index: 2 }
.track i.ph-gap { margin-left: 5px }
.fit-acts .link { color: var(--muted) } .fit-acts .link.danger { color: var(--muted) } .fit-acts .link.danger:hover { color: var(--red) }
.shoot-cell .mark.small { border-width: 1px; border-color: var(--line); color: var(--ink-2); font-weight: 600; background: var(--card) }
.shoot-cell .mark.small:not(.ghost):not(.on) { border-color: var(--ink-2); color: var(--ink) }
.shoot-cell .mark.small:hover { border-color: var(--ink) }
.tl-lock { font-size: 13px; background: var(--done-pale); border-radius: 10px; padding: 8px 10px; color: var(--ink-2) } .tl-lock b { color: var(--done) }
/* шапка широкой карточки — на всю ширину: при прокрутке широкая матрица или доска не вылезает из-под неё справа (Софья 10.11) */
.panel.wide .p-head { max-width: none }

/* ---------- решение и утверждение этапа (Софья и Лариса 10.11) ---------- */
fieldset.dec { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 10px; margin: 2px 0 0; display: grid; gap: 8px; background: var(--bg) }
fieldset.dec legend { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 4px }
fieldset.dec legend b { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 12.5px }
.who-pick { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 12.5px }
.who-pick .toggle { border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px 2px 6px; background: var(--card); display: inline-flex; gap: 4px; align-items: center }
.who-pick .toggle.need { border-color: var(--cur); background: var(--cur-pale); font-weight: 700 }
.dec-note { font-size: 12.5px; color: var(--ink-2); background: var(--band); border-radius: 8px; padding: 5px 9px; margin-top: 3px; line-height: 1.5 }
.dec-note b { color: var(--done) }
.appr-wait { font-size: 12.5px; color: var(--care); background: var(--care-pale); border-radius: 8px; padding: 5px 9px; margin-top: 3px }
.st .fact.wait { color: var(--care) }
.chip.warn { background: var(--care-pale); color: var(--care) }
.who-pick .toggle { white-space: nowrap }

/* ---------- уведомления (Софья 11.11) ---------- */
.nt-draft { background: var(--care-pale); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; max-width: 80ch; line-height: 1.5 }
.nt-list { display: grid; gap: 8px; margin-top: 8px }
.nt { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; padding: 9px 12px; display: grid; gap: 5px; min-width: 0 }
.nt.alarm { border-left-color: var(--red) } .nt.todo { border-left-color: var(--cur) } .nt.info { border-left-color: var(--done) }
.nt-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px } .nt-head .muted { margin-left: auto }
.nt-body { white-space: pre-line; font-size: 13px; color: var(--ink-2); line-height: 1.55; overflow-wrap: anywhere }
.pill.alarm { background: var(--red-pale); color: var(--red) } .pill.todo { background: var(--cur-pale); color: var(--cur) } .pill.info { background: var(--done-pale); color: var(--done) }
.tabs [data-scan] { margin-left: auto }
.nt-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline }

/* ---------- сводка-дашборд (Софья 11.11): страница «Моя сводка» и картинка в чат ---------- */
.dg { max-width: 760px; display: grid; gap: 14px; color: var(--ink) }
.dg b, .dg span, .dg dd { color: inherit }
.dg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px }
.dg-head small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted) }
.dg-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em }
.dg-head span { color: var(--ink-2); font-size: 13px }
.dg-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px }
.dg-tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 1px; min-width: 0 }
.dg-tile .dg-ti { font-size: 16px; line-height: 1 }
.dg-tile b { font-size: 22px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere }
.dg-tile span:last-child { font-size: 11.5px; color: var(--muted); line-height: 1.25 }
.dg-tile.t-late { background: var(--red-pale); border-color: transparent } .dg-tile.t-late b { color: var(--red-dark) }
.dg-tile.t-info b { color: var(--cur) } .dg-tile.t-ok b { color: var(--muted) }
.dg-tile span:last-child { color: var(--muted) }
.dg-sec { display: grid; gap: 8px }
.dg-sec h3 { font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--ink-2); padding-top: 4px }
.dg-card { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; min-width: 0 }
.dg-card.t-late { border-left-color: var(--red) } .dg-card.t-info { border-left-color: var(--cur) } .dg-card.t-ok { border-left-color: var(--done) }
.dg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px }
.dg-top b { font-size: 15px; font-weight: 800; min-width: 0 }
.dg-badge { flex: none; font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 99px; background: var(--line-soft); color: var(--ink-2); white-space: nowrap }
.dg-badge.t-late { background: var(--red-pale); color: var(--red-dark) } .dg-badge.t-ok { background: var(--done-pale); color: var(--done) }
.dg-val { font-size: 14px; font-weight: 600 }
.dg-det { margin: 2px 0 0; display: grid; gap: 7px; border-top: 1px dashed var(--line); padding-top: 8px }
.dg-det > div { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px }
.dg-det dt { font-size: 12px; font-weight: 700; color: var(--muted) }
.dg-row b { color: var(--ink-2) } .dg-head span, .dg-det dd small { color: var(--muted) }
.dg-det dd { margin: 0; font-size: 13px; color: var(--ink); min-width: 0; overflow-wrap: anywhere }
.dg-det dd small { display: block; font-size: 11px; color: var(--muted); font-weight: 700 }
.dg-det ul, .dg-pts { margin: 2px 0 0; padding-left: 16px; display: grid; gap: 2px }
.dg-pts { font-size: 13px }
.dg-act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; padding-top: 2px }
.dg-list { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden }
.dg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: baseline; padding: 9px 14px; border-top: 1px solid var(--line-soft) }
.dg-row:first-child { border-top: 0 }
.dg-row span { font-weight: 700; min-width: 0 } .dg-row b { font-weight: 500; color: var(--ink-2); text-align: right; font-size: 13px }
.dg-row a { color: var(--muted); text-decoration: none; font-size: 18px; line-height: 1 }
.dg-more { font-size: 12px; color: var(--muted); padding-left: 4px }
.dg-empty { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; font-weight: 700 }
.dg-who { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px }
.dg-confirm { background: var(--sand); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; font-size: 13px }
/* картинка в чат: фиксированная ширина, без кнопок */
.dg.shot { width: 720px; max-width: none; padding: 22px; background: var(--bg) }
@media (max-width: 560px) {
  .dg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .dg-det > div { grid-template-columns: minmax(0, 1fr); gap: 0 }
  .dg-row { grid-template-columns: minmax(0, 1fr) auto }
  .dg-row b { grid-column: 1; text-align: left }
}
