/* Registration wizard — /register and /register/setup.
   Colours come from the reseller theme (--wl-primary, set by layouts.app when
   a white-label palette exists) and fall back to the platform blue. */

.rw-page {
    --rw-primary: var(--wl-primary, #0d6efd);
    --rw-primary-rgb: var(--wl-primary-rgb, 13, 110, 253);
    --rw-ink: #0f172a;
    --rw-text: #334155;
    --rw-muted: #64748b;
    --rw-line: #e2e8f0;
    --rw-line-strong: #cbd5e1;
    --rw-bg: #f4f6fb;
    --rw-card: #ffffff;
    --rw-soft: #f8fafc;
    --rw-success: #16a34a;
    --rw-success-bg: #f0fdf4;
    --rw-danger: #dc2626;
    --rw-danger-bg: #fef2f2;
    --rw-warn: #b45309;
    --rw-warn-bg: #fffbeb;
    --rw-radius: 16px;
    --rw-radius-sm: 10px;
    --rw-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 18px 40px -18px rgba(15, 23, 42, .22);

    min-height: 100vh;
    color: var(--rw-text);
    background:
        radial-gradient(1200px 400px at 10% -10%, rgba(var(--rw-primary-rgb), .14), transparent 60%),
        radial-gradient(900px 360px at 100% 0%, rgba(var(--rw-primary-rgb), .08), transparent 60%),
        var(--rw-bg);
}

.rw-page *:focus-visible {
    outline: 3px solid rgba(var(--rw-primary-rgb), .45);
    outline-offset: 2px;
}

/* ---------- Top bar ---------- */
.rw-topbar {
    max-width: 1160px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.rw-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--rw-ink);
    text-decoration: none;
}
.rw-brand:hover { color: var(--rw-ink); }
.rw-brand img { height: 36px; width: auto; max-width: 180px; object-fit: contain; }
.rw-brand-mark {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: inline-grid; place-items: center;
    color: #fff;
    background: var(--rw-primary);
    font-size: .95rem;
}
.rw-topbar-link { color: var(--rw-muted); font-size: .92rem; }
.rw-topbar-link a { color: var(--rw-primary); font-weight: 600; text-decoration: none; }
.rw-topbar-link a:hover { text-decoration: underline; }

/* ---------- Shell ---------- */
.rw-shell {
    max-width: 1160px;
    margin: 0 auto;
    padding: 8px 20px 64px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* ---------- Aside / stepper ---------- */
.rw-aside { position: sticky; top: 20px; display: grid; gap: 16px; }
.rw-panel {
    background: var(--rw-card);
    border: 1px solid var(--rw-line);
    border-radius: var(--rw-radius);
    padding: 22px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.rw-panel-title {
    font-size: .74rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rw-muted);
    font-weight: 700;
    margin: 0 0 14px;
}
.rw-steps { list-style: none; margin: 0; padding: 0; }
.rw-steps li {
    position: relative;
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 12px;
    padding-bottom: 20px;
}
.rw-steps li:last-child { padding-bottom: 0; }
.rw-steps li::before {
    content: "";
    position: absolute;
    left: 15px; top: 34px; bottom: 2px;
    width: 2px;
    background: var(--rw-line);
    border-radius: 2px;
}
.rw-steps li:last-child::before { display: none; }
.rw-steps li.is-done::before { background: rgba(var(--rw-primary-rgb), .5); }
.rw-step-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: .82rem; font-weight: 700;
    color: var(--rw-muted);
    background: var(--rw-card);
    border: 2px solid var(--rw-line-strong);
    transition: all .2s ease;
}
.rw-step-dot .fa-check { display: none; }
.rw-steps li.is-done .rw-step-dot {
    background: rgba(var(--rw-primary-rgb), .12);
    border-color: transparent;
    color: var(--rw-primary);
}
.rw-steps li.is-done .rw-step-dot .rw-step-num { display: none; }
.rw-steps li.is-done .rw-step-dot .fa-check { display: inline; }
.rw-steps li.is-current .rw-step-dot {
    background: var(--rw-primary);
    border-color: var(--rw-primary);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(var(--rw-primary-rgb), .15);
}
.rw-step-label { font-weight: 600; color: var(--rw-ink); font-size: .95rem; line-height: 1.25; margin-top: 5px; }
.rw-step-sub { font-size: .8rem; color: var(--rw-muted); margin-top: 2px; }
.rw-steps li.is-upcoming .rw-step-label { color: var(--rw-muted); font-weight: 500; }
.rw-steps li.is-skipped { opacity: .55; }
.rw-steps li.is-skipped .rw-step-sub::after { content: " · not needed"; }
.rw-steps .rw-step-link {
    all: unset;
    cursor: pointer;
    display: block;
}
.rw-steps .rw-step-link:hover .rw-step-label { color: var(--rw-primary); }
.rw-steps .rw-step-link:focus-visible { outline: 3px solid rgba(var(--rw-primary-rgb), .45); outline-offset: 3px; border-radius: 6px; }
.rw-steps a.rw-step-link .rw-step-sub { color: var(--rw-primary); font-weight: 600; }
.rw-steps li.is-locked .rw-step-link { cursor: help; }
.rw-steps li.is-locked .rw-step-label { color: var(--rw-muted); }

