:root {
    --mpi-primary:   #243B6B;
    --mpi-secondary: #3E8EDE;
    --mpi-bg:        #F5F7FB;
    --mpi-border:    #E5E7EB;
    --mpi-dark:      #152238;
}

/* ── BASE ───────────────────────────────────────────── */
body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
    background: #fff;
}

/* ── NAVBAR ─────────────────────────────────────────── */
.public-navbar {
    background: rgba(21, 34, 56, 0.98);
    backdrop-filter: blur(12px);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.public-navbar .navbar-brand {
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    text-decoration: none;
    line-height: 1.2;
}

.public-navbar .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3E8EDE, #1a5fa8);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
}

.public-navbar .brand-sub {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    display: block;
}

.public-navbar .nav-link {
    color: rgba(255,255,255,0.72);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 13px !important;
    border-radius: 8px;
    transition: .15s;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.lang-switcher {
    display: flex;
    background: rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: .15s;
    letter-spacing: .04em;
}

.lang-btn:hover { color: #fff; }

.lang-btn.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 10px;
}

.navbar-toggler-icon { filter: invert(1); }

/* ── HERO ────────────────────────────────────────────── */
.public-hero {
    background: linear-gradient(135deg, #152238 0%, #243B6B 55%, #2a6db5 100%);
    color: #fff;
    padding: 88px 0 80px;
    position: relative;
    overflow: hidden;
}

.public-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.028'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(62,142,222,0.22);
    border: 1px solid rgba(62,142,222,0.42);
    color: #93c5fd;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 26px;
}

.public-hero h1 {
    font-size: clamp(28px, 4.5vw, 50px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.025em;
    margin-bottom: 22px;
}

.public-hero h1 .accent { color: #93c5fd; }

.hero-lead {
    font-size: 17px;
    color: rgba(255,255,255,0.68);
    max-width: 540px;
    line-height: 1.7;
    margin-bottom: 38px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-actions .btn-light {
    font-weight: 700;
    color: #152238;
    padding: 12px 24px;
}

.hero-actions .btn-outline-light {
    padding: 12px 24px;
    font-weight: 600;
}

.hero-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 38px;
    flex-wrap: wrap;
}

.hero-stat {
    flex: 1;
    min-width: 110px;
    padding-right: 32px;
    border-right: 1px solid rgba(255,255,255,0.1);
    margin-right: 32px;
}

.hero-stat:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

.hero-stat strong {
    display: block;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 900;
    line-height: 1;
    color: #fff;
    letter-spacing: -.02em;
}

.hero-stat span {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 6px;
    font-weight: 500;
}

/* ── HERO MAP MOCK ───────────────────────────────────── */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    padding-left: 24px;
}

.hero-map-mock {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    border-radius: 22px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.11);
    position: relative;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.35);
}

.hero-map-mock::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(148,163,184,.06) 1px, transparent 1px),
        linear-gradient(rgba(148,163,184,.06) 1px, transparent 1px);
    background-size: 26px 26px;
}

.mock-country {
    position: absolute;
    border: 2.5px solid;
    border-radius: 38% 62% 44% 56% / 48% 41% 59% 52%;
}

.mock-dot {
    position: absolute;
    border-radius: 50%;
    animation: pulse-dot 2.8s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.6; }
}

.map-legend {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(21,34,56,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 11px;
    color: rgba(255,255,255,0.82);
    line-height: 1.8;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

/* ── KPI SECTION ─────────────────────────────────────── */
.kpi-section {
    background: var(--mpi-bg);
    padding: 64px 0;
}

.public-kpi-card {
    background: #fff;
    border: 1px solid var(--mpi-border);
    border-radius: 18px;
    padding: 28px 22px;
    text-align: center;
    transition: .2s ease;
}

.public-kpi-card:hover {
    box-shadow: 0 12px 32px rgba(15,23,42,.08);
    transform: translateY(-2px);
}

.public-kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #eef6ff;
    color: #243B6B;
    font-size: 21px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
}

.public-kpi-card .kpi-value {
    font-size: 40px;
    font-weight: 900;
    color: #243B6B;
    line-height: 1;
    letter-spacing: -.03em;
}

.public-kpi-card .kpi-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
    margin-top: 8px;
}

.public-kpi-card .kpi-sub {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* ── MODULES SECTION ──────────────────────────────────── */
.modules-section {
    padding: 80px 0;
    background: #fff;
}

.section-eyebrow {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mpi-secondary);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -.025em;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.15;
}

