/*
 * Form Pengajuan Reimburse — client/index.php
 * Stylesheet khusus halaman ini (app.css tetap dipakai form client lain).
 * CSP halaman: style-src 'self' — semua gaya harus di file ini, tanpa atribut style inline.
 */

/* ── Token ─────────────────────────────────────────────────────────────── */
:root {
    color-scheme: light;
    --page-w: 1180px;

    --bg: #f3f6fb;
    --glow-1: rgba(37, 99, 235, .10);
    --glow-2: rgba(14, 165, 233, .07);
    --surface: #ffffff;
    --surface-2: #f6f8fc;
    --surface-3: #edf1f7;
    --surface-glass: rgba(255, 255, 255, .9);

    --text: #0f172a;
    --text-2: #475569;
    --muted: #64748b;
    --placeholder: #94a3b8;

    --line: #e3e8f0;
    --input-line: #cfd7e3;
    --input-line-hover: #a9b5c7;
    --input-bg: #ffffff;
    --auto-bg: #f4f7ff;

    --primary: #1d4ed8;
    --primary-solid: #1d4ed8;
    --primary-solid-hover: #1e40af;
    --primary-soft: #eef3ff;
    --primary-line: #bfd0fb;
    --primary-ring: rgba(37, 99, 235, .18);
    --primary-shadow: rgba(29, 78, 216, .45);
    --mark-bg: #fde68a;

    --danger: #c42b2b;
    --danger-text: #9f1f1f;
    --danger-soft: #fef3f2;
    --danger-line: #f8c4c4;
    --danger-ring: rgba(220, 38, 38, .16);

    --success: #12804f;
    --success-text: #12804f;
    --success-soft: #e7f7ee;
    --success-halo: rgba(18, 128, 79, .08);

    --warning-text: #92400e;
    --warning-soft: #fffbeb;
    --warning-line: #fde68a;

    --hero-1: #2152dc;
    --hero-2: #172f7a;
    --switch-off: #cbd5e1;
    --toast-bg: #0f172a;
    --toast-text: #f8fafc;
    --toast-icon: #fca5a5;

    --radius-sm: 12px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -10px rgba(15, 23, 42, .12);
    --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, .28);

    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --bg: #0a0f1c;
        --glow-1: rgba(59, 130, 246, .14);
        --glow-2: rgba(14, 165, 233, .06);
        --surface: #111a2b;
        --surface-2: #162036;
        --surface-3: #1d2941;
        --surface-glass: rgba(17, 26, 43, .9);

        --text: #e6ebf4;
        --text-2: #b6c2d6;
        --muted: #8b99b2;
        --placeholder: #5f6f8c;

        --line: #233049;
        --input-line: #33445f;
        --input-line-hover: #4a5c7e;
        --input-bg: #0e1626;
        --auto-bg: #13203a;

        --primary: #8db1ff;
        --primary-solid: #3563e9;
        --primary-solid-hover: #4a74f0;
        --primary-soft: rgba(96, 140, 255, .14);
        --primary-line: rgba(96, 140, 255, .42);
        --primary-ring: rgba(96, 140, 255, .32);
        --primary-shadow: rgba(0, 0, 0, .55);
        --mark-bg: rgba(250, 204, 21, .32);

        --danger: #ff8a8a;
        --danger-text: #ffb3b3;
        --danger-soft: rgba(248, 113, 113, .1);
        --danger-line: rgba(248, 113, 113, .36);
        --danger-ring: rgba(248, 113, 113, .26);

        --success: #1f9d64;
        --success-text: #6ee7a8;
        --success-soft: rgba(34, 197, 94, .13);
        --success-halo: rgba(34, 197, 94, .06);

        --warning-text: #fcd34d;
        --warning-soft: rgba(251, 191, 36, .09);
        --warning-line: rgba(251, 191, 36, .32);

        --hero-1: #2a4fc4;
        --hero-2: #14224f;
        --switch-off: #3a4a68;
        --toast-bg: #e6ebf4;
        --toast-text: #0f172a;
        --toast-icon: #c42b2b;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px -12px rgba(0, 0, 0, .6);
        --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
    }
}

