:root {
  --bg: #fff; --line: #ebecef; --line2: #f1f2f4; --text: #363b43; --muted: #8b9098; --accent: #3b82f6; --accent-bg: rgba(59,130,246,.07);
  --head-bg: #fafbfc; --section-bg: #f6f7f9; --danger: #d9534f; --today: #ef5350;
  font-family: "Segoe UI", system-ui, -apple-system, "Inter", Roboto, sans-serif; font-size: 13px; color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
body { user-select: none; -webkit-user-select: none; }
input, textarea, select { user-select: text; -webkit-user-select: text; }
body.dragging, body.dragging * { cursor: move !important; }
body.dragging-col, body.dragging-col * { cursor: col-resize !important; }
button { font: inherit; }
*::-webkit-scrollbar { width: 11px; height: 11px; } *::-webkit-scrollbar-thumb { background: #d3d6db; border-radius: 6px; border: 2px solid #fff; } *::-webkit-scrollbar-thumb:hover { background: #b9bdc4; } *::-webkit-scrollbar-track { background: #fff; }
.muted { color: var(--muted); } .small { font-size: 11px; } .dim { color: #c3c6cc; } .warn { color: #c77700; font-weight: 600; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { justify-content: center; text-align: center; }

#app { position: absolute; inset: 0; }
#topbar { height: 40px; display: flex; align-items: center; gap: 4px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--line); }
#topbar .sp { flex: 1; }
.vsep { width: 1px; height: 18px; background: var(--line); margin: 0 8px; }
.tab { border: 0; background: transparent; padding: 0 10px; height: 40px; cursor: pointer; border-bottom: 2px solid transparent; color: #6b7078; font-size: 13px; }
.tab:hover { color: var(--text); } .tab.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tab.logo { padding: 0 14px 0 4px; } .tab.logo .logo-t { font-weight: 800; letter-spacing: -.2px; font-size: 16px; background: linear-gradient(90deg, #3b82f6, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; } .tab.logo:not(.on) .logo-t { opacity: .75; }
.project-btn { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.status { font-size: 12px; color: var(--muted); margin-right: 6px; }
.status.error { color: var(--danger); font-weight: 600; } .status.saving { color: #c77700; }

.zoom { display: flex; gap: 4px; margin-left: 6px; }

.btn { border: 1px solid #d9dce1; background: #fff; border-radius: 6px; padding: 4px 11px; cursor: pointer; color: var(--text); line-height: 1.3; }
.btn:hover { background: #f4f5f7; } .btn:disabled { opacity: .35; cursor: default; background: transparent; }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: #eceef1; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: #2f6fe0; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 2px 9px; font-size: 12px; } .btn.icon { padding: 2px 8px; font-size: 14px; }
.btn.tiny { padding: 0 8px; font-size: 11px; line-height: 18px; border-radius: 5px; color: #6b7078; border-color: #e3e5e9; background: #fff; }
.btn.tiny:hover { color: var(--text); border-color: #cfd3d8; background: #f6f7f9; }
.input { border: 1px solid #d3d6dc; border-radius: 6px; padding: 5px 8px; font: inherit; width: 100%; background: #fff; }
.input:focus { outline: 2px solid #c7dcff; border-color: var(--accent); }
.icon-btn { border: 0; background: transparent; cursor: pointer; color: #8b9098; padding: 2px 6px; border-radius: 4px; } .icon-btn:hover { background: #eee; color: #333; }

/* доска: две панели с независимым горизонтальным скроллом */
#board { position: absolute; top: 40px; left: 0; right: 0; bottom: 0; display: flex; background: #fff; }
#board[hidden] { display: none; }
#left { flex: none; overflow-x: auto; overflow-y: hidden; position: relative; background: #fff; }
#linner { position: relative; min-width: 100%; }
#split { flex: none; width: 8px; cursor: col-resize; position: relative; background: #fff; z-index: 40; }
#split::after { content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; background: var(--line); transition: background .15s; }
#split:hover::after, body.dragging-col #split::after { background: var(--accent); }
#right { flex: 1; min-width: 0; overflow: auto; position: relative; }
#rinner { position: relative; min-height: 100%; }
#lhead, #rhead { position: sticky; top: 0; z-index: 25; background: var(--head-bg); border-bottom: 1px solid #dfe1e5; }
#lbody, #rbody { position: relative; }
#empty[hidden] { display: none; }
#empty { position: absolute; top: 40px; left: 0; right: 0; bottom: 0; display: grid; place-items: center; }
.empty-card { text-align: center; padding: 30px; } .empty-card h2 { margin: 0 0 6px; }
.fatal { position: fixed; left: 50%; top: 80px; transform: translateX(-50%); background: #fff3f3; border: 1px solid #f1b0b0; color: #a11; padding: 12px 18px; border-radius: 8px; z-index: 4000; }

/* левая таблица */
.lrow { display: grid; align-items: stretch; border-bottom: 1px solid var(--line2); background: #fff; position: relative; }
.lrow.lhead-row { background: var(--head-bg); font-weight: 600; font-size: 12px; color: #4b5260; border-bottom: 0; }
.lh { position: relative; padding: 0 6px; overflow: hidden; border-right: 1px solid var(--line); display: flex; align-items: center; gap: 4px; }
.lh.add-col, .lh:first-child { cursor: pointer; } .lh.add-col:hover { background: #eceef1; }
.lh.add-col { justify-content: center; font-size: 16px; color: #8b9098; }
.lh-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .colhead .lh-t { cursor: pointer; flex: 1; min-width: 0; } .lh-type { color: #aab; font-size: 10px; }
.grip { color: #b4b8bf; font-size: 10px; letter-spacing: -2px; cursor: move; user-select: none; line-height: 1; }
.colhead .grip { opacity: 0; margin-right: 2px; padding: 4px 3px 4px 0; } .colhead:hover .grip { opacity: 1; }
.lh.dragging-col { opacity: .45; }
.col-ind { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 5; pointer-events: none; }
.resizer { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 2; } .resizer:hover { background: rgba(59,130,246,.35); }
.collapse-all { font-size: 13px; color: #777; }
.cell { padding: 0 4px; overflow: hidden; display: flex; align-items: center; gap: 4px; border-right: 1px solid var(--line2); min-width: 0; }
.cell.clickable { cursor: pointer; } .cell.clickable:hover { background: #f3f7ff; }
.cell.chips { flex-wrap: nowrap; gap: 3px; }
.numcell { justify-content: center; color: #a0a5ad; font-size: 11px; position: relative; cursor: default; }
.numcell .grip { display: none; } .lrow:hover .numcell .grip { display: block; font-size: 12px; } .lrow:hover .numcell .num { display: none; }
.lrow.section .numcell .grip { display: none; } .lrow.section:hover .numcell .grip { display: block; }
.lrow.task:hover .numcell, .lrow.section:hover .numcell { cursor: move; }
.name-cell { padding: 0; position: relative; }
.cell-input { width: 100%; height: 100%; border: 0; background: transparent; font: inherit; padding: 0 6px; outline: none; text-overflow: ellipsis; }
.name-cell .cell-input { padding-right: 22px; }
.cell-input:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--accent); }
.cell-input.date { font-size: 12px; padding: 0 2px; } .cell-input:disabled { color: #9aa0a8; background: transparent; }
.lrow.section { background: var(--section-bg); }
.section-name { font-weight: 700; }
.lrow.section .name-cell { gap: 6px; } .count { font-size: 11px; padding-right: 6px; white-space: nowrap; }
.lrow.sel { background: var(--accent-bg); } .lrow.sel .cell-input:not(:focus) { background: transparent; }
.dragging-row { opacity: .45; }
.collapse { border: 0; background: transparent; cursor: pointer; color: #777; padding: 0 4px; font-size: 13px; }
.add-cell { gap: 6px; } .lrow.add, .lrow.addsection { background: #fff; }
.drop-ind { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 6; pointer-events: none; }

.ck { border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.ck .ck-c { fill: none; stroke: #cdd1d7; stroke-width: 1.4; } .ck .ck-m { stroke: #d6d9de; }
.ck0:hover .ck-c { stroke: #aab0b8; } .ck0:hover .ck-m { stroke: #aab0b8; }
.ck1 .ck-c { fill: #f5d36a; stroke: #f5d36a; } .ck2 .ck-c { fill: #f08a84; stroke: #f08a84; } .ck3 .ck-c { fill: #7fc99a; stroke: #7fc99a; }
.ck1 .ck-m, .ck2 .ck-m, .ck3 .ck-m { stroke: #fff; }
.lock { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 3px; cursor: pointer; color: #8b9098; opacity: 0; display: grid; place-items: center; border-radius: 4px; }
.lrow:hover .lock { opacity: .35; } .lock.on { opacity: .5; } .lock:hover { opacity: 1 !important; background: #eceef1; }

.chip { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 11px; line-height: 17px; white-space: nowrap; background: #e6e8eb; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9px; font-weight: 700; }
.avatars { display: inline-flex; flex: none; margin-right: 6px; }
.avatars .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 1.5px var(--bg, #fff); }
.opt-item.multi .grow { flex: 1; }
.opt-item.multi .tick { visibility: hidden; margin-left: 10px; font-size: 12px; }
.opt-item.multi.on .tick { visibility: visible; }
.avatar.big { width: 30px; height: 30px; font-size: 12px; }

/* шапка шкалы */
.th-month, .th-day { position: absolute; white-space: nowrap; font-size: 11px; }
.th-month { border-right: 1px solid #d5d9de; background: #f3f4f6; line-height: 20px; font-weight: 600; color: #3f4651; }
.th-month-t { position: sticky; left: 0; display: inline-block; padding-left: 8px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.th-day { text-align: center; line-height: 22px; color: #5f6671; border-right: 1px solid var(--line2); overflow: hidden; cursor: default; }
.th-day:hover { background: #eaf1ff; }
.th-day.we { background: #f3f4f6; color: #a0a5ad; }
.th-day.first { font-weight: 600; color: #4a5160; border-left: 1px solid #d3d6db; }
.th-day.today { background: var(--today); color: #fff; font-weight: 700; }
.th-day.marked { color: #222; font-weight: 700; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }

/* тело таймлайна */
.row-bg.section { position: absolute; left: 0; right: 0; background: rgba(0,0,0,.028); z-index: 0; pointer-events: none; }
.overlays { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.month-line { position: absolute; top: 0; width: 1px; background: #cdd1d7; }
.mark-col { position: absolute; top: 0; opacity: .32; }
.today-line { position: absolute; top: 0; width: 2px; background: var(--today); opacity: .8; }
.day-hover { position: absolute; top: 0; background: rgba(59,130,246,.06); pointer-events: none; z-index: 1; }
.day-pin { position: absolute; top: 0; background: rgba(59,130,246,.13); box-shadow: inset 1px 0 0 rgba(59,130,246,.35), inset -1px 0 0 rgba(59,130,246,.35); pointer-events: none; z-index: 1; }
.row-sel-bg { position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; } .row-sel-bg.on { background: rgba(59,130,246,.07); }
.bracket { position: absolute; height: 8px; border-radius: 1px; z-index: 2; pointer-events: none; opacity: .85; }
.bk { position: absolute; top: 8px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #6b7280; }
.bk.l { left: 0; } .bk.r { right: 0; }
.bracket .blabel.bold { font-weight: 700; top: 50%; margin-left: 10px; }
.bar { position: absolute; border-radius: 4px; z-index: 3; cursor: grab; box-shadow: 0 1px 0 rgba(0,0,0,.10), inset 0 0 0 1px rgba(0,0,0,.05); }
.bar.preview { opacity: .55; pointer-events: none; }
.bar.ro { cursor: pointer; }
.bar.locked, .ms-wrap.locked { cursor: default; }
.bar .hl, .bar .hr { position: absolute; top: 0; bottom: 0; width: 6px; cursor: ew-resize; z-index: 2; } .bar .hl { left: 0; } .bar .hr { right: 0; }
.bar.locked .hl, .bar.locked .hr { cursor: default; }
.bar.sel, .ms-wrap.sel .ms { outline: 2px solid rgba(40,80,160,.75); outline-offset: 1px; }
.drop-target { outline: 2px dashed #d9534f; outline-offset: 2px; }
.anchor { position: absolute; right: -16px; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #5a6270; display: none; z-index: 4; cursor: crosshair; }
.bar:hover .anchor, .ms-wrap:hover .anchor, .bar.sel .anchor, .ms-wrap.sel .anchor { display: block; }
.ms-wrap .anchor { right: -15px; }
.ms-wrap { position: absolute; z-index: 3; cursor: grab; } .ms-wrap.ro { cursor: pointer; }
.ms { width: 13px; height: 13px; margin: 2.5px; transform: rotate(45deg); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.blabel { position: absolute; left: 100%; margin-left: 19px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12px; pointer-events: none; color: #333; }
.bar.locked .blabel::before, .ms-wrap.locked .blabel::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 4px; vertical-align: -1px; opacity: .38; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='2' y='5.2' width='8' height='5.6' rx='1.2' fill='%23555'/%3E%3Cpath d='M4 5.2V3.8a2 2 0 0 1 4 0v1.4' fill='none' stroke='%23555' stroke-width='1.3'/%3E%3C/svg%3E") center/contain no-repeat; }
.inlabel { position: absolute; left: 6px; right: 4px; top: 0; line-height: 16px; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
svg.links { position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none; overflow: visible; }
path.link { fill: none; stroke-width: 1.8; stroke-linejoin: round; } path.link.sel { stroke-width: 3; filter: drop-shadow(0 0 2px rgba(0,0,0,.35)); } path.link.tmp { stroke-dasharray: 4 3; }
path.link-hit { fill: none; stroke: transparent; stroke-width: 10; pointer-events: stroke; cursor: pointer; }

/* Workload */
.wl-person { display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.wl-info { min-width: 0; } .wl-name { font-weight: 600; }
.wl-sep { position: absolute; left: 0; right: 0; height: 1px; background: #e2e4e8; z-index: 1; }

/* меню, попапы, диалоги */
.menu, .popover { position: fixed; z-index: 3000; background: #fff; border: 1px solid #d9dce1; border-radius: 10px; box-shadow: 0 10px 30px rgba(20,25,40,.16); padding: 4px; min-width: 190px; max-width: 360px; }
.menu-item { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 6px; cursor: pointer; }
.menu-item:hover { background: #eef4ff; } .menu-item.danger { color: var(--danger); } .menu-item.disabled { opacity: .4; cursor: default; }
.mi-check { width: 14px; color: var(--accent); font-weight: 700; } .mi-label { flex: 1; } .mi-hint { color: #aaa; font-size: 11px; }
.menu-sep { height: 1px; background: #eef0f2; margin: 4px 2px; } .menu-header { padding: 4px 8px 2px; font-size: 11px; color: #9aa0a8; text-transform: uppercase; letter-spacing: .4px; }
.palette { padding: 2px 4px 4px; width: 232px; } .pal-label { font-size: 10px; color: #9aa0a8; text-transform: uppercase; letter-spacing: .4px; margin: 6px 2px 3px; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.swatch { width: 21px; height: 21px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); display: grid; place-items: center; font-size: 11px; color: #777; flex: none; }
.swatch:hover { transform: scale(1.12); } .swatch.on { border-color: #23262b; } .swatch.none { background: #fff; } .swatch.cur { flex: none; }
.pal-custom { margin: 8px 2px 2px; padding: 5px 8px; border-radius: 6px; color: var(--accent); cursor: pointer; font-size: 12px; } .pal-custom:hover { background: #f1f6ff; }
.cp { display: flex; flex-direction: column; gap: 8px; padding: 6px 2px 2px; }
.cp-sv { position: relative; width: 100%; height: 130px; border-radius: 8px; cursor: crosshair; touch-action: none; }
.cp-hue { position: relative; height: 12px; border-radius: 6px; cursor: pointer; touch-action: none; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.cp-knob { position: absolute; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.45); transform: translate(-50%, -50%); pointer-events: none; } .cp-hue .cp-knob { top: 50%; }
.cp-row { display: flex; align-items: center; gap: 6px; } .cp-prev { width: 26px; height: 26px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; } .cp-hex { padding: 3px 6px; font-family: ui-monospace, monospace; }
.opt-list { max-height: 300px; overflow: auto; } .opt-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; } .opt-item:hover { background: #eef4ff; } .opt-item.on { background: #e5eeff; }
.opt-none { color: #9aa0a8; } .opt-cb { font-size: 14px; color: #555; }
.opt-edit { padding: 6px 8px; border-top: 1px solid #eef0f2; margin-top: 4px; cursor: pointer; color: var(--accent); font-size: 12px; } .opt-edit:hover { background: #f5f9ff; }
.opt-pop { min-width: 190px; }
.dlg-back { position: fixed; inset: 0; background: rgba(20,25,40,.28); z-index: 2500; display: grid; place-items: center; }
.dlg { background: #fff; border-radius: 12px; width: 440px; max-width: calc(100vw - 30px); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 16px 50px rgba(20,25,40,.3); }
.dlg-title { padding: 14px 18px 4px; font-size: 16px; font-weight: 700; } .dlg-body { padding: 10px 18px; overflow: auto; }
.dlg-btns { padding: 10px 18px 16px; display: flex; justify-content: flex-end; gap: 8px; }
.form { display: flex; flex-direction: column; gap: 10px; }
.opt-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; } .opts-editor, .people-list { display: flex; flex-direction: column; }

@media print {
  #topbar, #split, .dlg-back, .menu, .popover { display: none !important; }
  html, body { overflow: visible; height: auto; } #app { position: static; }
  #board { position: static; display: block; } #left, #right { overflow: visible; width: auto !important; }
  #lhead, #rhead { position: static; }
  .grip, .anchor, .resizer, .lrow.add, .lrow.addsection, .lock { display: none !important; }
  @page { size: landscape; margin: 8mm; }
}


.zbtn, .sq { border: 0; background: #3d4655; color: #fff; cursor: pointer; display: inline-grid; place-items: center; line-height: 1; }
.zbtn { width: 26px; height: 26px; border-radius: 7px; font-size: 17px; padding: 0 0 2px; }
.sq { width: 16px; height: 16px; border-radius: 5px; font-size: 13px; padding: 0 0 1px; }
.zbtn:hover, .sq:hover { background: #262d39; }
.search { width: calc(100% - 8px); height: 22px; border: 1px solid #dcdfe3; border-radius: 7px; background: #eef0f2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='6.8' cy='6.8' r='4.6' fill='none' stroke='%238a919b' stroke-width='1.6'/%3E%3Cpath d='M10.3 10.3L14 14' stroke='%238a919b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") 7px center / 12px no-repeat; font: inherit; font-weight: 500; color: #3f4651; outline: none; padding: 0 8px 0 25px; min-width: 0; }
.search::placeholder { color: #8a919b; opacity: 1; } .search:focus { background-color: #fff; border-color: #9db8ec; } .search:focus::placeholder { opacity: .5; }
#lbody .lrow { font-size: 12px; }
#left { color: #4f677f; } #left .cell-input { color: #4f677f; } #left .cell-input:disabled { color: #9aa7b5; }
#left .sq { background: #4f677f; color: #fff; } #left .sq:hover { background: #3c5168; }

/* бары: тонкий контур и лёгкая тень */
.bar { border-radius: 5px; background-image: linear-gradient(180deg, rgba(255,255,255,.15) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,.035) 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.13), inset 0 1px 0 rgba(255,255,255,.19), 2px 1px 3px rgba(20,30,50,.26); }

/* зум: маленькие бело-чёрные кнопки */
.zbtn { width: 22px; height: 22px; border-radius: 6px; font-size: 15px; padding: 0 0 2px; background: #fff; color: #23262b; border: 1px solid #d3d7dd; }
.zbtn:hover { background: #f1f3f6; border-color: #b9bfc8; }

/* левая часть чуть темнее */
#left { background: #f9fafb; } #left .lrow { background: #f9fafb; border-bottom-color: #e2e5e9; } #left .cell { border-right-color: #e2e5e9; } #left .lrow.lhead-row { background: #f3f4f7; }
#left .lrow.section { background: #eff1f4; } #left .lrow.add, #left .lrow.addsection { background: #f9fafb; }
#left .lrow.sel { background: #e8f0fd; }

/* вкладки не меняют ширину при переключении */
.tab, .tab.on { font-weight: 600; }

/* доска шотов и таблица шотов — iframe на весь экран со своей шапкой (40px, тот же переключатель) */
.frame { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #fff; z-index: 50; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .22s ease, visibility 0s linear .22s; }
.frame.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .3s ease; } .frame iframe { width: 100%; height: 100%; border: 0; display: block; }
#topbar { transition: opacity .25s ease; } body[data-tab="shots"] #topbar, body[data-tab="table"] #topbar { opacity: 0; pointer-events: none; } 

/* ---------- «Настройки»: люди и теги ---------- */
#topbar .btn.on { background: #eceef1; font-weight: 600; }
#settings { position: fixed; inset: 0; z-index: 2400; background: rgba(20,25,40,.28); display: grid; place-items: center; color: #4f677f; font-size: 12px; }
#settings[hidden] { display: none; }
.st-wrap { display: flex; min-height: 100%; }
.st-nav { flex: none; width: 190px; background: #f9fafb; border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.st-nav-t { font-weight: 700; font-size: 13px; padding: 0 8px 8px; }
.st-nav-b { display: flex; justify-content: space-between; align-items: center; border: 0; background: transparent; border-radius: 6px; padding: 6px 8px; cursor: pointer; font-size: 12px; color: #4f677f; text-align: left; }
.st-nav-b:hover { background: #eceef1; } .st-nav-b.on { background: #e5eeff; color: #23262b; font-weight: 600; }
.st-cnt { color: #8b9098; font-weight: 400; }
.st-body { flex: 1; min-width: 0; max-width: 640px; padding: 18px 24px; }
.st-title { font-size: 15px; font-weight: 700; color: #23262b; } .st-hint { margin: 4px 0 14px; }
.st-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line2); }
.st-name { flex: 1; min-width: 0; font-size: 12px; color: #4f677f; border-color: transparent; background: transparent; } .st-name:hover { border-color: #d3d6dc; background: #fff; } .st-name:focus { background: #fff; color: #23262b; }
.st-use { flex: none; min-width: 90px; text-align: right; }
.st-row .icon-btn:disabled { opacity: .25; cursor: default; } .st-row .icon-btn:disabled:hover { background: transparent; color: #8b9098; }
.st-add { display: flex; gap: 8px; margin-top: 12px; } .st-add .btn { flex: none; white-space: nowrap; } .st-add-in { font-size: 12px; }
.st-msg { color: var(--danger); min-height: 16px; margin-top: 6px; }
@media (max-width: 640px) { .st-nav { width: 110px; } .st-body { padding: 14px 12px; } .st-use { display: none; } }

/* ---------- v2: вход, доступ, режим просмотра ---------- */
#login { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 3000; }
#login[hidden] { display: none; }
body[data-auth="out"] #topbar, body[data-auth="out"] #board, body[data-auth="out"] .frame, body[data-auth="out"] #empty { display: none; }
.login-card { display: flex; flex-direction: column; gap: 12px; width: 320px; max-width: calc(100vw - 32px); padding: 26px 24px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 40px rgba(20,25,40,.12); }
.login-logo { font-weight: 800; font-size: 22px; letter-spacing: -.3px; background: linear-gradient(90deg, #3b82f6, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-err { color: var(--danger); font-size: 12px; min-height: 16px; }
.share-page { display: grid; place-items: center; height: 100%; }
.project-label { font-weight: 600; max-width: 320px; padding: 0 6px; }
.ro-badge { font-size: 11px; font-weight: 600; color: #7a5c00; background: #fff3cf; border: 1px solid #f0dc9b; border-radius: 999px; padding: 2px 10px; margin-right: 6px; white-space: nowrap; }
.sec-title { font-weight: 700; margin-top: 6px; }
.share-pw { display: flex; gap: 6px; } .share-pw .input[hidden] { display: none; }
.share-list { display: flex; flex-direction: column; gap: 6px; }
.share-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.share-row.dead { opacity: .55; } .share-info { min-width: 0; }
.badge { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: #e7f6ec; color: #25703f; }
.badge.revoked, .badge.expired { background: #f1f2f4; color: #6b7078; }
.share-result { display: flex; flex-direction: column; gap: 6px; } .share-result:empty { display: none; }
.share-url { display: flex; gap: 6px; }
/* режим просмотра (защита — на сервере, здесь только скрываем лишнее) */
body.ro .lrow.add, body.ro .lrow.addsection, body.ro .lh.add-col, body.ro .grip, body.ro .lock, body.ro .anchor, body.ro .bar .hl, body.ro .bar .hr { display: none !important; }
body.ro .cell-input, body.ro .ck, body.ro .cell.clickable, body.ro .lh-t { pointer-events: none; }
body.ro .bar, body.ro .ms-wrap { cursor: default; }

/* единый переключатель [Ohmygant | Шоты | Таблица]: один размер (232×28) и место в Ганте, на доске и в таблице */
.modesw { flex: none; display: inline-flex; align-items: center; height: 28px; padding: 2px; margin-right: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--section-bg); font-size: 13px; }
.modesw:hover { border-color: #d3d6db; }
.modesw > button { display: inline-flex; align-items: center; justify-content: center; height: 22px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: #6b7078; cursor: pointer; transition: background .15s, box-shadow .15s, color .15s; }
.modesw > button:hover { color: var(--text); }
.modesw > button.on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); color: var(--text); cursor: default; }
.modesw .ms-a { width: 96px; } .modesw .ms-b { width: 58px; } .modesw .ms-c { width: 72px; }
.modesw .logo-t { font-weight: 800; letter-spacing: -.2px; font-size: 14px; background: linear-gradient(90deg, #3b82f6, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .6; }
.modesw .on .logo-t { opacity: 1; }

.st-modal { position: relative; width: min(780px, 94vw); height: min(540px, 88vh); background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 50px rgba(20,25,40,.3); }
.st-card { height: 100%; overflow: auto; } .st-card .st-wrap { min-height: 100%; }
.st-x { position: absolute; top: 8px; right: 10px; z-index: 2; border: 0; background: transparent; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; color: #8b9098; font-size: 14px; } .st-x:hover { background: #eceef1; color: #23262b; }
.st-prow { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; max-width: 520px; } .st-prow .input { font-size: 12px; }
.shot-q { margin: 6px; width: calc(100% - 12px); box-sizing: border-box; font-size: 12px; }

.shot-ico { display: inline-flex; color: #5b6b7c; } .shot-ico.off { opacity: .3; }
.shot-prev { position: fixed; z-index: 3000; display: flex; flex-wrap: wrap; gap: 8px; max-width: 460px; padding: 8px; background: #fff; border: 1px solid #d5dae0; border-radius: 10px; box-shadow: 0 8px 28px rgba(20,30,50,.22); pointer-events: none; }
.shot-prev figure { margin: 0; } .shot-prev img { display: block; width: 210px; max-height: 140px; object-fit: contain; background: #f2f4f6; border-radius: 6px; }
.shot-prev.one img { width: 340px; max-height: 230px; }
.shot-prev figcaption { font-size: 11px; color: #5b6b7c; margin-top: 3px; text-align: center; }
.shot-prev .more { align-self: center; font-weight: 700; color: #5b6b7c; padding: 0 6px; }
.avatars.sq .avatar { border-radius: 4px; }
.cell.auto, .cell.auto:hover { background: #f1f3f5; }
.avatar.ring { box-sizing: border-box; border: 2px solid #c9c9c9; background: #eef0f3; color: #3a4250; }
.cell.auto.clickable:hover { background: #e8ebef; }
.shot-qrow { display: flex; align-items: center; gap: 6px; margin: 6px; } .shot-qrow .shot-q { margin: 0; flex: 1; width: auto; } .shot-auto { flex: none; padding: 3px 7px; display: inline-flex; } .shot-msg { padding: 0 10px 4px; min-height: 14px; }

/* переключатель Гант | Workload по центру шапки, в виде заметной «таблетки» */
.viewsw { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 3px; border-radius: 9px; background: #e9ecf0; }
.viewsw .tab { height: 24px; padding: 0 18px; border: 0; border-radius: 7px; font-size: 13px; font-weight: 600; color: #6b7078; }
.viewsw .tab:hover { color: var(--text); background: rgba(255,255,255,.55); }
.viewsw .tab.on { background: #fff; color: var(--accent, #2f6fed); box-shadow: 0 1px 3px rgba(20,30,50,.18); cursor: default; }

.wl-link { position: absolute; width: 1px; margin-left: -.5px; background: rgba(60,70,90,.4); opacity: .9; z-index: 0; pointer-events: none; }
