/* ==========================================================================
   APE Distribution Kits — Summary Dashboard Stylesheet
   ========================================================================== */

/* ==========================================================================
   1. Scope & Variables
   ========================================================================== */


body.ape-summary-page {
    --ape-nav-height: 72px;
    --ape-summary-width: min(1280px, 94%);
    background: var(--ape-bg, #f7fbff);
}

/* override: kept later to preserve current visual */

body.ape-summary-page {
    background: #f3f8fd;
}

/* ==========================================================================
   2. Navbar
   ========================================================================== */


body.ape-summary-page #mainNav.navbar-default {
    min-height: 72px;
}

body.ape-summary-page #mainNav .navbar-brand {
    font-size: 17px;
    font-weight: 800;
}

body.ape-summary-page #mainNav .navbar-nav>li>a {
    font-size: 15px;
    font-weight: 600;
}

body.ape-summary-page #mainNav .navbar-toggle {
    margin-top: 18px;
    margin-bottom: 18px;
}

.ape-summary-page .summary-navbar {
    height: 86px;
    background: #eaf4ff;
    display: flex;
    align-items: center;
    border-top: 2px solid #f2c879;
}

/* ==========================================================================
   3. Page Shell & Base Layout
   ========================================================================== */


.ape-summary {
    color: var(--ape-text, #20364b);
}

.ape-summary-container,
.ape-summary .wrap {
    width: var(--ape-summary-width);
    max-width: 1280px;
    margin: 0 auto;
}

.ape-summary-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 20px;
    margin-top: 5px;
}

.ape-summary-meta strong {
    font-weight: 700;
}


.ape-summary .wrap {
    position: relative;
    z-index: 2;
    margin-top: -30px;
    padding: 0 0 40px;
}

.ape-summary .panel {
    background: #fff;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(23, 66, 122, 0.06);
    margin-top: 0;
    margin-bottom: 24px;
    border: 1px solid #e8eef7;
}

.ape-summary .panel:last-child {
    margin-bottom: 0;
}

.ape-summary .panel h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 800;
    color: var(--ape-text, #20364b);
}

