.sv2 { display: flex; flex-direction: column; gap: 16px; }
.sv2-banner { border-radius: 10px; padding: 12px 16px; border: 1px solid; display: flex; flex-direction: column; gap: 8px; }
.sv2-banner.green { border-color: #16a34a; background: rgba(22,163,74,.10); }
.sv2-banner.yellow { border-color: #ca8a04; background: rgba(202,138,4,.10); }
.sv2-banner.red { border-color: #dc2626; background: rgba(220,38,38,.12); }
.sv2-banner-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; font-size: 13px; color: #e5e7eb; }
.sv2-banner-title { font-weight: 600; font-size: 14px; }
.sv2-progress { height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.sv2-progress > div { height: 100%; background: #60a5fa; transition: width .4s; }
.sv2-err { color: #fecaca; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.sv2-muted { color: #94a3b8; font-size: 12px; }
.sv2-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.sv2-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #94a3b8; }
.sv2-filters input, .sv2-filters select { height: 32px; padding: 0 8px; border-radius: 6px; border: 1px solid #374151; background: #111827; color: #e5e7eb; }
.sv2-table-wrap { overflow-x: auto; }
table.sv2-table { border-collapse: collapse; width: 100%; font-size: 12px; }
table.sv2-table th, table.sv2-table td { padding: 6px 8px; border-bottom: 1px solid #1f2937; text-align: right; white-space: nowrap; }
table.sv2-table th:first-child, table.sv2-table td:first-child { text-align: left; }

/* --- дашборд Statistics v2 --- */
.sv2-header { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.sv2-header h2 { margin: 0; }
.sv2-nav { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 6px 10px; font-size: 12px;
    background: rgba(17,24,39,.92); border: 1px solid #1f2937; border-radius: 10px; backdrop-filter: blur(4px); }
.sv2-nav a { color: #94a3b8; text-decoration: none; }
.sv2-nav a:hover { color: #f87171; }
.sv2-section { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 48px; }
.sv2-section > h3 { margin: 0; font-size: 15px; font-weight: 600; color: #ef4444; letter-spacing: .02em; }
.sv2-section > h3 .sv2-muted { font-weight: 400; margin-left: 6px; }
.sv2-seg { display: inline-flex; border: 1px solid #374151; border-radius: 6px; overflow: hidden; height: 32px; }
.sv2-seg button { background: #111827; color: #94a3b8; border: 0; padding: 0 12px; font-size: 12px; cursor: pointer; }
.sv2-seg button + button { border-left: 1px solid #374151; }
.sv2-seg button.active { background: #1f2937; color: #f3f4f6; box-shadow: inset 0 -2px 0 #ef4444; }
.sv2-toolbar { display: flex; justify-content: flex-end; }
.sv2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sv2-card { background: #111827; border: 1px solid #1f2937; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.sv2-card-title { color: #ef4444; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sv2-card-value { font-size: 28px; font-weight: 700; color: #f9fafb; font-variant-numeric: tabular-nums; }
.sv2-card-mom { font-size: 12px; }
.sv2-mom { color: #94a3b8; font-weight: 600; }
.sv2-mom.up { color: #22c55e; }
.sv2-mom.down { color: #ef4444; }
.sv2-card-sub { font-size: 12px; color: #cbd5e1; }
.sv2-card-foot { font-size: 12px; color: #94a3b8; border-top: 1px solid #1f2937; padding-top: 6px; display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: center; }
.sv2-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.sv2-dot.ios { background: #60a5fa; }
.sv2-dot.android { background: #f97316; margin-left: 8px; }
.sv2-legend .sv2-dot.android, .sv2-legend .sv2-dot.other { margin-left: 0; }
.sv2-dot.other { background: #64748b; }
.sv2-group-box { border: 1px solid #374151; border-radius: 10px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.sv2-group-title { font-size: 12px; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.sv2-legend { display: flex; gap: 14px; font-size: 12px; color: #94a3b8; }
.sv2-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sv2-charts-mini { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sv2-chart-card { background: #111827; border: 1px solid #1f2937; border-radius: 10px; padding: 10px 12px; min-width: 0; }
.sv2-chart-card svg { display: block; max-width: 100%; height: auto; }
.sv2-mini-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.sv2-empty { padding: 6px 0; }
/* таблица: строки — месяцы/дни, колонки — метрики; группы колонок обведены рамкой */
table.sv2-grid { background: #111827; border-radius: 10px; font-variant-numeric: tabular-nums; }
table.sv2-grid thead th { color: #cbd5e1; font-weight: 600; }
table.sv2-grid th.sv2-g-none { border-bottom: 0; }
table.sv2-grid th.sv2-g-cap { text-align: center; color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
table.sv2-grid .sv2-g-first { border-left: 1px solid #4b5563; }
table.sv2-grid .sv2-g-last { border-right: 1px solid #4b5563; }
table.sv2-grid th.sv2-g-top { border-top: 1px solid #4b5563; }
table.sv2-grid tbody tr:last-child td.sv2-g { border-bottom: 1px solid #4b5563; }
table.sv2-grid td.sv2-sub { color: #94a3b8; }
table.sv2-grid tbody tr:hover td { background: rgba(255,255,255,.03); }
.sv2-expand { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.sv2-expand:hover { color: #f87171; }

/* --- reference dark palette (overrides) --- */
.sv2 { background: #141414; border-radius: 16px; padding: 20px; color: #e5e5e5; }
.sv2-banner { background: linear-gradient(180deg, #232323 0%, #1b1b1b 100%); border: 1px solid #2c2c2c; border-left-width: 3px; border-radius: 14px; }
.sv2-banner.green { border-left-color: #16a34a; background: linear-gradient(180deg, #232323 0%, #1b1b1b 100%); }
.sv2-banner.yellow { border-left-color: #ca8a04; background: linear-gradient(180deg, #232323 0%, #1b1b1b 100%); }
.sv2-banner.red { border-left-color: #dc2626; background: linear-gradient(180deg, #232323 0%, #1b1b1b 100%); }
.sv2-muted { color: #8a8a8a; }
.sv2-filters label { color: #8a8a8a; }
.sv2-filters input, .sv2-filters select { height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid #2c2c2c; background: #1f1f1f; color: #f5f5f5; }
.sv2-nav { background: rgba(20,20,20,.92); border-color: #2c2c2c; }
.sv2-nav a { color: #8a8a8a; }
.sv2-nav a:hover { color: #ff4b5c; }
.sv2-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.sv2-section > h3, .sv2-sec-head > h3 { margin: 0; font-size: 22px; font-weight: 800; color: #ff4b5c; text-transform: uppercase; letter-spacing: .02em; }
.sv2-sec-head h3 .sv2-muted { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 8px; }
.sv2-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sv2-pill { display: inline-flex; align-items: center; background: #262a33; border: 1px solid #353b47; border-radius: 999px; padding: 4px 12px; color: #e5e7eb; font-size: 13px; font-variant-numeric: tabular-nums; }
.sv2-pill-text { color: #e5e7eb; font-size: 13px; font-variant-numeric: tabular-nums; }
.sv2-seg { background: #1f1f1f; border: 1px solid #2c2c2c; border-radius: 10px; height: 38px; }
.sv2-seg button { background: transparent; color: #d4d4d4; padding: 0 14px; font-size: 13px; }
.sv2-seg button + button { border-left: 0; }
.sv2-seg button.active { background: #ff4b5c; color: #fff; font-weight: 700; box-shadow: none; }
.sv2-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sv2-card, .sv2-chart-card { background: linear-gradient(180deg, #232323 0%, #1b1b1b 100%); border: 1px solid #2c2c2c; border-radius: 14px; padding: 18px 22px; }
.sv2-card { gap: 8px; }
.sv2-card-title { color: #e8e8e8; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.sv2-src { color: #8a8a8a; font-weight: 400; text-transform: none; letter-spacing: 0; }
.sv2-card-value { font-size: 34px; font-weight: 800; color: #f5f5f5; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sv2-card-mom { font-size: 14px; }
.sv2-mom { color: #8a8a8a; font-weight: 700; }
.sv2-mom.up { color: #4ade80; }
.sv2-mom.down { color: #f87171; }
.sv2-mom-vs { color: #8a8a8a; }
.sv2-card-sub { font-size: 13px; color: #a3a3a3; }
.sv2-card-foot { font-size: 14px; color: #d4d4d4; border-top: 1px solid #2a2a2a; padding-top: 10px; margin-top: 4px; gap: 4px 18px; }
.sv2-dot { width: 9px; height: 9px; margin-right: 6px; }
.sv2-dot.ios { background: #4f8cff; }
.sv2-dot.android { background: #f97316; margin-left: 0; }
.sv2-dot.other { background: #6b7280; }
.sv2-group-box { border: 1px dashed #3a3a3a; border-radius: 16px; padding: 12px; }
.sv2-group-title { color: #8a8a8a; }
.sv2-group-box + .sv2-group-box { margin-top: 14px; }
.sv2-legend { color: #8a8a8a; font-size: 12px; }
.sv2-legend > span { display: inline-flex; align-items: center; }
.sv2-chart-card svg text { font-family: inherit; }
table.sv2-grid { background: #1b1b1b; border-radius: 10px; }
table.sv2-table th, table.sv2-table td { border-bottom: 1px solid #2a2a2a; color: #e5e5e5; font-variant-numeric: tabular-nums; }
table.sv2-grid thead th { background: #232323; color: #a3a3a3; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
table.sv2-grid th.sv2-g-cap { color: #a3a3a3; background: rgba(255,75,92,.06); }
table.sv2-grid .sv2-g-first { border-left: 1px solid #3f3f46; }
table.sv2-grid .sv2-g-last { border-right: 1px solid #3f3f46; }
table.sv2-grid th.sv2-g-top { border-top: 1px solid #3f3f46; }
table.sv2-grid tbody tr:last-child td.sv2-g { border-bottom: 1px solid #3f3f46; }
table.sv2-grid th.sv2-g { background: rgba(255,75,92,.06); }
table.sv2-grid td.sv2-sub { color: #a3a3a3; }
.sv2-expand:hover { color: #ff4b5c; }
.sv2-progress > div { background: #4f8cff; }
@media (max-width: 900px) {
    .sv2-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .sv2 { padding: 12px; }
    .sv2-cards { grid-template-columns: 1fr; }
    .sv2-section > h3, .sv2-sec-head > h3 { font-size: 18px; }
}
