.spm-page {
    --spm-ink: #0f172a;
    --spm-muted: #64748b;
    --spm-line: #e2e8f0;
    --spm-soft: #f8fafc;
    --spm-blue: #2563eb;
    --spm-green: #16a34a;
    --spm-purple: #7c3aed;
    --spm-amber: #d97706;
    --spm-sky: #0284c7;
    --spm-radius: 14px;
}

.spm-page .dashboard-header h4 {
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 600;
}

.spm-page .dashboard-header small.text-light {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.92rem;
    opacity: 0.92;
}

.spm-page .hero-tools-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.spm-page .hero-tools-group .hero-year-wrap {
    flex: 0 1 auto;
    min-width: 0;
}

.spm-page .hero-tools-group .hero-datetime {
    flex: 0 0 auto;
}

@media (max-width: 1199.98px) {
    .spm-page .hero-tools-group {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
    }

    .spm-page .hero-tools-group .hero-year-wrap,
    .spm-page .hero-tools-group .hero-datetime {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    .spm-page .dashboard-header.hero-banner .stat-highlight.hero-datetime {
        align-items: flex-end;
        min-width: 0;
        width: 100%;
    }

    .spm-page .dashboard-header.hero-banner .hero-datetime-content {
        align-items: flex-end;
        width: 100%;
        text-align: right;
    }
}

@media (max-width: 1023.98px) {
    .spm-page .dashboard-header h4 {
        font-size: 1.18rem;
    }
}

@media (max-width: 575.98px) {
    .spm-page .dashboard-header h4 {
        font-size: 1.1rem;
    }

    .spm-page .dashboard-header small.text-light {
        font-size: 0.8rem;
    }
}

.spm-page .spm-section-card {
    border: 1px solid var(--spm-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.spm-page .spm-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--spm-line);
}

.spm-page .spm-section-header--actions {
    justify-content: space-between;
}

.spm-page .spm-section-header--actions .card-title {
    flex: 1 1 auto;
    min-width: 0;
}

.spm-page .spm-section-header--actions .spm-btn-export {
    flex-shrink: 0;
    margin-left: auto;
}

.spm-page .spm-section-header .card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--spm-ink);
    line-height: 1.35;
}

.spm-page .spm-section-body {
    padding: 1rem 1.1rem 1.25rem;
    background:
        radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.05), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.spm-section-body[aria-busy="true"]:empty {
    min-height: 280px;
    border-radius: 12px;
    background:
        linear-gradient(90deg, rgba(241, 245, 249, 0.9) 0%, rgba(248, 250, 252, 1) 48%, rgba(241, 245, 249, 0.9) 100%);
    background-size: 200% 100%;
    animation: spm-skel-shimmer 1.4s ease-in-out infinite;
}

.spm-panel-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: var(--spm-muted);
    font-size: 0.95rem;
}

.spm-panel-state.is-error {
    color: #b91c1c;
}

.spm-model-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--spm-line);
    border-radius: var(--spm-radius);
    background: #fff;
}

.spm-model-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1280px;
}

.spm-model-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
    vertical-align: bottom;
    padding: 0.7rem 0.45rem;
    border-bottom: 1px solid var(--spm-line);
    white-space: normal;
    line-height: 1.3;
    min-width: 5.5rem;
}

.spm-model-table thead th.spm-th-model {
    text-align: center;
    width: 13rem;
    min-width: 12rem;
    position: sticky;
    left: 0;
    z-index: 2;
    background: #f1f5f9;
}

.spm-model-table thead th .spm-th-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 999px;
    background: #cbd5e1;
    color: #1e293b;
    font-size: 0.65rem;
    vertical-align: middle;
    pointer-events: none;
}

.spm-model-table thead th.spm-tip-col:hover .spm-th-tip,
.spm-model-table thead th.spm-tip-col:focus .spm-th-tip {
    background: #2563eb;
    color: #fff;
}

.spm-model-table thead th.spm-tip-col,
.spm-model-table tbody td.spm-tip-col {
    cursor: help;
}

.spm-model-table thead th.spm-tip-col:hover,
.spm-model-table thead th.spm-tip-col:focus {
    background: rgba(37, 99, 235, 0.1);
    outline: none;
}

