:root {
    --rakat: #217ea3;
    --rakat-dark: #2d5d70;
    --rakat-deep: #25363d;
    --mint: #e1f2f9;
    --ink: #25363d;
    --muted: #5b6b72;
    --gold: #e9b949;
    --surface: #f4f8fa;
    --line: #e1eaee;
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}
body {
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--ink);
    background: #fff;
}
button,
a {
    transition: all 0.2s ease;
}
.nav-rakat {
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.navbar-brand {
    color: var(--ink);
}
.navbar-brand:hover {
    color: var(--rakat);
}
.navbar-brand strong {
    font-size: 1rem;
    letter-spacing: 0.02em;
}
.navbar-brand small {
    font-size: 0.62rem;
    letter-spacing: 0.09em;
    color: var(--muted);
    font-weight: 700;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: var(--rakat);
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px #217ea325;
}
.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4d5f66 !important;
}
.nav-link:hover,
.nav-link.active {
    color: var(--rakat) !important;
}
.btn-rakat {
    background: var(--rakat);
    color: #fff;
    border: 1px solid var(--rakat);
    border-radius: 999px;
    padding: 0.75rem 1.2rem;
    font-weight: 700;
}
.btn-rakat:hover {
    background: var(--rakat-dark);
    border-color: var(--rakat-dark);
    color: white;
    transform: translateY(-1px);
}
.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(125deg, #25363d 0%, #217ea3 58%, #009bd7 100%);
    color: white;
}
.hero-orb {
    position: absolute;
    border: 1px solid #ffffff13;
    border-radius: 50%;
    pointer-events: none;
}
.orb-one {
    width: 650px;
    height: 650px;
    right: -180px;
    top: -260px;
    box-shadow:
        0 0 0 70px #ffffff05,
        0 0 0 140px #ffffff04;
}
.orb-two {
    width: 330px;
    height: 330px;
    left: -200px;
    bottom: -220px;
    box-shadow: 0 0 0 60px #ffffff05;
}
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: #d6effa;
}
.eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f2c85b;
    box-shadow: 0 0 0 5px #f2c85b25;
}
.hero-title {
    font-size: clamp(2.6rem, 5.1vw, 4.55rem);
    line-height: 1.1;
    letter-spacing: -0.055em;
    font-weight: 800;
}
.hero-title span {
    color: #bfe8f7;
}
.hero-copy {
    max-width: 620px;
    color: #dcecf3;
    font-size: 1.05rem;
    line-height: 1.85;
}
.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.4rem;
    color: #dff0f7;
    font-size: 0.8rem;
    font-weight: 600;
}
.hero-points i {
    color: #bfe8f7;
}
.hero-visual {
    position: relative;
    min-height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.visual-circle {
    position: absolute;
    border-radius: 50%;
}
.circle-back {
    width: 340px;
    height: 340px;
    background: #ffffff0c;
    border: 1px solid #ffffff30;
}
.circle-front {
    width: 260px;
    height: 260px;
    background: linear-gradient(145deg, #e6f6fc, #9fd8ee);
    box-shadow: 0 30px 80px #0a2f4045;
}
.visual-icon {
    position: relative;
    z-index: 1;
    width: 190px;
    height: 190px;
    border-radius: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--rakat);
    font-size: 6rem;
    transform: rotate(-5deg);
    box-shadow: 0 24px 60px #0a2f4030;
}
.floating-note {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: var(--ink);
    padding: 0.85rem 1rem;
    border-radius: 17px;
    box-shadow: 0 16px 45px #0a2f4030;
    max-width: 260px;
}
.floating-note strong,
.floating-note small {
    display: block;
}
.floating-note strong {
    font-size: 0.83rem;
}
.floating-note small {
    font-size: 0.68rem;
    color: var(--muted);
    margin-top: 0.15rem;
}
.note-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #e1f2f9;
    color: var(--rakat);
    display: flex;
    align-items: center;
    justify-content: center;
}
.note-icon-gold {
    background: #fff3ce;
    color: #9a6b00;
}
.note-top {
    top: 37px;
    right: -3px;
}
.note-bottom {
    bottom: 32px;
    left: -5px;
}
.visual-caption {
    position: absolute;
    bottom: -7px;
    color: #c3dbe6;
    font-size: 0.67rem;
    letter-spacing: 0.03em;
}
.trust-strip {
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 30px #14304006;
}
.trust-item {
    padding: 1.6rem 0.5rem;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.25rem;
}
.trust-item i {
    font-size: 1.35rem;
    color: var(--rakat);
    margin-bottom: 0.25rem;
}
.trust-item strong {
    font-size: 0.9rem;
}
.trust-item small {
    font-size: 0.72rem;
    color: var(--muted);
}
.section-pad {
    padding: 6rem 0;
}
.section-heading {
    max-width: 720px;
}
.section-kicker {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--rakat);
    margin-bottom: 0.8rem;
}
.section-heading h2,
.process-title {
    font-size: clamp(2rem, 3.3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.18;
}
.section-heading h2 span,
.process-title span {
    color: var(--rakat);
}
.section-heading p {
    color: var(--muted);
    line-height: 1.8;
    margin-top: 1rem;
}
.service-card {
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 35px #14304005;
    transition:
        transform 0.25s,
        box-shadow 0.25s;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px #14304010;
}
.service-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.4rem;
}
.service-icon.teal {
    background: #e1f2f9;
    color: var(--rakat);
}
.service-icon.gold {
    background: #fff4d7;
    color: #a46d00;
}
.service-icon.blue {
    background: #e5f0ff;
    color: #3166a7;
}
.service-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
}
.service-card p {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.8;
    min-height: 78px;
}
.service-link {
    border: 0;
    background: none;
    padding: 0;
    color: var(--rakat);
    font-weight: 800;
    font-size: 0.85rem;
    text-decoration: none;
}
.service-link:hover {
    color: var(--rakat-dark);
}
.process-section {
    background: var(--surface);
}
.process-title {
    font-size: clamp(2rem, 3.5vw, 3.1rem);
}
.process-step {
    display: flex;
    gap: 1.25rem;
    padding: 1.4rem 0;
    border-bottom: 1px solid #dde7ec;
}
.process-step:last-child {
    border-bottom: 0;
}
.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    height: 52px;
    border-radius: 16px;
    background: #e1f2f9;
    color: var(--rakat);
    font-weight: 800;
}
.process-step h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0.15rem 0 0.4rem;
}
.process-step p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin: 0;
}
.help-banner {
    padding: 0 0 5rem;
    background: var(--surface);
}
.help-inner {
    border-radius: 28px;
    padding: 2.5rem 3rem;
    background: linear-gradient(115deg, #2d5d70, #217ea3 70%, #009bd7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.help-inner h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
}
.help-inner p {
    margin: 0;
    color: #d7e8f0;
    font-size: 0.9rem;
}
.footer-rakat {
    border-top: 1px solid var(--line);
    background: #fff;
}
.footer-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1rem;
}
.footer-rakat strong {
    font-size: 0.9rem;
}
.footer-rakat small {
    color: var(--muted);
    font-size: 0.75rem;
}
.footer-note {
    font-size: 0.72rem;
    color: #7a8b92;
}
.rakat-modal {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 80px #0b2a3625;
}
.rakat-modal .modal-header,
.rakat-modal .modal-footer {
    padding: 1.25rem 1.5rem;
    border-color: var(--line);
}
.rakat-modal .modal-body {
    padding: 1.5rem;
}
.rakat-modal .form-label {
    font-size: 0.83rem;
    font-weight: 700;
}
.rakat-modal .form-control,
.rakat-modal .form-select {
    border-color: #d5e2e8;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
}
.rakat-modal .form-control:focus,
.rakat-modal .form-select:focus {
    border-color: #5aaed0;
    box-shadow: 0 0 0 0.2rem #217ea318;
}
.toast-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 0.8rem;
}
.toast {
    border: 1px solid var(--line);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 12px 35px #10293a1a;
}
@media (max-width: 991.98px) {
    .hero-section .container {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    .hero-visual {
        min-height: 350px;
        margin-top: 0.5rem;
    }
    .note-top {
        right: 3%;
    }
    .note-bottom {
        left: 3%;
    }
    .section-pad {
        padding: 4.5rem 0;
    }
}
@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2.55rem;
    }
    .hero-copy {
        font-size: 0.94rem;
    }
    .hero-points {
        gap: 0.75rem;
        font-size: 0.73rem;
    }
    .hero-visual {
        min-height: 310px;
    }
    .circle-back {
        width: 280px;
        height: 280px;
    }
    .circle-front {
        width: 215px;
        height: 215px;
    }
    .visual-icon {
        width: 150px;
        height: 150px;
        border-radius: 42px;
        font-size: 4.8rem;
    }
    .floating-note {
        padding: 0.65rem 0.75rem;
        max-width: 230px;
    }
    .note-top {
        top: 12px;
        right: 0;
    }
    .note-bottom {
        bottom: 14px;
        left: 0;
    }
    .visual-caption {
        font-size: 0.57rem;
        text-align: center;
    }
    .trust-item small {
        font-size: 0.62rem;
    }
    .trust-item strong {
        font-size: 0.8rem;
    }
    .service-card {
        padding: 1.5rem;
    }
    .service-card p {
        min-height: 0;
    }
    .help-inner {
        padding: 2rem 1.5rem;
        align-items: flex-start;
        flex-direction: column;
    }
    .section-heading h2 {
        font-size: 2rem;
    }
    .section-pad {
        padding: 4rem 0;
    }
    .rakat-modal .modal-body {
        padding: 1rem;
    }
    .rakat-modal .modal-header,
    .rakat-modal .modal-footer {
        padding: 1rem;
    }
}

