/* Кабинет админов — раскладка поверх extension/theme.css (цвета, кнопки, поля — оттуда).
 * Здесь только то, чего нет в панели: широкая страница, доска, карточка недели, графики. */

html, body { margin: 0; }
body.dt { min-height: 100vh; background: var(--bg); }
.dt a { color: inherit; text-decoration: none; }
.dt h1, .dt h2, .dt h3 { margin: 0; text-wrap: balance; }
.dt h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.dt h2 { font-size: var(--fs-title); font-weight: 600; }
.dt h3 { margin: var(--sp-4) 0 var(--sp-2); font: 600 var(--fs-caption)/1.3 var(--font); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.dt .muted { color: var(--text-3); }
.dt .small { font-size: var(--fs-small); }
.dt .r { text-align: right; }
.dt .num { font-variant-numeric: tabular-nums; }
.dt .ico { width: 16px; height: 16px; }
.dt p { margin: 0; }

/* ---------------------------------- каркас ---------------------------------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-3); background: var(--surface); box-shadow: 1px 0 0 var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 8px; }
.brand b { display: block; font-size: var(--fs-title); }
.brand small { color: var(--text-3); font-size: var(--fs-caption); }
.logo {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
}
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; font-size: var(--fs-body);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav a:hover { background: var(--surface-hover); color: var(--text); }
.nav a.on { background: var(--accent-soft); color: var(--accent-text); }
.side-foot { margin-top: auto; display: grid; gap: var(--sp-3); }
#who { display: grid; gap: var(--sp-2); }
.linkish { padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.main { padding: var(--sp-5) 32px 64px; max-width: 1400px; width: 100%; box-sizing: border-box; }

/* сегменты (переключатели из 2–3 кнопок) */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: var(--r-sm); box-shadow: var(--shadow-ring); }
.seg button {
  flex: 1; border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  padding: 5px 10px; border-radius: 6px; font: 500 var(--fs-small)/1.2 var(--font); white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), scale var(--t-fast) var(--ease);
}
.seg button:hover { color: var(--text); }
.seg button:active { scale: 0.96; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-ring); }
.seg.sm button { padding: 4px 8px; font-size: var(--fs-caption); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); color: var(--text-2); cursor: pointer; }
.switch input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }

/* ---------------------------------- шапки ----------------------------------- */
.page-h { display: grid; gap: 6px; margin-bottom: var(--sp-4); }
.week-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.week-nav h1 { margin: 0 4px; }
.dt a[aria-disabled="true"] { opacity: 0.35; pointer-events: none; }
.tag.now { background: var(--accent-soft); color: var(--accent-text); }

/* плитки-цифры студии */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.kpi {
  display: grid; align-content: start; gap: 2px; padding: 12px 14px;
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-ring);
}
.kpi-l { font-size: var(--fs-caption); color: var(--text-3); }
.kpi-v { font-size: 24px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; }
.kpi.warn .kpi-v { color: var(--warning); }

.delta { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-small); font-weight: 600; white-space: nowrap; }
.delta .ico { width: 13px; height: 13px; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.delta.flat { color: var(--text-2); }
.delta .muted { font-weight: 400; margin-left: 3px; }

/* фильтры */
.filters { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font: 500 var(--fs-small)/1.2 var(--font); cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), scale var(--t-fast) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip:active { scale: 0.96; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-text); color: var(--accent-text); }

/* цвета приоритетов (статус: значок + подпись, не только цвет) */
.p-urgent { --pc: var(--danger); }
.p-mid { --pc: var(--warning); }
.p-low { --pc: var(--accent-text); }
.p-chill { --pc: var(--text-3); }
.pd { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }

/* --------------------------------- доска ------------------------------------ */
.lane { margin-top: var(--sp-4); }
.lane-h { display: flex; align-items: center; gap: 8px; margin-bottom: var(--sp-2); }
.lane-h > i { width: 10px; height: 10px; border-radius: 3px; background: var(--pc); }
.lane-h b { font-size: var(--fs-title); }
.count { font-size: var(--fs-small); color: var(--text-3); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: var(--sp-3); }