.spm-float-tip {
    position: fixed;
    z-index: 20000;
    width: 300px;
    max-width: calc(100vw - 24px);
    padding: 14px 16px;
    border-radius: 14px;
    background: #0f172a;
    color: #e2e8f0;
    text-align: left;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
    line-height: 1.45;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.spm-float-tip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.spm-float-tip[hidden] {
    display: none !important;
}

.spm-float-tip__title {
    font-size: 0.84rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.spm-float-tip__desc {
    font-size: 0.74rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.spm-float-tip__section {
    display: grid;
    gap: 8px;
    margin-bottom: 8px;
}

.spm-float-tip__item {
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(148, 163, 184, 0.14);
}

.spm-float-tip__item strong {
    display: block;
    font-size: 0.74rem;
    color: #fff;
    margin-bottom: 2px;
}

.spm-float-tip__item em {
    display: block;
    font-style: normal;
    font-size: 0.7rem;
    color: #94a3b8;
}

.spm-float-tip__foot {
    font-size: 0.7rem;
    color: #93c5fd;
}

.spm-model-table tbody td {
    padding: 0.7rem 0.45rem;
    border-bottom: 1px solid #eef2f7;
    text-align: center;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
    color: var(--spm-ink);
    font-weight: 600;
    font-size: 0.84rem;
}

.spm-model-table tbody tr:last-child td {
    border-bottom: 0;
}

.spm-model-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    text-align: left;
}

.spm-model-table .spm-model-banner {
    display: block;
    width: 100%;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    color: #fff !important;
    font-weight: 700;
    text-align: left;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
}

.spm-model-table .spm-row-local .spm-model-banner {
    background: linear-gradient(90deg, #4ade80 0%, #16a34a 100%);
}

.spm-model-table .spm-row-propoor .spm-model-banner {
    background: linear-gradient(90deg, #fbbf24 0%, #d97706 100%);
}

.spm-model-table .spm-row-safety .spm-model-banner {
    background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
}

.spm-model-table .spm-row-disaster .spm-model-banner {
    background: linear-gradient(90deg, #a78bfa 0%, #7c3aed 100%);
}

.spm-model-table .spm-col-income {
    background: rgba(37, 99, 235, 0.04);
}

.spm-model-table .spm-col-income-total {
    background: rgba(14, 165, 233, 0.06);
}

.spm-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.spm-kpi-card {
    position: relative;
    border-radius: 14px;
    padding: 14px 14px 14px 16px;
    color: #fff;
    min-height: 118px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.spm-kpi-card--clickable {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.spm-kpi-card--clickable:hover,
.spm-kpi-card--clickable:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
    outline: none;
}

.spm-kpi-card__hint {
    display: block;
    margin-top: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.88;
}

.spm-kpi-card::after {
    content: '';
    position: absolute;
    right: -18px;
    bottom: -24px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.spm-kpi-card--blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.spm-kpi-card--green {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
}

.spm-kpi-card--purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.spm-kpi-card--amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.spm-kpi-card__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.95;
    margin-bottom: 8px;
}

.spm-kpi-card__place {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
}

.spm-kpi-card__value {
    display: block;
    margin-top: 6px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.spm-kpi-card__note {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    opacity: 0.92;
    line-height: 1.35;
}

.spm-kpi-card__icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    z-index: 1;
}

.spm-mid-grid {
    display: none;
}

.spm-compare-card {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
    gap: 0;
    margin-bottom: 14px;
    border: 1px solid var(--spm-line);
    border-radius: var(--spm-radius);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.spm-compare-card__chart {
    padding: 16px 18px 12px;
    min-width: 0;
}

.spm-panel {
    border: 1px solid var(--spm-line);
    border-radius: var(--spm-radius);
    background: #fff;
    padding: 14px;
    min-height: 320px;
}

.spm-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.spm-panel__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--spm-ink);
}

.spm-panel__unit {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--spm-muted);
}

.spm-metric-control {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 220px;
    padding: 10px 12px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.spm-metric-control__head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 0.01em;
}

.spm-metric-control__head i {
    font-size: 0.75rem;
}

.spm-metric-wrap {
    display: none;
}

.spm-metric-label {
    display: none;
}

.spm-metric-select {
    width: 100%;
    min-width: 0;
    height: 36px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0 10px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.spm-metric-select:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.spm-chart-host {
    width: 100%;
    height: 360px;
    font-family: Kanit, sans-serif;
}

.spm-insight-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px 16px;
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.08), transparent 42%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-left: 1px solid var(--spm-line);
    min-height: 100%;
}

.spm-insight-panel__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 2px;
}

.spm-insight-panel__badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.28);
    flex-shrink: 0;
}