/* Statistik dan area admin — mockup Bootstrap 5 */
.stats-section {
    background: #f5f7fb;
}
.stats-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}
.stat-card,
.stat-panel {
    background: #fff;
    border: 1px solid #e1e6ef;
    border-radius: 24px;
    box-shadow: 0 12px 35px #1d2b4d08;
}
.stat-card {
    padding: 1.45rem;
    height: 100%;
    min-height: 150px;
}
.stat-label {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: #6b7890;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.stat-label span {
    font-family: monospace;
}
.stat-value {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 800;
    color: #26324b;
    margin: 0.65rem 0 0.4rem;
}
.stat-note {
    font-size: 0.78rem;
    color: #6542d8;
    font-weight: 600;
}
.stat-note.pink {
    color: #f04470;
}
.stat-note.purple {
    color: #a855f7;
}
.stat-note.blue {
    color: #3b82f6;
}
.stat-panel {
    padding: 1.5rem;
}
.stat-panel h3 {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 0.35rem;
}
.stat-panel > p,
.stat-panel .d-flex p {
    font-size: 0.84rem;
    color: #718096;
    margin-bottom: 1.2rem;
}
.chart-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6542d8;
    border: 1px solid #d9ccff;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    white-space: nowrap;
}
.chart-wrap {
    height: 300px;
    position: relative;
}
.status-row {
    margin-top: 1.6rem;
    font-size: 0.83rem;
}
.status-row strong {
    font-weight: 700;
    color: #475569;
}
.status-row b {
    color: #6542d8;
}
.status-row .progress {
    height: 8px;
    border-radius: 99px;
    background: #eef0f6;
    margin-top: 0.45rem;
}
.status-row .progress-bar {
    background: linear-gradient(90deg, #7548e8, #d946ef);
    border-radius: 99px;
}
.status-row .process-bar {
    background: #217ea3;
}
.privacy-note {
    border-top: 1px solid #e7ebf2;
    margin-top: 7rem;
    padding-top: 1rem;
    color: #718096;
    font-size: 0.75rem;
}
.demo-data-note {
    color: #748196;
    font-size: 0.78rem;
}
.stats-section .form-select {
    border-radius: 999px;
    border-color: #dce3ed;
}
.stats-section .form-select:focus {
    border-color: #8a70ed;
    box-shadow: 0 0 0 0.2rem #6542d81a;
}
@media (max-width: 575.98px) {
    .stat-card {
        padding: 1rem;
        border-radius: 18px;
        min-height: 130px;
    }
    .stat-value {
        font-size: 2rem;
    }
    .stat-label {
        font-size: 0.62rem;
    }
    .stat-panel {
        padding: 1.1rem;
        border-radius: 20px;
    }
    .chart-wrap {
        height: 240px;
    }
    .privacy-note {
        margin-top: 4rem;
    }
}

/* ===== Perbaikan: running text (sebelumnya memakai kelas Tailwind yang tidak ada) ===== */
.running-text {
    background: var(--rakat-deep);
    color: #d6effa;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 600;
    border-bottom: 1px solid #ffffff1a;
}
.running-track {
    display: flex;
    width: max-content;
    animation: marquee 45s linear infinite;
}
.running-text:hover .running-track,
.running-text:focus-within .running-track {
    animation-play-state: paused;
}
.running-group {
    display: flex;
    flex-shrink: 0;
    min-width: 100vw;
    justify-content: space-around;
}
.running-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.75rem;
}
.running-item i {
    color: var(--gold);
}
.running-item a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}
@media (prefers-reduced-motion: reduce) {
    .running-text {
        overflow-x: auto;
    }
    .running-track {
        animation: none;
    }
    .running-group[aria-hidden="true"] {
        display: none;
    }
    .service-card,
    .btn-rakat {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ===== Perbaikan: warna statistik disamakan dengan tema teal ===== */
.stats-section {
    background: #f4f8fa;
}
.stat-note {
    color: var(--rakat);
}
.chart-tag {
    color: var(--rakat);
    border-color: #bcdcea;
}
.status-row b {
    color: var(--rakat);
}
.status-row .progress {
    background: #e3ecf0;
}
.status-row .progress-bar {
    background: linear-gradient(90deg, #217ea3, #009bd7);
}
.status-row .process-bar {
    background: var(--gold);
}
.stats-section .form-select:focus {
    border-color: #5aaed0;
    box-shadow: 0 0 0 0.2rem #217ea318;
}
.stat-card,
.stat-panel {
    border-color: var(--line);
}
.privacy-note {
    margin-top: 2.5rem;
}
.chart-empty {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ===== Struktur baru: kanal, informasi, langkah ===== */
.service-icon.green {
    background: #dcf5e4;
    color: #1e8a4a;
}
.service-card p {
    min-height: 96px;
}
.service-national {
    border-color: #cfe0f5;
    background: linear-gradient(180deg, #f6faff, #fff);
}
.emergency-note {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: #fff7e6;
    border: 1px solid #f3dfb0;
    color: #6b4e0a;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    font-size: 0.86rem;
    line-height: 1.6;
}
.emergency-note i {
    margin-top: 0.2rem;
    color: #c98a00;
}
.emergency-note a {
    color: inherit;
    font-weight: 800;
}
.soft-section {
    background: var(--surface);
}
.report-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.9rem;
}
.report-list li {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}
.report-list li > i {
    flex: 0 0 42px;
    height: 42px;
    border-radius: 13px;
    background: #e1f2f9;
    color: var(--rakat);
    display: flex;
    align-items: center;
    justify-content: center;
}
.report-list strong {
    display: block;
    font-size: 0.92rem;
}
.report-list span {
    display: block;
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.6;
}
.info-heading {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.info-card {
    height: 100%;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.1rem 1.2rem;
}
.info-card > i {
    color: var(--rakat);
    font-size: 1.15rem;
    margin-top: 0.15rem;
}
.info-card p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.65;
    color: #3d5552;
}
.benefit-card {
    height: 100%;
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.1rem 1.2rem;
}
.benefit-icon {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 12px;
    background: #fff3ce;
    color: #9a6b00;
    display: flex;
    align-items: center;
    justify-content: center;
}
.benefit-card strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}
.benefit-card p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--muted);
}
.tip-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.8rem;
}
.tip-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--rakat);
    color: #fff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.tip-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
}
.tip-card p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.75;
    margin: 0;
}
.process-section {
    background: #fff;
}
.hero-emergency {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.6rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: #ffffff14;
    border: 1px solid #ffffff2e;
    font-size: 0.8rem;
    color: #e6f7f2;
}
.hero-emergency a {
    color: #fff;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}
@media (max-width: 575.98px) {
    .service-card p {
        min-height: 0;
    }
    .hero-emergency {
        border-radius: 16px;
        align-items: flex-start;
    }
}

/* ===== Peta sebaran ===== */
/* map-wrap & petaKasus dipindah ke seksi peta di bawah */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: #475569;
}
.map-legend .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.45rem;
    vertical-align: -1px;
    border: 2px solid;
}
.dot-1 {
    background: #009bd766;
    border-color: #009bd7;
}
.dot-2 {
    background: #e9b94966;
    border-color: #e9b949;
}
.dot-3 {
    background: #d9534f66;
    border-color: #d9534f;
}
@media (max-width: 575.98px) {
    #petaKasus {
        height: 340px;
    }
}

