:root {
    --mp-navy: #061a33;
    --mp-blue: #0f3b84;
    --mp-cyan: #0ea5e9;
    --mp-green: #16a34a;
    --mp-yellow: #f59e0b;
    --mp-orange: #f97316;
    --mp-red: #dc2626;
    --mp-bg: #eef4fa;
    --mp-panel: #ffffff;
    --mp-line: #dbe4ef;
    --mp-text: #0f172a;
    --mp-muted: #64748b;
    --mp-radius: 22px;
    --mp-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 0%, rgba(14, 165, 233, .16), transparent 28vw),
        radial-gradient(circle at 92% 12%, rgba(22, 163, 74, .10), transparent 30vw),
        linear-gradient(180deg, #fbfdff, var(--mp-bg));
    color: var(--mp-text);
}

body.mp-drawer-open { overflow: hidden; }

button,
input,
select,
textarea { font-family: inherit; }

.mp-sidebar-toggle {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 10020;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--mp-navy), var(--mp-blue));
    color: #ffffff;
    font-size: 23px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(6, 44, 82, .24);
}

.mp-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(15, 23, 42, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.mp-drawer-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.mp-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 314px;
    max-width: 88vw;
    height: 100vh;
    z-index: 10030;
    transform: translateX(-104%);
    transition: transform .23s ease;
    background:
        radial-gradient(circle at 20% 0, rgba(14, 165, 233, .32), transparent 36%),
        linear-gradient(180deg, #061a33, #08245a 56%, #03111f);
    color: #ffffff;
    box-shadow: 22px 0 55px rgba(0,0,0,.28);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
}

.mp-drawer.open { transform: translateX(0); }

.mp-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.14);
    margin-bottom: 16px;
}

.mp-drawer-brand {
    display: flex;
    gap: 11px;
    align-items: center;
}

.mp-drawer-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #ffffff;
    color: var(--mp-navy);
    display: grid;
    place-items: center;
    font-weight: 950;
    font-size: 15px;
}

.mp-drawer-brand strong {
    display: block;
    font-size: 15px;
    color: #ffffff;
    line-height: 1.1;
}

.mp-drawer-brand span {
    display: block;
    color: rgba(255,255,255,.68);
    font-size: 12px;
    margin-top: 3px;
}

.mp-drawer-close {
    border: none;
    background: rgba(255,255,255,.10);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.mp-drawer-menu {
    display: grid;
    gap: 8px;
}

.mp-drawer-menu a {
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: rgba(255,255,255,.86);
    background: transparent;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 750;
}

.mp-drawer-menu a:hover,
.mp-drawer-menu a.active {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.18);
    color: #ffffff;
}

.mp-drawer-note {
    margin-top: auto;
    padding: 13px;
    border-radius: 15px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.72);
    font-size: 12px;
    line-height: 1.45;
}

.mp-page {
    width: min(1980px, 100%);
    margin: 0 auto;
    padding: 18px 18px 18px 78px;
}

.mp-shell {
    min-height: calc(100vh - 36px);
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--mp-shadow);
}

.mp-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.mp-title-wrap {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.mp-blue-mark {
    width: 18px;
    height: 74px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--mp-cyan), var(--mp-blue));
    box-shadow: 0 14px 30px rgba(14, 165, 233, .28);
    flex: 0 0 auto;
}

.mp-header h1 {
    margin: 0;
    color: #07111f;
    font-size: clamp(34px, 3vw, 56px);
    line-height: .98;
    font-weight: 950;
    letter-spacing: -1.6px;
}

.mp-header p {
    margin: 10px 0 0;
    color: #334155;
    font-size: clamp(14px, 1vw, 18px);
    font-weight: 800;
}

.mp-actions {
    display: grid;
    justify-items: end;
    gap: 12px;
}

.mp-filter,
.mp-input-filter {
    display: flex;
    gap: 12px;
    align-items: end;
}

.mp-filter label,
.mp-input-filter label {
    display: grid;
    gap: 5px;
}

