/* Single-brand pro portal UI shell.
   Brand color tokens are applied at runtime from this site's brand.json.
   Background is always pure white #FFFFFF. */

:root {
  --bg: #FFFFFF;
  --ink: #0F172A;
  --muted: #475569;
  --faint: #64748B;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --soft: #F8FAFC;
  --soft-2: #F1F5F9;
  --ok: #057A55;
  --ok-soft: #D1FAE5;
  --ok-ink: #065F46;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --warn-ink: #92400E;
  --danger: #B42318;
  --danger-soft: #FEE4E2;
  --danger-ink: #912018;
  --accent: #0F172A;
  --accent-soft: #F1F5F9;
  --accent-ink: #0F172A;
  --secondary: #64748B;
  --card-from: #0F172A;
  --card-to: #020617;
  --card-text: #FFFFFF;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 12px 40px rgba(15, 23, 42, 0.18);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "ui-monospace", Menlo, monospace;
  --tap: 48px;
  --header-h: 64px;
  --tabbar-h: calc(64px + env(safe-area-inset-bottom, 0px));
  --max: 780px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  padding-bottom: var(--tabbar-h);
}

img, svg { max-width: 100%; display: block; }

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

button { cursor: pointer; }

a { color: var(--accent-ink); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #FFFFFF;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 80;
}
.skip:focus { top: 12px; }

/* ——— Header ——— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
  padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.04em;
  flex: none;
  font-size: 13px;
}

.brand-name {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ——— Layout ——— */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--line);
}

.pill.ok { background: var(--ok-soft); color: var(--ok-ink); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.pill.pending { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill.danger { background: var(--danger-soft); color: var(--danger-ink); border-color: transparent; }
.pill.locked { background: var(--soft-2); color: var(--faint); }

.page-head h1 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.04em;
  line-height: 1.15;
  font-weight: 800;
}

.lede {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  max-width: 58ch;
}

/* ——— Progress ——— */
.progress-wrap {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 14px;
}

.progress-meta span { color: var(--muted); font-weight: 600; font-size: 13px; }

.progress-bar {
  height: 10px;
  background: var(--soft-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.35s ease;
}

/* ——— Cards & steps ——— */
.card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-bottom: 14px;
}

.step {
  padding: 0;
  overflow: hidden;
}

.step-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 12px 16px;
  border: 0;
  background: #FFFFFF;
  text-align: left;
}

.step-index {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  background: var(--soft-2);
  color: var(--muted);
  flex: none;
  border: 2px solid var(--line);
}

.step.is-complete .step-index {
  background: var(--ok);
  color: #FFFFFF;
  border-color: var(--ok);
}

.step.is-pending .step-index {
  background: var(--warn-soft);
  color: var(--warn-ink);
  border-color: #F59E0B;
}

.step.is-open .step-index {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.step-titles { min-width: 0; flex: 1; }
.step-titles strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.step-titles small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.step-body {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

.step.is-open .step-body { display: block; }

.note, .legal {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0;
}

.legal { background: var(--accent-soft); color: var(--ink); border-color: transparent; }

.field { margin: 12px 0 0; }
.field label,
.field .label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

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

input[type="text"],
input[type="email"],
input[type="date"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #FFFFFF;
  padding: 0 14px;
  font-size: 16px; /* prevents iOS zoom */
}

textarea { padding: 12px 14px; min-height: 88px; resize: vertical; }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .row-2.stack-mobile { grid-template-columns: 1fr; }
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink);
}

.check input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--accent);
}

/* ——— Uploads ——— */
.uploads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.uploads-3 {
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .uploads-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.upload {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--soft);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 14px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload.has-file {
  border-style: solid;
  border-color: var(--accent);
  background: #FFFFFF;
  color: var(--ink);
}

.upload img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
}

.upload .fname {
  font-size: 11px;
  word-break: break-all;
  color: var(--muted);
}

/* ——— Buttons ——— */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  font-weight: 750;
  letter-spacing: -0.01em;
  font-size: 15px;
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-secondary {
  background: #FFFFFF;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: transparent;
}

.btn-ok { background: var(--ok); color: #FFFFFF; border-color: var(--ok); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.btn.full { width: 100%; }

/* ——— Payouts ——— */
.subtabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--soft);
  padding: 6px;
  border-radius: 16px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
}

.subtabs button {
  min-height: var(--tap);
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-weight: 750;
  color: var(--muted);
}