/* ===== Palet biru: #009BD7 #217EA3 #2D5D70 #25363D #293033 ===== */
:root {
    --rakat-bright: #009bd7;
    --rakat-text: #1b6a8b;
    --ink-2: #293033;
}
body {
    color: var(--ink);
    background: #fff;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    color: inherit;
}
.hero-title {
    color: #fff;
}
.hero-title span {
    color: #bfe8f7;
}
.section-kicker,
.service-link,
.stat-note,
.chart-tag,
.status-row b {
    color: var(--rakat-text);
}
.nav-link:hover,
.nav-link.active {
    color: var(--rakat-text) !important;
}
.step-number,
.tip-num {
    font-weight: 800;
}
.step-number {
    color: var(--rakat-dark);
}
.service-icon.teal,
.note-icon,
.report-list li > i,
.info-card > i {
    color: var(--rakat);
}
.hero-title span {
    color: #bfe8f7;
}
.footer-rakat {
    background: #fff;
}
.running-text {
    background: var(--ink);
}
.running-item i {
    color: #7fd0ee;
}
.btn-rakat:focus-visible,
.btn:focus-visible,
.service-link:focus-visible,
a:focus-visible {
    outline: 3px solid #009bd755;
    outline-offset: 2px;
}

/* ===== GAYA BARU UNTUK DASHBOARD PUBLIK ===== */
.stats-section {
    background: #f0f4f8; /* Latar belakang abu-abu kebiruan yang sangat lembut */
    padding-bottom: 6rem;
}
.filter-box {
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    box-shadow: 0 4px 15px rgba(20, 48, 64, 0.05);
    border: 1px solid var(--line);
}

