@font-face {
    font-family: "KyivType";
    src: url("../fonts/KyivTypeSans-Heavy.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "KyivType";
    src: url("../fonts/KyivTypeSans-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "KyivType";
    src: url("../fonts/KyivTypeSans-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-Variable.ttf") format("truetype");
    font-weight: 300 500;
    font-style: normal;
    font-display: swap;
}

:root {
    --white: #FFFFFF;
    --lilac: #5865F2;
    --blue-dark: #01205C;
    --gray: #E2E2E2;
    --black: #23272A;
    --green: #00A651;
    --green-dark: #005A46;
    --green-bright: #00CB50;
    --green-light: #AAE8B8;
    --blue-secondary: #0078D0;
    --blue-secondary-dark: #00287F;
    --blue-secondary-bright: #00B4EB;
    --blue-secondary-light: #ABEBFF;
    --yellow: #FFB114;
    --yellow-dark: #E67324;
    --yellow-bright: #FFCE19;
    --yellow-light: #FFF08C;
    --red: #F0282D;
    --red-dark: #980F30;
    --red-bright: #FF555F;
    --red-light: #FFC7C9;
    --pink: #EB459E;
    --pink-dark: #AC286F;
    --pink-bright: #FF58B1;
    --pink-light: #FFC0E2;
    --soft-bg: #F7F8FC;
    --soft-line: #EBEBEB;
    --muted: #5C6370;
    --micro: #7B8394;
    --container: 1360px;
    --radius-sm: 14px;
    --radius-card: 20px;
    --radius-lg: 28px;
    --radius-sticker: 12px;
    --shadow-card: 0 10px 24px rgba(1, 32, 92, 0.06);
    --shadow-hover: 0 16px 36px rgba(1, 32, 92, 0.10);
    --shadow-popover: 0 18px 40px rgba(35, 39, 42, 0.12);
    --transition: 180ms ease;
    --font-display: "KyivType", Arial, sans-serif;
    --font-body: "Montserrat", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    background: var(--white);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--white);
    color: var(--black);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

button,
select,
input,
textarea {
    font: inherit;
}

button,
a,
select {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-page {
    min-height: 100vh;
    overflow: hidden;
}

.app-container {
    width: min(calc(100% - 80px), var(--container));
    margin: 0 auto;
    padding-right: 20px;
    padding-left: 20px;
}

.app-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    min-height: 107px;
    padding-top: 20px;
    padding-bottom: 20px;
    background: rgba(88, 101, 242, 0.98);
    color: var(--white);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.header-grid {
    display: grid;
    min-height: 67px;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}

.brand-mark__logo {
    display: inline-flex;
    width: 64px;
    height: 63px;
    align-items: center;
    justify-content: center;
    border: 2px solid currentColor;
    border-radius: 18px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    line-height: 18px;
}

.brand-mark__meta {
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-transform: uppercase;
}

.brand-mark__image {
    display: block;
    width: 64px;
    height: auto;
    flex: 0 0 auto;
}

.tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button {
    min-height: 39px;
    border-radius: 20px;
    padding: 10px 15px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    line-height: 19px;
    transition: background-color 0.3s ease, color 0.3s ease, transform var(--transition);
}

.tab-button:hover,
.tab-button.is-active {
    background: rgba(255, 255, 255, 0.18);
}

.header-actions,
.hero-actions,
.actions-left,
.export-actions,
.filters-state {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    position: relative;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0 18px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    text-align: center;
    transition: color var(--transition), background-color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}

.btn:focus-visible,
.tab-button:focus-visible,
select:focus-visible,
input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25), 0 0 0 7px rgba(88, 101, 242, 0.2);
}

.btn:active,
.tab-button:active {
    transform: translateY(1px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.btn-primary {
    border-color: var(--lilac);
    background: var(--lilac);
    color: var(--white);
}

.btn-primary:hover {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
}

.btn-secondary {
    border-color: var(--blue-dark);
    background: var(--white);
    color: var(--blue-dark);
}

.btn-secondary:hover,
.btn-ghost:hover {
    border-color: var(--lilac);
    color: var(--lilac);
    transform: translateY(-2px);
}

.btn-ghost {
    border-color: var(--gray);
    background: var(--white);
    color: var(--blue-dark);
}

.btn-header {
    min-height: 39px;
    border-color: rgba(255, 255, 255, 0.78);
    border-radius: 12px;
    background: transparent;
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 700;
}

.btn-header--outline {
    background: transparent;
    color: var(--white);
}

.btn-header:hover {
    border-color: var(--white);
    background: var(--white);
    color: var(--lilac);
    transform: translateY(-1px);
}

.btn.is-pending {
    color: transparent;
}

.btn.is-pending::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--white);
    border-radius: 999px;
    animation: spin 0.9s linear infinite;
}

.app-header,
.app-header *,
.site-footer,
.site-footer *,
.map-tooltip,
.map-tooltip *,
.hero-sticker,
.hero-sticker *,
.btn-primary,
.btn-primary *,
.btn-header--outline,
.btn-header--outline *,
.filters-toggle:not([aria-expanded="true"]),
.filters-toggle:not([aria-expanded="true"]) *,
.report-card th,
.report-card th *,
.report-card th:last-child,
.report-card th:last-child * {
    color: var(--white);
}

.hero-section {
    display: flex;
    min-height: 760px;
    align-items: center;
    max-height: 980px;
    overflow: hidden;
    padding-top: 152px;
    padding-bottom: 88px;
    background: linear-gradient(135deg, #F7F8FC 0%, #FFFFFF 48%, #F7F8FC 100%);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 520ms ease, transform 520ms ease, max-height 620ms ease, min-height 620ms ease, padding 620ms ease;
}

.hero-section.is-dismissing {
    min-height: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-18px);
}

.hero-section[hidden] {
    display: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(440px, 0.9fr);
    align-items: center;
    gap: 72px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--micro);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-transform: uppercase;
}

