.gpm-detail-page {
    --gpm-ink: #0f2942;
    --gpm-muted: #64748b;
    --gpm-line: #dfe8f0;
    --gpm-soft: #f5f9fc;
    --gpm-blue: #086d9e;
    --gpm-blue-deep: #064467;
    --gpm-orange: #f59e0b;
    --gpm-shadow: 0 14px 40px rgba(15, 41, 66, .08);
    color: var(--gpm-ink);
    background:
        linear-gradient(180deg, #f5fbff 0, #f8fbfd 28rem, #ffffff 60rem);
}

.gpm-detail-hero {
    padding: 2rem 0 1.5rem;
}

.gpm-detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: 1.15rem;
    font-size: .78rem;
    color: #7b8da0;
}

.gpm-detail-breadcrumb a {
    color: #486579;
    text-decoration: none;
}

.gpm-detail-breadcrumb a:hover {
    color: var(--gpm-blue);
}

.gpm-detail-hero-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 2.1rem;
    border: 1px solid rgba(13, 93, 132, .11);
    border-radius: 1.4rem;
    background:
        radial-gradient(circle at 92% 12%, rgba(245, 158, 11, .12), transparent 20rem),
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(238,248,253,.96));
    box-shadow: var(--gpm-shadow);
}

.gpm-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: .85rem;
}

.gpm-product-badge,
.gpm-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: .32rem .68rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .02em;
}

.gpm-product-badge {
    background: #e7f5fb;
    color: var(--gpm-blue);
}

.gpm-status-badge.is-ready {
    background: #e9f8ef;
    color: #18723d;
}

.gpm-status-badge.is-empty {
    background: #fff3dd;
    color: #8b5c04;
}

.gpm-detail-hero-copy h1 {
    margin: 0;
    font-size: clamp(1.65rem, 2.7vw, 2.5rem);
    line-height: 1.16;
    letter-spacing: -.035em;
    color: var(--gpm-ink);
}

.gpm-detail-location {
    max-width: 850px;
    margin: .8rem 0 0;
    color: #4f6679;
    font-size: .96rem;
}

.gpm-detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1rem;
    margin-top: .9rem;
    font-size: .78rem;
    color: #7890a1;
}

.gpm-detail-meta-line span {
    position: relative;
}

.gpm-detail-meta-line span:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -.55rem;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #a5b6c3;
}

.gpm-detail-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .55rem;
    flex: 0 0 auto;
}

.gpm-detail-hero-actions .btn {
    white-space: nowrap;
    font-size: .8rem;
}

#copyBboxButton.is-copied {
    border-color: #2f9b5f;
    color: #2f7b50;
    background: #effaf3;
}

.gpm-detail-stats {
    margin-top: 1rem;
}

.gpm-detail-stat-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 8.2rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid var(--gpm-line);
    border-radius: 1.05rem;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 24px rgba(15, 41, 66, .045);
}

.gpm-detail-stat-label {
    margin-bottom: .55rem;
    color: #71879a;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.gpm-detail-stat-card strong {
    color: var(--gpm-ink);
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    line-height: 1.15;
    letter-spacing: -.025em;
}

.gpm-detail-stat-card small {
    margin-top: auto;
    padding-top: .65rem;
    color: #8a9baa;
    font-size: .72rem;
}

.gpm-detail-content {
    padding: .6rem 0 3rem;
}

.gpm-panel {
    overflow: hidden;
    border: 1px solid var(--gpm-line);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: var(--gpm-shadow);
}

.gpm-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.3rem 1.4rem 1rem;
    border-bottom: 1px solid #edf2f6;
}

.gpm-panel-head h2,
.gpm-analysis-copy h2 {
    margin: .2rem 0 0;
    font-size: 1.08rem;
    font-weight: 760;
    letter-spacing: -.015em;
    color: var(--gpm-ink);
}

.gpm-panel-head p,
.gpm-analysis-copy p {
    margin: .35rem 0 0;
    color: #7a8d9d;
    font-size: .78rem;
    line-height: 1.55;
}