.spm-insight-panel__title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--spm-ink);
}

.spm-insight-panel__sub {
    margin: 3px 0 0;
    font-size: 0.74rem;
    color: var(--spm-muted);
}

.spm-insight-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
    flex: 1;
}

.spm-insight-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.spm-insight-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.88rem;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.spm-insight-item__icon--green { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.spm-insight-item__icon--amber { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.spm-insight-item__icon--purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }

.spm-insight-item__body {
    min-width: 0;
}

.spm-insight-item__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
}

.spm-insight-item__text {
    margin: 0;
    font-size: 0.84rem;
    color: #1e293b;
    line-height: 1.5;
    font-weight: 600;
}

.spm-insight-more {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    margin-top: auto;
    padding: 12px 14px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.spm-insight-more i {
    color: #2563eb;
}

.spm-insight-more:hover {
    background: #f8fafc;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.spm-table-panel {
    border: 1px solid var(--spm-line);
    border-radius: var(--spm-radius);
    background: #fff;
    overflow: hidden;
}

.spm-table-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--spm-line);
    background: #f8fafc;
}

.spm-table-panel__head .spm-btn-export {
    flex-shrink: 0;
    margin-left: auto;
}

.spm-table-panel__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--spm-ink);
}

.spm-table-scroll {
    overflow-x: auto;
}

.spm-overview-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1100px;
}

.spm-overview-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    vertical-align: bottom;
    padding: 0.65rem 0.4rem;
    border-bottom: 1px solid var(--spm-line);
    white-space: normal;
    line-height: 1.3;
    min-width: 5.2rem;
}

.spm-overview-table thead th .spm-th-main {
    display: block;
}

.spm-overview-table thead th .spm-th-unit {
    display: block;
    margin-top: 2px;
    font-size: 0.66rem;
    font-weight: 600;
    color: #64748b;
}

.spm-overview-table tbody td {
    padding: 0.65rem 0.45rem;
    border-bottom: 1px solid #eef2f7;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-size: 0.84rem;
    color: var(--spm-ink);
}

.spm-overview-table tbody tr:last-child td {
    border-bottom: 0;
}

.spm-overview-table .spm-rank {
    font-weight: 800;
    color: #475569;
}

.spm-overview-table .spm-prov-name {
    text-align: left;
    font-weight: 700;
    white-space: nowrap;
}

.spm-overview-table .is-active-metric {
    background: rgba(37, 99, 235, 0.08);
    font-weight: 800;
    color: #1d4ed8;
}

.spm-table-panel__foot {
    display: flex;
    justify-content: flex-end;
    padding: 10px 14px 12px;
    border-top: 1px solid var(--spm-line);
    background: #fff;
}