.mp-filter span,
.mp-input-filter span,
.mp-input-group label span {
    color: #0b1f3a;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.mp-filter select,
.mp-input-filter select,
.mp-input-filter input,
.mp-input-group input,
.mp-input-group textarea {
    height: 46px;
    border-radius: 14px;
    border: 1px solid #cfd9e8;
    background: #ffffff;
    color: #081f49;
    font-size: 14px;
    font-weight: 800;
    padding: 0 12px;
    outline: none;
}

.mp-input-group textarea {
    height: 82px;
    padding: 12px;
    resize: vertical;
}

.mp-filter select { width: 150px; }

.mp-filter button,
.mp-input-filter button,
.mp-save-bar button,
.mp-nav a {
    height: 46px;
    border: 0;
    border-radius: 15px;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--mp-navy), var(--mp-blue));
    color: #ffffff;
    font-weight: 950;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mp-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.mp-nav a {
    height: 38px;
    background: #ffffff;
    color: var(--mp-navy);
    border: 1px solid #d7e0ed;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
}

.mp-nav a.active,
.mp-nav a:hover {
    background: linear-gradient(135deg, var(--mp-navy), var(--mp-blue));
    color: #ffffff;
}

.mp-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 850;
    border: 1px solid #86efac;
    background: #dcfce7;
    color: #166534;
}

.mp-summary-grid {
    display: grid;
    grid-template-columns: 1.08fr 1.1fr .82fr;
    gap: 16px;
    margin-bottom: 16px;
}

.mp-panel {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .055);
    overflow: hidden;
}

.mp-hero {
    padding: 20px;
    background:
        radial-gradient(circle at 10% 12%, rgba(14,165,233,.18), transparent 220px),
        linear-gradient(135deg, #061a33, #08245a 58%, #0f3b84);
    color: #ffffff;
    min-height: 230px;
}

.mp-hero span,
.mp-cost-card span,
.mp-mini-card span,
.mp-side-card span {
    display: block;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.mp-hero span { color: rgba(255,255,255,.72); }

.mp-hero strong {
    display: block;
    margin-top: 10px;
    font-size: clamp(38px, 4vw, 72px);
    line-height: .95;
    font-weight: 950;
    letter-spacing: -2px;
}

.mp-hero small {
    display: block;
    margin-top: 12px;
    color: rgba(255,255,255,.76);
    font-size: 15px;
    font-weight: 800;
}

.mp-output-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.mp-output-item {
    border-radius: 14px;
    padding: 10px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.14);
}

.mp-output-item b {
    display: block;
    margin-top: 5px;
    font-size: 18px;
    font-weight: 950;
}

.mp-cost-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mp-cost-card,
.mp-side-card,
.mp-mini-card {
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.mp-cost-card span,
.mp-mini-card span,
.mp-side-card span {
    color: var(--mp-muted);
}

.mp-cost-card strong,
.mp-side-card strong,
.mp-mini-card strong {
    display: block;
    color: var(--mp-navy);
    margin-top: 6px;
    font-size: 24px;
    line-height: 1.05;
    font-weight: 950;
}

.mp-cost-card small,
.mp-side-card small,
.mp-mini-card small {
    display: block;
    margin-top: 6px;
    color: var(--mp-muted);
    font-size: 12px;
    font-weight: 750;
}

.mp-side {
    padding: 16px;
    display: grid;
    gap: 12px;
}

.mp-chart-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 16px;
    margin-bottom: 16px;
}

.mp-chart-panel,
.mp-focus-panel,
.mp-table-panel,
.mp-input-panel {
    padding: 18px;
}

.mp-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 10px;
}

.mp-panel-head h2 {
    margin: 0;
    color: #06164a;
    font-size: 25px;
    line-height: 1.1;
    font-weight: 950;
}

.mp-panel-head p {
    margin: 4px 0 0;
    color: var(--mp-muted);
    font-size: 13px;
    font-weight: 750;
}

.mp-metric-select {
    min-width: 245px;
    height: 42px;
    border: 1px solid #cfd9e8;
    border-radius: 13px;
    padding: 0 12px;
    background: #ffffff;
    color: var(--mp-navy);
    font-size: 14px;
    font-weight: 850;
}

.mp-chart {
    width: 100%;
    min-height: 330px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248,250,252,.92), rgba(255,255,255,.95));
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.mp-chart svg {
    width: 100%;
    height: 330px;
    display: block;
}

.mp-chart text {
    paint-order: stroke;
    stroke: rgba(255,255,255,.82);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.mp-chart-point,
.mp-chart-hit {
    cursor: pointer;
}

.mp-chart-point:hover circle {
    filter: drop-shadow(0 8px 12px rgba(15, 23, 42, .18));
}

body.mp-modal-open {
    overflow: hidden;
}

.mp-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .58);
}