.hero-copy .eyebrow {
    color: var(--lilac);
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1 {
    max-width: 680px;
    margin-bottom: 22px;
    color: var(--blue-dark);
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 800;
    line-height: 64px;
}

h2 {
    margin-bottom: 14px;
    color: var(--blue-dark);
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    line-height: 48px;
}

h3 {
    margin-bottom: 0;
    color: var(--blue-dark);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    line-height: 32px;
}

h4 {
    margin-bottom: 18px;
    color: currentColor;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
}

.hero-lead,
.section-intro p:not(.eyebrow) {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--black);
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
}

.hero-actions {
    flex-wrap: wrap;
    margin-top: 32px;
}

.hero-visual {
    display: grid;
    position: relative;
    min-height: 500px;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 14px;
    border: 2px solid var(--blue-dark);
    border-radius: 36px;
    padding: 24px;
    background: var(--blue-dark);
    box-shadow: 0 28px 56px rgba(1, 32, 92, 0.18);
}

.hero-visual__panel {
    display: flex;
    position: relative;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-radius: 24px;
    padding: 18px;
    background: var(--white);
    color: var(--blue-dark);
}

.hero-visual__panel span,
.hero-visual__panel small {
    position: relative;
    z-index: 1;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-transform: uppercase;
}

.hero-visual__panel strong {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    line-height: 48px;
    font-variant-numeric: tabular-nums;
}

.hero-visual__panel strong.is-counting {
    will-change: contents;
}

.hero-visual__panel--wide {
    grid-column: span 4;
    background: var(--yellow-light);
}

.hero-visual__panel--green {
    grid-column: span 2;
    background: var(--green-light);
}

.hero-visual__panel--yellow {
    grid-column: span 3;
    background: var(--white);
}

.hero-visual__panel--pink {
    grid-column: span 3;
    background: var(--pink-light);
}

.mini-map {
    display: grid;
    grid-template-columns: repeat(3, 30px);
    gap: 6px;
}

.mini-map i {
    display: block;
    height: 28px;
    border: 1px solid var(--blue-dark);
    border-radius: 9px;
    background: var(--blue-secondary);
}

.mini-map i:nth-child(2),
.mini-map i:nth-child(5) {
    background: var(--blue-secondary-light);
}

.mini-map i:nth-child(3) {
    background: var(--blue-secondary-bright);
}

.hero-sticker {
    display: flex;
    grid-column: span 4;
    min-height: 96px;
    align-items: center;
    border: 2px solid var(--blue-dark);
    border-radius: var(--radius-sticker);
    padding: 18px;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.hero-shape {
    grid-column: span 2;
    min-height: 96px;
    border-radius: 999px;
    background: var(--lilac);
}

.app-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 88px;
    padding-top: 88px;
    padding-bottom: 88px;
    transition: padding-top 620ms ease;
}