.ape-summary label {
    display: block;
    font-size: 13px;
    color: var(--ape-muted, #64788d);
    margin-bottom: 4px;
    font-weight: 700;
}

.ape-summary select,
.ape-summary input[type="text"] {
    width: 100%;
    height: 48px;
    border: 1px solid #dbe4f0;
    background: #fff;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--ape-text, #20364b);
}

.ape-summary select:focus,
.ape-summary input[type="text"]:focus {
    outline: none;
    border-color: var(--ape-blue, #1f78ff);
    box-shadow: 0 0 0 3px rgba(31, 120, 255, 0.12);
}

.ape-summary .actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.ape-summary button.primary,
.ape-summary a.primary,
.ape-summary button.secondary {
    height: 48px;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ape-summary button.primary,
.ape-summary a.primary {
    border: none;
    background: var(--ape-blue, #1f78ff);
    color: #fff;
}

.ape-summary button.primary:hover,
.ape-summary a.primary:hover {
    background: #1568e6;
    color: #fff;
}

.ape-summary button.secondary {
    border: 1px solid #dbe4f0;
    background: #fff;
    color: var(--ape-text, #20364b);
}

.ape-summary button.secondary:hover {
    border-color: var(--ape-blue, #1f78ff);
    color: var(--ape-blue, #1f78ff);
}


.ape-summary .kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.ape-summary .kpi {
    background: linear-gradient(180deg, #fff, #f8fbff);
    border: 1px solid #e8eef7;
    border-radius: 16px;
    padding: 16px;
    min-height: 96px;
}

.ape-summary .kpi .label {
    color: var(--ape-muted, #64788d);
    font-size: 13px;
    font-weight: 700;
}

.ape-summary .kpi .value {
    font-size: 1.65rem;
    font-weight: 800;
    margin-top: 6px;
    color: var(--ape-text, #20364b);
}

.ape-summary .kpi .sub {
    color: var(--ape-muted, #64788d);
    font-size: 13px;
    margin-top: 6px;
}

.ape-summary .note {
    color: var(--ape-muted, #64788d);
    font-size: 14px;
    line-height: 1.55;
}

.ape-summary .summary-source {
    margin-top: 16px;
    color: var(--ape-muted, #64788d);
    font-size: 13px;
    line-height: 1.55;
}

.ape-summary .summary-source a {
    color: var(--ape-blue, #1f78ff);
}

.ape-summary-page .summary-hero {
    min-height: 300px;
    padding: 46px 0 72px;
    background: linear-gradient(135deg, #1677f2 0%, #35b5ff 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ape-summary-page .summary-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.ape-summary-page .summary-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(32px, 3vw, 48px);
    line-height: 1.12;
    font-weight: 800;
}

.ape-summary-page .summary-hero p {
    max-width: 860px;
    margin: 0 auto 24px;
    font-size: 16px;
    line-height: 1.7;
}

.ape-summary-page .summary-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
    font-size: 14px;
    font-weight: 600;
}

.ape-summary-page .summary-main {
    max-width: 1460px;
    margin: 0 auto;
    padding: 42px 24px 80px;
}

.ape-summary-page .summary-card {
    background: #fff;
    border: 1px solid #dce8f5;
    border-radius: 28px;
    padding: 36px;
    box-shadow: 0 16px 42px rgba(28, 64, 110, 0.08);
    margin-bottom: 28px;
}

.ape-summary-page .summary-card h2,
.ape-summary-page .summary-card h3 {
    margin: 0 0 24px;
    color: #17233a;
    font-size: 18px;
    font-weight: 800;
}

.ape-summary-page .summary-btn {
    height: 56px;
    padding: 0 26px;
    border-radius: 14px;
    border: 1px solid #cddced;
    background: #fff;
    color: #17233a;
    font-size: 16px;
    font-weight: 800;
}

.ape-summary-page .summary-btn.primary {
    background: #2478ff;
    border-color: #2478ff;
    color: #fff;
}

.ape-summary-meta-chips {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 18px;
}

.ape-summary-meta-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px);
}

.island-sumatra {
    width: 110px;
    height: 26px;
    left: 12px;
    top: 78px;
    border-radius: 70% 35% 60% 40%;
    transform: rotate(-24deg);
}

.island-java {
    width: 138px;
    height: 16px;
    left: 118px;
    top: 142px;
    border-radius: 999px;
    transform: rotate(4deg);
}

.island-kalimantan {
    width: 112px;
    height: 82px;
    left: 180px;
    top: 56px;
    border-radius: 44% 56% 48% 52%;
    transform: rotate(-8deg);
}

.island-sulawesi {
    width: 82px;
    height: 74px;
    left: 300px;
    top: 74px;
    border-radius: 45% 22% 58% 24%;
    transform: rotate(18deg);
}

.island-ntt {
    width: 120px;
    height: 14px;
    left: 266px;
    top: 158px;
    border-radius: 999px;
    transform: rotate(-4deg);
}

.island-papua {
    width: 144px;
    height: 88px;
    right: 8px;
    top: 86px;
    border-radius: 52% 48% 42% 58%;
    transform: rotate(-5deg);
}

.pin-ntt {
    left: 308px;
    top: 130px;
}

.pin-papua {
    right: 86px;
    top: 68px;
}

/* Make the role selector less heavy, so the dashboard starts faster visually. */
.ape-summary .wrap>.panel:first-child {
    padding: 18px 26px;
    border-radius: 22px;
}

.ape-summary .wrap>.panel:first-child h2 {
    margin-bottom: 10px;
    font-size: .95rem;
}

/* override: kept later to preserve current visual */
.ape-summary-meta-chips span {
    font-size: 15px;
    min-height: 44px;
    padding: 10px 18px;
}

.ape-dot {
    width: 12px;
    height: 12px;
    display: inline-block;
    border-radius: 999px;
}

.ape-dot.ntt {
    background: #31b57b;
}

.ape-dot.papua {
    background: #f5b400;
}

.ape-hero-kpi-sub {
    margin-top: 8px;
    color: #5f748a;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 600;
}

.ape-meta-icon {
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2478ff;
    background: #eef5ff;
    font-size: 18px;
}

.ape-meta-label {
    display: block;
    color: #2478ff;
    font-size: 14px;
    font-weight: 900;
}

.ape-meta-value {
    display: block;
    margin-top: 4px;
    color: #10284a;
    font-size: 14px;
    font-weight: 800;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-sub {
    display: none;
}

.gps-quality-list {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.gps-quality-row {
    display: grid;
    gap: 8px;
}

.gps-quality-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
    color: #1f344a;
}

.gps-quality-total {
    color: #1f344a;
}

.gps-quality-bar {
    display: flex;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef3f8;
}

.gps-quality-bar span {
    display: block;
    min-width: 2px;
}

.gps-quality-good {
    background: #16834a;
}

.gps-quality-medium {
    background: #b85d08;
}

.gps-quality-bad {
    background: #b91c1c;
}

.gps-quality-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    color: #64748b;
}

.gps-quality-meta .dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-radius: 999px;
}

.gps-quality-meta .good {
    background: #16834a;
}

.gps-quality-meta .medium {
    background: #b85d08;
}

.gps-quality-meta .bad {
    background: #b91c1c;
}

.bar-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bar-tag {
    display: inline-block;
    width: fit-content;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
}

.card-head-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.mini-badge {
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.grade-badge {
    background: #ecfdf5;
    color: #15803d;
}

.insight-card {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32%),
        #ffffff;
}

.insight-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    color: #15803d;
    font-weight: 900;
    flex-shrink: 0;
}

.score-circle {
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: conic-gradient(#15803d calc(var(--score, 76) * 1%), #e5edf5 0);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.score-circle>div {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: #ffffff;
    display: grid;
    place-items: center;
    align-content: center;
}

.score-circle strong {
    font-size: 30px;
    line-height: 1;
    color: #15803d;
}

.score-circle span {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.score-grade {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
}

.score-desc {
    margin: 8px 0 0;
    color: #64748b;
    line-height: 1.5;
}

.score-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.score-breakdown span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.score-bar {
    height: 10px;
    background: #e5edf5;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 16px;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #15803d);
    border-radius: 999px;
}

.score-components {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.score-component {
    display: grid;
    gap: 7px;
}

.score-component-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 800;
    color: #475569;
}

.score-component-track {
    height: 8px;
    border-radius: 999px;
    background: #e5edf5;
    overflow: hidden;
}

.score-component-fill {
    height: 100%;
    border-radius: 999px;
}

.recommendation-card {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 34%),
        #ffffff;
}

.recommendation-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.recommendation-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5edf5;
}

.recommendation-number {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 900;
    flex-shrink: 0;
}

.recommendation-item strong {
    display: block;
    color: #0f172a;
    font-weight: 900;
    margin-bottom: 4px;
}

.recommendation-item p {
    margin: 0;
    color: #475569;
    line-height: 1.45;
}

.trend-good {
    background: #ecfdf5;
    color: #15803d;
}

.trend-watch {
    background: #fff7ed;
    color: #c2410c;
}

.svg-wrap {
    margin-top: 16px;
    border: 1px solid #e5edf5;
    border-radius: 18px;
    background: #fff;
    padding: 10px;
}

.svg-wrap svg {
    width: 100%;
    height: 260px;
    display: block;
}

.grid-line {
    stroke: #e5edf5;
    stroke-width: 1;
}

.target-line {
    stroke: #94a3b8;
    stroke-width: 1.5;
    stroke-dasharray: 6 6;
}

.axis-label,
.x-label {
    font-size: 11px;
    fill: #64748b;
    font-weight: 700;
}

.target-label {
    font-size: 11px;
    fill: #64748b;
    font-weight: 800;
}

.point-label {
    font-size: 11px;
    fill: #0f172a;
    font-weight: 900;
}

.trend-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.dot-green,
.dot-orange {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
}

.dot-green {
    background: #15803d;
}

.dot-orange {
    background: #f97316;
}

.quality-period-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.quality-period-row {
    display: grid;
    grid-template-columns: 110px 1fr 120px;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5edf5;
}

.quality-period-row:last-child {
    border-bottom: 0;
}

.period-label strong {
    display: block;
    color: #0f172a;
    font-weight: 900;
}

.period-label span,
.period-value span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
}

.period-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: #e5edf5;
}

.period-fill {
    height: 100%;
    border-radius: 999px;
}

.period-target {
    position: absolute;
    top: -4px;
    width: 2px;
    height: 20px;
    background: #64748b;
    border-radius: 999px;
}

.period-value {
    text-align: right;
}

.period-value strong {
    color: #0f172a;
    font-weight: 900;
}

.ape-quick-link {
    min-height: 68px;
    padding: 14px 18px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 800;
    color: #183150;
    transition: all .2s ease;
}

.ape-quick-link i {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.ape-quick-link:hover {
    transform: translateY(-2px);
}

/* ==========================================================================
   4. Dashboard Shell
   ========================================================================== */

/* New APE Dashboard with Map */
/* =========================================================
   APE Summary — Advanced Dashboard Hero + Map Layout
   Add at the bottom of ape-summary.css
   ========================================================= */

.ape-dashboard-shell {
    background: #ffffff;
    border: 1px solid #dce8f5;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(28, 64, 110, 0.08);
}

.ape-dashboard-hero {
    background: #ffffff;
}

/* override: kept later to preserve current visual */

.ape-dashboard-hero {
    padding-bottom: 0 !important;
}

/* ==========================================================================
   5. Hero
   ========================================================================== */


.ape-summary-hero {
    position: relative;
    background: linear-gradient(135deg, #1577f2 0%, #35a9ff 100%);
    color: #fff;
    padding: calc(72px + 28px) 0 36px;
    text-align: center;
}

.ape-summary-hero .ape-summary-container {
    position: relative;
    z-index: 1;
}

.ape-summary-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.ape-summary-hero h1 {
    margin: 0 auto 10px;
    font-size: clamp(1.85rem, 3.2vw, 2.45rem);
    line-height: 1.12;
    font-weight: 800;
    max-width: 820px;
}

.ape-summary-lead {
    margin: 0 auto;
    max-width: 720px;
    line-height: 1.55;
    opacity: 0.96;
}

.ape-summary-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 44px;
    display: block;
}

/* override: kept later to preserve current visual */

.ape-summary-hero {
    text-align: left;
    padding: calc(72px + 34px) 0 74px;
    overflow: hidden;
}

.ape-summary-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .42) 0 2px, transparent 2px),
        linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 34px 34px, 56px 56px, 56px 56px;
    pointer-events: none;
}

.ape-summary-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 44px;
    align-items: center;
}

.ape-summary-hero-copy {
    max-width: 780px;
}

/* override: kept later to preserve current visual */
.ape-summary-hero h1 {
    margin-left: 0;
    margin-right: 0;
    max-width: 720px;
    font-size: clamp(2.15rem, 4vw, 3.55rem);
    letter-spacing: -0.035em;
}

/* override: kept later to preserve current visual */
.ape-summary-lead {
    margin-left: 0;
    margin-right: 0;
    max-width: 680px;
    font-size: 1.08rem;
}

.ape-hero-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
    max-width: 780px;
}

.ape-summary-hero-visual {
    position: relative;
    z-index: 1;
}

.ape-map-card {
    position: relative;
    min-height: 355px;
    padding: 24px;
    border-radius: 34px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 24px 70px rgba(10, 48, 110, .18);
    backdrop-filter: blur(14px);
}

.ape-map-card-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    font-size: .86rem;
    font-weight: 700;
    opacity: .95;
}

.ape-map-card-top strong {
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
}

.ape-indonesia-map {
    position: relative;
    height: 210px;
    margin: 18px 0 20px;
}

.ape-map-island {
    position: absolute;
    display: block;
    background: rgba(255, 255, 255, .46);
    border: 1px solid rgba(255, 255, 255, .45);
    box-shadow: 0 14px 34px rgba(12, 69, 140, .12);
}

.ape-map-island.is-active {
    background: #ffe36e;
    border-color: rgba(255, 255, 255, .8);
}

.ape-map-pin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}

.ape-map-pin i {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #ff4f7b;
    border: 3px solid #fff;
    box-shadow: 0 0 0 7px rgba(255, 79, 123, .18);
}

/* Ringkasan Distribusi APE PAUD */

.ape-summary-hero {
    padding: calc(72px + 44px) 0 92px;
}

/* override: kept later to preserve current visual */
.ape-summary-badge {
    font-size: 15px;
    padding: 10px 22px;
}

/* override: kept later to preserve current visual */
.ape-summary-hero h1 {
    font-size: 35px;
    line-height: 1.05;
}

/* override: kept later to preserve current visual */
.ape-summary-lead {
    font-size: 16px;
    line-height: 1.5;
    max-width: 760px;
}

/* override: kept later to preserve current visual */
.ape-map-card {
    min-height: 430px;
    padding: 30px;
}

/* override: kept later to preserve current visual */
.ape-map-card-top {
    font-size: 16px;
}

/* override: kept later to preserve current visual */
.ape-indonesia-map {
    height: 260px;
}


.ape-hero-top {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 48px;
    align-items: start;
    min-height: auto;
    padding: 50px 64px 8px;
    overflow: hidden;
    background:
        radial-gradient(circle at 86% 10%, rgba(47, 128, 237, .14), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 55%, #eef7ff 100%);
}

/* override: kept later to preserve current visual */
.ape-hero-top {
    border-bottom: 1px solid rgba(31, 85, 150, .08);
}

.ape-hero-bg-dots {
    position: absolute;
    left: 0;
    top: 12px;
    width: 170px;
    height: 230px;
    opacity: .32;
    background-image: radial-gradient(#2f80ed 1.4px, transparent 1.4px);
    background-size: 14px 14px;
    pointer-events: none;
}

.ape-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.ape-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 26px;
    padding: 10px 22px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2478f2, #1f6fe5);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    box-shadow: 0 10px 22px rgba(36, 120, 242, .20);
}

.ape-hero-copy h1 {
    margin: 0;
    color: #10284a;
    font-size: clamp(38px, 3.4vw, 54px);
    line-height: 1.12;
    letter-spacing: -0.045em;
    font-weight: 900;
}

.ape-hero-copy p {
    margin: 20px 0 0;
    max-width: 720px;
    color: #526985;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 600;
}

.ape-hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 16px;
    max-width: 620px;
    margin-top: 12px;
}

.ape-hero-meta-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 16px 18px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid #e4edf8;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(28, 64, 110, .07);
}

.meta-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #edf5ff;
    color: #2478f2;
    font-size: 19px;
}

