/* NKS Fin Services — FASTag apply tool. Builds on /assets/site.css tokens. */
.fa [hidden], .fa-dialog [hidden] { display: none !important; }
.fa { padding-bottom: 60px; }
.fa .mono { font-family: var(--font-mono); }
.fa .caps { text-transform: uppercase; }
.fa-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; margin-top: 18px; }
@media (max-width: 900px) { .fa-layout { grid-template-columns: 1fr; } }
.fa-svc-total { font-weight: 600; color: var(--navy); }
@media (min-width: 901px) { .fa-svc-total { display: none; } }
.fa-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fa-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .fa-side { position: static; } }

.fa-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fa-card > header { display: flex; gap: 12px; align-items: flex-start; }
.fa-card h2 { font-size: 1.2rem; }
.fa-card h3 { font-size: 1rem; }
.fa-sub { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
.fa-num { font-family: var(--font-mono); font-size: .8rem; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; border: 1.5px solid var(--navy); color: var(--navy); display: grid; place-items: center; font-weight: 600; }
.fa-card.done .fa-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.fa-card.locked { opacity: .55; }
.fa-card.locked :is(input, select, button, textarea, a.btn) { pointer-events: none; }

.fa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fa-grid .fa-wide, .fa-wide { grid-column: 1 / -1; }
.fa label:not(.fa-check):not(.fa-choice label):not(.fa-pick) { display: block; font-weight: 600; font-size: .92rem; min-width: 0; }
.fa label:not(.fa-check):not(.fa-choice label):not(.fa-pick) > :is(input, select, textarea) { display: block; margin-top: 4px; }
.fa label > .err, .fa label > .hint { display: block; margin-top: 4px; }
.fa input:not([type=radio]):not([type=checkbox]):not([type=file]), .fa select, .fa textarea {
  font: inherit; font-size: 1rem; font-weight: 400; color: var(--ink); background: var(--box);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0; }
.fa input.mono { font-family: var(--font-mono); letter-spacing: .04em; }
.fa input:disabled { color: var(--muted); }
.fa .bad { border-color: var(--err) !important; background: color-mix(in srgb, var(--err) 6%, var(--box)) !important; }
.fa .err { color: var(--err); font-size: .84rem; font-weight: 500; min-height: 0; }
.fa .err:empty { display: none; }
.fa .hint { color: var(--muted); font-size: .85rem; font-weight: 400; }
.fa .opt { color: var(--muted); font-weight: 400; font-size: .85rem; }
.fa .req { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--marigold); font-weight: 700; margin-left: 6px; }
.fa .lbl { font-weight: 600; font-size: .95rem; }

.fa-choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fa-choice legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.fa-choice label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; background: var(--box); font-size: .96rem; }
.fa-choice label:has(input:checked) { border-color: var(--navy); background: color-mix(in srgb, var(--navy) 8%, var(--card)); }
.fa-choice input { margin-top: 4px; accent-color: var(--navy); flex: 0 0 auto; }
.fa-choice label small { display: block; color: var(--muted); }
.fa-choice.fa-inline { flex-direction: row; flex-wrap: wrap; }
.fa-choice.fa-inline legend { width: 100%; }
.fa-choice.fa-inline label { flex: 1 1 140px; }
.fa-choice .price { margin-left: auto; font-family: var(--font-mono); font-weight: 600; color: var(--navy); white-space: nowrap; padding-left: 8px; }

.fa-check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.fa-check input { margin-top: 5px; accent-color: var(--navy); flex: 0 0 auto; }

