:root {
  --bg: #efefef;
  --surface: #f4f4f4;
  --card: #ffffff;
  --ink: #191919;
  --muted: #6f6f6f;
  --line: rgba(25, 25, 25, 0.09);
  --lime: #c1fc02;
  --p0: #e5484d;
  --p1: #f5a623;
  --p2: #8a8a8a;
  --radius: 22px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Urbanist", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ============ ВХОД ============ */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 26px;
  padding: 34px; width: min(430px, 100%); text-align: center;
}
.gate-card h1 { font-size: 28px; font-weight: 800; margin-top: 14px; }
.gate-sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.gate-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.gate-form { display: grid; gap: 12px; text-align: left; }
.gate-form[hidden], .gate[hidden], #app[hidden], .drawer[hidden], .drawer-bg[hidden] {
  display: none !important;
}
.gate-form label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.gate-form input, .gate-form select {
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 11px 14px; font-size: 14px; outline: none;
}
.gate-form input:focus, .gate-form select:focus { border-color: rgba(25,25,25,.35); }
.gate-hint { font-size: 12px; color: var(--muted); text-align: center; }
.gate-error { font-size: 13px; color: var(--p0); font-weight: 600; text-align: center; }
.logo.big { margin: 0 auto; width: 56px; height: 56px; font-size: 18px; }

/* ============ КАРКАС ============ */
.app { display: grid; grid-template-columns: 186px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--card); border-right: 1px solid var(--line); padding: 20px 14px;
  display: flex; flex-direction: column; align-items: stretch; gap: 12px;
  position: sticky; top: 0; height: 100vh;
}
.logo {
  width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--lime);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.sidenav { display: flex; flex-direction: column; gap: 4px; }
.side-btn {
  min-height: 40px; border-radius: 12px; background: var(--surface);
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  font-size: 13.5px; font-weight: 600; border: none; position: relative;
  transition: background .15s, color .15s; text-align: left;
}
.side-ico { font-size: 16px; width: 18px; text-align: center; flex: none; }
.side-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-btn:hover { background: #e3e3e3; }
.side-btn.on { background: var(--ink); color: #fff; }
.admin-btn { margin-top: auto; justify-content: center; }
#logout { justify-content: center; }
.side-btn .dot {
  position: absolute; top: 6px; right: 6px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--p0);
}

.main { padding: 26px 30px 60px; max-width: 1500px; width: 100%; }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; flex-wrap: wrap; margin-bottom: 20px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: 14.5px; margin-top: 6px; max-width: 620px; }
.top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.who { text-align: right; font-size: 13px; }
.who b { display: block; font-weight: 800; }
.who span { color: var(--muted); font-size: 11.5px; }
.risk-chip {
  display: inline-flex; gap: 8px; background: var(--ink); color: #fff;
  border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 700;
}
.risk-chip b { color: var(--lime); }

