/* Дашборд аккредитации — визуальный язык startupsummit.ru */

@font-face {
  font-family: 'SB Sans Display';
  src: url('/assets/fonts/sbsansdisplay-medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'SB Sans Display';
  src: url('/assets/fonts/sbsansdisplay-semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'SB Sans Display';
  src: url('/assets/fonts/sbsansdisplay-bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'SB Sans Text';
  src: url('/assets/fonts/sbsanstext-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'SB Sans Text';
  src: url('/assets/fonts/sbsanstext-medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'SB Sans Text';
  src: url('/assets/fonts/sbsanstext-semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --bg: #000014;
  --bg-soft: #080A1C;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hi: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --muted-dim: rgba(255, 255, 255, 0.48);

  --green: #21a038;
  --green-lt: #44c77f;
  --mint: #7ff0b4;
  --cyan: #5ee7f0;
  --blue: #2b6bff;
  --violet: #8a6bff;
  --coral: #ff7a3d;
  --pink: #e4569f;
  --yellow: #dde231;

  --r-lg: 32px;
  --r-md: 24px;
  --r-sm: 16px;
  --pill: 200px;

  --display: 'SB Sans Display', 'SB Sans Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --body: 'SB Sans Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --gap: 20px;
  --maxw: 1480px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Фоновые свечения — как на лендинге саммита */
body::before,
body::after {
  content: '';
  position: fixed;
  z-index: 0;
  pointer-events: none;
  filter: blur(80px);
}
body::before {
  width: 900px; height: 900px;
  top: -380px; left: -220px;
  background: radial-gradient(circle at 50% 50%, rgba(33, 160, 56, 0.30), rgba(94, 231, 240, 0.14) 45%, transparent 68%);
}
body::after {
  width: 1000px; height: 1000px;
  top: 220px; right: -400px;
  background: radial-gradient(circle at 50% 50%, rgba(43, 107, 255, 0.28), rgba(138, 107, 255, 0.12) 48%, transparent 70%);
}

.shell {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 40px) 80px;
}

/* ------------------------------------------------------------------ шапка */

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 12px 10px 22px;
  margin-bottom: 26px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(10, 10, 26, 0.72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.topbar__brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.topbar__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-lt);
  box-shadow: 0 0 0 4px rgba(68, 199, 127, 0.18);
  flex: none;
}
.topbar__spacer { flex: 1 1 auto; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.chip strong { color: var(--text); font-weight: 500; }
.topbar .chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.chip--live { color: var(--mint); border-color: rgba(127, 240, 180, 0.25); background: rgba(33, 160, 56, 0.12); }
.chip--alert { color: #ffb59a; border-color: rgba(255, 122, 61, 0.30); background: rgba(255, 122, 61, 0.14); }

/* выбор момента, на который показаны данные */
.chip--pick { padding-right: 10px; cursor: pointer; gap: 4px; }
.chip--pick select {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
  padding: 0;
  max-width: 230px;
}
.chip--pick select option { background: #10101c; color: #fff; }
.chip__caret { font-size: 10px; opacity: .7; }
.chip--history {
  color: #ffd9a8;
  border-color: rgba(255, 195, 138, 0.35);
  background: rgba(255, 195, 138, 0.14);
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-family: var(--body);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--pill);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--surface-hi); border-color: rgba(255,255,255,0.22); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--green-lt), var(--green));
  border-color: transparent;
  color: #00140a;
  font-weight: 600;
}
.btn--primary:hover { filter: brightness(1.07); background: linear-gradient(135deg, var(--green-lt), var(--green)); }

/* -------------------------------------------------------------------- герой */

.hero { margin: 8px 0 30px; }
.hero__kicker {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 14px;
}
.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--mint), var(--cyan) 45%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px; }

/* --------------------------------------------------------------- KPI-карты */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--gap);
  margin-bottom: 26px;
}