/* ── Dasar ─────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1100px 520px at 0% -10%, var(--glow-1), transparent 60%),
        radial-gradient(900px 420px at 100% -5%, var(--glow-2), transparent 60%),
        var(--bg);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

a {
    color: var(--primary);
}

h1,
h2,
p {
    overflow-wrap: break-word;
}

.ic {
    display: block;
    flex: none;
    width: 1.25em;
    height: 1.25em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Honeypot anti-bot: tersembunyi dari pengguna, tetap ada di DOM untuk bot */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.mono {
    font-family: var(--mono);
}

.center {
    text-align: center;
}

.req {
    color: var(--danger);
    font-weight: 700;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .02em;
    vertical-align: middle;
}

/* ── Top bar & hero ────────────────────────────────────────────────────── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: var(--page-w);
    margin: 0 auto;
    padding: 16px 20px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.2;
}

.brand strong {
    font-size: .95rem;
    letter-spacing: .03em;
}

.brand small {
    color: var(--muted);
    font-size: .75rem;
}

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text-2);
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .15s, border-color .15s;
}

.topbar-link .ic {
    width: 16px;
    height: 16px;
}

.topbar-link:hover {
    border-color: var(--primary-line);
    color: var(--primary);
}

.page {
    max-width: var(--page-w);
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.page-narrow {
    max-width: 620px;
}

.hero {
    margin-bottom: 24px;
}

.eyebrow {
    display: inline-flex;
    margin: 0 0 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(1.625rem, 1.15rem + 1.6vw, 2.25rem);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.lead {
    max-width: 72ch;
    margin: 8px 0 0;
    color: var(--text-2);
}

.foot {
    padding: 0 20px 32px;
    color: var(--muted);
    font-size: .8125rem;
    text-align: center;
}

/* ── Alert & catatan ───────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid;
    border-radius: var(--radius);
    font-size: .9rem;
}

.alert:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--danger-ring);
}

.alert > .ic {
    margin-top: 1px;
}

.alert-error {
    border-color: var(--danger-line);
    background: var(--danger-soft);
    color: var(--danger-text);
}

.alert ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.alert li + li {
    margin-top: 2px;
}

.alert a {
    color: inherit;
    font-weight: 600;
    text-underline-offset: 2px;
}

.note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: .875rem;
}

.note .ic {
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.note-warning {
    border-color: var(--warning-line);
    background: var(--warning-soft);
    color: var(--warning-text);
}

/* ── Layout ────────────────────────────────────────────────────────────── */
/* Kolom grid selalu minmax(0, 1fr): track "auto" implisit melebar mengikuti konten
   yang tidak bisa dipatahkan (mis. nama file panjang) dan membuat halaman bergeser ke samping. */
.layout,
.layout-main,
.stack,
.grid,
.grid-3,
.choices,
.toggles {
    grid-template-columns: minmax(0, 1fr);
}

.layout {
    display: grid;
    gap: 20px;
}

.layout-main {
    display: grid;
    gap: 20px;
    min-width: 0;
}

@media (min-width: 1024px) {
    .layout {
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
        gap: 24px;
    }

    .layout-side {
        position: sticky;
        top: 24px;
    }
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

/* ── Bagian bernomor ───────────────────────────────────────────────────── */
.step {
    padding: clamp(18px, 3vw, 28px);
}

.step-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.step-num {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .9rem;
    font-weight: 750;
    transition: background-color .25s, color .25s;
}

.step-num .ic {
    display: none;
    width: 18px;
    height: 18px;
    stroke-width: 2.6;
}

.step.is-complete .step-num {
    background: var(--success);
    color: #fff;
}

.step.is-complete .step-num > span {
    display: none;
}

.step.is-complete .step-num .ic {
    display: block;
    animation: pop .3s cubic-bezier(.2, 1.4, .4, 1);
}

.step-title {
    min-width: 0;
}

.step-title h2 {
    margin: 4px 0 2px;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.step-title p {
    margin: 0;
    color: var(--muted);
    font-size: .875rem;
}

.stack {
    display: grid;
    gap: 18px;
}

.grid,
.grid-3 {
    display: grid;
    gap: 18px;
}

@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .span-2 {
        grid-column: 1 / -1;
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 > :first-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 900px) {
    .grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid-3 > :first-child {
        grid-column: auto;
    }
}

/* ── Field ─────────────────────────────────────────────────────────────── */
.field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.field > label,
.label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-bottom: 8px;
    padding: 0;
    color: var(--text);
    font-size: .875rem;
    font-weight: 600;
}

legend.label {
    float: left;
    width: 100%;
}

legend.label + * {
    clear: both;
}

.auto-tag {
    display: none;
    align-items: center;
    margin-left: auto;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .6875rem;
    font-weight: 600;
}

.field.is-auto .auto-tag {
    display: inline-flex;
}

.control {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--input-bg);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}

