/* Halaman form layanan (Lapor Angka, Pengaduan, Pasang Baru). Mobile-first, token --gm-* dari site-shell.css. */
[x-cloak] { display: none !important; }

/* ---------- Header ---------- */
.fp-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 5.5rem 0 3.5rem;
    color: #fff;
    background: linear-gradient(160deg, var(--gm-blue) 0%, var(--gm-blue-600) 100%);
}
.fp-hero .container { position: relative; z-index: 1; }
.fp-title {
    margin: .5rem 0 .5rem;
    color: #fff;
    font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.fp-lead {
    max-width: 40rem;
    margin: 0;
    color: rgb(255 255 255 / .92);
    font-size: clamp(.95rem, .9rem + .25vw, 1.1rem);
    line-height: 1.55;
}

/* Breadcrumb */
.fp-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .875rem;
}
.fp-breadcrumb li { display: flex; align-items: center; gap: .25rem; color: #fff; }
.fp-breadcrumb li + li::before { content: "\203A"; color: rgb(255 255 255 / .8); }
.fp-breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 .25rem;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.fp-breadcrumb [aria-current="page"] { font-weight: 600; }

/* Gelombang (salinan lp-wave agar tidak bergantung landing-page.css) */
.lp-wave { position: absolute; left: 0; bottom: -1px; z-index: 0; display: block; width: 100%; height: 40px; pointer-events: none; }
.lp-wave-layers > use { animation: lp-wave-move 25s cubic-bezier(.55, .5, .45, .5) infinite; }
.lp-wave-layers > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.lp-wave-layers > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.lp-wave-layers > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.lp-wave-layers > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }
@keyframes lp-wave-move { from { transform: translate3d(-90px, 0, 0); } to { transform: translate3d(85px, 0, 0); } }

