/* =============================================================
   Mapa Brasil - Estilos globais
   Temas: dark (padrão) e light
   Responsivo: mobile, tablet, desktop e telas grandes
   ============================================================= */

/* Fonte */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    transition: background-color .3s ease, color .3s ease;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Variáveis - tema dark */
:root {
    --bg: #081427;
    --bg-elevated: #0d1c34;
    --bg-card: #1a2942;
    --bg-card-alt: #15243a;
    --border: #19406e;
    --border-soft: rgba(255, 255, 255, .06);

    --text: #f8fafc;
    --text-soft: #dbe4f0;
    --text-muted: #8aa2c1;

    --primary: #d39a11;
    --primary-dark: #b47e06;
    --primary-soft: rgba(211, 154, 17, .14);
    --primary-light: #f8e4b1;

    --success: #22c55e;
    --danger: #ef4444;

    --radius-xs: .45rem;
    --radius-sm: .6rem;
    --radius: .9rem;
    --radius-lg: 1.2rem;

    --shadow-sm: 0 6px 20px rgba(0, 0, 0, .18);
    --shadow: 0 10px 30px rgba(0, 0, 0, .28);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .38);

    --map-empty: #344764;
    --map-empty-alt: #24354d;
    --map-stroke: #0b1729;

    --overlay: rgba(2, 8, 23, .72);
    --scrollbar: #344764;

    --container: 1800px;
    --header-height: 64px;
}

/* Variáveis - tema light */
body.light,
body.theme-light {
    --bg: #f4f7fb;
    --bg-elevated: #eef3f9;
    --bg-card: #ffffff;
    --bg-card-alt: #f7f9fc;
    --border: #dbe5f1;
    --border-soft: rgba(15, 23, 42, .06);

    --text: #0f172a;
    --text-soft: #1e293b;
    --text-muted: #64748b;

    --primary: #71db08;
    --primary-dark: #55ab05;
    --primary-soft: rgba(113, 219, 8, .12);
    --primary-light: #eaffcf;

    --shadow-sm: 0 4px 18px rgba(15, 23, 42, .05);
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, .12);

    --map-empty: #c6d2df;
    --map-empty-alt: #dbe5ef;
    --map-stroke: #ffffff;

    --overlay: rgba(15, 23, 42, .45);
    --scrollbar: #c6d2df;
}

/* Compatibilidade com tema dark explícito */
body.theme-dark {
    --bg: #081427;
    --bg-elevated: #0d1c34;
    --bg-card: #1a2942;
    --bg-card-alt: #15243a;
    --border: #19406e;
    --border-soft: rgba(255, 255, 255, .06);

    --text: #f8fafc;
    --text-soft: #dbe4f0;
    --text-muted: #8aa2c1;

    --primary: #d39a11;
    --primary-dark: #b47e06;
    --primary-soft: rgba(211, 154, 17, .14);
    --primary-light: #f8e4b1;

    --shadow-sm: 0 6px 20px rgba(0, 0, 0, .18);
    --shadow: 0 10px 30px rgba(0, 0, 0, .28);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .38);

    --map-empty: #344764;
    --map-empty-alt: #24354d;
    --map-stroke: #0b1729;

    --overlay: rgba(2, 8, 23, .72);
    --scrollbar: #344764;
}

body {
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.025), transparent 24%),
        radial-gradient(circle at top right, rgba(255,255,255,.02), transparent 20%),
        var(--bg);
    color: var(--text);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
    border-radius: 999px;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--header-height);
    background: color-mix(in srgb, var(--bg-card) 86%, transparent);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: var(--container);
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
}

.header-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    line-height: 0;
    flex-shrink: 1;
}

.header-brand-logo {
    display: block;
    width: auto;
    height: 36px;
    max-width: min(52vw, 220px);
    object-fit: contain;
}

.logo-dark,
.logo-light {
    display: none;
}

body.theme-dark .logo-dark,
body:not(.light):not(.theme-light) .logo-dark {
    display: block;
}

body.light .logo-light,
body.theme-light .logo-light {
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 40px;
    padding: .65rem 1rem;
    border-radius: .75rem;
    border: 1px solid transparent;
    font-size: .875rem;
    font-weight: 700;
    white-space: nowrap;
    transition: transform .15s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .22);
}

.btn-secondary {
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: .75rem;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}

.btn-icon:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* Layout principal */
.app-main {
    max-width: var(--container);
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .85rem;
}

.stat-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 96%, white 4%), var(--bg-card));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .9rem;
    box-shadow: var(--shadow-sm);
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-content {
    min-width: 0;
}

