/* Voicy · Обзор — прототип по макету Figma (Предложение 1) */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('fonts/inter-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('fonts/inter-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('fonts/inter-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('fonts/inter-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('fonts/inter-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --page: #F2F4F7; --subtle: #E8EBF0; --sidebar: #F8F9FB; --card: #FFFFFF; --inverse: #111318;
  --t1: #111318; --t2: #667085; --t3: #98A2B3; --inv: #FFFFFF;
  --border: #E4E7EC; --bs: #D0D5DD;
  --acc: #FF5A1F; --accS: #FFE8DD; --accM: #FFB89C;
  --ok: #16A34A; --okS: #E7F6EC; --bad: #E5484D; --badS: #FDECEC; --warn: #D97706; --warnS: #FEF3E2;
  --neu: #D3D8E0; --line: #111318; --shadow: rgba(17, 19, 24, .05);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--page); color: var(--t1); font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.ico { flex: none; display: block; }

/* Текстовые стили (10 штук, как в макете) */
.h1 { font: 700 32px/120% 'Inter'; letter-spacing: -.02em; }
.h2 { font: 700 24px/120% 'Inter'; letter-spacing: -.02em; }
.h3 { font: 600 18px/120% 'Inter'; letter-spacing: -.02em; }
.h4 { font: 600 14px/140% 'Inter'; }
.b1 { font: 400 16px/140% 'Inter'; }
.b2 { font: 400 14px/140% 'Inter'; }
.b3 { font: 400 12px/140% 'Inter'; }
.c1 { font: 500 14px/120% 'Inter'; }
.c2 { font: 500 12px/120% 'Inter'; }
.c3 { font: 500 10px/120% 'Inter'; }
.t2 { color: var(--t2); } .t3 { color: var(--t3); } .ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); } .muted { color: var(--t3); }
.row { display: flex; align-items: center; } .col { display: flex; flex-direction: column; } .fill { flex: 1 1 0; min-width: 0; }
.base { align-items: baseline; }
.dot { color: var(--t3); }

/* Каркас */
.app { display: flex; min-height: 100vh; background: var(--page); }
.rail { width: 64px; flex: none; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 16px 12px; position: sticky; top: 0; height: 100vh; }
.rail .group { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.rail-item { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--t2); transition: background .2s var(--ease), color .2s var(--ease); position: relative; }
.rail-item:hover { background: var(--subtle); color: var(--t1); }
.rail-item.on { background: var(--subtle); color: var(--acc); }
.avatar { width: 32px; height: 32px; border-radius: 100px; background: var(--accS); color: var(--acc); display: grid; place-items: center; }
.sidebar { width: 248px; flex: none; background: var(--sidebar); padding: 16px 12px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; }
.brand { height: 40px; justify-content: space-between; padding-left: 4px; }
.nav { display: flex; flex-direction: column; gap: 24px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; color: var(--t2); transition: background .2s var(--ease), color .2s var(--ease); width: 100%; text-align: left; }
.nav-item:hover { background: var(--subtle); color: var(--t1); }
.nav-item.on { background: var(--border); color: var(--t1); }
.nav-item .count { margin-left: auto; padding: 2px 6px; border-radius: 100px; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); }
.datacard { background: var(--card); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.main { flex: 1 1 0; min-width: 0; padding: 16px 36px 48px; display: flex; flex-direction: column; gap: 24px; }

/* Верхняя строка */
.topbar { height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar .left { display: flex; align-items: center; gap: 8px; }
.crumbs { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 100px; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); }
.field { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 100px; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); color: var(--t3); }
.field.search { width: 320px; }