.tile {
  position: relative; display: grid; gap: 8px; padding: 12px 14px 12px 16px;
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-ring);
  transition: box-shadow var(--t-base) var(--ease), translate var(--t-base) var(--ease);
  overflow: hidden;
}
.tile::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pc); }
.tile:hover { box-shadow: var(--shadow-pop); translate: 0 -1px; }
.tile.is-done { opacity: 0.72; }
.tile-top { display: flex; align-items: center; gap: 10px; }
.tile-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; flex: 1; }
.tile-name b { font-size: var(--fs-title); margin-right: 2px; }
.shift { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-caption); color: var(--text-2); }
.shift .ico { width: 13px; height: 13px; }
.tile-money { display: flex; align-items: baseline; gap: 8px; }
.big { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.tile-sub { font-size: var(--fs-small); color: var(--text-2); }
.tile-vac { display: flex; align-items: center; gap: 6px; padding: 18px 0; color: var(--text-3); }
.tile-foot { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: var(--fs-small); }
.tile-foot > span { display: inline-flex; align-items: center; gap: 4px; }
.tile-foot .ico { width: 14px; height: 14px; }
.tile-foot .avas { margin-left: auto; }
.tile-alert, .tile-last {
  margin: 0 -14px -12px -16px; padding: 7px 14px 8px 16px; font-size: var(--fs-small);
  border-top: 1px solid var(--border);
}
.tile-alert { display: flex; align-items: center; gap: 6px; color: var(--warning); background: color-mix(in srgb, var(--warning) 9%, transparent); font-weight: 500; }
.tile-alert .ico { width: 14px; height: 14px; }
.tile-last { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-last b { color: var(--text); font-weight: 600; }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 28px; }
.spark i { flex: 1; border-radius: 3px 3px 1px 1px; background: color-mix(in oklab, var(--accent-text) 45%, var(--surface)); }
.spark i:last-child { background: var(--accent-text); }
.spark i.partial { background: repeating-linear-gradient(135deg, var(--accent-text) 0 3px, color-mix(in oklab, var(--accent-text) 35%, var(--surface)) 3px 6px); }

.mava {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: hsl(var(--h) 55% 50% / 0.18); color: hsl(var(--h) 60% 62%); font-weight: 700; font-size: 14px;
  outline: 1px solid hsl(var(--h) 60% 60% / 0.25); outline-offset: -1px;
}
[data-theme="light"] .mava { color: hsl(var(--h) 55% 35%); }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .mava { color: hsl(var(--h) 55% 35%); } }
/* display — ещё раз: у легенды расписания (schedule.css) свой .lg с inline-flex, без этого буква уезжала влево */
.mava.lg { display: grid; width: 48px; height: 48px; font-size: 20px; }
.ava {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--surface-hover); color: var(--text); font-weight: 600; font-size: var(--fs-small);
  box-shadow: 0 0 0 2px var(--surface);
}
.ava.sm { width: 20px; height: 20px; font-size: 10px; }
.avas { display: inline-flex; }
.avas .ava + .ava { margin-left: -5px; }
.live { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-caption); color: var(--success); font-weight: 600; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 8%, transparent); } }
@media (prefers-reduced-motion: reduce) { .live i { animation: none; } .tile, .tile:hover { translate: none; } }
.done-tag { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-caption); color: var(--success); font-weight: 600; }
.done-tag .ico { width: 13px; height: 13px; }
/* в эфире по наблюдателю (12.10.2026): приват/группа — фиолетовым, «отошла» — серым без пульса */
.live.pv { color: var(--accent-text); }
.live.pv i { background: var(--accent-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-text) 22%, transparent); }
.live.away { color: var(--text-3); }
.live.away i { background: var(--text-3); box-shadow: none; animation: none; }