.gpm-panel-kicker {
    color: var(--gpm-blue);
    font-size: .66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.gpm-info-list {
    margin: 0;
    padding: .45rem 1.4rem 1rem;
}

.gpm-info-list > div {
    display: grid;
    grid-template-columns: minmax(7.6rem, .9fr) minmax(0, 1.45fr);
    gap: .85rem;
    padding: .78rem 0;
    border-bottom: 1px solid #eef3f6;
}

.gpm-info-list > div:last-child {
    border-bottom: 0;
}

.gpm-info-list dt {
    margin: 0;
    color: #7b8f9f;
    font-size: .72rem;
    font-weight: 650;
}

.gpm-info-list dd {
    margin: 0;
    color: #203d54;
    font-size: .79rem;
    font-weight: 590;
    overflow-wrap: anywhere;
}

.gpm-info-list code {
    color: #1c5d83;
    font-size: .74rem;
}

.gpm-centroid-note {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin: .2rem 1.35rem 1.3rem;
    padding: .85rem .95rem;
    border: 1px solid #dbeaf3;
    border-left: 3px solid var(--gpm-blue);
    border-radius: .75rem;
    background: #f6fbfe;
}

.gpm-centroid-note strong {
    font-size: .72rem;
    color: #31576f;
}

.gpm-centroid-note span {
    color: #6d8596;
    font-size: .72rem;
    line-height: 1.5;
}

.gpm-map-panel {
    display: flex;
    flex-direction: column;
}

.gpm-map-head {
    align-items: center;
}

.gpm-map-summary {
    display: flex;
    flex: 0 0 auto;
    gap: .45rem;
}

.gpm-map-summary span {
    padding: .38rem .58rem;
    border-radius: .65rem;
    background: #f2f7fa;
    color: #6d8292;
    font-size: .69rem;
}

.gpm-map-summary strong {
    color: #284c63;
}

.gpm-map-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem 1rem;
    padding: .65rem 1.35rem;
    border-bottom: 1px solid #edf2f6;
    background: #fbfdfe;
    color: #667e8f;
    font-size: .68rem;
}

.gpm-map-toolbar span {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
}

.gpm-legend-swatch,
.gpm-legend-dot {
    display: inline-block;
    flex: 0 0 auto;
}

.gpm-legend-swatch.is-grid {
    width: 14px;
    height: 10px;
    border: 2px solid #f59e0b;
    border-radius: 2px;
    background: rgba(251, 191, 36, .22);
}

.gpm-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.gpm-legend-dot.is-centroid {
    background: #f59e0b;
    box-shadow: 0 0 0 2px #b45309;
}

.gpm-legend-dot.is-station {
    background: #38bdf8;
    box-shadow: 0 0 0 2px #075985;
}

.gpm-legend-dot.is-nearby {
    background: #fff;
    box-shadow: 0 0 0 2px #64748b;
}

.gpm-detail-map {
    height: 490px;
    min-height: 420px;
    background: #edf4f8;
}

.gpm-detail-map .leaflet-popup-content-wrapper,
.gpm-detail-map .leaflet-popup-tip {
    color: #24445a;
}

.gpm-detail-map .leaflet-popup-content {
    margin: .8rem .9rem;
    font-size: .76rem;
    line-height: 1.5;
}

.gpm-detail-map .leaflet-popup-content a {
    color: var(--gpm-blue);
    font-weight: 650;
}

.gpm-map-footer {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .65rem 1.2rem;
    border-top: 1px solid #edf2f6;
    background: #fff;
    color: #8a9ba8;
    font-size: .67rem;
}

.gpm-map-footer span {
    margin-left: auto;
}

.gpm-map-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gpm-blue);
    font-size: .69rem;
    font-weight: 650;
    cursor: pointer;
}

.gpm-map-link:hover {
    text-decoration: underline;
}