.ape-hero-meta-item small {
    display: block;
    margin: 0 0 5px;
    color: #607898;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
}

.ape-hero-meta-item strong {
    display: block;
    margin: 0;
    color: #10284a;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 900;
}

.ape-hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-height: 260px;
}

.ape-hero-visual img {
    display: block;
    width: 420px;
    max-width: 100%;
    height: auto;
    object-fit: contain;

    background: transparent;
    box-shadow: none;

    filter: drop-shadow(0 18px 32px rgba(28, 64, 110, .10));
}

/* ==========================================================================
   6. Map
   ========================================================================== */

.ape-map-insights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ape-map-insights div {
    padding: 13px 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .16);
}

.ape-map-insights strong,
.ape-map-insights span {
    display: block;
}

.ape-map-insights strong {
    font-size: 1.22rem;
    line-height: 1;
    font-weight: 900;
}

.ape-map-insights span {
    margin-top: 6px;
    font-size: .76rem;
    line-height: 1.25;
    font-weight: 700;
    opacity: .86;
}

/* override: kept later to preserve current visual */
.ape-map-insights strong {
    font-size: 18px;
}

/* override: kept later to preserve current visual */
.ape-map-insights span {
    font-size: 14px;
}

.ape-map-area {
    position: relative;
    min-height: 0 !important;
    background: #eaf6ff;
    border-top: 1px solid #e4edf8;
    border-bottom: 1px solid #e4edf8;
}

#apeDistributionMap {
    width: 100%;
    height: 300px !important;
    min-height: 300px !important;
    z-index: 1;
}

.ape-map-title {
    position: absolute;
    top: 10px;
    left: 50px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #10284a;
    font-size: 20px;
    font-weight: 900;
}

.ape-map-title small {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf2ff;
    color: #2478ff;
    font-size: 13px;
}

.ape-map-floating-legend {
    position: absolute;
    top: 48px;
    left: 50px;
    z-index: 500;
    display: flex;
    gap: 10px;
}

.ape-map-floating-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #10284a;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(28, 64, 110, 0.08);
}

.ape-region-panel {
    position: absolute;
    top: 22px;
    right: 28px;
    z-index: 500;
    width: 260px;
    max-width: calc(100% - 56px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e4edf8;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 18px 46px rgba(28, 64, 110, 0.14);
    backdrop-filter: blur(10px);
}

.ape-region-panel h3 {
    margin: 0 0 18px;
    color: #10284a;
    font-size: 18px;
    font-weight: 900;
}

.ape-region-group {
    margin-bottom: 18px;
}

.ape-region-group:last-child {
    margin-bottom: 0;
}

.ape-region-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #10284a;
    font-size: 17px;
    font-weight: 900;
}

.ape-region-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ape-region-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #20364b;
    font-size: 14px;
    font-weight: 700;
}

.ape-region-list i {
    color: inherit;
    opacity: 0.8;
}

.ape-region-divider {
    height: 1px;
    margin: 16px 0;
    background: #dce8f5;
}

/* Leaflet visual adjustment */
.ape-map-area .leaflet-container {
    background: #eaf6ff;
    font-family: Inter, sans-serif;
}

.ape-map-area .leaflet-control-zoom {
    border: none;
    box-shadow: 0 10px 24px rgba(28, 64, 110, 0.12);
}

.ape-map-area .leaflet-control-zoom a {
    border: none;
    color: #10284a;
    font-weight: 900;
}

.ape-map-area .leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(28, 64, 110, 0.18);
}

.ape-map-area .leaflet-popup-content {
    margin: 14px 16px;
    color: #10284a;
    font-family: Inter, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

/* override: kept later to preserve current visual */
.ape-map-area {
    min-height: 0 !important;
}

/* override: kept later to preserve current visual */
#apeDistributionMap {
    height: 340px !important;
    min-height: 340px !important;
}

/* override: kept later to preserve current visual */

.ape-map-area {
    overflow: hidden;
}

/* override: kept later to preserve current visual */
.ape-region-panel {
    top: 24px !important;
    right: 28px !important;
    max-height: 300px;
    overflow-y: auto;
    padding: 18px 20px;
}

/* override: kept later to preserve current visual */
.ape-region-panel h3 {
    font-size: 17px;
    margin-bottom: 14px;
}

/* override: kept later to preserve current visual */
.ape-region-title {
    font-size: 16px;
    margin-bottom: 8px;
}

/* override: kept later to preserve current visual */
.ape-region-list {
    gap: 7px;
}

/* override: kept later to preserve current visual */
.ape-region-list li {
    font-size: 13px;
}

/* override: kept later to preserve current visual */
.ape-region-divider {
    margin: 12px 0;
}

/* ==========================================================================
   7. View Mode & Filters
   ========================================================================== */


