/* Mycar · дашборд руководителей — «Fintech Command Center», светлая тема.
   Общий для страниц рассрочки, заказ-нарядов и входа (middleware.js). */

:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --border: #e5eaf2;
  --border-2: #d0d8e4;
  --text: #101828;
  --text-2: #667085;
  --text-3: #98a2b3;
  --accent: #155eef;
  --accent-2: #5b8def;
  --accent-soft: #eaf1ff;
  --navy: #071b38;
  --green: #22c55e;
  --green-ink: #15803d;
  --green-soft: #e8f8ee;
  --violet: #8b5cf6;
  --violet-ink: #6d28d9;
  --violet-soft: #f1ebff;
  --orange: #f59e0b;
  --orange-ink: #b45309;
  --orange-soft: #fef4e2;
  --bad: #d92d20;
  --bad-soft: #fdecea;
  --track: #eef2f7;
  --c-apps: var(--accent);
  --c-appr: var(--accent-2);
  --c-iss: var(--green);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px -12px rgba(16, 24, 40, 0.10);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, 0.04), 0 18px 40px -18px rgba(16, 24, 40, 0.22);
  --r: 18px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-d: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
.muted { color: var(--text-3); }
.good { color: var(--green-ink); }
.bad { color: var(--bad); }

/* ---------- каркас: боковая панель + основная область ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 26px 16px 20px; background: linear-gradient(180deg, #ffffff 0%, #f8fafd 100%);
  border-right: 1px solid var(--border); overflow: hidden;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 0 12px 30px; text-decoration: none; }
.logo b { font: 800 30px/1 var(--font-d); letter-spacing: -0.04em; color: var(--navy); }
.nav { display: grid; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  text-decoration: none; color: #344054; font-weight: 500; font-size: 14.5px; transition: background .15s, color .15s;
}
.nav a svg { width: 20px; height: 20px; flex: none; color: #475467; }
.nav a:hover { background: var(--track); }
.nav a.on { background: var(--accent); color: #fff; box-shadow: 0 8px 18px -10px rgba(21, 94, 239, .8); }
.nav a.on svg { color: #fff; }
.nav .sep { height: 1px; background: var(--border); margin: 10px 12px; }
.side-art { margin-top: auto; margin-left: -16px; margin-right: -16px; margin-bottom: -20px; pointer-events: none; }
.side-art svg { display: block; width: 100%; height: auto; }

.main { padding: 22px 32px 48px; min-width: 0; max-width: 1720px; }

/* ---------- верхняя панель ---------- */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; justify-content: space-between; margin-bottom: 20px; }
.titlewrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; min-width: 0; }
.titlewrap h1 { margin: 0; font: 800 32px/1.1 var(--font-d); letter-spacing: -0.03em; color: var(--navy); }
.fresh { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2);
  padding-left: 18px; border-left: 1px solid var(--border); white-space: nowrap; }