.spm-btn-more {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1e3a5f;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.spm-btn-more:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.spm-btn-more.is-expanded {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.spm-btn-export {
    border: 1px solid #86efac;
    background: #f0fdf4;
    color: #166534;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.spm-btn-export:hover {
    background: #dcfce7;
    border-color: #4ade80;
}

.spm-btn-export:disabled {
    opacity: 0.75;
    cursor: wait;
}

.spm-table-panel__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.spm-model-table tbody td.spm-drill-cell,
.spm-overview-table tbody td.spm-drill-cell {
    cursor: pointer;
    transition: background 0.15s ease;
}

.spm-model-table tbody td.spm-drill-cell:hover,
.spm-overview-table tbody td.spm-drill-cell:hover {
    background: rgba(37, 99, 235, 0.1);
}

.spm-model-table tbody td.spm-drill-cell .spm-drill-value,
.spm-overview-table tbody td.spm-drill-cell .spm-drill-value {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}

.spm-income-note,
.spm-income-note--warn {
    display: none;
}

.spm-a17-pending {
    color: #94a3b8 !important;
    font-weight: 700;
}

.spm-drill-modal .modal-header {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.spm-drill-modal .modal-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.spm-drill-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.spm-drill-kpi {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    min-height: 64px;
}

.spm-drill-kpi__label {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 4px;
}

.spm-drill-kpi__value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.spm-drill-kpi__value small {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.spm-drill-context {
    margin-bottom: 10px;
    color: #475569;
    font-size: 0.82rem;
}

.spm-drill-align-note {
    margin: -4px 0 12px;
    color: #64748b;
    font-size: 0.78rem;
}

.spm-drill-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.spm-drill-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 640px;
}

.spm-drill-table thead th {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    padding: 0.55rem 0.45rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.spm-drill-table tbody td {
    padding: 0.55rem 0.45rem;
    border-bottom: 1px solid #eef2f7;
    text-align: center;
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
}

.spm-drill-table tbody td.spm-drill-area {
    text-align: left;
    font-weight: 700;
}

.spm-name-list {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.spm-name-list__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.spm-name-list__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
}

.spm-name-list__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.spm-name-list__search {
    height: 34px;
    min-width: 180px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 0.82rem;
}

.spm-name-list__meta {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 0.8rem;
}

.spm-name-list__pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.spm-name-list__pager .page-info {
    font-size: 0.8rem;
    color: #64748b;
    margin-right: 8px;
}

.spm-name-list__note {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 0.85rem;
}

.spm-drill-action-col {
    white-space: nowrap;
    text-align: center;
}

.spm-drill-action-col .spm-btn-more {
    padding: 4px 10px;
    font-size: 0.78rem;
}

@media (max-width: 1199.98px) {
    .spm-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .spm-drill-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .spm-compare-card {
        grid-template-columns: 1fr;
    }

    .spm-insight-panel {
        border-left: 0;
        border-top: 1px solid var(--spm-line);
    }
}

@media (max-width: 767.98px) {
    .spm-kpi-grid {
        grid-template-columns: 1fr;
    }

    .spm-panel__head {
        flex-direction: column;
        align-items: stretch;
    }

    .spm-metric-control {
        width: 100%;
        min-width: 0;
    }

    .spm-metric-select {
        width: 100%;
    }

    .spm-chart-host {
        height: 300px;
    }
}

@keyframes spm-skel-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.spm-skel {
    width: 100%;
    min-height: 180px;
}

.spm-skel-bone {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 48%, #e2e8f0 100%);
    background-size: 200% 100%;
    animation: spm-skel-shimmer 1.4s ease-in-out infinite;
    animation-delay: var(--skel-delay, 0s);
}

.spm-skel-model-wrap {
    overflow-x: auto;
    border: 1px solid var(--spm-line);
    border-radius: var(--spm-radius);
    background: #fff;
}

.spm-skel-model-table {
    min-width: 1280px;
    padding: 2px 0;
}

.spm-skel-model-row {
    display: grid;
    grid-template-columns: 13rem repeat(12, minmax(5.5rem, 1fr));
    gap: 0.45rem;
    align-items: center;
    padding: 0.62rem 0.45rem;
    border-bottom: 1px solid #eef2f7;
}

.spm-skel-model-row:last-child {
    border-bottom: 0;
}

.spm-skel-model-row--head {
    background: #f1f5f9;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.spm-skel-bone--model-head {
    height: 14px;
    width: 72%;
    margin: 0 auto;
}

.spm-skel-bone--col-head {
    height: 28px;
    width: 78%;
    margin: 0 auto;
    border-radius: 6px;
}

.spm-skel-bone--banner {
    height: 38px;
    width: 92%;
    border-radius: 10px;
}

.spm-skel-model-row[data-tone="green"] .spm-skel-bone--banner {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.22) 0%, rgba(34, 197, 94, 0.38) 48%, rgba(34, 197, 94, 0.22) 100%);
    background-size: 200% 100%;
}

.spm-skel-model-row[data-tone="amber"] .spm-skel-bone--banner {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.22) 0%, rgba(245, 158, 11, 0.38) 48%, rgba(245, 158, 11, 0.22) 100%);
    background-size: 200% 100%;
}

.spm-skel-model-row[data-tone="sky"] .spm-skel-bone--banner {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.22) 0%, rgba(56, 189, 248, 0.38) 48%, rgba(56, 189, 248, 0.22) 100%);
    background-size: 200% 100%;
}

.spm-skel-model-row[data-tone="purple"] .spm-skel-bone--banner {
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.22) 0%, rgba(167, 139, 250, 0.38) 48%, rgba(167, 139, 250, 0.22) 100%);
    background-size: 200% 100%;
}

.spm-skel-bone--num {
    height: 14px;
    width: var(--skel-w, 50%);
    margin: 0 auto;
}

.spm-skel-kpi-grid {
    margin-bottom: 14px;
}