.mp-modal-backdrop.show {
    display: grid;
}

.mp-modal {
    width: min(1180px, 96vw);
    max-height: 92vh;
    overflow: auto;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 26px 90px rgba(0, 0, 0, .36);
    border: 1px solid rgba(226, 232, 240, .86);
}

.mp-modal-head {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 20px;
    background:
        radial-gradient(circle at 10% 20%, rgba(14,165,233,.20), transparent 220px),
        linear-gradient(135deg, #061a33, #08245a 58%, #0f3b84);
    color: #ffffff;
}

.mp-modal-head h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.08;
    font-weight: 950;
}

.mp-modal-head p {
    margin: 7px 0 0;
    color: rgba(255,255,255,.76);
    font-size: 13px;
    font-weight: 750;
}

.mp-modal-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.14);
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.mp-modal-body {
    padding: 18px;
}

.mp-modal-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.mp-modal-card {
    border: 1px solid #dbe4ef;
    border-radius: 17px;
    padding: 13px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.mp-modal-card span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mp-modal-card strong {
    display: block;
    margin-top: 6px;
    color: var(--mp-navy);
    font-size: 22px;
    line-height: 1.05;
    font-weight: 950;
}

.mp-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mp-modal-box {
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
}

.mp-modal-box h3 {
    margin: 0;
    padding: 12px 14px;
    background: #f8fafc;
    color: var(--mp-navy);
    border-bottom: 1px solid #e2e8f0;
    font-size: 16px;
    font-weight: 950;
}

.mp-modal-table {
    width: 100%;
    border-collapse: collapse;
}

.mp-modal-table th,
.mp-modal-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 12px;
    font-size: 13px;
}

.mp-modal-table th {
    color: #475569;
    text-align: left;
    font-weight: 950;
    background: #fbfdff;
}

.mp-modal-table td {
    color: #0f172a;
    text-align: right;
    font-weight: 850;
}

.mp-modal-table tr:last-child th,
.mp-modal-table tr:last-child td {
    border-bottom: 0;
}

.mp-modal-note {
    margin: 12px 0 0;
    padding: 11px 13px;
    border-radius: 15px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.45;
}

@media (max-width: 760px) {
    .mp-modal-summary,
    .mp-modal-grid {
        grid-template-columns: 1fr;
    }

    .mp-modal-head {
        align-items: stretch;
    }
}

.mp-chart-empty {
    min-height: 330px;
    display: grid;
    place-items: center;
    color: var(--mp-muted);
    font-weight: 850;
}

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

.mp-mini-card strong { font-size: 21px; }

.mp-table-wrap {
    overflow: auto;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    max-height: 43vh;
}

.mp-table {
    min-width: 1480px;
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.mp-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #08245a, #061a33);
    color: #ffffff;
    padding: 11px 10px;
    border: 1px solid #dbe4ef;
    font-size: 12px;
    text-align: center;
    font-weight: 950;
    white-space: nowrap;
}

.mp-table td {
    border: 1px solid #e2e8f0;
    padding: 9px 10px;
    font-size: 12.5px;
    color: #0f172a;
    white-space: nowrap;
}

.mp-table tbody tr:hover td { background: #f8fbff; }
.mp-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mp-table td.center { text-align: center; }

.mp-table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background: #f8fafc;
    font-weight: 950;
}

.mp-highlight {
    background: #ecfdf3 !important;
    color: #166534 !important;
    font-weight: 950;
}

.mp-input-form {
    display: grid;
    gap: 14px;
}

.mp-input-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.mp-input-group {
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    padding: 14px;
}

.mp-input-group h3 {
    margin: 0 0 12px;
    color: var(--mp-navy);
    font-size: 18px;
    font-weight: 950;
}

.mp-input-group label {
    display: grid;
    gap: 5px;
    margin-bottom: 10px;
}

.mp-input-group label:last-child { margin-bottom: 0; }

.mp-save-bar {
    position: sticky;
    bottom: 12px;
    z-index: 4;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(8px);
    padding: 12px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .11);
}