/* Кнопки, табы, теги */
.btn { height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 100px; transition: opacity .15s, background .2s var(--ease), box-shadow .2s var(--ease); white-space: nowrap; }
.btn.primary { background: var(--inverse); color: var(--inv); }
.btn.secondary { background: var(--card); box-shadow: inset 0 0 0 1px var(--border); }
.btn.secondary:hover { box-shadow: inset 0 0 0 1px var(--bs); }
.btn.ghost { height: auto; padding: 0; }
.btn:active { opacity: .76; }
.btn-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 100px; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .2s var(--ease); }
.btn-icon:hover { box-shadow: inset 0 0 0 1px var(--bs); }
.btn-icon.ghost { background: none; box-shadow: none; width: 32px; height: 32px; color: var(--t2); }
.link { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.link .ico { transition: transform .25s var(--ease); }
.link:hover .ico { transform: translateX(3px); }
.seg { position: relative; display: inline-flex; gap: 2px; padding: 4px; height: 38px; border-radius: 100px; background: var(--subtle); isolation: isolate; }
.seg .pill { position: absolute; top: 4px; height: 30px; border-radius: 100px; background: var(--card); z-index: -1; transition: transform .35s var(--ease), width .35s var(--ease); }
.seg button { height: 30px; padding: 0 12px; border-radius: 100px; color: var(--t2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: color .25s var(--ease); }
.seg button.on { color: var(--t1); }
.seg.fill-seg { display: flex; } .seg.fill-seg button { flex: 1; justify-content: center; }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 100px; white-space: nowrap; }
.tag.danger { background: var(--badS); color: var(--bad); } .tag.warning { background: var(--warnS); color: var(--warn); } .tag.neutral { background: var(--subtle); color: var(--t2); }
.delta { display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px; border-radius: 100px; white-space: nowrap; }
.delta.good { background: var(--okS); color: var(--ok); } .delta.bad { background: var(--badS); color: var(--bad); } .delta.neutral { background: var(--subtle); color: var(--t2); }

/* Карточки и секции */
.title-block { display: flex; flex-direction: column; gap: 8px; }
.controls { display: flex; align-items: center; gap: 8px; }
.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: center; }
.section-head .left { display: flex; gap: 8px; align-items: baseline; }
.grid { display: flex; gap: 16px; }
.card { background: var(--card); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-head { display: flex; flex-direction: column; gap: 4px; }
.card-head .title-row { display: flex; align-items: center; gap: 16px; }
.card-head .title { display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0; }
.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--border); flex: none; }
.list { display: flex; flex-direction: column; gap: 12px; }
.info { color: var(--t3); position: relative; display: inline-grid; cursor: help; }