body.hero-is-hidden .app-main {
    padding-top: 142px;
}

.filters-panel,
.visualization-card,
.chart-card,
.table-card,
.geo-card,
.report-card {
    min-width: 0;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.filters-panel {
    display: grid;
    gap: 0;
    padding: 28px;
}

.filters-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.section-intro {
    display: grid;
    gap: 0;
}

.section-intro--filters {
    max-width: 760px;
}

.filters-toggle {
    display: inline-flex;
    min-height: 52px;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--blue-dark);
    border-radius: var(--radius-sm);
    padding: 0 18px 0 14px;
    background: var(--blue-dark);
    color: var(--white);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.filters-toggle:hover {
    border-color: var(--lilac);
    background: var(--lilac);
    transform: translateY(-2px);
}

.filters-toggle[aria-expanded="true"] {
    border-color: var(--lilac);
    background: var(--white);
    color: var(--blue-dark);
}

.filters-toggle__icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.16);
}

.filters-toggle[aria-expanded="true"] .filters-toggle__icon {
    background: rgba(88, 101, 242, 0.12);
    color: var(--lilac);
}

.filters-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.filters-dropdown {
    display: grid;
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--soft-line);
}

.filters-dropdown[hidden] {
    display: none;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 16px;
}

.app-main > *,
.filters-grid > *,
.builder-grid > *,
.kpi-grid > *,
.chart-layout > *,
.geo-layout > *,
.report-grid > * {
    min-width: 0;
}

.field {
    display: grid;
    min-width: 0;
    gap: 8px;
}

.field span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

select,
input {
    width: 100%;
    height: 48px;
    min-width: 0;
    border: 1px solid var(--gray);
    border-radius: var(--radius-sm);
    background-color: var(--white);
    color: var(--black);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

select {
    appearance: none;
    padding: 0 42px 0 14px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--blue-dark) 50%),
        linear-gradient(135deg, var(--blue-dark) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) 20px,
        calc(100% - 15px) 20px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

input {
    padding: 0 14px;
}

select:hover,
input:hover {
    border-color: var(--blue-secondary-light);
}

select:focus,
input:focus {
    border-color: var(--lilac);
    outline: none;
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.12);
}