.gpm-analysis-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 1.5rem 0 0;
    padding: 1.15rem 1.3rem;
    border: 1px solid #dbe8f0;
    border-radius: 1.05rem;
    background: linear-gradient(135deg, #ffffff, #f7fbfd);
}

.gpm-analysis-copy {
    max-width: 35rem;
}

.gpm-analysis-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .45rem;
}

.gpm-analysis-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: .45rem .72rem;
    border: 1px solid #d5e3ec;
    border-radius: 999px;
    background: #fff;
    color: #285a77;
    font-size: .72rem;
    font-weight: 650;
    text-decoration: none;
}

.gpm-analysis-actions a:hover {
    border-color: #95bfd5;
    background: #f4fbfe;
    color: #086d9e;
}

.gpm-nearby-section {
    margin-top: .1rem;
    padding-top: 1.4rem;
}

.gpm-nearby-list,
.gpm-station-list {
    padding: .35rem 1.15rem .85rem;
}

.gpm-nearby-item,
.gpm-station-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .72rem .25rem;
    border-bottom: 1px solid #edf2f5;
    color: inherit;
    text-decoration: none;
}

.gpm-nearby-item:last-child,
.gpm-station-item:last-child {
    border-bottom: 0;
}

.gpm-nearby-item:hover,
.gpm-station-item:hover {
    background: #f9fcfe;
}

.gpm-nearby-number {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    flex: 0 0 auto;
    border-radius: .65rem;
    background: #eef6fa;
    color: #52758a;
    font-size: .68rem;
    font-weight: 750;
}

.gpm-nearby-main,
.gpm-station-main {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: .12rem;
}

.gpm-nearby-main strong,
.gpm-station-main strong {
    color: #155d85;
    font-size: .76rem;
    overflow-wrap: anywhere;
}

.gpm-nearby-main small,
.gpm-station-main small {
    color: #8799a6;
    font-size: .68rem;
    overflow-wrap: anywhere;
}

.gpm-nearby-distance,
.gpm-station-distance {
    flex: 0 0 auto;
    color: #36576c;
    font-size: .72rem;
    font-weight: 750;
}

.gpm-station-pin {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 0 3px rgba(7, 89, 133, .15);
}

.gpm-empty-state {
    margin: 1rem 1.3rem 1.3rem;
    padding: 1rem;
    border-radius: .8rem;
    background: #f7fafc;
    color: #7a8d9c;
    font-size: .76rem;
}

.gpm-source-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.4rem;
    padding: 1rem 1.15rem;
    border-top: 1px solid #e8eff4;
    color: #7b8e9c;
}

.gpm-source-note > div:first-child {
    display: flex;
    flex-direction: column;
    gap: .12rem;
}

.gpm-source-note strong {
    color: #3a596e;
    font-size: .7rem;
}

.gpm-source-note span {
    font-size: .68rem;
}

.gpm-source-links {
    display: flex;
    gap: .8rem;
    flex: 0 0 auto;
}

.gpm-source-links a {
    color: var(--gpm-blue);
    font-size: .7rem;
    font-weight: 650;
}

.gpm-grid-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