/* Kartu Ringkasan (Dash Cards) */
.dash-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(20, 48, 64, 0.04);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    border-top: 4px solid #ccc; /* Default border top */
}
.dash-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(20, 48, 64, 0.08);
}
.dash-watermark {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 6.5rem;
    opacity: 0.04;
    color: var(--ink);
    transform: rotate(-10deg);
    pointer-events: none;
}
.dash-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}
.dash-value {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 0.75rem;
}
.dash-note {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    background: #f4f8fa;
    border-radius: 6px;
    display: inline-block;
}

/* Warna Khusus Kartu */
.card-teal {
    border-top-color: var(--rakat);
}
.card-teal .dash-value {
    color: var(--rakat-dark);
}
.card-teal .dash-note {
    color: var(--rakat);
    background: #e1f2f9;
}

.card-pink {
    border-top-color: #f04470;
}
.card-pink .dash-note {
    color: #d62d58;
    background: #ffe8ee;
}

.card-purple {
    border-top-color: #a855f7;
}
.card-purple .dash-note {
    color: #8c3cd9;
    background: #f3e8ff;
}

.card-blue {
    border-top-color: #3b82f6;
}
.card-blue .dash-note {
    color: #2563eb;
    background: #e0e7ff;
}

/* Panel Grafik & Peta */
.stat-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(20, 48, 64, 0.03);
}
.stat-panel h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: var(--ink-2);
}
.stat-panel p {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}
.donut-wrap {
    height: 260px;
}
.donut-center-text {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ===== DARK MODE OVERRIDES ===== */
[data-theme="dark"] {
    /* Variabel warna diubah ke versi gelap */
    --ink: #e2e8f0;
    --ink-2: #f8fafc;
    --surface: #121c22;
    --line: #233540;
    --muted: #8b9fa8;
}

/* Latar Belakang & Teks Dasar */
[data-theme="dark"] body {
    background-color: #0c1317;
}
[data-theme="dark"] .nav-rakat {
    background: rgba(12, 19, 23, 0.96);
}

/* Bagian Latar Lembut (Section) */
[data-theme="dark"] .stats-section,
[data-theme="dark"] .process-section,
[data-theme="dark"] .soft-section {
    background-color: #0f171c;
}

/* Komponen Kartu (Cards, Panels, Modals, Footer) */
[data-theme="dark"] .trust-strip,
[data-theme="dark"] .footer-rakat,
[data-theme="dark"] .service-card,
[data-theme="dark"] .info-card,
[data-theme="dark"] .benefit-card,
[data-theme="dark"] .tip-card,
[data-theme="dark"] .stat-panel,
[data-theme="dark"] .dash-card,
[data-theme="dark"] .filter-box,
[data-theme="dark"] .rakat-modal .modal-content,
[data-theme="dark"] .toast {
    background-color: #162229;
    border-color: var(--line);
}

/* Input Form & Select */
[data-theme="dark"] .rakat-modal .form-control,
[data-theme="dark"] .rakat-modal .form-select,
[data-theme="dark"] .stats-section .form-select {
    background-color: #0c1317;
    border-color: var(--line);
    color: var(--ink);
}

/* Kasus Khusus */
[data-theme="dark"] .service-national {
    background: linear-gradient(180deg, #162229, #0f171c);
    border-color: var(--line);
}
[data-theme="dark"] .emergency-note {
    background: #2b1f0c;
    border-color: #4a3715;
    color: #e6c587;
}
[data-theme="dark"] .dash-note {
    background-color: #0c1317;
}
[data-theme="dark"] #petaKasus {
    background: #0f171c; /* Latar peta gelap */
}

/* Toggle Ikon Matahari/Bulan */
[data-theme="dark"] .theme-icon-dark {
    display: none !important;
}
[data-theme="dark"] .theme-icon-light {
    display: inline-block !important;
}

/* Custom Radio Card Styles */
.card-radio-label {
    position: relative;
    cursor: pointer;
    border: 4px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}
.card-radio-label:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}
/* Lingkaran Radio Button Custom di pojok kiri atas */
.radio-indicator {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 4px solid #e0e0e0;
}
/* Efek saat dipilih (Checked) */
.card-radio:checked + .card-radio-label {
    border-color: #6542d8; /* Warna outline saat terpilih */
    transform: scale(0.98);
}
.card-radio:checked + .card-radio-label .radio-indicator {
    background: #6542d8; /* Warna titik biru di dalam */
    border-color: white;
}

