/* ==========================================================================
   Единый портал автомобильных дорог — демо. Дизайн-система.
   ========================================================================== */
:root {
  --primary: #0f3d8c;
  --primary-600: #1550b8;
  --primary-500: #2563d6;
  --primary-50: #eef3fc;
  --primary-100: #dbe6f8;
  --navy: #0a2257;
  --teal: #0d9488;
  --teal-50: #e6f6f4;
  --green: #15803d;
  --green-50: #e8f6ed;
  --amber: #b45309;
  --amber-50: #fdf3e2;
  --orange: #c2410c;
  --orange-50: #fdeee6;
  --red: #c42a2a;
  --red-50: #fcebeb;
  --violet: #5b3fc4;
  --violet-50: #efebfb;
  --slate-50: #f6f8fb;
  --slate-100: #eef1f6;
  --slate-200: #e2e7ef;
  --slate-300: #cdd4df;
  --slate-400: #98a2b3;
  --slate-500: #667085;
  --slate-600: #475467;
  --slate-700: #344054;
  --slate-900: #0f172a;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --border: #e3e8f0;
  --text: #0f172a;
  --muted: #5b6678;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 6px 16px -6px rgba(16, 24, 40, .08);
  --shadow-lg: 0 24px 48px -12px rgba(15, 34, 87, .22);
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  overflow-x: hidden;
}
a { color: var(--primary-600); text-decoration: none; }
a:hover { color: var(--primary); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; color: var(--slate-900); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.num, .tnum { font-variant-numeric: tabular-nums; }
[data-lucide] { width: 18px; height: 18px; stroke-width: 2; flex-shrink: 0; }
svg.lucide { width: 18px; height: 18px; flex-shrink: 0; }
.container { max-width: 1360px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- Demo strip ---------- */
.demo-strip {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--navy); color: #c9d6f2;
  font-size: 12.5px; padding: 6px 16px; text-align: center;
}
.demo-strip svg { width: 14px; height: 14px; color: #5eead4; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand-logo { border-radius: 10px; box-shadow: 0 4px 10px -3px rgba(15, 61, 140, .5); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--muted); }
.main-nav { display: flex; gap: 2px; margin-left: 8px; flex: 1; }
.main-nav a {
  position: relative; padding: 8px 12px; border-radius: 8px;
  color: var(--slate-600); font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: color .15s, background .15s;
}
.main-nav a:hover { color: var(--primary); background: var(--slate-100); }
.main-nav a.active { color: var(--primary); }
.main-nav a.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 2px;
  background: var(--primary-600); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang-switch { display: inline-flex; background: var(--slate-100); border-radius: 9px; padding: 3px; }
.lang-switch button {
  border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--slate-500); letter-spacing: .02em;
}
.lang-switch button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.lang-dark { background: rgba(255, 255, 255, .08); }
.lang-dark button { color: #9fb0d6; }
.lang-dark button.active { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.header-actions .burger { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px -4px rgba(15, 61, 140, .55); }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #0b7f75; color: #fff; }
.btn-outline { background: #fff; border-color: var(--slate-300); color: var(--slate-700); }
.btn-outline:hover { border-color: var(--primary-500); color: var(--primary); background: var(--primary-50); }
.btn-ghost { background: transparent; color: var(--slate-700); }
.btn-ghost:hover { background: var(--slate-100); color: var(--primary); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a52020; color: #fff; }
.btn-on-dark { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .15); }
.btn-on-dark:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-xs svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 9px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--slate-600);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--slate-100); color: var(--primary); }
.link-btn { border: 0; background: none; padding: 0; color: var(--primary-600); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--primary); text-decoration: underline; }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--slate-100); color: var(--slate-600);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
.b-green { background: var(--green-50); color: var(--green); }
.b-red { background: var(--red-50); color: var(--red); }
.b-amber { background: var(--amber-50); color: var(--amber); }
.b-orange { background: var(--orange-50); color: var(--orange); }
.b-violet { background: var(--violet-50); color: var(--violet); }
.b-blue { background: var(--primary-50); color: var(--primary-600); }
.b-teal { background: var(--teal-50); color: var(--teal); }
.b-slate { background: var(--slate-100); color: var(--slate-600); }
.code-chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.code-chip.local { background: var(--teal); }
.demo-tag {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px;
  background: #fff7e6; color: #9a5b00; border: 1px dashed #f0c46c; font-size: 11.5px; font-weight: 600;
  white-space: nowrap;
}
.demo-tag svg { width: 12px; height: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--slate-200); background: #fff;
  font-size: 13px; font-weight: 500; color: var(--slate-600); cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary-500); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip-sep { width: 1px; background: var(--slate-200); margin: 4px 2px; }