.ape-summary .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ape-summary .tab {
    border: 1px solid #dbe4f0;
    background: #fff;
    color: var(--ape-text, #20364b);
    border-radius: 999px;
    padding: 9px 15px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ape-summary .tab:hover {
    border-color: var(--ape-blue, #1f78ff);
    color: var(--ape-blue, #1f78ff);
}

.ape-summary .tab.active {
    background: var(--ape-blue, #1f78ff);
    color: #fff;
    border-color: var(--ape-blue, #1f78ff);
}


.ape-summary .grid-filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px 12px;
}

.ape-summary .filter-search-wide {
    grid-column: span 2;
}

.ape-summary .table-wrap {
    overflow: auto;
    border: 1px solid #e8eef7;
    border-radius: 14px;
}

.ape-summary-page .role-tabs {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.ape-summary-page .role-tabs button {
    height: 54px;
    padding: 0 28px;
    border-radius: 999px;
    border: 1px solid #cddced;
    background: #fff;
    color: #17233a;
    font-size: 16px;
    font-weight: 800;
}

.ape-summary-page .role-tabs button.active {
    background: #2478ff;
    color: #fff;
    border-color: #2478ff;
}

.ape-summary-page .filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px 20px;
    align-items: end;
}

.ape-summary-page .filter-group label {
    display: block;
    margin-bottom: 9px;
    color: #62758d;
    font-size: 15px;
    font-weight: 800;
}

.ape-summary-page .filter-group select,
.ape-summary-page .filter-group input {
    width: 100%;
    height: 56px;
    border: 1px solid #cddced;
    border-radius: 14px;
    padding: 0 18px;
    background: #fff;
    color: #17233a;
    font-size: 16px;
}

.ape-summary-page .filter-group.search-field {
    grid-column: span 2;
}

.ape-view-mode {
    min-width: 440px;
}

.ape-view-mode-label {
    display: block;
    margin-bottom: 10px;
    color: #2378ff;
    font-size: 14px;
    font-weight: 800;
}

.ape-view-mode .tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ape-view-mode .tab {
    height: 50px;
    border: 1px solid #dbe4f0;
    background: #ffffff;
    color: #10284a;
    border-radius: 12px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 800;
}

.ape-view-mode .tab.active {
    background: #eef5ff;
    border-color: #2478ff;
    color: #2478ff;
    box-shadow: 0 6px 18px rgba(36, 120, 255, 0.12);
}

.ape-filter-section {
    padding: 0px 34px 34px;
    background: #ffffff;
}

.ape-filter-section h2,
.ape-filter-section h3 {
    margin: 0 0 16px;
    color: #2478ff;
    font-size: 20px;
    font-weight: 900;
}

.ape-filter-header {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.ape-filter-header h2 {
    margin-bottom: 6px;
}

.ape-filter-header p {
    margin: 0;
    color: #5f748a;
    font-size: 14px;
    line-height: 1.5;
}

.ape-view-mode-filter {
    min-width: 420px;
}

/* override: kept later to preserve current visual */
.ape-filter-section {
    padding: 0 34px 34px !important;
    margin-top: 0 !important;
}

/* override: kept later to preserve current visual */
.ape-filter-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ==========================================================================
   8. KPI Cards
   ========================================================================== */

.ape-hero-kpi {
    min-height: 92px;
    padding: 16px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
    backdrop-filter: blur(10px);
}

.ape-hero-kpi-value {
    display: block;
    font-size: clamp(1.55rem, 2.4vw, 2.2rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.ape-hero-kpi-label {
    display: block;
    margin-top: 8px;
    font-size: .82rem;
    line-height: 1.3;
    font-weight: 700;
    opacity: .88;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi {
    min-height: 20px;
    padding: 22px 20px;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-value {
    font-size: 28px;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-label {
    font-size: 15px;
    margin-top: 12px;
}

.ape-hero-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    padding: 22px 28px 14px;
    background: #f7fbff;
}

.ape-hero-kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 130px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e3edf8;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(28, 64, 110, 0.06);
}

.ape-hero-kpi-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    box-shadow: 0 10px 24px rgba(28, 64, 110, 0.18);
}

.ape-hero-kpi-icon.blue {
    background: #2478ff;
}

.ape-hero-kpi-icon.green {
    background: #31b57b;
}

.ape-hero-kpi-icon.purple {
    background: #7657dc;
}

.ape-hero-kpi-icon.yellow {
    background: #f5b400;
}

.ape-hero-kpi-icon.teal {
    background: #23a8b6;
}

.ape-hero-kpi-icon.red {
    background: #e25555;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-value {
    color: #10284a;
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-label {
    margin-top: 8px;
    color: #10284a;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
}

.ape-summary-meta-strip,
.ape-meta-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 12px 28px 28px;
    margin-bottom: 24px !important;
    background: #ffffff;
    border: 1px solid #e3edf8;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(28, 64, 110, 0.05);
}

.ape-meta-item {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 86px;
    padding: 18px 28px;
    border-right: 1px solid #e3edf8;
}

.ape-meta-item:last-child {
    border-right: none;
}

/* override: kept later to preserve current visual */
.ape-hero-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 24px 34px;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-card {
    min-height: 104px;
    padding: 18px 22px;
    align-items: center;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    font-size: 21px;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-value {
    font-size: 32px;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-label {
    font-size: 14px;
    margin-top: 4px;
}

/* override: kept later to preserve current visual */
.ape-hero-kpis {
    padding: 22px 34px 16px !important;
    margin: 0 !important;
}

/* override: kept later to preserve current visual */
.ape-hero-kpi-card {
    min-height: 92px !important;
}

.ape-meta-strip {
    margin: 0 34px 28px !important;
}

/* ==========================================================================
   9. Dashboard Layouts
   ========================================================================== */

.ape-summary .layout-1 {
    margin-top: 14px;
}

.ape-summary .layout-2 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 14px;
    margin-top: 14px;
}

.ape-summary .layout-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.ape-summary .role-intro {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ape-summary .role-intro .blurb {
    color: var(--ape-muted, #64788d);
    max-width: 860px;
    line-height: 1.55;
    font-size: 14px;
}

/* ==========================================================================
   10. Chart Cards & Visual Components
   ========================================================================== */

.ape-summary .chart-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e8eef7;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(23, 66, 122, 0.05);
}

.ape-summary .chart-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
}

.ape-summary .chart-card p.desc {
    margin: 0 0 12px;
    color: var(--ape-muted, #64788d);
    font-size: 13px;
}

.ape-summary .bar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ape-summary .bar-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.4fr) 4fr 60px;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.ape-summary .bar-track {
    height: 12px;
    background: #edf2f7;
    border-radius: 999px;
    overflow: hidden;
}

.ape-summary .bar-fill {
    height: 100%;
    border-radius: 999px;
}

.ape-summary .pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e8eef7;
    color: var(--ape-text, #20364b);
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.ape-summary .svg-box {
    width: 100%;
    height: 260px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    border: 1px solid #e8eef7;
    border-radius: 14px;
    padding: 8px;
}

.ape-summary .legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 0;
}

.ape-summary .legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ape-muted, #64788d);
}

.ape-summary .legend i {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 999px;
}

/* .bar-row strong {
    min-width: 72px;
} */

/* .bar-percent {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
} */

/* ==========================================================================
   11. Tables
   ========================================================================== */

.ape-summary table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

.ape-summary th,
.ape-summary td {
    border-bottom: 1px solid #e8eef7;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.ape-summary th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ape-summary tr:hover td {
    background: #f8fbff;
}

/* ==========================================================================
   12. Executive Insights
   ========================================================================== */

.insight-list {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.insight-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid #e5edf5;
}

.insight-item:nth-child(n+3) .insight-icon {
    background: #ffedd5;
    color: #c2410c;
}

.insight-item p {
    margin: 0;
    line-height: 1.45;
    color: #1e293b;
}

.executive-insight-card .insight-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.executive-insight-card .insight-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e5edf6;
}

.executive-insight-card .insight-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef6ff;
    font-size: 20px;
    line-height: 1;
}

.executive-insight-card .insight-content {
    flex: 1;
    min-width: 0;
}

.executive-insight-card .insight-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
}

.executive-insight-card .insight-content p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.executive-insight-card .insight-item.good {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.executive-insight-card .insight-item.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.executive-insight-card .insight-item.risk,
.executive-insight-card .insight-item.danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.executive-insight-card .insight-item.info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

/* ==========================================================================
   13. Quality Score & Trend
   ========================================================================== */

.quality-score-card {
    background:
        radial-gradient(circle at top right, rgba(21, 128, 61, 0.10), transparent 34%),
        #ffffff;
}

.quality-score {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 22px;
}

.quality-trend-card {
    background:
        radial-gradient(circle at top right, rgba(21, 128, 61, 0.08), transparent 34%),
        #ffffff;
}

.quality-trend-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.quality-trend-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

/* ==========================================================================
   14. Follow-up List
   ========================================================================== */

.followup-card .table-wrap {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.followup-footer {
    border-top: 1px solid #e6edf5;
    margin-top: 0;
    padding: 14px 18px;
    background: #f8fafc;
    border-radius: 0 0 18px 18px;
}

.followup-more {
    width: 100%;
    border: 0;
    background: transparent;
    color: #2563eb;
    font-weight: 700;
    cursor: pointer;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    font-size: 14px;
    text-align: left;
}

.followup-more:hover {
    color: #1d4ed8;
}

.followup-more:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 8px;
}

.followup-more i {
    margin-left: 6px;
}

/* Temuan & Dokumen Pendukung (Monitoring) */
.ape-findings-docs-card .ape-evidence-split {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ape-findings-docs-card .ape-evidence-subtitle {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #475569;
}

.ape-findings-docs-card .ape-finding-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ape-findings-docs-card .ape-finding-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: #334155;
}

.ape-findings-docs-card .ape-finding-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    font-weight: 600;
    white-space: nowrap;
}

.ape-findings-docs-card .ape-finding-label .fa {
    color: #d97706;
    font-size: 12px;
}

.ape-findings-docs-card .ape-finding-row.is-calm .ape-finding-label .fa {
    color: #94a3b8;
}

.ape-findings-docs-card .ape-finding-dots {
    flex: 1 1 auto;
    min-width: 12px;
    border-bottom: 1px dotted #cbd5e1;
    transform: translateY(-4px);
}

.ape-findings-docs-card .ape-finding-value {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
}

.ape-findings-docs-card .ape-finding-row.is-attention .ape-finding-value {
    color: #b45309;
}

.ape-findings-docs-card .ape-doc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ape-findings-docs-card .ape-doc-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}

.ape-findings-docs-card .ape-doc-head strong {
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    white-space: nowrap;
}

.ape-findings-docs-card .ape-doc-track {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.ape-findings-docs-card .ape-doc-fill {
    height: 100%;
    border-radius: 999px;
    background: #0f766e;
}

.empty-state {
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
}

/* ==========================================================================
   15. Methodology
   ========================================================================== */


.ape-methodology-panel {
    padding: 34px 36px 40px;
}

.ape-methodology-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 26px;
    padding-bottom: 26px;
}

.ape-methodology-main-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #eefdf8;
    color: #169b7c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.ape-methodology-head h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.2;
    color: #183150;
}

.ape-methodology-head p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.45;
}

.ape-methodology-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid #e4edf8;
    padding-top: 30px;
}

.ape-method-card {
    padding: 0 28px;
    border-left: 1px solid #e4edf8;
}

.ape-method-card:first-child {
    border-left: 0;
    padding-left: 0;
}

.ape-method-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    font-size: 20px;
}

