/* Цвета Shobick (111/business/assets/brand-guidelines.md): оливковый #494F39, беж #ECDFCA, чёрный, белый.
   Красный - только для просрочек и ошибок, в брендбуке его нет. Украшательство - этап Б. */
:root { --olive: #494F39; --beige: #ECDFCA; --bg: #f6f1e8; --card: #fff; --ink: #1b1b18; --muted: #6a6a62;
        --line: #e6dfd2; --err: #b3261e; --err-bg: #fbe9e7; --ok-bg: #eef0e6;
        --mustard: #B8962E; --mustard-ink: #7A6418; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
header { padding: 12px 16px 0; background: var(--olive); color: #fff; }
header .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 10px; }
header a, header button.link { color: #fff; }
/* И36: вкладки разделов, как в браузере - открытая светлая и сливается со страницей, другие темнее, с рамкой */
header nav.tabs { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
header .tab { display: inline-block; padding: 10px 22px; min-height: 44px; font-size: 1.05rem; font-weight: 600; text-decoration: none;
  border: 1px solid rgba(255,255,255,.35); border-bottom: 0; border-radius: 10px 10px 0 0; background: rgba(255,255,255,.12); color: #fff; }
header .tab:hover { background: rgba(255,255,255,.24); }
header .tab.on { background: var(--bg); color: var(--ink); border-color: var(--bg); }
header form { margin: 0; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: .02em; }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
.card { background: var(--card); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.06); overflow-wrap: anywhere; overflow-x: auto; }
.card.overdue { border-left: 6px solid var(--err); }
.login { max-width: 360px; margin: 40px auto; display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid #cfc8ba; border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%; }
button { font: inherit; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--olive); color: #fff; cursor: pointer; }
button.secondary { background: var(--beige); color: var(--ink); }
a.button { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 8px; background: var(--olive); color: #fff; text-decoration: none; }
a.button.secondary { background: var(--beige); color: var(--ink); }
button.danger { background: #fff; color: var(--err); border: 1px solid var(--err); }
button.link { background: none; padding: 0; min-height: 0; text-decoration: underline; }
a { color: var(--olive); }
h1 { margin: 0 0 4px; font-size: 1.5rem; }
h2 { margin: 0 0 8px; font-size: 1.1rem; }
.big { font-size: 1.15rem; font-weight: 600; margin: 4px 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; margin: 0; }
.error, .err { color: var(--err); font-weight: 600; }
.flash { background: var(--ok-bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; font-weight: 600; }
.flash.warn { background: var(--err-bg); color: var(--err); }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.row { display: flex; flex-direction: column; gap: 2px; }
.row .who { font-weight: 600; font-size: 1.05rem; text-decoration: none; color: var(--ink); }
.row .meta { color: var(--muted); font-size: .9rem; }
.row.late .meta:first-of-type { color: var(--err); }
.tel { display: inline-block; padding: 6px 0; font-weight: 600; text-decoration: none; color: var(--olive); }
.tel.big { display: block; font-size: 1.3rem; padding: 8px 0; }
.comment { white-space: pre-line; background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 8px; }
details.comment summary { cursor: pointer; list-style: none; }
details.comment summary::-webkit-details-marker { display: none; }
details.comment[open] summary .muted { display: none; }
details.later summary { cursor: pointer; font-weight: 600; color: var(--olive); padding: 10px 0; min-height: 44px; }
.script { border-left: 4px solid var(--beige); padding-left: 12px; }
.script p { margin: 0 0 4px; }
.hint { font-size: .9rem; color: var(--muted); margin: 6px 0; }
.stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.stack:last-child { margin-bottom: 0; }
.choices { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.choice { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; min-height: 44px; }
.choice input { width: 20px; height: 20px; margin: 0; }
form.inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
form.inline select { flex: 1 1 160px; }
.row form.inline { flex-basis: 100%; flex-wrap: nowrap; }   /* И34: список и кнопка у каждого клиента одной строкой под названием, не уезжают вправо */
.row form.inline select { flex: 0 1 320px; min-width: 0; }
.row form.inline button { flex: 0 0 auto; white-space: nowrap; overflow-wrap: normal; }   /* на телефоне сжимается список, а не слово «Назначить» */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.sync { margin: 0 0 12px; font-size: .9rem; }
.sync.stale { background: var(--err-bg); color: var(--err); font-weight: 600; padding: 10px 12px; border-radius: 8px; }
/* А5: экран «Отдел» */
.mgr { padding: 12px 0; border-bottom: 1px solid var(--line); }
.mgr:last-of-type { border-bottom: 0; }
.mgr-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 8px; }
/* И46: имя крупно, за ним деревце его ступени (без анимации) и подпись */
.mgr-head b { font-size: 1.3rem; }
.mgr-head svg.mtree { width: 64px; height: 64px; flex: 0 0 64px; }
.mgr-head .stage { color: var(--olive); font-weight: 600; font-size: .9rem; }
svg.tree.still.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tree.still * { animation: none !important; }
.note { font-size: .85rem; background: var(--beige); border-radius: 6px; padding: 2px 8px; }
.nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }   /* И42: + «сделано» первой */
.num { background: var(--bg); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.num .n { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.num .l { font-size: .8rem; color: var(--muted); }
.num.bad { background: var(--err-bg); }
.num.bad .n { color: var(--err); }
.num .l { overflow-wrap: normal; }   /* «поговорили» не рвётся посреди слова */
/* И39: подпись плашки - заметная, а не сноской; плашка нажимается - под строкой менеджера раскрывается список клиентов */
.num .l b { display: block; font-size: .95rem; font-weight: 700; color: var(--ink); margin: 2px 0 3px; line-height: 1.25; }
label.num { cursor: pointer; border: 1px solid transparent; box-shadow: 0 1px 3px rgba(0,0,0,.1); position: relative; padding-right: 26px; }
label.num::after { content: "▸"; position: absolute; right: 10px; top: 10px; color: var(--olive); font-weight: 700; }
label.num:hover { border-color: #cfc8ba; }
.mgr input.tg { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mgr { position: relative; }
.tg.late:focus-visible ~ .nums .num.late, .tg.unconfirmed:focus-visible ~ .nums .num.unconfirmed, .tg.marks:focus-visible ~ .nums .num.marks { outline: 2px solid var(--olive); }
.drill { display: none; margin: 8px 0 4px; padding: 8px 12px; border-left: 4px solid var(--olive); background: #FBF8F2; border-radius: 0 8px 8px 0; }
.drill-t { font-weight: 700; margin: 0 0 4px; }
.num.good { background: #EEF0E4; } .num.good .n { color: var(--olive); }   /* И42: сделанное - светлая олива брендбука */
.tg.done:checked ~ .drill.done, .tg.late:checked ~ .drill.late, .tg.unconfirmed:checked ~ .drill.unconfirmed, .tg.marks:checked ~ .drill.marks { display: block; }
.tg.done:checked ~ .nums .num.done { border-color: var(--olive); }
.tg.done:checked ~ .nums .num.done::after { content: "▾"; }
.tg.done:disabled ~ .nums .num.done { cursor: default; box-shadow: none; }
.tg.done:disabled ~ .nums .num.done::after { content: ""; }
.tg.done:focus-visible ~ .nums .num.done { outline: 2px solid var(--olive); }
.tg.late:checked ~ .nums .num.late, .tg.unconfirmed:checked ~ .nums .num.unconfirmed, .tg.marks:checked ~ .nums .num.marks { border-color: var(--olive); }
.tg.late:checked ~ .nums .num.late::after, .tg.unconfirmed:checked ~ .nums .num.unconfirmed::after, .tg.marks:checked ~ .nums .num.marks::after { content: "▾"; }
.tg.late:disabled ~ .nums .num.late, .tg.unconfirmed:disabled ~ .nums .num.unconfirmed, .tg.marks:disabled ~ .nums .num.marks { cursor: default; box-shadow: none; }
.tg.late:disabled ~ .nums .num.late::after, .tg.unconfirmed:disabled ~ .nums .num.unconfirmed::after, .tg.marks:disabled ~ .nums .num.marks::after { content: ""; }
@media (max-width: 599px) {   /* И38: на телефоне плашки одна под другой - цифра слева, подпись строкой справа */
  .nums { grid-template-columns: 1fr; gap: 6px; }
  .num { flex-direction: row; align-items: center; gap: 12px; }
  .num .n { flex: 0 0 2.2rem; text-align: center; }
}
.quote { font-style: italic; }
table.kv td:last-child { text-align: right; }
table.kv .muted { display: block; font-size: .85rem; }
label.small { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; flex: 1 1 140px; min-width: 0; }
label.small input { min-width: 0; flex: 1; }
.demo { background: var(--beige); border: 2px dashed var(--olive); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-weight: 700; }
.telegram { background: #e7f1fb; border-radius: 12px 12px 12px 2px; padding: 10px 14px; margin: 0 0 8px; display: inline-block; }
/* А5б И6: «Мой день» плотнее - звонки одной карточкой, на компьютере клиент и номера в одну строку */
main.mid { max-width: 880px; }
.card p { margin: 4px 0; }
.card h1 + p { margin-top: 0; }
/* И7: повод звонка - своя рамка с ярлыком; только цвета брендбука (оливковый, беж), день после выдачи отличает группы */
.grp { border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; overflow: hidden; }
.grp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; background: var(--beige); padding: 6px 12px; }
.tag { background: var(--olive); color: #fff; font-weight: 700; font-size: .85rem; padding: 2px 10px; border-radius: 999px; }
.grp-why { font-size: .85rem; }
.grp .list { padding: 0 12px; }
.phones { margin: 4px 0; }
.phones.big { font-size: 1.2rem; }
.phones .tel { white-space: nowrap; }
.tel { padding: 2px 0; }
.tel.big { padding: 4px 0; }
@media (min-width: 700px) {
  main.mid .row { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
  main.mid .row .phones { margin-left: auto; }
}
/* А5б И9-И10: кнопки выглядят кнопками (тень), отметки в ряд, клиент на «Моём дне» - кнопка */
button:not(.link) { box-shadow: 0 1px 2px rgba(0,0,0,.20), 0 3px 8px rgba(0,0,0,.10); transition: box-shadow .15s, transform .15s; }
button:not(.link):hover { box-shadow: 0 2px 4px rgba(0,0,0,.22), 0 6px 14px rgba(0,0,0,.12); }
button:not(.link):active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0,0,0,.20); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.btn-row form { margin: 0; flex: 1 1 220px; display: flex; }
.btn-row button { flex: 1; }
/* светлее полосы с ярлыком: тот же фирменный беж, разбавленный белым (Ирина: «тот же тон, но светлее, не бросается») */
.row a.who { display: block; align-self: stretch; background: #FBF8F2; color: var(--ink); padding: 5px 12px;
             border: 1px solid #EEE5D6; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06); transition: box-shadow .15s; }
.row a.who::after { content: " ›"; color: var(--olive); font-weight: 700; }
.row a.who:hover { background: #F6EFE4; box-shadow: 0 2px 4px rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.08); }
@media (min-width: 700px) { main.mid .row a.who { flex: 0 0 320px; width: 320px; } }   /* И12: одна ширина у всех, длинное название переносится внутри */
@media (prefers-reduced-motion: reduce) { button, .row a.who { transition: none; } }
@media (min-width: 900px) { .choice { min-height: 30px; } }   /* компьютер: исходы плотнее; на телефоне - во весь палец (44 px) */
/* И13: отметки - одинаковые светлые кнопки с тонкой рамкой (как клиенты на «Моём дне»); от случайного «навсегда» держит галочка */
button.soft { background: #FBF8F2; color: var(--ink); border: 1px solid #E3D7C3; box-shadow: 0 1px 2px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06); }
button.soft:hover { background: #F6EFE4; }
/* И14: «Что сказать» - главная мысль на виду, скрипт раскрывается кнопкой */
.why { font-size: 1.05rem; }
details.script-box { margin-top: 8px; }
details.script-box > summary { display: block; text-align: center; font-style: italic; cursor: pointer; list-style: none; background: #FBF8F2; border: 1px solid #E3D7C3;
  border-radius: 8px; padding: 3px 14px; font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06); }
details.script-box > summary::-webkit-details-marker { display: none; }
details.script-box > summary::after { content: " ▸"; color: var(--olive); }
details.script-box[open] > summary::after { content: " ▾"; }
details.script-box[open] > summary { margin-bottom: 10px; }
/* И17, И19: внизу «Моего дня» два блока по статусу, спокойно, без кнопок. Красный - просрочено (вверху),
   горчичный - перенесено (ещё ждёт), зелёная галка - отработано. Горчичный - как красный, исключение из брендбука
   только для статуса: тёмный, оливково-горчичный, чтобы не спорил с фирменными цветами. */
.card.done { background: #FBF8F2; border-left: 6px solid var(--olive); }
.card.done h2 { color: var(--olive); }
.card.moved { background: #FBF6E6; border-left: 6px solid var(--mustard); }
.card.moved h2 { color: var(--mustard-ink); }
/* знак переноса - квадрат как у ✅, но горчичный: перенос не «сделано» (И19) */
.sq-moved { display: inline-flex; align-items: center; justify-content: center; width: 1.15em; height: 1.15em; border-radius: .22em;
            background: var(--mustard); color: #fff; font-size: .95em; line-height: 1; vertical-align: -.12em; }
.who-moved { color: var(--mustard-ink); font-weight: 600; text-decoration: none; }
.who-done { color: var(--olive); font-weight: 600; text-decoration: none; }
/* И22, И23: экран после претензии - одно действие. Кнопка как наши (светлая, тонкая рамка, тень), но пастельно-красная:
   видно, что нажать надо, и глаз не режет */
.card.claim-done { border-left: 6px solid #D9A39C; }
.card.claim-done .quote { font-style: italic; color: var(--muted); margin: 4px 0 14px; }
a.btn-claim { display: block; text-align: center; background: #F8E4E0; color: #8A2A22; font-weight: 600; text-decoration: none;
              border: 1px solid #E5B9B2; border-radius: 8px; padding: 12px 16px; min-height: 44px;
              box-shadow: 0 1px 2px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06); transition: box-shadow .15s; }
a.btn-claim:hover { background: #F4D9D4; box-shadow: 0 2px 4px rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.08); }
a.btn-claim:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0,0,0,.20); }
@media (prefers-reduced-motion: reduce) { a.btn-claim { transition: none; } }

/* И35: «На назначение» у РОПа - отдельный блок: шапка оливковой полосой во всю ширину карточки, текст по центру */
.card.assign { padding-top: 0; overflow: hidden; }
.card.assign > h2.band { margin: 0 -18px 12px; padding: 12px 18px; background: var(--olive); color: #fff; text-align: center; }

/* И43: победы - цветок с нашего дерева вместо 🎉 */
svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.row.win .who { display: inline-flex; align-items: center; gap: 8px; }
svg.winflower { width: 30px; height: 30px; flex: 0 0 30px; }
/* И55: «На назначение» - пояснения рядом с клиентом, а не между клиентом и выбором менеджера (Ирина, 22.10.2026).
   Компьютер: справа от кнопки клиента, переносятся внутри своей колонки; телефон: клиент, сразу выбор, пояснения под ним */
.assign .row .meta { order: 2; }
.assign .row form.inline { order: 1; }
@media (min-width: 700px) {
  .assign .row .meta { order: 0; flex: 1 1 200px; min-width: 0; }
  .assign .row form.inline { order: 0; }
}

/* ---------- А5в: замечания ---------- */
header .top-r { display: flex; align-items: center; gap: 14px; }
header a.fb-btn { font-size: .9rem; text-decoration: none; padding: 4px 10px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; white-space: nowrap; }
header a.fb-btn:hover { background: rgba(255,255,255,.15); }
header .badge { display: inline-block; min-width: 1.4em; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--mustard); color: #fff; font-size: .85rem; text-align: center; }
fieldset.chips { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.chips legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 9px 16px; border: 1px solid #cfc8ba; border-radius: 999px; background: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.chip input:checked + span { background: var(--olive); color: #fff; border-color: var(--olive); }
.chip input:focus-visible + span { outline: 2px solid var(--olive); outline-offset: 2px; }
label.fld { display: block; font-weight: 600; margin: 0 0 12px; }
label.fld .muted { font-weight: 400; }
label.fld textarea, label.fld input[type=file] { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; font-weight: 400; }
.fb-send { display: flex; align-items: center; gap: 16px; }
.fb-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.fb-text { white-space: pre-line; margin: 6px 0; }
.fb-reply { background: var(--ok-bg); border-radius: 8px; padding: 6px 10px; }
.st { font-size: .85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--bg); }
.st-new { background: #F6EFD9; color: var(--mustard-ink); }
.st-done { background: var(--ok-bg); color: var(--olive); }
.st-wont { color: var(--muted); }
.fb-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.fb-filter label { display: flex; flex-direction: column; font-size: .9rem; color: var(--muted); }
.fb-item.new { border-left: 6px solid var(--mustard); }
.fb-set { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fb-set input[name=reply] { flex: 1 1 220px; }
/* И56: форма замечания - только поле и скрин */
.fb-form textarea { display: block; width: 100%; box-sizing: border-box; margin: 4px 0 10px; }
.fb-file { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; margin: 0 0 12px; color: var(--muted); }
.fb-file input[type=file] { border: 0; padding: 0; background: none; font-size: .9rem; max-width: 100%; }
.fb-file input[type=file]::file-selector-button { font: inherit; padding: 8px 14px; margin-right: 10px; border: 1px solid #cfc8ba; border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