/* «Сейчас на смене» наверху «Недели» (12.10.2026): кого нет — сверху, полоска слева — состояние */
.now-box { margin-bottom: var(--sp-4); }
.now-box .lane-h { flex-wrap: wrap; }
.now-cnt { margin-left: auto; font-size: var(--fs-small); font-weight: 600; color: var(--danger); }
.now-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--sp-2); }
.now-row {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 12px 8px 14px;
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-ring); color: inherit; text-decoration: none;
  overflow: hidden; transition: box-shadow var(--t-base) var(--ease);
}
.now-row::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--nc); }
a.now-row:hover { box-shadow: var(--shadow-pop); }
.now-main { display: grid; gap: 1px; flex: 1; min-width: 0; }
.now-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.now-name b { white-space: nowrap; }
.now-name .small, .now-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-line { font-size: var(--fs-small); color: var(--text-2); }
.now-side { display: grid; justify-items: end; gap: 2px; flex: none; }
.now-tag { flex: none; font-size: var(--fs-caption); font-weight: 600; color: var(--nc); white-space: nowrap; }
.now-tag.warn { color: var(--warning); }
.k-on { --nc: var(--success); }
.k-bad { --nc: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.k-warn { --nc: var(--warning); background: color-mix(in srgb, var(--warning) 8%, var(--surface)); }
.k-wait { --nc: var(--text-3); }
.k-soon { --nc: var(--border-strong); }
.k-soon .now-tag { color: var(--text-3); }
.k-off { --nc: var(--accent-text); }
.k-unk { --nc: var(--border); }
.k-unk .now-tag { color: var(--text-3); }

/* ------------------------------ карточка модели ------------------------------ */
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: var(--fs-small); width: max-content; }
.crumb:hover { color: var(--text); }
.model-h { gap: 10px; }
.model-title { display: flex; align-items: center; gap: 14px; }
.model-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-top: 4px; }
.tabs a {
  padding: 8px 12px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent-text); border-color: var(--accent-text); }
.week-strip { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--sp-3); }

.card-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--sp-4); align-items: start; }
.col-main, .col-side { display: grid; gap: var(--sp-3); min-width: 0; }
.col-side { position: sticky; top: var(--sp-4); }
.panel { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-ring); padding: 14px 16px; min-width: 0; }
.panel.wide { margin-bottom: var(--sp-3); }
.panel.narrow { max-width: 760px; }
.panel-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.panel-h h2 { display: inline-flex; align-items: center; gap: 6px; }
.panel-h .btn, .panel-h .seg { margin-left: auto; }
.task { white-space: pre-wrap; line-height: 1.55; font-size: 14px; }
.task textarea { font-size: 14px; }
.row-end { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }

.pbar { flex: 1; max-width: 160px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-left: auto; }
.pbar i { display: block; height: 100%; border-radius: 3px; background: var(--success); transition: width var(--t-base) var(--ease); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checks label { display: flex; align-items: flex-start; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer; }
.checks label:hover { background: var(--surface-hover); }
.checks input { accent-color: var(--success); width: 16px; height: 16px; margin: 1px 0 0; flex: none; }
.checks input:checked + span { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.add-item { margin-top: 6px; }
.add-item .input { min-height: 30px; background: transparent; border-style: dashed; }

/* лента: смены + комментарии */
.feed { display: grid; gap: 4px; }
.shift-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 10px; margin: 6px 0 2px;
  border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-small); color: var(--text-2);
}
.shift-row b { color: var(--text); }
.shift-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-text); }
.shift-row.miss { background: color-mix(in srgb, var(--warning) 9%, var(--surface-2)); }
.shift-row.miss .dot { background: var(--warning); }
.miss-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--warning); font-weight: 600; font-size: var(--fs-caption); }
.miss-tag .ico { width: 13px; height: 13px; }
.miss-tag.sm { margin-left: 4px; }
.shift-row .live { margin-left: auto; }
.cm { display: flex; gap: 10px; padding: 10px 4px 10px 6px; }
.cm .ava { width: 30px; height: 30px; }
.cm-body { min-width: 0; flex: 1; }
.cm-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.cm-t { white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
.mention { color: var(--accent-text); font-weight: 600; }
.cm-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.file {
  position: relative; display: grid; width: 132px; padding: 0; border: 0; border-radius: var(--r-sm);
  overflow: hidden; background: var(--surface-2); cursor: pointer; text-align: left; color: var(--text);
  box-shadow: var(--shadow-ring); transition: box-shadow var(--t-fast) var(--ease), scale var(--t-fast) var(--ease);
}
.file:hover { box-shadow: var(--shadow-pop); }
.file:active { scale: 0.97; }
.file img, .file video, .file .ph { width: 100%; height: 84px; object-fit: cover; display: grid; place-items: center; }
.file img, .file video { outline: 1px solid rgba(0, 0, 0, 0.1); outline-offset: -1px; }
.ph { color: var(--text-3); background:
  linear-gradient(135deg, color-mix(in oklab, var(--accent) 16%, var(--surface-2)), color-mix(in oklab, var(--her) 14%, var(--surface-2))); }
.ph .ico { width: 22px; height: 22px; }
.fname { padding: 5px 8px 6px; font-size: var(--fs-caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vbadge {
  position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px;
  border-radius: var(--r-full); background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 10px; font-weight: 600;
}
.vbadge .ico { width: 10px; height: 10px; fill: currentColor; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gallery .file { width: auto; }
.gallery .file img, .gallery .file video, .gallery .file .ph { height: 70px; }

.composer { display: flex; gap: 10px; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.composer .ava { width: 30px; height: 30px; }
.composer-box { flex: 1; display: grid; gap: 8px; min-width: 0; }
.composer-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.composer-actions .hint { margin-left: auto; }
.composer-actions label.btn { cursor: pointer; }
.pending { display: flex; flex-wrap: wrap; gap: 6px; }
.pending:empty { display: none; }
.pfile { display: inline-flex; align-items: center; gap: 6px; padding: 2px 2px 2px 8px; border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-small); }
.pfile .ico { width: 14px; height: 14px; }

/* правая колонка */
.meta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.meta-row + .meta-row { border-top: 1px solid var(--border); }
.meta-l { font-size: var(--fs-small); color: var(--text-3); }
.sel { width: auto; min-height: 28px; padding: 3px 8px; font-size: var(--fs-small); }
.prio-pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); font-weight: 500; }
.prio-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.hero { display: grid; gap: 2px; }
.hero-v { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.mini > div { display: grid; gap: 1px; padding: 8px; border-radius: var(--r-sm); background: var(--surface-2); }
.mini span { font-size: 15px; font-weight: 650; }
.mini small { font-size: var(--fs-caption); color: var(--text-3); }
.src { display: flex; gap: 6px; align-items: flex-start; margin-top: var(--sp-3); line-height: 1.4; }
.src .ico { width: 14px; height: 14px; flex: none; margin-top: 1px; }

/* столбики по неделям */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 96px; padding-bottom: 1px; border-bottom: 1px solid var(--border); }
.bars.big { height: 170px; gap: 6px; }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; cursor: default; border-radius: 4px 4px 0 0; }
a.bar { cursor: pointer; }
.bar i { display: block; width: 100%; border-radius: 4px 4px 1px 1px; background: color-mix(in oklab, var(--accent-text) 55%, var(--surface)); transition: background-color var(--t-fast) var(--ease); }
.bar:hover i, .bar:focus-visible i { background: var(--accent-text); }
.bar.sel i { background: var(--accent-text); }
.bar.partial i { background: repeating-linear-gradient(135deg, var(--accent-text) 0 3px, color-mix(in oklab, var(--accent-text) 35%, var(--surface)) 3px 6px); }
.bar.vac i { background: var(--border); }
.bars-x { display: flex; gap: 3px; margin-top: 4px; }
.bars.big + .bars-x { gap: 6px; }
.bars-x span { flex: 1; font-size: 10px; color: var(--text-3); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bars-note { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: var(--fs-caption); flex-wrap: wrap; }
.key { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.key i { width: 10px; height: 10px; border-radius: 2px; }
.k-solid { background: color-mix(in oklab, var(--accent-text) 55%, var(--surface)); }
.k-hatch { background: repeating-linear-gradient(135deg, var(--accent-text) 0 2px, color-mix(in oklab, var(--accent-text) 35%, var(--surface)) 2px 4px); }
.bars-note .muted { margin-left: auto; }

.split { display: flex; gap: 2px; height: 12px; border-radius: 4px; overflow: hidden; }
.split i { display: block; min-width: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: var(--fs-small); color: var(--text-2); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend b { color: var(--text); font-weight: 600; }
.fans { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: f; }
.fans li { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: var(--fs-small); }
.fans li::before { counter-increment: f; content: counter(f); width: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.fans .nick { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* анкета */
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0; font-size: var(--fs-body); }
.kv dt { color: var(--text-3); font-size: var(--fs-small); padding-top: 1px; }
.kv dd { margin: 0; }
.dash { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.accts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.accts li { display: flex; align-items: center; gap: 8px; }
.accts .muted { margin-left: auto; }
.locked { background: repeating-linear-gradient(135deg, var(--surface) 0 8px, var(--surface-2) 8px 9px); }

/* таблицы */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tbl thead th { font-size: var(--fs-caption); color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.tbl .r { text-align: right; }
.tbl tbody tr { transition: background-color var(--t-fast) var(--ease); }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr:hover { background: var(--surface-hover); }
.tbl tbody th a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.tbl .mava { width: 24px; height: 24px; font-size: 11px; }

/* тепловая карта: один оттенок, светлее → темнее */
.heat td.hm {
  text-align: center; font-size: var(--fs-small); cursor: pointer; border: 2px solid var(--surface); border-radius: 6px;
  background: color-mix(in oklab, var(--accent) var(--p), var(--surface-2)); font-variant-numeric: tabular-nums; padding: 7px 6px;
}
.heat td.hm.hi { color: var(--on-accent); font-weight: 600; }
.heat td.hm.partial { background-image: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--surface) 45%, transparent) 4px 6px); }
.heat td.hm.vac { color: var(--text-3); background: var(--surface-2); }
.heat td.hm:hover { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.heat tbody tr:hover { background: transparent; }
.ramp { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ramp i { width: 140px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 8%, var(--surface-2)), var(--accent)); }

/* модели */
.mlist { display: grid; gap: 2px; }
.mrow {
  display: grid; grid-template-columns: 32px 120px 1fr 190px 150px 80px; align-items: center; gap: 12px;
  padding: 8px; border-radius: var(--r-sm); transition: background-color var(--t-fast) var(--ease);
}
.mrow:hover { background: var(--surface-hover); }
.mrow .sites { display: flex; gap: 4px; }
.mrow .avas { justify-content: flex-end; }

/* база знаний */
.kb { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3); }
.kb-item { display: grid; gap: 4px; text-align: left; border: 0; cursor: pointer; color: var(--text); font: inherit; transition: box-shadow var(--t-fast) var(--ease), scale var(--t-fast) var(--ease); }
.kb-item:hover { box-shadow: var(--shadow-pop); }
.kb-item:active { scale: 0.98; }
.kb-item .ico { color: var(--accent-text); width: 18px; height: 18px; }

/* подсказка, окно, тост */
.tip {
  position: fixed; left: 0; top: 0; z-index: 50; max-width: 300px; padding: 6px 9px; border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); font-size: var(--fs-small); line-height: 1.4;
  pointer-events: none; font-variant-numeric: tabular-nums;
}
.box { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: var(--scrim); }
.box[hidden], .tip[hidden], .toast[hidden] { display: none; }
.box-in { width: min(920px, 100%); max-height: calc(100vh - 48px); display: grid; grid-template-rows: auto 1fr; }
.box-in img, .box-in video { max-width: 100%; max-height: calc(100vh - 140px); border-radius: var(--r-sm); justify-self: center; }
.box-ph { display: grid; place-items: center; gap: 10px; padding: 48px 24px; text-align: center; border-radius: var(--r-sm); background: var(--surface-2); }
.box-ph .ico { width: 36px; height: 36px; color: var(--text-3); }
.toast {
  position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 60; padding: 9px 14px; border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-pop); font-size: var(--fs-small);
}

/* ------------------- 06.10: роли, пункты с ответственным, шаблоны, «Команда» ------------------- */
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.seg3 button { padding-inline: 4px; }
/* пункт чек-листа: справа срок, кто отметил, ответственный */
.checks .ci { display: flex; align-items: flex-start; gap: 6px; border-radius: var(--r-sm); }
.checks .ci:hover { background: var(--surface-hover); }
.checks .ci > label { flex: 1; min-width: 0; }
.checks .ci > label:hover { background: transparent; }
.ci-meta { display: flex; align-items: center; gap: 8px; flex: none; padding: 5px 6px 0 0; font-size: var(--fs-caption); color: var(--text-3); }
.ci-meta .ico { width: 12px; height: 12px; }
.ci-meta .due, .ci-meta .by { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.ci-meta .due.late { color: var(--danger); font-weight: 600; }
.ci-meta .by { color: var(--success); }
.ci-meta .by .muted { color: var(--text-3); }
.resp {
  display: inline-flex; align-items: center; gap: 5px; max-width: 140px; padding: 2px 8px 2px 2px; border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font: inherit; font-size: var(--fs-caption); cursor: pointer;
  transition: background-color var(--t-fast) var(--ease);
}
.resp:hover { background: var(--surface-hover); color: var(--text); }
.resp:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.resp.none { padding: 3px; opacity: 0; }
.ci:hover .resp.none, .resp.none:focus-visible { opacity: 1; }
.resp .rname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: none) { .resp.none { opacity: 1; } }
/* правка на месте: инструменты пункта и чек-листа — при наведении */
.ci-tools, .cl-tools, .tpl-tools { display: inline-flex; gap: 2px; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.ci:hover .ci-tools, .ci:focus-within .ci-tools, .cl .panel-h:hover .cl-tools, .cl-tools:focus-within, .tpl:hover .tpl-tools, .tpl-tools:focus-within { opacity: 1; }
@media (hover: none) { .ci-tools, .cl-tools, .tpl-tools { opacity: 1; } }
.ci-tools .btn-icon, .cl-tools .btn-icon, .tpl-tools .btn-icon { width: 24px; height: 24px; min-height: 24px; padding: 0; }
.ci-tools .ico, .cl-tools .ico, .tpl-tools .ico { width: 13px; height: 13px; }
.cl-tools { margin-left: 4px; }
.tpl-tools { margin-left: auto; }
.tpl-h .muted + .tpl-tools { margin-left: 4px; }
.inline-edit { display: flex; gap: 6px; flex: 1; min-width: 0; }
.inline-edit .input { flex: 1; min-width: 0; min-height: 30px; }
.checks .ci.editing { padding: 4px 6px; }
.checks .ci.editing:hover { background: transparent; }
.tpl-form { gap: 10px; box-shadow: inset 0 0 0 1px var(--accent-soft); }
.tpl-form .field { display: grid; gap: 4px; font-size: var(--fs-small); color: var(--text-2); }
.tpl-form textarea { resize: vertical; font: inherit; }
.toast .linkish { margin-left: 8px; }
.add-list { margin: 0 0 var(--sp-3); }
.add-list .btn { gap: 6px; }
/* перенос незакрытых пунктов прошлой недели */
.carry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 var(--sp-3); padding: 10px 14px;
  border-radius: var(--r-md); background: var(--tip-soft); color: var(--text); font-size: var(--fs-small); }
.carry > .ico { width: 15px; height: 15px; color: var(--tip); flex: none; }
/* окно выбора: ответственный, шаблон */
.pick { width: min(420px, 100%); }
.pick-list { display: grid; gap: 2px; margin-top: 8px; max-height: 60vh; overflow: auto; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.pick-row:hover { background: var(--surface-hover); }
.pick-row.on { background: var(--accent-soft); }
.pick-row .muted { margin-left: auto; }
.tpl-box { width: min(640px, 100%); }
.tpl-list { display: grid; gap: 8px; overflow: auto; }
.tpl { display: grid; gap: 6px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.tpl-h { display: flex; align-items: baseline; gap: 10px; }
.tpl-h .muted { margin-left: auto; }
.tpl p { margin: 0; }
.tpl-act { display: flex; gap: 6px; justify-content: flex-end; }
.tpl-act .input { flex: 1; min-height: 30px; }
.tpl-act .sel { flex: 0 1 180px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3); }
.tpl-grid .dash { font-size: var(--fs-small); }
/* текст анкеты и базы знаний из Kaiten */
.anketa-t { white-space: pre-wrap; line-height: 1.55; font-size: var(--fs-small); overflow-wrap: anywhere; }
.profile-grid.real { grid-template-columns: minmax(0, 1fr); }
.kb-box { width: min(760px, 100%); }
.kb-box .anketa-t { overflow: auto; font-size: var(--fs-body); }
/* «Команда» */
.tbl.team td.lists { white-space: normal; }
.tbl.team tr.left { opacity: 0.6; }
.lchip { display: inline-flex; align-items: baseline; gap: 4px; margin: 1px 4px 1px 0; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); font-size: var(--fs-caption); color: var(--text-2); }
.lchip b { color: var(--text); }
.tbl.team td.closed { min-width: 150px; }
.cbar { display: inline-block; width: 70px; height: 6px; margin-right: 8px; border-radius: 3px; background: var(--danger-soft); overflow: hidden; vertical-align: middle; }
.cbar i { display: block; height: 100%; border-radius: 3px; background: var(--success); }
.od { color: var(--danger); font-weight: 600; }
.acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.acts a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); color: var(--text); font-size: var(--fs-small); min-width: 0; }
.acts a:hover { background: var(--surface-hover); }
.acts .ico { width: 13px; height: 13px; flex: none; color: var(--text-3); }
.acts a > span:not(.act-m) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acts .act-m { margin-left: auto; flex: none; white-space: nowrap; }
.lbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lbars li { display: grid; grid-template-columns: minmax(0, 1fr) 70px 32px; align-items: center; gap: 8px; font-size: var(--fs-small); }
.lbars li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbars li i { height: 6px; border-radius: 3px; background: color-mix(in oklab, var(--accent-text) 60%, var(--surface)); }
.lbars li b { text-align: right; }

