/*
 * HPYLokasi — kombinasi warna Google di atas struktur terang ala Gmail.
 *
 * Warna  : biru #1A73E8, merah #EA4335, kuning #FBBC04, hijau #34A853.
 * Struktur: kanvas biru-abu sangat terang, topbar & sidebar MENYATU dengan
 *           kanvas (tanpa border/shadow), konten di kartu putih beradius besar,
 *           satu-satunya blok pekat ada di pil nav aktif.
 *
 * Mode gelap dimatikan di AdminPanelProvider (->darkMode(false)),
 * jadi berkas ini tidak memuat aturan mode gelap sama sekali.
 * Diinject lewat PanelsRenderHook::HEAD_END di AdminPanelProvider.
 */

:root {
    /* Empat warna Google */
    --g-blue: #1a73e8;
    --g-red: #ea4335;
    --g-yellow: #fbbc04;
    --g-green: #34a853;

    /* Turunan biru untuk teks & state */
    --g-blue-deep: #0b57d0;
    --g-blue-ink: #001d35;

    /* Permukaan Gmail */
    --g-canvas: #f6f8fc;
    --g-surface: #ffffff;
    --g-line: #e3e6eb;
    --g-muted: #5f6368;

    /* Pil nav aktif — persis milik Gmail */
    --g-pill: #d3e3fd;

    --g-radius: 16px;
}

/* ---------- Kanvas ---------- */

.fi-body {
    background-color: var(--g-canvas);
    letter-spacing: .01em;
}

/* ---------- Topbar: menyatu dengan kanvas ---------- */

.fi-topbar > nav {
    background-color: var(--g-canvas);
    border-bottom: none;
    box-shadow: none;
}

/* ---------- Sidebar: juga menyatu, hanya pil yang berwarna ---------- */

.fi-sidebar {
    background-color: var(--g-canvas);
    border-inline-end: none;
}

.fi-sidebar-nav {
    padding-inline: .5rem;
}

/* Pil penuh di kedua sisi, pola Gmail */
.fi-sidebar-item-button {
    border-radius: 9999px;
    margin-inline-end: .5rem;
    font-weight: 500;
    color: var(--g-muted);
}

.fi-sidebar-item-button:hover {
    background-color: rgba(60, 64, 67, .06);
}

.fi-sidebar-item-active .fi-sidebar-item-button {
    background-color: var(--g-pill);
    color: var(--g-blue-ink);
    font-weight: 600;
}

.fi-sidebar-item-active .fi-sidebar-item-button .fi-icon {
    color: var(--g-blue-deep);
}

.fi-sidebar-group-label {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--g-muted);
}

/* ---------- Konten: kartu putih beradius besar, garis tipis, tanpa shadow ---------- */

.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-simple-main {
    background-color: var(--g-surface);
    border: 1px solid var(--g-line);
    border-radius: var(--g-radius);
    box-shadow: none;
}

/* Modal tetap butuh elevasi karena mengambang */
.fi-modal-window {
    border-radius: var(--g-radius);
    box-shadow: 0 8px 24px rgba(60, 64, 67, .18);
}

.fi-ta-header-cell {
    font-weight: 600;
    color: var(--g-muted);
}

.fi-ta-row:hover {
    background-color: rgba(26, 115, 232, .05);
}

.fi-header-heading,
.fi-section-header-heading {
    color: #202124;
    font-weight: 500;
}

/* ---------- Kombinasi 4 warna sebagai aksen ---------- */

/* Garis empat warna di atas kartu login */
.fi-simple-main::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(
        to right,
        var(--g-blue) 0 25%,
        var(--g-red) 25% 50%,
        var(--g-yellow) 50% 75%,
        var(--g-green) 75% 100%
    );
}

/*
 * Catatan: garis atas 4 warna bergantian pada kartu statistik sudah dihapus.
 * Warnanya berputar tiap 4 kartu, sehingga setelah kartu disusun 2 kolom
 * urutannya jadi acak terhadap maknanya — "Pencapaian rute" bisa bergaris
 * merah walau angkanya sehat, dan itu terbaca sebagai peringatan palsu.
 * Status tiap angka sudah disampaikan lewat warna teks keterangannya.
 */

/* ---------- Tombol ---------- */

.fi-btn {
    border-radius: 9999px;
    font-weight: 500;
    letter-spacing: .0107em;
    box-shadow: none;
}

.fi-btn.fi-color-primary:not(.fi-btn-outlined):hover {
    box-shadow: 0 1px 3px rgba(60, 64, 67, .3);
}

/* ---------- Input ---------- */

.fi-input-wrp {
    border-radius: 8px;
}

.fi-badge {
    border-radius: 9999px;
    font-weight: 500;
}

