:root {
    --header-height: 63px;
    --page-width: 1120px;
    --page-gutter: 24px;
    --section-menu-width: 245px;
    --form-gap: 22px;
    --steps-clearance: 78px;
    color-scheme: light;
    --ink: #172923;
    --muted: #4d6269;
    --green: #006348;
    --deep: #10382e;
    --line: #dce5dc;
    --paper: #f4f7f3;
    --soft: #e9f5ef;
    --gold: #f0d398;
    --shadow: 0 12px 32px rgba(17, 59, 51, .06);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.22; }
h1 { font-size: clamp(1.8rem, 4vw, 2.65rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); letter-spacing: -.025em; }
h3 { font-size: 1.075rem; }
a { color: var(--green); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #19776b; outline-offset: 3px; }
.wrap { width: min(var(--page-width), calc(100% - 2 * var(--page-gutter))); margin-inline: auto; }
.skip-link { position: absolute; top: 8px; left: 8px; transform: translateY(-150%); background: white; padding: 10px; z-index: 2; }
.skip-link:focus { transform: translateY(0); }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bank-logo { width: clamp(172px, 27vw, 242px); display: block; }
.support-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; border: 1px solid var(--line); border-radius: 100px; padding: 8px 15px; font-size: .875rem; font-weight: 700; }
.support-link svg { flex: none; }
.support-link:hover, .section-nav a:hover { background: var(--soft); }
.main { flex: 1; padding-block: 22px 56px; min-width: 0; }
.site-footer { background: white; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer-inner { padding-block: 22px; }
.form-intro {
    margin-bottom: 16px;
    padding: clamp(14px, 2.5vw, 26px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, #fff 50%, #f4f8fc);
    text-align: center;
}
.form-banner { width: min(100%, 510px); margin-inline: auto; }
.form-banner img { display: block; width: 100%; }
.form-intro p { margin: 5px auto 0; max-width: 58ch; color: var(--muted); font-size: .94rem; }
.progress { position: sticky; top: var(--header-height); z-index: 4; margin-bottom: 22px; box-shadow: 0 6px 14px #142b320d; border: 1px solid var(--line); border-radius: 16px; background: white; }
.progress ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 6px; gap: 5px; }
.progress li { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 8px 4px; border-radius: 11px; color: var(--muted); font-size: .875rem; font-weight: 650; }
.progress li.current { background: var(--soft); color: var(--deep); }
.step-index { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border-radius: 50%; background: var(--paper); }
.current .step-index, .complete .step-index { color: white; background: var(--green); }
.form-layout { display: grid; grid-template-columns: var(--section-menu-width) minmax(0, 1fr); gap: var(--form-gap); align-items: start; }
.form-sidebar { position: sticky; top: calc(var(--header-height) + var(--steps-clearance)); }
.section-nav { display: grid; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.section-nav h2 { font-size: .85rem; color: var(--muted); padding: 4px 10px 8px; }
.section-nav a { color: var(--deep); display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; min-height: 44px; border-radius: 8px; font-size: .875rem; font-weight: 650; text-decoration: none; }
.section-nav a span { color: var(--green); }
.section-nav a[aria-current="location"] { background: var(--soft); box-shadow: inset 3px 0 var(--green); }
.card { padding: clamp(18px, 3vw, 32px); background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); min-width: 0; }
.form-section + .form-section { margin-top: 18px; }
.section-title { color: var(--deep); }
.section-title::before { content: ""; display: block; width: 28px; height: 3px; border-radius: 3px; background: #bc9650; margin-bottom: 10px; }
.section-description { color: var(--muted); margin: 6px 0 22px; }
.grid { display: grid; gap: 19px 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { min-width: 0; }
.field > label, .field-label { display: block; margin-bottom: 6px; font-weight: 670; font-size: .9rem; }
.field small { display: block; margin-top: 5px; font-size: .82rem; color: var(--muted); }
input, select, button { font: inherit; }
input:not([hidden]):not([type=hidden]):not([type=checkbox]):not([type=radio]), select, .fixed-value {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #b9cbbf;
    border-radius: 12px;
    color: var(--ink);
    background: white;
}
input::placeholder { color: #5d7277; }
input[readonly]:not([hidden]):not([type=hidden]):not([type=checkbox]):not([type=radio]), .fixed-value { background: var(--paper); }
input[type=radio], input[type=checkbox] { accent-color: var(--green); width: 18px; height: 18px; margin: 0; flex: 0 0 18px; }
.radio-row, .button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label { display: flex; align-items: center; gap: 8px; padding: 9px 12px; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .9rem; }
.radio-row label:has(:checked) { border-color: var(--green); background: var(--soft); }
.statement { background: var(--paper); border-radius: 12px; padding: 16px; color: var(--muted); font-size: .9rem; }
.statement p + p { margin-top: 12px; }
.checkline { display: flex; align-items: baseline; gap: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-block: 16px 22px; font-size: .9rem; font-weight: 650; cursor: pointer; }
.checkline input { align-self: flex-start; margin-top: 3px; }
#persetujuan > .field { margin-top: 22px; }
.signature-box { max-width: 760px; position: relative; }
.signature-guide { position: absolute; inset: 0 16px 24px; display: grid; place-items: end center; border-bottom: 1px solid #dce5dc; padding-bottom: 4px; pointer-events: none; font-size: .8rem; color: var(--muted); }
.has-signature .signature-guide { display: none; }
.field-error { color: #8b2d24; font-size: .875rem; font-weight: 650; }
.field-error:not(:empty) { margin-top: 8px; }
.signature-box:has(+ .field-error:not(:empty)) canvas { border-color: #8b2d24; }
#signaturePad { width: 100%; height: 220px; display: block; background: white; border: 2px dashed #88aaa1; border-radius: 12px; touch-action: none; cursor: crosshair; }
.signature-box ~ .button-row { margin-block: 8px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
}
.primary { background: var(--green); color: white; }
.primary:hover { background: var(--deep); }
.secondary { background: var(--paper); color: var(--deep); border-color: var(--line); }
.secondary:hover:not(:disabled) { background: var(--soft); border-color: #a4beb4; }
.btn:disabled { opacity: .65; cursor: not-allowed; }
.submit-panel { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.submit-panel p { flex: 1 1 220px; color: var(--muted); font-size: .875rem; }
.alert { padding: 12px 16px; border: 1px solid; border-radius: 10px; margin-bottom: 16px; overflow-wrap: anywhere; }
.alert.error { background: #fff2ee; color: #8b2d24; border-color: #edc4bd; }
.alert.success { background: var(--soft); color: var(--deep); border-color: #b7dcca; }
.narrow-card { max-width: 590px; margin-inline: auto; }
.narrow-card > p { color: var(--muted); margin-top: 10px; }
.narrow-card form, .narrow-card > .button-row { margin-top: 20px; }
.narrow-card form > .btn { width: 100%; margin-top: 14px; }
.narrow-card .alert { margin-top: 14px; }
input.otp-input { font-size: 1.35rem; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.resend-form { border-top: 1px solid var(--line); padding-top: 14px; }
.resend-form p { font-size: .9rem; color: var(--muted); }
.captcha-row { margin-top: 16px; overflow: hidden; }
.upload-card { max-width: 780px; margin-inline: auto; }
.upload-card .button-row { margin-top: 18px; }
.record { display: grid; gap: 1px; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.record div { display: grid; grid-template-columns: minmax(96px, 1fr) minmax(0, 2fr); gap: 8px; padding: 9px 12px; background: var(--paper); }
.record dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.upload-example { margin: 10px 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.upload-example summary { color: var(--green); font-weight: 700; cursor: pointer; min-height: 30px; }
.upload-example p { margin-top: 10px; }
.upload-example img { max-width: min(100%, 240px); display: block; border-radius: 10px; }
.upload-card input[type=file] { max-width: 100%; }
.upload-card input[type=file]::file-selector-button { border: 0; border-radius: 6px; padding: 5px 8px; margin-right: 8px; background: var(--soft); color: var(--deep); cursor: pointer; }
.success-hero { background: var(--deep); color: white; padding: clamp(22px, 4vw, 44px); border-radius: 20px; border-top: 4px solid var(--gold); }
.success-hero p { margin-top: 10px; color: #deeee8; max-width: 62ch; overflow-wrap: anywhere; }
.status-icon { display: grid; place-items: center; background: var(--soft); color: var(--green); width: 46px; height: 46px; border-radius: 50%; font-size: 1.5rem; margin-bottom: 12px; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; margin-top: 18px; align-items: start; }
.store-links { display: grid; gap: 10px; }
.store-links .btn { justify-content: space-between; }
.guide { padding-left: 24px; margin: 0; }
.guide li { padding-left: 4px; }
.guide li + li { margin-top: 12px; }
.guide p { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.result-actions { margin-top: 18px; align-items: center; }
@media (max-width: 800px) {
    .form-layout, .result-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .form-sidebar { display: none; }
}
@media (max-width: 570px) {
    :root { --page-gutter: 12px; }
    .bank-logo { width: min(172px, 48%); min-width: 0; }
    .support-link { padding-inline: 11px; }
    .main { padding-block: 12px 32px; }
    .form-intro { margin-bottom: 10px; padding: 10px 12px 13px; border-radius: 16px; }
    .form-intro p { font-size: .83rem; }
    .progress { margin-bottom: 14px; }
    .progress li { text-align: left; gap: 4px; font-size: .72rem; line-height: 1.15; }
    .progress li span:last-child { min-width: 0; overflow-wrap: anywhere; }
    .step-index { width: 19px; height: 19px; flex-basis: 19px; }
    .grid.two { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .submit-panel .btn, .result-actions .btn { width: 100%; }
    .signature-box ~ .button-row .btn { flex: 1 1 auto; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
    .captcha-row .g-recaptcha { transform: scale(.85); transform-origin: top left; margin-bottom: -10px; }
}
@media (max-width: 340px) {
    .captcha-row .g-recaptcha { transform: scale(.81); margin-bottom: -13px; }
}

/* Keep service actions visible without covering anchors or focused fields. */
html { scroll-padding-top: calc(var(--header-height) + 18px); }
html:has(.progress) { scroll-padding-top: calc(var(--header-height) + var(--steps-clearance)); }
.site-header { position: sticky; top: 0; z-index: 5; }
.skip-link { z-index: 6; }
.header-inner { min-height: calc(var(--header-height) - 1px); }
.section-title { font-size: clamp(1.12rem, 2.3vw, 1.35rem); }
.section-description { font-size: .92rem; }
.ktp-assist { background: #f3f8f5; border: 1px dashed #a4bfb1; border-radius: 14px; padding: 15px; margin-bottom: 19px; }
.ktp-assist h3 { font-size: 1rem; }
.ktp-assist p, .ktp-dialog p { font-size: .875rem; color: var(--muted); margin-top: 7px; }
.ktp-dialog [hidden] { display: none; }
.ktp-assist .button-row, .ktp-dialog .button-row { margin-top: 12px; }
#ktp-status:empty { display: none; }
.ktp-dialog[open] {
    width: min(600px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: clamp(15px, 3vw, 24px);
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--ink);
    background: white;
    box-shadow: 0 22px 75px #102e284f;
}
.ktp-dialog::backdrop { background: #142b32ad; }
.ktp-dialog-header { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.ktp-frame { position: relative; margin-block: 12px; background: #172923; overflow: hidden; border: 2px solid #bcd1c5; border-radius: 12px; aspect-ratio: 1400 / 884; }
.ktp-frame canvas, .ktp-frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
.ktp-frame canvas { touch-action: none; cursor: grab; }
.ktp-frame canvas:active { cursor: grabbing; }
.ktp-frame canvas:focus-visible { outline-offset: -4px; }
.ktp-frame-label {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    border-radius: 6px;
    padding: 7px 3px;
    color: white;
    background: #102e28df;
    font-size: .7rem;
    font-weight: 700;
    pointer-events: none;
}
.ktp-editor-controls { display: grid; grid-template-columns: auto minmax(35px, 1fr) auto; gap: 8px; align-items: center; font-size: .85rem; }
.ktp-editor-controls input[type=range] { padding: 0 !important; accent-color: var(--green); }
.ktp-loading[open] { width: min(360px, calc(100% - 24px)); text-align: center; }
.ktp-loading::backdrop { background: #142b3266; backdrop-filter: blur(7px); }
.ktp-loading .btn { margin-top: 13px; }
.ktp-spinner { width: 36px; height: 36px; margin: 0 auto 12px; border: 4px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: ktp-spin 850ms linear infinite; }
@keyframes ktp-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .ktp-spinner { animation: none; } }
.ktp-review-photo { display: block; width: 100%; max-height: 175px; object-fit: contain; background: var(--paper); border-radius: 8px; margin-top: 12px; }
#ktp-confirm .field { margin-top: 10px; }
@media (max-width: 570px) {
    .ktp-assist { padding: 12px; }
    .ktp-assist .btn, .ktp-dialog .button-row .btn { flex: 1 1 auto; }
}

.ktp-required { margin-left: 5px; padding: 2px 7px; border-radius: 999px; background: #e1eee6; color: var(--deep); font-size: .72rem; vertical-align: middle; }
.ktp-invalid { border-color: #9c4037; background: #fff6f4; }
.ktp-invalid #ktp-status { color: #842f27; font-weight: 700; }
.ktp-photo-dialog[open] {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 1.3dvh, 12px);
    width: min(760px, calc(100% - 16px));
    height: min(690px, calc(100dvh - 16px));
    max-height: none;
    overflow: hidden;
    padding: clamp(8px, 2dvh, 20px);
    background: #111b29;
    color: #f4f7fb;
    border-color: #293749;
}
html:has(.ktp-photo-dialog[open]) { overflow: hidden; }
.ktp-photo-dialog :is(p, .button-row) { margin: 0; }
.ktp-photo-dialog p { color: #cdd8e6; }
.ktp-photo-dialog .secondary { background: white; }
.ktp-photo-dialog.is-portrait[open] { width: min(490px, calc(100% - 10px)); height: calc(100dvh - 10px); }
.ktp-frame-area { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; container-type: size; }
.ktp-photo-dialog .ktp-frame {
    width: min(100cqw, calc(100cqh * 1400 / 884));
    margin: 0;
    border: 3px solid #fff;
    border-radius: 16px;
}
.ktp-photo-dialog.is-portrait .ktp-frame { aspect-ratio: 884 / 1400; width: min(100cqw, calc(100cqh * 884 / 1400)); }
.ktp-photo-dialog .ktp-frame-label { left: 7px; font-size: .8rem; }
.ktp-camera-button { background: #006348; color: white; }
.ktp-camera-button:hover { background: #004d38; }
.ktp-gallery-button { background: #e5efff; border-color: #b6caec; color: #183e73; }
.ktp-gallery-button:hover { background: #d6e6ff; }
@media (max-height: 460px) {
    .ktp-photo-dialog .btn { min-height: 34px; padding: 4px 9px; }
    .ktp-photo-dialog h3 { font-size: .95rem; }
    .ktp-photo-dialog p { font-size: .75rem; line-height: 1.3; }
    .ktp-photo-dialog .ktp-editor-controls input[type=range] { min-height: 32px; }
}

.form-layout {
    --page-inset: max(var(--page-gutter), calc((100% - var(--page-width)) / 2));
    isolation: isolate;
}
.form-layout::before {
    content: "";
    position: fixed;
    inset-block: 0;
    inset-inline: calc(var(--page-inset) + var(--section-menu-width) + var(--form-gap)) var(--page-inset);
    z-index: -1;
    pointer-events: none;
    background: url("../img/Form%20Standing%20instruction%20Speedcash.png") center / min(85%, 680px) auto no-repeat;
    opacity: 0;
    transition: opacity 180ms ease;
}
.form-layout.has-watermark::before { opacity: .46; }
.form-layout.has-watermark .form-section { background-color: rgb(255 255 255 / 76%); }
.form-layout.has-watermark .form-section :is(input[type=text], input[type=email], input[type=date], select, .fixed-value) {
    background-color: rgb(255 255 255 / 70%);
    border-color: #91a99d;
}
.form-layout.has-watermark .form-section :is(input[type=text], input[type=email], input[type=date], select):focus {
    background-color: rgb(255 255 255 / 88%);
}
@media (max-width: 800px) {
    .form-layout::before { inset-inline: var(--page-inset); }
}
@media (prefers-reduced-motion: reduce) {
    .form-layout::before { transition: none; }
}

.field-error-links { margin: 6px 0; padding-left: 22px; }
.field-error-links a { color: inherit; font-weight: 700; }
.validation-note { font-size: .875rem; margin-top: 8px; }
.form-section .field input[aria-invalid="true"] { border-color: #a33a32; }

.ktp-confirmed-preview { margin: 12px 0 0; max-width: 340px; }
.ktp-confirmed-preview figcaption { margin-bottom: 6px; color: var(--deep); font-size: .82rem; font-weight: 700; }
.ktp-confirmed-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