/* ==========================================
   PERBAIKAN TEKS & FORM UNTUK MODE GELAP 
============================================= */

/* 1. Mengubah judul dan label yang tadinya dipaksa hitam menjadi terang */
[data-theme="dark"] form .form-label.text-dark,
[data-theme="dark"] .modal-title.text-dark,
[data-theme="dark"] .text-dark {
    color: var(--ink-2) !important;
}

/* Pengecualian: Kartu kuning darurat harus tetap berteks hitam agar terbaca */
[data-theme="dark"] .card-radio-label[style*="#f1c40f"] .text-dark,
[data-theme="dark"] .card-radio-label[style*="#f3c317"] .text-dark {
    color: #212529 !important;
}

/* 2. Mengubah input form (yang tadinya bg-light) menjadi gelap elegan */
[data-theme="dark"] .form-control.bg-light,
[data-theme="dark"] .form-select.bg-light {
    background-color: #0c1317 !important;
    color: #e2e8f0 !important;
    border-color: #233540 !important;
}

/* 3. Menyesuaikan warna placeholder (teks bayangan di dalam input) */
[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .form-select::placeholder {
    color: #5b6b72 !important;
    opacity: 1;
}

/* 4. Pastikan teks opsi di dalam dropdown (<select>) terbaca */
[data-theme="dark"] .form-select option {
    background-color: #0c1317;
    color: #e2e8f0;
}

/* ==========================================
   PERBAIKAN LATAR BELAKANG MODAL (DARK MODE)
============================================= */

/* 1. Paksa background Modal (kotak form) menjadi gelap */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-body,
[data-theme="dark"] .modal-footer {
    background-color: #162229 !important;
    border-color: #233540 !important;
}

/* 2. Pastikan semua teks judul, label, dan indikator step berwarna terang */
[data-theme="dark"] .modal-content h4,
[data-theme="dark"] .modal-content .form-label,
[data-theme="dark"] .modal-content p,
[data-theme="dark"] #stepText {
    color: #e2e8f0 !important;
}