.control::placeholder {
    color: var(--placeholder);
    opacity: 1;
}

.control:hover {
    border-color: var(--input-line-hover);
}

.control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.field.is-auto .control {
    background: var(--auto-bg);
}

textarea.control {
    min-height: 120px;
    resize: vertical;
}

input[type="date"].control {
    min-height: 48px;
    text-align: left;
}

input[type="date"].control::-webkit-date-and-time-value {
    text-align: left;
}

input[type="date"].control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: .7;
}

input[type="number"].control {
    -moz-appearance: textfield;
}

input[type="number"].control::-webkit-inner-spin-button,
input[type="number"].control::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.hint {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .8125rem;
}

.field-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.counter {
    flex: none;
    margin-top: 6px;
    color: var(--muted);
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
}

.counter.is-near {
    color: var(--warning-text);
    font-weight: 600;
}

.field-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 6px 0 0;
    color: var(--danger);
    font-size: .8125rem;
    font-weight: 500;
    animation: fade-in .2s ease;
}

.field-error .ic {
    width: 16px;
    height: 16px;
    margin-top: 1px;
}

.field.is-invalid .control,
.field.is-invalid .input-group,
.field.is-invalid .upload {
    border-color: var(--danger);
}

.field.is-invalid .control:focus,
.field.is-invalid .input-group:focus-within,
.field.is-invalid .upload:focus-within {
    box-shadow: 0 0 0 4px var(--danger-ring);
}

/* Input dengan addon (Rp / orang) */
.input-group {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--input-line);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    transition: border-color .15s, box-shadow .15s;
}

.input-group:hover {
    border-color: var(--input-line-hover);
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.input-group .control {
    flex: 1;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
}

.addon {
    display: flex;
    flex: none;
    align-items: center;
    padding: 0 14px;
    border-right: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: .9375rem;
    font-weight: 650;
}

.addon-end {
    border-right: 0;
    border-left: 1px solid var(--line);
    font-weight: 500;
}

.money .control {
    font-size: 1.25rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}

.money .addon {
    font-size: 1rem;
}

.hint.is-words {
    color: var(--text-2);
    font-style: italic;
}

/* Tanggal cepat */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.chip {
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-2);
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, color .15s, background-color .15s;
}

.chip:hover {
    border-color: var(--primary-line);
    color: var(--primary);
}

.chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.chip[aria-pressed="true"] {
    border-color: var(--primary-line);
    background: var(--primary-soft);
    color: var(--primary);
}

/* ── Pencarian NIK (combobox) ──────────────────────────────────────────── */
.combo {
    position: relative;
}

.combo .control {
    padding-right: 44px;
    padding-left: 44px;
}

.combo-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 20px;
    height: 20px;
    color: var(--muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.combo-spinner {
    display: none;
    position: absolute;
    top: 50%;
    right: 14px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid var(--line);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.combo.is-loading .combo-spinner {
    display: block;
}

.combo-list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    animation: fade-in .15s ease;
}

.combo-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
}

.combo-option:hover,
.combo-option.is-active {
    background: var(--surface-3);
}

