body.analytics-page {
    background:
        radial-gradient(circle at top left, rgba(236, 162, 69, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(79, 154, 82, 0.16), transparent 24%),
        linear-gradient(180deg, #f7f2e9 0%, #eef4f3 45%, #f8f5ef 100%);
    color: #213665;
}

body.analytics-page #page {
    min-height: 100vh;
}

.analytics-shell {
    padding: 2rem 0 3.5rem;
}

.analytics-shell .container-fluid,
.analytics-shell .container {
    position: relative;
}

.analytics-hero {
    position: relative;
    overflow: hidden;
    margin: 0 auto 2rem;
    padding: 2rem 2.2rem;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(33, 54, 101, 0.96), rgba(180, 50, 58, 0.92));
    color: #fff;
    box-shadow: 0 30px 60px rgba(33, 54, 101, 0.18);
}

.analytics-hero::before,
.analytics-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.analytics-hero::before {
    width: 240px;
    height: 240px;
    top: -80px;
    right: -40px;
    background: rgba(236, 162, 69, 0.25);
}

.analytics-hero::after {
    width: 180px;
    height: 180px;
    bottom: -70px;
    left: -30px;
    background: rgba(79, 154, 82, 0.18);
}

.analytics-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.analytics-hero h1,
.analytics-hero h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(1.9rem, 2.5vw, 2.9rem);
    font-weight: 800;
    line-height: 1.08;
    color: #fff;
}

.analytics-hero p {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0.9rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.65;
}

.analytics-hero-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.analytics-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
}

.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin: 0 0 1.5rem;
}

.analytics-kpi,
.stat-card,
.sdg-section,
.domain-card,
.analytics-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(33, 54, 101, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 55px rgba(28, 43, 77, 0.10);
    backdrop-filter: blur(12px);
}

.analytics-kpi {
    padding: 1.4rem 1.5rem;
}

.analytics-kpi-label {
    display: block;
    margin-bottom: 0.55rem;
    color: rgba(33, 54, 101, 0.72);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.analytics-kpi-value,
.score-highlight {
    margin: 0;
    font-size: clamp(1.8rem, 2.4vw, 2.6rem);
    font-weight: 800;
    color: #213665;
    line-height: 1;
}

.analytics-kpi-note {
    margin-top: 0.65rem;
    color: #63708a;
    font-size: 0.92rem;
}

.insights-container {
    padding: 0 1rem;
}

.stat-card {
    height: 100%;
    padding: 1.5rem 1.5rem 1.35rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.stat-card h4,
.sdg-section h4,
.status-section h4 {
    margin-bottom: 1rem;
    color: #213665;
    font-size: 1.08rem;
    font-weight: 800;
}

.chart-container {
    height: 320px;
    margin-bottom: 1rem;
}

.export-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.export-toolbar .btn {
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    border-width: 1px;
    font-weight: 700;
}

.sdg-section {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sdg-buttons {
    gap: 0.85rem;
}

.sdg-button {
    position: relative;
    padding: 0.65rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 245, 249, 0.92));
    box-shadow: inset 0 0 0 1px rgba(33, 54, 101, 0.06);
}

.sdg-button.active {
    box-shadow: inset 0 0 0 2px rgba(180, 50, 58, 0.28), 0 18px 38px rgba(33, 54, 101, 0.12);
    transform: translateY(-2px);
}

.sdg-button img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
}

.sdg-score {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(33, 54, 101, 0.08), rgba(236, 162, 69, 0.14));
    font-size: 1.02rem;
    color: #213665;
}

.progress-bar {
    background-color: rgba(33, 54, 101, 0.12);
}

.progress-bar-inner {
    background: linear-gradient(90deg, #4f9a52, #eca245);
}

.table {
    margin-bottom: 0;
    color: #33415c;
}

.table thead th {
    border-top: none;
    border-bottom: 1px solid rgba(33, 54, 101, 0.12);
    color: rgba(33, 54, 101, 0.68);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.table td,
.table th {
    padding: 0.95rem 0.75rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: rgba(33, 54, 101, 0.035);
}

.page-wrapper {
    padding: 0 1rem 2.5rem;
}

.domains-wrapper {
    max-width: 1320px;
    padding: 0;
}

.domain-card {
    margin-bottom: 1.5rem;
}

.domain-header {
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid rgba(33, 54, 101, 0.08);
    background: linear-gradient(180deg, rgba(247, 250, 252, 0.98), rgba(238, 244, 243, 0.96));
}

.domain-header:hover {
    background: linear-gradient(180deg, rgba(244, 247, 252, 1), rgba(232, 241, 240, 1));
}

.domain-header h3 {
    color: #213665;
    font-size: 1.16rem;
    font-weight: 800;
}

.domain-icon {
    color: #b4323a;
}

.domain-content {
    padding: 1.5rem;
}

.status-section {
    height: 100%;
    padding: 1.15rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 251, 0.98));
    box-shadow: inset 0 0 0 1px rgba(33, 54, 101, 0.06);
}

.success-section {
    border: none;
    box-shadow: inset 0 0 0 1px rgba(79, 154, 82, 0.24);
}

.failure-section {
    border: none;
    box-shadow: inset 0 0 0 1px rgba(236, 162, 69, 0.32);
}

.critical-section {
    border: none;
    box-shadow: inset 0 0 0 1px rgba(180, 50, 58, 0.22);
}

.forms-list {
    max-height: 500px;
    padding-right: 0.15rem;
}

.form-item {
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    margin-bottom: 0.7rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 1), rgba(243, 246, 249, 1));
    box-shadow: inset 0 0 0 1px rgba(33, 54, 101, 0.06);
}

.form-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(33, 54, 101, 0.10);
}

.form-item h5 {
    font-size: 0.94rem;
    line-height: 1.5;
}

.form-number {
    min-width: 62px;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: #213665;
    font-weight: 800;
}

.score-badge {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-weight: 800;
}

.score-badge.success {
    background: rgba(79, 154, 82, 0.14);
    color: #2f7a35;
}

.score-badge.failure {
    background: rgba(236, 162, 69, 0.18);
    color: #9a5b06;
}

.score-badge.critical {
    background: rgba(180, 50, 58, 0.14);
    color: #9b2730;
}

.no-data {
    padding: 1.2rem;
    border-radius: 16px;
    background: rgba(33, 54, 101, 0.04);
}

.city-comparison-table {
    width: 100%;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
}

.city-comparison-table th,
.city-comparison-table td {
    padding: 0.95rem 1rem;
    border: none;
    border-bottom: 1px solid rgba(33, 54, 101, 0.08);
}

.city-comparison-table th {
    background: rgba(33, 54, 101, 0.05);
    color: #213665;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.city-comparison-table tbody tr:hover {
    background: rgba(33, 54, 101, 0.04);
}

.star-rating {
    white-space: nowrap;
}

.analytics-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.analytics-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991.98px) {
    .analytics-shell {
        padding-top: 1.25rem;
    }

    .analytics-hero {
        padding: 1.6rem 1.3rem;
        border-radius: 24px;
    }

    .page-wrapper,
    .insights-container {
        padding-left: 0.4rem;
        padding-right: 0.4rem;
    }
}

@media (max-width: 767.98px) {
    .analytics-kpi-grid {
        grid-template-columns: 1fr;
    }

    .domain-header-content,
    .domain-score,
    .analytics-hero-meta {
        align-items: flex-start;
    }

    .domain-score {
        flex-direction: column;
        width: 100%;
        gap: 0.6rem;
    }

    .progress {
        width: 100%;
    }

    .chart-container {
        height: 280px;
    }

    .city-comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