.ape-method-card h3 {
    margin: 0 0 18px;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
}

.ape-method-card h3::after {
    content: "";
    display: block;
    width: 68px;
    height: 4px;
    border-radius: 999px;
    margin-top: 12px;
    background: currentColor;
}

.ape-method-card p,
.ape-method-card li {
    margin: 0;
    color: #334155;
    font-size: 16px;
    line-height: 1.65;
}

.ape-method-card ul {
    margin: 0;
    padding-left: 18px;
}

.ape-method-card li {
    margin-bottom: 6px;
}

.ape-method-card li strong {
    display: inline;
    margin-left: 8px;
    font-weight: 700;
}

.ape-method-card a {
    color: #2463eb;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
}

.ape-method-card a:hover {
    color: #d97706;
    text-decoration: underline;
}

.ape-method-green h3,
.ape-method-green .ape-method-icon {
    color: #138a72;
}

.ape-method-green .ape-method-icon {
    background: #eafaf5;
}

.ape-method-blue h3,
.ape-method-blue .ape-method-icon {
    color: #2563eb;
}

.ape-method-blue .ape-method-icon {
    background: #eff6ff;
}

.ape-method-purple h3,
.ape-method-purple .ape-method-icon {
    color: #6d28d9;
}

.ape-method-purple .ape-method-icon {
    background: #f3e8ff;
}

.ape-method-orange h3,
.ape-method-orange .ape-method-icon {
    color: #d97706;
}

.ape-method-orange .ape-method-icon {
    background: #fff7ed;
}

/* ==========================================================================
   16. Quick Footer Navigation
   ========================================================================== */


.ape-quick-menu-footer {
    padding: 28px 48px 44px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.ape-quick-menu-row {
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid #dfeaf7;
    background: rgba(255, 255, 255, .82);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.quick-blue i {
    background: #eaf2ff;
    color: #2563eb;
}

.quick-green i {
    background: #e9fbf2;
    color: #14966f;
}

.quick-purple i {
    background: #f0e8ff;
    color: #7c3aed;
}

.quick-orange i {
    background: #fff0db;
    color: #d97706;
}

.quick-blue:hover {
    background: #f4f8ff;
    color: #2563eb;
}

.quick-green:hover {
    background: #f2fcf7;
    color: #14966f;
}

.quick-purple:hover {
    background: #f7f2ff;
    color: #7c3aed;
}

.quick-orange:hover {
    background: #fff8ed;
    color: #d97706;
}

/* ==========================================================================
   17. Responsive
   ========================================================================== */

@media (max-width: 1280px) {
    .ape-hero-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ape-view-mode {
        min-width: 380px;
    }
}

@media (min-width: 768px) {
    body.ape-summary-page #mainNav .container-fluid {
        min-height: 72px;
    }

    body.ape-summary-page #mainNav .navbar-nav>li>a {
        line-height: 72px;
        padding: 0 14px;
    }
}


@media (max-width: 1180px) {
    .ape-summary .grid-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ape-summary .filter-search-wide {
        grid-column: span 3;
    }

    .ape-summary .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ape-summary .layout-2,
    .ape-summary .layout-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body.ape-summary-page {
        --ape-summary-width: min(1280px, 92%);
    }

    .ape-summary .grid-filters,
    .ape-summary .filter-search-wide {
        grid-template-columns: 1fr;
        grid-column: auto;
    }

    .ape-summary .kpis {
        grid-template-columns: 1fr;
    }

    .ape-summary .wrap {
        margin-top: -35px;
        padding-bottom: 32px;
    }

    .ape-summary .panel {
        padding: 22px 18px;
        margin-bottom: 18px;
    }

    .ape-summary-hero {
        padding: calc(72px + 20px) 0 28px;
    }

    .ape-summary-wave {
        height: 32px;
    }
}