.filters-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filters-state {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.filters-state span,
.info-chip,
.success-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border-radius: 999px;
    padding: 8px 14px;
    background: #F3F5FB;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

.filters-state b {
    margin-left: 4px;
    color: var(--blue-dark);
    font-weight: 500;
}

.success-pill {
    background: rgba(170, 232, 184, 0.45);
    color: var(--green-dark);
}

.error-state {
    border: 1px solid var(--red-light);
    border-radius: var(--radius-card);
    padding: 20px;
    background: rgba(255, 199, 201, 0.35);
    color: var(--red-dark);
    font-weight: 500;
}

.tab-panel {
    display: none;
    scroll-margin-top: 132px;
}

.tab-panel.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.analytics-section {
    position: relative;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.kpi-card {
    display: flex;
    position: relative;
    min-height: 132px;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--soft-line);
    border-radius: 24px;
    padding: 20px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 10px;
    background: var(--lilac);
}

.kpi-card:nth-child(2)::before {
    background: var(--green);
}

.kpi-card:nth-child(3)::before {
    background: var(--yellow);
}

.kpi-card:nth-child(4)::before {
    background: var(--pink);
}

.kpi-card:nth-child(5)::before {
    background: var(--blue-dark);
}

.kpi-card:nth-child(6)::before {
    background: var(--blue-secondary);
}

.kpi-card:nth-child(7)::before {
    background: var(--red);
}

.kpi-card:nth-child(8)::before {
    background: var(--blue-secondary-light);
}

.kpi-card:hover {
    border-color: var(--blue-secondary-light);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.kpi-label {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-transform: uppercase;
}

.kpi-value,
.total-number {
    position: relative;
    z-index: 1;
    margin-top: 14px;
    color: var(--blue-dark);
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    line-height: 48px;
}

.visualization-card,
.chart-card,
.table-card,
.geo-card,
.report-card {
    padding: 24px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.compact-heading {
    align-items: center;
}

.builder-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.chart-card {
    position: relative;
}

.chart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: stretch;
    gap: 24px;
}

.chart-area {
    min-height: 420px;
    padding-top: 20px;
}

#statistics-chart {
    min-height: 390px;
}

.legend-panel {
    display: flex;
    position: relative;
    min-width: 0;
    flex-direction: column;
    align-self: stretch;
    overflow: visible;
    border: 1px solid var(--soft-line);
    border-top: 10px solid var(--legend-accent, var(--blue-secondary));
    border-radius: 24px;
    padding: 18px 20px 20px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.legend-panel::before {
    content: none;
}

.legend-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.legend-panel__header h3 {
    margin: 0;
    color: var(--blue-dark);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

.palette-toggle {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--soft-line);
    border-radius: 50%;
    background: var(--white);
    color: var(--blue-dark);
    cursor: pointer;
    transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.palette-toggle:hover,
.palette-toggle[aria-expanded="true"] {
    border-color: var(--blue-secondary);
    background: rgba(171, 235, 255, 0.34);
    transform: translateY(-1px);
}

.palette-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.palette-toggle svg circle {
    fill: currentColor;
    stroke: none;
}

.color-popover {
    position: absolute;
    top: 54px;
    right: 16px;
    z-index: 20;
    width: min(320px, calc(100vw - 40px));
    border: 1px solid var(--soft-line);
    border-radius: 18px;
    padding: 16px;
    background: var(--white);
    box-shadow: var(--shadow-popover);
}

.color-popover__section + .color-popover__section {
    margin-top: 16px;
}

.color-popover__section > span {
    display: block;
    margin-bottom: 8px;
    color: var(--micro);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-transform: uppercase;
}

.color-mode-grid,
.label-mode-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.color-mode-grid button,
.label-mode-grid button {
    min-height: 36px;
    border: 1px solid var(--soft-line);
    border-radius: 12px;
    padding: 8px;
    background: var(--white);
    color: var(--black);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    cursor: pointer;
}

.color-mode-grid button.is-active,
.label-mode-grid button.is-active {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
    color: var(--white);
}

.color-swatch-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(1, 32, 92, 0.18);
    border-radius: 50%;
    background: var(--swatch);
    cursor: pointer;
}

.color-swatch.is-active {
    outline: 3px solid rgba(88, 101, 242, 0.22);
    outline-offset: 2px;
}

.type-color-list {
    display: grid;
    max-height: 190px;
    gap: 8px;
    overflow: auto;
    padding-right: 4px;
}

.type-color-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    align-items: center;
    gap: 10px;
}

.type-color-row span {
    overflow: hidden;
    color: var(--black);
    font-size: 13px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.type-color-row select {
    height: 36px;
    border-radius: 12px;
    font-size: 12px;
}

.legend-list {
    display: grid;
    gap: 0;
    margin-top: 16px;
    border-top: 1px solid var(--soft-line);
}

.legend-list.is-dense {
    max-height: 310px;
    overflow: auto;
    padding-right: 6px;
}

.legend-item {
    display: grid;
    min-height: 40px;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(226, 226, 226, 0.72);
    padding: 8px 0;
    color: var(--black);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.legend-item strong {
    color: var(--blue-dark);
    font-weight: 500;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(1, 32, 92, 0.05);
}

.apexcharts-datalabels text,
.apexcharts-data-labels text,
.apexcharts-datalabel,
.apexcharts-pie-label {
    fill: var(--blue-dark) !important;
    color: var(--blue-dark) !important;
    filter: none !important;
    font-family: var(--font-body) !important;
    font-weight: 500 !important;
    text-shadow: none !important;
}

.apexcharts-datalabels rect,
.apexcharts-data-labels rect {
    fill: var(--white) !important;
    filter: none !important;
    stroke: #D8E0EE !important;
    stroke-width: 1 !important;
}

.apexcharts-tooltip,
.apexcharts-tooltip.apexcharts-theme-light,
.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
    border: 1px solid var(--soft-line) !important;
    border-radius: var(--radius-sticker) !important;
    background: var(--white) !important;
    color: var(--black) !important;
    box-shadow: var(--shadow-popover) !important;
    font-family: var(--font-body) !important;
}

.apexcharts-tooltip *,
.apexcharts-xaxistooltip *,
.apexcharts-yaxistooltip * {
    color: var(--black) !important;
}

.apexcharts-tooltip-title {
    border-bottom: 1px solid var(--soft-line) !important;
    background: #F3F5FB !important;
    color: var(--blue-dark) !important;
    font-family: var(--font-body) !important;
    font-weight: 500 !important;
}

.apexcharts-tooltip-text-y-value,
.apexcharts-tooltip-text-goals-value,
.apexcharts-tooltip-text-z-value {
    color: var(--blue-dark) !important;
    font-weight: 500 !important;
}

.table-scroll {
    overflow: auto;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius-card);
    background: var(--white);
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--black);
    font-family: var(--font-body);
}