.fresh .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, .15); }
.fresh.stale .dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.fresh.old .dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(217, 45, 32, .14); }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* выпадающие списки */
.dd { position: relative; }
.dd > button, .pill-date {
  display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px 0 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text); box-shadow: var(--shadow-sm); white-space: nowrap;
  transition: border-color .15s, box-shadow .15s;
}
.dd > button:hover { border-color: var(--border-2); }
.dd > button svg { width: 16px; height: 16px; color: var(--text-2); transition: transform .2s; }
.dd.open > button { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(21, 94, 239, .12); }
.dd.open > button svg { transform: rotate(180deg); }
.dd .menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 100%; z-index: 30; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.dd.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.dd .menu button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 12px;
  border: 0; background: none; border-radius: 9px; cursor: pointer; font-size: 14px; text-align: left; white-space: nowrap;
}
.dd .menu button:hover, .dd .menu button:focus-visible { background: var(--track); outline: none; }
.dd .menu button.on { color: var(--accent); font-weight: 600; }
.dd .menu button.on::after { content: "✓"; }
.dd .menu .grp { padding: 8px 12px 4px; font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.pill-date { cursor: default; }
.pill-date svg { width: 18px; height: 18px; color: var(--text); }
.dd .lbl { color: var(--text-3); font-weight: 400; }

/* ---------- карточки ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 22px 24px; min-width: 0; position: relative;
}
.card h2 { margin: 0; font: 800 21px/1.2 var(--font-d); letter-spacing: -0.02em; color: var(--navy); }
.card .cap { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.card-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.card-head .right { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.row { display: grid; gap: 20px; margin-bottom: 20px; }
.row.hero { grid-template-columns: 1.45fr 1fr; }
.row.kpi4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row.split { grid-template-columns: 1.5fr 1fr; }
.row.two { grid-template-columns: 1fr 1fr; }

/* главные блоки */
.hero-navy {
  position: relative; overflow: hidden; border-radius: var(--r); padding: 26px 30px; min-height: 200px; color: #fff;
  background: radial-gradient(120% 140% at 85% 30%, #12396f 0%, #0a2449 40%, var(--navy) 75%);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; justify-content: space-between;
}
.hero-navy .eyebrow { font: 700 15px/1 var(--font-d); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.88); position: relative; z-index: 2; }
.hero-navy .big { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; position: relative; z-index: 2; }
.hero-navy .num { font: 800 84px/0.95 var(--font-d); letter-spacing: -0.045em; }
.hero-navy .meta { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-size: 13.5px; color: rgba(255,255,255,.75); }
.hero-navy .meta b { color: #fff; font-weight: 600; }
.hero-navy .car { position: absolute; right: -20px; top: -10px; bottom: -10px; width: 60%; z-index: 1; pointer-events: none; }
.hero-navy .car svg { width: 100%; height: 100%; }
.hero-navy .spark { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; z-index: 1; opacity: .5; pointer-events: none; }
.hero-navy .spark svg { width: 100%; height: 100%; display: block; }

.hero-light { position: relative; overflow: hidden; padding: 26px 30px; min-height: 200px; display: flex; flex-direction: column; justify-content: space-between; }
.hero-light h3 { margin: 0; font: 800 22px/1.2 var(--font-d); letter-spacing: -0.02em; color: var(--navy); position: relative; z-index: 2; }
.hero-light .num { font: 800 60px/1 var(--font-d); letter-spacing: -0.04em; color: var(--navy); margin-top: 14px; position: relative; z-index: 2; white-space: nowrap; }
.hero-light .num small { font-size: .55em; letter-spacing: -0.02em; }
.hero-light .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; position: relative; z-index: 2; font-size: 14px; color: var(--text-2); }
.hero-light .area { position: absolute; right: 0; bottom: 0; width: 60%; height: 75%; z-index: 1; pointer-events: none; }
.hero-light .area svg { width: 100%; height: 100%; display: block; }

/* бейдж изменения */
.delta { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.delta svg { width: 16px; height: 16px; }
.delta.up { background: var(--green-soft); color: var(--green-ink); }
.delta.down { background: var(--bad-soft); color: var(--bad); }
.delta.flat { background: var(--track); color: var(--text-2); }
.hero-navy .delta.up { background: rgba(34, 197, 94, .2); color: #86efac; }
.hero-navy .delta.down { background: rgba(239, 68, 68, .22); color: #fecaca; }
.hero-navy .delta.flat { background: rgba(255,255,255,.12); color: #e5ecf6; }
.delta-cap { font-size: 13px; color: var(--text-2); }
.hero-navy .delta-cap { color: rgba(255,255,255,.72); }
.delta-wrap { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* вторичные KPI */
.kpi-card { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-card .kh { display: flex; align-items: center; gap: 12px; font: 700 16px/1.2 var(--font-d); color: var(--navy); }
.ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ico svg { width: 19px; height: 19px; }
.ico.blue { background: var(--accent-soft); color: var(--accent); }
.ico.green { background: var(--green-soft); color: var(--green-ink); }
.ico.violet { background: var(--violet-soft); color: var(--violet); }
.ico.orange { background: var(--orange-soft); color: var(--orange-ink); }
.kpi-card .kb { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.kpi-card .kv { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kpi-card .v { font: 800 38px/1 var(--font-d); letter-spacing: -0.035em; color: var(--text); white-space: nowrap; }
.kpi-card .v small { font-size: .6em; }
.kpi-card .h { font-size: 13.5px; color: var(--text-2); }
.kpi-card .sl { width: 110px; height: 44px; flex: none; }
.kpi-card .sl svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 8px; font-weight: 700; font-size: 13.5px; }
.tag.green { background: var(--green-soft); color: var(--green-ink); }
.tag.violet { background: var(--violet-soft); color: var(--violet-ink); }
.tag.blue { background: var(--accent-soft); color: var(--accent); }

/* сегментированный переключатель */
.seg { display: inline-flex; gap: 6px; }
.seg button { height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; transition: background .15s; }
.seg button:hover { background: var(--track); }
.seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 14px -8px rgba(21, 94, 239, .8); }

/* график динамики */
.chart { position: relative; height: 270px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart .ytick { font-size: 12px; fill: var(--text-3); }
.chart .xtick { font-size: 12.5px; fill: var(--text-2); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s ease-out forwards; }
.chart .areaf { opacity: 0; animation: fadein .9s .25s ease-out forwards; }
.chart .pt { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.chart .hl { fill: #fff; stroke: var(--accent); stroke-width: 3; }
.chart .cross { stroke: var(--text-3); stroke-dasharray: 3 4; }
.chart .hit { fill: transparent; cursor: crosshair; }
.ctip {
  position: absolute; pointer-events: none; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 13px;
  font-size: 13px; line-height: 1.45; box-shadow: var(--shadow-lg); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 5;
}
.ctip b { font: 700 15px/1.3 var(--font-d); }
.ctip .t { color: rgba(255,255,255,.7); font-size: 12px; }

/* воронка */
.funnel { display: grid; gap: 6px; margin-top: 6px; }
.fstep { display: grid; grid-template-columns: 1fr 64px; gap: 14px; align-items: center; }
.fbar-wrap { display: flex; justify-content: center; }
.fbar {
  height: 50px; border-radius: 12px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 26px; font-weight: 600; font-size: 15px; min-width: 0; transform-origin: center; animation: grow .7s ease-out both;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 14px 100%);
}
.fbar b { font: 800 22px/1 var(--font-d); }
.fbar.s1 { background: linear-gradient(90deg, #1150d4, var(--accent)); }
.fbar.s2 { background: linear-gradient(90deg, #4f83ec, #79a2f2); animation-delay: .08s; }
.fbar.s3 { background: linear-gradient(90deg, #1fae54, #3fd075); animation-delay: .16s; }
.fpct { justify-self: start; padding: 6px 10px; border-radius: 10px; background: var(--track); font-weight: 600; font-size: 14px; color: #344054; }
.fpct.green { background: var(--green-soft); color: var(--green-ink); }
.farrow { display: flex; justify-content: center; color: var(--text-3); padding-right: 78px; }
.farrow svg { width: 14px; height: 14px; }
.fsub { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.fsub span { display: inline-flex; align-items: center; gap: 8px; }
.fsub i { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.fsub i.o { background: var(--orange); }
.fsub b { color: var(--text); font-weight: 600; }

/* таблица ДЦ */
.dtable-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
.dtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; min-width: 1040px; }
.dtable th {
  text-align: left; font-weight: 500; color: #475467; font-size: 13.5px; padding: 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; user-select: none;
}
.dtable th[data-k] { cursor: pointer; }
.dtable th[data-k]:hover { color: var(--text); }
.dtable th.r, .dtable td.r { text-align: right; }
.dtable th.on { color: var(--accent); }
.dtable th.on::after { content: " ↓"; }
.dtable td { padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.dtable tbody tr { transition: background .12s; }
.dtable tbody tr:hover td { background: #f7f9fc; }
.dtable tr.best td { background: #effbf3; }
.dtable tr.best:hover td { background: #e5f7ec; }
.dtable tr.best td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.dtable td:first-child, .dtable th:first-child { padding-left: 14px; }
.dname { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.dname svg { width: 17px; height: 17px; color: var(--text-2); flex: none; }
.crown { display: inline-grid; place-items: center; width: 30px; height: 26px; border-radius: 8px; background: #d7f3e1; margin-left: 4px; }
.crown svg { width: 17px; height: 17px; color: var(--green-ink); }
.pb { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.pb .n { width: 34px; text-align: right; font-weight: 600; flex: none; }
.pb .n.z { color: var(--text-3); font-weight: 400; }
.pb .tr { flex: 1; height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; min-width: 70px; }
.pb .tr i { display: block; height: 100%; border-radius: 99px; transform-origin: left; animation: growx .8s ease-out both; }
.pb .tr i.a { background: var(--c-apps); }
.pb .tr i.p { background: var(--c-appr); }
.pb .tr i.s { background: var(--c-iss); }
.conv { display: inline-block; min-width: 64px; text-align: center; padding: 4px 10px; border-radius: 9px; font-weight: 700; font-size: 13.5px; background: var(--violet-soft); color: var(--violet-ink); }
.conv.z { background: var(--track); color: var(--text-3); font-weight: 500; }
.dtable tfoot td { border-bottom: none; border-top: 2px solid var(--border); font-weight: 700; background: #fafbfd; padding-top: 14px; padding-bottom: 14px; }
.dtable tfoot td:first-child { border-bottom-left-radius: 12px; }
.dtable tfoot td:last-child { border-bottom-right-radius: 12px; }
.dtable .sum { font-weight: 700; }
.dtable .city, .dtable .date { color: var(--text-2); }
.empty { padding: 34px 10px; text-align: center; color: var(--text-2); }
.empty b { display: block; font: 700 16px/1.3 var(--font-d); color: var(--text); margin-bottom: 4px; }

/* горизонтальные бары (страница ЗН) */
.hbars { display: grid; gap: 2px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 40%) 1fr auto; gap: 12px; align-items: center; font-size: 13.5px; padding: 5px 8px; border-radius: 9px; transition: background .12s; }
.hbar:hover { background: #f7f9fc; }
.hbar .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-weight: 500; }
.hbar .t { height: 9px; border-radius: 99px; background: var(--track); overflow: hidden; }
.hbar .f { height: 100%; background: var(--accent); border-radius: 99px; min-width: 3px; transform-origin: left; animation: growx .8s ease-out both; }
.hbar .f.zero { background: transparent; }
.hbar .val { color: var(--text-2); white-space: nowrap; min-width: 64px; text-align: right; font-weight: 600; }
.hbars.green .hbar .f { background: var(--green); }

/* обычная таблица (sortTable из common.js, страница ЗН) */
.tablewrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
.tablewrap table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; min-width: 760px; }
.tablewrap th, .tablewrap td { padding: 11px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
.tablewrap th:first-child, .tablewrap td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.tablewrap th { color: #475467; font-weight: 500; font-size: 13.5px; cursor: pointer; user-select: none; }
.tablewrap th.sorted { color: var(--accent); }
.tablewrap th.sorted::after { content: " ↓"; }
.tablewrap th.sorted.asc::after { content: " ↑"; }
.tablewrap td.l, .tablewrap th.l { text-align: left; }
.tablewrap td:first-child { font-weight: 600; }
.tablewrap tbody tr:hover td { background: #f7f9fc; }
.tablewrap tfoot td { font-weight: 700; border-bottom: none; border-top: 2px solid var(--border); background: #fafbfd; }

/* методология */
details.how { padding: 0; }
details.how summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px 24px;
  font: 700 17px/1.2 var(--font-d); color: var(--navy);
}
details.how summary::-webkit-details-marker { display: none; }
details.how summary .chev { margin-left: auto; width: 18px; height: 18px; color: var(--text-2); transition: transform .2s; }
details.how[open] summary .chev { transform: rotate(180deg); }
details.how summary .hint { font: 400 13.5px/1.3 var(--font); color: var(--text-2); }
details.how .body { padding: 0 24px 20px 70px; color: #344054; font-size: 14px; }
details.how ul { margin: 0; padding-left: 18px; }
details.how li { margin: 6px 0; line-height: 1.5; }

footer.foot { color: var(--text-3); font-size: 12.5px; margin-top: 22px; }

/* подсказка (bindTip из common.js) */
#tip {
  position: fixed; pointer-events: none; z-index: 50; background: var(--navy); color: #fff;
  font-size: 13px; padding: 9px 12px; border-radius: 10px; max-width: 280px; display: none; line-height: 1.45; box-shadow: var(--shadow-lg);
}

/* ---------- загрузка и появление ---------- */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes grow { from { opacity: 0; transform: scaleX(.6); } to { opacity: 1; transform: none; } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.is-loading [data-sk] { overflow: hidden; }
.is-loading [data-sk] > * { visibility: hidden; }
.is-loading [data-sk]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 3;
  background: linear-gradient(90deg, #eef2f7 0px, #f7f9fc 160px, #eef2f7 320px); background-size: 800px 100%;
  animation: shimmer 1.3s linear infinite;
}
.is-loading .hero-navy[data-sk]::after { background: linear-gradient(90deg, #0b2245 0px, #133266 160px, #0b2245 320px); background-size: 800px 100%; }
.reveal { animation: rise .5s ease-out both; }
.row > .reveal:nth-child(2) { animation-delay: .06s; }
.row > .reveal:nth-child(3) { animation-delay: .12s; }
.row > .reveal:nth-child(4) { animation-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ---------- адаптивность (desktop-first) ---------- */
@media (min-width: 1800px) {
  .main { max-width: none; padding: 28px 44px 56px; }
  .hero-navy .num { font-size: 96px; }
}
@media (max-width: 1360px) {
  .row.kpi4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-navy .num { font-size: 72px; }
  .hero-light .num { font-size: 52px; }
}
@media (max-width: 1180px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 12px 20px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
  .logo { padding: 0 10px 0 0; }
  .logo b { font-size: 24px; }
  .nav { display: flex; gap: 4px; }
  .nav a { padding: 8px 12px; white-space: nowrap; }
  .nav .sep, .side-art { display: none; }
  .main { padding: 20px 20px 40px; }
  .row.split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .row.hero, .row.two { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .main { padding: 16px 16px 32px; }
  .row { gap: 14px; margin-bottom: 14px; }
  .row.kpi4, .row.two { grid-template-columns: 1fr; }
  .titlewrap h1 { font-size: 26px; }
  .fresh { border-left: 0; padding-left: 0; }
  .card { padding: 18px 16px; }
  .hero-navy, .hero-light { padding: 22px 20px; min-height: 0; }
  .hero-navy .num { font-size: 60px; }
  .hero-navy .car { width: 80%; opacity: .4; }
  .hero-light .num { font-size: 42px; }
  .dtable-wrap, .tablewrap { margin: 0 -16px; padding: 0 16px; }
  .pill-date { display: none; }
  details.how .body { padding: 0 16px 18px 16px; }
  .fstep { grid-template-columns: 1fr 56px; }
  .farrow { padding-right: 70px; }
  .fbar { padding: 0 20px; }
}
.is-loading .kpi-card { min-height: 150px; }
.is-loading .row.split > .card { min-height: 380px; }
.is-loading #dealers { min-height: 460px; }
.kpi-card .kb { align-items: center; }
.chart .line.tail { stroke-dasharray: 5 6; opacity: .7; animation: fadein .6s 1s both; }
.chart .pt.open { fill: #fff; stroke: var(--accent); stroke-width: 2.5; }
.hero-light .foot { max-width: 62%; }
.hero-light .area { width: 46%; height: 70%; opacity: .95; }
@media (max-width: 720px) { .hero-light .foot { max-width: none; } .hero-light .area { opacity: .35; } }
.hero-navy { justify-content: center; gap: 14px; }
.hero-navy .big { margin-top: 0; }
/* фото машины в блоке «Выдано рассрочек» */
.hero-navy { background: var(--navy); }
.hero-navy .car {
  position: absolute; inset: 0; width: auto; top: 0; bottom: 0; right: 0; z-index: 1;
  background: url(/img/hero-car.jpg) right 62% / auto 150% no-repeat;
}
.hero-navy .car::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #071b38 0%, rgba(7, 27, 56, .94) 34%, rgba(7, 27, 56, .45) 58%, rgba(7, 27, 56, 0) 78%);
}
@media (max-width: 720px) { .hero-navy .car { opacity: .55; background-size: auto 130%; } }
.hero-navy .delta-cap { max-width: 210px; line-height: 1.35; }
.hero-navy .car { background-position: right -10px top 62%; background-size: auto 140%; }

/* ===== дизайн-ревью 01.12: ближе к концепту ===== */
.main { padding: 18px 28px 40px; }
.row { gap: 18px; margin-bottom: 18px; }
/* шапка — одной строкой */
.topbar { flex-wrap: nowrap; margin-bottom: 16px; }
.titlewrap { flex-wrap: nowrap; flex: 1 1 auto; min-width: 0; }
.titlewrap h1 { font-size: 30px; white-space: nowrap; }
.fresh { overflow: hidden; text-overflow: ellipsis; }
.controls { flex-wrap: nowrap; flex: none; gap: 8px; }
.dd > button, .pill-date { height: 40px; padding: 0 12px 0 14px; }
@media (max-width: 1280px) { .topbar { flex-wrap: wrap; } .titlewrap { flex-wrap: wrap; } }
/* главные блоки — ниже */
.hero-navy, .hero-light { min-height: 166px; padding: 22px 28px; }
.hero-navy { gap: 10px; }
.hero-navy .eyebrow { font-size: 14px; }
.hero-navy .num { font-size: 72px; }
.hero-navy .delta-cap { max-width: none; }
.hero-light { justify-content: center; }
.hero-light h3 { font-size: 20px; }
.hero-light .num { font-size: 52px; margin-top: 10px; }
.hero-light .foot { margin-top: 14px; max-width: none; }
.hero-light .area { width: 55%; height: 85%; }
.delta .dc { font-weight: 500; margin-left: 4px; color: inherit; opacity: .85; }
.hero-light .delta { padding: 7px 14px; }
/* карточки KPI — компактнее, число и бейдж в одну строку */
.kpi-card { padding: 16px 20px; gap: 8px; }
.kpi-card .kh { font-size: 15px; }
.ico { width: 30px; height: 30px; border-radius: 9px; }
.ico svg { width: 17px; height: 17px; }
.kpi-card .kv { flex-wrap: nowrap; }
.kpi-card .v { font-size: 34px; }
.kpi-card .sl { width: 96px; height: 40px; }
.kpi-card .h { margin-top: -2px; }
/* динамика и воронка — ниже */
.card { padding: 20px 22px; }
.card-head { margin-bottom: 12px; }
.chart { height: 230px; }
.fbar { height: 44px; }
.fbar b { font-size: 20px; }
.fsub { margin-top: 14px; padding-top: 12px; gap: 6px 18px; font-size: 13.5px; }
/* таблица ДЦ — 6 столбцов как в концепте */
.dtable { min-width: 900px; }
.dtable td { padding: 9px 12px; }
.dname { align-items: flex-start; }
.dname svg { margin-top: 2px; }
.dname .sub { font-size: 12px; font-weight: 400; color: var(--text-3); margin-top: 1px; }
.dtable td.sum { font-weight: 700; white-space: nowrap; }
.dtable th.cr, .dtable td.cr { width: 52px; text-align: right; padding-right: 14px; }
.dtable tr.best td:first-child { box-shadow: none; }
.dtable tr.best td { background: #edf9f1; }
.dtable tr.best td:first-child { border-radius: 12px 0 0 12px; }
.dtable tr.best td:last-child { border-radius: 0 12px 12px 0; }
/* боковая панель: свободнее, без разделителя, горы внизу */
.nav { gap: 8px; }
.nav a { padding: 12px 14px; }
.side { background: #fff; }
.side-art {
  margin-top: auto; margin-left: -16px; margin-right: -16px; margin-bottom: -20px; height: 270px;
  background: url(/img/mountains.jpg) left bottom / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
}
@media (max-height: 760px) { .side-art { height: 170px; } }
.fsub { gap: 6px 14px; font-size: 13px; }
.fsub span { gap: 6px; }