/* 3. Perbaikan background tulisan "1 dari 3" agar tidak ada kotak putih */
[data-theme="dark"] .progress {
    background-color: #233540 !important;
}

/* 4. Perbaikan Tombol "Kembali" agar sesuai dengan mode gelap */
[data-theme="dark"] #btnPrev {
    color: #e2e8f0 !important;
    border-color: #5b6b72 !important;
    background-color: transparent !important;
}
[data-theme="dark"] #btnPrev:hover {
    background-color: #233540 !important;
    color: #fff !important;
}

/* ==========================================
   HERO CAROUSEL (SLIDER ATAS)
============================================= */
.hero-carousel-section {
    position: relative;
    background-color: var(--ink); /* Warna dasar jika gambar telat dimuat */
    margin-top: -1px; /* Mengatasi celah navbar tipis */
}

/* Tinggi Slider menyesuaikan layar */
#heroCarousel,
.carousel-inner,
.carousel-item {
    height: 85vh;
    min-height: 550px;
    max-height: 800px;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

/* Agar teks terpusat dan tidak terlalu lebar */
.carousel-content {
    max-width: 750px;
    margin: 0 auto;
    z-index: 2;
}

/* ---------------------------------
   Kustomisasi Panah (Arrows) 
----------------------------------- */
.carousel-control-prev,
.carousel-control-next {
    width: 8%; /* Lebar area sensor klik */
    opacity: 0.6;
    z-index: 5;
}
.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Membuat panah menjadi kotak garis tipis (sesuai referensi SAPA 129) */
.carousel-control-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.25); /* Garis transparan */
    border-radius: 4px;
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background-color: transparent;
}
.carousel-control-prev:hover .carousel-control-custom,
.carousel-control-next:hover .carousel-control-custom {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* ---------------------------------
   Kustomisasi Titik (Indicators) 
----------------------------------- */
.carousel-indicators {
    margin-bottom: 2rem;
    z-index: 5;
}
.carousel-indicators button {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50%;
    margin: 0 6px !important;
    background-color: #fff !important;
    opacity: 0.4;
    border: 2px solid transparent !important;
    transition: all 0.3s ease;
}
/* Efek saat titik aktif (menyala & sedikit membesar) */
.carousel-indicators button.active {
    opacity: 1;
    background-color: #f2c85b !important;
    transform: scale(1.3);
}

/* Responsive untuk layar HP */
@media (max-width: 575.98px) {
    #heroCarousel,
    .carousel-inner,
    .carousel-item {
        height: 75vh;
        min-height: 450px;
    }
    .carousel-control-custom {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}

.map-wrap {
    position: relative;
    width: 100%;
}

#petaKasus {
    width: 100%;
    height: 400px;
    min-height: 400px;
    border-radius: 12px;
    z-index: 1;
}

#mapEmpty {
    display: none;
    padding: 20px;
    text-align: center;
}