.section-lead {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.7;
    max-width: 520px;
}

.module-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mpi-border);
    border-radius: 20px;
    padding: 28px 22px;
    text-decoration: none;
    color: #1f2937;
    background: #fff;
    transition: .2s ease;
    height: 100%;
}

.module-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 16px 40px rgba(15,23,42,.09);
    transform: translateY(-3px);
    color: #1f2937;
    text-decoration: none;
}

.module-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background: linear-gradient(135deg, #243B6B, #3E8EDE);
    color: #fff;
    font-size: 20px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.module-card h5 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 8px;
}

.module-card p {
    color: #6b7280;
    font-size: 13.5px;
    line-height: 1.65;
    flex-grow: 1;
    margin-bottom: 18px;
}

.card-arrow {
    color: var(--mpi-secondary);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

/* ── DEPRIVATION TABLE SECTION ────────────────────────── */
.deprivation-section {
    background: var(--mpi-bg);
    padding: 80px 0;
}

.deprivation-section .card {
    border: 1px solid var(--mpi-border);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    overflow: hidden;
}

.score-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-bar {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3E8EDE, #243B6B);
    flex-shrink: 0;
}

/* ── ABOUT SECTION ────────────────────────────────────── */
.about-section {
    padding: 88px 0;
    background: #fff;
}

.about-dimension-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--mpi-border);
    border-radius: 14px;
    background: #f8fafc;
    margin-bottom: 12px;
    transition: .2s;
}

.about-dimension-card:hover {
    box-shadow: 0 8px 20px rgba(15,23,42,.06);
    transform: translateX(4px);
}

.dimension-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 17px;
    color: #fff;
    flex-shrink: 0;
}

/* ── FOOTER ───────────────────────────────────────────── */
.public-footer {
    background: #152238;
    color: rgba(255,255,255,0.6);
    padding: 60px 0 0;
}

.footer-brand {
    color: #fff;
    font-weight: 800;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    text-decoration: none;
}

.footer-brand .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3E8EDE, #1a5fa8);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.footer-desc {
    font-size: 13.5px;
    line-height: 1.75;
    max-width: 270px;
    margin-bottom: 22px;
}

.footer-heading {
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 10px; }

.footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 14px;
    transition: .15s;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    margin-top: 52px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
}

.footer-bottom a { color: rgba(255,255,255,0.35); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,0.75); }

/* ── PAGE HEADER (inner pages) ───────────────────────── */
.page-header {
    background: linear-gradient(135deg, #152238 0%, #243B6B 100%);
    color: #fff;
    padding: 44px 0 40px;
}

.page-header .breadcrumb {
    margin-bottom: 10px;
    padding: 0;
    background: none;
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.3);
    content: "/";
}

.page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 13px;
    transition: .15s;
}

.page-header .breadcrumb-item a:hover { color: rgba(255,255,255,0.85); }

.page-header .breadcrumb-item.active {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
}

.page-header h1 {
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 900;
    letter-spacing: -.025em;
    margin: 4px 0 0;
    line-height: 1.1;
}

.page-header .page-lead {
    color: rgba(255,255,255,0.55);
    font-size: 15px;
    margin-top: 10px;
    max-width: 560px;
}

.page-header-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.page-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
}

/* ── REGION CARDS ─────────────────────────────────────── */
.region-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mpi-border);
    border-radius: 20px;
    padding: 24px;
    background: #fff;
    transition: .2s ease;
    text-decoration: none;
    color: #1f2937;
    height: 100%;
}

.region-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 14px 36px rgba(15,23,42,.09);
    transform: translateY(-2px);
    color: #1f2937;
}

.region-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #243B6B, #3E8EDE);
    color: #fff;
    font-size: 19px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}

.region-card h5 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.2;
}

.region-card .region-names {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 16px;
    line-height: 1.5;
}

.region-stats-row {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--mpi-border);
    padding-top: 16px;
    margin-top: auto;
}

.region-stat-cell {
    flex: 1;
    text-align: center;
    padding: 0 8px;
    border-right: 1px solid var(--mpi-border);
}

.region-stat-cell:first-child { padding-left: 0; }
.region-stat-cell:last-child  { padding-right: 0; border-right: none; }

.region-stat-cell .val {
    display: block;
    font-size: 20px;
    font-weight: 900;
    color: #111827;
    line-height: 1;
    letter-spacing: -.02em;
}

