/* ============================================================
   Halaman publik: WiFi Publik
   CSS mandiri (tidak bergantung pada build Tailwind) supaya
   konsisten dengan palet & font portal Seluma.
   ============================================================ */

.wf-page {
    --wf-teal: #0d9488;
    --wf-teal-dark: #0f766e;
    --wf-blue: #2563eb;
    --wf-green: #16a34a;
    --wf-red: #dc2626;
    --wf-cyan: #0891b2;
    --wf-ink: #0f172a;
    --wf-muted: #64748b;
    --wf-line: #e2e8f0;
    --wf-card: #ffffff;
    --wf-radius: 1rem;
    font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
    color: var(--wf-ink);
    background: #f8fafc;
}

.wf-wrap {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.wf-section {
    padding: 3rem 0;
}

.wf-heading h1 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.wf-heading p {
    margin-top: .4rem;
    color: var(--wf-muted);
    font-size: .95rem;
}

/* ---------- kartu ringkasan ---------- */
.wf-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.75rem;
}

@media (min-width: 1024px) {
    .wf-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.wf-card {
    background: var(--wf-card);
    border: 1px solid var(--wf-line);
    border-radius: var(--wf-radius);
    padding: 1.15rem 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    display: flex;
    align-items: center;
    gap: .9rem;
    position: relative;
}

.wf-card-ico {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .85rem;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.wf-card-ico svg { width: 1.35rem; height: 1.35rem; }

.wf-ico-blue  { background: #dbeafe; color: var(--wf-blue); }
.wf-ico-green { background: #dcfce7; color: var(--wf-green); }
.wf-ico-red   { background: #fee2e2; color: var(--wf-red); }
.wf-ico-cyan  { background: #cffafe; color: var(--wf-cyan); }

.wf-card-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--wf-muted);
}

.wf-card-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
    margin-top: .15rem;
}

.wf-card-refresh {
    position: absolute;
    top: .7rem;
    right: .7rem;
    border: 1px solid var(--wf-line);
    background: #fff;
    color: var(--wf-muted);
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .2s, color .2s;
}

.wf-card-refresh:hover { color: var(--wf-teal); transform: rotate(45deg); }
.wf-card-refresh.is-loading { animation: wf-spin 1s linear infinite; }

@keyframes wf-spin { to { transform: rotate(360deg); } }

/* ---------- panel peta + daftar ---------- */
.wf-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.75rem;
}

@media (min-width: 1024px) {
    .wf-panels { grid-template-columns: 2fr 1fr; }
}

.wf-panel {
    background: var(--wf-card);
    border: 1px solid var(--wf-line);
    border-radius: var(--wf-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.wf-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .95rem 1.15rem;
    border-bottom: 1px solid var(--wf-line);
}

.wf-panel-title { font-weight: 800; font-size: .95rem; }

.wf-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: .7rem;
    padding: .5rem .85rem;
    font-size: .78rem;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: filter .15s, background .15s;
    text-decoration: none;
}

.wf-btn-teal { background: var(--wf-teal); color: #fff; }
.wf-btn-teal:hover { filter: brightness(1.07); }
.wf-btn-ghost { background: #f1f5f9; color: var(--wf-ink); }
.wf-btn-ghost:hover { background: #e2e8f0; }

/* Peta Leaflet punya z-index internal sampai 700 (pane/marker) sehingga bisa
   menimpa navbar (z-index 50). Buat stacking context sendiri di kontainer peta. */
#wfMap {
    height: 420px;
    width: 100%;
    position: relative;
    z-index: 0;
    isolation: isolate;
}

@media (min-width: 1024px) {
    #wfMap { height: 100%; min-height: 420px; }
}

.wf-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .55rem 1.15rem;
    border-top: 1px solid var(--wf-line);
    font-size: .75rem;
    color: var(--wf-muted);
}

.wf-dot { width: .6rem; height: .6rem; border-radius: 999px; display: inline-block; }
.wf-dot-on { background: var(--wf-green); }
.wf-dot-off { background: var(--wf-red); }

/* marker peta */
.wf-marker {
    width: 34px; height: 34px;
    border-radius: 999px;
    display: grid; place-items: center;
    color: #fff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .28);
    border: 2px solid #fff;
}

.wf-marker svg { width: 17px; height: 17px; }
.wf-marker-on { background: var(--wf-green); }
.wf-marker-off { background: var(--wf-red); }

.wf-popup { font-family: inherit; min-width: 190px; }
.wf-popup h4 { font-size: .9rem; font-weight: 800; margin: 0 0 .3rem; color: var(--wf-ink); }
.wf-popup p { margin: .1rem 0; font-size: .78rem; color: var(--wf-muted); }
.wf-popup .wf-popup-badge {
    display: inline-block; margin-top: .4rem; padding: .1rem .5rem;
    border-radius: 999px; font-size: .68rem; font-weight: 800;
}
.wf-badge-on { background: #dcfce7; color: #15803d; }

/* Tombol petunjuk arah di dalam popup marker */
.wf-dir {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .6rem;
    padding: .4rem .7rem;
    border-radius: .55rem;
    background: var(--wf-teal);
    color: #fff;
    font-size: .74rem;
    font-weight: 800;
    text-decoration: none;
    transition: filter .15s;
}

.wf-dir:hover { filter: brightness(1.08); color: #fff; }
.wf-dir svg { width: .85rem; height: .85rem; }
.wf-badge-off { background: #fee2e2; color: #b91c1c; }

/* daftar lokasi */
.wf-list {
    overflow-y: auto;
    padding: .6rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: 420px;
}

@media (min-width: 1024px) {
    .wf-list { max-height: 460px; }
}

.wf-item {
    border-radius: .8rem;
    padding: .7rem .8rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s;
    text-align: left;
    width: 100%;
    background: #fff;
    font-family: inherit;
}

.wf-item:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }
.wf-item-on { background: #f0fdf4; border-color: #bbf7d0; }
.wf-item-off { background: #fef2f2; border-color: #fecaca; }

.wf-item-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.wf-item-name { font-size: .84rem; font-weight: 800; color: var(--wf-ink); line-height: 1.2; }

.wf-badge {
    font-size: .62rem; font-weight: 800; padding: .15rem .45rem; border-radius: 999px;
    text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}

.wf-item-addr { font-size: .74rem; color: var(--wf-muted); margin-top: .2rem; }

.wf-item-foot {
    margin-top: .35rem; display: flex; align-items: center; gap: .35rem;
    font-size: .72rem; font-weight: 700; color: #334155;
}

.wf-item-foot svg { width: .9rem; height: .9rem; color: var(--wf-muted); }

/* ---------- chart ---------- */
.wf-charts {
    display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.75rem;
}

@media (min-width: 1024px) {
    .wf-charts { grid-template-columns: 1fr 1fr; }
}

.wf-chart-card {
    background: var(--wf-card); border: 1px solid var(--wf-line);
    border-radius: var(--wf-radius); padding: 1.15rem 1.25rem 1.4rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.wf-chart-title { font-weight: 800; font-size: .95rem; }
.wf-chart-sub { font-size: .75rem; color: var(--wf-muted); margin-top: .15rem; }
.wf-chart-body { min-height: 260px; }

/* ---------- info box ---------- */
.wf-info {
    margin-top: 1.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: .9rem;
    padding: .85rem 1.1rem;
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.wf-info svg { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }

/* ---------- empty state ---------- */
.wf-empty {
    background: #fff; border: 1px dashed var(--wf-line); border-radius: var(--wf-radius);
    padding: 3rem 1.5rem; text-align: center; margin-top: 1.75rem;
}

.wf-empty h3 { font-weight: 800; font-size: 1.05rem; }
.wf-empty p { color: var(--wf-muted); font-size: .85rem; margin-top: .35rem; }

/* ---------- modal panduan ---------- */
.wf-modal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15, 23, 42, .55);
    display: none; align-items: center; justify-content: center;
    padding: 1.25rem;
}

.wf-modal.is-open { display: flex; }

.wf-modal-box {
    background: #fff; border-radius: 1rem; max-width: 34rem; width: 100%;
    max-height: 85vh; overflow-y: auto; padding: 1.5rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
}

.wf-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.wf-modal-head h3 { font-weight: 800; font-size: 1.05rem; }
.wf-modal-close { border: 0; background: #f1f5f9; border-radius: .6rem; width: 2rem; height: 2rem; cursor: pointer; font-size: 1rem; }

.wf-prose { font-size: .88rem; color: #334155; line-height: 1.65; }
.wf-prose ol, .wf-prose ul { padding-left: 1.2rem; margin: .4rem 0; }
.wf-prose li { margin: .25rem 0; }
.wf-prose strong { font-weight: 800; }

.wf-muted { color: var(--wf-muted); }
.wf-skeleton { color: var(--wf-muted); font-size: .85rem; padding: 1rem; }