.mp-save-bar span {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1280px) {
    .mp-summary-grid,
    .mp-chart-section {
        grid-template-columns: 1fr;
    }

    .mp-actions {
        justify-items: start;
    }

    .mp-header {
        flex-direction: column;
    }

    .mp-input-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .mp-page {
        padding: 72px 10px 10px;
    }

    .mp-shell {
        padding: 14px;
        border-radius: 20px;
    }

    .mp-filter,
    .mp-input-filter,
    .mp-panel-head,
    .mp-save-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .mp-filter select,
    .mp-filter button,
    .mp-input-filter select,
    .mp-input-filter input,
    .mp-input-filter button,
    .mp-metric-select {
        width: 100%;
    }

    .mp-output-strip,
    .mp-cost-grid,
    .mp-focus-grid,
    .mp-input-grid {
        grid-template-columns: 1fr;
    }

    .mp-header h1 {
        font-size: 34px;
    }
}

/* ===== MP Cost dashboard reference layout ===== */
.mp-page {
    width: 100%;
    max-width: 1980px;
    padding: 18px 26px 22px 78px;
}

.mp-shell {
    min-height: calc(100vh - 40px);
    border-radius: 26px;
    padding: 24px;
    background: rgba(255, 255, 255, .98);
}

.mp-ref-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.mp-ref-header .mp-title-wrap {
    align-items: flex-start;
}

.mp-ref-header .mp-blue-mark {
    height: 70px;
    width: 16px;
    background: linear-gradient(180deg, #0ea5e9, #1d4ed8);
}

.mp-ref-header h1 {
    font-size: clamp(34px, 3vw, 54px);
    letter-spacing: -1.5px;
    color: #07193a;
}

.mp-ref-header p {
    margin-top: 7px;
    font-size: 17px;
    color: #334155;
    font-weight: 850;
}

.mp-ref-header .mp-actions {
    display: grid;
    grid-template-columns: auto auto;
    align-items: end;
    gap: 10px 18px;
}

.mp-ref-filter {
    grid-column: 1;
    justify-self: end;
}

.mp-ref-nav {
    grid-column: 2;
    align-self: end;
}

.mp-ref-filter label span {
    font-size: 11px;
    letter-spacing: .06em;
    color: #0f172a;
}

.mp-ref-filter select {
    width: 146px;
    height: 46px;
    font-size: 15px;
    border-radius: 13px;
    color: #0b1e45;
}

.mp-ref-filter button {
    display: none;
}

.mp-ref-filter select:focus,
.mp-ref-filter select:hover {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .10);
}

.mp-ref-filter select {
    cursor: pointer;
}

.mp-ref-filter select + button { display: none; }

.mp-ref-nav {
    gap: 0;
    border: 1px solid #dbe4ef;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.mp-ref-nav a {
    min-width: 126px;
    height: 46px;
    border-radius: 0;
    border: 0;
    border-right: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0b1e45;
    box-shadow: none;
    font-size: 14px;
}

.mp-ref-nav a:last-child { border-right: 0; }

.mp-ref-nav a.active,
.mp-ref-nav a:hover {
    background: linear-gradient(135deg, #061a33, #0f3b84);
    color: #ffffff;
}

.mp-kpi-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 18px;
}

.mp-kpi-card {
    min-height: 142px;
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: start;
    gap: 18px;
    padding: 24px 22px;
    border: 1px solid #dfe7f2;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    position: relative;
    overflow: hidden;
}

.mp-kpi-card.is-active {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, .28), 0 16px 36px rgba(15, 23, 42, .08);
}

.mp-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #061a33, #0f3b84);
    color: #ffffff;
    font-size: 26px;
    font-weight: 950;
    box-shadow: 0 12px 22px rgba(6, 26, 51, .22);
}

.mp-card-copy span {
    display: block;
    color: #334155;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mp-card-copy strong {
    display: block;
    margin-top: 8px;
    color: #07193a;
    font-size: clamp(23px, 1.8vw, 34px);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.5px;
}

.mp-card-copy small {
    display: block;
    margin-top: 14px;
    color: #64748b;
    font-size: 13px;
    font-weight: 780;
}