.cube-data-chip {
  font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.cube-data-chip.demo { color: var(--muted); }
.cube-data-chip.live b { color: var(--ink); }
.cube-data-chip.refreshing { border-color: var(--lime); }
.cube-data-chip.stale { border-color: var(--p1); }
.cube-data-chip .warn { color: var(--p0); }

.cube-panel { border-color: rgba(193, 252, 2, 0.35); }
.cube-panel--empty { opacity: 0.85; }
.cube-kpi { margin-top: 4px; }
.cube-h3 { font-size: 14px; font-weight: 800; margin: 0 0 8px; }
.cube-split table { font-size: 13px; }
.cube-split .empty-state { padding: 12px; }

/* Geo dashboard */
.geo-hero { margin-top: 12px; }
.geo-title { font-size: 26px; margin: 0; }
.geo-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 900px) {
  .geo-dash-grid { grid-template-columns: 1fr; }
}
.geo-col {
  background: var(--surface2);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
}
.geo-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.geo-col-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.geo-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.geo-stat {
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
}
.geo-stat span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.geo-stat b { font-size: 18px; display: block; margin-top: 4px; }
.geo-stat small { font-size: 11px; color: var(--muted); }
.geo-stat--cube { border-color: rgba(193, 252, 2, 0.5); }
.geo-stat b.bad { color: var(--p0); }
.geo-stat--click {
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.geo-stat--click:hover { border-color: rgba(25, 25, 25, 0.35); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.geo-stat--click:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.geo-stat kbd { font-size: 10px; color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.geo-stat--dual-sla .geo-sla-stat { margin-top: 6px; }
.geo-stat--dual-sla .geo-sla-now {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  line-height: 1.2;
}
.geo-stat--dual-sla .geo-sla-sla {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.geo-stat--dual-sla .geo-sla-now--bad .geo-sla-sla { color: var(--p0); }
.geo-stat--dual-sla .geo-sla-queue {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.geo-stat--dual-sla .geo-sla-today {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.geo-stat--dual-sla .geo-sla-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.geo-stat--dual-sla .geo-sla-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.geo-stat--dual-sla small:empty { display: none; }
.supplier-ltv-panel { margin-top: 16px; overflow: hidden; }
.supplier-ltv-summary {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1.15fr 1.8fr;
  gap: 10px;
  margin: 18px 0 20px;
}
.supplier-kpi {
  min-width: 0;
  padding: 14px 15px;
  background: var(--surface);
  border: 1px solid rgba(25, 25, 25, .06);
  border-radius: 14px;
}
.supplier-kpi--accent { background: var(--ink); color: #fff; border-color: var(--ink); }
.supplier-kpi span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.supplier-kpi--accent span, .supplier-kpi--accent small { color: rgba(255,255,255,.62); }
.supplier-kpi b {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.supplier-kpi--accent b { color: var(--lime); }
.supplier-kpi--top b { font-size: 15px; letter-spacing: -.02em; margin-top: 9px; }
.supplier-kpi small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.2; }
.supplier-filter-reset {
  align-self: end;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.supplier-table-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 8px; color: var(--muted); font-size: 11px; }
.supplier-table-meta b { color: var(--ink); }
.supplier-table-meta button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.supplier-ltv-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.supplier-ltv-table-wrap--scroll { max-height: 560px; overflow: auto; }
.supplier-ltv-table { width: 100%; min-width: 1030px; margin: 0; }
.supplier-ltv-table th {
  padding: 11px 13px;
  background: #fafafa;
  font-size: 10px;
  white-space: nowrap;
}
.supplier-column-filters th { padding: 7px 8px; background: #f4f4f4; border-bottom: 1px solid var(--line); }
.supplier-column-filters input, .supplier-column-filters select {
  display: block;
  width: 100%;
  min-width: 66px;
  height: 27px;
  padding: 0 7px;
  border: 1px solid rgba(25, 25, 25, .14);
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  text-transform: none;
}
.supplier-column-filters input:focus, .supplier-column-filters select:focus { border-color: var(--ink); }
.supplier-column-filters th:nth-child(7) { min-width: 176px; }
.supplier-column-filters th:nth-child(7) input { margin-top: 4px; }
.supplier-ltv-table-wrap--scroll .supplier-ltv-table thead tr:first-child th { position: sticky; top: 0; z-index: 3; box-shadow: 0 1px 0 var(--line); }
.supplier-ltv-table-wrap--scroll .supplier-ltv-table thead tr.supplier-column-filters th { position: sticky; top: 35px; z-index: 3; box-shadow: 0 1px 0 var(--line); }
.supplier-ltv-table td { padding: 12px 13px; font-size: 12.5px; vertical-align: middle; white-space: nowrap; }
.supplier-ltv-table tbody tr { transition: background .15s; }
.supplier-ltv-table tbody tr:hover { background: rgba(193, 252, 2, .10); }
.supplier-ltv-table td:not(:first-child) { font-variant-numeric: tabular-nums; }
.supplier-name { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.supplier-name b { font-size: 12px; font-weight: 750; }
.supplier-main-value { font-size: 13px; font-weight: 800; }
.supplier-cell-note { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 600; }
.supplier-systems { min-width: 160px; white-space: normal; }
.supplier-wallet-count { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 800; }
.supplier-system-list { display: flex; flex-wrap: wrap; gap: 4px; }
.supplier-system {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 140px;
  padding: 3px 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.supplier-system b { color: var(--ink); font-size: 10px; }
.supplier-system-more { color: var(--muted); font-size: 10px; font-weight: 800; padding: 3px 2px; }
.supplier-systems-empty { color: var(--muted); font-size: 10px; }
.supplier-status-cell { min-width: 136px; white-space: normal !important; }
.supplier-status-cell .tag { display: inline-block; margin-bottom: 3px; }
.supplier-status-meta { display: block; font-size: 10px; color: var(--muted, #8b949e); line-height: 1.3; }
.supplier-ltv-method { margin: 16px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
@media (max-width: 1050px) {
  .supplier-ltv-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .supplier-ltv-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .supplier-kpi { padding: 12px; }
  .supplier-kpi b { font-size: 18px; }
  .supplier-kpi--top b { font-size: 13px; }
}
.geo-detail-bg[hidden],
.geo-detail-drawer[hidden],
.geo-chart-zoom-bg[hidden],
.geo-chart-zoom[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.geo-detail-bg {
  position: fixed;
  inset: 0;
  background: rgba(25, 25, 25, 0.35);
  z-index: 90;
}
.geo-detail-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  background: var(--bg);
  z-index: 91;
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
}
.geo-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.geo-detail-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.geo-detail-body {
  padding: 16px 18px 28px;
  overflow-y: auto;
  flex: 1;
}
.geo-detail-body table { width: 100%; font-size: 13px; margin-top: 8px; }
.geo-detail-body .detail-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.geo-detail-body .detail-kpi div { background: var(--surface); padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.geo-detail-body .detail-kpi span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.geo-detail-body .detail-kpi b { font-size: 16px; }
.geo-detail-body .detail-kpi b.bad { color: var(--p0); }
.geo-detail-body .detail-kpi b.warn { color: #a86800; }
.geo-detail-body .detail-kpi small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; font-weight: 500; }
.geo-detail-charts { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.geo-chart-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 10px 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.geo-chart-block:hover { border-color: rgba(25, 25, 25, 0.35); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.geo-chart-block:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.geo-chart-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.geo-chart-zoom-hint { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.geo-chart-zoom-bg {
  position: fixed;
  inset: 0;
  background: rgba(25, 25, 25, 0.55);
  z-index: 96;
}
.geo-chart-zoom {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 24px));
  max-height: min(88vh, 640px);
  background: var(--bg);
  z-index: 97;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.geo-chart-zoom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.geo-chart-zoom-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.geo-chart-zoom-body { padding: 16px 18px 20px; overflow-y: auto; }
.geo-chart-zoom-focus { margin: 0 0 12px; font-size: 15px; }
.geo-chart-zoom-focus b { font-size: 18px; }
.geo-chart-block .cube-h3 { margin: 0; font-size: 13px; font-weight: 800; }
.geo-chart-block .panel-sub { margin: 8px 0 0; font-size: 11px; }
.geo-chart-empty { margin: 8px 0; font-size: 12px; }
.dep-scale-note { margin: 6px 0 0; font-size: 10px; color: var(--muted); line-height: 1.35; }
.dep-bars { display: flex; align-items: flex-end; gap: 5px; min-height: 108px; padding-top: 2px; }
.dep-bars--compact { min-height: 100px; gap: 1px; }
.dep-bars--compact .dep-bar-wrap { max-width: 11px; height: 58px; }
.dep-bars--compact .dep-bar-lbl { font-size: 7px; }
.dep-bars--compact .dep-bar-val { font-size: 6px; letter-spacing: -0.02em; }
.dep-bar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  border: none;
  background: transparent;
  padding: 2px 0 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  border-radius: 6px;
}
.dep-bar-col:hover .dep-bar { filter: brightness(1.08); }
.dep-bar-col--hi { background: rgba(193, 252, 2, 0.12); }
.dep-bar-val {
  font-size: 9px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1;
  white-space: nowrap;
}
.dep-bar-val--z { color: var(--muted); font-weight: 600; }
.dep-bar-val--hi { color: #5a7a00; }
.dep-bar-wrap {
  position: relative;
  width: 100%;
  max-width: 24px;
  height: 76px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dep-bars--large { min-height: 220px; padding-top: 8px; }
.dep-bars--large .dep-bar-wrap { height: 168px; max-width: 36px; }
.dep-bars--large .dep-bar-val { font-size: 11px; }
.dep-bars--large .dep-bar-lbl { font-size: 10px; }
.dep-bars--large.dep-bars--compact .dep-bar-wrap { max-width: 18px; height: 160px; }
.dep-bars--large.dep-bars--compact .dep-bar-val { font-size: 8px; }
.dep-bar {
  width: 82%;
  border-radius: 4px 4px 0 0;
  z-index: 1;
  transition: height 0.15s ease, filter 0.15s ease;
}
.dep-bar--zero { background: rgba(25, 25, 25, 0.12) !important; min-height: 2px; box-shadow: none !important; }
.dep-bar-plan {
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0;
  border-top: 2px dashed rgba(193, 252, 2, 0.9);
  z-index: 2;
  pointer-events: none;
}
.dep-bar-lbl {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.geo-note { font-size: 13px; margin: 12px 0 0; color: var(--ink); }
.geo-pulse { font-size: 14px; line-height: 1.45; margin: 0 0 10px; }
.geo-watch { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.geo-watch li { margin-bottom: 4px; }
.geo-profile { margin-bottom: 10px; }
.geo-rails { margin-top: 8px; }
.geo-news { margin-top: 16px; }
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.news-feed { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.news-card {
  position: relative;
  border-radius: 12px;
  padding: 12px 36px 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.news-card.cat-pol { border-left: 4px solid #6366f1; }
.news-card.cat-ig { border-left: 4px solid #8b5cf6; }
.news-card.cat-pay { border-left: 4px solid #0ea5e9; }
.news-card.cat-reg { border-left: 4px solid #f59e0b; }
.news-card.cat-enf { border-left: 4px solid var(--p0); }
.news-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.news-cat { font-weight: 800; color: var(--ink); text-transform: uppercase; letter-spacing: 0.03em; }
.news-title { margin: 0 0 6px; font-size: 14px; font-weight: 800; }
.news-body { margin: 0; font-size: 13px; line-height: 1.45; color: #444; }
.news-del {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
}
.geo-effect { font-size: 12.5px; color: #444; margin: 8px 0 0; padding: 8px 10px; background: rgba(193, 252, 2, 0.12); border-radius: 8px; line-height: 1.4; }
.geo-effect--pulse { margin-top: 10px; }
.geo-watch li { margin-bottom: 10px; }
.geo-watch em.geo-effect { display: block; margin-top: 4px; font-style: normal; font-size: 12px; }
.weekly-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.weekly-checklist li { background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.weekly-checklist li.done { opacity: 0.65; text-decoration: line-through; }
.weekly-checklist label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; }
.geo-weekly { border-color: rgba(25, 25, 25, 0.12); }
.news-card.news-scout { background: #fafef5; }
.news-title a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.geo-scout-chip {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  margin-right: 8px;
}
.geo-scout-chip.demo { color: var(--muted); }
.geo-scout-chip.live b { color: var(--ink); }
.geo-scout-chip.refreshing { border-color: var(--lime); }
.geo-scout-chip.stale { border-color: var(--p1); color: var(--p1); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; height: auto; width: 100%; justify-content: flex-start; overflow-x: auto; position: static; }
  .sidenav { flex-direction: row; }
  .side-label { display: none; }
  .side-btn { padding: 0 12px; }
  .admin-btn { margin-top: 0; margin-left: auto; }
  .main { padding: 18px 14px 50px; }
}

/* ============ ПАНЕЛИ ============ */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.panel h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.panel-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
@media (max-width: 1150px) { .grid-2 { grid-template-columns: 1fr; } }

.hero3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1350px) { .hero3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .hero3 { grid-template-columns: 1fr; } }
.hero-block { margin-bottom: 0; }
.hero-num { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 14px; }
.hero-num small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: 2px; }

.btn-dark { background: var(--ink); color: #fff; border: none; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.btn-dark.sm { padding: 9px 16px; font-size: 12.5px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 14px; }
.pill { border: 1px solid var(--line); background: var(--card); padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }

/* ============ KPI ============ */
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1150px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 25px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.hot { background: var(--ink); color: #fff; }
.kpi.hot .l, .kpi.hot .s { color: rgba(255,255,255,.65); }
.kpi.hot .v { color: var(--lime); }

/* ============ АЛЕРТЫ ============ */
.alert-list { display: flex; flex-direction: column; gap: 9px; }
.alert { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--radius-sm); padding: 12px 14px; }
.sev { font-size: 11px; font-weight: 800; text-align: center; border-radius: 999px; padding: 4px 8px; color: #fff; }
.sev-P0 { background: var(--p0); } .sev-P1 { background: var(--p1); } .sev-P2 { background: var(--p2); }
.alert .txt { font-size: 14px; font-weight: 600; }
.alert .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.go { font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }

/* ============ AI ============ */
.insights { display: flex; flex-direction: column; gap: 10px; }
.insight { background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; }
.ins-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 14px; }
.ins-head .go { margin-left: auto; }
.ins-body { font-size: 13px; color: var(--muted); margin: 8px 0; }
.ins-actions { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ins-actions li { font-size: 12.5px; font-weight: 600; padding-left: 16px; position: relative; }
.ins-actions li::before { content: "→"; position: absolute; left: 0; color: var(--muted); }
.gpt-out { white-space: pre-wrap; background: var(--ink); color: #fff; border-radius: var(--radius-sm); padding: 16px; font-size: 13.5px; margin-top: 12px; }

/* ============ ЗАДАЧИ ============ */
.tasks { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.tasks-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 10px; }
.tasks-head span { color: var(--muted); font-size: 12px; }
.task-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.task { display: grid; grid-template-columns: 20px 1fr 22px; gap: 10px; align-items: start; background: var(--surface); border-radius: 11px; padding: 9px 11px; font-size: 13px; }
.task.done { opacity: .5; text-decoration: line-through; }
.task.overdue { outline: 1px solid rgba(229,72,77,.4); }
.task small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.tcode { font-weight: 800; margin-right: 4px; }
.tdel { border: none; background: none; color: var(--muted); font-size: 13px; }
.task-form { display: grid; grid-template-columns: 1fr 130px 130px auto; gap: 6px; margin-top: 10px; }
.task-form input, .task-form select { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--ink); outline: none; }
@media (max-width: 900px) { .task-form { grid-template-columns: 1fr; } }

.task--rich { grid-template-columns: 34px 1fr auto 22px; align-items: center; }
.task--rich .task-body { min-width: 0; }
.task--rich.done { text-decoration: none; }
.task--rich.done .task-body { text-decoration: line-through; }
.task-status { display: flex; gap: 4px; flex-wrap: wrap; }
.task-status .pill { padding: 4px 10px; font-size: 11px; }
.task-filters { margin: 0 0 10px; flex-wrap: wrap; }
.panel > .task-list { max-height: none; }

.task-open { text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.task-open:hover { text-decoration: underline; }
.task-detail { display: grid; gap: 14px; }
.task-detail-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.task-edit-form label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.task-edit-form label:first-child { grid-column: 1 / -1; }
.task-edit-form input, .task-edit-form select { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--ink); text-transform: none; letter-spacing: 0; outline: none; }
.task-edit-form button { grid-column: 1 / -1; justify-self: start; }
.task-notes { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.task-note-form { display: grid; gap: 6px; justify-items: start; }
.task-note-form textarea { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 12.5px; color: var(--ink); resize: vertical; outline: none; }
.task-note-list { display: grid; gap: 6px; }
.task-note { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 8px 28px 8px 10px; background: var(--card); }
.task-note p { margin: 0; font-size: 13px; white-space: pre-wrap; }
.task-note small { color: var(--muted); font-size: 11px; }
.task-note .tdel { position: absolute; top: 6px; right: 6px; }
.task-detail-del { justify-self: start; color: var(--p0); }

/* ============ КАНБАН ============ */
.kb-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 140px auto; gap: 6px; }
.kb-form input, .kb-form select { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--ink); outline: none; }
.kb-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kb-col { background: var(--surface); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; min-height: 200px; }
.kb-col-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; }
.kb-col-head span { color: var(--muted); font-size: 12px; background: var(--card); border-radius: 999px; padding: 1px 8px; }
.kb-col-body { display: grid; gap: 8px; align-content: start; flex: 1; border-radius: 10px; transition: background .12s; }
.kb-col-body.over { background: rgba(193, 252, 2, .25); outline: 1px dashed rgba(25, 25, 25, .25); outline-offset: 3px; }
.kb-empty { font-size: 12.5px; color: var(--muted); padding: 6px 2px; }
.kb-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: grab; }
.kb-card.dragging { opacity: .45; cursor: grabbing; }
.kb-card.overdue { border-color: rgba(229, 72, 77, .5); }
.kb-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kb-card-title { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: inherit; cursor: pointer; }
.kb-card-title:hover { text-decoration: underline; }
.kb-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.kb-code { color: var(--muted); font-size: 11px; font-weight: 700; margin-right: auto; margin-left: 8px; }
.kb-card-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.kb-card-meta .tag { font-size: 10.5px; padding: 3px 8px; font-weight: 600; }
.task-card.overdue small { color: var(--p0); }
.sel-filter { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; font-size: 12px; color: var(--ink); outline: none; }
@media (max-width: 1100px) { .kb-form { grid-template-columns: 1fr 1fr; } .kb-board { grid-auto-columns: minmax(210px, 80%); } }

.section-tabs { margin-bottom: 14px; }
.section-tabs .pill { text-decoration: none; }

/* ============ СПРАВОЧНИК ПЛАТЁЖНОГО СТЕКА ============ */
.ps-matrix tbody tr.on { background: rgba(193, 252, 2, .18); }
.ps-matrix a { color: inherit; font-weight: 700; text-decoration: none; }
.ps-matrix a:hover { text-decoration: underline; }
.ps-layer { margin-top: 18px; }
.ps-layer-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.ps-layer-head b { font-size: 13.5px; }
.ps-layer-head span { color: var(--muted); font-size: 12px; background: var(--card); border-radius: 999px; padding: 1px 8px; }
.ps-layer-head small { color: var(--muted); font-size: 11.5px; }
.ps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ps-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ps-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.ps-card-top b { font-size: 13.5px; margin-right: auto; }
.ps-meta { color: var(--muted); font-size: 11.5px; margin-bottom: 8px; }
.ps-note { font-size: 12.5px; line-height: 1.5; margin: 0 0 8px; }
.ps-more { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.ps-more summary { font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); }
.ps-more summary:hover { color: var(--ink); }
.ps-more p { font-size: 12.5px; line-height: 1.55; margin: 8px 0 0; white-space: pre-line; }
.ps-line b { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-right: 6px; }
.ps-source { margin: 16px 0 0; font-size: 11.5px; color: var(--muted); }
.ps-source a { color: inherit; }
.geo-jump { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 12px; margin: 6px 0 4px; background: var(--bg); }
.geo-jump .pill { padding: 6px 13px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.geo-jump-badge { background: var(--surface); color: var(--muted); border-radius: 999px; padding: 0 6px; font-size: 11px; }
.geo-jump .pill.on .geo-jump-badge { background: rgba(255,255,255,.2); color: #fff; }
.geo-section { scroll-margin-top: 58px; }
.plan-bar { position: relative; height: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-top: 14px; overflow: hidden; }
.plan-bar-fill { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.plan-bar-fill.warn { background: #d9920b; }
.plan-bar-fill.bad { background: #b42318; }
.plan-bar-mark { position: absolute; top: -3px; width: 2px; height: 14px; background: #6f6f6f; transform: translateX(-1px); }
.plan-behind { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.plan-behind a { color: var(--ink); font-weight: 600; }
.kb-add { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 999px; width: 22px; height: 22px; line-height: 1; font-size: 14px; font-weight: 700; margin-left: 6px; cursor: pointer; }
.kb-add:hover { color: var(--ink); border-color: var(--ink); }
.pill.danger { color: #b42318; border-color: #f3c2bd; }
.ps-new-form { display: grid; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 10px; }
.ps-new-form input, .ps-new-form select, .ps-new-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 12.5px; background: var(--surface); }
.ps-new-form textarea { resize: vertical; }
.ps-new-actions { display: flex; gap: 6px; align-items: center; }
.ps-new-actions .pill { padding: 6px 12px; }
.ps-layer-head .kb-add { margin-left: auto; }
.ps-board { margin-top: 18px; }
.ps-board .kb-board { margin-top: 10px; }
.ps-filters { margin-bottom: 12px; }
.ps-kb .kb-card-title { font-weight: 700; }
.ps-kb-meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.ps-kb-shot { position: relative; display: block; width: 100%; padding: 0; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); cursor: zoom-in; }
.ps-kb-shot img { width: 100%; height: 96px; object-fit: cover; display: block; }
.ps-kb-shot-more { position: absolute; right: 6px; bottom: 6px; background: rgba(17,17,17,.78); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.ps-methods { font-size: 12px; margin-bottom: 8px; }
.ps-methods b { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-right: 6px; }
.ps-shots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.ps-shots button { padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); cursor: zoom-in; line-height: 0; }
.ps-shots img { width: 84px; height: 60px; object-fit: cover; display: block; }
.ps-shots-more { font-size: 11.5px; color: var(--muted); }
.ps-shots button, .ps-proof-shot { position: relative; }
.ps-anim-tag { position: absolute; left: 5px; top: 5px; background: var(--lime); color: var(--ink); font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; padding: 2px 7px; line-height: 1.4; }
.ps-import-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.ps-import-box { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.ps-import-box h3 { margin: 0 0 2px; font-size: 13.5px; }
.ps-import-done { font-size: 12px; color: var(--muted); }
.ps-steps { margin: 0 0 12px; padding-left: 20px; font-size: 12.5px; line-height: 1.6; }
.ps-steps a { color: inherit; }
.ps-snippet { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 11.5px; line-height: 1.5; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0 0 12px; }
.ps-import-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ps-import-form input { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 12.5px; }
.ps-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.ps-badges .tag { font-size: 10.5px; padding: 3px 8px; font-weight: 600; }
.ps-open { width: 100%; margin-top: 10px; }
.ps-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }

/* карточка работы по ПС в выдвижной панели */
.ps-detail-sub { color: var(--muted); font-size: 12px; margin: 0 0 14px; }
.ps-block { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.ps-block:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.ps-block h4 { margin: 0 0 10px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.ps-count { color: var(--muted); font-size: 12px; font-weight: 600; background: var(--card); border-radius: 999px; padding: 1px 8px; }
.ps-hint { color: var(--muted); font-size: 11.5px; margin: 8px 0 0; }
.ps-dod { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.ps-dod label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
.ps-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ps-f { display: grid; gap: 4px; margin-bottom: 10px; }
.ps-f > span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ps-f input, .ps-f select, .ps-f textarea {
  border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  padding: 8px 10px; font: inherit; font-size: 12.5px; color: var(--ink); outline: none; width: 100%; resize: vertical;
}
.ps-proof-form, .ps-comment-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.ps-proof-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; }
.ps-proof-form select, .ps-proof-form input, .ps-comment-form textarea {
  border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  padding: 8px 10px; font: inherit; font-size: 12.5px; color: var(--ink); outline: none; width: 100%;
}
.ps-proofs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.ps-proof { position: relative; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.ps-proof-shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; line-height: 0; }
.ps-proof img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; display: block; }
.ps-proof-file { display: block; }
.ps-proof-ico { display: flex; align-items: center; justify-content: center; height: 120px; border-radius: 8px; background: var(--bg); font-size: 12px; font-weight: 700; color: var(--muted); }
.ps-proof figcaption { font-size: 11px; margin-top: 6px; word-break: break-word; }
.ps-proof figcaption small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.ps-proof .tdel, .ps-comment .tdel { position: absolute; top: 6px; right: 6px; }
.ps-comments { display: grid; gap: 8px; margin-top: 10px; }
.ps-comment { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 30px 10px 12px; }
.ps-comment p { margin: 0; font-size: 12.5px; line-height: 1.5; white-space: pre-line; }
.ps-comment small { color: var(--muted); font-size: 11px; }
@media (max-width: 900px) { .ps-fields { grid-template-columns: 1fr; } .ps-proof-form { grid-template-columns: 1fr; } }

/* просмотр скриншота во весь экран */
.shot-view {
  position: fixed; inset: 0; z-index: 90; background: rgba(17,17,17,.88);
  display: flex; align-items: center; justify-content: center; padding: 40px 24px;
}
.shot-view[hidden] { display: none; }
.shot-view figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.shot-view img { max-width: 100%; max-height: calc(100vh - 130px); border-radius: 12px; background: #fff; display: block; }
.shot-view figcaption { color: #fff; font-size: 12.5px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.shot-view figcaption a { color: var(--lime); text-decoration: underline; }
.shot-view-close {
  position: absolute; top: 18px; right: 22px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 16px; cursor: pointer;
}
.shot-view-close:hover { background: rgba(255,255,255,.26); }
body.no-scroll { overflow: hidden; }

/* ============ ПЛАНИРОВАНИЕ ============ */
.pl-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pl-tab { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.pl-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pl-tab.add { border-style: dashed; color: var(--muted); font-weight: 600; }
.pl-tab-mode { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pl-tab.on .pl-tab-mode { color: rgba(255,255,255,.65); }
.pl-tab-x { opacity: .45; font-size: 11px; }
.pl-tab-x:hover { opacity: 1; color: var(--p0); }

.pl-meta { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin-top: 4px; }
.pl-meta label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pl-meta input, .pl-meta select { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 11px; font-size: 13px; color: var(--ink); text-transform: none; letter-spacing: 0; outline: none; }
.pl-progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.pl-progress b { font-size: 19px; min-width: 52px; }
.pl-progress span { font-size: 12px; color: var(--muted); }
.pl-bar { flex: 1; height: 10px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.pl-bar > i { display: block; height: 100%; background: var(--ink); border-radius: 999px; transition: width .35s ease; }

.pl-stages { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.pl-stage { position: relative; min-width: 210px; flex: 1; background: var(--surface); border-radius: var(--radius-sm); border-left: 4px solid var(--sc); padding: 14px 16px; }
.pl-stage.goal { background: var(--ink); border-left-color: var(--lime); }
.pl-stage.goal textarea, .pl-stage.goal .pl-num { color: #fff; }
.pl-stage.goal .pl-stage-desc, .pl-stage.goal .pl-date { color: rgba(255,255,255,.7); }
.pl-stage .tdel { position: absolute; top: 6px; right: 6px; opacity: 0; }
.pl-stage:hover .tdel { opacity: 1; }
.pl-stage-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pl-num { width: 22px; height: 22px; border-radius: 50%; background: var(--sc); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.pl-stage.goal .pl-num { background: var(--lime); color: var(--ink); }
.pl-date { width: 92px; background: transparent; border: none; text-align: right; font-size: 11.5px; font-weight: 700; color: var(--muted); outline: none; font-family: inherit; }
.pl-stage textarea { width: 100%; background: transparent; border: none; resize: none; outline: none; overflow: hidden; font-family: inherit; color: var(--ink); }
.pl-stage-title { font-size: 14px; font-weight: 700; }
.pl-stage-desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pl-arrow { align-self: center; color: var(--muted); font-size: 18px; flex-shrink: 0; }

.pl-sec-head { margin: 22px 0 10px; }
.pl-block { padding-bottom: 0; }
.pl-block.linked { border-left: 4px solid var(--pc); }
.pl-block-head { gap: 10px; flex-wrap: wrap; align-items: center; }
.pl-period { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--ink); outline: none; width: 220px; }
.pl-block-acts { margin-left: auto; display: flex; gap: 4px; }
.pl-block-acts .pill { padding: 5px 10px; font-size: 11px; }
table.pl-lines { width: 100%; border-collapse: collapse; }
table.pl-lines th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.pl-lines td { padding: 4px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.pl-lines tr:last-child td { border-bottom: none; }
table.pl-lines tr.done td { opacity: .5; }
table.pl-lines tr.done .pl-cell.task textarea { text-decoration: line-through; }
.pl-n { width: 30px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; padding-top: 12px !important; }
.pl-cell textarea { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 7px 8px; font-family: inherit; font-size: 13px; color: var(--ink); resize: none; outline: none; overflow: hidden; line-height: 1.45; }
.pl-cell textarea:focus { border-color: var(--line); background: var(--card); }
.pl-cell.task textarea { font-weight: 600; }
.pl-cell.risk textarea { color: #b3341c; }
.pl-cell.sol textarea { color: #15794f; }
.pl-cell select { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 8px; font-size: 12.5px; color: var(--ink); outline: none; margin-top: 4px; }
.pl-due { width: 110px; }
.pl-due input { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 7px 6px; font-size: 12px; font-weight: 700; text-align: center; color: var(--ink); outline: none; margin-top: 4px; }
.pl-chk { width: 34px; text-align: center; padding-top: 12px !important; }
.pl-chk input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--ink); }
.pl-act { width: 34px; text-align: right; padding-top: 10px !important; }
.pl-add-line { width: 100%; background: transparent; border: none; border-top: 1px dashed var(--line); color: var(--muted); cursor: pointer; padding: 11px; font-size: 12.5px; font-weight: 700; }
.pl-add-line:hover { color: var(--ink); background: var(--surface); }

.pl-log { display: grid; gap: 8px; }
.pl-log-row { display: grid; grid-template-columns: 92px 1fr 24px; gap: 8px; align-items: start; background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.pl-log-row .pl-date { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 6px 8px; }
.pl-log-row textarea { background: transparent; border: none; resize: none; outline: none; overflow: hidden; font-family: inherit; font-size: 13px; color: var(--ink); padding-top: 6px; }
@media (max-width: 1100px) { .pl-meta { grid-template-columns: 1fr 1fr; } .pl-stages { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; } .pl-arrow { display: none; } }

/* ============ ГРАФИКИ ============ */
.bar.miss { background: var(--lime); }
.overview-deposit-chart { display: flex; gap: 7px; height: 174px; margin-top: 20px; }
.overview-deposit-bar {
  flex: 1;
  display: grid;
  grid-template-rows: 20px 1fr 19px;
  gap: 7px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
}
.overview-deposit-bar:hover .overview-deposit-track { background: rgba(193,252,2,.26); }
.overview-deposit-bar--empty:hover .overview-deposit-track { background: var(--surface); }
.overview-deposit-bar:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.overview-deposit-value { overflow: hidden; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.overview-deposit-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface);
  transition: background .15s;
}
.overview-deposit-track i {
  display: block;
  width: min(24px, 56%);
  min-height: 5px;
  border-radius: 6px 6px 3px 3px;
  background: var(--lime);
  box-shadow: inset 0 -2px 0 rgba(25,25,25,.10);
}
.overview-deposit-label { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: capitalize; }
.overview-deposit-hint { margin-top: 11px; color: var(--muted); font-size: 11px; text-align: center; }
.overview-sla-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.overview-sla-row {
  display: grid;
  grid-template-columns: minmax(104px, 1.1fr) minmax(56px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 9px;
  transition: background .15s;
}
.overview-sla-row:hover { background: var(--surface); }
.overview-sla-country { overflow: hidden; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.overview-sla-track { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: rgba(25,25,25,.10); }
.overview-sla-track i { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.overview-sla-track i.bad { background: var(--p0); }
.overview-sla-row b { min-width: 42px; font-size: 11px; text-align: right; white-space: nowrap; }
.overview-sla-row b.bad { color: var(--p0); }
.overview-sla-row small { grid-column: 2 / -1; margin-top: -5px; color: var(--muted); font-size: 10px; text-align: right; }

.goal .l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.goal .v { font-size: 21px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; }
.goal .owner { font-size: 11.5px; color: var(--muted); }
.track span.ok { background: var(--lime); }
.goal .foot { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 7px; }

/* ============ КАРТОЧКИ СТРАН ============ */
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.ccard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; transition: border-color .15s, transform .15s; }
.ccard:hover { border-color: rgba(25,25,25,.25); transform: translateY(-2px); }
.ccard.risk-P0 { border-color: rgba(229,72,77,.45); }
.ccard.risk-P1 { border-color: rgba(245,166,35,.5); }
.cc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cc-flag { font-size: 30px; line-height: 1; }
.cc-name { font-size: 18px; font-weight: 800; margin-top: 6px; }
.cc-sub { font-size: 12px; color: var(--muted); }
.cc-badge { font-size: 11px; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: var(--surface); white-space: nowrap; }
.cc-badge.P0 { background: var(--p0); color: #fff; }
.cc-badge.P1 { background: var(--p1); color: #fff; }
.cc-badge.ok { background: var(--lime); }
.cc-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 10px; }
.cc-metrics div { background: var(--surface); border-radius: 11px; padding: 9px 11px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cc-metrics strong { display: block; font-size: 16px; color: var(--ink); font-weight: 800; }
.cc-metrics div.bad strong { color: var(--p0); }
.cc-metrics div.warn strong { color: #c07800; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface); }
.tag.bad { background: rgba(229,72,77,.12); color: var(--p0); }
.tag.warn { background: rgba(245,166,35,.18); color: #a86800; }
.tag.ok { background: rgba(193,252,2,.4); }
.tag.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; letter-spacing: -.2px; }
.cc-pains { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.cc-pains b { color: var(--ink); }

/* ============ ТАБЛИЦЫ ============ */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.limit-bar span.warn { background: var(--p1); }
.limit-bar span.crit { background: var(--p0); }

/* ============ ДЕТАЛИ СТРАНЫ ============ */
.back { font-size: 13px; font-weight: 700; color: var(--muted); }
.detail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-flag { font-size: 40px; }
.profile-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 16px; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: repeat(2, 1fr); } }
.profile-grid div { background: var(--surface); border-radius: 11px; padding: 10px 12px; }
.profile-grid span { font-size: 11.5px; color: var(--muted); font-weight: 600; display: block; }
.profile-grid b { font-size: 17px; font-weight: 800; }
.tl-step.done { background: var(--ink); color: #fff; }
.tl-step.current { background: var(--lime); }
.empty-state { font-size: 13.5px; color: var(--muted); padding: 10px 0; }

/* ============ РАЗВЕДКА ============ */
@media (max-width: 900px) { .intel-form { grid-template-columns: 1fr; } }
.intel { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.intel-form { display: grid; grid-template-columns: 150px 1fr auto auto; gap: 8px; margin-bottom: 14px; }
.intel-form input, .intel-form select { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; outline: none; }
.file-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.file-lbl input { display: none; }
.intel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.intel-card { background: var(--surface); border-radius: var(--radius-sm); padding: 12px; position: relative; }
.intel-card img { width: 100%; border-radius: 10px; display: block; margin-bottom: 10px; }
.no-shot { height: 90px; border-radius: 10px; background: var(--card); display: grid; place-items: center; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.intel-body p { font-size: 12.5px; color: var(--muted); margin: 6px 0; }
.intel-body small { font-size: 11px; color: var(--muted); }
.intel-card .tdel { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.9); border-radius: 50%; width: 22px; height: 22px; }

/* ============ АДМИН-ПАНЕЛЬ ============ */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; width: min(560px, 100%); height: 100vh; z-index: 50;
  background: var(--card); border-left: 1px solid var(--line); padding: 22px; overflow: auto;
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer-head h2 { font-size: 21px; font-weight: 800; }
.drawer-tabs { display: flex; gap: 7px; margin-bottom: 16px; flex-wrap: wrap; }
.drawer-body { display: flex; flex-direction: column; gap: 12px; }
.admin-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; flex-wrap: wrap; }
.admin-actions { display: flex; gap: 8px; }
.admin-user { background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; }
.au-head { display: flex; align-items: center; gap: 8px; font-size: 15px; flex-wrap: wrap; }
.au-head .tdel { margin-left: auto; }
.au-row { display: block; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.au-row select, .au-row input { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 11px; font-size: 13px; margin-top: 4px; outline: none; }
.au-row form, form.au-row { display: flex; gap: 8px; }
.admin-new-user { background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; }
.anu-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 6px; margin-top: 10px; }
.anu-row input, .anu-row select { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; color: var(--ink); outline: none; }
.au-error { color: var(--p0); font-size: 12px; margin-top: 8px; }
.au-error:empty { display: none; }
@media (max-width: 900px) { .anu-row { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 11.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.admin-settings { display: grid; gap: 12px; background: var(--surface); border-radius: var(--radius-sm); padding: 16px; }
.admin-settings label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.admin-settings input { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; outline: none; }

.geo-ops-head { margin-top: 20px; background: transparent; border: none; padding: 0 4px; margin-bottom: 8px; }
.geo-ops-head h2 { font-size: 18px; margin: 0 0 4px; }

table td.warn { color: #a86800; font-weight: 700; }
table td.bad { color: var(--p0); font-weight: 700; }
.goal .l .goal-src { margin-left: 6px; vertical-align: middle; padding: 2px 7px; font-size: 10px; }

/* ==================== КАЛЕНДАРЬ СОБЫТИЙ ==================== */
.ev-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ev-filters select { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--ink); outline: none; }

.ev-timeline { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.ev-day { display: grid; grid-template-columns: 132px 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.ev-day:first-child { border-top: none; }
.ev-day.is-today { background: rgba(193,252,2,.10); border-radius: var(--radius-sm); padding: 10px 8px; }
.ev-date { display: flex; flex-direction: column; gap: 2px; padding-left: 4px; }
.ev-date b { font-size: 14.5px; }
.ev-date span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ev-items { display: flex; flex-direction: column; gap: 6px; }

.ev-row { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); border-radius: var(--radius-sm); padding: 9px 12px; }
.ev-row.holiday { background: rgba(255,196,0,.12); }
.ev-row.imp-high { box-shadow: inset 3px 0 0 var(--p0); }
.ev-ico { font-size: 15px; line-height: 1.4; }
.ev-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ev-main b { font-size: 13.5px; font-weight: 700; }
.ev-main a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.ev-main a:hover { border-color: var(--ink); }
.ev-flag { margin-right: 6px; }
.ev-meta { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ev-note { font-size: 12px; color: var(--ink); opacity: .78; }

.ev-impacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-top: 14px; }
.ev-impact { background: var(--surface); border-radius: var(--radius-sm); padding: 13px 15px; display: flex; flex-direction: column; gap: 7px; }
.ev-impact.up { box-shadow: inset 3px 0 0 #35a35a; }
.ev-impact.down { box-shadow: inset 3px 0 0 var(--p0); }
.ev-impact.quiet { opacity: .72; }
.ev-impact-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.ev-delta { margin-left: auto; font-weight: 800; font-size: 15px; }
.ev-impact.up .ev-delta { color: #35a35a; }
.ev-impact.down .ev-delta { color: var(--p0); }
.ev-impact-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.ev-impact-nums b { color: var(--ink); }
.ev-impact-text { font-size: 13px; line-height: 1.45; }
.ev-impact-sub { font-size: 11.5px; color: var(--muted); }
.ev-impact-watch { font-size: 12px; color: var(--muted); font-weight: 600; }
.ev-drivers { display: flex; flex-wrap: wrap; gap: 5px; }
.ev-impact-events { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 7px; }

@media (max-width: 720px) {
  .ev-day { grid-template-columns: 1fr; gap: 6px; }
  .ev-impacts { grid-template-columns: 1fr; }
}
.ev-warn { margin-top: 12px; background: rgba(255,196,0,.16); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; }
