/* SeoPositions — стили по одобренному макету «Интерфейс SeoPositions» (13.09.2026).
   Токены взяты из макета: фон #f5f6f8, акцент #3451d1, зоны топа z3…z100, шрифты Onest и IBM Plex Mono. */
:root {
  --bg: #f5f6f8; --panel: #fff; --line: #e6e8ec; --line2: #eceef2; --ink: #15181d; --muted: #6b7280; --faint: #9aa1ab;
  --accent: #3451d1; --accent-ink: #233aa6; --accent-soft: #eef1fd;
  --up: #15803d; --down: #c2410c; --warn: #b7791f; --warn-soft: #fdf0d8; --bad: #a3341b; --bad-soft: #fbdcd3;
  --z3: #cfeee0; --z10: #e4f4ec; --z30: #fbf1d3; --z50: #fde5cf; --z100: #f9dcdc; --zn: #eff1f4;
  --rail: #111418; --rail2: #262b33;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 13px/1.4 Onest, "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; cursor: pointer; }
a:hover { color: var(--accent-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); }
.small { font-size: 12px; } .xs { font-size: 11px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex-grow: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* кнопки и переключатели */
.btn { height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid #e3e6eb; background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 500; }
.btn:hover { border-color: #cfd4db; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.danger { background: #fff5f3; border-color: #f1b8a8; color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.linkbtn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px;
  border: 1px solid #e3e6eb; background: #fff; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on .num { color: #fff !important; }
.seg { display: inline-flex; flex-shrink: 0; gap: 2px; background: #eceef2; border-radius: 8px; padding: 2px; }
.seg button { height: 26px; padding: 0 10px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: #fff; font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.tog { width: 36px; height: 20px; border-radius: 10px; background: #cfd4db; position: relative; flex-shrink: 0;
  border: 0; cursor: pointer; padding: 0; }
.tog::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: left .12s; }
.tog.on { background: var(--accent); }
.tog.on::after { left: 18px; }
.tog:disabled { opacity: .5; cursor: default; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 15px; height: 15px; }
.input, select.input, textarea.input { height: 34px; border: 1px solid #e3e6eb; border-radius: 8px; padding: 0 10px; background: #fff; }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; width: 100%; }
.input:focus { outline: 2px solid #c9d2f7; border-color: var(--accent); }
.badge { display: inline-flex; align-items: center; font-size: 11px; padding: 2px 7px; border-radius: 6px; font-weight: 500;
  white-space: nowrap; background: #f3f4f6; color: #4b5563; }
.badge.ok { background: #dff2e8; color: #1c6b46; }
.badge.warn { background: var(--warn-soft); color: #9a5b00; }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* каркас */
.shell { display: flex; height: 100vh; overflow: hidden; }
.rail { width: 60px; background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; flex-shrink: 0; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 700; margin-bottom: 14px; }
.rail-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: #8b929c; position: relative; }
.rail-btn:hover { color: #fff; }
.rail-btn.on { background: var(--rail2); color: #fff; }
.rail-btn svg { width: 20px; height: 20px; }
.rail-btn.busy::before { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: #3fb468; box-shadow: 0 0 0 2px var(--rail); }
.rail-btn[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 48px; top: 8px; background: var(--ink); color: #fff;
  font-size: 12px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 20; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #e0b85c; color: #111; display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 600; border: 0; cursor: pointer; }

.side { width: 280px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; flex-shrink: 0; }
.side-head { padding: 16px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.side-list { overflow-y: auto; padding: 4px 8px 16px; flex-grow: 1; }
.side-cap { padding: 10px 8px 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; justify-content: space-between; }
.proj { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.proj:hover { background: #f7f8fa; }
.proj.on { background: var(--accent-soft); }
.proj-t { font-weight: 500; }
.proj.on .proj-t { font-weight: 600; }
.folder { display: flex; align-items: center; gap: 6px; padding: 7px 8px; cursor: pointer; font-weight: 500; border-radius: 8px; }
.folder:hover { background: #f7f8fa; }
.folder svg { transition: transform .12s; }
.folder.closed svg { transform: rotate(-90deg); }
.folder-items .proj { padding-left: 28px; }
.search { height: 34px; border-radius: 8px; background: #f3f4f6; border: 0; padding: 0 10px 0 32px; width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b929c' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px 50%; }
.tabs3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: #f3f4f6; border-radius: 8px; padding: 2px; }
.tabs3 button { height: 28px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--muted); }
.tabs3 button.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }

.main { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; padding: 18px 24px 0; gap: 14px; overflow: hidden; position: relative; }
.page { overflow-y: auto; padding-bottom: 32px; }
.empty { margin: auto; color: var(--muted); text-align: center; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.crumb { font-size: 12px; color: var(--muted); }
h1 { font-size: 22px; font-weight: 600; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
h3 { font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.star { border: 0; background: none; cursor: pointer; padding: 0; color: #c9ced6; display: inline-flex; }
.star.on { color: #e0a92e; }
.meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vsep { width: 1px; height: 22px; background: #dfe2e7; margin: 0 4px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.pad { padding: 16px 18px; }

/* сводка */
.overview { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-t { font-size: 12px; color: var(--muted); }
.kpi-v { display: flex; align-items: baseline; gap: 0 6px; flex-wrap: wrap; }
.kpi-v b { font-family: var(--mono); font-size: 22px; font-weight: 500; }
/* узкая карточка (скриншоты владельца 14.09.2026): разница к прошлому сбору уходит строкой ниже, мини-график сжимается */
.kpi .spark { width: 100%; max-width: 160px; }
.dist { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dist-bars { display: flex; gap: 8px; align-items: end; height: 70px; }
.dist-bar { flex: 1; display: flex; flex-direction: column; height: 100%; border-radius: 4px; overflow: hidden; cursor: pointer; min-width: 0; }
.dist-bar.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.dist-dates { display: flex; gap: 8px; font-size: 11px; }
.dist-dates div { flex: 1; text-align: center; min-width: 0; overflow: hidden; cursor: pointer; }
.dist-col { flex: 1; height: 100%; min-width: 0; cursor: pointer; }
.dist-col .dist-bar { height: 100%; }
.dist-col:hover .dist-bar:not(.on) { outline: 2px solid #c9d2f7; outline-offset: 1px; }
/* подсказка распределения — position: fixed, чтобы её не обрезала прокрутка и не перекрывала закреплённая шапка таблицы */
.dist-tip { position: fixed; display: none; z-index: 70; width: 230px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 36px rgba(17, 20, 24, .16); padding: 10px 12px; font-size: 12px;
  flex-direction: column; gap: 5px; pointer-events: none; }
.dist-tip .row2 { display: flex; align-items: center; gap: 8px; }
.dist-tip .row2 i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.dist-tip .row2 .grow { flex: 1; }
.dist-tip .row2 .num { min-width: 34px; text-align: right; }
.legend { display: flex; gap: 10px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.c1 { background: #2f9e6e; } .c2 { background: #8fd1b0; } .c3 { background: #f0d27a; } .c4 { background: #f1a980; } .c5 { background: #dcdfe4; }

/* таблица позиций */
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: auto; flex-grow: 1; min-height: 200px; margin-bottom: 18px; }
table.pos { border-collapse: separate; border-spacing: 0; width: 100%; }
table.pos th { position: sticky; top: 0; background: #fafbfc; z-index: 2; font-size: 12px; font-weight: 500; color: #4b5563;
  height: 40px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
table.pos td { border-bottom: 1px solid var(--line2); background: #fff; height: 40px; }
table.pos .c-chk { width: 40px; text-align: center; position: sticky; left: 0; z-index: 3; }
table.pos th.c-chk { z-index: 4; }
/* ширина колонки фразы жёсткая: у таблицы на 100 % браузер не соблюдает max-width ячейки и при коротком периоде
   отдавал фразам всю ширину экрана (замечание владельца 13.09.2026); свободное место забирает пустая .c-fill */
table.pos .c-kw { text-align: left; padding: 4px 10px 4px 0; width: 420px; min-width: 420px; max-width: 420px; position: sticky; left: 40px; z-index: 3; }
table.pos .c-fill { width: auto; padding: 0; }
table.pos th.c-kw { z-index: 4; }
table.pos .c-w { width: 70px; min-width: 70px; text-align: right; padding-right: 12px; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
table.pos .c-spark { width: 96px; min-width: 96px; padding: 0 8px; }
table.pos .c-d { width: 64px; min-width: 64px; text-align: center; }
table.pos th.c-d small { display: block; font-size: 10px; color: var(--faint); font-weight: 400; line-height: 1; }
table.pos th.c-delta { width: 80px; color: var(--accent); }
table.pos td.c-delta { width: 80px; min-width: 80px; white-space: nowrap; text-align: center; font-family: var(--mono); font-size: 12px; font-weight: 500; }
table.pos tr.grp td { background: #f7f8fa; height: 28px; font-size: 12px; font-weight: 500; color: #4b5563; }
table.pos tr:hover td { background: #fbfbfd; }
table.pos tr.sel td { background: #f5f7ff; }
.kw { font-weight: 500; }
.kw-url { font-size: 11px; color: var(--muted); display: block; max-width: 400px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.z { font-family: var(--mono); font-size: 12px; text-align: center; border-left: 1px solid #fff; }
.z3 { background: var(--z3) !important; } .z10 { background: var(--z10) !important; } .z30 { background: var(--z30) !important; }
.z50 { background: var(--z50) !important; } .z100 { background: var(--z100) !important; }
.znf { background: var(--zn) !important; color: var(--faint); }
.znc { background: repeating-linear-gradient(45deg, #fff 0 4px, #f6ecd9 4px 8px) !important; color: var(--warn); font-weight: 600; }
.zempty { background: #fff; }
td.cmp { box-shadow: inset 2px 0 0 var(--accent); }

.selbar { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 12px;
  padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 8px; box-shadow: 0 10px 30px rgba(17, 20, 24, .25); z-index: 30; }
.selbar button { height: 32px; padding: 0 12px; border-radius: 8px; background: var(--rail2); border: 0; color: #fff; cursor: pointer; }
.selbar button:hover { background: #333a44; }
.selbar button.danger { background: #4a1f1f; color: #ffb4a8; }
.selbar .sep { width: 1px; height: 20px; background: #3a4049; }

/* страницы настроек, расходов, доступа */
.page-grid { display: grid; gap: 20px; align-items: start; }
.subnav { width: 220px; background: #fff; border-right: 1px solid var(--line); padding: 22px 12px; display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.subnav a { padding: 9px 10px; border-radius: 8px; color: var(--ink); }
.subnav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.days { display: grid; grid-template-columns: repeat(7, 34px); gap: 6px; }
.day { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--mono);
  font-size: 12px; background: #f3f4f6; color: #4b5563; border: 0; cursor: pointer; }
.day.on { background: var(--accent); color: #fff; font-weight: 500; }
.day.wide { width: 42px; font-family: inherit; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line2); }
.set-row:first-child { border-top: 0; }
.note { background: #f7f8fa; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.note.accent { background: var(--accent-soft); }
.note.bad { background: #fff8f6; border: 1px solid #f1b8a8; }
table.tbl { border-collapse: collapse; width: 100%; }
table.tbl th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); background: #fafbfc; padding: 9px 12px; white-space: nowrap; }
table.tbl td { padding: 10px 12px; border-top: 1px solid var(--line2); vertical-align: middle; }
table.tbl tr.on td { background: #f7f8ff; }
.bar { height: 6px; border-radius: 3px; background: var(--accent); }
.cols { display: flex; gap: 10px; align-items: end; height: 120px; }
.cols > div { flex: 1; display: flex; flex-direction: column; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.cols .col { background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.big { font-family: var(--mono); font-size: 28px; font-weight: 500; }
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
  font-weight: 600; flex-shrink: 0; background: #d9e1fb; color: var(--accent-ink); }

/* окна */
dialog.dlg { border: 0; border-radius: 14px; padding: 0; width: min(560px, 94vw); box-shadow: 0 20px 60px rgba(17, 20, 24, .3); }
dialog.dlg::backdrop { background: rgba(17, 20, 24, .35); }
/* крестик в каждом окне (замечание владельца 13.09.2026); окно закрывается и щелчком по фону — см. app.js */
.dlg-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; }
.dlg-x:hover { background: #f1f2f5; color: var(--ink); }
.dlg form > h3:first-child, .dlg form > h2:first-child { padding-right: 36px; }

/* справка: выдвижная панель справа (help-ui.js, текст — help.js) */
dialog.dlg.help-drawer { margin: 0 0 0 auto; width: min(640px, 100vw); height: 100vh; max-height: 100vh; border-radius: 14px 0 0 14px; }
dialog.dlg.help-drawer[open] { display: flex; flex-direction: column; }
.help-head { padding: 16px 56px 12px 22px; border-bottom: 1px solid var(--line2); display: flex; flex-direction: column; gap: 10px; }
.help-head h3 { margin: 0; font-size: 18px; }
.help-body { flex: 1; overflow-y: auto; padding: 16px 22px 32px; font-size: 14px; line-height: 1.55; color: var(--ink); }
.help-body h2 { font-size: 20px; margin: 6px 0 6px; line-height: 1.25; }
.help-body h4 { font-size: 14px; margin: 18px 0 6px; }
.help-body p { margin: 0 0 10px; }
.help-body ul, .help-body ol { margin: 0 0 10px; padding-left: 20px; }
.help-body li { margin: 3px 0; }
.help-body table { border-collapse: collapse; width: 100%; margin: 6px 0 12px; font-size: 13px; }
.help-body th, .help-body td { border: 1px solid var(--line2); padding: 5px 8px; text-align: left; vertical-align: top; }
.help-body th { background: #fafbfc; font-weight: 500; }
.help-body code { font-family: var(--mono); font-size: 12px; background: #f3f4f6; padding: 1px 4px; border-radius: 4px; }
.help-body .note { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.help-body .warn { background: #fdf3e2; border-radius: 8px; padding: 10px 12px; margin: 10px 0; color: #6b4300; }
.help-body a[data-help], .help-back { color: var(--accent); cursor: pointer; }
.help-back { font-size: 13px; }
.help-sec-name { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.help-lead { color: var(--muted); font-size: 15px; }
.help-sec { margin-bottom: 18px; }
.help-sec h5 { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; font-weight: 500; }
.help-body a.help-link { display: block; padding: 7px 10px; margin: 0 -10px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.help-body a.help-link:hover { background: #f3f4f6; }
.help-link small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.help-snip { display: block; font-size: 12px; color: #4b5563; margin-top: 2px; }
.help-snip mark { background: #fff1a8; padding: 0 1px; border-radius: 2px; color: inherit; }
.help-see { display: flex; flex-wrap: wrap; gap: 6px; }
.help-see a { background: var(--accent-soft); border-radius: 8px; padding: 4px 10px; font-size: 13px; }
.help-faq { border-bottom: 1px solid var(--line2); padding: 7px 0; }
.help-faq summary { cursor: pointer; font-weight: 500; }
.help-faq p { margin: 6px 0 2px; color: #374151; }
.help-terms dt { font-weight: 600; margin-top: 10px; }
.help-terms dd { margin: 2px 0 0; color: #374151; }
.help-q { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid #cfd4db; background: #fff; color: var(--muted); font-size: 10px; font-weight: 600; cursor: pointer;
  margin-left: 5px; vertical-align: 1px; padding: 0; line-height: 1; font-family: inherit; }
.help-q:hover { border-color: var(--accent); color: var(--accent); }
.dlg form { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.dlg menu { display: flex; justify-content: flex-end; gap: 8px; margin: 8px 0 0; padding: 0; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.dlg .checks { display: flex; flex-direction: column; gap: 6px; }
.dlg .checks label { display: flex; align-items: center; gap: 8px; }
.estimate { background: #f7f8fa; border-radius: 10px; padding: 10px 12px; }
.progress .pbar { height: 6px; background: #eceef2; border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.progress .pbar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100;
  max-width: 420px; box-shadow: 0 10px 30px rgba(17, 20, 24, .25); display: flex; gap: 12px; align-items: center; }
.toast button { background: none; border: 0; color: #9db0ff; cursor: pointer; font-weight: 500; }
.menu { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(17, 20, 24, .15);
  padding: 6px; z-index: 50; min-width: 200px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu button:hover { background: #f3f4f6; }

/* вход */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login form { width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }

/* экран позиций по замечаниям владельца 13.09.2026 (образец — Топвизор): одна прокрутка на всё окно,
   шапка с датами и колонка фраз закреплены; меню проектов сворачивается; свои выпадающие списки вместо <select> */
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid #e3e6eb; background: #fff; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; color: #4b5563; flex-shrink: 0; }
.icon-btn:hover { border-color: #cfd4db; color: var(--ink); }
.side-head .icon-btn { border-color: transparent; width: 28px; height: 28px; }
.side-head .icon-btn:hover { background: #f3f4f6; }
.search.boxed { background-color: #fff; border: 1px solid #e3e6eb; }
.main.pos-main { padding: 0; gap: 0; }
.pview { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ptop { padding: 14px 24px 12px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line);
  background: var(--bg); position: relative; z-index: 8; }
.ptop .head { align-items: center; }
.picker { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 2px 6px 2px 4px; margin-left: -4px;
  border-radius: 8px; cursor: pointer; min-width: 0; color: var(--ink); }
.picker:hover { background: #e9ebf0; }
.picker h1 { max-width: 42vw; }
.pscroll { flex: 1; min-height: 0; overflow: auto; position: relative; }
.pinned { position: sticky; left: 0; width: var(--sw, 100%); padding: 14px 24px; display: flex; flex-direction: column; gap: 12px; }
.dd { height: 34px; border: 1px solid #e3e6eb; border-radius: 8px; background: #fff; padding: 0 8px 0 12px; display: inline-flex;
  align-items: center; gap: 6px; cursor: pointer; max-width: 300px; white-space: nowrap; }
.dd:hover { border-color: #cfd4db; }
.dd svg { flex-shrink: 0; color: var(--muted); }
.pop { position: fixed; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 36px rgba(17, 20, 24, .16);
  z-index: 60; padding: 6px; }
.dd-list { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; min-width: 200px; }
.dd-list button, .pop .mi { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.dd-list button:hover, .pop .mi:hover { background: #f3f4f6; }
.dd-list button.on, .pop .mi.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.pop hr { border: 0; border-top: 1px solid var(--line2); margin: 4px 0; }
.pop-cap { padding: 8px 10px 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pp-pop { width: 360px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pp-list { max-height: min(62vh, 560px); overflow-y: auto; }
.col-pop { width: 260px; }
.city-pop { padding: 4px; }
.city-pop .dd-list { max-height: 320px; min-width: 0; }
.col-pop .pop-row { display: flex; gap: 6px; padding: 4px 10px 8px; align-items: center; }
.col-pop .pop-row .input { height: 30px; width: 84px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 3px 0 10px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 500; }
.fchip button { border: 0; background: none; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 6px; padding: 0; }
.fchip button:hover { background: #dfe5fb; }

table.pos { width: 100%; background: #fff; border-top: 1px solid var(--line); }
table.pos th { height: 50px; top: 0; z-index: 5; background: #fafbfc; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
table.pos th.c-chk, table.pos th.c-kw { z-index: 7; }
table.pos .c-chk { background: #fff; }
table.pos th.c-chk { background: #fafbfc; }
table.pos .c-kw { box-shadow: inset -1px 0 0 var(--line2); padding-left: 2px; }
table.pos th.c-kw { box-shadow: inset -1px 0 0 var(--line2), inset 0 -1px 0 var(--line); }
table.pos th[data-col] { cursor: pointer; user-select: none; }
table.pos th[data-col]:hover { background: #eef0f4; color: var(--ink); }
table.pos th.act, table.pos th.act .dh { color: var(--accent); }
table.pos th.c-d { min-width: 86px; padding: 0 4px; }
table.pos th .dh { font-family: var(--mono); font-size: 12px; color: var(--ink); }
table.pos th .ds { font-size: 10px; color: var(--faint); font-weight: 400; margin-top: 2px; }
table.pos th .mark { color: var(--accent); font-weight: 600; margin-left: 3px; }
table.pos td.z { font-size: 13px; height: 40px; min-width: 86px; border-left: 1px solid #fff; border-bottom: 1px solid #fff; }
table.pos td.z sup { font-size: 10px; margin-left: 2px; vertical-align: 6px; font-weight: 500; }
table.pos td.z sup.up { color: var(--up); }
table.pos td.z sup.down { color: #c62828; }
.p3 { background: #d6e3fd !important; } .p10 { background: #caecd7 !important; } .pup { background: #e7f6ed !important; }
.pdown { background: #fbe7e7 !important; } .pflat { background: #fff !important; }
.pout { background: #fbe7e7 !important; color: var(--muted); } .pnone { background: #fff !important; color: var(--faint); }
.pnc { background: repeating-linear-gradient(45deg, #fff 0 4px, #f6ecd9 4px 8px) !important; color: var(--warn); font-weight: 600; }
.pe { background: #fafbfc !important; }
table.pos tr:hover td.c-kw, table.pos tr:hover td.c-chk { background: #f7f8fb; }
table.pos tr.grp td { background: #f3f4f7; }
/* колонка галочки сжималась до 24 px, а фраза закреплена с отступом 40 px — в щель просвечивали даты */
table.pos .c-chk { width: 40px; min-width: 40px; max-width: 40px; }
