/* RTO Master online forms — public page. Brand colour comes from --rf-brand (set on <body>). */
:root { --rf-brand: #1E3A8A; --rf-ink: #0F172A; --rf-muted: #64748B; --rf-line: #E2E8F0; --rf-bg: #F8FAFC; --rf-card: #FFFFFF; --rf-err: #B91C1C; --rf-ok: #047857; }
* { box-sizing: border-box; }
body.rf-body { margin: 0; background: var(--rf-bg); color: var(--rf-ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body.rf-embed { background: transparent; }
.rf-wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; }
.rf-embed .rf-wrap { padding: 4px 2px 8px; }
.rf-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.rf-top img { max-height: 52px; max-width: 160px; object-fit: contain; }
.rf-top .rf-co { font-weight: 600; }
.rf-top .rf-codes { color: var(--rf-muted); font-size: 12px; }
.rf-title { font-size: 26px; line-height: 1.2; margin: 0 0 6px; }
.rf-intro { color: #334155; margin-bottom: 18px; }
.rf-card { background: var(--rf-card); border: 1px solid var(--rf-line); border-radius: 14px; padding: 24px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.rf-card h2 { margin: 0 0 4px; font-size: 20px; }
.rf-muted { color: var(--rf-muted); margin: 0 0 16px; }
.rf-progress { height: 4px; background: var(--rf-line); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.rf-progress > span { display: block; height: 100%; background: var(--rf-brand); transition: width .3s; width: 0; }
.rf-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 4px; padding: 0; margin: 0 0 16px; }
.rf-steps li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--rf-muted); white-space: nowrap; padding-right: 8px; }
.rf-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rf-line); background: #fff; font-size: 11px; flex: none; }
.rf-steps .rf-on { color: var(--rf-ink); font-weight: 600; }
.rf-steps .rf-on .rf-dot, .rf-steps .rf-done .rf-dot { background: var(--rf-brand); border-color: var(--rf-brand); color: #fff; }
.rf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.rf-full { grid-column: 1 / -1; }
.rf-field[hidden] { display: none; }
.rf-label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.rf-req { color: var(--rf-err); }
.rf-help { color: var(--rf-muted); font-size: 12px; margin-top: 4px; }
.rf-err { color: var(--rf-err); font-size: 12px; min-height: 0; margin-top: 3px; }
.rf-field input[type=text], .rf-field input[type=email], .rf-field input[type=tel], .rf-field input[type=number], .rf-field input[type=date],
.rf-field select, .rf-field textarea, .rf-cell input, .rf-cell select, .rf-crow input[type=text], .rf-crow input[type=date] {
  width: 100%; padding: 10px 12px; border: 1px solid #CBD5E1; border-radius: 9px; font: inherit; background: #fff; color: inherit; min-height: 42px; }
.rf-field input:focus, .rf-field select:focus, .rf-field textarea:focus { outline: 2px solid color-mix(in srgb, var(--rf-brand) 35%, transparent); border-color: var(--rf-brand); }
.rf-error input, .rf-error select, .rf-error textarea, .rf-error .rf-choices, .rf-error .rf-drop { border-color: var(--rf-err) !important; }
.rf-none { padding: 10px 12px; border: 1px dashed #CBD5E1; border-radius: 9px; color: var(--rf-muted); font-size: 14px; background: #FAFBFC; }
.rf-heading { margin: 10px 0 0; font-size: 16px; padding-top: 10px; border-top: 1px solid var(--rf-line); }
.rf-info { background: #F1F5F9; border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #334155; }
.rf-choices { display: grid; gap: 6px; }
.rf-choices.rf-inline { grid-auto-flow: column; justify-content: start; gap: 8px; }
.rf-choice { display: flex; align-items: flex-start; gap: 9px; padding: 9px 12px; border: 1px solid var(--rf-line); border-radius: 9px; cursor: pointer; background: #fff; }
.rf-choice input { margin-top: 3px; accent-color: var(--rf-brand); width: 17px; height: 17px; flex: none; }
.rf-choice:has(input:checked) { border-color: var(--rf-brand); background: color-mix(in srgb, var(--rf-brand) 6%, #fff); }
.rf-declare { font-size: 14px; }
.rf-drop { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed #CBD5E1; border-radius: 10px; padding: 16px; cursor: pointer; color: var(--rf-brand); font-weight: 600; background: #fff; }
.rf-drop + input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rf-autohint { font-size: 12px; color: var(--rf-ok); margin-top: 6px; }
.rf-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rf-file { background: #F1F5F9; border-radius: 20px; padding: 3px 4px 3px 10px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.rf-x { border: 0; background: transparent; color: var(--rf-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.rf-signwrap { border: 1px solid #CBD5E1; border-radius: 10px; overflow: hidden; background: #fff; }
.rf-sign { width: 100%; height: 160px; display: block; touch-action: none; background: repeating-linear-gradient(#fff, #fff 119px, #E2E8F0 120px, #fff 121px); }
.rf-signbar { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 12px; color: var(--rf-muted); border-top: 1px solid var(--rf-line); }
.rf-table { display: grid; gap: 10px; }
.rf-row { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; padding: 12px 36px 12px 12px; border: 1px solid var(--rf-line); border-radius: 10px; background: #FAFBFC; }
.rf-row .rf-x { position: absolute; top: 6px; right: 4px; }
.rf-cell span { display: block; font-size: 12px; color: var(--rf-muted); margin-bottom: 3px; }
.rf-add { justify-self: start; border: 1px dashed var(--rf-brand); color: var(--rf-brand); background: #fff; border-radius: 9px; padding: 8px 14px; font: inherit; cursor: pointer; }
.rf-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rf-line); }
.rf-navr { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.rf-btn { background: var(--rf-brand); color: #fff; border: 0; border-radius: 10px; padding: 11px 22px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.rf-btn:disabled { opacity: .6; cursor: wait; }
.rf-btn.rf-ghost { background: #fff; color: var(--rf-ink); border: 1px solid #CBD5E1; }
.rf-link { background: none; border: 0; color: var(--rf-brand); font: inherit; cursor: pointer; text-decoration: underline; padding: 6px 0; }
.rf-formmsg { margin-top: 12px; font-size: 14px; color: var(--rf-err); }
.rf-ok { color: var(--rf-ok); }
.rf-note { background: #FFFBEB; border: 1px solid #FCD34D; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.rf-legal { max-height: 260px; overflow: auto; border: 1px solid var(--rf-line); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #334155; margin: 14px 0; background: #FCFCFD; }
.rf-review { display: grid; gap: 14px; }
.rf-rsec h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--rf-muted); }
.rf-rrow { display: grid; grid-template-columns: 40% 1fr; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--rf-line); font-size: 14px; }
.rf-rrow span { color: var(--rf-muted); }
.rf-rrow b { font-weight: 500; word-break: break-word; }
.rf-thanks { text-align: center; padding: 40px 24px; }
.rf-tick { width: 64px; height: 64px; border-radius: 50%; background: var(--rf-ok); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.rf-gate { max-width: 520px; margin: 0 auto; }
.rf-modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.rf-modal { background: #fff; border-radius: 14px; padding: 22px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 50px rgba(15,23,42,.25); }
.rf-modal h3 { margin: 0 0 8px; }
.rf-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.rf-confirm { display: grid; gap: 8px; }
.rf-crow { display: grid; grid-template-columns: 22px 38% 1fr; align-items: center; gap: 8px; }
.rf-crow input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--rf-brand); }
.rf-clabel { font-size: 13px; color: #334155; }
.rf-dim { opacity: .55; }
.rf-warn { background: #FFFBEB; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #92400E; }
.rf-spin { width: 34px; height: 34px; border: 3px solid var(--rf-line); border-top-color: var(--rf-brand); border-radius: 50%; animation: rfspin 0.8s linear infinite; margin: 16px auto; }
@keyframes rfspin { to { transform: rotate(360deg); } }
.rf-toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); background: var(--rf-ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: all .25s; z-index: 60; max-width: calc(100% - 32px); }
.rf-toast.rf-show { opacity: 1; transform: translate(-50%, 0); }
.rf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rf-foot { text-align: center; color: var(--rf-muted); font-size: 12px; margin-top: 18px; }
.rf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.rf-list a { display: block; background: #fff; border: 1px solid var(--rf-line); border-radius: 12px; padding: 16px; text-decoration: none; color: inherit; }
.rf-list a:hover { border-color: var(--rf-brand); }
@media (max-width: 640px) {
  .rf-grid { grid-template-columns: 1fr; }
  .rf-card { padding: 18px 14px; border-radius: 12px; }
  .rf-title { font-size: 22px; }
  .rf-steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .rf-sname { display: none; }
  .rf-steps .rf-on .rf-sname { display: inline; }
  .rf-choices.rf-inline { grid-auto-flow: row; }
  .rf-crow { grid-template-columns: 22px 1fr; }
  .rf-crow input[type=text], .rf-crow input[type=date] { grid-column: 2; }
  .rf-rrow { grid-template-columns: 1fr; gap: 0; }
  .rf-nav { flex-direction: column-reverse; align-items: stretch; }
  .rf-navr { flex-direction: column-reverse; align-items: stretch; }
  .rf-btn { width: 100%; }
}