.wizard-container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.step-indicator {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
    font-weight: 500;
}
.progress {
    height: 6px;
    margin-bottom: 30px;
    border-radius: 10px;
}
.step-content {
    display: none;
    animation: fadeIn 0.4s;
}
.step-content.active {
    display: block;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desain Custom Radio Cards */
.radio-card input[type="radio"] {
    display: none;
}
.radio-card label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    height: 100%;
    text-align: center;
    border: 3px solid transparent;
}
.radio-card label::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #fff;
}
.radio-card input[type="radio"]:checked + label::before {
    background: #fff;
    box-shadow: inset 0 0 0 4px #0d6efd;
    border-color: #0d6efd;
}
.radio-card input[type="radio"]:checked + label {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: #fff;
}

.bg-card-red {
    background-color: #e74c3c;
    color: white;
}
.bg-card-yellow {
    background-color: #f1c40f;
    color: #333;
}
.bg-card-yellow label::before {
    border-color: #333;
}
.bg-card-blue {
    background-color: #00bcd4;
    color: white;
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}
.speaker-icon {
    color: #2ecc71;
    margin-left: 10px;
    cursor: pointer;
    font-size: 16px;
}

/* ===== PERBAIKAN MODE GELAP ===== */
[data-theme="dark"] {
    --rakat-text: #6cc6e8;
    color-scheme: dark; /* ikon kalender, scrollbar, dan kontrol bawaan browser */
}

/* 1. Bar pengumuman dan latar hero */
[data-theme="dark"] .running-text {
    background: #0a1014;
    border-bottom-color: #233540;
}
[data-theme="dark"] .hero-carousel-section {
    background-color: #0a1014;
}

/* 2. Navbar */
[data-theme="dark"] .nav-link {
    color: #a9bbc4 !important;
}
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: #7fd0ee !important;
}
[data-theme="dark"] .navbar-toggler {
    border-color: #3a4d58;
}
[data-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}
[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* 3. Kartu pilihan berlatar kuning tetap bertulisan gelap */
[data-theme="dark"] .modal-content .card-radio-label.text-dark,
[data-theme="dark"] .modal-content .card-radio-label.text-dark * {
    color: #212529 !important;
}

/* 4. Kotak .bg-light (hasil lacak, kode tiket, kotak kerahasiaan) */
[data-theme="dark"] .bg-light:not(.form-control):not(.form-select) {
    background-color: #1b2d37 !important;
    border-color: #233540 !important;
    color: var(--ink);
}
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom {
    border-color: var(--line) !important;
}

/* 5. Teks yang warnanya ditulis mati */
[data-theme="dark"] .card-teal .dash-value {
    color: #7fd0ee;
}
[data-theme="dark"] .info-card p {
    color: #b6c7cf;
}
[data-theme="dark"] .map-legend {
    color: var(--muted);
}
[data-theme="dark"] .stat-panel > p,
[data-theme="dark"] .stat-panel .d-flex p {
    color: var(--muted);
}

/* 6. Ikon dan elemen pastel, garis, tombol outline */
[data-theme="dark"] .step-number,
[data-theme="dark"] .report-list li > i,
[data-theme="dark"] .note-icon {
    background: #1b3340;
    color: #7fd0ee;
}
[data-theme="dark"] .benefit-icon {
    background: #33290f;
    color: #e9b949;
}
[data-theme="dark"] .process-step {
    border-bottom-color: var(--line);
}
[data-theme="dark"] .btn-outline-secondary {
    color: #b6c7cf;
    border-color: #3a4d58;
}
[data-theme="dark"] .btn-outline-secondary:hover {
    background: #233540;
    color: #fff;
}

/* 7. Peta */
[data-theme="dark"] .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9);
}
[data-theme="dark"] .peta-info {
    background: #16242c;
    color: #e3ecf0;
}