@media (max-width: 1199.98px) {
    .gpm-detail-map {
        height: 470px;
    }

    .gpm-analysis-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .gpm-analysis-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .gpm-detail-hero {
        padding-top: 1.2rem;
    }

    .gpm-detail-hero-panel {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.3rem 1.2rem;
        border-radius: 1rem;
    }

    .gpm-detail-hero-actions {
        justify-content: flex-start;
    }

    .gpm-detail-stat-card {
        min-height: 7.2rem;
        padding: .95rem;
    }

    .gpm-panel {
        border-radius: 1rem;
    }

    .gpm-panel-head,
    .gpm-map-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem;
    }

    .gpm-map-summary {
        width: 100%;
    }

    .gpm-map-toolbar {
        padding: .6rem 1rem;
    }

    .gpm-detail-map {
        height: 430px;
        min-height: 380px;
    }

    .gpm-info-list {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .gpm-info-list > div {
        grid-template-columns: 1fr;
        gap: .22rem;
    }

    .gpm-centroid-note {
        margin-right: 1rem;
        margin-left: 1rem;
    }

    .gpm-map-footer {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .gpm-map-footer span {
        width: 100%;
        margin-left: 0;
    }

    .gpm-analysis-strip {
        padding: 1rem;
    }

    .gpm-analysis-actions a {
        flex: 1 1 calc(50% - .45rem);
        justify-content: center;
        text-align: center;
    }

    .gpm-source-note {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .gpm-analysis-actions a {
        flex-basis: 100%;
    }

    .gpm-nearby-distance,
    .gpm-station-distance {
        font-size: .66rem;
    }
}

/* Map marker fallback v1.6 - HTML markers are used so they remain visible even
   when a global theme overrides Leaflet SVG path styles. */
.gpm-detail-map .gpm-map-div-icon {
    background: transparent !important;
    border: 0 !important;
}

.gpm-map-marker {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    box-shadow: 0 2px 7px rgba(15, 41, 66, .28);
}

.gpm-map-marker-centroid {
    background: #f97316;
    border: 3px solid #fff;
    outline: 2px solid #9a3412;
}

.gpm-map-marker-nearby {
    background: #fff;
    border: 3px solid #64748b;
}

.gpm-map-station-icon {
    position: relative;
    display: block;
    width: 22px;
    height: 22px;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #0284c7;
    box-shadow: 0 3px 9px rgba(2, 132, 199, .35);
    transform: rotate(-45deg);
}

.gpm-map-station-icon > span {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

.gpm-detail-map .leaflet-pane,
.gpm-detail-map .leaflet-marker-pane,
.gpm-detail-map .leaflet-overlay-pane,
.gpm-detail-map canvas,
.gpm-detail-map svg {
    visibility: visible !important;
}

/* Status data map v1.7 */
.gpm-legend-swatch.is-grid-data {
    width: 14px;
    height: 10px;
    border: 2px solid #0284c7;
    border-radius: 2px;
    background: transparent;
}

.gpm-legend-swatch.is-grid-empty {
    width: 14px;
    height: 10px;
    border: 2px solid #94a3b8;
    border-radius: 2px;
    background: transparent;
}

.gpm-legend-dot.is-station-data {
    background: #16a34a;
    box-shadow: 0 0 0 2px #166534;
}

.gpm-legend-dot.is-station-empty {
    background: #ef4444;
    box-shadow: 0 0 0 2px #991b1b;
}

.gpm-map-station-icon.is-data {
    background: #16a34a;
    box-shadow: 0 3px 9px rgba(22, 163, 74, .34);
}

.gpm-map-station-icon.is-empty {
    background: #ef4444;
    box-shadow: 0 3px 9px rgba(239, 68, 68, .30);
}

.gpm-item-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
}

.gpm-data-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.3rem;
    padding: .12rem .42rem;
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .02em;
    white-space: nowrap;
}

.gpm-data-badge.is-data {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.gpm-data-badge.is-empty {
    color: #7c2d12;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

/* Grid overlay fallback v1.9
   Polygon GPM digambar sebagai transparent ImageOverlay, bukan SVG/Canvas,
   agar tidak terpengaruh style global theme. */
.gpm-detail-map .gpm-grid-image-overlay {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: none !important;
    max-height: none !important;
    pointer-events: auto !important;
}

.gpm-detail-map .leaflet-gpmNearbyGridPane-pane,
.gpm-detail-map .leaflet-gpmActiveGridPane-pane {
    pointer-events: none;
}

.gpm-detail-map .leaflet-gpmNearbyGridPane-pane .gpm-grid-image-overlay,
.gpm-detail-map .leaflet-gpmActiveGridPane-pane .gpm-grid-image-overlay {
    pointer-events: auto !important;
}

/* Grid rectangle v1.10: border only, interior fully transparent */
.gpm-detail-map .gpm-grid-image-overlay {
    background: transparent !important;
    background-color: transparent !important;
}