.kpi {
  position: relative;
  overflow: hidden;
  --card-radius: var(--r-lg);
  border-radius: var(--card-radius);
  /* Safari не обрезает по border-radius потомков с filter: размытый «шар»
     вылезал за правый верхний угол. clip-path режет надёжно. */
  clip-path: inset(0 round var(--card-radius));
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 24px 22px;
  min-height: 186px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  isolation: isolate;
}
.kpi__orb {
  position: absolute;
  z-index: -1;
  width: 260px; height: 260px;
  top: -110px; right: -70px;
  border-radius: 50%;
  filter: blur(44px);
  opacity: 0.85;
}
.kpi--total   .kpi__orb { background: radial-gradient(circle, var(--green-lt), rgba(33,160,56,.25) 55%, transparent 72%); }
.kpi--guests  .kpi__orb { background: radial-gradient(circle, var(--cyan), rgba(43,107,255,.28) 55%, transparent 72%); }
.kpi--speakers .kpi__orb { background: radial-gradient(circle, var(--violet), rgba(138,107,255,.25) 55%, transparent 72%); }
.kpi--service .kpi__orb { background: radial-gradient(circle, var(--coral), rgba(255,122,61,.22) 55%, transparent 72%); }
.kpi--media   .kpi__orb { background: radial-gradient(circle, var(--pink), rgba(228,86,159,.22) 55%, transparent 72%); }

.kpi__value {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-feature-settings: 'tnum' 1;
}
.kpi__label { color: var(--muted); font-size: 14px; margin-top: 12px; }
.kpi__sub { color: var(--muted-dim); font-size: 12.5px; margin-top: 6px; }

.delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--pill);
  width: fit-content;
}
/* Слот постоянной высоты: цифры во всех карточках стоят на одной линии,
   независимо от того, есть ли у карточки значок изменения. */