.subtabs button[aria-selected="true"] {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.balances {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.balance {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.balance .k {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}

.balance .v {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.balance.held .v { color: var(--warn-ink); }
.balance.avail .v { color: var(--ok-ink); }

.ledger { list-style: none; margin: 0; padding: 0; }

.ledger li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ledger li:last-child { border-bottom: 0; }

.ledger .title { font-weight: 700; letter-spacing: -0.02em; }
.ledger .meta { color: var(--muted); font-size: 13px; }
.ledger .amt {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ——— Debit card ——— */
.debit-wrap { perspective: 900px; margin: 8px 0 18px; }

.debit-card {
  position: relative;
  aspect-ratio: 1.586 / 1;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--card-from) 0%, var(--card-to) 100%);
  color: var(--card-text);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  isolation: isolate;
}

.debit-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 70%;
  height: 90%;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 65%);
  transform: rotate(18deg);
  pointer-events: none;
}

.debit-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 18px solid rgba(255,255,255,0.08);
  pointer-events: none;
}

.card-top, .card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 16px;
}

.card-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.chip-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
}

.chip {
  width: 42px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(180deg, #E8E4D8, #C2B89A 45%, #D9D1BE);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}

.contactless {
  width: 22px;
  height: 22px;
  opacity: 0.85;
}

.pan {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: clamp(16px, 4.6vw, 20px);
  letter-spacing: 0.14em;
  font-weight: 500;
  margin-bottom: 16px;
}

.card-bottom { align-items: flex-end; }

.card-holder .lbl,
.card-exp .lbl {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 700;
}

.card-holder .val,
.card-exp .val {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.issuing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 750;
  font-size: 12px;
  margin-bottom: 12px;
}

.benefits { list-style: none; margin: 0 0 16px; padding: 0; }
.benefits li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink);
}
.benefits li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 800;
  flex: none;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.toggle-row strong { display: block; font-size: 14px; }
.toggle-row span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }

.switch {
  position: relative;
  width: 52px;
  height: 32px;
  flex: none;
}
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i {
  position: absolute;
  inset: 0;
  background: var(--line-strong);
  border-radius: 999px;
  transition: 0.2s;
}
.switch i::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  left: 3px;
  top: 3px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15,23,42,0.25);
  transition: 0.2s;
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ——— Job / trust card ——— */
.trust-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  overflow: hidden;
  position: relative;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pro-name { font-weight: 800; font-size: 18px; letter-spacing: -0.03em; margin: 0; }
.pro-trade { color: var(--muted); font-size: 13px; font-weight: 600; margin: 0 0 8px; }

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.job-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.job-meta .k { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.job-meta .v { font-weight: 750; }

.vehicle-card {
  grid-column: 1 / -1;
  background: #FFFFFF;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  padding: 14px;
  margin-top: 4px;
}
.vehicle-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.vehicle-card .k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 8px;
}
.vehicle-card .v {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.3;
}
.plate-display {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  margin-top: 4px;
}
.vehicle-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.pin-box {
  grid-column: 1 / -1;
  background: var(--soft);
  border-radius: 14px;
  padding: 14px;
  margin-top: 4px;
}

.pin-display {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-align: center;
  padding: 8px 0 4px;
}

.pin-inputs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 8px 0 12px;
}

.pin-inputs input {
  text-align: center;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  padding: 0;
  min-height: 56px;
}

/* ——— Stepper ——— */
.stepper { list-style: none; margin: 0; padding: 0; }

.stepper li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding-bottom: 16px;
  position: relative;
}

.stepper li:last-child { padding-bottom: 0; }

.stepper li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.stepper li.is-done:not(:last-child)::before { background: var(--ok); }
.stepper li.is-current:not(:last-child)::before { background: linear-gradient(var(--accent), var(--line)); }

.dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: #FFFFFF;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.stepper li.is-done .dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #FFFFFF;
}

.stepper li.is-current .dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.stepper li.is-locked .dot { opacity: 0.55; }

.step-copy strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.step-copy small { color: var(--muted); font-size: 13px; }

.lock-reason {
  background: var(--warn-soft);
  color: var(--warn-ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 650;
  margin-top: 12px;
}

.stars {
  display: flex;
  gap: 6px;
  margin: 8px 0 4px;
}

.stars button {
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #FFFFFF;
  font-size: 22px;
  line-height: 1;
  color: var(--line-strong);
}

.stars button.is-on {
  background: var(--warn-soft);
  border-color: #F59E0B;
  color: #B45309;
}

/* ——— Tab bar ——— */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  max-width: 100%;
}

.tabbar button {
  min-height: 56px;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 750;
  color: var(--faint);
  border-radius: 12px;
}

.tabbar button svg { width: 22px; height: 22px; }

.tabbar button[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.tab-panel[hidden] { display: none !important; }

/* ——— Toast + footer ——— */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 12px);
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 70;
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.site-foot {
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
}

.site-foot a { color: inherit; }

@media (min-width: 860px) {
  :root { --max: 920px; }
  main { padding-top: 28px; }
  .page-head h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