th,
td {
    border-bottom: 1px solid var(--soft-line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

th {
    min-height: 44px;
    background: var(--blue-dark);
    color: var(--white);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}

td {
    min-height: 48px;
    background: var(--white);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

tbody tr:hover td {
    background: rgba(171, 235, 255, 0.18);
}

tfoot td {
    background: rgba(255, 240, 140, 0.45);
    color: var(--blue-dark);
    font-weight: 500;
}

.admin-page {
    min-height: 100vh;
    padding: 136px 20px 56px;
    background: linear-gradient(135deg, #F7F8FC 0%, #FFFFFF 52%, #F7F8FC 100%);
}

.admin-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    padding-top: 14px;
    padding-bottom: 14px;
    background: rgba(88, 101, 242, 0.98);
    color: var(--white);
}

.admin-header__inner {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.admin-page .panel {
    width: min(100%, 1120px);
    margin: 0 auto;
    border: 1px solid var(--soft-line);
    border-top: 10px solid var(--lilac);
    border-radius: var(--radius-lg);
    padding: 32px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.admin-page h1 {
    margin-bottom: 24px;
    white-space: nowrap;
}

.admin-page h2 {
    margin-bottom: 16px;
    font-size: 32px;
    line-height: 40px;
}

.admin-page h3 {
    margin: 28px 0 16px;
}

.admin-page label {
    display: grid;
    gap: 8px;
    color: var(--blue-dark);
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
}

.admin-page .stack {
    display: grid;
    max-width: 720px;
    gap: 16px;
    margin-bottom: 16px;
}

.inline-form {
    display: inline-flex;
    margin: 0 12px 16px 0;
}

.notice {
    border: 1px solid var(--soft-line);
    border-left-width: 6px;
    border-radius: var(--radius-card);
    padding: 14px 16px;
    margin-bottom: 16px;
    background: #F8FAFF;
    color: var(--black);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
}

.notice.success {
    border-left-color: var(--green);
    background: rgba(170, 232, 184, 0.28);
    color: var(--green-dark);
}

.notice.error {
    border-left-color: var(--red);
    background: rgba(255, 199, 201, 0.32);
    color: var(--red-dark);
}

.small {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.source-current {
    display: grid;
    gap: 4px;
}

.source-current a {
    overflow-wrap: anywhere;
    color: var(--blue-dark);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.diagnostics-section {
    margin-top: 28px;
    border-top: 1px solid var(--soft-line);
    padding-top: 28px;
}

.diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.diagnostic-card {
    display: grid;
    min-height: 118px;
    align-content: space-between;
    border: 1px solid var(--soft-line);
    border-top: 8px solid var(--blue-secondary);
    border-radius: var(--radius-card);
    padding: 16px;
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.diagnostic-card:nth-child(2) {
    border-top-color: var(--pink);
}

.diagnostic-card:nth-child(3),
.diagnostic-card:nth-child(4) {
    border-top-color: var(--yellow);
}

.diagnostic-card:nth-child(5),
.diagnostic-card:nth-child(6) {
    border-top-color: var(--red);
}

.diagnostic-card:nth-child(7),
.diagnostic-card:nth-child(8) {
    border-top-color: var(--green);
}

.diagnostic-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}

.diagnostic-card strong {
    color: var(--blue-dark);
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 44px;
    font-variant-numeric: tabular-nums;
}

th[data-column] {
    cursor: pointer;
}

.report-card th {
    background: var(--red);
    color: var(--white);
}

.report-card tbody tr:hover td {
    background: rgba(255, 199, 201, 0.18);
}

.report-card tfoot td,
.report-card tbody tr:last-child td {
    background: rgba(255, 199, 201, 0.36);
}

.report-card td:last-child,
.report-card th:last-child {
    background-color: rgba(255, 240, 140, 0.55);
    color: var(--blue-dark);
}

.report-card th:last-child {
    background-color: var(--yellow-dark);
    color: var(--white);
}

.geo-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 24px;
}

.geo-controls {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 4px 0;
}

.geo-controls p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.stacked {
    flex-direction: column;
    align-items: stretch;
}

.stacked .btn {
    width: 100%;
}

.map-panel {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border: 1px solid var(--blue-secondary-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    background: var(--white);
}

.map-tools {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 12;
}

.map-color-popover {
    top: 62px;
    right: 18px;
    z-index: 30;
}

.ukraine-map {
    display: grid;
    width: 100%;
    min-height: 420px;
    place-items: center;
}

.ukraine-map__svg {
    display: block;
    width: min(100%, 900px);
    height: auto;
    overflow: visible;
}

.ukraine-map__svg,
.ukraine-map__svg *,
#ukraine-map [data-oblast],
#ukraine-map [data-oblast]:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

#ukraine-map path[data-oblast] {
    fill: #EAF0FF;
    stroke: var(--map-region-stroke, rgba(1, 32, 92, 0.36));
    stroke-width: 0.8;
    cursor: pointer;
    transition: fill var(--transition), stroke var(--transition), filter var(--transition), transform var(--transition);
}

#ukraine-map path[data-oblast]:hover,
#ukraine-map path[data-oblast]:focus-visible {
    outline: none;
    stroke: var(--blue-dark);
    stroke-width: 1.2;
    filter: drop-shadow(0 8px 14px rgba(1, 32, 92, 0.12));
}

#ukraine-map path[data-oblast].is-selected {
    stroke: var(--blue-dark);
    stroke-width: 1.8;
    filter: drop-shadow(0 10px 18px rgba(1, 32, 92, 0.18));
}

.map-region-labels {
    pointer-events: none;
}

.map-region-label {
    fill: var(--blue-dark);
    stroke: var(--white);
    stroke-linejoin: round;
    stroke-width: 3px;
    paint-order: stroke fill;
    font-family: var(--font-body);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0;
    pointer-events: none;
}

.map-region-label--light {
    fill: var(--white);
    stroke: rgba(1, 32, 92, 0.72);
    stroke-width: 3px;
}

.map-region-label__name {
    font-size: 5.8px;
    font-weight: 600;
}

.map-region-label__value {
    font-size: 8.5px;
    font-weight: 700;
}

.map-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sticker);
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--blue-dark);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
}

.map-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

.map-legend-bar {
    width: min(320px, 48vw);
    height: 14px;
    border: 1px solid rgba(1, 32, 92, 0.18);
    border-radius: 999px;
    background: linear-gradient(90deg, #EAF0FF, var(--blue-secondary-light), var(--blue-secondary), var(--blue-dark));
}

.map-tooltip {
    display: grid;
    gap: 4px;
    position: fixed;
    z-index: 120;
    pointer-events: none;
    border-radius: var(--radius-sticker);
    padding: 12px 14px;
    border: 1px solid rgba(1, 32, 92, 0.14);
    background: var(--white);
    color: var(--black);
    box-shadow: var(--shadow-popover);
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
}

.map-tooltip[hidden] {
    display: none;
}

.map-tooltip strong {
    color: var(--blue-dark);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
}

.map-tooltip span {
    color: var(--black);
}

.map-tooltip.is-pinned {
    pointer-events: auto;
}

.report-grid {
    display: grid;
    gap: 24px;
}

.empty-state {
    display: grid;
    min-height: 190px;
    place-items: center;
    border: 1px dashed var(--gray);
    border-radius: var(--radius-card);
    background: #F8FAFF;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    text-align: center;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.64);
}

.loading-overlay[hidden] {
    display: none;
}

.loading-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--soft-line);
    border-radius: 20px;
    padding: 16px 18px;
    background: var(--white);
    color: var(--blue-dark);
    box-shadow: var(--shadow-popover);
    font-size: 14px;
    font-weight: 500;
}

