.tooltip.year-tabs-tooltip {
    pointer-events: none;
    opacity: 0;
    transition: opacity .1s ease;
}
.tooltip.year-tabs-tooltip.show {
    opacity: 1 !important;
}
.tooltip.year-tabs-tooltip .tooltip-inner {
    background: linear-gradient(145deg, rgba(11, 18, 32, .94), rgba(15, 23, 42, .9));
    color: #e2e8f0;
    border: 1px solid rgba(96, 165, 250, .42);
    box-shadow: 0 14px 28px rgba(2, 6, 23, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
    border-radius: 11px;
    padding: 8px 12px;
    font-size: .79rem;
    font-weight: 520;
    letter-spacing: .15px;
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    max-width: 280px;
    text-align: center;
    line-height: 1.25;
}
.tooltip.year-tabs-tooltip .arrow {
    display: none !important;
}

.report-year-bar,
.rpt-year-bar {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
    padding: 12px 0;
}
.report-year-btn,
.report-year-bar .btn,
.rpt-year-bar .btn {
    border: 1.5px solid rgba(255,255,255,.45);
    color: #fff;
    background: transparent;
    font-size: .82rem;
    font-weight: 500;
    border-radius: 20px;
    padding: 4px 16px;
    margin: 3px 4px;
    transition: all .2s;
}
.report-year-btn:hover,
.report-year-bar .btn:hover,
.rpt-year-bar .btn:hover { background: rgba(255,255,255,.18); }
.report-year-btn.is-active,
.report-year-bar .btn.active,
.rpt-year-bar .btn.active {
    background: #fff;
    color: #1e3a5f;
    font-weight: 700;
    border-color: #fff;
}
.report-dimension-bar,
.dim-bar {
    padding: 10px 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
body.theme-darker .report-year-bar,
body.theme-darker .rpt-year-bar {
    background: linear-gradient(180deg, #0f1a31 0%, #112244 100%);
    border-bottom: 1px solid rgba(8, 15, 30, 0.92);
}
body.theme-darker .report-dimension-bar,
body.theme-darker .dim-bar {
    background: #0f1a31;
    border-bottom: 1px solid rgba(8, 15, 30, 0.92);
    box-shadow: inset 0 -1px 0 rgba(3, 8, 18, 0.6);
}
.report-chip,
.report-dim-btn,
.dim-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 2px solid currentColor;
    background: transparent;
    font-size: .85rem;
    font-weight: 600;
    border-radius: 24px;
    padding: 6px 18px;
    margin: 3px 4px;
    cursor: pointer;
    transition: all .2s;
}
.report-chip:hover,
.report-dim-btn:hover,
.dim-btn:hover { opacity: .85; }
.report-chip.is-active,
.report-dim-btn.active,
.dim-btn.active { color: #fff !important; }
.report-chip--human,
.report-dim-btn[data-dim="human"],
.dim-btn[data-dim="human"] { color: #dc2626; }
.report-chip--human.is-active,
.report-dim-btn[data-dim="human"].active,
.dim-btn[data-dim="human"].active { background: #dc2626; border-color: #dc2626; }
.report-chip--physical,
.report-dim-btn[data-dim="physical"],
.dim-btn[data-dim="physical"] { color: #ea580c; }
.report-chip--physical.is-active,
.report-dim-btn[data-dim="physical"].active,
.dim-btn[data-dim="physical"].active { background: #ea580c; border-color: #ea580c; }
.report-chip--financial,
.report-dim-btn[data-dim="financial"],
.dim-btn[data-dim="financial"] { color: #ca8a04; }
.report-chip--financial.is-active,
.report-dim-btn[data-dim="financial"].active,
.dim-btn[data-dim="financial"].active { background: #ca8a04; border-color: #ca8a04; }
.report-chip--natural,
.report-dim-btn[data-dim="natural"],
.dim-btn[data-dim="natural"] { color: #16a34a; }
.report-chip--natural.is-active,
.report-dim-btn[data-dim="natural"].active,
.dim-btn[data-dim="natural"].active { background: #16a34a; border-color: #16a34a; }
.report-chip--social,
.report-dim-btn[data-dim="social"],
.dim-btn[data-dim="social"] { color: #2563eb; }
.report-chip--social.is-active,
.report-dim-btn[data-dim="social"].active,
.dim-btn[data-dim="social"].active { background: #2563eb; border-color: #2563eb; }

/* เมนู compare แบบเรียบ: ใช้พื้นหลังโทนเดียวกับเมนูด้านบน */
.compare-plain-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
    max-width: 100%;
    width: 100%;
    padding: 5px;
    border-radius: 22px;
    background: linear-gradient(180deg, #e7edf5 0%, #e1e9f2 100%);
    border: 1px solid #d2dce8;
    box-shadow: inset 0 2px 6px rgba(100, 116, 139, .18), inset 0 -1px 0 rgba(255,255,255,.55);
}

.compare-plain-nav__btn {
    min-width: 0;
    flex: 1 1 0;
    min-height: 58px;
    margin: 0;
    border-width: 1px;
    border-color: #d7e0eb;
    border-radius: 18px;
    background: linear-gradient(180deg, #f9fbff 0%, #eef4fb 100%);
    color: #5f7691;
    font-size: .83rem;
    font-weight: 600;
    letter-spacing: .01em;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    opacity: 1;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 11px;
    line-height: 1.15;
}

.compare-plain-nav__btn:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f2f7fd 100%);
    border-color: #ccd8e8;
    color: #25364d;
    opacity: 1;
    transform: none;
    box-shadow: 0 0 1px 0 rgba(15, 23, 42, .09), 0 1px 4px rgba(15, 23, 42, .08), inset 0 1px 0 rgba(255,255,255,.98), inset 0 -1px 0 rgba(148,163,184,.18);
}

.compare-plain-nav__btn.active {
    color: #083a7a !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .18);
    border-color: #b1c0d3;
    background: linear-gradient(180deg, #d4deea 0%, #c9d5e3 100%);
    font-weight: 800;
    transform: translateY(1px);
    box-shadow: inset 0 5px 11px rgba(71, 85, 105, .33), inset 0 1px 0 rgba(148, 163, 184, .26), inset 0 -1px 0 rgba(255, 255, 255, .5);
}

.compare-plain-nav__btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .28);
}

.compare-plain-nav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    min-width: 16px;
    font-size: .86rem;
    line-height: 1;
}

.compare-plain-nav__text {
    display: block;
    max-width: 100%;
    text-align: center;
    white-space: nowrap;
    word-break: normal;
}

@media (max-width: 992px) {
    .compare-plain-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
        justify-content: stretch;
        overflow: visible;
        padding: 4px;
        gap: 4px;
    }

    .compare-plain-nav__btn {
        min-width: 0;
        width: 100%;
        min-height: 54px;
        font-size: .76rem;
        gap: 5px;
        padding: 7px 8px;
    }

    .compare-plain-nav__icon {
        width: 16px;
        min-width: 16px;
        font-size: .8rem;
    }

    .compare-plain-nav__text {
        white-space: normal;
        line-height: 1.1;
    }
}

:root {
    --rpt-table-radius: 20px;
    --rpt-table-border-outer: #c9d7ea;
    --rpt-table-border-head: #c5d4e8;
    --rpt-table-border-head-strong: #b4c7e1;
    --rpt-table-border-cell: #d7e2f1;
    --rpt-table-border-cell-v: #e2eaf5;
    --rpt-table-border-cell-h: #d4deed;
    --rpt-table-bg: #ffffff;
    --rpt-table-head-bg: linear-gradient(180deg, #fbfdff 0%, #eef4fc 48%, #e5eefb 100%);
    --rpt-table-head-color: #1b2f4c;
    --rpt-table-row-even: #f4f8fd;
    --rpt-table-row-hover: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
    --rpt-table-row-active: linear-gradient(180deg, #eef4ff 0%, #e6effd 100%);
    --rpt-table-row-selected: linear-gradient(180deg, #eaf2ff 0%, #e1ebff 100%);
    --rpt-table-row-focus: #bfdbfe;
    --rpt-table-foot-bg: linear-gradient(180deg, #f6f9fd 0%, #e5edf7 100%);
    --rpt-table-foot-color: #18263a;
    --rpt-table-section-bg: #e9f0f9;
    --rpt-table-section-footer-bg: #eef3fa;
    --rpt-table-text: #111827;
    --rpt-table-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    --rpt-table-shadow-bottom: 0 10px 14px -12px rgba(15, 23, 42, 0.55);
    --rpt-th-py: 11px;
    --rpt-th-px: 9px;
    --rpt-th-detail-py: 9px;
    --rpt-th-detail-px: 7px;
    --rpt-td-py: 9px;
    --rpt-td-px: 8px;
    --rpt-td-detail-py: 7px;
    --rpt-td-detail-px: 6px;
    --rpt-page-btn-bg: #ffffff;
    --rpt-page-btn-border: #b9c7d9;
    --rpt-page-btn-color: #2f4059;
    --rpt-page-btn-hover-bg: #eff4fb;
    --rpt-page-btn-hover-border: #9fb3cb;
    --rpt-page-btn-active-bg: #1e3a5f;
    --rpt-page-btn-active-border: #1e3a5f;
    --rpt-page-btn-active-color: #ffffff;
    --rpt-page-btn-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --rpt-page-btn-focus: 0 0 0 3px rgba(59, 130, 246, 0.24);
    --rpt-scrollbar-track: transparent;
    --rpt-scrollbar-thumb: rgba(71, 107, 156, 0.48);
    --rpt-scrollbar-thumb-hover: rgba(49, 79, 122, 0.74);
}

body.theme-darker {
    --rpt-table-border-outer: #4f6583;
    --rpt-table-border-head: #506889;
    --rpt-table-border-head-strong: #6480a5;
    --rpt-table-border-cell: #445c7a;
    --rpt-table-border-cell-v: #536b8a;
    --rpt-table-border-cell-h: #415977;
    --rpt-table-bg: #0f172a;
    --rpt-table-head-bg: linear-gradient(180deg, #1a2a43 0%, #233852 55%, #2a4364 100%);
    --rpt-table-head-color: #dbe7f5;
    --rpt-table-row-even: #15233a;
    --rpt-table-row-hover: linear-gradient(180deg, #1a2f4d 0%, #1e3556 100%);
    --rpt-table-row-active: linear-gradient(180deg, #21385b 0%, #264267 100%);
    --rpt-table-row-selected: linear-gradient(180deg, #2a446a 0%, #315177 100%);
    --rpt-table-row-focus: #3b82f6;
    --rpt-table-foot-bg: linear-gradient(180deg, #1a2a43 0%, #223551 100%);
    --rpt-table-foot-color: #d6e3f3;
    --rpt-table-section-bg: #1a2940;
    --rpt-table-section-footer-bg: #1b2b44;
    --rpt-table-text: #e5edf8;
    --rpt-table-shadow: 0 6px 20px rgba(2, 6, 23, 0.45);
    --rpt-table-shadow-bottom: 0 10px 14px -12px rgba(2, 6, 23, 0.78);
    --rpt-page-btn-bg: #16243a;
    --rpt-page-btn-border: #425873;
    --rpt-page-btn-color: #d7e3f3;
    --rpt-page-btn-hover-bg: #20314a;
    --rpt-page-btn-hover-border: #587093;
    --rpt-page-btn-active-bg: #2d4f7a;
    --rpt-page-btn-active-border: #2d4f7a;
    --rpt-page-btn-active-color: #f8fbff;
    --rpt-page-btn-shadow: 0 1px 2px rgba(2, 6, 23, 0.5);
    --rpt-page-btn-focus: 0 0 0 3px rgba(96, 165, 250, 0.25);
    --rpt-scrollbar-track: transparent;
    --rpt-scrollbar-thumb: rgba(124, 163, 214, 0.48);
    --rpt-scrollbar-thumb-hover: rgba(151, 188, 235, 0.72);
}

.table-density-compact {
    --rpt-th-py: 8px;
    --rpt-th-px: 7px;
    --rpt-th-detail-py: 7px;
    --rpt-th-detail-px: 6px;
    --rpt-td-py: 6px;
    --rpt-td-px: 7px;
    --rpt-td-detail-py: 5px;
    --rpt-td-detail-px: 5px;
}

.table-density-relaxed {
    --rpt-th-py: 13px;
    --rpt-th-px: 11px;
    --rpt-th-detail-py: 11px;
    --rpt-th-detail-px: 8px;
    --rpt-td-py: 11px;
    --rpt-td-px: 10px;
    --rpt-td-detail-py: 9px;
    --rpt-td-detail-px: 8px;
}

:is(.report-table-wrap, .rpt-table-wrap) {
    position: relative;
    overflow-x: auto;
    border-radius: var(--rpt-table-radius);
    padding: 0;
    border: 1px solid var(--rpt-table-border-outer);
    background: transparent;
    box-shadow: var(--rpt-table-shadow), var(--rpt-table-shadow-bottom);
    scrollbar-width: thin;
    scrollbar-color: var(--rpt-scrollbar-thumb) var(--rpt-scrollbar-track);
}

:is(.report-table-wrap, .rpt-table-wrap).has-scroll-inner {
    overflow: hidden;
    scrollbar-width: auto;
    scrollbar-color: auto;
}

:is(.report-table-wrap, .rpt-table-wrap) > .report-table-scroll-inner {
    width: 100%;
}

:is(.report-table-wrap, .rpt-table-wrap).has-scroll-inner > .report-table-scroll-inner {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: inherit;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--rpt-scrollbar-thumb) var(--rpt-scrollbar-track);
}

:is(.report-table-wrap, .rpt-table-wrap)::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

:is(.report-table-wrap, .rpt-table-wrap)::-webkit-scrollbar-track {
    background: var(--rpt-scrollbar-track);
    border-radius: 999px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    background-clip: padding-box;
}

:is(.report-table-wrap, .rpt-table-wrap)::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--rpt-scrollbar-thumb);
    border: 3px solid transparent;
    background-clip: content-box;
    min-height: 28px;
}

:is(.report-table-wrap, .rpt-table-wrap)::-webkit-scrollbar-thumb:hover {
    background: var(--rpt-scrollbar-thumb-hover);
}

:is(.report-table-wrap, .rpt-table-wrap).has-scroll-inner > .report-table-scroll-inner::-webkit-scrollbar {
    height: 12px;
    width: 12px;
}

:is(.report-table-wrap, .rpt-table-wrap).has-scroll-inner > .report-table-scroll-inner::-webkit-scrollbar-track {
    background: var(--rpt-scrollbar-track);
    border-radius: 999px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    background-clip: padding-box;
}

:is(.report-table-wrap, .rpt-table-wrap).has-scroll-inner > .report-table-scroll-inner::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--rpt-scrollbar-thumb);
    border: 3px solid transparent;
    background-clip: content-box;
    min-height: 28px;
}

:is(.report-table-wrap, .rpt-table-wrap).has-scroll-inner > .report-table-scroll-inner::-webkit-scrollbar-thumb:hover {
    background: var(--rpt-scrollbar-thumb-hover);
}

:is(.report-table-wrap, .rpt-table-wrap)::after {
    content: none;
}

:is(.report-table-wrap, .rpt-table-wrap).has-horizontal-scroll-nav {
    position: relative;
}

.report-table-scroll-nav {
    position: absolute;
    left: 0;
    top: calc(50% - 19px);
    width: 100%;
    height: 0;
    overflow: visible;
    pointer-events: none;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    z-index: 7;
}

.report-table-scroll-nav.is-visible {
    display: flex;
}

.report-table-scroll-btn {
    pointer-events: auto;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, .26);
    background: transparent;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, background-color .15s ease, border-color .15s ease;
}

.report-table-scroll-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, .46);
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 10px 20px rgba(15, 23, 42, .22);
}

.report-table-scroll-btn:disabled {
    opacity: .22;
    cursor: default;
}

body.theme-darker .report-table-scroll-btn {
    background: transparent;
    border-color: rgba(96, 165, 250, .22);
    color: #93c5fd;
}

body.theme-darker .report-table-scroll-btn:hover:not(:disabled) {
    background: rgba(15, 23, 42, .9);
    border-color: rgba(96, 165, 250, .55);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) {
    width: 100%;
    border-collapse: separate;
    /* border-spacing: 0; */
    background: var(--rpt-table-bg);
    border: 0;
    border-radius: calc(var(--rpt-table-radius) - 1px);
    font-size: .85rem;
    overflow: hidden;
}

:is(.report-detail-table, .modal-detail-table) {
    font-size: .82rem;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th {
    background: var(--rpt-table-head-bg);
    color: var(--rpt-table-head-color);
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    border-top: 1px solid var(--rpt-table-border-head);
    border-right: 1px solid var(--rpt-table-border-head);
    border-bottom: 1px solid var(--rpt-table-border-head-strong);
    line-height: 1.35;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead tr:first-child th:first-child {
    border-top-left-radius: calc(var(--rpt-table-radius) - 1px);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead tr:first-child th:last-child {
    border-top-right-radius: calc(var(--rpt-table-radius) - 1px);
}


:is(.report-table, .rpt-table) thead th { padding: var(--rpt-th-py) var(--rpt-th-px); }
:is(.report-detail-table, .modal-detail-table) thead th { padding: var(--rpt-th-detail-py) var(--rpt-th-detail-px); }

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead tr:nth-child(2) th {
    background: linear-gradient(180deg, #eef4fb 0%, #e3edf9 100%);
    color: #30435f;
    font-size: .79rem;
}

body.theme-darker :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead tr:nth-child(2) th {
    background: linear-gradient(180deg, #eef4fb 0%, #e3edf9 100%);
    color: #30435f;
}

:is(.report-table, .rpt-table).report-table--no-sticky thead th {
    position: static;
    top: auto;
    z-index: auto;
}

.report-table--no-sticky [class*="sticky-col-"] {
    position: static !important;
    left: auto !important;
    z-index: auto !important;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody td {
    border-right: 1px solid var(--rpt-table-border-cell-v);
    border-bottom: 1px solid var(--rpt-table-border-cell-h);
    text-align: center;
    vertical-align: middle;
    color: var(--rpt-table-text);
    line-height: 1.45;
    background: var(--rpt-table-bg);
    transition: background-color .15s ease, border-color .15s ease;
}

:is(.report-table, .rpt-table) tbody td { padding: var(--rpt-td-py) var(--rpt-td-px); }
:is(.report-detail-table, .modal-detail-table) tbody td { padding: var(--rpt-td-detail-py) var(--rpt-td-detail-px); }

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr:nth-child(even) td {
    background: var(--rpt-table-row-even);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr:hover td {
    background: var(--rpt-table-row-hover);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr.is-row-active td {
    background: var(--rpt-table-row-active);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr.is-row-selected td {
    background: var(--rpt-table-row-selected);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr:focus-within td {
    box-shadow: inset 0 0 0 1px var(--rpt-table-row-focus);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr.is-row-clickable td {
    cursor: pointer;
}

#detailModal .modal-detail-table.detail-table-wrap-header {
    table-layout: fixed;
    width: 100%;
    min-width: 100%;
}

#detailModal .modal-detail-table.detail-table-wrap-header thead th,
#detailModal .modal-detail-table.detail-table-wrap-header tbody td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}

#detailModal .modal-detail-table.detail-table-wrap-header tbody td {
    vertical-align: top;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th.th-group {
    background: linear-gradient(180deg, #e7effa 0%, #dbe7f7 100%);
    color: #1f3554;
    font-weight: 800;
    letter-spacing: .01em;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th.th-subgroup {
    background: linear-gradient(180deg, #eff4fb 0%, #e4edf9 100%);
    color: #304862;
    font-weight: 700;
}

body.theme-darker :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th.th-group {
    background: linear-gradient(180deg, #29405e 0%, #314d71 100%);
    color: #e4edf9;
}

body.theme-darker :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th.th-subgroup {
    background: linear-gradient(180deg, #243955 0%, #2b4567 100%);
    color: #d5e3f5;
}

.table-sticky-head :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th {
    position: sticky;
    top: 0;
    z-index: 6;
    backdrop-filter: blur(3px);
}

:is(.report-table, .rpt-table) .col-name { text-align: left; }
:is(.report-table, .rpt-table) .col-name {
    white-space: nowrap;
    width: 1%;
    min-width: max-content;
}

.report-five-dimensions-page #reportTable.report-table .col-name.report-five-label-cell {
    white-space: normal;
    width: 420px;
    min-width: 420px;
    max-width: 420px;
}

.report-five-dimensions-page #reportTable.report-table thead th:first-child {
    width: 420px !important;
    min-width: 420px !important;
    max-width: 420px !important;
}

.report-five-dimensions-page #reportTable.report-table .report-five-label-2line {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
    max-height: calc(1.35em * 2);
}

@media (max-width: 768px) {
    .report-five-dimensions-page #reportTable.report-table .col-name.report-five-label-cell,
    .report-five-dimensions-page #reportTable.report-table thead th:first-child {
        width: 320px !important;
        min-width: 320px !important;
        max-width: 320px !important;
    }
}

:is(.report-table, .rpt-table).report-table--equal-cols {
    table-layout: fixed;
}

:is(.report-table, .rpt-table).report-table--equal-cols thead th,
:is(.report-table, .rpt-table).report-table--equal-cols tbody td,
:is(.report-table, .rpt-table).report-table--equal-cols tfoot td {
    width: calc(100% / 7);
}
:is(.report-table, .rpt-table) .col-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    letter-spacing: .01em;
    font-weight: 600;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) .td-action {
    width: 1%;
    min-width: 54px;
    white-space: nowrap;
    text-align: center;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) .num-positive {
    color: #0f766e !important;
    font-weight: 700;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) .num-negative {
    color: #b91c1c !important;
    font-weight: 700;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) .num-neutral {
    color: #334155 !important;
    font-weight: 700;
}

body.theme-darker :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) .num-positive {
    color: #34d399 !important;
}

body.theme-darker :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) .num-negative {
    color: #f87171 !important;
}

body.theme-darker :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) .num-neutral {
    color: #cbd5e1 !important;
}

:is(.report-table, .rpt-table) tfoot td {
    background: var(--rpt-table-foot-bg);
    color: var(--rpt-table-foot-color);
    font-weight: 700;
    padding: 10px 8px;
    text-align: center;
    border-top: 1px solid var(--rpt-table-border-head-strong);
    border-right: 1px solid var(--rpt-table-border-head);
    border-bottom: 1px solid var(--rpt-table-border-head);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr:last-child td:first-child {
    border-bottom-left-radius: calc(var(--rpt-table-radius) - 1px);
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr:last-child td:last-child {
    border-bottom-right-radius: calc(var(--rpt-table-radius) - 1px);
}

:is(.report-table, .rpt-table):has(tfoot) tbody tr:last-child td:first-child {
    border-bottom-left-radius: 0;
}

:is(.report-table, .rpt-table):has(tfoot) tbody tr:last-child td:last-child {
    border-bottom-right-radius: 0;
}

:is(.report-table, .rpt-table) .section-header td {
    background: var(--rpt-table-section-bg);
    font-weight: 700;
    text-align: left;
    font-size: .88rem;
    color: #24354d;
    padding: 9px 10px;
    border-right: 1px solid var(--rpt-table-border-cell);
    border-bottom: 1px solid var(--rpt-table-border-head);
}

:is(.report-table, .rpt-table) .section-footer td {
    background: var(--rpt-table-section-footer-bg);
    font-weight: 700;
    text-align: center;
    border-right: 1px solid var(--rpt-table-border-cell);
    border-bottom: 1px solid var(--rpt-table-border-cell);
}

:is(.report-table, .rpt-table) .section-footer td:first-child {
    text-align: left;
}

body:not(.theme-darker) .content-wrapper .card.card-outline {
    background: #ffffff;
    border: 1px solid #e6ebf2;
    border-radius: 24px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

body:not(.theme-darker) .content-wrapper .card.card-outline > .card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafd 100%);
    border-bottom: 1px solid #e8edf4;
}

body:not(.theme-darker) .content-wrapper .card.card-outline > .card-body {
    background: #f6faff;
}
.poverty-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: .78rem;
    font-weight: 600;
    color: #fff;
}
.poverty-badge.lv1 { background: #dc2626; }
.poverty-badge.lv2 { background: #ea580c; }
.poverty-badge.lv3 { background: #2563eb; }
.poverty-badge.lv4 { background: #16a34a; }

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th[style*="#fca5a5"] {
    color: #991b1b !important;
    font-weight: 800;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th[style*="#fdba74"] {
    color: #9a3412 !important;
    font-weight: 800;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th[style*="#93c5fd"] {
    color: #1e3a8a !important;
    font-weight: 800;
}

:is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th[style*="#86efac"] {
    color: #166534 !important;
    font-weight: 800;
}

.btn-view-detail {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    color: #2563eb;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all .2s;
}
.btn-view-detail:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37,99,235,.35);
}

.report-detail-pagination,
.detail-pagination,
.report-main-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.report-detail-pagination .page-info,
.detail-pagination .page-info,
.report-main-pagination .page-info {
    font-size: .8rem;
    color: #64748b;
    margin-right: 8px;
}
.report-detail-pagination .page-btn,
.detail-pagination .page-btn,
.report-main-pagination .page-btn {
    min-width: 32px;
    height: 32px;
    border: 1px solid var(--rpt-page-btn-border);
    background: var(--rpt-page-btn-bg);
    color: var(--rpt-page-btn-color);
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    box-shadow: var(--rpt-page-btn-shadow);
}
.report-detail-pagination .page-btn:hover,
.detail-pagination .page-btn:hover,
.report-main-pagination .page-btn:hover {
    background: var(--rpt-page-btn-hover-bg);
    border-color: var(--rpt-page-btn-hover-border);
}
.report-detail-pagination .page-btn.active,
.detail-pagination .page-btn.active,
.report-main-pagination .page-btn.active {
    background: var(--rpt-page-btn-active-bg);
    color: var(--rpt-page-btn-active-color);
    border-color: var(--rpt-page-btn-active-border);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.28);
}
.report-detail-pagination .page-btn:disabled,
.detail-pagination .page-btn:disabled,
.report-main-pagination .page-btn:disabled {
    opacity: .4;
    cursor: default;
    box-shadow: none;
}
.report-detail-pagination .page-btn:focus-visible,
.detail-pagination .page-btn:focus-visible,
.report-main-pagination .page-btn:focus-visible {
    outline: none;
    box-shadow: var(--rpt-page-btn-focus);
}

.report-info-bar,
.rpt-info-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.report-info-bar .report-title,
.rpt-info-bar .rpt-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e3a5f;
}

.rpt-floating-select,
.rpt-floating-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 140px;
}

.rpt-floating-field {
    cursor: pointer;
}

/* Give floating labels breathing room from card top edge. */
.card-header .rpt-floating-select,
.card-header .rpt-floating-field {
    margin-top: 6px;
}

.rpt-floating-select__label,
.rpt-floating-field__label {
    position: absolute;
    left: 12px;
    top: -9px;
    z-index: 2;
    margin: 0;
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid #b8cae4;
    background: #ffffff;
    color: #1e3a5f;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .01em;
    pointer-events: none;
}

.rpt-floating-field .form-control.form-control-sm {
    width: 100%;
    min-width: 0;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid #b8cae4;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    padding-left: 12px;
    padding-right: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.rpt-floating-select select.form-control.form-control-sm {
    width: 100%;
    min-width: 0;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid #b8cae4;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    padding-left: 12px;
    padding-right: 42px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23334155' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 13px 13px;
    background-position: right 14px center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.rpt-floating-select select.form-control.form-control-sm:disabled {
    background: #ebf2fc;
    color: #1e3a5f;
    cursor: not-allowed;
    opacity: 1;
}

.rpt-floating-field .form-control.form-control-sm:focus,
.rpt-floating-select select.form-control.form-control-sm:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

body.theme-darker .rpt-floating-select__label,
body.theme-darker .rpt-floating-field__label {
    border-color: #1e3a5f;
    background: #ffffff;
    color: #1e3a5f;
}

body.theme-darker .rpt-floating-field .form-control.form-control-sm,
body.theme-darker .rpt-floating-select select.form-control.form-control-sm {
    border-color: #b8cae4;
    background: #ffffff;
    color: #0f172a;
}

body.theme-darker .rpt-floating-select select.form-control.form-control-sm:disabled {
    background: #f5f7fa;
    color: #1e3a5f;
    cursor: not-allowed;
    opacity: 1;
}

body.theme-darker .rpt-floating-field .form-control.form-control-sm:focus,
body.theme-darker .rpt-floating-select select.form-control.form-control-sm:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.report-filter-bar,
.filter-condition-bar {
    background: #f0f4f8;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.report-filter-bar .filter-label,
.filter-condition-bar .filter-label {
    font-size: .75rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-right: 4px;
    white-space: nowrap;
}
.report-filter-tag,
.report-filter-bar .filter-tag,
.filter-condition-bar .filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: .78rem;
    font-weight: 600;
    border: 1.5px solid;
}
.report-filter-tag i,
.report-filter-bar .filter-tag i,
.filter-condition-bar .filter-tag i { font-size: .7rem; }
.report-filter-tag--year,
.report-filter-bar .filter-tag.tag-year,
.filter-tag.tag-year { border-color: #ca8a04; background: #fef9c3; color: #713f12; }
.report-filter-tag--prov,
.report-filter-bar .filter-tag.tag-prov,
.filter-tag.tag-prov { border-color: #7c3aed; background: #ede9fe; color: #5b21b6; }
.report-filter-tag--amp,
.report-filter-bar .filter-tag.tag-amp,
.filter-tag.tag-amp  { border-color: #0d9488; background: #ccfbf1; color: #115e59; }
.report-filter-tag--dim,
.report-filter-bar .filter-tag.tag-dim,
.filter-tag.tag-dim  { border-color: #fff; background: #1e3a5f; color: #fff; }
.report-filter-tag--tmb,
.report-filter-bar .filter-tag.tag-tmb,
.filter-tag.tag-tmb  { border-color: #db2777; background: #fce7f3; color: #831843; }

.clickable-num {
    cursor: pointer;
    color: #2563eb;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all .15s;
}
.clickable-num:hover {
    background: #dbeafe;
    text-decoration: underline;
}

.report-table .compare-link,
.rpt-table .compare-link {
    cursor: pointer;
    font-weight: 700;
    text-decoration: underline;
}
.report-table .compare-match,
.rpt-table .compare-match { color: #2563eb; }
.report-table .compare-exclusion,
.rpt-table .compare-exclusion { color: #ea580c; }

:is(.report-table, .rpt-table) tbody td.cmp-pct {
    color: #111111 !important;
    font-weight: 800;
}

.report-modern-page .report-modern-card {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.report-modern-card__header {
    background: linear-gradient(120deg, #0f172a 0%, #1d4ed8 48%, #0ea5e9 100%);
    color: #e2e8f0;
}

.report-modern-card__header .report-title {
    color: #f8fafc;
}

.report-modern-kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-modern-kpi-grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-modern-kpi-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-modern-kpi-grid--five .report-modern-kpi {
    align-items: flex-start;
    padding: 14px 15px;
    min-height: 98px;
}

.report-modern-kpi-grid--five .report-modern-kpi__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.report-modern-kpi-grid--five .report-modern-kpi__label {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.2;
    min-height: 2.35em;
    font-size: .89rem;
    font-weight: 700;
}

/* Report system usage: show full KPI label text (no truncation) */
#usageKpiGrid .report-modern-kpi__label {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    min-height: 0;
    white-space: normal;
    word-break: break-word;
}

#usageKpiGrid .report-modern-kpi__value-unit {
    margin-left: 4px;
    font-size: .62em;
    font-weight: 700;
    color: #64748b;
    vertical-align: middle;
}

#usageKpiGrid.report-modern-kpi-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.report-modern-kpi-grid--five .report-modern-kpi__unit {
    display: block;
    font-size: .82em;
    font-weight: 700;
    opacity: .95;
}

.report-modern-kpi-grid--five .report-modern-kpi__value {
    line-height: 1.05;
}

.report-modern-kpi {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(145deg, #f8fafc 0%, #e5e7eb 46%, #d1d5db 100%);
    border: 1px solid #cbd5e1;
    color: #1f2937;
    box-shadow: 0 8px 20px rgba(100, 116, 139, 0.2);
}

.report-modern-kpi__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    font-size: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.report-modern-kpi__icon i {
    filter: saturate(1.2);
}

.report-modern-kpi:nth-child(1) .report-modern-kpi__icon i { color: #2563eb; }
.report-modern-kpi:nth-child(2) .report-modern-kpi__icon i { color: #dc2626; }
.report-modern-kpi:nth-child(3) .report-modern-kpi__icon i { color: #ea580c; }
.report-modern-kpi:nth-child(4) .report-modern-kpi__icon i { color: #d97706; }
.report-modern-kpi:nth-child(5) .report-modern-kpi__icon i { color: #059669; }
.report-modern-kpi:nth-child(6) .report-modern-kpi__icon i { color: #7c3aed; }
.report-modern-kpi:nth-child(1) .report-modern-kpi__value { color: #1d4ed8; }
.report-modern-kpi:nth-child(2) .report-modern-kpi__value { color: #b91c1c; }
.report-modern-kpi:nth-child(3) .report-modern-kpi__value { color: #c2410c; }
.report-modern-kpi:nth-child(4) .report-modern-kpi__value { color: #a16207; }
.report-modern-kpi:nth-child(5) .report-modern-kpi__value { color: #047857; }
.report-modern-kpi:nth-child(6) .report-modern-kpi__value { color: #6d28d9; }
.report-modern-kpi:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(100, 116, 139, 0.25);
}

/* สไตล์เฉพาะหน้า report-compare-five-dimensions */
.report-modern-page .report-modern-kpi {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid #d6dde8;
    background:
        radial-gradient(140% 80% at 10% -20%, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 55%),
        linear-gradient(160deg, #fdfefe 0%, #eef2f7 52%, #e6ebf2 100%);
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.report-modern-page .report-modern-kpi::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #94a3b8 0%, #64748b 100%);
    opacity: .9;
}

.report-modern-page .report-modern-kpi:hover {
    transform: translateY(-3px);
    border-color: #b6c3d6;
    box-shadow:
        0 14px 28px rgba(15, 23, 42, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.report-modern-page .report-modern-kpi__icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    border: 1px solid #d5deea;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.98), 0 4px 10px rgba(148, 163, 184, 0.24);
}

.report-modern-page .report-modern-kpi__label {
    font-size: .77rem;
    color: #475569;
    letter-spacing: .01em;
}

.report-modern-page .report-modern-kpi__value {
    font-size: 1.22rem;
    font-weight: 800;
}

.report-modern-page .report-modern-kpi:nth-child(1)::before { background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 100%); }
.report-modern-page .report-modern-kpi:nth-child(2)::before { background: linear-gradient(90deg, #dc2626 0%, #f43f5e 100%); }
.report-modern-page .report-modern-kpi:nth-child(3)::before { background: linear-gradient(90deg, #ea580c 0%, #f97316 100%); }
.report-modern-page .report-modern-kpi:nth-child(4)::before { background: linear-gradient(90deg, #a16207 0%, #eab308 100%); }
.report-modern-page .report-modern-kpi:nth-child(5)::before { background: linear-gradient(90deg, #059669 0%, #10b981 100%); }
.report-modern-page .report-modern-kpi:nth-child(6)::before { background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%); }

.report-modern-page .report-modern-panel {
    border-radius: 18px;
    border: 1px solid #cfd8e5;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(242, 246, 251, .98) 100%);
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07), inset 0 1px 0 rgba(255, 255, 255, .95);
}

.report-modern-page .report-line-chart {
    border-radius: 16px;
    border: 1px solid #ced8e6;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 247, 252, 0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .96);
}

.report-modern-page .report-modern-badge {
    background: #2359ce;
    color: #ffffff;
    text-shadow: 0 1px 0 rgba(15, 23, 42, .35);
    border-color: rgba(255, 255, 255, .48);
}

.report-modern-page :is(.report-table, .rpt-table) thead th {
    color: #1e3a5f !important;
    text-align: center !important;
}

.report-modern-page :is(.report-table, .rpt-table) tbody td,
.report-modern-page :is(.report-table, .rpt-table) tfoot td {
    color: #1e3a5f !important;
}

#reportCalFiveDimensions .report-recalc-panel {
    border: 1px solid #d6deea !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafe 100%);
}

#reportCalFiveDimensions .report-recalc-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 10px;
    text-align: center;
    margin-bottom: 6px;
}

#reportCalFiveDimensions .report-recalc-title {
    color: #1f2937;
    line-height: 1.35;
}

.report-five-chart-panel {
    border: 1px solid #d8e4ff;
    border-radius: 20px;
    padding: 18px;
    background:
        radial-gradient(circle at 14% 14%, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #173563 0%, #2056cd 52%, #2f76ee 100%);
    box-shadow: 0 12px 28px rgba(30, 58, 95, .22);
}

.report-five-chart-panel__title {
    color: #ffffff;
    text-align: center;
    font-weight: 800;
    font-size: 1.06rem;
    margin-bottom: 12px;
    letter-spacing: .2px;
    text-shadow: 0 4px 14px rgba(15, 23, 42, .35);
}

.report-five-chart-panel__actions {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.report-five-chart-panel__hint {
    text-align: center;
    color: rgba(255, 255, 255, .95);
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .1px;
    margin-bottom: 14px;
}

.report-five-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.report-five-chart-card {
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .99) 0%, rgba(247, 250, 255, .99) 100%);
    border: 1px solid rgba(219, 229, 246, .95);
    padding: 12px;
    box-shadow:
      0 2px 8px rgba(15, 23, 42, .07),
      0 10px 18px rgba(30, 64, 175, .10);
    transition: transform .22s ease, box-shadow .22s ease;
}

.report-five-chart-card:hover {
    transform: translateY(-2px);
    box-shadow:
      0 4px 10px rgba(15, 23, 42, .08),
      0 14px 24px rgba(30, 64, 175, .14);
}

.report-five-chart-canvas {
    height: 320px;
    min-height: 320px;
    position: relative;
}

.report-five-modern-shell {
    border: 1px solid #dde4f2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(30, 64, 175, .08);
}

.report-five-modern-shell > .card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-bottom: 1px solid #e4ecf7;
}

.report-five-modern-shell > .card-body {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

#reportCalFiveDimensions .report-recalc-btn {
    border: 0;
    border-radius: 999px;
    padding: 9px 22px;
    font-weight: 800;
    font-size: .9rem;
    letter-spacing: .1px;
    color: #ffffff;
    background: linear-gradient(135deg, #fb7185 0%, #f97316 52%, #fb923c 100%);
    box-shadow: 0 8px 18px rgba(249, 115, 22, .26);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

#reportCalFiveDimensions .report-recalc-btn:hover,
#reportCalFiveDimensions .report-recalc-btn:focus {
    color: #ffffff;
    transform: translateY(-2px);
    filter: saturate(1.05);
    box-shadow: 0 12px 24px rgba(249, 115, 22, .3);
}

#reportCalFiveDimensions .report-recalc-btn:disabled {
    opacity: .88;
    cursor: not-allowed;
    transform: none;
}


@media (max-width: 1100px) {
    .report-five-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .report-five-chart-grid { grid-template-columns: 1fr; }
}

.report-modern-popup {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(3px);
}

.report-modern-popup.is-visible {
    display: flex;
}

.report-modern-popup__card {
    width: min(92vw, 460px);
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #dbe4f0;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
    padding: 22px 22px 18px;
    text-align: center;
}

.report-modern-popup__icon {
    width: 66px;
    height: 66px;
    border-radius: 999px;
    margin: 0 auto 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    background: #eef2ff;
    color: #1d4ed8;
}

.report-modern-popup.is-confirm .report-modern-popup__icon {
    background: #fff7ed;
    color: #ea580c;
}

.report-modern-popup.is-success .report-modern-popup__icon {
    background: #ecfdf5;
    color: #059669;
}

.report-modern-popup.is-error .report-modern-popup__icon {
    background: #fef2f2;
    color: #dc2626;
}

.report-modern-popup__title {
    margin: 0 0 6px;
    font-weight: 800;
    color: #1f2937;
}

.report-modern-popup__text {
    margin: 0;
    color: #475569;
    line-height: 1.4;
}

.report-modern-popup__actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.report-modern-popup__btn {
    border: 0;
    border-radius: 12px;
    min-width: 108px;
    padding: 8px 14px;
    font-weight: 700;
}

.report-modern-popup__btn--cancel {
    background: #e2e8f0;
    color: #334155;
}

.report-modern-popup__btn--confirm {
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 60%, #f97316 100%);
}

.report-modern-loading {
    position: fixed;
    inset: 0;
    z-index: 12100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(2px);
}

.report-modern-loading.is-visible {
    display: flex;
}

.report-modern-loading__card {
    width: min(88vw, 300px);
    border-radius: 16px;
    border: 1px solid #d7e1ef;
    background: #ffffff;
    text-align: center;
    padding: 18px 16px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.26);
}

.report-modern-loading__ring {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 4px solid #fee2e2;
    border-top-color: #ef4444;
    display: inline-block;
    animation: reportModernSpin .85s linear infinite;
}

.report-modern-loading__title {
    margin-top: 10px;
    font-weight: 800;
    color: #1f2937;
}

.report-modern-loading__text {
    margin-top: 2px;
    color: #64748b;
    font-size: .9rem;
}

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

.report-modern-kpi__label {
    font-size: 0.78rem;
    opacity: 0.95;
    color: #334155;
}

.report-modern-kpi__value {
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.1;
}

.report-modern-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-modern-grid--stack {
    grid-template-columns: minmax(0, 1fr);
}

.report-modern-panel {
    border-radius: 16px;
    padding: 14px;
    border: 1px solid #cbd5e1;
    background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.report-modern-panel--inner {
    padding: 10px 10px 6px;
}

.report-modern-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
    color: #f8fafc;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 6px 16px rgba(51, 65, 85, 0.3);
}

.report-five-dim-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.report-focus-context-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.report-focus-context-card {
    border-radius: 12px;
    border: 1px solid #cfdae8;
    background: linear-gradient(180deg, #ffffff 0%, #eef3fa 100%);
    padding: 10px 10px 9px;
}

.report-focus-context-card__name {
    font-size: .76rem;
    color: #475569;
    margin-bottom: 2px;
}

.report-focus-context-card__value {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.1;
}

.report-focus-dim-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.report-focus-dim-tab {
    border: 1px solid #c8d3e2;
    border-radius: 10px;
    padding: 6px 8px;
    background: #f8fbff;
    color: #243b5a;
    font-weight: 700;
    font-size: .79rem;
    transition: all .15s ease;
}

.report-focus-dim-tab:hover {
    border-color: #9fb6d4;
    background: #eef4fb;
}

.report-focus-dim-tab.active {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: #ffffff;
}

.report-modern-panel__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.report-modern-panel__sub {
    margin-top: 2px;
    margin-bottom: 10px;
    color: #334155;
    font-size: 0.82rem;
}

.report-line-chart {
    width: 100%;
    min-height: 340px;
    height: clamp(320px, 40vh, 420px);
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.report-line-chart--small {
    min-height: 300px;
    height: 320px;
}

.report-modern-table {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.report-modern-table thead th {
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 700;
    border: 0;
}

.report-modern-table tbody td {
    border-top: 1px solid #e2e8f0;
}

.report-delta {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.report-delta.delta-up {
    color: #15803d;
}

.report-delta.delta-down {
    color: #b91c1c;
}

.report-delta.delta-flat {
    color: #334155;
}

body.theme-darker .report-modern-panel {
    border-color: rgba(59, 130, 246, 0.24);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.92) 100%);
}

body.theme-darker .report-modern-badge {
    border-color: rgba(226, 232, 240, 0.38);
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.5);
}

body.theme-darker .report-modern-panel__title {
    color: #e2e8f0;
}

body.theme-darker .report-modern-panel__sub {
    color: #cbd5e1;
}

body.theme-darker .report-modern-table {
    background: #0f172a;
}

body.theme-darker .report-modern-table thead th {
    background: #1e293b;
}

body.theme-darker .report-modern-table tbody td {
    border-top-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

/* Keep report table and modern panel in light palette for dark theme. */
body.theme-darker {
    --rpt-table-border-outer: #c9d7ea;
    --rpt-table-border-head: #c5d4e8;
    --rpt-table-border-head-strong: #b4c7e1;
    --rpt-table-border-cell: #d7e2f1;
    --rpt-table-border-cell-v: #e2eaf5;
    --rpt-table-border-cell-h: #d4deed;
    --rpt-table-bg: #ffffff;
    --rpt-table-head-bg: linear-gradient(180deg, #fbfdff 0%, #eef4fc 48%, #e5eefb 100%);
    --rpt-table-head-color: #1b2f4c;
    --rpt-table-row-even: #f4f8fd;
    --rpt-table-row-hover: linear-gradient(180deg, #f7fbff 0%, #eef5ff 100%);
    --rpt-table-row-active: linear-gradient(180deg, #eef4ff 0%, #e6effd 100%);
    --rpt-table-row-selected: linear-gradient(180deg, #eaf2ff 0%, #e1ebff 100%);
    --rpt-table-row-focus: #bfdbfe;
    --rpt-table-foot-bg: linear-gradient(180deg, #f6f9fd 0%, #e5edf7 100%);
    --rpt-table-foot-color: #18263a;
    --rpt-table-section-bg: #e9f0f9;
    --rpt-table-section-footer-bg: #eef3fa;
    --rpt-table-text: #111827;
    --rpt-table-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    --rpt-table-shadow-bottom: 0 10px 14px -12px rgba(15, 23, 42, 0.55);
}

body.theme-darker .report-modern-panel {
    border-color: #cbd5e1;
    background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
}

body.theme-darker .report-modern-panel__title {
    color: #0f172a;
}

body.theme-darker .report-modern-panel__sub {
    color: #334155;
}

body.theme-darker .report-line-chart {
    border-color: #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

@media (max-width: 1365px) {
    #usageKpiGrid.report-modern-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-modern-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-modern-kpi-grid--five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 992px) {
    .report-modern-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-five-dim-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .report-focus-dim-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    :is(.report-table-wrap, .rpt-table-wrap) {
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: auto;
    }

    :is(.report-table, .rpt-table) {
        min-width: 900px;
    }

    :is(.report-detail-table, .modal-detail-table) {
        min-width: 760px;
    }

    :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) [class*="sticky-col-"] {
        position: static !important;
        left: auto !important;
        z-index: auto !important;
    }

    .report-filter-bar,
    .filter-condition-bar {
        padding: 8px 12px;
        gap: 6px;
    }

    .report-table-scroll-nav {
        display: none !important;
    }
}

@media (max-width: 768px) {
    #usageKpiGrid.report-modern-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .report-five-dim-chart-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-focus-context-grid,
    .report-focus-dim-tabs {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-line-chart--small {
        min-height: 280px;
        height: 290px;
    }

    :is(.report-table-wrap, .rpt-table-wrap) {
        border-radius: 16px;
    }

    :is(.report-table, .rpt-table) thead th {
        font-size: .78rem;
    }

    :is(.report-table, .rpt-table) tbody td {
        font-size: .8rem;
    }

    :is(.report-table, .rpt-table) .col-num {
        font-size: .78rem;
    }

    :is(.report-table, .rpt-table) {
        min-width: 760px;
    }

    :is(.report-detail-table, .modal-detail-table) {
        min-width: 640px;
    }

    .report-info-bar .report-title,
    .rpt-info-bar .rpt-title {
        font-size: .96rem;
        line-height: 1.3;
    }

    .report-filter-bar .filter-label,
    .filter-condition-bar .filter-label {
        width: 100%;
        margin-right: 0;
    }

    .rpt-floating-select,
    .rpt-floating-field {
        flex: 1 1 180px;
        margin-top: 6px;
    }

    .rpt-floating-field .form-control.form-control-sm,
    .rpt-floating-select select.form-control.form-control-sm {
        min-height: 44px;
        height: 44px;
        font-size: 16px;
        padding-left: 13px;
        padding-right: 44px;
        background-position: right 15px center;
    }
}

@media (max-width: 576px) {
    :is(.report-table-wrap, .rpt-table-wrap) {
        border-radius: 16px;
    }

    :is(.report-table, .rpt-table) {
        min-width: 680px;
    }

    :is(.report-detail-table, .modal-detail-table) {
        min-width: 560px;
    }

    :is(.report-table, .rpt-table) thead th {
        font-size: .75rem;
        padding: 8px 6px;
    }

    :is(.report-table, .rpt-table) tbody td {
        font-size: .77rem;
        padding: 7px 6px;
    }

    .report-filter-tag,
    .report-filter-bar .filter-tag,
    .filter-condition-bar .filter-tag {
        font-size: .74rem;
        padding: 4px 10px;
    }

    .rpt-floating-select,
    .rpt-floating-field {
        flex: 1 1 100%;
        min-width: 100%;
        margin-top: 8px;
    }

    .rpt-floating-select + .rpt-floating-select,
    .rpt-floating-field + .rpt-floating-field {
        margin-top: 12px;
    }
}

@media print {
    :is(.report-table-wrap, .rpt-table-wrap) {
        box-shadow: none !important;
        border-radius: 0;
        overflow: visible !important;
    }

    :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) {
        border: 1px solid #64748b !important;
        border-radius: 0 !important;
    }

    :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) thead th {
        background: #e2e8f0 !important;
        color: #0f172a !important;
    }

    :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr:nth-child(even) td,
    :is(.report-table, .rpt-table, .report-detail-table, .modal-detail-table) tbody tr:hover td {
        background: #ffffff !important;
    }
}