.spm-skel-kpi-card {
    position: relative;
    min-height: 118px;
    border-radius: 14px;
    padding: 14px 14px 14px 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.spm-skel-kpi-card::after {
    content: '';
    position: absolute;
    right: -18px;
    bottom: -24px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.spm-skel-kpi-card--blue { background: linear-gradient(135deg, rgba(59, 130, 246, 0.92) 0%, rgba(29, 78, 216, 0.92) 100%); }
.spm-skel-kpi-card--green { background: linear-gradient(135deg, rgba(34, 197, 94, 0.92) 0%, rgba(21, 128, 61, 0.92) 100%); }
.spm-skel-kpi-card--purple { background: linear-gradient(135deg, rgba(139, 92, 246, 0.92) 0%, rgba(109, 40, 217, 0.92) 100%); }
.spm-skel-kpi-card--amber { background: linear-gradient(135deg, rgba(245, 158, 11, 0.92) 0%, rgba(217, 119, 6, 0.92) 100%); }

.spm-skel-kpi-card .spm-skel-bone {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.22) 100%);
    background-size: 200% 100%;
}

.spm-skel-bone--kpi-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.spm-skel-bone--kpi-label {
    height: 10px;
    width: 58%;
    margin-bottom: 12px;
}

.spm-skel-bone--kpi-place {
    height: 16px;
    width: 76%;
    margin-bottom: 10px;
}

.spm-skel-bone--kpi-value {
    height: 22px;
    width: 48%;
}

.spm-skel-compare {
    margin-bottom: 14px;
}

.spm-skel-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.spm-skel-panel-head__copy {
    display: grid;
    gap: 8px;
    flex: 1 1 auto;
}

.spm-skel-bone--panel-title {
    height: 16px;
    width: min(320px, 72%);
}

.spm-skel-bone--panel-unit {
    height: 10px;
    width: 120px;
}

.spm-skel-metric-control {
    display: grid;
    gap: 8px;
    min-width: 220px;
    padding: 10px 12px;
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.spm-skel-bone--metric-label {
    height: 10px;
    width: 68%;
}

.spm-skel-bone--metric-select {
    height: 36px;
    width: 100%;
    border-radius: 9px;
}

.spm-skel-chart {
    position: relative;
    min-height: 360px;
    padding: 8px 4px 28px 0;
}

.spm-skel-chart__grid {
    position: absolute;
    inset: 8px 88px 36px 148px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    pointer-events: none;
}

.spm-skel-bone--grid-line {
    height: 100%;
    width: 1px;
    justify-self: end;
    border-radius: 0;
    opacity: 0.55;
}

.spm-skel-chart__rows {
    display: grid;
    gap: 14px;
    padding: 8px 0 0;
}

.spm-skel-chart-row {
    display: grid;
    grid-template-columns: 22px 120px minmax(0, 1fr) 72px;
    gap: 10px;
    align-items: center;
}

.spm-skel-bone--rank {
    width: 22px;
    height: 22px;
    border-radius: 999px;
}

.spm-skel-bone--prov {
    height: 12px;
    width: 82%;
}

.spm-skel-bone--bar-track {
    position: relative;
    height: 16px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.65);
    overflow: hidden;
    padding: 0;
}

.spm-skel-bone--bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--bar-w, 50%);
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.35) 0%, rgba(37, 99, 235, 0.62) 48%, rgba(37, 99, 235, 0.35) 100%);
    background-size: 200% 100%;
}

.spm-skel-bone--bar-val {
    height: 12px;
    width: 72%;
    margin-left: auto;
}

.spm-skel-chart__axis {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 88px 0 148px;
}

.spm-skel-bone--axis-tick {
    height: 10px;
    width: 36px;
}

.spm-skel-insight {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px 16px;
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.08), transparent 42%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-left: 1px solid var(--spm-line);
    min-height: 100%;
}

.spm-skel-insight__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.spm-skel-bone--insight-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    flex-shrink: 0;
}

.spm-skel-insight__titles {
    display: grid;
    gap: 8px;
    flex: 1 1 auto;
}

.spm-skel-bone--insight-title {
    height: 14px;
    width: 58%;
}

.spm-skel-bone--insight-sub {
    height: 10px;
    width: 76%;
}

.spm-skel-insight__list {
    display: grid;
    gap: 10px;
}

.spm-skel-insight-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.spm-skel-bone--insight-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.spm-skel-insight-item[data-tone="green"] .spm-skel-bone--insight-icon {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.42) 48%, rgba(34, 197, 94, 0.2) 100%);
    background-size: 200% 100%;
}

.spm-skel-insight-item[data-tone="amber"] .spm-skel-bone--insight-icon {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.42) 48%, rgba(245, 158, 11, 0.2) 100%);
    background-size: 200% 100%;
}