.region-stat-cell .lbl {
    display: block;
    font-size: 10.5px;
    color: #9ca3af;
    font-weight: 600;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.region-deprived-bar {
    height: 4px;
    border-radius: 999px;
    background: var(--mpi-border);
    margin-top: 12px;
    overflow: hidden;
}

.region-deprived-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.region-card-footer {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ── INNER PAGE TABLE ─────────────────────────────────── */
.public-table-card {
    border: 1px solid var(--mpi-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15,23,42,.04);
}

.public-table-card .table {
    margin-bottom: 0;
}

.public-table-card .table thead th {
    background: #f8fafc;
    padding: 13px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    font-weight: 700;
    border-bottom: 1px solid var(--mpi-border);
    white-space: nowrap;
}

.public-table-card .table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-color: #f3f4f6;
}

.pub-score-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.pub-score-bar {
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3E8EDE, #243B6B);
    flex-shrink: 0;
}

.class-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
}

.class-urban  { background: #ede9fe; color: #4f46e5; }
.class-rural  { background: #f0fdf4; color: #166534; }

/* ── EMPTY STATE ──────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
    color: #d1d5db;
}

.empty-state strong { color: #6b7280; }

/* ── UTILITY ──────────────────────────────────────────── */
.fw-800 { font-weight: 800 !important; }
.fw-900 { font-weight: 900 !important; }

/* ── MUNICIPALITIES FILTER BAR ────────────────────────── */
.muni-filter-bar {
    background: #fff;
    border: 1px solid var(--mpi-border);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}

.muni-filter-bar label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
    margin-bottom: 0;
    white-space: nowrap;
}

.muni-filter-bar .form-select {
    border-radius: 10px;
    border: 1px solid var(--mpi-border);
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    padding: 7px 32px 7px 12px;
    min-width: 180px;
    max-width: 220px;
}

.muni-filter-bar .form-select:focus {
    border-color: #3E8EDE;
    box-shadow: 0 0 0 3px rgba(62,142,222,.12);
}

.type-btn-group {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.type-btn {
    border: 1px solid var(--mpi-border);
    background: #fff;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: .15s;
}

.type-btn:hover { border-color: #3E8EDE; color: #3E8EDE; }

.type-btn.active {
    background: var(--mpi-dark);
    border-color: var(--mpi-dark);
    color: #fff;
}

.filter-summary {
    margin-left: auto;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
    white-space: nowrap;
}

/* ── INDICATOR ICON ROW ───────────────────────────────── */
.ind-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ind-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 10px;
}

.ind-deprived  { background: #fef2f2; color: #dc2626; }
.ind-ok        { background: #f0fdf4; color: #16a34a; }
.ind-unknown   { background: #f3f4f6; color: #d1d5db; }

/* ── DATATABLES PUBLIC OVERRIDE ───────────────────────── */
.pub-dt-wrapper .dataTables_wrapper {
    font-size: 13px;
}

.pub-dt-wrapper .dataTables_filter input {
    border: 1px solid var(--mpi-border);
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 13px;
    transition: .15s;
}

.pub-dt-wrapper .dataTables_filter input:focus {
    border-color: #3E8EDE;
    box-shadow: 0 0 0 3px rgba(62,142,222,.12);
    outline: none;
}

.pub-dt-wrapper .dataTables_length select {
    border: 1px solid var(--mpi-border);
    border-radius: 10px;
    padding: 4px 8px;
    font-size: 13px;
}

.pub-dt-wrapper table.dataTable thead th {
    background: #f8fafc;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    font-weight: 700;
    border-bottom: 1px solid var(--mpi-border) !important;
    padding: 13px 16px;
    white-space: nowrap;
}

.pub-dt-wrapper table.dataTable thead th:before,
.pub-dt-wrapper table.dataTable thead th:after {
    color: #d1d5db;
}

.pub-dt-wrapper table.dataTable tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    border-color: #f3f4f6;
}

.pub-dt-wrapper table.dataTable tbody tr:hover td {
    background: #f8fafc;
}

.pub-dt-wrapper .dataTables_info,
.pub-dt-wrapper .dataTables_paginate {
    margin-top: 12px;
    font-size: 12px;
}

.pub-dt-wrapper .page-link {
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.pub-dt-wrapper .page-item.active .page-link {
    background: var(--mpi-dark);
    border-color: var(--mpi-dark);
}

/* ── SETTLEMENT INDICATOR TABLE ───────────────────────── */
.settlement-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.settlement-indicator .si-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.si-deprived   { background: #ef4444; }
.si-ok         { background: #22c55e; }
.si-unknown    { background: #d1d5db; }

/* ── INDICATOR CARDS (list page) ─────────────────────── */
.indicator-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--mpi-border);
    border-radius: 20px;
    padding: 28px 26px;
    background: #fff;
    transition: .2s ease;
    text-decoration: none;
    color: #1f2937;
    height: 100%;
}

.indicator-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 14px 36px rgba(15,23,42,.09);
    transform: translateY(-2px);
    color: #1f2937;
}

.indicator-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 22px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.ind-dim-education   { background: #eff6ff; color: #1d4ed8; }
.ind-dim-health      { background: #fff1f2; color: #be123c; }
.ind-dim-environment { background: #f0fdf4; color: #15803d; }

.indicator-card h5 {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.3;
}

.indicator-card .ind-names {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 14px;
    line-height: 1.5;
}

.indicator-card .ind-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.ind-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    white-space: nowrap;
}

.ind-chip-dim {
    color: inherit;
}

.indicator-card .ind-stats {
    margin-top: auto;
    border-top: 1px solid var(--mpi-border);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.ind-stat-cell {
    text-align: center;
}

.ind-stat-cell .val {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: #111827;
    line-height: 1;
    letter-spacing: -.02em;
}

.ind-stat-cell .val.danger { color: #dc2626; }

.ind-stat-cell .lbl {
    display: block;
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ind-depr-bar-wrap {
    margin-top: 12px;
}

.ind-depr-bar {
    height: 4px;
    border-radius: 999px;
    background: var(--mpi-border);
    overflow: hidden;
}

.ind-depr-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

/* ── INDICATOR PROFILE ────────────────────────────────── */
.ind-profile-header-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    font-size: 26px;
    display: inline-grid;
    place-items: center;
    margin-right: 16px;
    vertical-align: middle;
    flex-shrink: 0;
}

.ind-region-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ind-region-bar-bg {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: var(--mpi-border);
    overflow: hidden;
}

.ind-region-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3E8EDE, #243B6B);
}

.ind-region-bar-fill.danger {
    background: linear-gradient(90deg, #f97316, #ef4444);
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 992px) {
    .public-hero          { padding: 60px 0 52px; }
    .hero-visual          { display: none; }
    .hero-stat            { min-width: 100px; padding-right: 22px; margin-right: 22px; }
    .modules-section      { padding: 60px 0; }
    .deprivation-section  { padding: 60px 0; }
    .about-section        { padding: 60px 0; }
}

@media (max-width: 768px) {
    .hero-actions .btn   { width: 100%; justify-content: center; }
    .hero-stat           { flex: 0 0 calc(50% - 10px); }
}

@media (max-width: 576px) {
    .public-hero         { padding: 44px 0 40px; }
    .hero-stats          { gap: 0; flex-direction: column; }
    .hero-stat           { flex: none; border-right: none; margin-right: 0; padding-right: 0;
                           border-bottom: 1px solid rgba(255,255,255,0.1);
                           padding-bottom: 18px; margin-bottom: 18px; }
    .hero-stat:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
    .kpi-section         { padding: 44px 0; }
    .public-kpi-card .kpi-value { font-size: 32px; }
    .footer-bottom       { flex-direction: column; text-align: center; }
}


/* ═══════════════════════════════════════════════════════════
   MAP PAGE
═══════════════════════════════════════════════════════════ */

.map-page-wrap {
    position: relative;
    height: calc(100vh - 64px);
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    background: #e8eef4;
}

/* ── control panel ───────────────────────────────────────── */
.map-control-panel {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 900;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.16);
    width: 260px;
    overflow: hidden;
    transition: width .2s;
}

.map-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--mpi-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.map-panel-toggle {
    margin-left: auto;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 7px;
    color: #fff;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 11px;
    transition: .15s;
}
.map-panel-toggle:hover { background: rgba(255,255,255,0.25); }

.map-panel-body { padding: 0 0 6px; }

.map-panel-section {
    padding: 12px 14px;
    border-bottom: 1px solid var(--mpi-border);
}
.map-panel-section:last-child { border-bottom: none; }

.map-panel-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ── layer buttons ────────────────────────────────────────── */
.map-layer-btns {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-layer-btn {
    background: none;
    border: 1.5px solid var(--mpi-border);
    border-radius: 9px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: .15s;
}
.map-layer-btn:hover {
    border-color: var(--mpi-secondary);
    color: var(--mpi-secondary);
    background: rgba(62,142,222,.06);
}
.map-layer-btn.active {
    background: var(--mpi-primary);
    border-color: var(--mpi-primary);
    color: #fff;
}
.map-layer-btn i { width: 14px; text-align: center; }

/* ── region select ────────────────────────────────────────── */
.map-select {
    width: 100%;
    border: 1.5px solid var(--mpi-border);
    border-radius: 9px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: .15s;
}
.map-select:focus { border-color: var(--mpi-secondary); }

/* ── stats row ────────────────────────────────────────────── */
.map-stats-row {
    display: flex;
    gap: 0;
    justify-content: space-between;
}
.map-stat { text-align: center; flex: 1; }
.map-stat:not(:last-child) { border-right: 1px solid var(--mpi-border); }
.map-stat-val {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--mpi-primary);
    line-height: 1;
    margin-bottom: 3px;
}
.map-stat.danger .map-stat-val { color: #dc2626; }
.map-stat-lbl {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
    font-weight: 600;
}

/* ── legend ───────────────────────────────────────────────── */
.map-legend-box {
    position: absolute;
    bottom: 36px;
    right: 16px;
    z-index: 900;
    background: rgba(255,255,255,0.96);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    min-width: 140px;
}
.map-legend-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9ca3af;
    font-weight: 700;
    margin-bottom: 8px;
}
.map-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.map-legend-item:last-child { margin-bottom: 0; }
.map-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1.5px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

/* ── loading overlay ──────────────────────────────────────── */
.map-loading {
    position: absolute;
    inset: 0;
    z-index: 1000;
    background: rgba(245,247,251,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.map-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--mpi-border);
    border-top-color: var(--mpi-secondary);
    border-radius: 50%;
    animation: map-spin .7s linear infinite;
}
@keyframes map-spin { to { transform: rotate(360deg); } }

/* ── leaflet popup overrides ──────────────────────────────── */
.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.16) !important;
    padding: 0 !important;
    overflow: hidden;
}
.leaflet-popup-content {
    margin: 0 !important;
    padding: 14px 16px !important;
    width: auto !important;
}
.leaflet-popup-tip-container { margin-top: -1px; }

/* ── cluster icon override ────────────────────────────────── */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
    transition: transform .3s ease-out, opacity .3s ease-in;
}

@media (max-width: 768px) {
    .map-control-panel { width: 220px; }
    .map-legend-box    { bottom: 80px; }
}


/* ═══════════════════════════════════════════════════════════
   EXPLORER PAGE
═══════════════════════════════════════════════════════════ */

/* ── filter bar ──────────────────────────────────────────── */
.expl-filter-bar {
    background: #fff;
    border-bottom: 1px solid var(--mpi-border);
    padding: 14px 0;
    position: sticky;
    top: 64px;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.expl-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.expl-filter-select {
    border: 1.5px solid var(--mpi-border);
    border-radius: 9px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: .15s;
    min-width: 150px;
}
.expl-filter-select:focus { border-color: var(--mpi-secondary); }

.expl-status-group { display: flex; gap: 4px; }
.expl-status-btn {
    border: 1.5px solid var(--mpi-border);
    border-radius: 9px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    background: #fff;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}
.expl-status-btn:hover { border-color: var(--mpi-secondary); color: var(--mpi-secondary); }
.expl-status-btn.active {
    background: var(--mpi-primary);
    border-color: var(--mpi-primary);
    color: #fff;
}
.expl-status-btn.dep.active { background: #dc2626; border-color: #dc2626; }
.expl-status-btn.ok.active  { background: #16a34a; border-color: #16a34a; }

.expl-filter-sep { flex: 1; }

.expl-clear-btn {
    border: 1.5px solid var(--mpi-border);
    border-radius: 9px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    background: #fff;
    cursor: pointer;
    transition: .15s;
}
.expl-clear-btn:hover { border-color: #dc2626; color: #dc2626; }

.expl-export-btn {
    border: 1.5px solid var(--mpi-primary);
    border-radius: 9px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--mpi-primary);
    background: #fff;
    cursor: pointer;
    transition: .15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.expl-export-btn:hover { background: var(--mpi-primary); color: #fff; }

/* ── stats bar ───────────────────────────────────────────── */
.expl-stats-bar {
    background: var(--mpi-bg);
    border-bottom: 1px solid var(--mpi-border);
    padding: 10px 0;
}
.expl-stats-row {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}
.expl-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    border-right: 1px solid var(--mpi-border);
    font-size: 13px;
}
.expl-stat:first-child { padding-left: 0; }
.expl-stat:last-child  { border-right: none; }
.expl-stat-val {
    font-weight: 800;
    color: var(--mpi-primary);
    font-size: 15px;
}
.expl-stat-val.danger { color: #dc2626; }
.expl-stat-lbl { color: #6b7280; }

/* ── indicator icon cells ────────────────────────────────── */
.xi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
}
.xi.dp { background: #fee2e2; color: #dc2626; }
.xi.ok { background: #dcfce7; color: #16a34a; }
.xi.nd { background: #f3f4f6; color: #9ca3af; }

/* ── score bar ───────────────────────────────────────────── */
.expl-score-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}
.expl-score-bar {
    flex: 1;
    height: 5px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}
.expl-score-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--mpi-secondary);
    transition: width .2s;
}
.expl-score-fill.danger { background: #ef4444; }
.expl-score-val {
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    min-width: 36px;
    text-align: right;
}

/* ── status badge ─────────────────────────────────────────── */
.expl-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.expl-badge.dep { background: #fee2e2; color: #dc2626; }
.expl-badge.ok  { background: #dcfce7; color: #16a34a; }
.expl-badge.nd  { background: #f3f4f6; color: #9ca3af; }

/* ── table overrides ─────────────────────────────────────── */
.expl-table-wrap { background: #fff; border-radius: 0; }
.expl-table-wrap .dataTables_wrapper { padding: 0; }
.expl-table-wrap .dataTables_filter  { display: none; }
.expl-table-wrap .dataTables_length  { display: none; }
.expl-table-wrap .dataTables_info    { font-size: 12px; color: #9ca3af; padding: 10px 0; }
.expl-table-wrap .dataTables_paginate { padding: 10px 0; }

#explTable thead th {
    background: #f8fafc;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    font-weight: 700;
    padding: 10px 10px;
    border-bottom: 2px solid var(--mpi-border);
    white-space: nowrap;
}
#explTable td {
    padding: 9px 10px;
    font-size: 13px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}
#explTable tbody tr:hover { background: #f8fafc; }
#explTable .expl-muni-link { color: var(--mpi-secondary); font-weight: 600; text-decoration: none; }
#explTable .expl-muni-link:hover { text-decoration: underline; }
#explTable .expl-name-mk { font-weight: 700; color: #1f2937; }
#explTable .expl-name-en { font-size: 11px; color: #9ca3af; display: block; margin-top: 1px; }

/* ── search box ───────────────────────────────────────────── */
#explSearch {
    border: 1.5px solid var(--mpi-border);
    border-radius: 9px;
    padding: 7px 12px 7px 36px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
    outline: none;
    transition: .15s;
    width: 200px;
}
#explSearch:focus { border-color: var(--mpi-secondary); width: 260px; }

@media (max-width: 900px) {
    .expl-filter-sep   { display: none; }
    #explSearch        { width: 100%; }
    .expl-filter-row   { gap: 8px; }
    .expl-filter-select { min-width: 0; flex: 1; }
}


/* ═══════════════════════════════════════════════════════════
   INFO PAGES  (About / Methodology / DataSources / Contact)
═══════════════════════════════════════════════════════════ */

.contact-input {
    border: 1.5px solid var(--mpi-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: #fff;
    transition: .15s;
    box-shadow: none;
}
.contact-input:focus {
    border-color: var(--mpi-secondary);
    box-shadow: 0 0 0 3px rgba(62,142,222,.12);
    outline: none;
}
.contact-input::placeholder { color: #9ca3af; }

.module-card:hover .card-arrow { gap: 10px; }

/* ── Fact sheet printing (municipality / region profiles) ──────────────── */
@media print {
    .public-navbar, .public-footer, .no-print,
    .map-control-panel, .expl-filter-bar, .lang-switcher,
    button, .btn { display: none !important; }
    body { background: #fff !important; }
    .page-header { background: #fff !important; color: #111 !important; }
    .page-header .breadcrumb, .page-header .breadcrumb-item a,
    .page-header h1, .page-header .page-lead { color: #111 !important; }
    .page-tag { border: 1px solid #d1d5db !important; color: #111 !important; background: #fff !important; }
    section { padding: 16px 0 !important; break-inside: avoid; }
    .card { break-inside: avoid; }
}
