/* YourDash — Гант. Визуал по макету 06-gantt.png.
 * Цвет нигде не единственный носитель смысла: рядом текст или иконка (R-3.3).
 */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 13px/1.45 -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  background: #f3f4f1; color: #24292f;
}

.app { display: flex; flex-direction: column; height: 100vh; }

/* Шапка */
.topbar { padding: 10px 16px 0; }
.crumbs { color: #6b7280; font-size: 12px; margin-bottom: 4px; }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
h1 { font-size: 22px; margin: 0; }
.controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #374151; }
.controls label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.controls select, .controls button { font: inherit; }
.controls .ctl-sep { width: 1px; height: 18px; background: #d7dae0; }
.view-btn, .chip-btn {
  border: 1px solid #d7dae0; background: #fff; border-radius: 14px; padding: 3px 12px; cursor: pointer;
}
.view-btn.active { background: #24292f; color: #fff; border-color: #24292f; }
.chip-btn:disabled { opacity: .45; cursor: default; }
.toggle-critical { color: #c22; font-weight: 600; }

#showmode-banner {
  margin: 8px 16px 0; padding: 6px 12px; border: 1px solid #d97706; background: #fff7ed;
  border-radius: 6px; color: #9a3412; font-weight: 600;
}

/* Статусная строка */
#statusline { padding: 6px 16px; color: #4b5563; font-size: 12px; }
#statusline code { background: #eceee9; padding: 1px 6px; border-radius: 4px; }
#statusline .ok { color: #15803d; } #statusline .bad { color: #c22; }

/* Область Ганта */
#gantt-wrap { flex: 1; margin: 0 16px; background: #fff; border: 1px solid #e2e5e9; border-radius: 8px; overflow: hidden; position: relative; }
#gantt-scroll { position: absolute; inset: 0; overflow: auto; }
#gantt { position: relative; min-width: 100%; }

.gantt-header { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid #d7dae0; }
.g-label.head { position: sticky; left: 0; z-index: 32; background: #fff; height: 46px; display: flex; align-items: flex-end; padding: 0 12px 6px; font-weight: 700; border-right: 1px solid #d7dae0; }
.tiers { position: absolute; top: 0; height: 46px; overflow: hidden; }
.tier { position: absolute; left: 0; right: 0; }
.tier-cell {
  position: absolute; top: 0; height: 23px; line-height: 23px; text-align: center;
  border-left: 1px solid #eceef1; color: #6b7280; font-size: 11px; white-space: nowrap; overflow: hidden;
}
.tier-cell.top { font-weight: 600; color: #374151; border-left-color: #d7dae0; }
.tier-cell.weekend { background: #fafbfa; }

.gantt-body { position: relative; }
.labels { position: sticky; left: 0; z-index: 20; background: #fff; border-right: 1px solid #d7dae0; float: left; }
.g-label {
  position: absolute; left: 0; width: 430px; height: 34px; line-height: 34px; padding: 0 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid #f0f1f3; background: #fff;
}
.g-label .key { color: #6b7280; font-size: 12px; }
.g-label.group { font-weight: 600; background: #fafbfc; }
.g-label.section { background: #f4f5f2; font-weight: 700; color: #4b5563; }
.g-label.absent-count { background: #fff; }
.g-label .title { font-weight: 500; }
.g-label .muted, .muted { color: #9aa1ac; font-size: 11.5px; }
.g-label .reason { color: #92400e; }
.expander { border: 0; background: none; cursor: pointer; width: 18px; color: #6b7280; font-size: 12px; }

.status { font-size: 10.5px; border-radius: 8px; padding: 1px 7px; margin-left: 4px; }
.st-done { background: #dcf5e3; color: #15803d; }
.st-inprogress { background: #dbeafe; color: #1d4ed8; }
.st-queue { background: #eceff3; color: #4b5563; }
.est { font-size: 10.5px; border: 1px solid #d7dae0; border-radius: 8px; padding: 0 6px; color: #4b5563; margin-left: 4px; }

.tag { font-size: 10.5px; border-radius: 8px; padding: 1px 7px; margin-left: 4px; white-space: nowrap; }
.tag.overdue { background: #fee2e2; color: #b91c1c; }
.tag.conflict { background: #fee2e2; color: #b91c1c; border: 1px dashed #b91c1c; }
.tag.risk { background: #fef3c7; color: #92400e; border: 1px dashed #d97706; }
.tag.shared { background: #ede9fe; color: #6d28d9; }
.tag.title-only { background: #eceff3; color: #4b5563; border: 1px solid #d7dae0; }

.tracks { position: absolute; top: 0; overflow: clip; }
.g-track-row { position: absolute; left: 0; height: 34px; border-bottom: 1px solid #f0f1f3; }
.g-track-row.section { background: #f4f5f2; }
.weekend-bg { position: absolute; top: 0; background: #fafbfa; }

/* Полосы */
.bar {
  position: absolute; top: 7px; height: 20px; border-radius: 5px; cursor: grab;
  display: flex; align-items: center; padding: 0 8px; font-size: 11px; white-space: nowrap; overflow: visible;
}
.bar.dragging { opacity: .75; cursor: grabbing; z-index: 5; }
.bar.st-done { background: #a9ecc0; color: #14532d; }
.bar.st-inprogress { background: #bfd9fb; color: #1e3a8a; }
.bar.st-queue { background: #e4e9f0; color: #374151; border: 1px solid #cfd6de; }
.bar.estimate {
  background: repeating-linear-gradient(45deg, #f1f3f5 0 6px, #e2e6ea 6px 12px);
  border: 1px dashed #9aa1ac; color: #4b5563;
}
.bar.overdue { border: 2px solid #dc2626; }
.bar.conflict { border: 2px dashed #dc2626; }
.bar.risk { border: 2px dashed #d97706; background: #fdeeda; color: #92400e; }
.bar.critical { border: 2px solid #c22; }
.bar.rollup { top: 12px; height: 10px; background: #c3cad4; border-radius: 3px; cursor: default; }
.bar.rollup.title-only { background: #a5b4c8; border: 1px dashed #64748b; }
.bar.baseline { top: 29px; height: 4px; background: #4b5563; border-radius: 2px; cursor: default; }
.bar.absence {
  background: repeating-linear-gradient(45deg, #fef3c7 0 8px, #fde68a 8px 16px);
  border: 1px solid #f59e0b; color: #92400e; cursor: default;
}
.bar-text { pointer-events: none; }
.bar-note { position: absolute; top: 9px; font-size: 11px; color: #6b7280; white-space: nowrap; }
.bar-tags { position: absolute; top: 8px; display: inline-flex; gap: 4px; white-space: nowrap; }
.cnt.zero { color: #c8cdd4; font-weight: 400; text-decoration: none; }
.no-dates { position: absolute; top: 8px; left: 6px; font-size: 11px; }

.handle { position: absolute; top: 0; width: 7px; height: 100%; cursor: ew-resize; opacity: 0; }
.handle.left { left: -2px; } .handle.right { right: -2px; }
.bar:hover .handle { opacity: 1; background: rgba(0,0,0,.18); border-radius: 3px; }
.link-dot {
  position: absolute; right: -6px; top: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid #64748b; opacity: 0; cursor: crosshair;
}
.bar:hover .link-dot { opacity: 1; }
body.linking .bar { cursor: crosshair; }
.link-hint {
  position: fixed; z-index: 100; background: #24292f; color: #fff; padding: 4px 10px;
  border-radius: 5px; font-size: 12px; pointer-events: none;
}

.milestone {
  position: absolute; top: 9px; width: 15px; height: 15px; background: #b45309;
  transform: rotate(45deg); border-radius: 2px;
}
.milestone.critical { outline: 2px solid #c22; }

.today-line { position: absolute; top: 0; width: 2px; background: #dc2626; z-index: 4; pointer-events: none; }
.today-line span {
  position: absolute; top: 2px; left: 4px; color: #dc2626; font-size: 10.5px; font-weight: 700; white-space: nowrap;
}

.absent-count { position: relative; }
.cnt { position: absolute; top: 8px; text-align: center; color: #c2410c; font-weight: 700; font-size: 11px; }
.cnt.has { text-decoration: underline; }

/* Стрелки */
.arrows { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; }
.arrow { stroke: #8a94a6; stroke-width: 1.5; fill: none; }
.arrow.conflict { stroke: #d33; stroke-width: 2; stroke-dasharray: 4 3; }
.arrow.critical { stroke: #c22; stroke-width: 2.5; }

/* Легенда и сноска */
.legend {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 8px 16px; font-size: 12px; color: #4b5563;
}
.legend .item { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 26px; height: 12px; border-radius: 3px; display: inline-block; }
.footnote {
  margin: 0 16px 12px; padding: 10px 14px; border: 1px dashed #d4a017; background: #fffbe8;
  border-radius: 8px; color: #713f12; font-size: 12.5px;
}

/* Правка структуры и создание (YD-02) */
.grip { cursor: grab; color: #b6bcc6; margin-right: 4px; user-select: none; font-size: 11px; }
.g-label:hover .grip { color: #4b5563; }
.row-ghost {
  position: fixed; z-index: 110; background: #24292f; color: #fff; padding: 4px 12px;
  border-radius: 6px; font-size: 12.5px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.drop-line { position: absolute; left: 0; width: 430px; height: 3px; background: #2563eb; z-index: 25; pointer-events: none; }
.g-label.drop-into { outline: 2px solid #2563eb; outline-offset: -2px; background: #eff6ff; }
.bar.readonly { cursor: default; opacity: .92; }

.row-actions {
  display: none; position: absolute; right: 4px; top: 6px; background: #fff;
  padding-left: 8px; box-shadow: -10px 0 8px #fff; z-index: 3;
}
.g-label:hover .row-actions { display: inline-flex; }
.row-action {
  border: 1px solid #d7dae0; background: #fff; border-radius: 10px; padding: 0 8px;
  font-size: 11px; cursor: pointer; color: #2563eb; margin-right: 4px;
}
.row-action:hover { background: #eff6ff; }
.g-label.add-row { color: #6b7280; }
.add-btn {
  border: 1px dashed #b6bcc6; background: none; border-radius: 10px; padding: 1px 12px;
  color: #2563eb; cursor: pointer; font-size: 12px;
}
.add-btn:hover { background: #eff6ff; }
.inline-input {
  width: 95%; font: inherit; padding: 3px 8px; border: 1px solid #2563eb; border-radius: 5px; outline: none;
}
.card-link { cursor: pointer; }
.card-link:hover { text-decoration: underline; }

/* Карточка тикета */
#card-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 400px; z-index: 80; background: #fff;
  border-left: 1px solid #d7dae0; box-shadow: -6px 0 24px rgba(0,0,0,.12); padding: 16px;
  transform: translateX(105%); transition: transform .18s ease; overflow: auto;
}
#card-drawer.open { transform: translateX(0); }
.card-head { font-size: 15px; display: flex; gap: 8px; align-items: baseline; margin-bottom: 12px; }
.card-close { margin-left: auto; border: 0; background: none; font-size: 20px; cursor: pointer; color: #6b7280; }
.card-grid { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; font-size: 12.5px; margin-bottom: 14px; }
.card-tabs { display: flex; gap: 6px; border-bottom: 1px solid #e2e5e9; margin-bottom: 8px; }
.card-tab { border: 0; background: none; padding: 6px 10px; cursor: pointer; color: #6b7280; font: inherit; }
.card-tab.active { color: #111827; font-weight: 700; border-bottom: 2px solid #2563eb; }
.card-body { font-size: 12.5px; }

/* Доска */
#board-wrap { flex: 1; margin: 0 16px; background: #fff; border: 1px solid #e2e5e9; border-radius: 8px; overflow: auto; }
#board { display: flex; gap: 12px; padding: 14px; min-height: 100%; }
.board-col { flex: 1; min-width: 240px; background: #f7f8f6; border-radius: 8px; padding: 10px; }
.board-col-head { font-weight: 700; color: #374151; margin-bottom: 8px; }
.board-card {
  background: #fff; border: 1px solid #e2e5e9; border-radius: 7px; padding: 8px 10px; margin-bottom: 8px;
  font-size: 12.5px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

/* Снимки и факт (YD-03) */
#snapshot-pop {
  position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 90;
  background: #fff; border: 1px solid #d7dae0; border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.18);
  padding: 14px; width: 360px; display: none;
}
#snapshot-pop.open { display: block; }
#snapshot-pop .inline-input { width: 100%; }
.bar.fact { background: #4b5563; color: #fff; cursor: default; }
.fact-tick {
  position: absolute; top: 4px; width: 3px; height: 26px; background: #111827; z-index: 4;
  pointer-events: auto; cursor: help;
}
.fact-tick.end { background: #7c2d12; }
#baseline-source { max-width: 200px; }
#shift-threshold { font: inherit; padding: 1px 4px; border: 1px solid #d7dae0; border-radius: 5px; }

/* Тост */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); z-index: 120;
  background: #7f1d1d; color: #fff; padding: 8px 18px; border-radius: 8px; font-size: 13px;
  opacity: 0; transition: all .2s ease; pointer-events: none; max-width: 70vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Загрузка и риски (YD-04) */
.cnt.load-cell.zero-norm {
  color: #92400e; background: repeating-linear-gradient(45deg, #fef3c7 0 4px, #fde68a 4px 8px);
  font-weight: 700;
}
.cnt.load-cell.overload { color: #b91c1c; background: #fee2e2; font-weight: 700; }
.cnt.load-cell.has { color: #374151; text-decoration: none; }
#risks-panel {
  position: fixed; right: 500px; bottom: 64px; width: 420px; max-height: 50vh; overflow: auto; z-index: 60;
  background: #fff; border: 1px solid #d7dae0; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.16);
  padding: 12px 14px; display: none;
}
#risks-panel.open { display: block; }
#risks-panel h3 { margin: 0 0 8px; font-size: 14px; }
#toggle-risks { border-color: #d97706; color: #92400e; }

/* Экраны YourDash (дашборд, активность, справочник, переход) */
#screen-wrap { flex: 1; margin: 0 16px; background: #fff; border: 1px solid #e2e5e9; border-radius: 8px; overflow: auto; padding: 16px; }
.screen-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.screen-head h2 { margin: 0; font-size: 18px; }
#side-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 380px; z-index: 85; background: #fff;
  border-left: 1px solid #d7dae0; box-shadow: -6px 0 24px rgba(0,0,0,.12); padding: 16px;
  transform: translateX(105%); transition: transform .18s ease; overflow: auto;
}
#side-panel.open { transform: translateX(0); }
.chip-btn.primary { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Тепловая карта */
.hm-scroll { max-width: 100%; overflow: auto; border: 1px solid #d7dae0; border-radius: 10px; background: #fff; }
.hm-grid { width: max-content; min-width: 100%; padding: 12px; }
.hm-row { display: flex; align-items: center; min-height: 38px; }
.hm-row.hm-head { min-height: 30px; color: #6b7280; font-size: 11px; }
.hm-person { position: sticky; left: -12px; z-index: 1; width: 320px; flex: none; padding: 4px 8px; background: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.hm-head .hm-person { z-index: 2; }
.hm-day { width: 36px; flex: none; text-align: center; }
.hm-cell {
  width: 32px; height: 32px; margin: 2px; padding: 0; border: 0; border-radius: 5px; flex: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font: 600 16px/1 inherit;
}
button.hm-cell:hover { outline: 2px solid #166534; outline-offset: 1px; }
button.hm-cell:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 1px; }
.hm-cell.hm-active { background: #16a34a; color: #fff; }
.hm-cell.hm-epic { background: #bbf7d0; color: #14532d; }
.hm-cell.hm-idle { background: #f1f3f5; color: #9aa1ac; }
.hm-cell.hm-absent { background: #fef3c7; color: #92400e; }
.hm-cell.hm-out { background: #e5e7eb; color: #9aa1ac; }
.hm-total { width: 112px; flex: none; padding-left: 10px; color: #6b7280; font-size: 12px; white-space: nowrap; }
.hm-legend { margin-top: 12px; flex-wrap: wrap; }
.hm-legend .hm-cell { display: inline-flex; width: 24px; height: 24px; margin-right: 4px; font-size: 13px; vertical-align: middle; cursor: default; }
@media (max-width: 700px) { .hm-person { width: 190px; } }

/* Справочник */
.dir-scroll { max-width: 100%; overflow: auto; border: 1px solid #d7dae0; border-radius: 8px; background: #fff; }
.dir-table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.dir-table th { text-align: left; padding: 6px 8px; border-bottom: 2px solid #d7dae0; cursor: pointer; white-space: nowrap; color: #374151; }
.dir-table th:focus-visible, .dir-profile:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.dir-table td { padding: 6px 8px; border-bottom: 1px solid #f0f1f3; white-space: nowrap; }
.dir-table tr:hover td { background: #f8fafc; }
.mask { color: #9aa1ac; font-size: 11px; }
.dir-profile { cursor: pointer; color: #1d4ed8; }
.dir-profile:hover { text-decoration: underline; }
.colpop { display: none; padding: 10px; border: 1px solid #d7dae0; border-radius: 8px; margin-bottom: 8px; columns: 4; font-size: 12.5px; }
.colpop.open { display: block; }
.colpop label { display: block; margin: 2px 0; }

/* Дашборд */
.empty-state { text-align: center; padding: 80px 20px; color: #374151; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: #6b7280; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.dash-widget { position: relative; border: 1px solid #e2e5e9; border-radius: 10px; padding: 18px; background: #fafbfc; }
.dash-widget.wide { grid-column: 1 / -1; }
.dash-widget-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.dash-widget-head h3 { margin: 0 0 12px; font-size: 15px; }
.dash-controls, .dash-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.dash-controls label, .dash-add label { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.dash-controls input, .dash-controls select, .dash-add input, .dash-add select, .dash-tql input { padding: 5px 7px; border: 1px solid #cbd5e1; border-radius: 5px; font: inherit; }
.dash-add input { flex: 1; min-width: 220px; }
.dash-tql { display: flex; gap: 6px; align-items: center; margin-top: 12px; color: #64748b; font-size: 11px; }
.dash-tql input { min-width: 0; width: 100%; background: #fff; }
.dash-bars { display: grid; gap: 7px; }
.dash-bar-row { display: grid; grid-template-columns: minmax(75px, 1fr) minmax(40px, 1.5fr) 28px; align-items: center; gap: 7px; font-size: 12px; }
.dash-bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bar-track { height: 10px; background: #e2e8f0; border-radius: 5px; overflow: hidden; }
.dash-bar-track i { display: block; height: 100%; background: #3b82f6; }
.dash-duo { display: flex; gap: 24px; margin-bottom: 8px; }
.dash-duo div { display: grid; }
.dash-duo b { font-size: 28px; }
.dash-duo span { font-size: 12px; }
.dash-share-box { margin: 12px 0; padding: 10px; border: 1px solid #93c5fd; border-radius: 7px; background: #eff6ff; font-size: 12px; }
.dash-share-box label { display: flex; gap: 8px; align-items: center; }
.dash-share-box input { width: min(100%, 650px); padding: 5px; }
.dash-share-box span { display: block; margin-top: 5px; }
.dash-load-scroll { overflow-x: auto; }
.dash-load-table { border-collapse: collapse; min-width: 100%; font-size: 11px; }
.dash-load-table th, .dash-load-table td { border: 1px solid #e2e8f0; padding: 5px; text-align: center; white-space: nowrap; }
.dash-load-table th:first-child { position: sticky; left: 0; background: #f8fafc; text-align: left; z-index: 1; }
.dash-load-table td small { display: block; font-size: 9px; }
.dash-load-normal { background: #dcfce7; }
.dash-load-full { background: #fef9c3; }
.dash-load-overload { background: #fed7aa; }
.dash-load-absent { background: #f1f5f9; }
.widget-value { font-size: 40px; font-weight: 700; color: #111827; }
.widget-name { font-weight: 600; color: #374151; margin-bottom: 4px; }
.widget-del { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 16px; color: #9aa1ac; cursor: pointer; }
.flow-metrics { margin-top: 24px; border-top: 1px solid #e2e5e9; padding-top: 18px; }
.flow-source { font-size: 12px; color: #475569; padding: 4px 8px; background: #eef2ff; border-radius: 6px; }
.flow-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.flow-filters label, .flow-compare label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #374151; }
.flow-filters input, .flow-filters select, .flow-compare select { max-width: 165px; padding: 5px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; }
.flow-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 12px 0; }
.flow-card, .flow-compare { border: 1px solid #dbe2eb; border-radius: 9px; background: #f8fafc; padding: 14px; font-size: 12px; line-height: 1.5; }
.flow-card h4, .flow-compare h3 { margin: 0 0 5px; font-size: 14px; }
.flow-card p, .flow-compare p { margin: 0 0 10px; color: #475569; }
.flow-card strong, .flow-compare strong { display: block; font-size: 20px; color: #0f172a; }
.flow-compare { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.flow-compare h3, .flow-compare p { width: 100%; margin-bottom: 0; }
.flow-audit { padding: 9px 12px; background: #f1f5f9; border-radius: 7px; font-size: 12px; color: #334155; }

/* Переход */
.trans-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 12px; }
.trans-cols h3 { font-size: 14px; margin: 8px 0; }
.audit-summary { padding: 8px 12px; border-radius: 7px; margin-bottom: 8px; font-weight: 600; }
.audit-summary.ok { background: #dcf5e3; color: #15803d; }
.audit-summary.warn { background: #fef3c7; color: #92400e; }
td.ok, .ok { color: #15803d; font-weight: 700; }
td.bad, .bad { color: #c22; }
.frozen-banner { padding: 8px 12px; background: #fff7ed; border: 1px solid #d97706; border-radius: 7px; color: #9a3412; margin-bottom: 8px; }
.frozen-sheet { max-height: 60vh; overflow: auto; opacity: .85; }
.dir-table.frozen { pointer-events: none; filter: grayscale(.3); }

/* Подсказки (R-3.7) */
#hint-pop {
  position: relative; max-width: 600px; margin: 10px 0; background: #1f2937; color: #f9fafb;
  border-radius: 10px; padding: 14px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.hint-head { font-size: 11px; color: #9ca3af; margin-bottom: 4px; }
.hint-title { font-weight: 700; margin-bottom: 6px; }
.hint-text { font-size: 12.5px; color: #d1d5db; line-height: 1.5; }
.hint-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hint-btns .chip-btn { background: #374151; color: #fff; border-color: #4b5563; }
.hint-btns .chip-btn.primary { background: #2563eb; border-color: #2563eb; }
.hint-target { outline: 3px solid #2563eb !important; outline-offset: 3px; }
.process-note { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 0; padding: 8px 12px; border: 1px solid #c7d2fe; border-radius: 8px; background: #eef2ff; font-size: 12.5px; }
.process-note strong { color: #1e3a8a; }
.process-note textarea { display: block; min-width: 220px; min-height: 56px; }
.process-note input { display: block; min-width: 220px; }

#profile-pop {
  position: fixed; top: 84px; right: 16px; z-index: 95; background: #fff; border: 1px solid #d7dae0;
  border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 14px; width: 320px; display: none;
}
#profile-pop.open { display: block; }

/* История */
#toggle-history { position: fixed; right: 20px; bottom: 20px; z-index: 60; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
#history-panel {
  position: fixed; right: 20px; bottom: 64px; width: 460px; max-height: 50vh; overflow: auto; z-index: 60;
  background: #fff; border: 1px solid #d7dae0; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.16);
  padding: 12px 14px; display: none;
}
#history-panel.open { display: block; }
#history-panel h3 { margin: 0 0 8px; font-size: 14px; }
.hist-entry { padding: 4px 0; border-bottom: 1px solid #f0f1f3; font-size: 12.5px; }
.hist-entry.undone { opacity: .55; text-decoration: line-through; }
