.command-centre {
    --cc-ink: #101e35;
    --cc-muted: #7f91ad;
    --cc-blue: #1768ce;
    --cc-border: #dce5f0;
    max-width: 1440px;
    padding: 28px 34px 32px;
    color: var(--cc-ink);
}

.command-centre,
.command-centre * { box-sizing: border-box; }

.cc-page-heading,
.cc-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.cc-page-heading { margin-bottom: 22px; }
.cc-page-heading h1 { margin: 0 0 7px; color: var(--cc-ink); font-size: 23px; font-weight: 700; line-height: 1.2; }
.cc-page-heading p,
.cc-panel-header p { margin: 0; color: var(--cc-muted); font-size: 12px; line-height: 1.5; }
.cc-date { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; padding: 9px 13px; border: 1px solid var(--cc-border); border-radius: 9px; background: #fff; color: #253650; font: inherit; font-size: 12px; }
.cc-date svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.cc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
.cc-card { min-width: 0; overflow: hidden; border: 1px solid var(--cc-border); border-radius: 16px; background: #fff; box-shadow: 0 2px 5px rgba(31,55,91,.035); }
.cc-kpi { display: flex; min-height: 205px; flex-direction: column; align-items: flex-start; padding: 22px 21px 20px; border: 0; border-radius: 15px; box-shadow: 0 10px 26px rgba(30, 56, 94, .10); color: #fff; }
.cc-kpi-top { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cc-kpi-icon { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 12px; background: rgba(255,255,255,.18); color: #fff; }
.cc-kpi-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cc-currency { font-size: 23px; font-weight: 500; }
.cc-kpi-danger { --cc-accent: #fff; background: linear-gradient(110deg, rgba(255,255,255,.30), rgba(255,255,255,0) 70%), #f46b68; }
.cc-kpi-success { --cc-accent: #fff; background: linear-gradient(110deg, rgba(255,255,255,.30), rgba(255,255,255,0) 70%), #2bc155; }
.cc-kpi-info { --cc-accent: #fff; background: linear-gradient(110deg, rgba(255,255,255,.30), rgba(255,255,255,0) 70%), #369dc9; }
.cc-kpi-purple { --cc-accent: #fff; background: linear-gradient(110deg, rgba(255,255,255,.30), rgba(255,255,255,0) 70%), #a336c9; }
.cc-spark { display: flex; height: 27px; align-items: flex-end; gap: 4px; }
.cc-spark i { width: 6px; height: 11px; border-radius: 2px; background: rgba(255,255,255,.48); }
.cc-spark i:nth-child(2) { height: 15px; }
.cc-spark i:nth-child(3) { height: 13px; }
.cc-spark i:nth-child(4) { height: 19px; }
.cc-spark i:nth-child(5) { height: 23px; }
.cc-spark i:nth-child(6) { height: 27px; background: rgba(255,255,255,.9); }
.cc-kpi-value { margin-bottom: 5px; color: #fff; font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -.5px; }
.cc-kpi-label { color: rgba(255,255,255,.94); font-size: 14px; line-height: 1.45; }
.cc-kpi small { margin-top: 8px; color: rgba(255,255,255,.95); font-size: 12px; line-height: 1.4; }
.cc-positive { color: #198043; }
.cc-alert { color: #f14f13; }

.cc-main-grid,
.cc-bottom-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; margin-bottom: 24px; }
.cc-main-grid { grid-template-columns: 2fr 1fr; grid-template-areas: "revenue portfolio"; }
.cc-portfolio-panel { grid-area: portfolio; }
.cc-revenue-panel { grid-area: revenue; }
.cc-panel { padding: 25px 27px; border-radius: 16px; box-shadow: 0 8px 24px rgba(38, 61, 96, .07); }
.cc-panel-header { align-items: flex-start; margin-bottom: 18px; }
.cc-panel-header h2 { margin: 0 0 7px; color: #0d1b31; font-size: 20px; font-weight: 700; line-height: 1.3; }
.cc-panel-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; }
.cc-panel-stat strong { color: #198043; font-size: 11px; }
.cc-panel-stat small { color: var(--cc-muted); font-size: 10px; }
.cc-chart { position: relative; height: 245px; padding: 4px 0 20px 45px; }
.cc-y-labels { position: absolute; top: 0; bottom: 24px; left: 0; display: flex; flex-direction: column; justify-content: space-between; color: var(--cc-muted); font-size: 10px; }
.cc-line-chart { display: block; width: 100%; height: 210px; overflow: visible; }
.cc-gridline { fill: none; stroke: #dfe8f3; stroke-dasharray: 3 4; stroke-width: 1; }
.cc-area { fill: url(#cc-revenue-fill); }
.cc-line { fill: none; stroke: #1768ce; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.cc-line-dot { fill: #fff; stroke: #1768ce; stroke-width: 3; }
.cc-x-labels { position: absolute; right: 0; bottom: 0; left: 45px; display: flex; justify-content: space-between; color: var(--cc-muted); font-size: 10px; }

.cc-portfolio-panel { min-height: 350px; }
.cc-portfolio-content { display: flex; min-height: 250px; flex-direction: column; align-items: center; justify-content: center; gap: 17px; }
.cc-donut-wrap { position: relative; width: 100%; max-width: 250px; height: 220px; flex: 0 0 auto; }
.cc-donut-wrap canvas { display: block; width: 100% !important; height: 100% !important; }
.cc-donut-center { position: absolute; top: 50%; left: 50%; display: flex; width: 88px; height: 88px; flex-direction: column; align-items: center; justify-content: center; transform: translate(-50%, -50%); border-radius: 50%; background: transparent; pointer-events: none; }
.cc-donut-center strong { color: #11213a; font-size: 30px; line-height: 1.1; }
.cc-donut-center span { margin-top: 4px; color: var(--cc-muted); font-size: 8px; }
.cc-legend { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.cc-legend li { display: flex; align-items: flex-start; gap: 9px; color: #596d8b; font-size: 11px; }
.cc-legend li > i { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; }
.cc-legend-blue { background: #1768ce; }
.cc-legend-sky { background: #43a0f2; }
.cc-legend-pale { background: #8ac9f8; }
.cc-legend span { display: flex; flex-direction: column; gap: 2px; }
.cc-legend strong { color: #15233a; font-size: 12px; }
.cc-legend em { color: var(--cc-muted); font-style: normal; font-weight: 400; }

.cc-bottom-grid { grid-template-columns: 1fr 1fr; margin-bottom: 0; }
.cc-products-panel,
.cc-expiry-panel { min-height: 295px; }
.cc-total { padding-top: 4px; color: #687b99; font-size: 10px; white-space: nowrap; }
.cc-product-list { display: flex; flex-direction: column; gap: 16px; padding-top: 2px; }
.cc-product > div:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #243650; font-size: 11px; }
.cc-product strong { color: #102039; font-size: 11px; white-space: nowrap; }
.cc-progress { height: 8px; overflow: hidden; border-radius: 10px; background: #edf2f8; }
.cc-progress i { display: block; height: 100%; border-radius: inherit; background: #1768ce; }
.cc-progress-sky i { background: #43a0f2; }
.cc-progress-purple i { background: #7923a7; }
.cc-progress-green i { background: #328741; }
.cc-due-badge { padding: 5px 9px; border-radius: 20px; background: #fff4e9; color: #f05a15; font-size: 9px; font-weight: 700; white-space: nowrap; }
.cc-expiry-panel { padding-bottom: 0; }
.cc-expiry-list { margin: 0 -21px; }
.cc-expiry-row { display: grid; grid-template-columns: minmax(0, 1fr) 105px 58px; align-items: center; gap: 12px; min-height: 72px; padding: 12px 21px; border-top: 1px solid #edf1f6; }
.cc-expiry-soon { background: #fffaf5; }
.cc-expiry-client,
.cc-expiry-date { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.cc-expiry-client strong,
.cc-expiry-date strong { color: #12223b; font-size: 11px; line-height: 1.35; }
.cc-expiry-client small,
.cc-expiry-date small { color: var(--cc-muted); font-size: 9px; line-height: 1.35; }
.cc-expiry-date small { color: #e45624; }
.cc-review { display: inline-flex; width: 58px; height: 28px; align-items: center; justify-content: center; padding: 0; border: 1px solid #d5e6ff; border-radius: 7px; background: #eff6ff; color: #1768ce; font-size: 9px; font-weight: 700; line-height: 1; text-align: center; text-decoration: none; }
.cc-review:hover { border-color: #1768ce; color: #0e55ae; }

@media (max-width: 1100px) {
    .command-centre { padding-right: 22px; padding-left: 22px; }
    .cc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .command-centre { padding: 20px 15px 25px; }
    .cc-page-heading h1 { font-size: 20px; }
    .cc-main-grid,
    .cc-bottom-grid { grid-template-columns: 1fr; }
    .cc-main-grid { grid-template-areas: "revenue" "portfolio"; }
    .cc-portfolio-panel { min-height: 300px; }
    .cc-portfolio-content { flex-direction: row; }
    .cc-donut-wrap { height: 200px; }
}
@media (max-width: 480px) {
    .cc-page-heading { flex-direction: column; }
    .cc-kpis { gap: 10px; }
    .cc-kpi { min-height: 175px; padding: 15px; }
    .cc-kpi-value { font-size: 20px; }
    .cc-panel { padding: 17px 15px; }
    .cc-expiry-list { margin-right: -15px; margin-left: -15px; }
    .cc-expiry-row { grid-template-columns: minmax(0, 1fr) 88px 54px; gap: 7px; padding-right: 12px; padding-left: 12px; }
}