/* ---------- Body ---------- */
.fp-body { padding: 1.5rem 0 3rem; background: #fff; }
.fp-card {
    padding: 1.25rem 1rem;
    background: #fff;
    border: 1px solid var(--gm-slate-200);
    border-radius: var(--gm-radius);
    box-shadow: var(--gm-shadow);
}
.fp-aside {
    padding: 1.25rem;
    background: var(--gm-slate-50);
    border: 1px solid var(--gm-slate-200);
    border-radius: var(--gm-radius);
    color: var(--gm-slate-700);
    font-size: .925rem;
}
.fp-aside h2 { margin-bottom: .75rem; color: var(--gm-ink); font-size: 1.05rem; font-weight: 700; }
.fp-aside ul { margin: 0; padding-left: 1.1rem; }
.fp-aside li + li { margin-top: .4rem; }
.fp-aside img { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto 1rem; }

/* ---------- Stepper ---------- */
.fp-steps {
    display: flex;
    gap: .5rem;
    margin: 0 0 .75rem;
    padding: 0;
    list-style: none;
    counter-reset: fp-step;
}
.fp-steps li {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    color: var(--gm-slate-600);
    font-size: .8rem;
    font-weight: 600;
}
.fp-steps li::before {
    content: "";
    display: block;
    height: 6px;
    border-radius: 999px;
    background: var(--gm-slate-200);
    transition: background-color .25s ease;
}
.fp-steps li.is-done::before,
.fp-steps li.is-active::before { background: var(--gm-blue); }
.fp-steps li.is-active { color: var(--gm-blue-600); }
.fp-steps .fp-step-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-step-count { margin: 0 0 1rem; color: var(--gm-slate-600); font-size: .85rem; }

.fp-step-title {
    margin: 0 0 .25rem;
    color: var(--gm-ink);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.fp-step-title:focus { outline: none; }
.fp-step-desc { margin: 0 0 1.25rem; color: var(--gm-slate-600); font-size: .925rem; }
.fp-panel { animation: fp-fade .25s ease both; }
.fp-panel:not([data-step]) + .fp-panel:not([data-step]) { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--gm-slate-200); }
@keyframes fp-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Field ---------- */
.fp-field { margin-bottom: 1.1rem; }
.fp-label {
    display: block;
    margin-bottom: .4rem;
    color: var(--gm-slate-700);
    font-size: .9rem;
    font-weight: 600;
}
.fp-label .fp-req { color: #b91c1c; }
.fp-label .fp-opt, .fp-step-title .fp-opt { color: var(--gm-slate-600); font-weight: 400; }
.fp-input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: .7rem .9rem;
    color: var(--gm-ink);
    font-size: 1rem; /* 16px: cegah auto-zoom iOS */
    line-height: 1.4;
    background: #fff;
    border: 1px solid #94a3b8; /* kontras batas >= 3:1 */
    border-radius: var(--gm-radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
    appearance: none;
}
textarea.fp-input { min-height: 112px; resize: vertical; }
select.fp-input {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23475569' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    background-size: 14px;
}
.fp-input:focus { outline: none; border-color: var(--gm-blue); box-shadow: 0 0 0 3px rgb(11 107 203 / .25); }
.fp-input:disabled { color: var(--gm-slate-700); background: var(--gm-slate-100); }
.fp-input[aria-invalid="true"] { border-color: #b91c1c; }
.fp-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgb(185 28 28 / .2); }
.fp-hint { margin-top: .35rem; color: var(--gm-slate-600); font-size: .85rem; }
.fp-error {
    display: flex;
    align-items: flex-start;
    gap: .35rem;
    margin-top: .35rem;
    color: #b91c1c;
    font-size: .85rem;
    font-weight: 500;
}
.fp-status {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .4rem;
    color: var(--gm-slate-600);
    font-size: .85rem;
}
.fp-status.is-success { color: #15803d; }
.fp-status.is-danger { color: #b91c1c; }
.fp-status.is-warning { color: #b45309; }

/* Konten teks panjang (mis. ketentuan WBS) */
.fp-prose { color: var(--gm-slate-700); font-size: .95rem; line-height: 1.65; }
.fp-prose ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.fp-prose ol ol { margin: .4rem 0 0; }
.fp-prose li + li { margin-top: .4rem; }
.fp-prose img { display: block; width: 100%; height: auto; margin-bottom: 1.25rem; border-radius: var(--gm-radius-sm); }

/* Upload */
.fp-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 140px;
    padding: 1.25rem 1rem;
    color: var(--gm-slate-700);
    text-align: center;
    background: var(--gm-blue-50);
    border: 2px dashed #7aa7d9;
    border-radius: var(--gm-radius);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.fp-upload:hover { border-color: var(--gm-blue); }
.fp-upload:focus-within { border-color: var(--gm-blue); box-shadow: 0 0 0 3px rgb(11 107 203 / .25); }
.fp-upload i { color: var(--gm-blue-600); font-size: 2rem; line-height: 1; }
.fp-upload strong { color: var(--gm-blue-600); }
.fp-upload input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.fp-upload[data-invalid="true"] { border-color: #b91c1c; }
.fp-progress { height: 6px; margin-top: .6rem; overflow: hidden; background: var(--gm-slate-200); border-radius: 999px; }
.fp-progress > span { display: block; height: 100%; background: var(--gm-blue); transition: width .2s ease; }
.fp-preview {
    display: block;
    max-width: 100%;
    max-height: 220px;
    margin-top: .75rem;
    border: 1px solid var(--gm-slate-200);
    border-radius: var(--gm-radius-sm);
}

/* Checkbox persetujuan */
.fp-check {
    display: flex;
    gap: .75rem;
    padding: 1rem;
    background: var(--gm-slate-50);
    border: 1px solid var(--gm-slate-200);
    border-radius: var(--gm-radius-sm);
}
.fp-check input { flex: 0 0 auto; width: 24px; height: 24px; margin-top: .1rem; accent-color: var(--gm-blue); }
.fp-check label { color: var(--gm-slate-700); font-size: .925rem; line-height: 1.5; }
.fp-link {
    padding: 0;
    color: var(--gm-blue-600);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none;
    border: 0;
}

/* Map */
.fp-map {
    height: 300px;
    overflow: hidden;
    background: var(--gm-slate-100);
    border: 1px solid var(--gm-slate-200);
    border-radius: var(--gm-radius-sm);
}

/* ---------- Actions ---------- */
.fp-actions {
    position: sticky;
    bottom: calc(var(--gm-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    display: flex;
    gap: .75rem;
    margin: 1.5rem -1rem -1.25rem;
    padding: .75rem 1rem;
    background: rgb(255 255 255 / .96);
    border-top: 1px solid var(--gm-slate-200);
    border-radius: 0 0 var(--gm-radius) var(--gm-radius);
}
.fp-btn {
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: .7rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: var(--gm-radius-sm);
    border: 1px solid transparent;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.fp-btn-primary { color: #fff; background: var(--gm-blue-600); }
.fp-btn-primary:hover { color: #fff; background: #07488a; }
.fp-btn-ghost { flex: 0 0 auto; color: var(--gm-slate-700); background: #fff; border-color: #94a3b8; }
.fp-btn-ghost:hover { color: var(--gm-ink); background: var(--gm-slate-50); }
.fp-btn-light { flex: 0 0 auto; color: var(--gm-blue-600); background: #fff; }
.fp-btn-light:hover { color: var(--gm-blue-600); background: var(--gm-blue-50); }
.fp-btn:disabled { opacity: .65; cursor: not-allowed; }

/* Pilihan mode (radio tersegmen) */
.fp-segment { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; margin: 0 0 1.25rem; padding: .25rem; background: var(--gm-slate-100); border: 0; border-radius: var(--gm-radius-sm); }
.fp-segment label { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; margin: 0; padding: .5rem .75rem; color: var(--gm-slate-700); font-weight: 600; text-align: center; border-radius: calc(var(--gm-radius-sm) - 2px); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.fp-segment input:checked + label { color: var(--gm-blue-600); background: #fff; box-shadow: 0 1px 3px rgb(15 23 42 / .12); }
.fp-segment input:focus-visible + label { outline: 2px solid var(--gm-blue); outline-offset: 2px; }

/* ---------- Halaman cek (Info Tagihan, Lacak Aduan) ---------- */
.fp-search { display: flex; flex-direction: column; gap: .75rem; }
.fp-search .fp-btn { flex: 0 0 auto; }
.fp-result { margin-top: 1.25rem; animation: fp-fade .25s ease both; }
.fp-result:focus { outline: none; }
.fp-empty { padding: 2rem 1rem; text-align: center; color: var(--gm-slate-600); }
.fp-empty i { display: block; margin-bottom: .5rem; color: #b45309; font-size: 2.25rem; line-height: 1; }
.fp-empty h2 { margin-bottom: .25rem; color: var(--gm-ink); font-size: 1.1rem; font-weight: 700; }
.fp-empty p { margin: 0; }

.fp-meta { display: grid; gap: .75rem; margin: 0 0 1.25rem; }
.fp-meta div { padding: .75rem .9rem; background: var(--gm-slate-50); border: 1px solid var(--gm-slate-200); border-radius: var(--gm-radius-sm); }
.fp-meta dt { color: var(--gm-slate-600); font-size: .8rem; font-weight: 500; }
.fp-meta dd { margin: .15rem 0 0; color: var(--gm-ink); font-weight: 600; overflow-wrap: anywhere; }

.fp-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem .75rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    color: #fff;
    background: var(--gm-blue-600);
    border-radius: var(--gm-radius-sm);
}
.fp-total span { font-size: .9rem; }
.fp-total strong { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* Tabel tagihan: kartu per baris di mobile, tabel di >= 768px */
.fp-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.fp-table thead { display: none; }
.fp-table tr { display: block; margin-bottom: .75rem; padding: .75rem .9rem; border: 1px solid var(--gm-slate-200); border-radius: var(--gm-radius-sm); }
.fp-table td { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; color: var(--gm-slate-700); text-align: right; }
.fp-table td::before { content: attr(data-label); color: var(--gm-slate-600); text-align: left; }
.fp-table td.fp-cell-head { margin-bottom: .25rem; padding-bottom: .5rem; border-bottom: 1px solid var(--gm-slate-200); color: var(--gm-ink); font-weight: 700; }
.fp-table td.fp-cell-strong { color: var(--gm-ink); font-weight: 700; }
.fp-table tfoot tr { background: var(--gm-blue-50); border-color: #bcd6f2; }
.fp-table tfoot td { color: var(--gm-ink); font-weight: 700; }
.fp-table .fp-text-danger { color: #b91c1c; }

/* Timeline aduan */
.fp-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.fp-timeline::before { content: ""; position: absolute; top: .5rem; bottom: .5rem; left: 19px; width: 2px; background: var(--gm-slate-200); }
.fp-timeline > li { position: relative; display: flex; gap: .9rem; }
.fp-timeline > li + li { margin-top: 1.25rem; }
.fp-tl-icon {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 40px;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 1.15rem;
    background: var(--gm-slate-600);
    border: 3px solid #fff;
    border-radius: 999px;
}
.fp-tl-icon.is-success { background: #15803d; }
.fp-tl-icon.is-warning { background: #b45309; }
.fp-tl-icon.is-info { background: #0e7490; }
.fp-tl-icon.is-primary { background: var(--gm-blue-600); }
.fp-tl-body { flex: 1 1 auto; min-width: 0; padding: .75rem .9rem; background: #fff; border: 1px solid var(--gm-slate-200); border-radius: var(--gm-radius-sm); }
.fp-tl-body h3 { margin: 0 0 .15rem; color: var(--gm-ink); font-size: 1rem; font-weight: 700; }
.fp-tl-body time { display: block; margin-bottom: .35rem; color: var(--gm-slate-600); font-size: .8rem; }
.fp-tl-body p { margin: 0; color: var(--gm-slate-700); font-size: .925rem; }
.fp-tl-body blockquote { margin: .6rem 0 0; padding: .6rem .75rem; color: var(--gm-slate-700); font-size: .925rem; background: var(--gm-slate-50); border-left: 3px solid var(--gm-blue); border-radius: 0 6px 6px 0; overflow-wrap: anywhere; }
.fp-tl-body img { display: block; max-width: 100%; max-height: 180px; margin-top: .6rem; border: 1px solid var(--gm-slate-200); border-radius: 8px; }

/* ---------- Modal ---------- */
.fp-modal .modal-content { border: 0; border-radius: var(--gm-radius); }
.fp-modal .modal-title { color: var(--gm-ink); font-size: 1.1rem; font-weight: 700; }
.fp-modal .modal-body { color: var(--gm-slate-700); font-size: .95rem; line-height: 1.6; }
.fp-modal .modal-body img { max-width: 100%; height: auto; border-radius: var(--gm-radius-sm); }
.fp-modal .btn-close { width: 48px; height: 48px; padding: 0; }

/* ---------- Breakpoints ---------- */
@media (min-width: 576px) {
    .fp-card { padding: 1.75rem 1.5rem; }
    .fp-actions { margin: 1.75rem -1.5rem -1.75rem; padding: .9rem 1.5rem; }
    .fp-map { height: 360px; }
    .fp-search { flex-direction: row; align-items: flex-start; }
    .fp-search .fp-input { flex: 1 1 auto; }
    .fp-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .fp-table-wrap { overflow-x: auto; border: 1px solid var(--gm-slate-200); border-radius: var(--gm-radius-sm); }
    .fp-table thead { display: table-header-group; }
    .fp-table tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; }
    .fp-table th,
    .fp-table td { display: table-cell; padding: .65rem .75rem; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--gm-slate-200); }
    .fp-table th { color: var(--gm-slate-700); font-size: .8rem; font-weight: 600; background: var(--gm-slate-50); }
    .fp-table th:first-child,
    .fp-table td:first-child { text-align: left; }
    .fp-table td::before { content: none; }
    .fp-table td.fp-cell-head { margin: 0; padding-bottom: .65rem; }
    .fp-table tfoot td { border-bottom: 0; }
}
@media (min-width: 768px) {
    .fp-hero { padding: 7rem 0 4.5rem; }
    .lp-wave { height: 64px; }
    .fp-body { padding: 2rem 0 4rem; }
    .fp-card { padding: 2rem; }
    .fp-actions { position: static; margin: 2rem 0 0; padding: 0; background: none; border-top: 0; justify-content: flex-end; }
    .fp-btn { flex: 0 0 auto; min-width: 160px; }
}
@media (min-width: 992px) {
    .fp-hero { padding: 8.5rem 0 5.5rem; }
    .lp-wave { height: 88px; }
    .fp-actions { bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-wave-layers > use,
    .fp-panel { animation: none; }
    .fp-steps li::before,
    .fp-progress > span { transition: none; }
}