.fa-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fa-pick { font: inherit; font-size: .9rem; font-weight: 600; border: 1.5px solid var(--navy); color: var(--navy); background: transparent; border-radius: 8px; padding: 6px 12px; cursor: pointer; display: inline-flex; align-items: center; }
.fa-pick.fa-strong { background: var(--navy); color: var(--navy-ink); }
.fa input[type=file][data-file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.fa-howto { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.fa-shot { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.fa-old { border-top: 1px dashed var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }

.fa-more { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--box); }
.fa-more summary { cursor: pointer; font-weight: 600; font-size: .95rem; }
.fa-more[open] { display: flex; flex-direction: column; gap: 12px; }
.fa-more[open] > summary { margin-bottom: 4px; }

.fa-media { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 620px) { .fa-media { grid-template-columns: 1fr; } }
.fa-photo, .fa-sign { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fa-photo-box { width: 140px; aspect-ratio: 3.5 / 4.5; border: 1.5px dashed var(--line); border-radius: 6px; display: grid; place-items: center; text-align: center; padding: 6px; background: var(--box); overflow: hidden; }
.fa-photo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fa-photo-box:has(img) { padding: 0; border-style: solid; }
.fa-tabs { display: flex; gap: 6px; }
.fa-tabs button { font: inherit; font-size: .9rem; border: 1px solid var(--line); background: var(--box); color: var(--ink); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.fa-tabs button[aria-selected=true] { border-color: var(--navy); color: var(--navy); font-weight: 600; background: color-mix(in srgb, var(--navy) 8%, var(--card)); }
.fa-pad { width: 100%; max-width: 520px; aspect-ratio: 700 / 220; height: auto; background: #fff; border: 1.5px solid var(--line); border-radius: 8px; touch-action: none; cursor: crosshair; display: block; }
.fa-sig-preview { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; max-width: 320px; display: flex; flex-direction: column; gap: 4px; }
.fa-sig-preview img { width: 100%; height: auto; display: block; }
.fa-sig-preview span { font-size: .82rem; color: #1f8a4c; font-weight: 600; }

.fa-bill { background: var(--card); border: 1.5px solid var(--navy); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.fa-bill .row { display: flex; justify-content: space-between; gap: 10px; font-size: .93rem; font-variant-numeric: tabular-nums; }
.fa-bill .row b, .fa-bill .row span:last-child { font-family: var(--font-mono); white-space: nowrap; }
.fa-bill .grp { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-top: 4px; }
.fa-bill .tot { border-top: 1.5px solid var(--line); padding-top: 8px; font-size: 1.05rem; font-weight: 700; }
.fa-bill .svc { font-weight: 600; color: var(--navy); }
.fa-help { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.fa-help b { color: var(--ink); }

/* Submit step */
.fs { display: flex; flex-direction: column; gap: 14px; }
.fs-step { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.fs-step > header { display: flex; gap: 10px; align-items: baseline; }
.fs-step.done .fa-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.fs-msg { font-size: .9rem; }
.fs-msg.bad { color: var(--err); } .fs-msg.ok { color: var(--ok); }
.fs-docs { display: grid; gap: 10px; }
.fs-doc { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.fs-doc.missing { border-color: var(--err); background: color-mix(in srgb, var(--err) 6%, var(--card)); }
.fs-doc .files { font-size: .86rem; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.fs-doc .files button { font: inherit; font-size: .82rem; background: none; border: 0; color: var(--err); text-decoration: underline; cursor: pointer; padding: 0; margin-left: 6px; }
.fs-upi { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--box); }
@media (max-width: 520px) { .fs-upi { grid-template-columns: 1fr; justify-items: start; } }
.fs-qr { background: #fff; padding: 10px; border-radius: 10px; border: 1px solid var(--line); line-height: 0; }
.fs-qr img, .fs-qr canvas { width: 180px; height: 180px; display: block; }
.fs-upi .amt { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 600; }
.fs-upi ol { margin: 0; padding-left: 18px; font-size: .92rem; display: flex; flex-direction: column; gap: 4px; }
.fs-progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.fs-progress span { display: block; height: 100%; width: 0; background: var(--navy); transition: width .2s; }
.fs-done { border-left: 4px solid var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); padding: 14px; border-radius: 0 10px 10px 0; display: flex; flex-direction: column; gap: 6px; }
.fs .pay { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }

.fa-dialog { border: 0; border-radius: 14px; padding: 0; width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 40px); background: var(--card); color: var(--ink); }
.fa-dialog::backdrop { background: rgba(10, 20, 40, .55); }
.fa-dialog-body { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.fa-dialog-body header { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; top: 0; background: var(--card); padding-bottom: 6px; }
.fa-dialog img { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); }