.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(88, 101, 242, 0.18);
    border-top-color: var(--lilac);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.skeleton-card,
.skeleton-chart,
.skeleton-line,
.skeleton-table-row {
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(90deg, #F3F5FB 25%, #FFFFFF 37%, #F3F5FB 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}

.skeleton-card {
    min-height: 172px;
}

.skeleton-chart {
    min-height: 390px;
}

.skeleton-line {
    height: 18px;
}

.skeleton-table {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.skeleton-table-row {
    height: 36px;
}

.site-footer {
    margin-top: 12px;
    border-radius: 36px 36px 0 0;
    padding-top: 22px;
    padding-bottom: 22px;
    background: var(--lilac);
    color: var(--white);
}

.footer-compact {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-mark--footer {
    flex: 0 0 auto;
}

.footer-compact span {
    color: var(--white);
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: 0 0;
    }
}

@media (max-width: 1279px) {
    .app-container {
        width: min(calc(100% - 40px), var(--container));
    }

    .app-header {
        min-height: auto;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .header-grid {
        min-height: 60px;
        grid-template-columns: auto 1fr;
    }

    .brand-mark__meta {
        display: none;
    }

    .tabs {
        grid-column: 1 / -1;
        justify-content: flex-start;
        order: 3;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .header-actions {
        justify-content: flex-end;
    }

    .hero-section {
        padding-top: 174px;
    }

    body.hero-is-hidden .app-main {
        padding-top: 150px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    h1 {
        font-size: 44px;
        line-height: 52px;
    }

    h2 {
        font-size: 32px;
        line-height: 40px;
    }

    .kpi-value,
    .total-number {
        font-size: 32px;
        line-height: 40px;
    }

    .filters-grid,
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .diagnostics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chart-layout,
    .geo-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .app-container {
        width: min(calc(100% - 24px), var(--container));
        padding-right: 12px;
        padding-left: 12px;
    }

    .header-grid {
        gap: 12px;
    }

    .brand-mark__image {
        width: 56px;
    }

    .header-actions {
        gap: 8px;
    }

    .btn-header {
        min-height: 36px;
        padding-right: 12px;
        padding-left: 12px;
        font-size: 12px;
    }

    .tab-button {
        min-height: 36px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .hero-section {
        min-height: auto;
        padding-top: 190px;
        padding-bottom: 56px;
    }

    .hero-grid {
        gap: 28px;
    }

    h1 {
        font-size: 32px;
        line-height: 38px;
    }

    h2 {
        font-size: 24px;
        line-height: 32px;
    }

    h3,
    .hero-sticker {
        font-size: 20px;
        line-height: 28px;
    }

    .hero-lead,
    .section-intro p:not(.eyebrow) {
        font-size: 16px;
        line-height: 24px;
    }

    .hero-visual {
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 28px;
        padding: 16px;
    }

    .hero-visual__panel,
    .hero-sticker,
    .hero-shape {
        grid-column: auto;
    }

    .app-main {
        gap: 56px;
        padding-top: 56px;
        padding-bottom: 56px;
    }

    body.hero-is-hidden .app-main {
        padding-top: 164px;
    }

    .filters-panel,
    .visualization-card,
    .chart-card,
    .table-card,
    .geo-card,
    .report-card {
        border-radius: 22px;
        padding: 18px;
    }

    .filters-grid,
    .builder-grid,
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .admin-page {
        padding: 128px 12px 24px;
    }

    .admin-header__inner {
        min-height: 56px;
    }

    .admin-header .brand-mark__image {
        width: 56px;
    }

    .admin-page .panel {
        border-radius: 22px;
        padding: 20px;
    }

    .admin-page h1 {
        font-size: clamp(24px, 8vw, 32px);
        line-height: 1.12;
    }

    .diagnostics-grid {
        grid-template-columns: 1fr;
    }

    .filters-actions,
    .filters-summary,
    .section-heading,
    .compact-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .footer-compact {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-compact span {
        font-size: 20px;
        line-height: 28px;
    }

    .export-actions,
    .hero-actions,
    .actions-left,
    .filters-toggle {
        flex-wrap: wrap;
    }

    .filters-toggle {
        width: 100%;
        justify-content: center;
    }

    .chart-area {
        min-height: 320px;
    }

    #statistics-chart,
    .skeleton-chart {
        min-height: 320px;
    }

    .map-panel {
        min-height: auto;
        padding: 12px;
    }

    .site-footer {
        border-radius: 42px 42px 0 0;
    }
}