.combo-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.combo-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.combo-name {
    overflow: hidden;
    font-size: .9375rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.combo-meta {
    color: var(--muted);
    font-size: .8125rem;
    line-height: 1.4;
}

.combo-nik {
    color: var(--text-2);
    font-family: var(--mono);
    font-size: .78rem;
}

.combo mark {
    border-radius: 3px;
    background: var(--mark-bg);
    color: inherit;
}

.combo-empty {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    color: var(--muted);
    font-size: .875rem;
}

.combo-empty .ic {
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

/* ── Kartu pilihan (radio) ─────────────────────────────────────────────── */
.choices {
    display: grid;
    gap: 12px;
}

@media (min-width: 520px) {
    .choices-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.choices-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.choice {
    display: block;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.choice input,
.toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.choice-card {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.choice:hover .choice-card {
    border-color: var(--input-line-hover);
    background: var(--surface-2);
}

.choice input:focus-visible + .choice-card {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.choice input:checked + .choice-card {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.choice-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface-3);
    color: var(--text-2);
    transition: background-color .15s, color .15s;
}

.choice input:checked + .choice-card .choice-icon {
    background: var(--primary-solid);
    color: #fff;
}

.choice-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.choice-text strong {
    font-size: .9375rem;
    font-weight: 650;
}

.choice-text small {
    color: var(--muted);
    font-size: .8125rem;
    line-height: 1.35;
}

.choice-check {
    display: grid;
    flex: none;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--input-line);
    border-radius: 50%;
    color: transparent;
    transition: background-color .15s, border-color .15s, color .15s;
}

.choice-check .ic {
    width: 13px;
    height: 13px;
    stroke-width: 3;
}

.choice input:checked + .choice-card .choice-check {
    border-color: var(--primary-solid);
    background: var(--primary-solid);
    color: #fff;
}

/* Jenis: tile vertikal */
.choices-3 .choice-card {
    position: relative;
    flex-direction: column;
    gap: 8px;
    padding: 16px 8px 14px;
    text-align: center;
}

.choices-3 .choice-text {
    align-items: center;
}

.choices-3 .choice-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
}

@media (max-width: 479px) {
    .choices-3 .choice-text small {
        display: none;
    }

    .choices-3 .choice-card {
        padding: 14px 6px 12px;
    }
}

.choice-group.is-invalid .choice-card {
    border-color: var(--danger);
}

/* ── Upload ────────────────────────────────────────────────────────────── */
.upload {
    position: relative;
    border: 1.5px dashed var(--input-line-hover);
    border-radius: 16px;
    background: var(--surface-2);
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.upload:hover,
.upload:focus-within {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.upload:focus-within {
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.upload.is-dragover {
    border-style: solid;
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 6px var(--primary-ring);
}

.upload-input {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 32px 20px;
    text-align: center;
    pointer-events: none;
}

.upload-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--primary);
    transition: transform .2s;
}

.upload-icon .ic {
    width: 26px;
    height: 26px;
}

.upload:hover .upload-icon,
.upload.is-dragover .upload-icon {
    transform: translateY(-3px);
}

.upload-title {
    margin: 0;
    font-weight: 600;
}

.upload-link {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.upload-hint {
    margin: 0;
    color: var(--muted);
    font-size: .8125rem;
}

.when-touch {
    display: none;
}

@media (hover: none) and (pointer: coarse) {
    .when-pointer {
        display: none;
    }

    .when-touch {
        display: inline;
    }
}

.upload.has-file {
    border-style: solid;
    border-color: var(--line);
    background: var(--surface);
}

.upload.has-file .upload-input {
    pointer-events: none;
}

.upload.has-file .upload-empty {
    display: none;
}

.upload-file {
    display: flex;
    position: relative;
    z-index: 2;
    align-items: center;
    gap: 14px;
    padding: 12px;
    animation: fade-in .25s ease;
}

.upload-thumb {
    display: grid;
    flex: none;
    place-items: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--danger-soft);
    color: var(--danger);
}

.upload-thumb .ic {
    width: 26px;
    height: 26px;
}

.upload-thumb.is-image {
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
}

.upload-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-meta {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.upload-meta strong {
    overflow: hidden;
    font-size: .9375rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-meta small {
    color: var(--muted);
    font-size: .8125rem;
}

.upload-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 6px;
}

/* ── Toggle (checkbox) ─────────────────────────────────────────────────── */
.toggles {
    display: grid;
    gap: 12px;
}

@media (min-width: 640px) {
    .toggles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.toggle {
    display: block;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.toggle-card {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}

@media (min-width: 640px) {
    .toggle-card {
        align-items: flex-start;
    }
}

.toggle:hover .toggle-card {
    border-color: var(--input-line-hover);
    background: var(--surface-2);
}

.toggle input:focus-visible + .toggle-card {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.toggle input:checked + .toggle-card {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.toggle-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--surface-3);
    color: var(--text-2);
    transition: background-color .15s, color .15s;
}

.toggle-icon .ic {
    width: 20px;
    height: 20px;
}

.toggle input:checked + .toggle-card .toggle-icon {
    background: var(--primary-solid);
    color: #fff;
}

.toggle-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.toggle-text strong {
    font-size: .9375rem;
    font-weight: 650;
}

.toggle-text small {
    color: var(--muted);
    font-size: .8125rem;
    line-height: 1.35;
}

.switch {
    position: relative;
    flex: none;
    width: 38px;
    height: 22px;
    margin-top: 2px;
    border-radius: 999px;
    background: var(--switch-off);
    transition: background-color .2s;
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    transition: transform .2s cubic-bezier(.3, 1.3, .5, 1);
}

.toggle input:checked + .toggle-card .switch {
    background: var(--primary-solid);
}

.toggle input:checked + .toggle-card .switch::after {
    transform: translateX(16px);
}

.reveal {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    animation: fade-in .25s ease;
}

.reveal .field {
    max-width: 300px;
}

/* ── Ringkasan ─────────────────────────────────────────────────────────── */
.summary {
    overflow: hidden;
}

.summary-hero {
    padding: 22px 22px 20px;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .18), transparent 46%),
        linear-gradient(140deg, var(--hero-1), var(--hero-2));
    color: #fff;
}

.summary-label {
    margin: 0;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    opacity: .82;
}

.summary-amount {
    margin: 4px 0 0;
    font-size: 1.875rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
}

.summary-words {
    margin: 6px 0 0;
    font-size: .8125rem;
    line-height: 1.4;
    opacity: .88;
}

.summary-body {
    padding: 18px 22px 22px;
}

.summary-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.summary-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: .875rem;
}

.summary-list dt {
    flex: none;
    color: var(--muted);
}

.summary-list dd {
    min-width: 0;
    margin: 0;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.summary-list dd.is-empty {
    color: var(--placeholder);
    font-weight: 500;
}

.summary-list dd small {
    display: block;
    color: var(--muted);
    font-family: var(--mono);
    font-size: .75rem;
    font-weight: 500;
}

.divider {
    height: 1px;
    margin: 18px 0;
    border: 0;
    background: var(--line);
}

.progress-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: .8125rem;
    font-weight: 600;
}

.progress-head span:last-child {
    color: var(--muted);
    font-weight: 500;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-3);
}

.progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary-solid), #22c55e);
    transition: width .35s ease;
}

.checklist {
    display: grid;
    gap: 2px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.checklist a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 -8px;
    padding: 6px 8px;
    border-radius: 8px;
    color: var(--text-2);
    font-size: .875rem;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

.checklist a:hover {
    background: var(--surface-2);
    color: var(--text);
}

.check-dot {
    display: grid;
    flex: none;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--input-line);
    border-radius: 50%;
    color: transparent;
    transition: background-color .2s, border-color .2s, color .2s;
}

.check-dot .ic {
    width: 12px;
    height: 12px;
    stroke-width: 3;
}

.checklist li.is-done a {
    color: var(--text);
}

.checklist li.is-done .check-dot {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

.check-opt {
    margin-left: auto;
    color: var(--muted);
    font-size: .75rem;
}

.summary-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.summary-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: .8125rem;
}

.summary-note .ic {
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

/* ── Tombol ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: .9375rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}

.btn .ic {
    width: 18px;
    height: 18px;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.btn-primary {
    background: var(--primary-solid);
    box-shadow: 0 8px 18px -8px var(--primary-shadow);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-solid-hover);
}

.btn-ghost {
    border-color: var(--line);
    background: var(--surface);
    color: var(--text-2);
}

.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn-ghost.is-armed {
    border-color: var(--danger-line);
    background: var(--danger-soft);
    color: var(--danger);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: .8125rem;
}

.btn-sm .ic {
    width: 16px;
    height: 16px;
}

.btn[disabled] {
    cursor: progress;
    opacity: .75;
    transform: none;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.btn.is-busy .btn-spinner {
    display: block;
}

.btn.is-busy .btn-ico {
    display: none;
}

.btn-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}

.btn-icon .ic {
    width: 18px;
    height: 18px;
}

.btn-icon:hover {
    border-color: var(--danger-line);
    background: var(--danger-soft);
    color: var(--danger);
}

.btn-icon:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--danger-ring);
}

/* ── Bar bawah (layar kecil) ───────────────────────────────────────────── */
.mobile-bar {
    display: flex;
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    align-items: center;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface-glass);
    box-shadow: 0 -10px 30px -12px rgba(15, 23, 42, .25);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: transform .25s ease;
}

.mobile-bar.is-away,
body.is-typing .mobile-bar {
    transform: translateY(115%);
}

.mobile-bar-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.mobile-bar-info small {
    color: var(--muted);
    font-size: .75rem;
}

.mobile-bar-info strong {
    overflow: hidden;
    font-size: 1.125rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-bar .btn {
    min-height: 44px;
    padding: 10px 20px;
}

@media (max-width: 1023px) {
    .page {
        padding-bottom: 104px;
    }
}

@media (min-width: 1024px) {
    .mobile-bar {
        display: none;
    }
}

/* ── Toast ─────────────────────────────────────────────────────────────── */
.toast {
    display: flex;
    position: fixed;
    z-index: 60;
    top: 16px;
    left: 50%;
    align-items: center;
    gap: 10px;
    max-width: min(calc(100vw - 32px), 440px);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--toast-bg);
    box-shadow: var(--shadow-lg);
    color: var(--toast-text);
    font-size: .9rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -160%);
    transition: transform .3s cubic-bezier(.2, 1, .3, 1), opacity .3s;
}