.kpi__delta-slot {
  min-height: 24px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
}
.delta--up { color: #9ff5c0; background: rgba(33, 160, 56, 0.18); }
.delta--down { color: #ffb59a; background: rgba(255, 122, 61, 0.16); }
.delta--flat { color: var(--muted-dim); background: rgba(255,255,255,0.06); }

/* ------------------------------------------------------------------ панели */

.grid { display: grid; gap: var(--gap); margin-bottom: var(--gap); }
.grid--2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

section.panel { margin-bottom: var(--gap); }

.panel {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 26px 24px;
  min-width: 0;
}
.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.panel__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.02em;
  margin: 0;
}
.panel__hint { color: var(--muted-dim); font-size: 13px; }

/* -------------------------------------------------------- список со шкалами */

.bars { display: flex; flex-direction: column; gap: 2px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border-radius: 14px;
  position: relative;
  isolation: isolate;
  transition: background .15s ease;
}
.bar-row:hover { background: rgba(255,255,255,0.04); }
.bar-row__fill {
  position: absolute;
  z-index: -1;
  left: 0; top: 0; bottom: 0;
  border-radius: 14px;
  opacity: 0.28;
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}
.bar-row__name {
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.bar-row__name > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-row__key {
  font-size: 12px;
  color: var(--muted-dim);
  font-feature-settings: 'tnum' 1;
  flex: none;
  min-width: 34px;
}
.bar-row__nums { display: flex; align-items: baseline; gap: 12px; flex: none; }
.bar-row__value {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -0.01em;
}
.bar-row__share { font-size: 12.5px; color: var(--muted-dim); min-width: 44px; text-align: right; font-feature-settings: 'tnum' 1; }
.bar-row__delta { font-size: 12px; min-width: 40px; text-align: right; font-feature-settings: 'tnum' 1; }
.bar-row__delta.up { color: var(--mint); }
.bar-row__delta.down { color: var(--coral); }
.bar-row__delta.flat { color: var(--muted-dim); }

.dot {
  width: 9px; height: 9px; border-radius: 3px; flex: none;
}

/* ------------------------------------------------------------------ бублик */

.donut-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut { position: relative; flex: none; }
.donut svg { display: block; transform: rotate(-90deg); }
.donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.donut__value {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.03em;
  font-feature-settings: 'tnum' 1;
}
.donut__label { font-size: 12px; color: var(--muted-dim); margin-top: 2px; }
.legend { display: flex; flex-direction: column; gap: 10px; flex: 1 1 200px; min-width: 0; }
.legend__row { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.legend__name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.legend__value { font-family: var(--display); font-weight: 600; font-feature-settings: 'tnum' 1; }
.legend__share { color: var(--muted-dim); font-size: 12.5px; min-width: 44px; text-align: right; font-feature-settings: 'tnum' 1; }

/* ---------------------------------------------------------------- дни визита */

.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.day-card {
  border-radius: var(--r-md);
  clip-path: inset(0 round var(--r-md));
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.03);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.day-card__label { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.day-card__value {
  font-family: var(--display); font-weight: 700;
  font-size: 34px; line-height: 1; letter-spacing: -0.03em;
  font-feature-settings: 'tnum' 1;
}
.day-card__note { font-size: 12.5px; color: var(--muted-dim); margin-top: 8px; }
.day-card__bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.08); margin-top: 14px; overflow: hidden; }
.day-card__bar i { display: block; height: 100%; border-radius: 99px; }

/* ------------------------------------------------------------------ таблица */

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.input {
  flex: 1 1 220px;
  min-width: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  padding: 10px 18px;
  color: var(--text);
  font-family: var(--body);
  font-size: 14px;
  outline: none;
  transition: border-color .18s ease, background .18s ease;
}
.input::placeholder { color: var(--muted-dim); }
.input:focus { border-color: rgba(127, 240, 180, 0.45); background: rgba(255,255,255,0.07); }

.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: var(--pill); border: 1px solid var(--line); background: rgba(255,255,255,0.03); }
.seg button {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font-family: var(--body); font-size: 13px; padding: 7px 15px; border-radius: var(--pill); cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed='true'] { background: rgba(255,255,255,0.10); color: var(--text); }

.tbl-scroll { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.tbl th {
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-dim);
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
table.tbl th.num, table.tbl td.num { text-align: right; }
table.tbl td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
table.tbl tbody tr:hover { background: rgba(255,255,255,0.03); }
table.tbl td.code { color: var(--muted-dim); font-feature-settings: 'tnum' 1; white-space: nowrap; width: 62px; }
table.tbl td.val { font-family: var(--display); font-weight: 600; font-feature-settings: 'tnum' 1; white-space: nowrap; }
.mini-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; min-width: 60px; }
.mini-bar i { display: block; height: 100%; border-radius: 99px; }
.cut { color: var(--muted-dim); font-size: 11px; margin-left: 6px; }
.share-note {
  color: var(--muted-dim);
  font-size: 12px;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----------------------------------------------------- факт против плана */

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}
.fact__line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.fact__plan { font-size: 12.5px; color: var(--muted-dim); }
.fact__pct {
  font-family: var(--display); font-weight: 600; font-size: 13px;
  font-feature-settings: 'tnum' 1; color: var(--muted);
}

.big-number {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(42px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-feature-settings: 'tnum' 1;
  margin-bottom: 10px;
}
.big-sub { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------- лимиты */

.limit { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.limit:last-child { border-bottom: 0; padding-bottom: 4px; }
.limit:first-child { padding-top: 0; }
.limit__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.limit__name { font-size: 15px; }
.limit__nums { display: flex; align-items: baseline; gap: 10px; }
.limit__value {
  font-family: var(--display); font-weight: 700; font-size: 24px;
  letter-spacing: -0.02em; font-feature-settings: 'tnum' 1;
}
.limit__of { color: var(--muted-dim); font-size: 13px; font-feature-settings: 'tnum' 1; }
.limit__pct {
  font-family: var(--display); font-weight: 600; font-size: 14px;
  font-feature-settings: 'tnum' 1; min-width: 46px; text-align: right;
}
.limit__track {
  height: 10px; border-radius: 99px; background: rgba(255,255,255,0.07);
  overflow: hidden; margin: 12px 0 8px;
}
.limit__fill { display: block; height: 100%; border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.limit__note { font-size: 12.5px; color: var(--muted-dim); }
/* Цвет шкалы задаётся в app.js: плавный переход зелёный → жёлтый → красный */
.limit__fill { background: linear-gradient(90deg, #44c77f, #7ff0b4); }
.limit__left { color: var(--muted); }
.limit--over .limit__left { color: #ff9ec4; }
.limit--over .limit__track { box-shadow: 0 0 0 1px rgba(255, 122, 61, 0.35); }

/* ------------------------------------------------------------- анимации */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1);
  will-change: opacity, transform;
}
.reveal--in { opacity: 1; transform: none; }

.limit__track { position: relative; }

/* Проблеск: световая полоса пробегает по заполненной части шкалы */
.limit__fill { position: relative; overflow: hidden; }
.limit__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 65%,
    transparent 100%);
  transform: translateX(-120%);
  animation: limit-sweep 4.2s cubic-bezier(.4, 0, .2, 1) infinite;
}
.limit:nth-child(2) .limit__fill::after { animation-delay: 1.1s; }
.limit--over .limit__fill::after { animation-duration: 2.2s; }

@keyframes limit-sweep {
  0%   { transform: translateX(-120%); }
  55%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

.day-card__bar i, .mini-bar i {
  transition: width .7s cubic-bezier(.2, .8, .2, 1);
}

.fact__miss { font-size: 12.5px; color: #ffb59a; }
.fact__miss-pct { font-size: 12.5px; color: var(--muted-dim); font-feature-settings: 'tnum' 1; }

/* ------------------------------------------------------------------ заметки */

.notes { display: grid; gap: 12px; }
.note {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.03);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}
.note b { color: var(--text); font-weight: 600; }
.note__icon { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 13px; }
.note--warn .note__icon { background: rgba(255, 122, 61, 0.18); color: #ffb59a; }
.note--info .note__icon { background: rgba(94, 231, 240, 0.16); color: var(--cyan); }

/* ------------------------------------------------------------------ динамика */

.spark { width: 100%; height: auto; aspect-ratio: 1000 / 260; display: block; }
.empty-state { color: var(--muted-dim); font-size: 14px; padding: 18px 0; }

/* -------------------------------------------------------------------- вход */

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(10, 10, 26, 0.74);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 34px 32px 30px;
}
.login-card__kicker { font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-dim); }
.login-card__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.03em;
  margin: 12px 0 6px;
}
.login-card__sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.field { position: relative; margin-bottom: 14px; }
.field .input { width: 100%; flex: none; padding: 13px 18px; }
.login-error {
  color: #ffb59a;
  background: rgba(255, 122, 61, 0.14);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 14px;
}
.login-card .btn { width: 100%; justify-content: center; padding: 13px 18px; font-size: 15px; }
.login-foot { margin-top: 18px; color: var(--muted-dim); font-size: 12.5px; text-align: center; }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
  border-radius: 8px;
}

[hidden] { display: none !important; }

.skeleton {
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  min-height: 186px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- адаптив */

@media (max-width: 1080px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  :root { --gap: 12px; }

  .shell { padding: 10px 12px 64px; }

  .topbar {
    top: 8px;
    padding: 8px 8px 8px 14px;
    gap: 8px;
    border-radius: 20px;
  }
  .topbar .chip--hide-sm { display: none; }
  .topbar__brand { font-size: 13.5px; }
  .topbar .chip { font-size: 11.5px; padding: 5px 10px; }
  .topbar .btn { font-size: 12px; padding: 6px 12px; }
  /* В один ряд: название убираем — оно и так стоит заголовком страницы,
     а выбор момента растягивается на всё свободное место */
  .topbar__spacer, .topbar__brand, .topbar__dot { display: none; }
  .topbar { padding: 7px 7px 7px 12px; gap: 6px; }
  /* дата и PDF стоят вместе у правого края */
  #chip-updated { flex: 0 1 auto; min-width: 0; margin-left: auto; }
  .chip--pick select { width: auto; max-width: 52vw; }
  .topbar .btn { padding: 6px 11px; }

  .hero { margin: 2px 0 18px; }
  .hero__kicker { font-size: 10.5px; letter-spacing: 0.1em; margin-bottom: 8px; }
  .hero__title { font-size: clamp(27px, 8.5vw, 38px); margin-bottom: 12px; max-width: none; }
  .hero__meta .chip { font-size: 12px; padding: 5px 11px; }

  /* Главная цифра — во всю ширину, остальные показатели по два в ряд */
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
  .kpi--total { grid-column: 1 / -1; }
  .kpi-grid > .note, .kpi-grid > .skeleton:only-child { grid-column: 1 / -1; }
  .kpi {
    min-height: 0;
    padding: 14px 14px 15px;
    --card-radius: 20px;
  }
  .kpi__orb { width: 150px; height: 150px; top: -64px; right: -40px; opacity: 0.55; }
  .kpi__value { font-size: clamp(26px, 7.6vw, 34px); }
  .kpi--total .kpi__value { font-size: clamp(36px, 11vw, 48px); }
  .kpi__label { font-size: 12.5px; margin-top: 8px; }
  .kpi__sub {
    font-size: 11px;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .kpi__delta-slot { min-height: 0; margin-bottom: 9px; }
  .delta { font-size: 11px; padding: 3px 8px; gap: 4px; }

  .panel { padding: 16px 14px; border-radius: 22px; }
  .panel__head { margin-bottom: 14px; gap: 6px; }
  .panel__title { font-size: 17px; }
  .panel__hint { font-size: 11.5px; }

  .days { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* Одинокая карточка в последнем ряду занимает всю ширину, а не половину */
  .days > article:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .day-card { padding: 13px 13px 14px; border-radius: 18px; clip-path: inset(0 round 18px); }
  .day-card__label { font-size: 11.5px; margin-bottom: 7px; }
  .day-card__value { font-size: 26px; }
  .day-card__note { font-size: 11px; margin-top: 6px; }
  .day-card__bar { margin-top: 10px; height: 5px; }
  .fact__plan, .fact__pct { font-size: 11px; }

  .big-number { font-size: 40px; }
  .limit__value { font-size: 20px; }
  .limit { padding: 13px 0; }
  .big-sub { font-size: 12.5px; }

  .donut-wrap { gap: 18px; }
  .legend__row { font-size: 13px; }

  .bar-row { padding: 9px 8px; gap: 10px; border-radius: 12px; }
  .bar-row__name { font-size: 13.5px; }
  .bar-row__value { font-size: 15px; }
  .bar-row__share { display: none; }

  .toolbar { gap: 8px; }
  .input { padding: 9px 14px; font-size: 13.5px; }
  .seg button { padding: 6px 12px; font-size: 12px; }

  /* В узкой таблице оставляем главное: название, число, изменение */
  table.tbl { font-size: 13.5px; }
  table.tbl th, table.tbl td { padding: 9px 8px; }
  table.tbl .col-share { display: none; }
  .cut { display: none; }

  .note { padding: 13px 14px; font-size: 13px; gap: 10px; }
  .empty-state { font-size: 13px; }
}

@media (max-width: 380px) {
  .kpi__label { font-size: 11.5px; }
  .kpi__sub { display: none; }
  .day-card__value { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .limit__fill::after { display: none; }
}

/* ---------------------------------------------------------------- печать */
/*
 * PDF выглядит так же, как страница: тёмный фон, те же карточки и цвета.
 * print-color-adjust: exact заставляет браузер печатать фоны даже тогда,
 * когда в диалоге печати выключены «фоновые изображения» — без этого
 * белый текст оказался бы на белом листе.
 */
@media print {
  @page { size: A4 landscape; margin: 0; }

  html, body {
    background: var(--bg) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body::before, body::after { display: none !important; }

  .shell {
    max-width: none;
    padding: 12mm 10mm;
    background: var(--bg);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* всё, что появляется по мере прокрутки, на печати должно быть видно */
  .reveal, .reveal--in { opacity: 1 !important; transform: none !important; }
  * { animation: none !important; transition: none !important; }

  /* фоны, заливки шкал и бублик — печатать как есть */
  .panel, .kpi, .day-card, .note, .limit__track, .limit__fill, .day-card__bar,
  .day-card__bar i, .mini-bar, .mini-bar i, .bar-row__fill, .chip, .donut svg, .topbar {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* интерактив на бумаге не нужен */
  #btn-pdf, .topbar .btn, .toolbar, .seg { display: none !important; }
  .topbar {
    position: static;
    page-break-after: avoid;
  }
  .topbar .chip--hide-sm { display: inline-flex !important; }

  /* компактнее, чтобы не расползалось на семь страниц */
  .hero { margin: 10px 0 14px; }
  .hero__title { font-size: 34px; margin-bottom: 10px; }
  .hero__kicker { margin-bottom: 8px; }
  .kpi { min-height: 0; padding: 14px 16px; }
  .kpi__value { font-size: 30px; }
  .kpi-grid { gap: 10px; margin-bottom: 12px; }
  .panel { padding: 16px 18px; }
  section.panel { margin-bottom: 10px; }
  .grid { gap: 10px; margin-bottom: 10px; }
  .days { gap: 10px; }
  .day-card { padding: 14px; }
  .day-card__value { font-size: 26px; }
  .limit { padding: 12px 0; }

  /* блок не должен разрываться между страницами */
  .panel, .kpi, .day-card, .limit, .note { break-inside: avoid; page-break-inside: avoid; }
  .tbl-scroll { overflow: visible !important; }
  table.tbl { font-size: 12px; }
  table.tbl th, table.tbl td { padding: 7px 10px; }
  table.tbl tr { break-inside: avoid; page-break-inside: avoid; }
}