.mp-analysis-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(360px, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.mp-chart-panel-ref,
.mp-focus-panel-ref,
.mp-table-panel-ref {
    border-radius: 22px;
    border: 1px solid #dfe7f2;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .055);
}

.mp-chart-panel-ref { padding: 20px 22px 14px; }
.mp-focus-panel-ref { padding: 20px; }
.mp-table-panel-ref { padding: 18px 20px 20px; }

.mp-panel-head-ref {
    margin-bottom: 12px;
}

.mp-panel-head-ref h2 {
    color: #07193a;
    font-size: 22px;
    font-weight: 950;
    margin: 0;
}

.mp-panel-head-ref p {
    color: #64748b;
    font-weight: 800;
    margin: 4px 0 0;
}

.mp-panel-head-ref.compact {
    margin-bottom: 14px;
}

.mp-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    color: #0b1e45;
    font-size: 12px;
    font-weight: 900;
}

.mp-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.actual-dot {
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: #0f3b84;
    position: relative;
}

.actual-dot::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0f3b84;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
}

.target-line {
    width: 30px;
    height: 0;
    border-top: 3px dashed #16a34a;
}

.mp-chart-ref {
    min-height: 315px;
    border: 0;
    background: #ffffff;
}

.mp-chart-ref svg {
    height: 315px;
}

.mp-chart-note {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 11px;
    background: #eff6ff;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid #dbeafe;
}

.mp-chart-note.side-note {
    margin-top: 16px;
}

.mp-metric-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid #dbe4ef;
    border-radius: 13px;
    overflow: hidden;
    margin-bottom: 16px;
}

.mp-metric-tab {
    height: 48px;
    border: 0;
    border-right: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0b1e45;
    font-size: 14px;
    font-weight: 950;
    cursor: pointer;
}

.mp-metric-tab:last-child { border-right: 0; }

.mp-metric-tab.active,
.mp-metric-tab:hover {
    background: linear-gradient(135deg, #061a33, #0f3b84);
    color: #ffffff;
}

.mp-focus-grid-ref {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mp-focus-grid-ref .mp-mini-card {
    min-height: 116px;
    border-radius: 17px;
    padding: 16px;
}

.mp-focus-grid-ref .mp-mini-card strong {
    font-size: 25px;
    color: #07193a;
}

.mp-focus-grid-ref .mp-mini-card.good strong { color: #16a34a; }
.mp-focus-grid-ref .mp-mini-card.bad strong { color: #dc2626; }

.mp-detail-table-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mp-table-wrap-ref {
    overflow: auto;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: #ffffff;
}

.mp-table-ref {
    min-width: 0;
    width: 100%;
    border-collapse: collapse;
}

.mp-table-ref th {
    background: linear-gradient(180deg, #08245a, #061a33);
    color: #ffffff;
    text-align: center;
    padding: 11px 9px;
    font-size: 13px;
    border: 1px solid #dbe4ef;
    white-space: nowrap;
    font-weight: 950;
}

.mp-table-ref td {
    color: #0f172a;
    padding: 9px 10px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

.mp-table-ref td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mp-table-ref td.center { text-align: center; }
.mp-table-ref .metric-main { color: #0f3b84; font-weight: 950; }
.mp-table-ref .metric-good { color: #16a34a; font-weight: 950; }
.mp-table-ref .metric-bad { color: #dc2626; font-weight: 950; }

.mp-table-note {
    margin: 12px 0 0;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.mp-chart-point,
.mp-chart-hit { cursor: pointer; }

.mp-chart-value-good { fill: #16a34a; }
.mp-chart-value-bad { fill: #dc2626; }

@media (max-width: 1500px) {
    .mp-kpi-card-grid { grid-template-columns: repeat(3, 1fr); }
    .mp-analysis-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
    .mp-ref-header { flex-direction: column; }
    .mp-ref-header .mp-actions { grid-template-columns: 1fr; justify-items: start; }
    .mp-ref-filter,
    .mp-ref-nav { grid-column: 1; }
    .mp-detail-table-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .mp-page { padding: 72px 10px 10px; }
    .mp-shell { padding: 14px; }
    .mp-kpi-card-grid { grid-template-columns: 1fr; gap: 12px; }
    .mp-kpi-card { min-height: 112px; padding: 16px; }
    .mp-metric-tabs { grid-template-columns: 1fr 1fr; }
    .mp-focus-grid-ref { grid-template-columns: 1fr; }
    .mp-ref-nav { width: 100%; }
    .mp-ref-nav a { min-width: 0; flex: 1; }
}