@media (max-width: 1200px) {
    .ape-summary-page .filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ape-summary-page .filter-group.search-field {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .ape-summary-page .summary-hero {
        padding: 38px 20px 56px;
    }

    .ape-summary-page .summary-main {
        padding: 28px 16px 56px;
    }

    .ape-summary-page .summary-card {
        padding: 24px;
        border-radius: 22px;
    }

    .ape-summary-page .filter-grid {
        grid-template-columns: 1fr;
    }

    .ape-summary-page .filter-group.search-field {
        grid-column: auto;
    }

    .ape-summary-page .summary-meta {
        gap: 10px;
        flex-direction: column;
    }
}

@media (max-width: 1080px) {
    .ape-summary-hero-grid {
        grid-template-columns: 1fr;
    }

    .ape-map-card {
        max-width: 680px;
    }
}

@media (max-width: 760px) {
    .ape-summary-hero {
        text-align: center;
        padding: calc(72px + 24px) 0 62px;
    }

    .ape-summary-lead,
    .ape-summary-hero h1,
    .ape-summary-hero-copy {
        margin-left: auto;
        margin-right: auto;
    }

    .ape-hero-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ape-summary-meta-chips {
        justify-content: center;
    }

    .ape-map-card {
        min-height: auto;
        padding: 18px;
        border-radius: 26px;
    }

    .ape-indonesia-map {
        transform: scale(.78);
        transform-origin: center;
        margin: -12px -50px 0;
    }

    .ape-map-insights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .ape-view-mode {
        width: 100%;
        min-width: 0;
    }

    .ape-region-panel {
        position: relative;
        top: auto;
        right: auto;
        width: auto;
        max-width: none;
        margin: 16px 18px 18px;
    }

    .ape-map-area {
        padding-bottom: 1px;
    }

    #apeDistributionMap {
        height: 360px;
        min-height: 360px;
    }

    .ape-summary-meta-strip,
    .ape-meta-strip {
        grid-template-columns: 1fr;
    }

    .ape-meta-item {
        border-right: none;
        border-bottom: 1px solid #e3edf8;
    }

    .ape-meta-item:last-child {
        border-bottom: none;
    }
}

@media (max-width: 720px) {
    .ape-dashboard-shell {
        border-radius: 18px;
    }

    .ape-view-mode .tabs {
        grid-template-columns: 1fr;
    }

    .ape-map-title,
    .ape-map-floating-legend {
        left: 16px;
    }

    .ape-map-floating-legend {
        flex-direction: column;
    }

    .ape-hero-kpis {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .ape-summary-meta-strip,
    .ape-meta-strip {
        margin: 0 18px 22px;
    }
}

@media (max-width: 960px) {
    .ape-filter-header {
        flex-direction: column;
    }

    .ape-view-mode-filter {
        width: 100%;
        min-width: 0;
    }
}

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

    .ape-method-card:nth-child(2) {
        border-right: 0;
    }
}

@media (max-width: 720px) {
    .ape-methodology-panel {
        padding: 22px;
    }

    .ape-methodology-grid {
        grid-template-columns: 1fr;
    }

    .ape-method-card {
        border-left: 0;
        border-bottom: 1px solid #e5edf6;
        padding: 0 0 20px;
    }

    .ape-method-card:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 1100px) {
    .ape-hero-top {
        grid-template-columns: 1fr;
        padding: 36px 34px 32px;
    }

    .ape-hero-visual {
        display: none;
    }
}

@media (max-width: 720px) {
    .ape-hero-top {
        padding: 30px 22px;
        min-height: auto;
    }

    .ape-hero-copy h1 {
        font-size: clamp(28px, 8vw, 34px);
        line-height: 1.15;
        letter-spacing: -0.03em;
    }

    .ape-hero-copy p {
        font-size: 16px;
    }

    .ape-hero-meta {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 12px;
    }
}

@media (max-width: 900px) {
    .ape-quick-menu-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ape-quick-menu-footer {
        padding: 42px 20px 32px;
    }
}

@media (max-width: 560px) {
    .ape-quick-menu-footer {
        padding: 22px 18px 34px;
    }

    .ape-quick-menu-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Monitoring hybrid charts (ApexCharts + Highcharts)
   ========================================================================== */

/*
 * Root cause of large vertical gaps between Monitoring sections:
 * creative.css defines `section { padding: 100px 0; }` (header.php).
 * Monitoring groups are <section.ape-monitoring-group>, so each group got
 * 100px top + 100px bottom = ~200px empty space between adjacent groups.
 *
 * Fix: zero creative section padding on monitoring groups only.
 * Keep normal .panel padding/margin on #dashboardBody.
 * Do not use negative margins.
 */
.ape-summary section.ape-monitoring-dashboard.panel,
.ape-summary .ape-monitoring-dashboard.panel {
    height: auto;
    min-height: 0;
    /* Restore panel chrome; override creative.css section 100px padding */
    padding: 28px;
    margin: 0 0 24px;
    justify-content: flex-start;
    align-content: start;
}

.ape-summary .ape-monitoring-dashboard-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    align-content: start;
}

.ape-summary section.ape-monitoring-group,
.ape-summary .ape-monitoring-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: auto;
    min-height: 0;
    margin: 0;
    /* Kill creative.css `section { padding: 100px 0; }` */
    padding: 0;
    justify-content: flex-start;
    align-content: start;
}

.ape-summary .ape-dashboard-mode-switcher {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ape-summary .ape-dashboard-mode-switcher .tab {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-weight: 700;
    border-radius: 10px;
    padding: 10px 16px;
    min-width: 0;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ape-summary .ape-dashboard-mode-switcher .tab:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.ape-summary .ape-dashboard-mode-switcher .tab.active,
.ape-summary .ape-dashboard-mode-switcher .tab[aria-selected="true"] {
    background: #0f766e;
    border-color: #0f766e;
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, .22);
}

.ape-summary .ape-monitoring-card {
    height: auto;
    min-height: 0;
    padding: 20px 24px;
    margin: 0;
}

.ape-summary .ape-monitoring-overview-kpis {
    align-items: stretch;
}

.ape-summary .ape-monitoring-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.ape-summary .ape-monitoring-kpi-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 14px 16px 12px;
    border: 1px solid #e8eef7;
    border-left-width: 3px;
    border-left-color: #cbd5e1;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.035);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ape-summary .ape-monitoring-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ape-summary .ape-monitoring-kpi-card.is-neutral {
    border-left-color: #3b82f6;
}

.ape-summary .ape-monitoring-kpi-card.is-warn {
    border-left-color: #f97316;
}

.ape-summary .ape-monitoring-kpi-card.is-ok {
    border-left-color: #22c55e;
}

.ape-summary .ape-monitoring-kpi-card.is-info {
    border-left-color: #06b6d4;
}

.ape-summary .ape-monitoring-kpi-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 34px;
    margin-bottom: 8px;
}

.ape-summary .ape-monitoring-kpi-icon {
    display: grid;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    line-height: 1;
}

.ape-summary .ape-monitoring-kpi-card.is-neutral .ape-monitoring-kpi-icon {
    background: #eff6ff;
    color: #2563eb;
}

.ape-summary .ape-monitoring-kpi-card.is-warn .ape-monitoring-kpi-icon {
    background: #fff7ed;
    color: #ea580c;
}

.ape-summary .ape-monitoring-kpi-card.is-ok .ape-monitoring-kpi-icon {
    background: #f0fdf4;
    color: #16a34a;
}

.ape-summary .ape-monitoring-kpi-card.is-info .ape-monitoring-kpi-icon {
    background: #ecfeff;
    color: #0891b2;
}