/* ------------------------------- узкие экраны ------------------------------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 980px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .col-side { position: static; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .mrow { grid-template-columns: 32px 1fr auto; }
  .mrow .sites, .mrow .avas { display: none; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; overflow-x: auto; box-shadow: 0 1px 0 var(--border); }
  .brand small, .brand b { display: none; }
  .brand { padding: 0; }
  .nav { display: flex; }
  .nav a { padding: 7px 9px; white-space: nowrap; }
  .nav a span { font-size: var(--fs-small); }
  .side-foot { display: none; }
  .main { padding: 16px 16px 48px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 6px; }
  .composer > .ava { display: none; }
  .composer-actions .hint { display: none; }
  .mrow > .muted { display: none; }
}

/* ---- кабинет на сервере (12.10.2026): вход, «кто вы в Kaiten», состояние записи ---- */
body.gated .app { display: none; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: min(420px, 100%); display: grid; gap: var(--sp-3); padding: 24px; border-radius: var(--r-lg, 14px); background: var(--surface); box-shadow: var(--shadow-pop); }
.gate-card h1 { margin: 4px 0 0; font-size: var(--fs-title); }
.gate-card .brand { padding: 0; }
.gate-tg { justify-self: stretch; min-height: 40px; }
.gate-step { display: grid; gap: 6px; justify-items: start; }
.gate-msg { margin: 0; color: var(--danger, #b42318); }
.gate-pw summary, .gate-card details summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-small); }
.gate-pw form { display: grid; gap: 8px; margin-top: 8px; }
.gate .field { display: grid; gap: 4px; font-size: var(--fs-small); color: var(--text-2); }
.gate-new { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.gate .pick-list { max-height: 46vh; }
.who-act { display: flex; gap: 6px; flex-wrap: wrap; }
.syncst { color: var(--accent); }
.add-model { margin-left: auto; display: flex; gap: 6px; }
.add-model .input { min-height: 30px; width: 200px; }