.spm-skel-insight-item[data-tone="purple"] .spm-skel-bone--insight-icon {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.42) 48%, rgba(139, 92, 246, 0.2) 100%);
    background-size: 200% 100%;
}

.spm-skel-insight-copy {
    display: grid;
    gap: 8px;
}

.spm-skel-bone--insight-label {
    height: 10px;
    width: 42%;
}

.spm-skel-bone--insight-line {
    height: 11px;
    width: 96%;
}

.spm-skel-bone--w70 {
    width: 70%;
}

.spm-skel-bone--insight-more {
    height: 38px;
    width: 100%;
    border-radius: 12px;
}

.spm-skel-table-panel {
    border: 1px solid var(--spm-line);
    border-radius: var(--spm-radius);
    background: #fff;
    overflow: hidden;
}

.spm-skel-table-panel .spm-table-panel__head {
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--spm-line);
}

.spm-skel-bone--table-title {
    height: 14px;
    width: min(280px, 55%);
}

.spm-skel-overview-table {
    overflow-x: auto;
    min-width: 100%;
}

.spm-skel-overview-row {
    display: grid;
    grid-template-columns: 3.2rem 10rem repeat(10, minmax(5.2rem, 1fr));
    gap: 0.45rem;
    align-items: center;
    padding: 0.62rem 0.45rem;
    border-bottom: 1px solid #eef2f7;
    min-width: 1100px;
}

.spm-skel-overview-row--head {
    background: #f1f5f9;
}

.spm-skel-bone--ov-rank {
    height: 12px;
    width: 18px;
    margin: 0 auto;
}

.spm-skel-bone--ov-name {
    height: 12px;
    width: 72%;
}

.spm-skel-bone--ov-col {
    height: 22px;
    width: 80%;
    margin: 0 auto;
}

.spm-skel-bone--ov-cell {
    height: 12px;
    width: 62%;
    margin: 0 auto;
}

.spm-skel-table-foot {
    display: flex;
    justify-content: flex-end;
    padding: 10px 14px 12px;
    border-top: 1px solid #eef2f7;
}

.spm-skel-bone--table-btn {
    height: 34px;
    width: 132px;
    border-radius: 10px;
}

.spm-skel--drill {
    min-height: 320px;
}

.spm-skel-drill-context {
    margin-bottom: 12px;
}

.spm-skel-bone--drill-line {
    height: 12px;
    width: min(640px, 88%);
}

.spm-skel-drill-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.spm-skel-drill-kpi {
    padding: 12px;
    border: 1px solid var(--spm-line);
    border-radius: 12px;
    background: #f8fafc;
    display: grid;
    gap: 8px;
}

.spm-skel-bone--drill-kpi-label {
    height: 10px;
    width: 58%;
}

.spm-skel-bone--drill-kpi-val {
    height: 18px;
    width: 72%;
}

.spm-skel-drill-table {
    border: 1px solid var(--spm-line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.spm-skel-drill-row {
    display: grid;
    grid-template-columns: 2.4rem repeat(6, minmax(0, 1fr));
    gap: 0.45rem;
    align-items: center;
    padding: 0.62rem 0.55rem;
    border-bottom: 1px solid #eef2f7;
}

.spm-skel-drill-row--head {
    background: #f1f5f9;
}

.spm-skel-bone--drill-cell {
    height: 12px;
    width: 78%;
    margin: 0 auto;
}

@media (max-width: 1199.98px) {
    .spm-skel-drill-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .spm-skel-insight {
        border-left: 0;
        border-top: 1px solid var(--spm-line);
    }
}

@media (max-width: 767.98px) {
    .spm-skel-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .spm-skel-metric-control {
        min-width: 0;
        width: 100%;
    }

    .spm-skel-chart {
        min-height: 300px;
    }

    .spm-skel-chart-row {
        grid-template-columns: 22px 92px minmax(0, 1fr) 60px;
    }

    .spm-skel-chart__grid {
        inset: 8px 60px 36px 120px;
    }

    .spm-skel-chart__axis {
        margin: 10px 60px 0 120px;
    }

    .spm-skel-drill-kpis {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spm-skel-bone,
    .spm-skel-model-row[data-tone] .spm-skel-bone--banner,
    .spm-skel-insight-item[data-tone] .spm-skel-bone--insight-icon,
    .spm-skel-bone--bar-fill {
        animation: none;
        background: #e2e8f0;
    }
}