.ape-summary .ape-monitoring-kpi-title {
    color: var(--ape-muted, #64788d);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.ape-summary .ape-monitoring-kpi-value {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--ape-text, #20364b);
    font-size: clamp(26px, 2vw, 30px);
    font-weight: 800;
    line-height: 1.05;
}

.ape-summary .ape-monitoring-kpi-meta {
    margin-top: 6px;
    padding-top: 0;
    color: var(--ape-muted, #64788d);
    font-size: 12px;
    line-height: 1.4;
}

.ape-summary .ape-monitoring-header {
    align-items: flex-start;
    gap: 12px;
}

.ape-summary .ape-monitoring-header-main {
    flex: 1 1 520px;
    min-width: 0;
}

.ape-summary .ape-monitoring-header-title {
    margin: 0 0 4px;
    color: var(--ape-text, #20364b);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}

.ape-summary .ape-monitoring-header-desc {
    margin: 0 0 10px;
    max-width: 760px;
    color: var(--ape-muted, #64788d);
    font-size: 14px;
    line-height: 1.45;
}

.ape-summary .ape-monitoring-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    color: var(--ape-muted, #64788d);
    font-size: 13px;
    line-height: 1.4;
}

.ape-summary .ape-monitoring-summary-item strong {
    color: var(--ape-text, #20364b);
    font-weight: 800;
}

.ape-summary .ape-monitoring-summary-sep {
    color: #94a3b8;
    font-weight: 700;
}

.ape-summary .ape-monitoring-filter-badge {
    padding: 5px 9px;
    background: #eef2f7;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    flex-shrink: 0;
}

.ape-summary .ape-monitoring-exception-grid.layout-2,
.ape-summary .ape-monitoring-exception-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 0;
    align-items: start;
    align-content: start;
    grid-auto-rows: auto;
}

.ape-summary .ape-monitoring-group .layout-1 {
    margin-top: 0;
}

.ape-summary .ape-monitoring-group .role-intro {
    margin-bottom: 0;
}

.ape-summary .ape-monitoring-chart {
    width: 100%;
    min-height: 0;
    height: auto;
}

.ape-summary .ape-monitoring-chart-scroll {
    max-height: 520px;
    overflow: auto;
}

.ape-summary .ape-monitoring-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
    max-height: 160px;
    padding: 18px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.ape-summary .ape-monitoring-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 420px;
}

.ape-summary .ape-monitoring-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
}

.ape-summary .ape-issue-badge {
    display: inline-block;
    color: #b91c1c;
    font-weight: 700;
}

.ape-summary .ape-issue-items {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
}

.ape-summary .ape-monitoring-followup {
    margin-top: 0;
}

@media (max-width: 1024px) {
    .ape-summary .ape-monitoring-card {
        padding: 16px;
    }

    .ape-summary section.ape-monitoring-dashboard.panel,
    .ape-summary .ape-monitoring-dashboard.panel {
        padding: 22px 18px;
    }
}

@media (max-width: 767px) {
    .ape-summary .ape-monitoring-dashboard-inner {
        gap: 16px;
    }

    .ape-summary section.ape-monitoring-dashboard.panel,
    .ape-summary .ape-monitoring-dashboard.panel {
        padding: 22px 18px;
        margin-bottom: 18px;
    }

    .ape-summary section.ape-monitoring-group,
    .ape-summary .ape-monitoring-group {
        gap: 16px;
        padding: 0;
    }

    .ape-summary .ape-monitoring-header {
        flex-direction: column;
        align-items: stretch;
    }

    .ape-summary .ape-monitoring-filter-badge {
        align-self: flex-start;
    }

    .ape-summary .ape-monitoring-summary {
        gap: 6px 6px;
        font-size: 12px;
    }

    .ape-summary .ape-monitoring-kpi-card {
        padding: 12px 14px 10px;
    }

    .ape-summary .ape-monitoring-kpi-value {
        font-size: 24px;
    }

    .ape-summary .ape-monitoring-exception-grid.layout-2,
    .ape-summary .ape-monitoring-exception-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ape-summary .ape-filter-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .ape-summary .ape-view-mode-filter {
        order: -1;
    }

    .ape-summary .ape-dashboard-mode-switcher {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .ape-summary .ape-dashboard-mode-switcher .tab {
        width: 100%;
        text-align: center;
        padding: 10px 8px;
        font-size: 13px;
    }

    .ape-summary .ape-monitoring-overview-kpis,
    .ape-summary .ape-monitoring-kpi-grid,
    .ape-summary .ape-executive-kpis.ape-monitoring-kpi-grid,
    .ape-summary .ape-donor-kpis.ape-monitoring-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .ape-summary .ape-monitoring-overview-kpis,
    .ape-summary .ape-monitoring-kpi-grid,
    .ape-summary .ape-executive-kpis.ape-monitoring-kpi-grid,
    .ape-summary .ape-donor-kpis.ape-monitoring-kpi-grid {
        grid-template-columns: 1fr;
    }

    .ape-summary .ape-dashboard-mode-switcher {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   Executive dashboard (Highcharts advanced analytics)
   ========================================================================== */

.ape-summary .ape-executive-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: auto;
    min-height: 0;
    justify-content: flex-start;
}

.ape-summary .ape-executive-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    height: auto;
    min-height: 0;
}

.ape-summary .ape-executive-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    grid-auto-rows: auto;
}

.ape-summary .ape-executive-card {
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 20px 24px;
}

.ape-summary .ape-executive-chart {
    width: 100%;
    min-height: 0;
    height: auto;
}

.ape-summary .ape-executive-chart-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ape-summary .ape-executive-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
    max-height: 180px;
    padding: 18px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.ape-summary .ape-executive-kpis.ape-monitoring-kpi-grid,
.ape-summary .ape-donor-kpis.ape-monitoring-kpi-grid {
    align-items: stretch;
}

.ape-summary .ape-executive-donut-wrap {
    position: relative;
    min-height: 220px;
}

.ape-summary .ape-executive-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.ape-summary .ape-executive-donut-center strong {
    font-size: 1.35rem;
    color: #0f172a;
    line-height: 1.1;
}

.ape-summary .ape-executive-donut-center span {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.ape-summary .ape-executive-followup {
    margin: 0;
}

@media (max-width: 1024px) {
    .ape-summary .ape-executive-grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ape-summary .ape-executive-card {
        padding: 16px;
    }
}

@media (max-width: 767px) {
    .ape-summary .ape-executive-dashboard {
        gap: 16px;
    }
}


/* ==========================================================================
   Donor assurance dashboard (Highcharts)
   ========================================================================== */

.ape-summary .ape-donor-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: auto;
    min-height: 0;
    justify-content: flex-start;
}

.ape-summary .ape-donor-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    height: auto;
    min-height: 0;
}

.ape-summary .ape-donor-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    grid-auto-rows: auto;
}

.ape-summary .ape-donor-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    grid-auto-rows: auto;
}

.ape-summary .ape-donor-card {
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 20px 24px;
}

.ape-summary .ape-donor-chart {
    width: 100%;
    min-height: 0;
    height: auto;
}

.ape-summary .ape-donor-chart-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ape-summary .ape-donor-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
    max-height: 200px;
    padding: 18px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.ape-summary .ape-donor-empty.is-success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.ape-summary .ape-donor-score-breakdown {
    margin-top: 12px;
}

.ape-summary .ape-donor-gauge-wrap {
    min-height: 0;
}

@media (max-width: 1100px) {
    .ape-summary .ape-donor-grid-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 1024px) {
    .ape-summary .ape-donor-grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ape-summary .ape-donor-card {
        padding: 16px;
    }
}

@media (max-width: 767px) {
    .ape-summary .ape-donor-dashboard {
        gap: 16px;
    }
}

/* ==========================================================================
   Control deck — Perspective (segmented) above Filter Data
   ========================================================================== */

.ape-summary .ape-control-deck.ape-filter-section {
    padding: 22px 28px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e8eef6;
}

.ape-summary .ape-perspective-panel {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef3f9;
}

.ape-summary .ape-perspective-head h2,
.ape-summary .ape-filter-panel .ape-filter-header h2 {
    margin: 0 0 6px;
    color: #10284a;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ape-summary .ape-perspective-panel .ape-view-mode-filter {
    width: 100%;
    min-width: 0;
    max-width: 560px;
}

.ape-summary .ape-perspective-panel .ape-view-mode-label {
    display: none;
}

.ape-summary .ape-dashboard-mode-switcher.tabs,
.ape-summary .ape-perspective-panel .ape-view-mode .tabs {
    display: inline-grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    max-width: 520px;
    padding: 3px;
    border: 1px solid #d7e2f0;
    border-radius: 12px;
    background: #f5f8fc;
    box-shadow: none;
}