.toast .ic {
    width: 18px;
    height: 18px;
    color: var(--toast-icon);
}

.toast.is-info .ic {
    color: inherit;
}

.toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ── Halaman sukses ────────────────────────────────────────────────────── */
.success {
    padding: clamp(24px, 5vw, 40px);
    text-align: center;
}

.success h1 {
    font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
}

.success .lead {
    margin: 10px auto 0;
}

.success-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--success-soft);
    box-shadow: 0 0 0 10px var(--success-halo);
    color: var(--success-text);
    animation: pop .45s cubic-bezier(.2, 1.4, .4, 1);
}

.success-icon .ic {
    width: 38px;
    height: 38px;
    stroke-width: 2.4;
    stroke-dasharray: 22;
    stroke-dashoffset: 22;
    animation: draw .5s .25s ease forwards;
}

.ticket {
    margin-top: 24px;
    border: 1px dashed var(--input-line-hover);
    border-radius: 16px;
    background: var(--surface-2);
    text-align: left;
}

.ticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px dashed var(--input-line-hover);
}

.ticket-code small {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.ticket-code strong {
    font-family: var(--mono);
    font-size: 1.375rem;
    letter-spacing: .04em;
}

.ticket-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 16px 18px;
}

.ticket-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: .9rem;
}

.ticket-list dt {
    color: var(--muted);
}