/* ---------- Milestones ---------- */
.rw-ms-count { text-transform: none; letter-spacing: 0; font-size: .78rem; color: var(--rw-primary); }
.rw-ms-intro { font-size: .8rem; color: var(--rw-muted); margin: 0 0 14px; }
.rw-milestones { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rw-milestones li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.rw-ms-dot {
    width: 30px; height: 30px; border-radius: 9px;
    display: grid; place-items: center;
    font-size: .8rem; font-weight: 800;
    background: var(--rw-soft); color: var(--rw-muted); border: 1.5px solid var(--rw-line);
}
.rw-ms-dot i { font-size: .78rem; }
.rw-milestones li:not(.is-todo) .rw-ms-num { display: none; }
.rw-milestones li.is-done .rw-ms-dot { background: var(--rw-success-bg); color: var(--rw-success); border-color: #bbf7d0; }
.rw-milestones li.is-progress .rw-ms-dot { background: var(--rw-warn-bg); color: var(--rw-warn); border-color: #fde68a; }
.rw-milestones li.is-locked { opacity: .75; }
.rw-milestones strong { display: block; color: var(--rw-ink); font-size: .9rem; line-height: 1.3; }
.rw-ms-text { display: block; font-size: .79rem; color: var(--rw-muted); line-height: 1.4; margin-top: 2px; }
.rw-ms-status { display: inline-block; margin-top: 5px; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--rw-soft); color: var(--rw-muted); }
.rw-milestones li.is-done .rw-ms-status { background: var(--rw-success-bg); color: #166534; }
.rw-milestones li.is-progress .rw-ms-status { background: var(--rw-warn-bg); color: var(--rw-warn); }
.rw-ms-cta { all: unset; cursor: pointer; display: flex; width: fit-content; align-items: center; gap: 5px; margin-top: 6px; font-size: .78rem; font-weight: 700; color: var(--rw-primary); }
.rw-ms-cta:hover { text-decoration: underline; color: var(--rw-primary); }
.rw-ms-cta i { font-size: .68rem; }

.rw-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rw-perks li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; font-size: .88rem; }
.rw-perks i {
    width: 30px; height: 30px; border-radius: 8px;
    display: grid; place-items: center;
    background: rgba(var(--rw-primary-rgb), .1);
    color: var(--rw-primary);
    font-size: .85rem;
}
.rw-perks strong { display: block; color: var(--rw-ink); font-weight: 600; }
.rw-perks span { color: var(--rw-muted); }

.rw-help { font-size: .86rem; color: var(--rw-muted); }
.rw-help a { color: var(--rw-primary); text-decoration: none; font-weight: 600; word-break: break-all; }
.rw-secure-note { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--rw-muted); padding: 0 6px; }
.rw-secure-note i { color: var(--rw-success); margin-top: 2px; }

/* ---------- Mobile progress ---------- */
.rw-mprogress { display: none; margin-bottom: 14px; }
.rw-mprogress-top { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 8px; }
.rw-mprogress-top strong { color: var(--rw-ink); }
.rw-mprogress-bar { height: 6px; border-radius: 6px; background: var(--rw-line); overflow: hidden; }
.rw-mprogress-bar span { display: block; height: 100%; background: var(--rw-primary); border-radius: 6px; transition: width .3s ease; }

/* ---------- Card ---------- */
.rw-card {
    background: var(--rw-card);
    border: 1px solid var(--rw-line);
    border-radius: var(--rw-radius);
    box-shadow: var(--rw-shadow);
}
.rw-card-head {
    padding: 28px 32px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.rw-eyebrow {
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rw-primary);
    margin-bottom: 6px;
}
.rw-title { font-size: 1.55rem; font-weight: 700; color: var(--rw-ink); margin: 0 0 6px; line-height: 1.25; }
.rw-lead { color: var(--rw-muted); margin: 0; font-size: .98rem; max-width: 640px; }
.rw-card-body { padding: 24px 32px 28px; }
.rw-card-foot {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 16px 32px;
    border-top: 1px solid var(--rw-line);
    background: rgba(250, 251, 253, .96);
    backdrop-filter: blur(6px);
    border-radius: 0 0 var(--rw-radius) var(--rw-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.rw-foot-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-left: auto; }

.rw-section { display: none; }
.rw-section.is-active { display: block; animation: rwIn .28s ease; }
@keyframes rwIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .rw-section.is-active { animation: none; }
    .rw-page * { transition: none !important; }
}

/* ---------- Buttons ---------- */
.rw-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 11px;
    font-weight: 600;
    font-size: .97rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, box-shadow .15s ease, transform .1s ease, border-color .15s ease;
    white-space: nowrap;
}
.rw-btn:active { transform: translateY(1px); }
.rw-btn-primary { background: var(--rw-primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(var(--rw-primary-rgb), .65); }
.rw-btn-primary:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 8px 20px -6px rgba(var(--rw-primary-rgb), .75); }
.rw-btn-ghost { background: transparent; color: var(--rw-text); border-color: var(--rw-line-strong); }
.rw-btn-ghost:hover { background: var(--rw-soft); color: var(--rw-ink); }
.rw-btn-link { background: none; border: 0; color: var(--rw-muted); padding: 0 6px; min-height: 40px; font-weight: 600; }
.rw-btn-link:hover { color: var(--rw-primary); }
.rw-btn[disabled], .rw-btn.is-busy { opacity: .7; pointer-events: none; }
.rw-btn .rw-spin { display: none; }
.rw-btn.is-busy .rw-spin { display: inline-block; }
.rw-btn.is-busy .rw-btn-icon { display: none; }
.rw-btn-block { width: 100%; }