.stat-label {
    margin-bottom: .35rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stat-value {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1;
    color: var(--text);
}

.stat-desc {
    margin-top: .3rem;
    font-size: .78rem;
    color: var(--text-muted);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Mapa + ranking */
.map-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Cards base */
.map-card,
.ranking-card,
.legend {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* Card do mapa */
.map-card {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .8rem;
    min-width: 0;
}

.map-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, var(--primary) .8px, transparent 0);
    background-size: 28px 28px;
    opacity: .03;
    pointer-events: none;
}

.section-title {
    position: relative;
    z-index: 1;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.map-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 760 / 700;
    min-height: 280px;
}

.map-wrapper svg {
    width: 100%;
    height: 100%;
}

/* SVG do mapa */
.map-state path,
.map-state polygon,
.map-state rect,
.map-state ellipse {
    fill: var(--map-empty);
    stroke: var(--map-stroke);
    stroke-width: .9;
    transition: fill .35s ease, filter .18s ease, stroke .18s ease, transform .18s ease;
    cursor: pointer;
}

.map-state:hover path,
.map-state:hover polygon,
.map-state:hover rect,
.map-state:hover ellipse {
    filter: brightness(1.08);
    stroke: color-mix(in srgb, var(--primary) 55%, var(--map-stroke));
    stroke-width: 1.2;
}

.map-state.active path,
.map-state.active polygon,
.map-state.active rect,
.map-state.active ellipse {
    stroke: var(--primary);
    stroke-width: 2;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, .18));
}

.state-label {
    fill: rgba(255, 255, 255, .42);
    font-family: 'Inter', sans-serif;
    letter-spacing: .3px;
    user-select: none;
    pointer-events: none;
}

body.light .state-label,
body.theme-light .state-label {
    fill: rgba(15, 23, 42, .52);
}

.map-state.has-data .state-label {
    fill: rgba(31, 20, 0, .78);
}

/* Tooltip */
.map-tooltip {
    position: fixed;
    z-index: 9999;
    min-width: 168px;
    max-width: min(280px, calc(100vw - 24px));
    padding: .75rem .9rem;
    border-radius: .8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s ease, transform .12s ease;
    transform: translateY(4px);
}

.map-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-name {
    font-size: .95rem;
    font-weight: 800;
    color: var(--primary);
}

.tooltip-uf {
    margin-top: .1rem;
    font-size: .72rem;
    color: var(--text-muted);
}

.tooltip-row {
    margin-top: .55rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.tooltip-key {
    font-size: .75rem;
    color: var(--text-muted);
}

.tooltip-val {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text);
}

/* Ranking */
.ranking-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    max-height: 540px;
}

.ranking-header {
    padding: .95rem 1rem;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}

.ranking-header h2 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: .2rem .65rem;
    border-radius: 999px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.ranking-list {
    flex: 1;
    overflow-y: auto;
    padding: .6rem;
}

.ranking-item {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .7rem;
    border-radius: .75rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
}

.ranking-item + .ranking-item {
    margin-top: .35rem;
}

.ranking-item:hover {
    background: var(--bg-card-alt);
    border-color: var(--border);
    transform: translateY(-1px);
}

.ranking-item.active {
    background: color-mix(in srgb, var(--primary-soft) 100%, transparent);
    border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
}

.ranking-item-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .65rem;
    min-width: 0;
}

.uf-badge {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all .2s ease;
}

.ranking-item.active .uf-badge {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.ranking-info {
    min-width: 0;
}

.ranking-nome {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-regiao {
    margin-top: .1rem;
    font-size: .72rem;
    color: var(--text-muted);
}

.ranking-count {
    font-size: .95rem;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 0;
}

.ranking-item.active .ranking-count {
    color: var(--primary);
}

.ranking-bar {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--bg-card-alt);
}

.ranking-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #fff));
    transition: width .45s ease;
}

.ranking-footer {
    padding: .7rem 1rem;
    border-top: 1px solid var(--border-soft);
    font-size: .74rem;
    text-align: center;
    color: var(--text-muted);
}

/* Legenda */
.legend {
    padding: .85rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem 1rem;
}

.legend-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--text);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .74rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, .08);
    flex-shrink: 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    background: var(--overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    width: 100%;
    max-width: 520px;
    margin: auto;
    padding: 1.2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-24px);
    transition: transform .25s ease;
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal-header {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: .7rem;
    background: var(--bg-card-alt);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color .2s ease, color .2s ease;
}

.modal-close:hover {
    background: var(--bg-elevated);
    color: var(--text);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

/* Formulário */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .9rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .38rem;
}

.form-label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--text);
}

.form-label span {
    color: var(--primary);
}