.ticket-list dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

.ticket-amount {
    font-variant-numeric: tabular-nums;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
}

.timeline li::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 11px;
    right: 50%;
    left: -50%;
    height: 2px;
    background: var(--line);
}

.timeline li:first-child::before {
    display: none;
}

.timeline-dot {
    display: grid;
    position: relative;
    z-index: 1;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 2px solid var(--input-line);
    border-radius: 50%;
    background: var(--surface);
}

.timeline-dot .ic {
    width: 13px;
    height: 13px;
    stroke-width: 3;
}

.timeline li.is-done {
    color: var(--success-text);
}

.timeline li.is-done .timeline-dot {
    border-color: var(--success);
    background: var(--success);
    color: #fff;
}

.success .hint.center {
    margin-top: 14px;
}

.success-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

@media (min-width: 480px) {
    .success-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Animasi ───────────────────────────────────────────────────────────── */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pop {
    from {
        transform: scale(.6);
    }

    to {
        transform: scale(1);
    }
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }

    .success-icon .ic {
        stroke-dashoffset: 0;
    }

    .combo-spinner,
    .btn-spinner {
        animation-duration: 1.4s !important;
        animation-iteration-count: infinite !important;
    }
}

@media print {

    .topbar,
    .mobile-bar,
    .toast,
    .success-actions,
    .summary-actions {
        display: none !important;
    }

    body {
        background: #fff;
    }
}