.ape-summary .ape-dashboard-mode-switcher .tab,
.ape-summary .ape-perspective-panel .ape-view-mode .tab {
    height: 42px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #4b6078;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.ape-summary .ape-dashboard-mode-switcher .tab:hover,
.ape-summary .ape-perspective-panel .ape-view-mode .tab:hover {
    color: #1f4e7a;
    background: rgba(255, 255, 255, .7);
}

.ape-summary .ape-dashboard-mode-switcher .tab.active,
.ape-summary .ape-perspective-panel .ape-view-mode .tab.active {
    background: #2478ff;
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(36, 120, 255, .25);
}

.ape-summary .ape-perspective-blurbs {
    margin-top: 4px;
    min-height: 1.45em;
}

.ape-summary .ape-perspective-active {
    margin-top: 12px;
    min-height: 1.5em;
}

.ape-summary .ape-perspective-active-item {
    display: none;
    align-items: center;
    gap: 8px;
    color: #10284a;
    font-size: 15px;
    font-weight: 800;
}

.ape-summary .ape-perspective-active-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef5ff;
    color: #2478ff;
    font-size: 14px;
}

.ape-summary .ape-view-mode-filter:not(:has(.tab.active)) .ape-perspective-active-item[data-for="monitoring"],
.ape-summary .ape-view-mode-filter:has([data-role="monitoring"].active) .ape-perspective-active-item[data-for="monitoring"],
.ape-summary .ape-view-mode-filter:has([data-role="executive"].active) .ape-perspective-active-item[data-for="executive"],
.ape-summary .ape-view-mode-filter:has([data-role="donor"].active) .ape-perspective-active-item[data-for="donor"] {
    display: inline-flex;
}

.ape-summary .ape-perspective-blurb {
    display: none;
    margin: 0;
    color: #64788d;
    font-size: 13px;
    line-height: 1.45;
    max-width: 640px;
}

.ape-summary .ape-view-mode-filter:not(:has(.tab.active)) .ape-perspective-blurb[data-for="monitoring"],
.ape-summary .ape-view-mode-filter:has([data-role="monitoring"].active) .ape-perspective-blurb[data-for="monitoring"],
.ape-summary .ape-view-mode-filter:has([data-role="executive"].active) .ape-perspective-blurb[data-for="executive"],
.ape-summary .ape-view-mode-filter:has([data-role="donor"].active) .ape-perspective-blurb[data-for="donor"] {
    display: block;
}

.ape-summary .ape-filter-panel .ape-filter-header {
    display: block;
    margin-bottom: 12px;
}

.ape-summary .ape-filter-header-copy p {
    margin: 0;
    color: #64788d;
    font-size: 13px;
    line-height: 1.45;
    max-width: 520px;
}

.ape-summary .ape-filter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 20px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #e8eef6;
    border-radius: 12px;
    background: #f8fbff;
    box-sizing: border-box;
}

.ape-summary .ape-filter-active-panel {
    flex: 1 1 auto;
    min-width: 0;
}

.ape-summary .ape-filter-active-label {
    display: block;
    margin: 0 0 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: none;
}

.ape-summary .ape-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    align-items: center;
}

.ape-summary .ape-filter-chips-empty {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #64788d;
    font-size: 13px;
    font-style: normal;
    line-height: 1.4;
}

.ape-summary .ape-filter-chips-empty span:last-child {
    color: #94a3b8;
    font-size: 12px;
}

.ape-summary .ape-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 10px;
    border: 1px solid #d7e6fb;
    border-radius: 999px;
    background: #ffffff;
    color: #1d4f91;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.ape-summary .ape-filter-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.ape-summary .ape-filter-chip i {
    font-size: 11px;
    opacity: .7;
}

.ape-summary .ape-filter-chip:hover {
    border-color: #93c0ff;
    background: #eef5ff;
    color: #1563d4;
}

.ape-summary .ape-filter-toolbar.actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.ape-summary .ape-export-menu {
    display: inline-flex;
    align-items: center;
}

.ape-summary .ape-filter-toolbar .secondary,
.ape-summary .ape-filter-toolbar .ape-export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
    text-decoration: none;
    white-space: nowrap;
}

.ape-summary .ape-filter-toolbar #resetFilters.secondary,
.ape-summary .ape-filter-toolbar .ape-filter-reset-btn.secondary {
    border: 1px solid #d5deea;
    background: #ffffff;
    color: #334155;
}

.ape-summary .ape-filter-toolbar #resetFilters.secondary:hover,
.ape-summary .ape-filter-toolbar .ape-filter-reset-btn.secondary:hover {
    border-color: #94a3b8;
    color: #0f172a;
}

.ape-summary .ape-filter-toolbar .ape-export-btn.secondary {
    border: 1px solid #93c0ff;
    background: #ffffff;
    color: #1d6fe0;
}

.ape-summary .ape-filter-toolbar .ape-export-btn.secondary:hover {
    border-color: #2478ff;
    background: #f3f8ff;
    color: #1563d4;
}

.ape-summary .ape-control-deck .grid-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ape-summary .ape-control-deck .grid-filters-row {
    display: grid;
    gap: 12px 14px;
    align-items: end;
    width: 100%;
    min-width: 0;
}

.ape-summary .ape-control-deck .grid-filters-row--primary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ape-summary .ape-control-deck .grid-filters-row--secondary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ape-summary .ape-control-deck .grid-filters-row > div {
    min-width: 0;
    width: 100%;
}

.ape-summary .ape-control-deck .filter-search-wide {
    grid-column: auto;
}

.ape-summary .ape-control-deck .grid-filters-row label {
    display: block;
    margin-bottom: 6px;
    color: #62758d;
    font-size: 12px;
    font-weight: 700;
}

.ape-summary .ape-control-deck .grid-filters-row select,
.ape-summary .ape-control-deck .grid-filters-row input[type="text"] {
    width: 100%;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0 12px;
    border: 1px solid #d5deea;
    border-radius: 10px;
    background: #ffffff;
    color: #17233a;
    font-size: 13px;
    box-sizing: border-box;
}

@media (max-width: 1180px) {
    .ape-summary .ape-control-deck .grid-filters-row--primary,
    .ape-summary .ape-control-deck .grid-filters-row--secondary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .ape-summary .ape-control-deck.ape-filter-section {
        padding: 18px 20px 20px;
    }

    .ape-summary .ape-perspective-panel .ape-view-mode-filter {
        max-width: none;
    }

    .ape-summary .ape-dashboard-mode-switcher.tabs,
    .ape-summary .ape-perspective-panel .ape-view-mode .tabs {
        max-width: none;
        display: grid;
    }

    .ape-summary .ape-filter-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ape-summary .ape-filter-toolbar.actions {
        justify-content: stretch;
        width: 100%;
    }

    .ape-summary .ape-filter-toolbar .secondary,
    .ape-summary .ape-filter-toolbar .ape-export-btn,
    .ape-summary .ape-export-menu {
        flex: 1 1 calc(50% - 8px);
    }

    .ape-summary .ape-export-menu .ape-export-btn {
        width: 100%;
    }

    .ape-summary .ape-control-deck .grid-filters-row--primary,
    .ape-summary .ape-control-deck .grid-filters-row--secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ape-summary .ape-dashboard-mode-switcher.tabs,
    .ape-summary .ape-perspective-panel .ape-view-mode .tabs {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 4px;
    }

    .ape-summary .ape-dashboard-mode-switcher .tab,
    .ape-summary .ape-perspective-panel .ape-view-mode .tab {
        width: 100%;
        text-align: center;
    }

    .ape-summary .ape-control-deck .grid-filters-row--primary,
    .ape-summary .ape-control-deck .grid-filters-row--secondary {
        grid-template-columns: 1fr;
    }

    .ape-summary .ape-filter-toolbar .secondary,
    .ape-summary .ape-filter-toolbar .ape-export-btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
    }
}

/* Override older equal-weight header layout when control deck is present */
.ape-summary .ape-control-deck .ape-filter-header {
    margin-bottom: 14px;
}

.ape-summary .ape-control-deck .ape-view-mode-filter {
    order: initial;
}