/* ---------- Autosave status ---------- */
.rw-save {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .8rem; color: var(--rw-muted);
    padding: 6px 10px; border-radius: 999px;
    background: var(--rw-soft); border: 1px solid var(--rw-line);
    white-space: nowrap;
}
.rw-save[data-state="saved"] i { color: var(--rw-success); }
.rw-save[data-state="error"] { color: var(--rw-warn); background: var(--rw-warn-bg); border-color: #fde68a; }
.rw-save[data-state="idle"] { visibility: hidden; }

/* ---------- Fields ---------- */
.rw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.rw-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 20px; }
.rw-span-2 { grid-column: span 2; }
.rw-field { min-width: 0; }
.rw-field > label, .rw-label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    color: var(--rw-ink);
    margin-bottom: 6px;
}
.rw-optional { font-weight: 500; color: var(--rw-muted); font-size: .82rem; margin-left: 4px; }
.rw-req { color: var(--rw-danger); margin-left: 2px; }
.rw-page .form-control,
.rw-page .form-select {
    min-height: 46px;
    border-radius: var(--rw-radius-sm);
    border: 1.5px solid #d6dde8;
    padding: 10px 14px;
    font-size: .97rem;
    color: var(--rw-ink);
    background-color: #fff;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.rw-page textarea.form-control { min-height: 96px; }
.rw-page .form-control::placeholder { color: #9aa6b8; }
.rw-page .form-control:hover, .rw-page .form-select:hover { border-color: #b8c3d4; }
.rw-page .form-control:focus,
.rw-page .form-select:focus {
    border-color: var(--rw-primary);
    box-shadow: 0 0 0 4px rgba(var(--rw-primary-rgb), .14);
}
.rw-page .form-control.is-invalid,
.rw-page .form-select.is-invalid { border-color: var(--rw-danger); background-image: none; padding-right: 14px; }
.rw-page .form-control.is-invalid:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }
.rw-page .form-control.is-warn { border-color: #f59e0b; }
.rw-hint { display: block; font-size: .82rem; color: var(--rw-muted); margin-top: 6px; }
.rw-error {
    display: none;
    font-size: .83rem;
    color: var(--rw-danger);
    margin-top: 6px;
    font-weight: 500;
}
.rw-error.is-visible { display: flex; gap: 6px; align-items: flex-start; }
.rw-error.is-visible::before { content: "\f06a"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-top: 1px; }
.rw-warn-text { color: var(--rw-warn); }
.rw-warn-text.is-visible::before { content: "\f071"; }
.rw-counter { float: right; font-size: .78rem; color: var(--rw-muted); font-weight: 500; }

.rw-input-icon { position: relative; }
.rw-input-icon .form-control { padding-right: 48px; }
.rw-input-icon .rw-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; border-radius: 8px;
    background: transparent; color: var(--rw-muted);
}
.rw-input-icon .rw-eye:hover { background: var(--rw-soft); color: var(--rw-ink); }

/* Mobile number: country select + number read as one field. */
.rw-phone { display: flex; }
.rw-phone .form-select {
    flex: 0 0 9.5rem; width: 9.5rem; min-width: 0;
    border-top-right-radius: 0; border-bottom-right-radius: 0;
    border-right-width: 0;
    text-overflow: ellipsis;
    padding-right: 2rem;
    background-position: right .6rem center;
}
.rw-phone .form-control { flex: 1 1 auto; min-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.rw-phone .form-select:focus, .rw-phone .form-control:focus { position: relative; z-index: 2; }

/* Password strength */
.rw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.rw-meter span { height: 5px; border-radius: 5px; background: var(--rw-line); transition: background .2s ease; }
.rw-meter[data-score="1"] span:nth-child(-n+1) { background: #ef4444; }
.rw-meter[data-score="2"] span:nth-child(-n+2) { background: #f59e0b; }
.rw-meter[data-score="3"] span:nth-child(-n+3) { background: #84cc16; }
.rw-meter[data-score="4"] span { background: var(--rw-success); }
.rw-rules { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--rw-muted); }
.rw-rules li::before { content: "\f111"; font-family: "Font Awesome 6 Free"; font-weight: 400; margin-right: 5px; font-size: .7rem; }
.rw-rules li.is-met { color: var(--rw-success); }
.rw-rules li.is-met::before { content: "\f058"; font-weight: 900; }

/* Captcha */
.rw-captcha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rw-captcha-img {
    height: 50px; min-width: 160px;
    border: 1.5px solid var(--rw-line);
    border-radius: var(--rw-radius-sm);
    background: var(--rw-soft);
    display: grid; place-items: center;
    padding: 2px 6px;
}
.rw-captcha-img img { height: 44px; display: block; }
.rw-captcha .form-control { max-width: 220px; letter-spacing: .15em; font-weight: 600; }
.rw-icon-btn {
    width: 46px; height: 46px; border-radius: var(--rw-radius-sm);
    border: 1.5px solid var(--rw-line-strong); background: #fff; color: var(--rw-muted);
}
.rw-icon-btn:hover { color: var(--rw-primary); border-color: var(--rw-primary); }

.rw-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.rw-check input[type="checkbox"] { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--rw-primary); }
.rw-check a { color: var(--rw-primary); font-weight: 600; }

/* Honeypot — kept out of view and out of the tab order. */
.rw-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Choice cards ---------- */
.rw-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.rw-choices-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rw-choice {
    position: relative;
    display: flex; gap: 14px; align-items: flex-start;
    padding: 18px 18px 18px 16px;
    border: 1.5px solid var(--rw-line-strong);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    margin: 0;
}
.rw-choice:hover { border-color: rgba(var(--rw-primary-rgb), .55); }
.rw-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rw-choice.is-checked {
    border-color: var(--rw-primary);
    background: rgba(var(--rw-primary-rgb), .04);
    box-shadow: 0 0 0 4px rgba(var(--rw-primary-rgb), .12);
}
.rw-choice:focus-within { box-shadow: 0 0 0 4px rgba(var(--rw-primary-rgb), .22); }
.rw-choice-icon {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center;
    background: rgba(var(--rw-primary-rgb), .1);
    color: var(--rw-primary);
    font-size: 1.1rem;
}
.rw-choice-icon.is-muted { background: #f1f5f9; color: var(--rw-muted); }
.rw-choice-icon.is-wa { background: #dcfce7; color: #16a34a; }
.rw-choice-body { flex: 1; min-width: 0; padding-right: 22px; }
.rw-choice-title { display: block; font-weight: 700; color: var(--rw-ink); font-size: .98rem; }
.rw-choice-text { display: block; font-size: .85rem; color: var(--rw-muted); margin-top: 3px; line-height: 1.45; }
.rw-choice-badge {
    display: inline-block; margin-top: 8px;
    font-size: .74rem; font-weight: 700;
    padding: 3px 9px; border-radius: 999px;
    background: #eef2ff; color: #4338ca;
}
.rw-choice-badge.is-green { background: var(--rw-success-bg); color: var(--rw-success); }
.rw-choice-tick {
    position: absolute; top: 14px; right: 14px;
    width: 20px; height: 20px; border-radius: 50%;
    border: 1.5px solid var(--rw-line-strong);
    display: grid; place-items: center;
    font-size: .62rem; color: transparent;
    transition: all .15s ease;
}
.rw-choice.is-checked .rw-choice-tick { background: var(--rw-primary); border-color: var(--rw-primary); color: #fff; }

/* Compact choice (pills) */
.rw-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-pill {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    border: 1.5px solid var(--rw-line-strong);
    border-radius: 999px;
    cursor: pointer; font-size: .9rem; font-weight: 500;
    margin: 0;
    background: #fff;
}
.rw-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rw-pill.is-checked { border-color: var(--rw-primary); background: rgba(var(--rw-primary-rgb), .07); color: var(--rw-ink); font-weight: 600; }
.rw-pill.is-checked::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--rw-primary); font-size: .78rem; }
.rw-pill:focus-within { box-shadow: 0 0 0 4px rgba(var(--rw-primary-rgb), .2); }

/* Option list (radio rows with a hint) */
.rw-options { display: grid; gap: 10px; }
.rw-option {
    position: relative;
    display: grid; grid-template-columns: 22px 1fr; gap: 12px;
    padding: 13px 16px;
    border: 1.5px solid var(--rw-line-strong);
    border-radius: 12px;
    cursor: pointer; margin: 0;
}
.rw-option input { position: absolute; opacity: 0; pointer-events: none; }
.rw-option-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--rw-line-strong); margin-top: 1px; }
.rw-option.is-checked { border-color: var(--rw-primary); background: rgba(var(--rw-primary-rgb), .04); }
.rw-option.is-checked .rw-option-dot { border: 6px solid var(--rw-primary); }
.rw-option strong { display: block; color: var(--rw-ink); font-size: .93rem; }
.rw-option span { display: block; font-size: .83rem; color: var(--rw-muted); margin-top: 2px; }
.rw-option:focus-within { box-shadow: 0 0 0 4px rgba(var(--rw-primary-rgb), .2); }

/* ---------- Callouts ---------- */
.rw-callout {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(var(--rw-primary-rgb), .06);
    border: 1px solid rgba(var(--rw-primary-rgb), .18);
    font-size: .9rem;
}
.rw-callout > i { color: var(--rw-primary); font-size: 1.1rem; margin-top: 2px; }
.rw-callout strong { color: var(--rw-ink); }
.rw-callout p { margin: 0; }
.rw-callout p + p { margin-top: 6px; }
.rw-callout.is-success { background: var(--rw-success-bg); border-color: #bbf7d0; }
.rw-callout.is-success > i { color: var(--rw-success); }
.rw-callout.is-warn { background: var(--rw-warn-bg); border-color: #fde68a; }
.rw-callout.is-warn > i { color: var(--rw-warn); }
.rw-callout.is-danger { background: var(--rw-danger-bg); border-color: #fecaca; }
.rw-callout.is-danger > i { color: var(--rw-danger); }
.rw-callout code { background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 6px; color: var(--rw-ink); font-size: .88em; }

.rw-divider { border: 0; border-top: 1px solid var(--rw-line); margin: 26px 0; opacity: 1; }
.rw-subhead { font-size: 1.02rem; font-weight: 700; color: var(--rw-ink); margin: 0 0 4px; }
.rw-subhead-note { font-size: .86rem; color: var(--rw-muted); margin: 0 0 16px; }
.rw-stack > * + * { margin-top: 22px; }
[data-show-if][hidden], [data-for][hidden] { display: none !important; }

/* ---------- OTP ---------- */
.rw-otp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rw-otp-card {
    border: 1.5px solid var(--rw-line);
    border-radius: 14px;
    padding: 18px;
    background: var(--rw-soft);
}
.rw-otp-card.is-confirmed { background: var(--rw-success-bg); border-color: #bbf7d0; }
.rw-otp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.rw-otp-head i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--rw-primary); border: 1px solid var(--rw-line); }
.rw-otp-head strong { color: var(--rw-ink); }
.rw-otp-dest { font-size: .85rem; color: var(--rw-muted); margin-bottom: 12px; word-break: break-all; }
.rw-otp { display: flex; gap: 6px; }
.rw-otp input {
    width: 100%; min-width: 0;
    height: 54px;
    text-align: center;
    font-size: 1.45rem; font-weight: 700;
    color: var(--rw-ink);
    border: 1.5px solid #d6dde8;
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.rw-otp input:focus { outline: none; border-color: var(--rw-primary); box-shadow: 0 0 0 4px rgba(var(--rw-primary-rgb), .14); }
.rw-otp.is-invalid input { border-color: var(--rw-danger); }
.rw-otp-done { display: none; align-items: center; gap: 8px; color: var(--rw-success); font-weight: 600; min-height: 54px; }
.rw-otp-card.is-confirmed .rw-otp { display: none; }
.rw-otp-card.is-confirmed .rw-otp-done { display: flex; }
.rw-otp-card.is-confirmed .rw-resend { display: none; }
.rw-resend { margin-top: 10px; font-size: .85rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.rw-resend button { border: 0; background: none; padding: 0; color: var(--rw-primary); font-weight: 600; }
.rw-resend button[disabled] { color: var(--rw-muted); cursor: default; font-weight: 500; }
.rw-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .74rem; font-weight: 700;
    padding: 3px 8px; border-radius: 999px;
    background: #fff; border: 1px solid var(--rw-line);
    color: var(--rw-muted);
}
.rw-chip.is-wa { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.rw-chip.is-sms { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }

/* ---------- Sender ID chips input ---------- */
.rw-tags {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    min-height: 46px;
    padding: 6px 8px;
    border: 1.5px solid #d6dde8;
    border-radius: var(--rw-radius-sm);
    background: #fff;
    cursor: text;
}
.rw-tags:focus-within { border-color: var(--rw-primary); box-shadow: 0 0 0 4px rgba(var(--rw-primary-rgb), .14); }
.rw-tags.is-invalid { border-color: var(--rw-danger); }
.rw-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 6px 4px 10px;
    border-radius: 8px;
    background: rgba(var(--rw-primary-rgb), .1);
    color: var(--rw-ink);
    font-weight: 700; font-size: .85rem; letter-spacing: .04em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.rw-tag.is-bad { background: var(--rw-danger-bg); color: var(--rw-danger); }
.rw-tag button { border: 0; background: none; color: inherit; opacity: .6; padding: 0 2px; line-height: 1; }
.rw-tag button:hover { opacity: 1; }
.rw-tags input { flex: 1; min-width: 120px; border: 0; outline: none; padding: 6px 4px; font-size: .95rem; text-transform: uppercase; background: transparent; }
.rw-tags input::placeholder { text-transform: none; }

/* ---------- Documents ---------- */
.rw-rules-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rw-rule {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px; border-radius: 12px;
    background: var(--rw-soft); border: 1px solid var(--rw-line);
    font-size: .8rem; color: var(--rw-muted);
}
.rw-rule i { color: var(--rw-primary); margin-top: 2px; }
.rw-rule strong { display: block; color: var(--rw-ink); font-size: .84rem; }
.rw-docs { display: grid; gap: 12px; }
.rw-doc {
    display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px;
    padding: 16px;
    border: 1.5px solid var(--rw-line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .15s ease;
}
.rw-doc.has-files { border-color: #bbf7d0; }
.rw-doc.is-missing { border-color: #fecaca; }
.rw-doc-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center;
    background: rgba(var(--rw-primary-rgb), .1); color: var(--rw-primary);
}
.rw-doc.has-files .rw-doc-icon { background: var(--rw-success-bg); color: var(--rw-success); }
.rw-doc-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rw-doc-head h3 { font-size: .98rem; font-weight: 700; color: var(--rw-ink); margin: 0; }
.rw-badge { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.rw-badge-req { background: #fef2f2; color: #b91c1c; }
.rw-badge-opt { background: #f1f5f9; color: var(--rw-muted); }
.rw-badge-ok { background: var(--rw-success-bg); color: var(--rw-success); }
.rw-doc-who { font-size: .8rem; color: var(--rw-muted); margin-top: 2px; }
.rw-doc-detail { font-size: .86rem; color: var(--rw-text); margin: 6px 0 10px; }
.rw-drop {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px;
    border: 1.5px dashed var(--rw-line-strong);
    border-radius: 12px;
    background: var(--rw-soft);
    color: var(--rw-muted);
    font-size: .88rem;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
}
.rw-drop:hover, .rw-drop.is-drag { border-color: var(--rw-primary); background: rgba(var(--rw-primary-rgb), .05); color: var(--rw-ink); }
.rw-drop strong { color: var(--rw-primary); }
.rw-drop input { display: none; }
.rw-files { display: grid; gap: 8px; margin-top: 10px; }
.rw-files:empty { display: none; }
.rw-file {
    display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--rw-soft);
    border: 1px solid var(--rw-line);
    font-size: .86rem;
}
.rw-file > i { color: var(--rw-muted); text-align: center; font-size: 1.05rem; }
.rw-file > div { min-width: 0; }
.rw-file-name { color: var(--rw-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-file-meta { color: var(--rw-muted); font-size: .78rem; }
.rw-file-meta .is-rejected { color: var(--rw-danger); font-weight: 600; }
.rw-file-meta .is-accepted { color: var(--rw-success); font-weight: 600; }
.rw-file-actions { display: flex; gap: 2px; }
.rw-file-actions a, .rw-file-actions button {
    width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent;
    color: var(--rw-muted); display: grid; place-items: center;
}
.rw-file-actions a:hover, .rw-file-actions button:hover { background: #fff; color: var(--rw-ink); }
.rw-file-actions button.is-danger:hover { color: var(--rw-danger); }
.rw-progress { height: 4px; border-radius: 4px; background: var(--rw-line); overflow: hidden; margin-top: 5px; }
.rw-progress span { display: block; height: 100%; width: 0; background: var(--rw-primary); transition: width .15s linear; }
.rw-doc-error { font-size: .82rem; color: var(--rw-danger); margin-top: 8px; display: none; }
.rw-doc-error.is-visible { display: block; }

.rw-links { display: flex; flex-wrap: wrap; gap: 10px; }
.rw-link-card {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--rw-line-strong);
    color: var(--rw-ink); font-weight: 600; font-size: .88rem;
    text-decoration: none; background: #fff;
}
.rw-link-card:hover { border-color: var(--rw-primary); color: var(--rw-primary); }
.rw-link-card i { color: var(--rw-primary); }

/* ---------- Review summary ---------- */
.rw-summary { display: grid; gap: 14px; }
.rw-sum {
    border: 1.5px solid var(--rw-line);
    border-radius: 14px;
    overflow: hidden;
}
.rw-sum-head {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 12px 18px;
    background: var(--rw-soft);
    border-bottom: 1px solid var(--rw-line);
}
.rw-sum-head h3 { font-size: .98rem; font-weight: 700; margin: 0; color: var(--rw-ink); display: flex; gap: 10px; align-items: center; }
.rw-sum-head h3 i { color: var(--rw-primary); }
.rw-sum-edit { border: 0; background: none; color: var(--rw-primary); font-weight: 600; font-size: .86rem; }
.rw-sum dl { display: grid; grid-template-columns: minmax(140px, 34%) 1fr; margin: 0; padding: 6px 18px 12px; }
.rw-sum dt, .rw-sum dd { padding: 8px 0; border-bottom: 1px dashed var(--rw-line); margin: 0; font-size: .9rem; }
.rw-sum dt { color: var(--rw-muted); font-weight: 500; padding-right: 12px; }
.rw-sum dd { color: var(--rw-ink); font-weight: 600; word-break: break-word; }
.rw-sum dl > :nth-last-child(-n+2) { border-bottom: 0; }
.rw-sum-empty { padding: 14px 18px; color: var(--rw-muted); font-size: .9rem; margin: 0; }
.rw-sum .rw-missing { color: var(--rw-danger); }
.rw-issues { margin: 0; padding-left: 18px; }
.rw-issues li + li { margin-top: 4px; }
.rw-issues button { border: 0; background: none; padding: 0; color: inherit; text-decoration: underline; font-weight: 600; }
.rw-skeleton { height: 140px; border-radius: 14px; background: linear-gradient(90deg, #f1f5f9, #f8fafc, #f1f5f9); background-size: 200% 100%; animation: rwShimmer 1.2s infinite; }
@keyframes rwShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Done ---------- */
.rw-done-hero { text-align: center; padding: 8px 0 6px; }
.rw-done-icon {
    width: 76px; height: 76px; margin: 0 auto 16px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--rw-success-bg); color: var(--rw-success);
    font-size: 2rem;
    box-shadow: 0 0 0 10px rgba(22, 163, 74, .07);
}
.rw-done-hero h2 { font-size: 1.6rem; font-weight: 700; color: var(--rw-ink); margin: 0 0 6px; }
.rw-done-hero p { color: var(--rw-muted); margin: 0 auto; max-width: 560px; overflow-wrap: anywhere; }
.rw-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 26px; }
.rw-tile {
    border: 1.5px solid var(--rw-line); border-radius: 14px; padding: 18px;
    background: #fff;
}
.rw-tile-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rw-muted); font-weight: 700; }
.rw-tile-value { font-size: 1.6rem; font-weight: 800; color: var(--rw-ink); margin-top: 4px; line-height: 1.1; }
.rw-tile-note { font-size: .84rem; color: var(--rw-muted); margin-top: 6px; }
.rw-tile-note strong { white-space: nowrap; }
.rw-tile code { font-size: .82rem; color: var(--rw-ink); background: var(--rw-soft); border: 1px solid var(--rw-line); padding: 6px 8px; border-radius: 8px; display: block; margin-top: 8px; white-space: normal; }
.rw-timeline { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 0; }
.rw-timeline li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.rw-timeline li::before { content: ""; position: absolute; left: 16px; top: 32px; bottom: 0; width: 2px; background: var(--rw-line); }
.rw-timeline li:last-child::before { display: none; }
.rw-timeline i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--rw-primary-rgb), .1); color: var(--rw-primary); font-size: .85rem; }
.rw-timeline strong { color: var(--rw-ink); display: block; margin-top: 6px; }
.rw-timeline span { color: var(--rw-muted); font-size: .88rem; }
.rw-done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Toast ---------- */
.rw-toast {
    /* Top of the screen: the sticky step footer owns the bottom. */
    position: fixed; left: 50%; top: 18px; transform: translate(-50%, -20px);
    z-index: 2000;
    max-width: min(92vw, 520px);
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--rw-ink); color: #fff;
    font-size: .92rem;
    box-shadow: 0 16px 32px -12px rgba(15, 23, 42, .5);
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.rw-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.rw-toast.is-error { background: #991b1b; }
.rw-toast.is-success { background: #166534; }

.rw-alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 16px; border-radius: 12px;
    font-size: .9rem; margin-bottom: 16px;
}
.rw-alert.is-error { background: var(--rw-danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.rw-alert.is-success { background: var(--rw-success-bg); color: #166534; border: 1px solid #bbf7d0; }
.rw-alert.is-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.rw-alert[hidden] { display: none; }

.rw-footer { text-align: center; font-size: .82rem; color: var(--rw-muted); padding: 0 20px 28px; }
.rw-footer a { color: var(--rw-muted); margin: 0 8px; }

/* ---------- WhatsApp requirements checklist ---------- */
.rw-checklist {
    border: 1.5px solid #bbf7d0;
    border-radius: 14px;
    background: linear-gradient(180deg, #f0fdf4, #ffffff 70%);
    padding: 18px 20px;
}
.rw-checklist-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.rw-checklist-head > div { flex: 1; min-width: 0; }
.rw-checklist-head strong { display: block; color: var(--rw-ink); }
.rw-checklist-head span { font-size: .85rem; color: var(--rw-muted); }
.rw-checklist-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #dcfce7; color: #15803d; font-size: 1.15rem; flex: none; }
.rw-checklist-head .rw-checklist-count {
    flex: none; font-size: .78rem; font-weight: 700; color: #15803d;
    background: #fff; border: 1px solid #bbf7d0; border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.rw-checklist-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; }
.rw-checklist-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--rw-muted); margin: 6px 0 4px; }
.rw-checklist ul { list-style: none; margin: 0; padding: 0; }
.rw-checklist li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 6px 0; align-items: start; }
.rw-checklist li > i { margin-top: 3px; font-size: .95rem; }
.rw-checklist li strong { display: block; font-size: .88rem; font-weight: 600; color: var(--rw-ink); line-height: 1.35; }
.rw-checklist li div > span { display: block; font-size: .78rem; color: var(--rw-muted); line-height: 1.4; }
.rw-checklist .rw-check-on { display: none; color: var(--rw-success); }
.rw-checklist .rw-check-off { color: var(--rw-line-strong); }
.rw-checklist li.is-done .rw-check-on { display: inline-block; }
.rw-checklist li.is-done .rw-check-off { display: none; }
.rw-checklist li.is-done strong { color: #166534; }
.rw-checklist-foot { margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed #bbf7d0; font-size: .82rem; color: var(--rw-muted); }
.rw-checklist-foot i { color: #1877f2; margin-right: 4px; }
[data-late-hide][hidden], [data-dlt-gst-note][hidden] { display: none !important; }
/* WhatsApp business proofs: "any one of" — two per row where there is room. */
@media (min-width: 768px) {
    .rw-docs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .rw-docs-grid > .rw-doc { margin: 0; }
}
.rw-select-narrow { max-width: 360px; }

/* ---------- Pending documents (done page) ---------- */
.rw-pending { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.rw-pending li { display: flex; gap: 8px; align-items: baseline; font-size: .9rem; }
.rw-pending li i { color: var(--rw-warn); width: 16px; text-align: center; }
.rw-pending em { color: var(--rw-danger); font-style: normal; }

/* ---------- Continue-your-setup page ---------- */
.rw-narrow { max-width: 560px; margin: 24px auto 48px; padding: 0 16px; }
.rw-narrow .rw-title { text-align: center; }
.rw-done-icon.is-muted { background: var(--rw-soft); color: var(--rw-muted); box-shadow: 0 0 0 10px rgba(100, 116, 139, .07); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .rw-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
    /* Progress, milestones and help move below the form. */
    .rw-aside { position: static; order: 2; margin-top: 20px; }
    .rw-secure-note { display: none; }
    .rw-mprogress { display: block; }
    /* The progress bar above already says "Step n of 6". */
    .rw-eyebrow { display: none; }
    .rw-card-foot > .rw-hint { display: none; }
    /* Keep the floating support button clear of the sticky step buttons. */
    .ticket-widget-btn { bottom: 96px !important; }
}
@media (max-width: 767.98px) {
    .rw-grid, .rw-grid-3, .rw-otp-grid { grid-template-columns: minmax(0, 1fr); }
    .rw-span-2 { grid-column: auto; }
    .rw-rules-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rw-card-head, .rw-card-body { padding-left: 20px; padding-right: 20px; }
    .rw-card-head { padding-top: 22px; flex-direction: column-reverse; gap: 8px; }
    .rw-save[data-state="idle"] { display: none; }
    .rw-card-foot { padding: 12px 16px; }
    .rw-title { font-size: 1.3rem; }
    .rw-sum dl { grid-template-columns: minmax(0, 1fr); }
    .rw-checklist-groups { grid-template-columns: minmax(0, 1fr); }
    .rw-checklist { padding: 16px; }
    .rw-sum dt { border-bottom: 0; padding-bottom: 0; }
    .rw-topbar-link span { display: none; }
}
@media (max-width: 479.98px) {
    .rw-shell { padding-left: 12px; padding-right: 12px; }
    .rw-topbar { padding: 14px 16px; }
    .rw-otp { gap: 4px; }
    .rw-otp input { height: 48px; font-size: 1.25rem; }
    .rw-phone .form-select { flex-basis: 7.6rem; width: 7.6rem; }
    .rw-foot-actions { width: 100%; }
    .rw-foot-actions .rw-btn-primary { flex: 1; }
    .rw-foot-actions [data-later] { padding: 0 4px; }
    .rw-foot-actions [data-later] i { display: none; }
    .rw-checklist-head { flex-wrap: wrap; }
    .rw-rules-strip { grid-template-columns: minmax(0, 1fr); }
}