/* ---------- Form controls ---------- */
.input, .select, .textarea {
  height: 40px; width: 100%; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--slate-300); background: #fff; font-size: 14px;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(37, 99, 214, .14); }
.input.invalid, .select.invalid, .textarea.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(196, 42, 42, .12); }
.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--slate-400); pointer-events: none; }
.input-icon .input { padding-left: 38px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--slate-700); }
.field .req { color: var(--red); }
.field .hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.seg { display: inline-flex; background: var(--slate-100); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--slate-500); cursor: pointer; white-space: nowrap; }
.seg button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

/* ---------- Cards / layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-head h3 svg { color: var(--primary-600); }
.page { padding: 28px 0 64px; animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: .3; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 750; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 760px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--primary-600); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs svg { width: 14px; height: 14px; color: var(--slate-400); }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 14px; flex-wrap: wrap; }
.section-title h2 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-title h2 .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-50); color: var(--primary-600); }

/* ---------- KPI ---------- */
.kpi {
  position: relative; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover, .kpi.active { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-100); }
.kpi.active { outline: 2px solid var(--primary-500); outline-offset: -1px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--primary-50); color: var(--primary-600); }
.kpi-ico.teal { background: var(--teal-50); color: var(--teal); }
.kpi-ico.green { background: var(--green-50); color: var(--green); }
.kpi-ico.red { background: var(--red-50); color: var(--red); }
.kpi-ico.amber { background: var(--amber-50); color: var(--amber); }
.kpi-ico.violet { background: var(--violet-50); color: var(--violet); }
.kpi-value { font-size: 28px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-value small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-label { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.kpi-foot { font-size: 12px; color: var(--slate-400); }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 46px 0 30px; overflow: hidden;
  background:
    radial-gradient(1200px 380px at 85% -10%, rgba(13, 148, 136, .12), transparent 60%),
    radial-gradient(900px 400px at 0% 0%, rgba(21, 80, 184, .12), transparent 60%),
    linear-gradient(180deg, #f0f5fd 0%, var(--bg) 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(15, 61, 140, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 61, 140, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero .container { position: relative; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px;
  background: #fff; border: 1px solid var(--primary-100); font-size: 13px; font-weight: 500; color: var(--slate-600); box-shadow: var(--shadow-sm);
}
.hero-pill .pdot { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--teal-50); color: var(--teal); font-weight: 600; font-size: 12px; }
.hero h1 { font-size: 44px; line-height: 1.08; font-weight: 800; letter-spacing: -.035em; max-width: 820px; margin-top: 16px; }
.hero h1 .accent { background: linear-gradient(90deg, var(--primary-600), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 17px; color: var(--slate-600); max-width: 760px; margin-top: 14px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-kpis { margin-top: 28px; }
.hero-kpis .kpi { background: rgba(255, 255, 255, .9); }
.home-map { margin-top: 18px; }

/* ---------- Road map component ---------- */
.rm { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.rm-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: #fff; position: relative; z-index: 500; }
.rm-search { position: relative; width: 300px; max-width: 100%; }
.rm-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); max-height: 320px; overflow: auto; z-index: 900; padding: 6px;
}
.rm-suggest button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; }
.rm-suggest button:hover, .rm-suggest button.hl { background: var(--primary-50); }
.rm-suggest .empty { padding: 10px; color: var(--muted); font-size: 13px; }
.rm-region { width: 230px; }
.rm-tools-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.rm-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rm-count b { color: var(--text); }
.rm-body { position: relative; display: flex; height: 640px; }
.rm.full .rm-body { height: calc(100vh - 300px); min-height: 480px; }
.rm-list { width: 330px; flex-shrink: 0; border-right: 1px solid var(--border); overflow: auto; background: #fbfcfe; }
.rm-list-head { position: sticky; top: 0; background: #fbfcfe; padding: 12px 16px 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); z-index: 2; }
.rm-item { display: flex; gap: 10px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--slate-100); background: none; text-align: left; cursor: pointer; transition: background .12s; }
.rm-item:hover { background: var(--primary-50); }
.rm-item.active { background: var(--primary-50); box-shadow: inset 3px 0 0 var(--primary-600); }
.rm-item .ri-main { flex: 1; min-width: 0; }
.rm-item .ri-name { font-weight: 600; font-size: 14px; }
.rm-item .ri-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.rm-item .ri-badges { margin-top: 6px; }
.rm-map-wrap { position: relative; flex: 1; min-width: 0; }
.rm-map { position: absolute; inset: 0; background: #e9eef5; }
.rm-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 450; background: rgba(255, 255, 255, .95); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; font-size: 12.5px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 170px;
}
.rm-legend .lg-title { font-weight: 600; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rm-legend .lg-row { display: flex; align-items: center; gap: 8px; }
.rm-legend .lg-line { width: 26px; height: 4px; border-radius: 3px; }
.rm-note { position: absolute; right: 12px; bottom: 26px; z-index: 450; font-size: 11.5px; color: var(--slate-600); background: rgba(255, 255, 255, .92); padding: 4px 9px; border-radius: 7px; border: 1px solid var(--border); display: flex; align-items: center; gap: 5px; }
.rm-note svg { width: 13px; height: 13px; color: var(--amber); }
.rm-fit { position: absolute; top: 12px; right: 12px; z-index: 450; display: flex; flex-direction: column; gap: 6px; }
.rm-fit .icon-btn { box-shadow: var(--shadow); }
.map-error {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 460;
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 120px);
  background: #fff8eb; color: #8a4b00; border: 1px solid #f3cf8a; border-radius: 12px; padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow);
}
.map-error svg { color: var(--amber); }
.map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); background: repeating-linear-gradient(45deg, #f1f4f9, #f1f4f9 12px, #eef1f6 12px, #eef1f6 24px); }
.map-fallback .mf-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px 26px; max-width: 420px; box-shadow: var(--shadow); }
.map-fallback h4 { margin: 8px 0 6px; font-size: 16px; }

/* Side panel inside map */
.rm-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100%; z-index: 600;
  background: #fff; border-left: 1px solid var(--border); box-shadow: -18px 0 40px -18px rgba(15, 34, 87, .25);
  transform: translateX(105%); transition: transform .32s var(--ease); display: flex; flex-direction: column;
}
.rm-panel.open { transform: none; }
.rp-head { padding: 18px 20px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--primary-50), #fff); }
.rp-head-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rp-head h3 { font-size: 20px; font-weight: 750; }
.rp-head .rp-route { color: var(--muted); font-size: 13.5px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.rp-body { flex: 1; overflow: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; }
.rp-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.rp-foot .btn-primary { flex: 1; }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.info-list .il-item { min-width: 0; }
.info-list dt { font-size: 12px; color: var(--muted); font-weight: 500; }
.info-list dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.info-list .full { grid-column: span 2; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stat { background: var(--slate-50); border: 1px solid var(--slate-100); border-radius: 11px; padding: 10px 12px; }
.mini-stat b { display: block; font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mini-stat span { font-size: 11.5px; color: var(--muted); }
.rp-sec-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.sec-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.sec-item:hover, .sec-item.hl { border-color: var(--primary-500); background: var(--primary-50); }
.sec-item .sw { width: 6px; align-self: stretch; border-radius: 4px; }
.sec-item .si-main { flex: 1; min-width: 0; font-size: 13px; }
.sec-item .si-main b { display: block; font-size: 13.5px; font-weight: 600; }

.leaflet-container { font-family: inherit; }
.leaflet-tooltip.road-tip { font-family: inherit; font-weight: 600; font-size: 12.5px; padding: 5px 9px; border-radius: 8px; border: 0; box-shadow: var(--shadow); }
.leaflet-control-attribution { font-size: 10.5px; }
.city-label { background: none; border: 0; box-shadow: none; font-size: 11px; font-weight: 600; color: var(--slate-600); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; padding: 0; }
.city-label::before { display: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  padding: 12px 14px; background: var(--slate-50); border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}
.tbl th.sortable { cursor: pointer; }
.tbl th.sortable:hover { color: var(--primary); }
.tbl th .sort-ico { display: inline-block; margin-left: 4px; opacity: .35; font-size: 11px; }
.tbl th.sorted .sort-ico { opacity: 1; color: var(--primary-600); }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--slate-100); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr:hover { background: #f8faff; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .t-name { font-weight: 600; color: var(--text); }
.tbl .t-sub { font-size: 12.5px; color: var(--muted); }
.tbl .right { text-align: right; }
.tbl tr.flash { animation: flash 2.4s ease; }
@keyframes flash { 0%, 30% { background: #dff7ef; } 100% { background: transparent; } }
.table-empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.table-empty svg { width: 34px; height: 34px; color: var(--slate-300); margin-bottom: 8px; }
.filters { display: flex; gap: 10px; padding: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.filters .input-icon { flex: 1 1 260px; }
.filters .select { width: auto; min-width: 170px; flex: 0 1 220px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.pager-btns { display: flex; gap: 4px; align-items: center; }
.pager-btns button { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--slate-600); display: inline-grid; place-items: center; }
.pager-btns button:hover:not(:disabled) { border-color: var(--primary-500); color: var(--primary); }
.pager-btns button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager-btns button:disabled { opacity: .4; cursor: default; }
.pager .select { width: auto; height: 34px; }
.progress { height: 8px; border-radius: 99px; background: var(--slate-100); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary-600), var(--teal)); transition: width .6s var(--ease); }
.progress.sm { height: 6px; width: 90px; }

/* ---------- Passport ---------- */
.pp-hero { padding: 24px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start;
  background: linear-gradient(135deg, #fff 0%, #f3f7fe 100%); position: relative; overflow: hidden; }
.pp-hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(13, 148, 136, .12), transparent 70%); pointer-events: none; }
.pp-hero h1 { font-size: 32px; font-weight: 800; margin: 10px 0 6px; }
.pp-route { display: flex; align-items: center; gap: 8px; color: var(--slate-600); font-size: 15px; flex-wrap: wrap; }
.pp-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pp-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.subnav { position: sticky; top: var(--header-h); z-index: 800; background: rgba(244, 246, 250, .94); backdrop-filter: blur(10px); margin: 18px 0 4px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.subnav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav button { border: 0; background: none; padding: 9px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--slate-500); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.subnav button:hover { color: var(--primary); background: #fff; }
.subnav button.active { color: var(--primary); background: #fff; box-shadow: var(--shadow-sm); }
.subnav button .cnt { font-size: 11.5px; background: var(--slate-200); color: var(--slate-600); border-radius: 99px; padding: 1px 7px; }
.subnav button.active .cnt { background: var(--primary-100); color: var(--primary); }
.pp-section { scroll-margin-top: calc(var(--header-h) + 70px); }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dl-grid .dl-item { padding: 14px 22px; border-bottom: 1px solid var(--slate-100); display: flex; gap: 12px; }
.dl-grid .dl-item:nth-child(odd) { border-right: 1px solid var(--slate-100); }
.dl-item .dl-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--slate-50); color: var(--slate-500); display: grid; place-items: center; flex-shrink: 0; }
.dl-item dt { font-size: 12.5px; color: var(--muted); }
.dl-item dd { margin: 2px 0 0; font-weight: 600; font-size: 14.5px; }
.pp-map { height: 440px; position: relative; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.pp-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.pp-map-side { border-left: 1px solid var(--border); padding: 16px; max-height: 440px; overflow: auto; }
.project-card { padding: 20px 22px; border-bottom: 1px solid var(--border); }
.project-card:last-child { border-bottom: 0; }
.pc-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pc-head h4 { font-size: 16.5px; font-weight: 650; }
.pc-id { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.pc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; margin-top: 16px; }
.pc-grid dt { font-size: 12px; color: var(--muted); }
.pc-grid dd { margin: 3px 0 0; font-weight: 600; font-size: 14px; }
.pc-progress { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.pc-progress .progress { flex: 1; }
.fin-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-bottom: 1px solid var(--border); }
.fin-summary > div { padding: 18px 22px; border-right: 1px solid var(--border); }
.fin-summary > div:last-child { border-right: 0; }
.fin-summary b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fin-summary span { font-size: 12.5px; color: var(--muted); }
.contractor-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; transition: box-shadow .2s, border-color .2s; }
.contractor-card.hl { border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(37, 99, 214, .15); }
.cc-head { display: flex; gap: 12px; align-items: center; }
.cc-avatar { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 750; font-size: 16px; color: #fff; background: linear-gradient(135deg, var(--primary-600), var(--teal)); flex-shrink: 0; }
.cc-head h4 { font-size: 15.5px; font-weight: 650; }
.cc-rows { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--slate-100); }
.cc-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--slate-100); font-size: 13.5px; }
.cc-row span:first-child { color: var(--muted); flex-shrink: 0; }
.cc-row span:last-child { font-weight: 600; text-align: right; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--slate-100) 0); }
.ring::before { content: attr(data-label); width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- Analytics ---------- */
.chart-card .chart-box { position: relative; height: 300px; padding: 16px 20px 20px; }
.chart-card.tall .chart-box { height: 360px; }
.chart-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- About ---------- */
.scenario { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.scenario-num { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 750; }
.scenario h4 { font-size: 16px; font-weight: 650; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--slate-600); }
.steps span { background: var(--slate-100); padding: 3px 8px; border-radius: 6px; }
.steps svg { width: 12px; height: 12px; color: var(--slate-400); }
.feature { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.feature .kpi-ico { margin-bottom: 4px; }
.feature h4 { font-size: 16px; }
.feature p { color: var(--muted); font-size: 14px; }
.notice { display: flex; gap: 12px; padding: 16px 18px; border-radius: 12px; background: #fff8eb; border: 1px solid #f3dca8; color: #7a4a05; font-size: 14px; }
.notice svg { color: var(--amber); margin-top: 2px; }
.notice.info { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); }
.notice.info svg { color: var(--primary-600); }

/* ---------- Quick links ---------- */
.quick { padding: 20px; display: flex; gap: 14px; align-items: flex-start; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.quick:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-100); color: var(--text); }
.quick h4 { font-size: 15.5px; font-weight: 650; display: flex; align-items: center; gap: 6px; }
.quick p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.quick .arrow { margin-left: auto; color: var(--slate-400); transition: transform .2s, color .2s; }
.quick:hover .arrow { transform: translateX(3px); color: var(--primary-600); }
.feed-item { display: flex; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--slate-100); align-items: center; cursor: pointer; transition: background .12s; }
.feed-item:hover { background: #f8faff; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .fi-main { flex: 1; min-width: 0; }
.feed-item .fi-main b { font-size: 14px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-item .fi-main span { font-size: 12.5px; color: var(--muted); }

/* ---------- Modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 3000; display: none; }
.modal-root.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 23, 52, .5); backdrop-filter: blur(3px); animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; box-shadow: 0 40px 80px -20px rgba(10, 23, 52, .45);
  animation: modalIn .28s var(--ease);
}
.modal.lg { width: min(920px, calc(100vw - 32px)); }
.modal.sm { width: min(480px, calc(100vw - 32px)); }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 18px; font-weight: 700; }
.modal-head p { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 20px 24px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }

/* Protocol document */
.protocol { position: relative; border: 1px solid var(--slate-200); border-radius: 12px; padding: 28px 30px; background: #fff; overflow: hidden; font-size: 13.5px; }
.protocol::before {
  content: 'ДЕМО · ОБРАЗЕЦ'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-24deg);
  font-size: 78px; font-weight: 800; color: rgba(196, 42, 42, .06); white-space: nowrap; pointer-events: none; letter-spacing: .04em;
}
.protocol .pr-top { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--slate-900); padding-bottom: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.protocol .pr-org { font-weight: 700; font-size: 14px; }
.protocol h2 { text-align: center; font-size: 17px; text-transform: uppercase; letter-spacing: .06em; margin: 6px 0 4px; }
.protocol .pr-no { text-align: center; color: var(--muted); margin-bottom: 18px; }
.protocol table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.protocol td, .protocol th { border: 1px solid var(--slate-200); padding: 7px 10px; text-align: left; vertical-align: top; }
.protocol th { background: var(--slate-50); font-size: 12px; font-weight: 600; color: var(--slate-600); }
.protocol .kv td:first-child { width: 38%; color: var(--muted); }
.protocol .pr-concl { padding: 12px 14px; border-radius: 10px; background: var(--slate-50); border: 1px solid var(--slate-200); margin-bottom: 14px; }
.protocol .pr-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.protocol .pr-sign div { border-top: 1px solid var(--slate-300); padding-top: 6px; min-width: 200px; }
.protocol .pr-disclaimer { margin-top: 18px; padding: 10px 12px; border-radius: 8px; background: var(--red-50); color: var(--red); font-size: 12.5px; font-weight: 500; }
.val-ok { color: var(--green); font-weight: 700; }
.val-bad { color: var(--red); font-weight: 700; }

/* ---------- Toast ---------- */
.toast-root { position: fixed; right: 20px; top: 96px; z-index: 4000; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast { display: flex; gap: 12px; align-items: flex-start; background: var(--slate-900); color: #fff; padding: 14px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); width: 380px; max-width: 100%; animation: toastIn .3s var(--ease); font-size: 14px; }
.toast.out { animation: toastOut .25s ease forwards; }
.toast svg { color: #5eead4; margin-top: 1px; }
.toast .t-body { flex: 1; }
.toast .t-body b { display: block; margin-bottom: 2px; }
.toast .t-body span { color: #b9c3d6; font-size: 13px; }
.toast .t-act { margin-top: 10px; }
.toast .t-act button { background: rgba(255, 255, 255, .14); border: 0; color: #fff; padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; }
.toast .t-act button:hover { background: rgba(255, 255, 255, .24); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr 1fr; gap: 28px; align-items: start; }
.footer-brand { display: flex; gap: 12px; }
.footer-brand p { font-size: 13px; color: var(--muted); margin-top: 4px; max-width: 360px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.footer-links a { color: var(--slate-600); }
.footer-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); text-align: right; }

/* ---------- Admin ---------- */
.admin-header { display: none; position: sticky; top: 0; z-index: 1000; background: linear-gradient(90deg, #0a1d47, #102c66); color: #fff; }
.admin-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; padding: 0 24px; }
.admin-brand { display: flex; gap: 12px; align-items: center; }
.admin-brand img { border-radius: 8px; }
.admin-brand strong { display: block; font-size: 15px; }
.admin-brand span { display: block; font-size: 12px; color: #9fb0d6; }
.admin-header-actions { display: flex; gap: 10px; align-items: center; }
body.admin-mode .site-header, body.admin-mode .site-footer { display: none; }
body.admin-mode .admin-header { display: block; }
body.admin-mode { background: #eef1f6; --header-h: 60px; }
.admin-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 60px - 30px); }
.admin-side { background: #0f1f45; color: #c7d2ea; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto; }
.admin-side .as-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6f82ad; padding: 10px 12px 6px; font-weight: 600; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #c7d2ea; font-size: 14px; font-weight: 500; }
.admin-side a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-side a.active { background: rgba(94, 234, 212, .12); color: #fff; box-shadow: inset 3px 0 0 #5eead4; }
.admin-side a .as-cnt { margin-left: auto; font-size: 11.5px; background: rgba(255, 255, 255, .1); padding: 1px 8px; border-radius: 99px; }
.admin-side .as-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 8px; }
.admin-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 13px; }
.admin-user .av { width: 34px; height: 34px; border-radius: 50%; background: #5eead4; color: #0f1f45; display: grid; place-items: center; font-weight: 750; }
.admin-main { padding: 28px; min-width: 0; animation: fadeUp .3s var(--ease); }
.admin-main .page-head h1 { font-size: 24px; }
.login-wrap { min-height: calc(100vh - 90px); display: grid; place-items: center; padding: 24px;
  background: radial-gradient(800px 400px at 50% 0%, rgba(21, 80, 184, .15), transparent 70%); }
.login-card { width: min(440px, 100%); padding: 32px; }
.login-card h2 { font-size: 22px; margin: 16px 0 6px; }
.log-item { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--slate-100); font-size: 14px; }
.log-item:last-child { border-bottom: 0; }
.log-item .li-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary-600); flex-shrink: 0; }
.log-item time { font-size: 12px; color: var(--muted); }
.preview-frame { border: 1px dashed var(--slate-300); border-radius: 14px; padding: 4px; background: var(--slate-50); }
.preview-frame .rm-panel { position: relative; transform: none; width: 100%; box-shadow: none; border: 0; border-radius: 12px; height: auto; }
.preview-frame .rp-body { overflow: visible; }
.file-drop { border: 1.5px dashed var(--slate-300); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 12px; background: var(--slate-50); }
.file-drop input { font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 1420px) {
  .main-nav a { padding: 8px 9px; font-size: 13.5px; }
  .admin-link span { display: none; }
}
@media (max-width: 1240px) {
  .header-actions .burger { display: inline-grid; }
  .main-nav {
    position: fixed; top: calc(var(--header-h) + 30px); left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 8px 16px 16px; box-shadow: var(--shadow-lg);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all .2s var(--ease);
  }
  .main-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 12px; font-size: 15px; }
  .main-nav a.active { background: var(--primary-50); }
  .main-nav a.active::after { display: none; }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-map-layout { grid-template-columns: 1fr; }
  .pp-map-side { border-left: 0; border-top: 1px solid var(--border); max-height: none; }
  .rm-list { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .admin-side .as-label, .admin-side .admin-user { display: none; }
  .admin-side .as-bottom { margin: 0; padding: 0; border: 0; flex-direction: row; }
}
@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .brand-sub { display: none; }
  .brand-title { font-size: 13.5px; max-width: 150px; }
  .hero { padding: 28px 0 20px; }
  .hero h1 { font-size: 30px; }
  .hero-sub { font-size: 15px; }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 22px; }
  .page-head h1 { font-size: 24px; }
  .rm-body { height: 520px; }
  .rm.full .rm-body { height: calc(100vh - 230px); }
  .rm-search, .rm-region { width: 100%; }
  .rm-tools-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .rm-toolbar .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .rm-legend { display: none; }
  .rm-panel { width: 100%; }
  .dl-grid { grid-template-columns: 1fr; }
  .dl-grid .dl-item:nth-child(odd) { border-right: 0; }
  .pc-grid { grid-template-columns: 1fr 1fr; }
  .fin-summary { grid-template-columns: 1fr; }
  .fin-summary > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .pp-hero h1 { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .filters .select { flex: 1 1 140px; min-width: 0; }
  .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; max-height: 92vh; border-radius: 18px 18px 0 0; animation: sheetIn .3s var(--ease); }
  .modal.lg, .modal.sm { width: 100vw; }
  @keyframes sheetIn { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
  .protocol { padding: 18px; }
  .admin-main { padding: 16px; }
  .header-actions .lang-switch button { padding: 5px 7px; }
  .demo-strip { font-size: 11.5px; }
}

/* ---------- Print ---------- */
@media print {
  .demo-strip, .site-header, .site-footer, .subnav, .pp-actions, .toast-root, .admin-header { display: none !important; }
  body { background: #fff; }
  body.printing-modal > *:not(.modal-root) { display: none !important; }
  body.printing-modal .modal-root { position: static; }
  body.printing-modal .modal-backdrop, body.printing-modal .modal-foot, body.printing-modal .modal-head .icon-btn { display: none !important; }
  body.printing-modal .modal { position: static; transform: none; width: 100%; max-height: none; box-shadow: none; animation: none; }
  body.printing-modal .modal-body { overflow: visible; }
}

/* Мягкая тонировка картографической подложки */
.tiles-light { filter: grayscale(.55) saturate(.8) brightness(1.04) contrast(.92); }
.leaflet-interactive:focus, .leaflet-container path:focus { outline: none; }
.leaflet-control-layers-toggle { width: 34px !important; height: 34px !important; background-size: 20px 20px; }

#app { min-height: calc(100vh - 260px); }
.tbl td.num { white-space: nowrap; }
.nav-admin-mobile { display: none; }
@media (max-width: 1240px) { .main-nav .nav-admin-mobile { display: block; border-top: 1px solid var(--border); margin-top: 6px; } }
@media (max-width: 760px) {
  .admin-link { display: none; }
  .header-inner { gap: 10px; }
  .pp-route svg { display: none; }
}
@media (max-width: 760px) {
  .rm-tools-right { flex-wrap: wrap; gap: 8px; }
  .rm-tools-right .seg { width: 100%; }
  .rm-tools-right .seg button { flex: 1; }
  .grid { min-width: 0; }
}

/* ---------- Источники данных ---------- */
.src-legend { gap: 8px; flex-wrap: wrap; }
.src-tbl td { vertical-align: top; line-height: 1.5; }
.src-tbl td:first-child { width: 34%; }
.src-tbl td:last-child { width: 1%; white-space: nowrap; }
.src-ent { display: flex; gap: 12px; align-items: flex-start; }
.src-ent .ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-50); color: var(--primary-600); }
.src-ent .ico svg { width: 18px; height: 18px; }
.src-note { margin-top: 4px; }
@media (max-width: 720px) {
  .src-tbl thead { display: none; }
  .src-tbl, .src-tbl tbody, .src-tbl tr, .src-tbl td { display: block; width: auto !important; }
  .src-tbl tr { padding: 14px 16px; border-bottom: 1px solid var(--slate-100); }
  .src-tbl td { padding: 4px 0; border: 0; white-space: normal !important; }
}