[data-theme="dark"] .bg-light {
    background-color: #1b2d37 !important;
    color: #e3ecf0;
}
[data-theme="dark"] .form-control.bg-light,
[data-theme="dark"] .form-select.bg-light {
    border-color: #2a3a44;
}
[data-theme="dark"] .text-dark:not(.card-radio-label):not(.btn):not(.badge) {
    color: #e3ecf0 !important;
}

/* ===== PETA GAYA BARU ===== */
.map-wrap {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--line);
    margin-top: 1rem;
}
.map-wrap #petaKasus {
    height: 580px;
    min-height: 0;
    border: 0;
    border-radius: 0;
}
#mapEmpty {
    z-index: 1100;
    background: rgba(255, 255, 255, 0.88);
}

.map-card {
    position: absolute;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 1rem 1.15rem;
    box-shadow: 0 12px 30px rgba(10, 30, 40, 0.18);
}

.map-title-card {
    top: 16px;
    left: 16px;
    max-width: 270px;
}
.map-title-card small {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--muted);
}
.map-title-card h4 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0.35rem 0 0.4rem;
}
.map-title-card p {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0;
}

.map-fs {
    position: absolute;
    z-index: 1000;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    box-shadow: 0 8px 20px rgba(10, 30, 40, 0.18);
}
.map-fs:hover {
    background: var(--rakat);
    color: #fff;
}

.map-layers {
    top: 70px;
    right: 16px;
    width: 300px;
}
.map-layers-title {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 0.7rem;
}
.map-layer-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
}
.map-layer-btns button {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    border-radius: 12px;
    padding: 0.55rem 0.3rem;
    font-size: 0.74rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.map-layer-btns button i {
    font-size: 0.95rem;
    color: var(--muted);
}
.map-layer-btns button.active {
    background: var(--rakat);
    border-color: var(--rakat);
    color: #fff;
}
.map-layer-btns button.active i {
    color: #fff;
}

.map-switch {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    margin: 0.8rem 0 0;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
}
.map-switch input {
    display: none;
}
.map-switch span {
    width: 36px;
    height: 20px;
    border-radius: 99px;
    background: #b8c6cd;
    position: relative;
    flex-shrink: 0;
    transition: 0.2s;
}
.map-switch span::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: 0.2s;
}
.map-switch input:checked + span {
    background: var(--rakat);
}
.map-switch input:checked + span::after {
    left: 18px;
}

.map-badge {
    position: absolute;
    z-index: 1000;
    right: 12px;
    bottom: 34px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(10, 30, 40, 0.18);
}
.map-badge:empty {
    display: none;
}

.leaflet-tooltip.peta-tip {
    border: 0;
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 8px 20px rgba(10, 30, 40, 0.2);
    font-size: 0.8rem;
}

.map-legend-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.4rem;
    margin-top: 0.9rem;
    padding: 0.8rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    font-size: 0.78rem;
    color: var(--muted);
}
.map-legend-title {
    font-weight: 800;
    letter-spacing: 0.1em;
    font-size: 0.66rem;
    color: var(--rakat-text);
}
.map-legend-bar .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.45rem;
    vertical-align: -1px;
}

.map-wrap:fullscreen {
    border-radius: 0;
}
.map-wrap:fullscreen #petaKasus {
    height: 100vh;
}

@media (max-width: 767.98px) {
    .map-wrap #petaKasus {
        height: 460px;
    }
    .map-title-card {
        display: none;
    }
    .map-layers {
        width: 230px;
        top: 64px;
        right: 12px;
        padding: 0.75rem;
    }
}

/* mode gelap */
[data-theme="dark"] .map-card,
[data-theme="dark"] .map-fs,
[data-theme="dark"] .map-badge {
    background: rgba(22, 34, 41, 0.93);
    color: #e6eef2;
}
[data-theme="dark"] .map-layer-btns button {
    color: #e6eef2;
    border-color: #2c3f4a;
}
[data-theme="dark"] .map-layer-btns button.active {
    background: var(--rakat);
    color: #fff;
}
[data-theme="dark"] #mapEmpty {
    background: rgba(15, 23, 28, 0.9);
}
[data-theme="dark"] .leaflet-tooltip.peta-tip {
    background: #16242c;
    color: #e6eef2;
}
[data-theme="dark"] .tile-jalan {
    filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9);
}