.form-control {
    width: 100%;
    min-height: 44px;
    padding: .7rem .85rem;
    border-radius: .7rem;
    border: 1px solid var(--border);
    background: var(--bg-card-alt);
    color: var(--text);
    outline: none;
    appearance: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    border-color: color-mix(in srgb, var(--primary) 60%, var(--border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.form-control.error {
    border-color: var(--danger);
}

.form-error {
    display: none;
    margin-top: .1rem;
    font-size: .74rem;
    color: var(--danger);
}

.form-error.visible {
    display: block;
}

.form-feedback {
    display: none;
    margin-bottom: .75rem;
    padding: .75rem .9rem;
    border-radius: .75rem;
    font-size: .84rem;
    font-weight: 600;
}

.form-feedback.success {
    display: block;
    color: var(--success);
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .2);
}

.form-feedback.error {
    display: block;
    color: var(--danger);
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .2);
}

.form-actions {
    margin-top: .25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}

.form-actions .btn {
    width: 100%;
}

/* Spinner */
.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.32);
    border-top-color: #fff;
    border-radius: 999px;
    animation: spin .6s linear infinite;
}

.btn.loading .spinner {
    display: inline-block;
}

.btn.loading .btn-text {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.app-footer {
    margin-top: 1rem;
    padding: .8rem 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-soft);
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem 1rem;
    font-size: .74rem;
    color: var(--text-muted);
}

/* Responsivo */

/* Mobile maior */
@media (min-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-brand-logo {
        height: 40px;
    }
}

/* Tablet */
@media (min-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .header-inner {
        padding: 0 1.5rem;
    }

    .app-main {
        padding: 1.4rem 1.5rem 2.5rem;
        gap: 1.25rem;
    }

    .stats-grid {
        gap: 1rem;
    }

    .stat-card {
        padding: 1.15rem 1.2rem;
    }

    .map-card {
        padding: 1.2rem;
    }

    .ranking-card {
        max-height: 640px;
    }

    .modal {
        padding: 1.4rem;
    }

    .legend {
        padding: 1rem 1.1rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .header-inner {
        padding: 0 2rem;
    }

    .app-main {
        padding: 1.8rem 2rem 3rem;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .map-section {
        grid-template-columns: minmax(0, 2fr) minmax(300px, 340px);
        align-items: start;
    }

    .map-card {
        min-height: 720px;
    }

    .ranking-card {
        position: sticky;
        top: calc(var(--header-height) + 1rem);
        max-height: calc(100vh - var(--header-height) - 2rem);
    }

    .header-brand-logo {
        height: 44px;
        max-width: 240px;
    }
}

/* Desktop largo */
@media (min-width: 1360px) {
    .map-section {
        grid-template-columns: minmax(0, 1.8fr) minmax(340px, 380px);
    }

    .map-card {
        min-height: 760px;
    }

    .ranking-card {
        max-height: 760px;
    }
}

/* Telas muito grandes */
@media (min-width: 1800px) {
    html {
        font-size: 17px;
    }

    .app-main {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    .stats-grid {
        gap: 1.25rem;
    }

    .map-section {
        gap: 1.25rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .header-inner {
        min-height: 60px;
    }

    .header-actions {
        gap: .45rem;
    }

    .btn {
        min-height: 38px;
        padding: .58rem .9rem;
    }

    .btn-primary {
        font-size: .82rem;
    }

    .stat-card {
        padding: .95rem;
    }

    .map-wrapper {
        min-height: 240px;
        aspect-ratio: 1 / 1;
    }

    .ranking-header {
        padding: .85rem .9rem;
    }

    .ranking-list {
        padding: .5rem;
    }

    .legend {
        gap: .5rem .8rem;
    }

    .modal-overlay {
        padding: .75rem;
    }

    .modal {
        padding: 1rem;
        border-radius: 1rem;
    }

    .map-tooltip {
        min-width: 148px;
        padding: .65rem .75rem;
    }
}

/* Mobile pequeno */
@media (max-width: 575px) {
    .header-brand-logo {
        height: 30px;
        max-width: 160px;
    }

    .header-actions .btn-primary {
        display: none;
    }

    .stat-label {
        font-size: .68rem;
    }

    .stat-value {
        font-size: 1.7rem;
    }

    .stat-desc {
        font-size: .74rem;
    }

    .uf-badge {
        width: 32px;
        height: 32px;
        font-size: .68rem;
    }

    .ranking-nome {
        font-size: .82rem;
    }

    .ranking-count {
        font-size: .88rem;
    }

    .section-title {
        font-size: .7rem;
    }
}

/* Mobile muito pequeno */
@media (max-width: 375px) {
    .header-inner {
        padding: 0 .8rem;
    }

    .app-main {
        padding: .9rem .8rem 1.5rem;
    }

    .stat-card {
        gap: .7rem;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
    }

    .map-card,
    .ranking-card,
    .legend {
        border-radius: .8rem;
    }

    .modal {
        padding: .9rem;
    }

    .modal-header h2 {
        font-size: 1rem;
    }
}