/* KPI */
.kpis { display: flex; gap: 16px; }
.kpi { flex: 1 1 0; min-width: 0; background: var(--card); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 16px; cursor: pointer; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.kpi:hover { box-shadow: 0 8px 24px var(--shadow); }
.kpi .head { height: 18px; display: flex; align-items: center; justify-content: space-between; }
.kpi .arrow { opacity: 0; transform: translate(-4px, 4px); transition: opacity .2s var(--ease), transform .25s var(--ease); }
.kpi:hover .arrow { opacity: 1; transform: none; }
.kpi .body { display: flex; align-items: flex-end; gap: 12px; }
.kpi .figure { display: flex; flex-direction: column; gap: 4px; flex: 1 1 0; min-width: 0; align-items: flex-start; }
.kpi:hover .figure .delta { opacity: 0; }
.kpi .figure .delta { transition: opacity .2s var(--ease); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 24px; }
.spark i { width: 4px; border-radius: 100px; background: var(--neu); transform-origin: bottom; }
.spark i:last-child { background: var(--acc); }

/* Графики */
.chart { display: flex; gap: 8px; height: 232px; }
.yaxis { width: 24px; height: 220px; display: flex; flex-direction: column; justify-content: space-between; flex: none; }
.yaxis.r { text-align: left; } .yaxis.l { text-align: right; }
.plot { position: relative; flex: 1 1 0; min-width: 0; }
.plot svg { position: absolute; inset: 0; overflow: visible; }
.xlabels { position: absolute; left: 0; right: 0; bottom: 0; display: flex; }
.xlabels span { flex: 1; text-align: center; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.legend .it { display: flex; align-items: baseline; gap: 6px; transition: opacity .2s; }
.legend .it.off { opacity: .4; }
.legend button.it { cursor: pointer; }
.mark { width: 8px; height: 8px; border-radius: 100px; flex: none; align-self: center; }
.mark.line { width: 12px; height: 2px; }
.tooltip { position: absolute; z-index: 30; background: var(--card); border-radius: 12px; padding: 12px; box-shadow: inset 0 0 0 1px var(--border), 0 4px 16px rgba(17, 19, 24, .08); pointer-events: none; display: flex; flex-direction: column; gap: 8px; width: 176px; opacity: 0; transform: scale(.96); transform-origin: top left; transition: opacity .12s ease-out, transform .16s var(--ease), left .2s var(--ease), top .2s var(--ease); }
.tooltip.show { opacity: 1; transform: none; }
.tooltip .r { display: flex; align-items: center; gap: 8px; } .tooltip .r .fill { flex: 1; }
.tip-dark { position: fixed; z-index: 60; max-width: 260px; background: var(--inverse); color: var(--inv); border-radius: 8px; padding: 8px 12px; pointer-events: none; opacity: 0; transform: translateY(4px) scale(.97); transition: opacity .12s ease-out, transform .16s var(--ease); }
.tip-dark.show { opacity: 1; transform: none; }

/* Рейтинги, полоски */
.track { height: 6px; border-radius: 100px; background: var(--subtle); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 100px; background: var(--acc); transform-origin: left; }
.split { display: flex; gap: 2px; height: 8px; border-radius: 100px; overflow: hidden; }
.split i { display: block; height: 100%; transform-origin: left; }

/* Таблицы */
.table { display: flex; flex-direction: column; gap: 12px; }
.tr { display: flex; align-items: center; gap: 8px; }
.tr .c { flex: none; display: flex; flex-direction: column; gap: 2px; align-items: flex-end; text-align: right; }
.tr .c.name { flex: 1 1 0; min-width: 0; align-items: flex-start; text-align: left; }
.tr.head .c { color: var(--t3); }
.expander { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; }
.expander .ico { transition: transform .3s var(--ease); color: var(--t3); }
.expander[aria-expanded="true"] .ico { transform: rotate(90deg); color: var(--t1); }
.branches { overflow: hidden; height: 0; transition: height .35s var(--ease); }
.branches > div { background: var(--page); border-radius: 8px; padding: 12px 12px 12px 36px; display: flex; flex-direction: column; gap: 12px; margin: 12px -12px 0; }
.snaps { overflow: hidden; height: 0; transition: height .35s var(--ease); }
.snaps > div { display: flex; align-items: center; gap: 12px; background: var(--subtle); border-radius: 8px; padding: 12px; margin-top: 12px; }
.tab-body { transition: opacity .2s ease, transform .3s var(--ease); }
.tab-body.leaving { opacity: 0; transform: translateY(4px); }
.heat { display: flex; flex-direction: column; gap: 4px; }
.heat .hr { display: flex; gap: 4px; align-items: center; }
.heat .hr > span:first-child { width: 232px; flex: none; }
.heat .cell { flex: 1; height: 32px; border-radius: 4px; display: grid; place-items: center; transform-origin: bottom; }

/* Выпадашки: поверх страницы, без перехода */
.pop { position: fixed; z-index: 50; background: var(--card); border-radius: 16px; padding: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08), inset 0 0 0 1px var(--border); display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top left; transition: opacity .16s ease-out, transform .22s var(--ease); pointer-events: none; }
.pop.right { transform-origin: top right; }
.pop.show { opacity: 1; transform: none; pointer-events: auto; }
.pop .item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; width: 100%; text-align: left; transition: background .15s; }
.pop .item:hover { background: var(--page); }
.pop .item.sel { background: var(--subtle); }
.checkbox { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--bs); display: grid; place-items: center; flex: none; background: var(--card); transition: background .15s, box-shadow .15s; color: var(--inv); }
.checkbox.on { background: var(--acc); box-shadow: none; }
.checkbox .ico { opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s var(--ease); }
.checkbox.on .ico { opacity: 1; transform: none; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; background: var(--inverse); color: var(--inv); padding: 12px 16px; border-radius: 12px; transform: translate(-50%, 16px); opacity: 0; transition: opacity .2s, transform .3s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Появление (как в референсе: столбики вырастают по очереди) */
@media (prefers-reduced-motion: no-preference) {
  .grow { animation: grow .7s var(--ease) both; }
  .growx { animation: growx .8s var(--ease) both; }
  .rise { animation: rise .6s var(--ease) both; }
  @keyframes grow { from { transform: scaleY(0); } }
  @keyframes growx { from { transform: scaleX(0); } }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
  .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1s .35s var(--ease) forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* Экраны уже макета (1280–1439) */
:root { --tuw: 104px; }
.card-head .title .h4, .section-head .h4 { white-space: nowrap; }
.kpi .figure .row { white-space: nowrap; }
.brsearch { width: 240px; }
@media (max-width: 1439px) {
  :root { --tuw: 84px; }
  .main { padding-left: 24px; padding-right: 24px; }
  .field.search { width: 220px; }
  .brsearch { width: 170px; }
  .card { padding: 16px; }
  .kpis { gap: 12px; }
  .kpi .spark i { width: 3px; }
}

.card-head .title-row { flex-wrap: wrap; row-gap: 8px; }
.card-head .title { min-width: max-content; }
.kpi .head { position: relative; }
.kpi .head > span:first-child { white-space: nowrap; }
.kpi .arrow { position: absolute; right: 0; top: 1px; }