/* ---------- Halaman Peta Salesman ---------- */

.hpy-peta-filter {
    display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-end;
    padding: .875rem 1rem; margin-bottom: 1rem;
    background: var(--g-surface); border: 1px solid var(--g-line);
    border-radius: var(--g-radius);
}
.hpy-peta-filter label { display: flex; flex-direction: column; gap: .25rem; }
.hpy-peta-filter label span { font-size: .75rem; font-weight: 600; color: var(--g-muted); }
.hpy-peta-filter input, .hpy-peta-filter select {
    border: 1px solid #d6dbe1; border-radius: 8px; padding: .375rem .625rem;
    font-size: .875rem; color: #202124; background: #fff; min-width: 11rem;
}

.hpy-peta-legenda {
    display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-inline-start: auto;
    font-size: .75rem; color: var(--g-muted);
}
.hpy-peta-legenda span { display: inline-flex; align-items: center; gap: .375rem; }
.hpy-peta-legenda i {
    width: .625rem; height: .625rem; border-radius: 9999px; display: inline-block; flex: none;
}
.hpy-peta-legenda .hpy-kotak { background: #202124; border-radius: 2px; }
.hpy-peta-legenda .hpy-cincin-absen {
    background: transparent; border: 2px dashed #f29900;
    width: .75rem; height: .75rem;
}
.hpy-peta-legenda .hpy-legenda-catatan {
    flex-basis: 100%; text-align: end; font-style: italic; color: #80868b;
}
.hpy-peta-legenda .hpy-legenda-nomor {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.125rem; height: 1.125rem; flex: none;
    background: #1a73e8; color: #fff; border: 2px solid #fff; border-radius: 9999px;
    font-size: .625rem; font-weight: 700; line-height: 1; box-sizing: border-box;
}

/*
 * Peta mengikuti ukuran layar di dua arah:
 * - lebar panel daftar ikut lebar viewport, dibatasi 17-26rem
 * - tinggi ikut tinggi viewport dikurangi topbar/filter, dibatasi 26-52rem
 */
.hpy-peta-wrap {
    display: grid;
    grid-template-columns: clamp(17rem, 20vw, 26rem) 1fr;
    gap: 1rem;
    height: clamp(26rem, calc(100vh - 20rem), 52rem);
}

@media (max-width: 1024px) {
    .hpy-peta-wrap { grid-template-columns: 1fr; height: auto; }
    .hpy-peta-canvas { height: clamp(20rem, 60vh, 32rem); }
    .hpy-peta-list { max-height: 16rem; }
}

.hpy-peta-list {
    overflow-y: auto; background: var(--g-surface);
    border: 1px solid var(--g-line); border-radius: var(--g-radius); padding: .5rem;
}
.hpy-kosong { padding: .75rem; font-size: .8125rem; color: var(--g-muted); }

/* Salesman yang tidak bisa dipetakan: dilaporkan, tapi jelas terpisah dari kartu rute */
.hpy-tanpa-data {
    margin-top: .5rem; padding: .625rem .75rem;
    border-top: 1px solid var(--g-line);
    background: var(--g-canvas); border-radius: 8px;
}
.hpy-tanpa-data-judul {
    margin: 0 0 .375rem; font-size: .75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .02em; color: #b06000;
}
.hpy-tanpa-data-baris {
    display: flex; align-items: baseline; gap: .375rem;
    font-size: .75rem; color: #3c4043; padding: .1875rem 0;
}
.hpy-tanpa-data-baris b { font-weight: 600; }
.hpy-tanpa-data-baris i {
    margin-inline-start: auto; font-style: normal; color: var(--g-muted);
    text-align: end; flex: none;
}
.hpy-tanpa-data-catatan {
    margin: .375rem 0 0; font-size: .6875rem; line-height: 1.45;
    font-style: italic; color: var(--g-muted);
}

.hpy-petunjuk {
    padding: .5rem .75rem .625rem;
    font-size: .75rem; line-height: 1.45; color: var(--g-muted);
    border-bottom: 1px solid var(--g-line); margin-bottom: .375rem;
}

.hpy-tombol-semua {
    display: block; width: 100%; text-align: start; cursor: pointer;
    padding: .5rem .75rem; margin-bottom: .375rem;
    border: 1px solid var(--g-line); border-radius: 9999px; background: #fff;
    font-size: .75rem; font-weight: 600; color: var(--g-blue-deep);
}
.hpy-tombol-semua:hover { background: var(--g-pill); }

.hpy-kartu-sales {
    width: 100%; text-align: start; display: block; background: transparent;
    padding: .625rem .75rem; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
}
.hpy-kartu-sales:hover { background: #f1f3f4; }
.hpy-kartu-sales.aktif { background: var(--g-pill); border-color: #c6dafc; }
.hpy-kartu-nama {
    display: flex; align-items: center; gap: .5rem;
    font-weight: 600; color: #202124; font-size: .875rem;
}
.hpy-kartu-nama i { width: .5rem; height: .5rem; border-radius: 9999px; flex: none; }
.hpy-kartu-meta { display: block; font-size: .75rem; color: var(--g-muted); margin-top: .125rem; }

.hpy-peta-canvas {
    border-radius: var(--g-radius); border: 1px solid var(--g-line);
    overflow: hidden; z-index: 0;
}
.leaflet-container { font: inherit; }

/* Penanda bernomor: urutan kunjungan pertama sampai terakhir */
.hpy-nomor {
    display: flex; align-items: center; justify-content: center;
    border-radius: 9999px; border: 2px solid #fff;   /* cincin surface 2px */
    color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
    box-sizing: border-box;
}
.hpy-nomor-pertama {
    font-size: 12px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 1px 4px rgba(0, 0, 0, .4);
}
.hpy-nomor-terakhir {
    font-size: 12px;
    box-shadow: 0 0 0 3px rgba(32, 33, 36, .28), 0 1px 4px rgba(0, 0, 0, .4);
}

.hpy-kartu-rute {
    display: block; margin-top: .25rem;
    font-size: .6875rem; line-height: 1.5; color: var(--g-muted);
}
.hpy-kartu-rute b {
    display: inline-block; min-width: 1.1rem; margin-inline-end: .125rem;
    text-align: center; border-radius: 9999px;
    background: #e8eaed; color: #202124; font-size: .625rem; font-weight: 700;
}

.hpy-ikon-kantor {
    width: 14px; height: 14px; background: #202124;
    border: 2px solid #fff; border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.hpy-popup h4 { font-weight: 600; font-size: .875rem; margin: 0 0 .25rem; color: #202124; }
.hpy-popup dl {
    display: grid; grid-template-columns: auto 1fr;
    gap: .125rem .5rem; margin: 0; font-size: .75rem;
}
.hpy-popup dt { color: var(--g-muted); }
.hpy-popup dd { margin: 0; color: #202124; }
.hpy-badge-oor { color: #d93025; font-weight: 600; }

.hpy-catatan { margin-top: .875rem; font-size: .75rem; color: var(--g-muted); }

/* ---------- Kotak panduan di form ---------- */

.hpy-panduan-section {
    background: #f0f5fd;
    border-color: #c6dafc !important;
}
.hpy-panduan p { font-size: .8125rem; line-height: 1.6; color: #3c4043; margin: 0; }
.hpy-panduan ul { margin: .625rem 0 0; padding-inline-start: 1.125rem; }
.hpy-panduan li {
    font-size: .8125rem; line-height: 1.6; color: #3c4043;
    margin-bottom: .25rem; list-style: disc;
}
.hpy-panduan b { color: #202124; font-weight: 600; }

/* ---------- Halaman Tutorial ---------- */

.hpy-tut { display: grid; grid-template-columns: 17rem 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 1024px) { .hpy-tut { grid-template-columns: 1fr; } }

.hpy-tut-nav {
    display: flex; flex-direction: column; gap: .25rem;
    background: var(--g-surface); border: 1px solid var(--g-line);
    border-radius: var(--g-radius); padding: .5rem; position: sticky; top: 1rem;
}
@media (max-width: 1024px) { .hpy-tut-nav { position: static; } }

.hpy-tut-tab {
    display: flex; gap: .625rem; align-items: flex-start; text-align: start;
    padding: .625rem .75rem; border-radius: 10px; cursor: pointer;
    background: transparent; border: 1px solid transparent; width: 100%;
}
.hpy-tut-tab:hover { background: #f1f3f4; }
.hpy-tut-tab.aktif { background: var(--g-pill); border-color: #c6dafc; }
.hpy-tut-tab b { display: block; font-size: .8125rem; font-weight: 600; color: #202124; }
.hpy-tut-tab em { display: block; font-style: normal; font-size: .6875rem; color: var(--g-muted); margin-top: .125rem; }
.hpy-tut-ikon { width: 1.125rem; height: 1.125rem; color: var(--g-blue-deep); flex: none; margin-top: .125rem; }

.hpy-tut-isi {
    background: var(--g-surface); border: 1px solid var(--g-line);
    border-radius: var(--g-radius); padding: 1.5rem;
}
.hpy-tut-isi h2 { font-size: 1.25rem; font-weight: 500; color: #202124; margin: 0 0 .5rem; }
.hpy-tut-isi h3 { font-size: .9375rem; font-weight: 600; color: #202124; margin: 1.75rem 0 .625rem; }
.hpy-tut-isi h4 { font-size: .875rem; font-weight: 600; color: #202124; margin: 0 0 .125rem; }
.hpy-tut-p { font-size: .875rem; line-height: 1.7; color: #3c4043; margin: 0 0 1rem; }

/* Tangkapan layar */
.hpy-tangkapan { margin: 1rem 0 1.25rem; }
.hpy-tangkapan a { display: block; }
.hpy-tangkapan img {
    display: block; width: 100%; height: auto;
    border: 1px solid var(--g-line); border-radius: 12px;
    background: var(--g-canvas);
}
.hpy-tangkapan a:hover img { border-color: var(--g-blue); }
.hpy-tangkapan figcaption {
    margin-top: .5rem; font-size: .75rem; color: var(--g-muted); text-align: center;
}

/* Wireframe layar */
.hpy-layar {
    border: 1px solid var(--g-line); border-radius: 12px; overflow: hidden;
    background: var(--g-canvas); margin: 1rem 0 1.25rem;
}
.hpy-layar-bar {
    display: flex; align-items: center; gap: .375rem;
    padding: .5rem .75rem; background: #e8eaed;
    font-size: .6875rem; font-weight: 600; color: #5f6368;
}
.hpy-layar-bar span { width: .5rem; height: .5rem; border-radius: 9999px; background: #bdc1c6; }
.hpy-layar-bar span:first-child { margin-inline-start: 0; }
.hpy-layar-isi { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; padding: .75rem; }

.hpy-w {
    position: relative;
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 2.75rem; padding: .5rem .625rem;
    background: #fff; border: 1px solid #dadce0; border-radius: 8px;
    font-size: .6875rem; color: #5f6368; line-height: 1.35;
}
.hpy-w[data-tag]::before {
    content: attr(data-tag);
    position: absolute; top: -.4rem; inset-inline-start: -.4rem;
    width: 1.125rem; height: 1.125rem; border-radius: 9999px;
    background: var(--g-blue); color: #fff;
    font-size: .625rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.hpy-w-2 { grid-column: span 2; }
.hpy-w-3 { grid-column: span 3; }
.hpy-w-4 { grid-column: span 4; }
.hpy-w-6 { grid-column: span 6; }
.hpy-w-tinggi { min-height: 5.5rem; }
.hpy-w-peta { min-height: 8rem; }
.hpy-w-panduan { background: #f0f5fd; border-color: #c6dafc; }
.hpy-w-sorot { border-color: var(--g-blue); border-width: 2px; background: #f7fbff; }

.hpy-pin {
    position: absolute; width: 1.25rem; height: 1.25rem; border-radius: 9999px;
    background: var(--g-blue); color: #fff; border: 2px solid #fff;
    font-size: .625rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.hpy-pin-1 { top: 1.5rem; inset-inline-start: 22%; }
.hpy-pin-2 { top: 3.4rem; inset-inline-start: 42%; }
.hpy-pin-3 { top: 2.2rem; inset-inline-start: 62%; background: #188038; }

/* Daftar keterangan bertanda */
.hpy-tut-dl { display: grid; grid-template-columns: auto 1fr; gap: .625rem .875rem; margin: 0 0 1rem; }
.hpy-tut-dl dt {
    display: flex; align-items: center; justify-content: center;
    min-width: 1.375rem; height: 1.375rem; padding: 0 .375rem; border-radius: 9999px;
    background: var(--g-blue); color: #fff; font-size: .6875rem; font-weight: 700;
}
.hpy-tut-dl dd { margin: 0; font-size: .8125rem; line-height: 1.65; color: #3c4043; }
.hpy-tut-dl dd b { color: #202124; font-weight: 600; }
.hpy-dt-hijau { background: #188038 !important; }
.hpy-dt-merah { background: #d93025 !important; }
.hpy-dt-abu { background: #80868b !important; }

/* Langkah alur kerja */
.hpy-alur { display: flex; flex-direction: column; gap: .25rem; margin: 1rem 0 1.25rem; }
.hpy-alur-langkah {
    display: flex; gap: .875rem; padding: .875rem 1rem;
    border: 1px solid var(--g-line); border-radius: 12px; background: #fff;
    position: relative;
}
.hpy-alur-langkah::after {
    content: ""; position: absolute; inset-inline-start: 1.85rem; bottom: -.3rem;
    width: 2px; height: .3rem; background: #dadce0;
}
.hpy-alur-langkah:last-child::after { display: none; }
.hpy-alur-no {
    flex: none; width: 1.75rem; height: 1.75rem; border-radius: 9999px;
    background: var(--g-blue); color: #fff; font-size: .8125rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.hpy-alur-langkah p { font-size: .8125rem; line-height: 1.6; color: #3c4043; margin: 0 0 .25rem; }
.hpy-alur-jejak {
    display: inline-block; font-size: .6875rem; font-weight: 600; color: var(--g-blue-deep);
    background: var(--g-pill); border-radius: 9999px; padding: .0625rem .5rem;
}

/* Hierarki */
.hpy-hirarki { display: flex; flex-direction: column; gap: .375rem; margin: .75rem 0 1rem; }
.hpy-hirarki-baris { display: flex; align-items: center; gap: .75rem; }
.hpy-hirarki-bar {
    background: linear-gradient(to right, var(--g-blue-deep), var(--g-blue));
    color: #fff; font-size: .75rem; font-weight: 600;
    padding: .375rem .75rem; border-radius: 6px; white-space: nowrap;
}
.hpy-hirarki-baris span { font-size: .75rem; color: var(--g-muted); }

/* Tabel */
.hpy-tut-tabel { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; font-size: .8125rem; }
.hpy-tut-tabel th, .hpy-tut-tabel td {
    text-align: start; padding: .5rem .625rem; border-bottom: 1px solid var(--g-line);
}
.hpy-tut-tabel th { font-weight: 600; color: var(--g-muted); font-size: .75rem; }
.hpy-tut-tabel td { color: #3c4043; }
.hpy-tut-tabel td.ya { color: #188038; font-weight: 600; }
.hpy-tut-tabel td.tidak { color: #80868b; }

/* Warna penanda */
.hpy-tut-warna { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.hpy-tut-warna li {
    display: flex; align-items: center; gap: .5rem;
    font-size: .8125rem; color: #3c4043; padding: .3125rem 0;
}
.hpy-tut-warna i { width: .75rem; height: .75rem; border-radius: 9999px; flex: none; }
.hpy-tut-warna .hpy-kotak-hitam { background: #202124; border-radius: 2px; }

/* Catatan */
.hpy-tut-catatan {
    font-size: .8125rem; line-height: 1.65; color: #3c4043;
    background: var(--g-canvas); border: 1px solid var(--g-line);
    border-radius: 10px; padding: .875rem 1rem; margin: 1rem 0;
}
.hpy-tut-penting { background: #fef7e6; border-color: #f6d68a; }
.hpy-tut-catatan b { color: #202124; font-weight: 600; }

/* ---------- Logo ---------- */

.hpy-logo-mark {
    display: none;
}

@media (max-width: 1024px) {
    .hpy-logo-full {
        display: none;
    }

    .hpy-logo-mark {
        display: block;
    }
}

.fi-simple-header .fi-logo {
    height: 3.25rem;
    margin-inline: auto;
    margin-bottom: .5rem;
}

/* ---------- Halaman login ---------- */

/*
 * Kanvas login: blob radial 4 warna yang sangat pudar di sudut-sudut layar,
 * meniru latar dekoratif ala login profesional tanpa perlu aset gambar.
 */
/* Peta bumi samar sebagai latar, ditimpa blob warna yang sangat pudar */
.fi-simple-layout {
    background-color: var(--g-canvas);
    background-image:
        radial-gradient(38rem 38rem at 12% 18%, rgba(26, 115, 232, .08), transparent 60%),
        radial-gradient(30rem 30rem at 88% 12%, rgba(251, 188, 4, .09), transparent 60%),
        radial-gradient(34rem 34rem at 85% 85%, rgba(52, 168, 83, .08), transparent 60%),
        radial-gradient(26rem 26rem at 10% 88%, rgba(234, 67, 53, .06), transparent 60%),
        url('../images/world-map.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto, auto, auto, auto, min(115rem, 160%);
    background-attachment: fixed;
}

/* Kartu mengambang: lebar tetap, bayangan lembut yang dalam, sudut besar */
.fi-simple-main {
    overflow: hidden;
    position: relative;
    width: 100%;
    max-width: 26rem;
    margin-inline: auto;
    padding: 2.5rem 2rem 2rem;
    border: none;
    border-radius: 20px;
    box-shadow:
        0 1px 3px rgba(60, 64, 67, .08),
        0 24px 60px rgba(60, 64, 67, .16);
}

.fi-simple-header-heading {
    font-weight: 500;
    font-size: 1.375rem;
    color: #202124;
}

/* Subjudul di bawah heading (jika ada) */
.fi-simple-header-subheading {
    color: var(--g-muted);
    font-size: .875rem;
}

/* Label field memakai biru identitas, seperti label beraksen di referensi */
.fi-simple-page .fi-fo-field-wrp-label .fi-fo-field-wrp-label-text,
.fi-simple-page .fi-fo-field-wrp-label span {
    color: var(--g-blue-deep);
    font-weight: 500;
}

/* Input: lebih tinggi, sudut membulat, fokus biru yang jelas */
.fi-simple-page .fi-input-wrp {
    border-radius: 12px;
    transition: box-shadow .15s ease;
}

.fi-simple-page .fi-input-wrp:focus-within {
    box-shadow: 0 0 0 3px rgba(26, 115, 232, .18);
}

.fi-simple-page .fi-input {
    padding-block: .625rem;
}

/* Tombol masuk: penuh selebar kartu, lebih tegas */
.fi-simple-page .fi-form-actions .fi-btn {
    width: 100%;
    justify-content: center;
    padding-block: .75rem;
    font-size: .9375rem;
}

/* Link "lupa password" tampil sebagai tautan biru bergaris bawah */
.fi-simple-page a {
    color: var(--g-blue-deep);
}

.fi-simple-page a:hover {
    text-decoration: underline;
}

/* Footer branding di bawah kartu (diinject lewat BODY_END untuk tamu) */
.hpy-auth-footer {
    position: fixed;
    inset-inline: 0;
    bottom: 1.25rem;
    text-align: center;
    font-size: .8125rem;
    color: var(--g-muted);
    pointer-events: none;
}

.hpy-auth-footer strong {
    font-weight: 600;
    color: var(--g-blue-deep);
}

/* Tautan di footer tetap bisa diklik walau footer-nya pointer-events: none */
.hpy-auth-footer a {
    pointer-events: auto;
    color: var(--g-blue-deep);
}

.hpy-auth-footer a:hover {
    text-decoration: underline;
}

/* Di layar sempit kartu menempel nyaman ke tepi */
@media (max-width: 30rem) {
    .fi-simple-main {
        max-width: calc(100vw - 2rem);
        padding: 2rem 1.5rem 1.5rem;
    }
}

/* ---------- Hasil survei ---------- */

.hpy-survey-section {
    font-weight: 500;
    font-size: .95rem;
    margin-top: 1.25rem;
    margin-bottom: .5rem;
    color: var(--g-ink, #202124);
}

.hpy-survey-section:first-child {
    margin-top: 0;
}

.hpy-survey-list {
    display: grid;
    grid-template-columns: minmax(10rem, 18rem) 1fr;
    gap: .35rem 1rem;
    font-size: .875rem;
}

.hpy-survey-list dt {
    color: #5F6368;
}

.hpy-survey-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Di layar sempit, label dan jawaban ditumpuk agar tabel tidak terpotong. */
@media (max-width: 48rem) {
    .hpy-survey-list {
        grid-template-columns: 1fr;
        gap: 0 0;
    }

    .hpy-survey-list dd {
        margin-bottom: .75rem;
    }
}

.hpy-empty {
    color: #9AA0A6;
    font-style: italic;
}

.hpy-survey-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8125rem;
    margin-block: .25rem;
}

.hpy-survey-table th,
.hpy-survey-table td {
    border: 1px solid #E0E0E0;
    padding: .35rem .5rem;
    text-align: left;
}

.hpy-survey-table th {
    background-color: #F8F9FA;
    font-weight: 500;
}

.hpy-survey-attachment-group {
    margin-bottom: 1rem;
}

.hpy-survey-attachment-label {
    font-size: .8125rem;
    color: #5F6368;
    margin-bottom: .35rem;
}

.hpy-survey-attachment-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.hpy-survey-attachment-grid img {
    width: 8rem;
    height: 8rem;
    object-fit: cover;
    border-radius: .5rem;
    border: 1px solid #E0E0E0;
}

/* ---------- Rekap survei ---------- */

.hpy-rekap-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
}

.hpy-rekap-stat-label {
    font-size: .8125rem;
    color: #5F6368;
}

.hpy-rekap-stat-value {
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.2;
}

.hpy-rekap-stat-warning {
    color: #EA4335;
}

.hpy-rekap-numeric {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: .75rem;
    font-size: .875rem;
}

.hpy-rekap-numeric dt {
    color: #5F6368;
    font-size: .75rem;
}

.hpy-rekap-numeric dd {
    margin: 0;
    font-size: 1.125rem;
}

.hpy-rekap-subfield + .hpy-rekap-subfield {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E8EAED;
}

.hpy-rekap-subfield-label {
    font-size: .8125rem;
    font-weight: 500;
    margin-bottom: .5rem;
}

.hpy-rekap-bars {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .8125rem;
}

.hpy-rekap-bar-row {
    display: grid;
    grid-template-columns: minmax(6rem, 12rem) 1fr auto;
    align-items: center;
    gap: .75rem;
}

.hpy-rekap-bar-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hpy-rekap-bar-track {
    background-color: #F1F3F4;
    border-radius: 999px;
    height: .625rem;
    overflow: hidden;
}

.hpy-rekap-bar-fill {
    display: block;
    height: 100%;
    background-color: #1A73E8;
    border-radius: 999px;
}

.hpy-rekap-bar-value {
    color: #5F6368;
    white-space: nowrap;
}

/* Layar sempit: batang dipindah ke baris sendiri agar label tetap terbaca. */
@media (max-width: 40rem) {
    .hpy-rekap-bar-row {
        grid-template-columns: 1fr auto;
    }

    .hpy-rekap-bar-track {
        grid-column: 1 / -1;
        order: 3;
    }
}

/* ---------- Tabel laporan (KPI & piutang) ---------- */

.hpy-rekap-stat-note {
    font-size: .75rem;
    color: #80868B;
    margin-top: .25rem;
}

.hpy-table-scroll {
    overflow-x: auto;
}

.hpy-kpi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8125rem;
    white-space: nowrap;
}

.hpy-kpi-table th,
.hpy-kpi-table td {
    border-bottom: 1px solid #E8EAED;
    padding: .5rem .625rem;
    text-align: left;
}

.hpy-kpi-table th {
    background-color: #F8F9FA;
    font-weight: 500;
    position: sticky;
    top: 0;
}

.hpy-kpi-table .hpy-num {
    text-align: right;
}

.hpy-kpi-table tbody tr:hover {
    background-color: #F8F9FA;
}

/* Nama salesman di tabel Rute Aktual: klik untuk memfokuskan peta. */
.hpy-fokus-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #1A73E8;
    cursor: pointer;
}

.hpy-fokus-btn:hover {
    text-decoration: underline;
}

.hpy-fokus-aktif {
    font-weight: 600;
}

.hpy-muted {
    display: block;
    color: #80868B;
    font-size: .6875rem;
}

.hpy-good { color: #34A853; }
.hpy-bad  { color: #EA4335; }

.hpy-aging-total {
    font-size: .875rem;
    margin-bottom: .75rem;
}

/* Warna batang mengikuti tingkat keparahan umur piutang. */
.hpy-aging-current  { background-color: #34A853; }
.hpy-aging-d1_30    { background-color: #4285F4; }
.hpy-aging-d31_60   { background-color: #F9AB00; }
.hpy-aging-d61_90   { background-color: #FA7B17; }
.hpy-aging-over_90  { background-color: #EA4335; }

/* ---------- Analisis wilayah (grid) ---------- */

.hpy-grid-wrap {
    position: relative;
    margin-block: 1rem;
}

.hpy-grid-wrap .hpy-peta-canvas {
    height: 34rem;
    width: 100%;
    border-radius: .75rem;
    border: 1px solid #E0E0E0;
}

.hpy-grid-legenda {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 500;
    background-color: rgba(255, 255, 255, .94);
    border: 1px solid #E0E0E0;
    border-radius: .5rem;
    padding: .625rem .75rem;
    font-size: .75rem;
    max-width: 14rem;
    box-shadow: 0 1px 3px rgba(60, 64, 67, .2);
}

.hpy-grid-legenda-judul {
    font-weight: 500;
    margin-bottom: .375rem;
}

.hpy-grid-legenda span {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .2rem;
}

.hpy-grid-legenda i {
    width: .875rem;
    height: .875rem;
    border-radius: .1875rem;
    border: 1px solid rgba(60, 64, 67, .25);
    flex-shrink: 0;
}

.hpy-grid-legenda em {
    font-style: normal;
    color: #5F6368;
}

.hpy-grid-popup p {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .75rem;
    line-height: 1.6;
}

.hpy-grid-popup span {
    color: #5F6368;
}

.hpy-filter-lebar {
    min-width: 18rem;
}

/* Layar sempit: legenda dipindah ke bawah peta agar tidak menutupi kotak. */
@media (max-width: 48rem) {
    .hpy-grid-wrap .hpy-peta-canvas {
        height: 24rem;
    }

    .hpy-grid-legenda {
        position: static;
        max-width: none;
        margin-top: .5rem;
    }
}

/* ---------- Rute aktual: animasi & pemutaran ---------- */

/*
 * Garis rute memakai pola garis putus yang bergeser terus. Arah perjalanan
 * jadi terbaca tanpa perlu membuka popup, dan pola ini juga yang membuat
 * animasi gambar-masuk (stroke-dashoffset dari JS) menyatu setelah selesai.
 */
.hpy-rute-garis {
    stroke-dasharray: 18 7;
    animation: hpy-rute-arus 1.4s linear infinite;
    transition: stroke-opacity .35s ease;
}

@keyframes hpy-rute-arus {
    to { stroke-dashoffset: -25; }
}

/* Selama pemutaran, rute penuh mundur jadi latar agar bagian yang sudah
 * dilalui menonjol. */
.hpy-rute-memutar .hpy-rute-garis {
    stroke-opacity: .22;
    animation-play-state: paused;
}

.hpy-rute-maju {
    stroke-linecap: round;
    filter: drop-shadow(0 0 3px rgba(26, 115, 232, .45));
    pointer-events: none;
}

.hpy-rute-kepala {
    filter: drop-shadow(0 1px 3px rgba(60, 64, 67, .45));
    pointer-events: none;
}

/* transform-box menempatkan titik putar di tengah bentuk, bukan di sudut
 * kanvas SVG milik Leaflet. */
.hpy-rute-denyut,
.hpy-rute-palsu,
.hpy-rute-kepala {
    transform-box: fill-box;
    transform-origin: center;
}

.hpy-rute-denyut { animation: hpy-rute-denyut 2.4s ease-out infinite; }
.hpy-rute-kepala { animation: hpy-rute-denyut 1.6s ease-out infinite; }

/* Titik lokasi palsu lebih cepat dan lebih tegas — ini temuan yang tidak
 * boleh terlewat di antara penanda lain. */
.hpy-rute-palsu { animation: hpy-rute-palsu 1.5s ease-out infinite; }

@keyframes hpy-rute-denyut {
    0%, 70%, 100% { transform: scale(1); }
    35%           { transform: scale(1.25); }
}

@keyframes hpy-rute-palsu {
    0%, 100% { transform: scale(1);    stroke-opacity: 1; }
    50%      { transform: scale(1.35); stroke-opacity: .35; }
}

.hpy-rute-kontrol {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 600;
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .5rem .75rem;
    background-color: rgba(255, 255, 255, .94);
    border: 1px solid #E0E0E0;
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(60, 64, 67, .2);
}

.hpy-rute-kontrol[hidden] { display: none; }

.hpy-rute-main {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 4rem;
    padding: .3125rem .75rem;
    border: 0; border-radius: 9999px;
    background-color: #1A73E8; color: #fff;
    font-size: .75rem; font-weight: 600;
    cursor: pointer;
}
.hpy-rute-main:hover { background-color: #1765CC; }
.hpy-rute-main.hpy-rute-jeda { background-color: #3C4043; }

.hpy-rute-slider {
    width: clamp(8rem, 26vw, 20rem);
    accent-color: #1A73E8;
    cursor: pointer;
}

.hpy-rute-jam {
    font-size: .8125rem; font-weight: 600; color: #202124;
    font-variant-numeric: tabular-nums;
    min-width: 3rem; text-align: center;
}

.hpy-rute-laju {
    border: 1px solid #d6dbe1; border-radius: 9999px;
    padding: .1875rem .5rem;
    font-size: .75rem; color: #202124; background: #fff;
    cursor: pointer;
}

@media (max-width: 48rem) {
    .hpy-rute-kontrol {
        position: static;
        margin-top: .5rem;
        border-radius: var(--g-radius);
        justify-content: space-between;
    }
    .hpy-rute-slider { flex: 1; width: auto; }
}

/* Pengguna yang meminta gerak minimal tetap mendapat seluruh data; yang
 * hilang hanya geraknya. Pemutaran tetap bisa dijalankan manual. */
@media (prefers-reduced-motion: reduce) {
    .hpy-rute-garis,
    .hpy-rute-denyut,
    .hpy-rute-palsu,
    .hpy-rute-kepala {
        animation: none;
    }
    .hpy-rute-garis { stroke-dasharray: none; }
}

/* ===== Ikon sidebar berwarna (palet Google, berputar per item) ===== */
.fi-sidebar-group-items > li:nth-child(4n + 1) .fi-sidebar-item-icon { color: var(--g-blue); }
.fi-sidebar-group-items > li:nth-child(4n + 2) .fi-sidebar-item-icon { color: var(--g-red); }
.fi-sidebar-group-items > li:nth-child(4n + 3) .fi-sidebar-item-icon { color: var(--g-yellow); }
.fi-sidebar-group-items > li:nth-child(4n + 4) .fi-sidebar-item-icon { color: var(--g-green); }

/* Item aktif tetap biru tua agar selaras dengan pil aktifnya */
.fi-sidebar-item-active .fi-sidebar-item-button .fi-sidebar-item-icon,
.fi-sidebar-item-active .fi-sidebar-item-button .fi-icon {
    color: var(--g-blue-deep);
}
