/* ============================================================
   Adeva Pro — Canonical components
   Patterns ported from the handoff bundle (_design-handoff/project/
   index.html + styles.css + client-portal-screens.jsx CPDashboard).

   Sits next to adeva-tokens.css. Only contains patterns that are
   NOT already covered there. Per-view <style> blocks should
   migrate into this file as we converge each screen.
   ============================================================ */

/* ─── Hero typography (handoff index.html lines 29–33) ───────── */
.adv-eyebrow {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--adv-primary);
}
.dark .adv-eyebrow { color: var(--adv-accent); }

.adv-h1 {
  font-family: var(--adv-font-serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: rgb(var(--foreground));
  margin: 16px 0 24px;
}

/* In-page hero greeting (CPDashboard "Welcome back, Rajesh" pattern,
   tighter than the index.html hero). */
.adv-h1-page {
  font-family: var(--adv-font-serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.05;
  color: rgb(var(--foreground));
  margin: 0;
}

.adv-lede {
  font-family: var(--adv-font-sans);
  font-size: 15px;
  color: rgb(var(--muted-foreground));
  line-height: 1.55;
  max-width: 620px;
  margin: 0;
}

.adv-meta-block {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  color: rgb(var(--muted-foreground));
  line-height: 1.8;
}
.adv-meta-block strong {
  display: block;
  color: rgb(var(--foreground));
  font-size: 13px;
  margin-bottom: 6px;
}

/* ─── In-page top bar (CPDashboard header row) ───────────────── */
.adv-page-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.adv-page-bar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.adv-page-bar-sub {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 6px 0 0;
}

/* ─── Stats grid wrapper (handoff index.html .stats) ─────────── */
.adv-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .adv-stats-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .adv-stats-row { grid-template-columns: 1fr; } }

/* ─── Hoverable card link (handoff index.html .card a) ───────── */
.adv-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
  background: rgb(var(--card));
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--adv-duration-fast) var(--adv-easing-standard),
              transform   var(--adv-duration-fast) var(--adv-easing-standard),
              box-shadow  var(--adv-duration-fast) var(--adv-easing-standard);
}
.adv-card-link:hover {
  border-color: var(--adv-primary);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgb(11 94 90 / 0.18);
  text-decoration: none;
  color: inherit;
}
.adv-card-link .adv-card-link-tag {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--adv-primary);
}
.adv-card-link .adv-card-link-title {
  font-family: var(--adv-font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 10px 0 8px;
  color: rgb(var(--foreground));
}
.adv-card-link .adv-card-link-desc {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  color: rgb(var(--muted-foreground));
  line-height: 1.55;
  margin: 0;
}
.adv-card-link .adv-card-link-meta {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  color: rgb(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgb(var(--adv-border));
  display: flex;
  justify-content: space-between;
}
.adv-card-link .adv-card-link-arrow {
  position: absolute;
  top: 28px;
  right: 28px;
  opacity: 0.3;
  transition: opacity var(--adv-duration-fast),
              transform var(--adv-duration-fast);
}
.adv-card-link:hover .adv-card-link-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
}

/* Design-system gradient variant (index.html .ds-card) */
.adv-card-link.is-feature {
  background: linear-gradient(135deg, #0B2545 0%, #0B5E5A 100%);
  color: #fff;
  border-color: transparent;
}
.adv-card-link.is-feature .adv-card-link-tag    { color: #5EEAD4; }
.adv-card-link.is-feature .adv-card-link-title  { color: #fff; }
.adv-card-link.is-feature .adv-card-link-desc   { color: rgba(255,255,255,0.7); }
.adv-card-link.is-feature .adv-card-link-meta   { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.1); }

/* ─── Pill (handoff index.html .pill) ────────────────────────── */
.adv-pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.adv-pill {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--adv-accent-soft);
  color: var(--adv-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.adv-card-link.is-feature .adv-pill {
  background: rgba(255,255,255,0.1);
  color: #99F6E4;
}

/* ─── Principles strip (handoff index.html .principles) ──────── */
.adv-principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  overflow: hidden;
  background: rgb(var(--card));
}
.adv-principles > div { padding: 20px; border-right: 1px solid rgb(var(--adv-border)); }
.adv-principles > div:last-child { border-right: 0; }
.adv-principles-n {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--adv-primary);
}
.adv-principles-t {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 700;
  margin-top: 8px;
  line-height: 1.3;
  color: rgb(var(--foreground));
}
.adv-principles-b {
  font-family: var(--adv-font-sans);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.5;
  color: rgb(var(--muted-foreground));
}
@media (max-width: 880px) {
  .adv-principles { grid-template-columns: 1fr 1fr; }
  .adv-principles > div { border-bottom: 1px solid rgb(var(--adv-border)); }
  .adv-principles > div:nth-child(odd)        { border-right: 1px solid rgb(var(--adv-border)); }
  .adv-principles > div:nth-child(even)       { border-right: 0; }
  .adv-principles > div:nth-last-child(-n+2)  { border-bottom: 0; }
}

/* ─── Activity row (CPDashboard recent activity) ─────────────── */
.adv-activity-card {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
  overflow: hidden;
}
.adv-activity-head {
  padding: 14px 18px;
  border-bottom: 1px solid rgb(var(--adv-border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.adv-activity-title {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0;
}
.adv-activity-link {
  font-family: var(--adv-font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--adv-primary);
  text-decoration: none;
}
.adv-activity-link:hover { text-decoration: underline; }
.dark .adv-activity-link { color: var(--adv-accent); }
.adv-activity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgb(var(--adv-border));
}
.adv-activity-row:last-child { border-bottom: 0; }
.adv-activity-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--adv-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.adv-activity-icon.is-success { background: rgb(var(--success-soft));     color: rgb(var(--success)); }
.adv-activity-icon.is-warning { background: rgb(var(--warning-soft));     color: rgb(var(--warning)); }
.adv-activity-icon.is-danger  { background: rgb(var(--destructive-soft)); color: rgb(var(--destructive)); }
.adv-activity-icon.is-accent  { background: var(--adv-accent-soft);       color: var(--adv-primary); }
.adv-activity-icon.is-info    { background: rgb(var(--info-soft));        color: rgb(var(--info)); }
.adv-activity-icon.is-neutral { background: rgb(var(--muted));            color: rgb(var(--foreground)); }
.adv-activity-body { flex: 1; min-width: 0; }
.adv-activity-row-title {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--foreground));
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adv-activity-sub {
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
  margin: 1px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adv-activity-right {
  text-align: right;
  white-space: nowrap;
}
.adv-activity-amount {
  font-family: var(--adv-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--foreground));
}
.adv-activity-amount.is-good { color: rgb(var(--success)); }
.adv-activity-amount.is-bad  { color: rgb(var(--destructive)); }
.adv-activity-time {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  color: rgb(var(--muted-foreground));
  margin-top: 1px;
}

/* ─── 2:1 + 3:2 dashboard column layouts ─────────────────────── */
.adv-grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.adv-grid-3-2 {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 14px;
}
@media (max-width: 1100px) {
  .adv-grid-2-1, .adv-grid-3-2 { grid-template-columns: 1fr; }
}

/* ─── "Needs your attention" tile (CPDashboard sidebar) ──────── */
.adv-attention-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgb(var(--adv-border));
}
.adv-attention-row:last-child { border-bottom: 0; }
.adv-attention-row-label {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--foreground));
}
.adv-attention-row-count {
  font-family: var(--adv-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 700;
  color: rgb(var(--foreground));
}
.adv-attention-row-count.is-warning { color: rgb(var(--warning)); }
.adv-attention-row-count.is-danger  { color: rgb(var(--destructive)); }

/* ─── Aging breakdown (CPDashboard right card) ───────────────── */
.adv-aging-list { display: flex; flex-direction: column; gap: 14px; }
.adv-aging-list-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adv-aging-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 11px;
}
.adv-aging-list-head .adv-aging-list-label {
  color: rgb(var(--foreground));
  font-weight: 500;
}
.adv-aging-list-head .adv-aging-list-amount {
  font-family: var(--adv-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: rgb(var(--foreground));
  font-weight: 600;
}
.adv-aging-list-bar {
  height: 6px;
  background: rgb(var(--muted));
  border-radius: 3px;
  overflow: hidden;
}
.adv-aging-list-bar > span {
  display: block;
  height: 100%;
}
.adv-aging-list-bar > span.tone-success { background: rgb(var(--success)); }
.adv-aging-list-bar > span.tone-brand   { background: var(--adv-primary); }
.adv-aging-list-bar > span.tone-warning { background: rgb(var(--warning)); }
.adv-aging-list-bar > span.tone-danger  { background: rgb(var(--destructive)); }
.adv-aging-list-bar > span.tone-purple  { background: #6B21A8; }
.adv-aging-list-foot {
  font-family: var(--adv-font-sans);
  font-size: 10px;
  color: rgb(var(--muted-foreground));
}

/* ─── Logo lockup (handoff index.html .logo) ─────────────────── */
.adv-logo {
  font-family: var(--adv-font-mono);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgb(var(--foreground));
}
.adv-logo > span { color: var(--adv-primary); }
.dark .adv-logo > span { color: var(--adv-accent); }

/* ─── Page header card (full-width hero with actions) ────────── */
/*  Used on Add/Analytics/section-landing pages. Pairs Fraunces  */
/*  greeting + subtitle on the left with action buttons on right. */
.adv-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 22px 24px;
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
}
.adv-page-head h1, .adv-page-head .adv-page-head-title {
  font-family: var(--adv-font-serif);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.018em;
  color: rgb(var(--foreground));
  margin: 0 0 4px;
}
.adv-page-head p, .adv-page-head .adv-page-head-sub {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}
.adv-page-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── Section card (header + body, like CPCard with title) ───── */
/*  Replaces all per-view .adv-cdai-card / .adv-cdaa-card variants */
.adv-section-card {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
  overflow: hidden;
}
.adv-section-card-head {
  padding: 14px 22px;
  border-bottom: 1px solid rgb(var(--adv-border));
}
.adv-section-card-head h2,
.adv-section-card-head .adv-section-card-title {
  font-family: var(--adv-font-serif);
  font-size: 15px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.adv-section-card-head h2 i,
.adv-section-card-head .adv-section-card-title i { color: var(--adv-primary); }
.dark .adv-section-card-head h2 i,
.dark .adv-section-card-head .adv-section-card-title i { color: var(--adv-accent); }
.adv-section-card-head p,
.adv-section-card-head .adv-section-card-sub {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}
/* Eyebrow-style mono section header (e.g. analytics charts) */
.adv-section-card-head.is-eyebrow h2,
.adv-section-card-head.is-eyebrow .adv-section-card-title {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
}
.adv-section-card-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ─── Form hint text under inputs ────────────────────────────── */
.adv-form-hint {
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
  margin: 4px 0 0;
}
.adv-form-error {
  color: rgb(var(--destructive));
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

/* ─── Generic responsive grids (used by forms + dashboards) ──── */
.adv-grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .adv-grid-2 { grid-template-columns: 1fr 1fr; } }

.adv-grid-3 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px)  { .adv-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .adv-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.adv-grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 720px) { .adv-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.adv-metric-grid-5 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 540px)  { .adv-metric-grid-5 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .adv-metric-grid-5 { grid-template-columns: repeat(5, 1fr); } }

/* ─── Selectable tiles ───────────────────────────────────────── */
/* Checkbox tile (with hidden checkbox driving the active state). */
.adv-tile-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  cursor: pointer;
  transition: border-color var(--adv-duration-fast) ease,
              background var(--adv-duration-fast) ease;
  background: rgb(var(--card));
}
.adv-tile-check:hover {
  background: var(--adv-accent-soft);
  border-color: var(--adv-primary);
}
.dark .adv-tile-check:hover {
  background: rgba(20,184,166,0.06);
  border-color: var(--adv-accent);
}
.adv-tile-check:has(input:checked) {
  background: var(--adv-accent-soft);
  border-color: var(--adv-primary);
}
.dark .adv-tile-check:has(input:checked) {
  background: rgba(20,184,166,0.06);
  border-color: var(--adv-accent);
}
.adv-tile-check input { margin-top: 4px; flex-shrink: 0; }
.adv-tile-check .adv-tile-title {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 2px;
}
.adv-tile-check .adv-tile-desc {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

/* Radio tile (taller, vertical layout — used for TTL pickers). */
.adv-tile-radio {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  cursor: pointer;
  transition: border-color var(--adv-duration-fast) ease,
              background var(--adv-duration-fast) ease;
  background: rgb(var(--card));
  height: 100%;
}
.adv-tile-radio:has(input:checked) {
  background: var(--adv-accent-soft);
  border-color: var(--adv-primary);
}
.dark .adv-tile-radio:has(input:checked) {
  background: rgba(20,184,166,0.06);
  border-color: var(--adv-accent);
}
.adv-tile-radio-head { display: flex; align-items: center; gap: 8px; }
.adv-tile-radio-head span {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: rgb(var(--foreground));
}
.adv-tile-radio p {
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

/* Static info tile (no checkbox). */
.adv-feature-tile {
  padding: 14px 16px;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  background: rgb(var(--card));
}
.adv-feature-tile .adv-feature-title {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 2px;
}
.adv-feature-tile .adv-feature-desc {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

/* ─── KPI metric (icon + value, used on Analytics) ───────────── */
.adv-metric {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.adv-metric-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.adv-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.adv-metric-icon.is-info    { background: var(--adv-accent-soft);       color: var(--adv-primary); }
.dark .adv-metric-icon.is-info { background: rgba(20,184,166,0.14);     color: var(--adv-accent); }
.adv-metric-icon.is-success { background: rgb(var(--success-soft));     color: rgb(var(--success)); }
.adv-metric-icon.is-warning { background: rgb(var(--warning-soft));     color: rgb(var(--warning)); }
.adv-metric-icon.is-danger  { background: rgb(var(--destructive-soft)); color: rgb(var(--destructive)); }
.adv-metric-icon.is-purple  { background: rgba(139,92,246,0.12);        color: #7c3aed; }
.adv-metric-value {
  font-family: var(--adv-font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgb(var(--foreground));
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.adv-metric-sub {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 4px 0 0;
}
.adv-metric-sub.is-success { color: rgb(var(--success)); font-weight: 600; }
.adv-metric-sub.is-danger  { color: rgb(var(--destructive)); font-weight: 600; }

/* ─── Labelled progress row (analytics: invites by role) ─────── */
.adv-progress-row + .adv-progress-row { margin-top: 14px; }
.adv-progress-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
}
.adv-progress-row-head .adv-progress-label {
  font-weight: 700;
  color: rgb(var(--foreground));
}
.adv-progress-row-head .adv-progress-total {
  color: rgb(var(--muted-foreground));
  margin-left: 6px;
}
.adv-progress-row-head .adv-progress-acc {
  color: rgb(var(--foreground));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.adv-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgb(var(--muted));
  border-radius: 999px;
  overflow: hidden;
}
.adv-progress-bar {
  height: 100%;
  background: var(--adv-primary);
  border-radius: 999px;
}
.dark .adv-progress-bar { background: var(--adv-accent); }

/* ─── Week activity row (analytics: last 30 days) ────────────── */
.adv-week-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgb(var(--background));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
}
.adv-week-row + .adv-week-row { margin-top: 8px; }
.adv-week-row .adv-week-title {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 2px;
}
.adv-week-row .adv-week-desc {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}
.adv-week-row .adv-week-num {
  font-family: var(--adv-font-serif);
  font-size: 22px;
  font-weight: 700;
  color: rgb(var(--success));
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.adv-week-row .adv-week-label {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

/* ─── Stage page (centred public-facing card, e.g. Accept) ───── */
.adv-stage-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: rgb(var(--background));
  color: rgb(var(--foreground));
  font-family: var(--adv-font-sans);
  margin: 0;
}
.adv-stage-card {
  width: 100%;
  max-width: 640px;
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
  box-shadow: var(--adv-shadow-md);
  overflow: hidden;
}
.adv-stage-head {
  padding: 32px 28px;
  background: linear-gradient(135deg, var(--adv-primary), var(--adv-primary-deep));
  color: #fff;
  text-align: center;
}
.adv-stage-head-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 14px;
}
.adv-stage-head h1 {
  font-family: var(--adv-font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.018em;
  margin: 0 0 4px;
}
.adv-stage-head p {
  font-size: 14px;
  margin: 0;
  opacity: 0.9;
}
.adv-stage-body { padding: 28px; }
.adv-stage-banner { margin-bottom: 18px; }
.adv-stage-banner-summary {
  margin-top: 6px;
  font-size: 13px;
}
.adv-stage-section { margin-bottom: 22px; }
.adv-stage-section h2 {
  font-family: var(--adv-font-serif);
  font-size: 17px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 12px;
}
.adv-stage-dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 14px;
  font-size: 13.5px;
  margin: 0;
}
.adv-stage-dl dt {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(var(--muted-foreground));
}
.adv-stage-dl dd {
  color: rgb(var(--foreground));
  font-weight: 600;
  margin: 0;
}
.adv-stage-perms {
  padding: 14px 16px;
  background: var(--adv-accent-soft);
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
}
.adv-stage-perms h3 {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--adv-primary);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.adv-stage-perms ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adv-stage-perms li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgb(var(--foreground));
}
.adv-stage-perms li i { color: rgb(var(--success)); }
.adv-stage-mfa {
  padding: 14px 16px;
  background: rgb(var(--warning-soft));
  border: 1px solid rgb(var(--warning) / 0.4);
  border-radius: var(--adv-radius-md);
}
.adv-stage-mfa h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: rgb(var(--foreground));
}
.adv-stage-mfa-icon {
  color: rgb(var(--warning));
  margin-right: 4px;
}
.adv-stage-mfa p {
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}
.adv-stage-terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
}
.adv-stage-terms input {
  margin-top: 4px;
  flex-shrink: 0;
}
.adv-stage-terms label {
  font-size: 13px;
  line-height: 1.55;
  color: rgb(var(--foreground));
}
.adv-stage-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.adv-stage-actions > .adv-btn:first-child {
  flex: 1;
  justify-content: center;
}
.adv-stage-foot {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: rgb(var(--muted-foreground));
}

/* ─── Empty state line (small placeholder when no rows) ──────── */
.adv-empty-line {
  text-align: center;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}
.adv-empty-line.is-span-full { grid-column: 1 / -1; }

/* ─── Delegated access shared layout/helpers ─────────────────── */
.adv-page-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.adv-page-stack.is-narrow { max-width: 960px; }

.adv-validation-summary {
  margin-top: 6px;
  font-size: 13px;
}

.adv-form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.adv-stack-gap-sm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adv-fill { width: 100%; }

.adv-tab-strip {
  border-bottom: 1px solid rgb(var(--adv-border));
  padding-bottom: 4px;
}

.adv-panel-pad { padding: 24px; }

.adv-section-card-head-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.adv-inline-actions-tight {
  display: flex;
  gap: 8px;
}

.adv-table-cell-strong {
  font-weight: 600;
  color: rgb(var(--foreground));
}

.adv-table-cell-muted { color: rgb(var(--muted-foreground)); }

.adv-table-cell-mono {
  color: rgb(var(--muted-foreground));
  font-family: var(--adv-font-mono);
  font-size: 12.5px;
}

.adv-table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.adv-input-native {
  appearance: auto;
}

.adv-input-inline {
  width: auto;
}

.adv-input-mono {
  font-family: var(--adv-font-mono);
}

.adv-textarea-vert { resize: vertical; }

.adv-tile-desc-spaced { margin-bottom: 8px; }

.adv-loading-state {
  text-align: center;
  padding: 24px;
}

.adv-loading-spinner {
  color: rgb(var(--muted-foreground));
}

.adv-loading-text {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 8px 0 0;
}

.adv-modal-content {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
}

.adv-modal-content.is-rounded {
  border-radius: var(--adv-radius-lg);
}

.adv-modal-header,
.adv-modal-footer {
  border-color: rgb(var(--adv-border));
}

.adv-modal-footer.is-gap { gap: 8px; }

.adv-modal-title {
  font-family: var(--adv-font-serif);
  font-size: 17px;
  font-weight: 700;
}

.adv-modal-title.is-danger {
  color: rgb(var(--destructive));
}

.adv-modal-note {
  color: rgb(var(--muted-foreground));
  font-size: 14px;
  margin: 0 0 12px;
}

.adv-modal-note.is-tight {
  margin: 0 0 4px;
}

.adv-modal-note.is-small {
  font-size: 12.5px;
}

.adv-modal-email {
  font-weight: 700;
  color: rgb(var(--foreground));
  font-family: var(--adv-font-mono);
  margin: 0 0 12px;
}

.adv-modal-spinner-wrap {
  text-align: center;
  padding: 24px;
}

.adv-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.adv-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adv-detail-item.is-span-full { grid-column: 1 / -1; }

.adv-detail-k {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(var(--muted-foreground));
}

.adv-detail-v {
  font-weight: 600;
  color: rgb(var(--foreground));
}

.adv-detail-v.is-danger { color: rgb(var(--destructive)); }

.adv-detail-section {
  border-top: 1px solid rgb(var(--adv-border));
  padding-top: 14px;
}

.adv-detail-section + .adv-detail-section { margin-top: 14px; }

.adv-detail-section-title {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--adv-primary);
  margin: 0 0 8px;
}

.dark .adv-detail-section-title { color: var(--adv-accent); }

.adv-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.adv-detail-row.is-muted { color: rgb(var(--muted-foreground)); }

.adv-detail-flag.is-on { color: rgb(var(--success)); }
.adv-detail-flag.is-off { color: rgb(var(--muted-foreground)); }

.adv-detail-strong { color: rgb(var(--foreground)); }

.adv-detail-error {
  color: rgb(var(--destructive));
  margin: 0;
}

.adv-week-row-right { text-align: right; }

/* ─── Form actions row (submit + back, full width) ───────────── */
.adv-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Filter bar above a table ───────────────────────────────── */
.adv-filter-row {
  padding: 14px 22px;
  border-bottom: 1px solid rgb(var(--adv-border));
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.adv-filter-row form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}
.adv-filter-row .adv-input,
.adv-filter-row .adv-select {
  height: 36px;
  padding: 0 12px;
  font-size: 13.5px;
}
.adv-filter-row .adv-input[type="search"] { flex: 1; min-width: 200px; }
.adv-filter-row.is-compact {
  border-bottom: 0;
  padding-bottom: 8px;
}

/* Segmented status filter (CPDebtsList top-of-list filter strip).
   Use as a row of <a> links or <button>s; mark the active one with
   .is-active. Built into a pill row with hairline dividers. */
.adv-segment {
  display: inline-flex;
  border-radius: var(--adv-radius);
  border: 1px solid rgb(var(--adv-border));
  overflow: hidden;
  background: rgb(var(--card));
}
.adv-segment-item {
  padding: 7px 14px;
  font-family: var(--adv-font-sans);
  font-size: 11px;
  font-weight: 600;
  border: 0;
  background: rgb(var(--card));
  color: rgb(var(--muted-foreground));
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid rgb(var(--adv-border));
  transition: background var(--adv-duration-fast) ease, color var(--adv-duration-fast) ease;
}
.adv-segment-item:last-child { border-right: 0; }
.adv-segment-item:hover {
  background: rgb(var(--muted));
  color: rgb(var(--foreground));
  text-decoration: none;
}
.adv-segment-item.is-active {
  background: rgb(var(--muted));
  color: rgb(var(--foreground));
}
.adv-segment-item .adv-segment-count {
  margin-left: 4px;
  font-family: var(--adv-font-mono);
  font-size: 10px;
  color: rgb(var(--muted-foreground));
}
.adv-segment-item.is-active .adv-segment-count { color: var(--adv-primary); }
.dark .adv-segment-item.is-active .adv-segment-count { color: var(--adv-accent); }

/* Filter dropdown button (chevron-suffix toggle, e.g. "Aging ▾"). */
.adv-filter-pill {
  font-family: var(--adv-font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--adv-radius);
  border: 1px solid rgb(var(--adv-border));
  background: rgb(var(--card));
  color: rgb(var(--foreground));
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--adv-duration-fast) ease, border-color var(--adv-duration-fast) ease;
}
.adv-filter-pill:hover {
  background: rgb(var(--muted));
  border-color: rgb(var(--muted-foreground) / 0.3);
  text-decoration: none;
}
.adv-filter-pill.is-active {
  border-color: var(--adv-primary);
  color: var(--adv-primary);
}
.dark .adv-filter-pill.is-active { border-color: var(--adv-accent); color: var(--adv-accent); }

/* Spacer for filter row — pushes following items to the right. */
.adv-filter-spacer { flex: 1; }

/* ─── Table footer (pagination + range meta) ─────────────────── */
.adv-table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-top: 1px solid rgb(var(--adv-border));
}
.adv-table-foot-meta {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  color: rgb(var(--muted-foreground));
}
.adv-table-foot-meta strong {
  color: rgb(var(--foreground));
  font-weight: 700;
}

/* Header subtitle spans (used by .adv-page-head meta line) */
.adv-page-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}
.adv-page-head-meta > span { display: inline-flex; align-items: baseline; }
.adv-page-head-meta > span + span::before {
  content: "·";
  margin: 0 8px 0 0;
  color: rgb(var(--muted-foreground));
}
.adv-page-head-meta strong {
  color: rgb(var(--foreground));
  font-weight: 700;
  font-family: var(--adv-font-mono);
  font-variant-numeric: tabular-nums;
  margin-right: 4px;
}

.adv-table-cell-primary {
  font-weight: 700;
  color: var(--adv-primary);
}

.adv-panel-pad-lg { padding: 32px 22px; }

/* ═══════════════════════════════════════════════════════
   Phase 4 — Debt detail view
   ═══════════════════════════════════════════════════════ */

/* 2-col definition list (debt info / debtor info cards) */
.adv-info-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
}
@media (max-width: 540px) { .adv-info-dl { grid-template-columns: 1fr; } }
.adv-info-dl dt {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
  margin-bottom: 4px;
}
.adv-info-dl dd {
  font-family: var(--adv-font-sans);
  font-size: 15px;
  font-weight: 600;
  color: rgb(var(--foreground));
  margin: 0;
}
.adv-info-dl dd.is-mono {
  font-family: var(--adv-font-mono);
  font-size: 14px;
  font-weight: 500;
}
.adv-info-dl dd.is-money {
  font-variant-numeric: tabular-nums;
}
.adv-info-dl dd.is-danger {
  color: rgb(var(--destructive));
}
.adv-info-dl dd.is-muted {
  font-weight: 500;
  font-size: 14px;
  color: rgb(var(--muted-foreground));
}

/* Clickable action tiles in sidebar */
.adv-quick-tile {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  text-decoration: none;
  color: inherit;
  transition: background 120ms ease, border-color 120ms ease;
}
.adv-quick-tile:hover {
  background: var(--adv-accent-soft);
  border-color: var(--adv-primary);
}
.dark .adv-quick-tile:hover { background: rgba(20,184,166,0.06); border-color: var(--adv-accent); }
.adv-quick-tile + .adv-quick-tile { margin-top: 8px; }
.adv-quick-tile .adv-quick-tile-title {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 2px;
}
.adv-quick-tile .adv-quick-tile-desc {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}
.adv-quick-tile .adv-quick-tile-chev {
  color: var(--adv-primary);
  align-self: center;
  flex-shrink: 0;
}
.dark .adv-quick-tile .adv-quick-tile-chev { color: var(--adv-accent); }

/* Key-value rows for sidebar summary cards (payment plan, etc.) */
.adv-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-family: var(--adv-font-sans);
  font-size: 13px;
}
.adv-kv-row + .adv-kv-row {
  border-top: 1px solid rgb(var(--adv-border) / 0.6);
}
.adv-kv-row .adv-kv-label { color: rgb(var(--muted-foreground)); }
.adv-kv-row .adv-kv-value {
  font-weight: 700;
  color: rgb(var(--foreground));
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.adv-kv-row.is-total .adv-kv-label {
  font-weight: 600;
  color: rgb(var(--foreground));
}
.adv-kv-row.is-total .adv-kv-value {
  color: rgb(var(--destructive));
}

/* Upload drop zone (documents sidebar card) */
.adv-upload-drop {
  border: 1.5px dashed rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.adv-upload-drop:hover {
  border-color: var(--adv-primary);
  background: var(--adv-accent-soft);
}
.dark .adv-upload-drop:hover { border-color: var(--adv-accent); background: rgba(20,184,166,0.06); }
.adv-upload-drop .adv-upload-drop-icon {
  font-size: 28px;
  color: rgb(var(--muted-foreground));
  display: block;
  margin: 0 auto 8px;
}
.adv-upload-drop .adv-upload-drop-title {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  font-weight: 600;
  color: rgb(var(--foreground));
  margin: 0 0 4px;
}
.adv-upload-drop .adv-upload-drop-hint {
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   Phase 5 — Raise Debt wizard
   ═══════════════════════════════════════════════════════ */

/* Large invoice drop zone */
.adv-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 44px 28px;
  border: 1.5px dashed rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  background: rgb(var(--background));
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
  text-align: center;
}
.adv-drop-zone:hover,
.adv-drop-zone.is-dragging {
  border-color: var(--adv-primary);
  background: var(--adv-accent-soft);
}
.dark .adv-drop-zone:hover,
.dark .adv-drop-zone.is-dragging {
  border-color: var(--adv-accent);
  background: rgba(20,184,166,0.06);
}
.adv-drop-zone-icon {
  font-size: 42px;
  color: rgb(var(--muted-foreground));
}
.adv-drop-zone-title {
  font-family: var(--adv-font-sans);
  font-size: 15px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0;
}
.adv-drop-zone-hint {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 4px 0 0;
}

/* File chip (selected file indicator) */
.adv-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgb(var(--success-soft));
  color: rgb(var(--success));
  border-radius: 999px;
  font-family: var(--adv-font-mono);
  font-size: 12px;
  font-weight: 600;
}
.adv-file-chip button {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 4px;
  color: inherit;
  cursor: pointer;
  line-height: 1;
}

/* Requirement checklist */
.adv-req-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.adv-req-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--foreground));
  line-height: 1.55;
}
.adv-req-list li i {
  color: rgb(var(--success));
  margin-top: 4px;
  flex-shrink: 0;
  font-size: 12px;
}

/* Labeled data list — 2-col label / value for extraction results */
.adv-labeled-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}
@media (min-width: 480px) {
  .adv-labeled-dl { grid-template-columns: 160px 1fr; }
}
.adv-labeled-dl dt {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgb(var(--muted-foreground));
  padding-top: 2px;
}
.adv-labeled-dl dd {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--foreground));
  margin: 0;
}
.adv-labeled-dl dd.is-mono {
  font-family: var(--adv-font-mono);
  font-size: 13px;
}

/* Wizard step row (sidebar steps indicator) */
.adv-wizard-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.adv-wizard-step + .adv-wizard-step { margin-top: 14px; }
.adv-wizard-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgb(var(--muted));
  color: rgb(var(--muted-foreground));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--adv-font-mono);
  font-size: 12px;
  font-weight: 700;
  transition: background 150ms ease, color 150ms ease;
}
.adv-wizard-step.is-active .adv-wizard-step-num {
  background: var(--adv-primary);
  color: #fff;
}
.dark .adv-wizard-step.is-active .adv-wizard-step-num {
  background: var(--adv-accent);
  color: #0b1f1c;
}
.adv-wizard-step.is-done .adv-wizard-step-num {
  background: rgb(var(--success));
  color: #fff;
}
.adv-wizard-step-title {
  font-family: var(--adv-font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 2px;
}
.adv-wizard-step.is-pending .adv-wizard-step-title {
  color: rgb(var(--muted-foreground));
}
.adv-wizard-step-desc {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

/* Extraction loading panel */
.adv-extract-loading {
  text-align: center;
  padding: 44px 22px;
}
.adv-extract-loading-icon {
  font-size: 38px;
  color: var(--adv-primary);
  margin-bottom: 14px;
}
.dark .adv-extract-loading-icon { color: var(--adv-accent); }
.adv-extract-loading-title {
  font-family: var(--adv-font-serif);
  font-size: 18px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 6px;
}
.adv-extract-loading-desc {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

/* Confidence legend row */
.adv-conf-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
}
.adv-conf-row + .adv-conf-row { margin-top: 8px; }

/* Compact horizontal radio tiles (debtor type toggle) */
.adv-radio-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.adv-radio-inline label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  cursor: pointer;
  font-family: var(--adv-font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: rgb(var(--foreground));
  transition: border-color 120ms ease, background 120ms ease;
}
.adv-radio-inline label:has(input:checked) {
  border-color: var(--adv-primary);
  background: var(--adv-accent-soft);
}
.dark .adv-radio-inline label:has(input:checked) {
  border-color: var(--adv-accent);
  background: rgba(20,184,166,0.06);
}
.adv-radio-inline label input[type="radio"] {
  /* visually hidden but still focusable */
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.adv-radio-inline label i { color: rgb(var(--muted-foreground)); }

/* Dynamic add/remove contact rows */
.adv-dyn-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.adv-dyn-row + .adv-dyn-row { margin-top: 8px; }
.adv-dyn-remove {
  background: none;
  border: 1px solid rgb(var(--adv-border));
  color: rgb(var(--destructive));
  width: 36px;
  height: 36px;
  border-radius: var(--adv-radius-md);
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.adv-dyn-remove:hover {
  background: rgb(var(--destructive-soft, 254 226 226));
  border-color: rgb(var(--destructive));
}

/* Ghost "add" link button */
.adv-btn-link {
  background: none;
  border: 0;
  padding: 6px 0;
  color: var(--adv-primary);
  font-family: var(--adv-font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dark .adv-btn-link { color: var(--adv-accent); }
.adv-btn-link:hover { text-decoration: underline; }

/* Input with a prefix label ($ for currency, +61 for phone) */
.adv-input-group { display: flex; align-items: stretch; }
.adv-input-group .adv-input-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: rgb(var(--background));
  border: 1px solid rgb(var(--adv-border));
  border-right: 0;
  border-radius: var(--adv-radius-md) 0 0 var(--adv-radius-md);
  font-family: var(--adv-font-mono);
  font-size: 14px;
  color: rgb(var(--muted-foreground));
  white-space: nowrap;
}
.adv-input-group .adv-input {
  border-radius: 0 var(--adv-radius-md) var(--adv-radius-md) 0;
  flex: 1;
}

/* Read-only display row (for extracted/org values) */
.adv-readonly-row { padding: 6px 0; }
.adv-readonly-label {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
  margin-bottom: 3px;
}
.adv-readonly-value {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: rgb(var(--foreground));
}
.adv-readonly-value.is-mono {
  font-family: var(--adv-font-mono);
  font-size: 13px;
}

/* Sub-section label ("Extracted from invoice" etc.) */
.adv-sub-label {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.adv-sub-label i { color: var(--adv-primary); }
.dark .adv-sub-label i { color: var(--adv-accent); }

/* ═══════════════════════════════════════════════════════
   Phase 6 — Onboarding views
   ═══════════════════════════════════════════════════════ */

/* Narrow page containers */
.adv-narrow { display: flex; flex-direction: column; gap: 16px; }
.adv-narrow.adv-narrow-sm { max-width: 540px; }
.adv-narrow.adv-narrow-md { max-width: 680px; }
.adv-narrow.adv-narrow-lg { max-width: 820px; }

/* Centred icon hero (verification & success pages) */
.adv-icon-hero { text-align: center; margin-bottom: 18px; }
.adv-icon-hero-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--adv-accent-soft);
  color: var(--adv-primary);
  font-size: 28px;
}
.dark .adv-icon-hero-circle { background: rgba(20,184,166,0.14); color: var(--adv-accent); }
.adv-icon-hero-circle.is-success {
  background: rgb(var(--success-soft));
  color: rgb(var(--success));
}
.adv-icon-hero-title {
  font-family: var(--adv-font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.018em;
  text-align: center;
  color: rgb(var(--foreground));
  margin: 10px 0 6px;
}
.adv-icon-hero-desc {
  font-family: var(--adv-font-sans);
  font-size: 13.5px;
  text-align: center;
  color: rgb(var(--muted-foreground));
  margin: 0 0 18px;
}

/* OTP code input */
.adv-otp-input {
  font-size: 1.8rem !important;
  letter-spacing: 0.5rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
}

/* Tips / hint box with bullet list */
.adv-tips-box {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--adv-accent-soft);
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
}
.dark .adv-tips-box { background: rgba(20,184,166,0.06); }
.adv-tips-box-title {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.adv-tips-box-title i { color: var(--adv-primary); }
.dark .adv-tips-box-title i { color: var(--adv-accent); }
.adv-tips-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--foreground));
}
.adv-tips-box li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.adv-tips-box li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--adv-primary);
  margin-top: 7px;
}
.dark .adv-tips-box li::before { background: var(--adv-accent); }

/* Horizontal step bar (3-step onboarding wizard) */
.adv-h-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.adv-h-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgb(var(--muted-foreground));
}
.adv-h-step.is-active { color: var(--adv-primary); }
.adv-h-step.is-done { color: rgb(var(--success)); }
.dark .adv-h-step.is-active { color: var(--adv-accent); }
.adv-h-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgb(var(--muted));
  color: rgb(var(--muted-foreground));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.adv-h-step.is-active .adv-h-step-dot {
  background: var(--adv-primary);
  color: #fff;
}
.dark .adv-h-step.is-active .adv-h-step-dot {
  background: var(--adv-accent);
  color: #0b1f1c;
}
.adv-h-step.is-done .adv-h-step-dot {
  background: rgb(var(--success));
  color: #fff;
}
.adv-h-step-line {
  flex: 1;
  height: 2px;
  background: rgb(var(--adv-border));
  border-radius: 999px;
}
.adv-h-step.is-done + .adv-h-step-line { background: rgb(var(--success)); }

/* Thin progress bar (onboarding checklist) */
.adv-thin-bar-wrap {
  width: 100%;
  height: 10px;
  background: rgb(var(--muted));
  border-radius: 999px;
  overflow: hidden;
}
.adv-thin-bar {
  height: 100%;
  background: var(--adv-primary);
  border-radius: 999px;
  transition: width 320ms ease;
}
.dark .adv-thin-bar { background: var(--adv-accent); }
.adv-thin-bar.is-complete { background: rgb(var(--success)); }

/* Onboarding checklist step row */
.adv-checklist-row {
  padding: 18px 22px;
  border-top: 1px solid rgb(var(--adv-border));
  display: flex;
  gap: 14px;
}
.adv-checklist-row:first-child { border-top: 0; }
.adv-checklist-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.adv-checklist-icon.is-done {
  background: rgb(var(--success-soft));
  color: rgb(var(--success));
}
.adv-checklist-icon.is-pending {
  background: rgb(var(--muted));
  color: rgb(var(--muted-foreground));
}
.adv-checklist-body { flex: 1; min-width: 0; }
.adv-checklist-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--adv-font-sans);
  font-size: 15px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 4px;
}
.adv-checklist-desc {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 0 0 10px;
}
.adv-checklist-meta {
  font-family: var(--adv-font-mono);
  font-size: 12px;
  color: rgb(var(--foreground));
  margin: 0 0 6px;
}
.adv-checklist-meta i { color: var(--adv-primary); margin-right: 6px; }
.dark .adv-checklist-meta i { color: var(--adv-accent); }

/* Simple padded card (no section-card-head, just standalone panel) */
.adv-padded-card {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
  padding: 24px 28px;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   Phase 7 — Onboarding complex views
   ═══════════════════════════════════════════════════════ */

/* Standalone stepper card (ConfirmDetails, ComplianceQuestions) */
.adv-stepper-card {
  padding: 16px 22px;
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* Section card with bordered header */
.adv-section-card {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
  overflow: hidden;
}
.adv-section-card-head {
  padding: 14px 22px;
  border-bottom: 1px solid rgb(var(--adv-border));
}
.adv-section-card-head p.adv-scard-label {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.adv-section-card-head p.adv-scard-label i { color: var(--adv-primary); }
.dark .adv-section-card-head p.adv-scard-label i { color: var(--adv-accent); }
.adv-section-card-head p.adv-scard-desc {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 4px 0 0;
}
.adv-section-card-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Numbered step list (WhatsNext "What happens next") */
.adv-step-list { display: flex; flex-direction: column; }
.adv-step-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgb(var(--adv-border) / 0.6);
}
.adv-step-item:first-child { border-top: 0; padding-top: 0; }
.adv-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--adv-accent-soft);
  color: var(--adv-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--adv-font-mono);
  font-size: 13px;
  font-weight: 700;
}
.dark .adv-step-num { background: rgba(20,184,166,0.14); color: var(--adv-accent); }
.adv-step-item h4 {
  font-family: var(--adv-font-sans);
  font-size: 14.5px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 4px;
}
.adv-step-item p {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

/* Progress dots (WhatsNext success row) */
.adv-progress-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--success));
}
.adv-progress-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgb(var(--success));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.adv-progress-line {
  flex: 1;
  height: 2px;
  background: rgb(var(--success));
  border-radius: 999px;
}

/* Help / support grid (BankDetails, WhatsNext) */
.adv-help-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
}
@media (min-width: 540px) { .adv-help-grid { grid-template-columns: 1fr 1fr; } }
.adv-help-grid strong {
  font-weight: 700;
  color: rgb(var(--foreground));
  display: block;
  margin-bottom: 4px;
}
.adv-help-grid p { margin: 0; }
.adv-help-grid a { color: var(--adv-primary); text-decoration: none; font-weight: 600; }
.dark .adv-help-grid a { color: var(--adv-accent); }
.adv-help-grid a:hover { text-decoration: underline; }

/* Narrow 2-col grid that breaks at 540px (form rows) */
.adv-grid-2-sm { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 540px) { .adv-grid-2-sm { grid-template-columns: 1fr 1fr; } }

/* Readonly 2-col definition list (ConfirmDetails ABR data) */
.adv-dl-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 540px) { .adv-dl-2col { grid-template-columns: 1fr 1fr; } }
.adv-dl-row {
  padding: 10px 0;
  border-bottom: 1px solid rgb(var(--adv-border) / 0.6);
}
.adv-dl-row dt {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
  margin-bottom: 2px;
}
.adv-dl-row dd {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--foreground));
  margin: 0;
}
.adv-dl-row dd.is-mono { font-family: var(--adv-font-mono); font-size: 13px; }

/* Address summary box (ConfirmDetails) */
.adv-summary-box {
  padding: 12px 14px;
  background: var(--adv-accent-soft);
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
}
.dark .adv-summary-box { background: rgba(20,184,166,0.06); }
.adv-summary-label {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
  margin: 0 0 4px;
}
.adv-summary-text {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--foreground));
  margin: 0;
}
.adv-summary-change {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--adv-font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--adv-primary);
  text-decoration: underline;
  cursor: pointer;
  margin-top: 4px;
  display: block;
}
.dark .adv-summary-change { color: var(--adv-accent); }

/* Radio/checkbox option card (ComplianceQuestions fee policy, T&C) */
.adv-radio-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.adv-radio-card:hover { background: var(--adv-accent-soft); }
.dark .adv-radio-card:hover { background: rgba(20,184,166,0.06); }
.adv-radio-card input[type="radio"],
.adv-radio-card input[type="checkbox"] { margin-top: 4px; flex-shrink: 0; }
.adv-rc-title {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 4px;
}
.adv-rc-desc {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

/* T&C scrollable box */
.adv-tc-scroll {
  max-height: 18rem;
  overflow-y: auto;
  padding: 16px 18px;
  background: rgb(var(--background));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  font-family: var(--adv-font-sans);
  font-size: 13px;
  line-height: 1.65;
  color: rgb(var(--foreground));
}
.adv-tc-scroll h4 { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.adv-tc-scroll ul { padding-left: 20px; margin: 0 0 10px; }
.adv-tc-scroll strong { color: rgb(var(--foreground)); }

/* SMS verification panel */
.adv-verify-panel {
  padding: 14px 16px;
  background: var(--adv-accent-soft);
  border: 1px solid var(--adv-primary);
  border-radius: var(--adv-radius-md);
}
.dark .adv-verify-panel { background: rgba(20,184,166,0.08); border-color: var(--adv-accent); }
.adv-verify-panel-head {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--adv-primary);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dark .adv-verify-panel-head { color: var(--adv-accent); }

/* Verification success banner */
.adv-success-banner {
  padding: 12px 16px;
  background: rgb(var(--success-soft));
  border: 1px solid rgb(var(--success));
  border-radius: var(--adv-radius-md);
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--success));
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Upload / warning notice (ComplianceQuestions) */
.adv-upload-notice {
  padding: 14px 16px;
  background: rgba(234,179,8,0.08);
  border: 1px solid rgb(var(--warning) / 0.4);
  border-radius: var(--adv-radius-md);
}
.adv-un-title {
  font-family: var(--adv-font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.adv-un-title i { color: rgb(var(--warning)); }
.adv-un-desc {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 0 0 10px;
}

/* ═══════════════════════════════════════════════════════
   Phase 8 — Client settings, inbox, and admin views
   ═══════════════════════════════════════════════════════ */

.adv-page-head-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.adv-page-head-copy {
  min-width: 0;
}

.adv-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.adv-icon-sq {
  width: 44px;
  height: 44px;
  border-radius: var(--adv-radius-md);
  background: var(--adv-accent-soft);
  color: var(--adv-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dark .adv-icon-sq {
  background: rgba(20,184,166,0.14);
  color: var(--adv-accent);
}

.adv-narrow.adv-narrow-xl { max-width: 960px; }

.adv-grid-2-xl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 960px) {
  .adv-grid-2-xl { grid-template-columns: 1fr 1fr; }
}

.adv-span-full { grid-column: 1 / -1; }

.adv-stack-14 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adv-stack-16 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.adv-stack-12 {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.adv-mt-8 { margin-top: 8px; }
.adv-mt-14 { margin-top: 14px; }
.adv-mt-16 { margin-top: 16px; }
.adv-mt-18 { margin-top: 18px; }
.adv-mt-22 { margin-top: 22px; }
.adv-mt-4 { margin-top: 4px; }
.adv-mb-4 { margin-bottom: 4px; }
.adv-mb-8 { margin-bottom: 8px; }
.adv-mb-12 { margin-bottom: 12px; }
.adv-mb-14 { margin-bottom: 14px; }
.adv-mb-16 { margin-bottom: 16px; }
.adv-mb-18 { margin-bottom: 18px; }

.adv-flex-1 { flex: 1; }

.adv-card-body {
  padding: 18px 22px;
}

.adv-card-body-tight {
  padding: 16px 22px;
}

.adv-card-body-sm {
  padding: 16px 20px;
}

.adv-mt-12 { margin-top: 12px; }

.adv-divider-top {
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid rgb(var(--adv-border));
}

.adv-required { color: rgb(var(--destructive)); }

.adv-rich-text {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: rgb(var(--foreground));
}

.adv-action-end {
  display: flex;
  justify-content: flex-end;
}

.adv-text-center { text-align: center; }

.adv-inline-icon-muted {
  color: rgb(var(--muted-foreground));
  font-size: 12px;
  margin-right: 4px;
}

.adv-inline-icon-primary {
  color: var(--adv-primary);
  margin-right: 4px;
}

.dark .adv-inline-icon-primary { color: var(--adv-accent); }

.adv-section-head-note {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: rgb(var(--muted-foreground));
  margin-left: 4px;
}

.adv-list-compact {
  margin: 6px 0 0;
  padding-left: 20px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
}

.adv-list-compact.is-tight { margin-top: 0; }

.adv-hr {
  margin: 14px 0;
  border: 0;
  border-top: 1px solid rgb(var(--adv-border));
}

.adv-text-sm {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--foreground));
  margin: 0;
}

.adv-text-sm.is-muted { color: rgb(var(--muted-foreground)); }
.adv-text-sm.is-strong { color: rgb(var(--foreground)); font-weight: 700; }

.adv-text-sm.is-rich { line-height: 1.55; }

.adv-text-sm.is-spaced { margin-top: 6px; }

.adv-note-muted {
  font-family: var(--adv-font-sans);
  font-size: 12.5px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

.adv-note-muted.is-success { color: rgb(var(--success)); }

.adv-note-muted.is-warning { color: rgb(var(--warning)); }

.adv-rich-text-sm {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  line-height: 1.55;
  color: rgb(var(--foreground));
}

.adv-inline-note {
  color: rgb(var(--muted-foreground));
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.adv-btn-link-inline {
  margin: 0;
  padding: 0;
  font-size: inherit;
}

.adv-grid-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.adv-select-code {
  width: 110px;
  flex-shrink: 0;
  appearance: auto;
}

.adv-preview-label {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
  margin: 0 0 8px;
}

.adv-preview-image {
  display: block;
  max-height: 400px;
  max-width: 100%;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  object-fit: contain;
}

.adv-preview-frame {
  display: block;
  width: 100%;
  height: 420px;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
}

.adv-error-layout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.adv-error-icon {
  color: rgb(var(--destructive));
  margin-top: 4px;
}

.adv-error-title {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  color: rgb(var(--destructive));
}

.adv-error-message {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--foreground));
  margin: 6px 0 12px;
}

.adv-disabled-link {
  pointer-events: none;
  opacity: 0.6;
}

.adv-badge-spaced { margin-left: 4px; }

.adv-numeric-tabular { font-variant-numeric: tabular-nums; }

.adv-readonly-value.is-warning { color: rgb(var(--warning)); }

.adv-readonly-value.is-muted {
  color: rgb(var(--muted-foreground));
  font-size: 13px;
  font-weight: 500;
}

.adv-readonly-subvalue {
  display: block;
  font-size: 11px;
  color: rgb(var(--muted-foreground));
}

.adv-link-primary-strong {
  color: var(--adv-primary);
  font-weight: 600;
}

.dark .adv-link-primary-strong { color: var(--adv-accent); }

.adv-link-plain { text-decoration: none; }

.adv-link-plain:hover { text-decoration: underline; }

.adv-inline-actions-center {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.adv-btn-block {
  width: 100%;
  justify-content: center;
}

.adv-warning-card {
  border-style: dashed;
  border-color: rgb(var(--warning));
}

.adv-warning-title {
  color: rgb(var(--warning));
}

.adv-warning-icon {
  color: rgb(var(--warning));
}

.adv-btn-warning {
  background: rgb(var(--warning));
  color: #000;
}

/* Dashboard/home helpers */
.adv-btn-start { justify-content: flex-start; }

.adv-link-reset {
  text-decoration: none;
}

.adv-card-overflow-hidden { overflow: hidden; }

.adv-card-head-bar {
  padding: 14px 22px;
  border-bottom: 1px solid rgb(var(--adv-border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adv-card-head-title {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  color: rgb(var(--foreground));
}

.adv-dashboard-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.adv-dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.adv-dashboard-metric-value {
  font-family: var(--adv-font-mono);
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.adv-time-mono {
  font-family: var(--adv-font-mono);
  font-size: 12.5px;
}

.adv-progress-meter {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  background: rgb(var(--muted));
}

.adv-progress-meter::-webkit-progress-bar {
  background: rgb(var(--muted));
  border-radius: 3px;
}

.adv-progress-meter::-webkit-progress-value { border-radius: 3px; }
.adv-progress-meter::-moz-progress-bar { border-radius: 3px; }

.adv-progress-meter.tone-success::-webkit-progress-value,
.adv-progress-meter.tone-success::-moz-progress-bar { background: rgb(var(--success)); }

.adv-progress-meter.tone-brand::-webkit-progress-value,
.adv-progress-meter.tone-brand::-moz-progress-bar { background: var(--adv-primary); }

.adv-progress-meter.tone-warning::-webkit-progress-value,
.adv-progress-meter.tone-warning::-moz-progress-bar { background: rgb(var(--warning)); }

.adv-progress-meter.tone-danger::-webkit-progress-value,
.adv-progress-meter.tone-danger::-moz-progress-bar { background: rgb(var(--destructive)); }

.adv-progress-meter.tone-purple::-webkit-progress-value,
.adv-progress-meter.tone-purple::-moz-progress-bar { background: #6B21A8; }

.adv-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.adv-inline-actions .adv-input,
.adv-inline-actions .adv-select,
.adv-inline-actions .adv-textarea {
  flex: 1;
  min-width: 180px;
}

.adv-data-list {
  display: flex;
  flex-direction: column;
}

.adv-data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgb(var(--adv-border) / 0.6);
}

.adv-data-row:last-child { border-bottom: 0; }

.adv-data-stack {
  flex: 1;
  min-width: 0;
}

.adv-data-label {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgb(var(--muted-foreground));
  margin-bottom: 2px;
}

.adv-data-value {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--foreground));
}

.adv-data-value.is-mono {
  font-family: var(--adv-font-mono);
  font-size: 13px;
}

.adv-data-value.is-muted {
  color: rgb(var(--muted-foreground));
  font-weight: 500;
}

.adv-data-aside { flex-shrink: 0; }

.adv-sticky-actions {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  box-shadow: var(--adv-shadow-sm);
}

.adv-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.adv-color-row input[type="color"] {
  width: 56px;
  height: 40px;
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  background: rgb(var(--card));
  padding: 2px;
  cursor: pointer;
}

.adv-mono-input { font-family: var(--adv-font-mono); }

.adv-note-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  background: var(--adv-accent-soft);
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
}

.dark .adv-note-box { background: rgba(20,184,166,0.10); }

.adv-note-box i {
  color: var(--adv-primary);
  margin-top: 3px;
}

.dark .adv-note-box i { color: var(--adv-accent); }

.adv-note-box p {
  margin: 0;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--foreground));
  line-height: 1.55;
}

.adv-inbox-list {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-lg);
  overflow: hidden;
}

.adv-inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid rgb(var(--adv-border));
  text-decoration: none;
  color: inherit;
  transition: background 120ms ease;
}

.adv-inbox-item:last-child { border-bottom: 0; }

.adv-inbox-item:hover {
  background: var(--adv-accent-soft);
  text-decoration: none;
  color: inherit;
}

.dark .adv-inbox-item:hover { background: rgba(20,184,166,0.06); }

.adv-time-chip {
  flex-shrink: 0;
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 600;
  color: rgb(var(--muted-foreground));
  padding: 4px 8px;
  background: rgb(var(--background));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-sm);
  white-space: nowrap;
}

.adv-inbox-body {
  flex: 1;
  min-width: 0;
}

.adv-inbox-title {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--foreground));
  margin: 0 0 4px;
}

.adv-inbox-preview {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.adv-inbox-chevron {
  flex-shrink: 0;
  color: rgb(var(--muted-foreground));
  align-self: center;
}

.adv-card-subtle-section {
  padding: 18px 22px;
  border-top: 1px solid rgb(var(--adv-border));
  background: rgb(var(--background));
}

.adv-brand-current {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.adv-brand-current-item img {
  max-height: 64px;
  padding: 6px 10px;
  background: rgb(var(--background));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-sm);
}

.adv-brand-current-item img.is-favicon { max-height: 40px; }

.adv-upload-preview { margin-bottom: 12px; }

.adv-upload-preview img {
  object-fit: contain;
}

.adv-upload-preview img.is-logo { max-height: 96px; }

.adv-upload-preview img.is-favicon { max-height: 64px; }

.adv-upload-trigger { cursor: pointer; }

.adv-brand-preview {
  --_pp: var(--adv-primary);
  padding: 24px;
  border-radius: var(--adv-radius-lg);
  background: linear-gradient(135deg, var(--_pp) 0%, rgba(255,255,255,0.10) 100%);
}

.adv-brand-preview-inner {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--adv-radius-md);
  padding: 22px;
}

.adv-brand-preview-inner h3 {
  font-family: var(--adv-font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--_pp);
  margin: 0 0 8px;
}

.adv-brand-preview-inner p {
  font-family: var(--adv-font-sans);
  font-size: 13.5px;
  color: rgb(var(--muted-foreground));
  margin: 0 0 14px;
}

.adv-brand-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--adv-font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: var(--_pp);
  border-radius: var(--adv-radius-md);
  border: 0;
  cursor: pointer;
}

.adv-dev-card {
  border-style: dashed;
  border-color: rgb(var(--warning));
}

/* ─── Shared client chrome helpers ───────────────────────────── */
.adv-client-rail {
  width: 280px;
  background: var(--app-surface);
}

.adv-app-border { border-color: var(--app-border) !important; }
.adv-app-text-strong { color: var(--app-text-strong); }
.adv-app-text-muted { color: var(--app-text-muted); }
.adv-app-text-subtle { color: var(--app-text-subtle); }
.adv-app-text-primary { color: var(--app-primary); }

.adv-client-shell-main { background: var(--app-surface-muted); }

.adv-client-topbar {
  background: var(--app-surface);
  border-color: var(--app-border) !important;
  z-index: 100;
}

.adv-nav-section-title {
  font-size: .65rem;
  letter-spacing: .08em;
  color: var(--app-text-subtle);
}

.adv-org-switcher-avatar {
  width: 2rem;
  height: 2rem;
  background: var(--app-primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
}

.adv-org-switcher-copy {
  min-width: 0;
  max-width: 11rem;
}

.adv-org-switcher-name {
  color: var(--app-text-strong);
  font-size: .8rem;
}

.adv-org-switcher-org {
  color: var(--app-text-muted);
  font-size: .72rem;
}

.adv-org-switcher-chevron { color: var(--app-text-muted); }

.adv-org-switcher-menu { min-width: 17rem; }

.adv-dev-card .adv-scard-label,
.adv-dev-card .adv-section-card-sub {
  color: rgb(var(--warning));
}

/* ==========================================================================
   PHASE 9 — Marketing hero ref-card + Killer-flow acceptance shell
   Adeva Pro design handoff (Section 1 + Section 2 light skin).
   Source of truth: _design-handoff-v2/project/{styles.css, acceptance.jsx,
   marketing.jsx}.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Marketing hero — right-side reference card
   --------------------------------------------------------------------------- */

.adv-hero-ref-card {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.04), 0 12px 32px -16px rgba(11, 18, 32, 0.18);
}

.adv-hero-ref-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.adv-hero-ref-eyebrow {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

.adv-hero-ref-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adv-primary);
  background: var(--adv-accent-soft);
  border-radius: 999px;
  padding: 4px 10px;
}

.adv-hero-ref-id {
  font-family: var(--adv-font-mono);
  font-size: 26px;
  font-weight: 700;
  color: rgb(var(--foreground));
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}

.adv-hero-ref-sub {
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin: 0 0 18px;
}

.adv-hero-ref-balance-box {
  background: rgb(var(--muted));
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.adv-hero-ref-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  color: rgb(var(--muted-foreground));
  margin-bottom: 6px;
}

.adv-hero-ref-balance {
  font-family: var(--adv-font-mono);
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 700;
  color: rgb(var(--foreground));
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.adv-hero-ref-progress {
  height: 6px;
  background: rgb(var(--card));
  border-radius: 999px;
  overflow: hidden;
}

.adv-hero-ref-progress > span {
  display: block;
  height: 100%;
  background: var(--adv-primary);
  border-radius: 999px;
}

/* ---------------------------------------------------------------------------
   Acceptance shell — used across killer-flow screens 02..08
   --------------------------------------------------------------------------- */

.adv-acc-page {
  background: rgb(var(--background));
  min-height: 100%;
}

.adv-acc-header {
  height: 56px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(var(--adv-border));
  background: rgb(var(--card));
}

.adv-acc-secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
}

.adv-acc-secure-pill i { color: var(--adv-primary); }

.adv-acc-progress-wrap {
  background: rgb(var(--card));
  padding: 16px 32px;
  border-bottom: 1px solid rgb(var(--adv-border));
}

.adv-acc-progress-inner {
  max-width: 980px;
  margin: 0 auto;
}

.adv-acc-body {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.adv-acc-body-narrow { grid-template-columns: 1fr; }

@media (max-width: 768px) {
  .adv-acc-body { grid-template-columns: 1fr; gap: 18px; padding: 22px 16px; }
  .adv-acc-header { padding: 0 16px; }
  .adv-acc-progress-wrap { padding: 14px 16px; }
}

.adv-acc-card {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--radius-lg);
  padding: 32px;
}

.adv-acc-card-narrow {
  max-width: 560px;
  margin: 0 auto;
}

.adv-acc-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--adv-accent-soft);
  color: var(--adv-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.adv-acc-h2 {
  font-family: var(--adv-font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: rgb(var(--foreground));
  margin: 0 0 8px;
}

.adv-acc-lede {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  color: rgb(var(--muted-foreground));
  line-height: 1.55;
  margin: 0 0 24px;
}

.adv-acc-info-strip {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgb(var(--muted));
  border-radius: 8px;
  margin-bottom: 20px;
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
}

.adv-acc-info-strip i {
  margin-top: 1px;
  flex-shrink: 0;
  color: rgb(var(--muted-foreground));
}

.adv-acc-cta {
  width: 100%;
  justify-content: center;
  padding: 12px 16px;
}

.adv-acc-cta-secondary {
  width: 100%;
  margin-top: 8px;
  color: rgb(var(--muted-foreground));
  background: transparent;
  border-color: transparent;
}

/* ---------------------------------------------------------------------------
   Killer-flow steps progress (3..6 step horizontal indicator)
   --------------------------------------------------------------------------- */

.adv-acc-steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.adv-acc-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
  white-space: nowrap;
}

.adv-acc-step.is-active { color: rgb(var(--foreground)); font-weight: 600; }
.adv-acc-step.is-done { color: rgb(var(--foreground)); }

.adv-acc-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--adv-font-mono);
  font-size: 11px;
  font-weight: 700;
  background: rgb(var(--card));
  color: rgb(var(--muted-foreground));
  border: 1.5px solid rgb(var(--adv-border));
}

.adv-acc-step.is-active .adv-acc-step-dot {
  background: var(--adv-primary);
  color: #052B26;
  border-color: var(--adv-primary);
}

.adv-acc-step.is-done .adv-acc-step-dot {
  background: var(--adv-accent-soft);
  color: var(--adv-primary);
  border-color: var(--adv-primary);
}

.adv-acc-step-line {
  flex: 1;
  height: 2px;
  background: rgb(var(--adv-border));
  margin: 0 12px;
  min-width: 24px;
}

.adv-acc-step.is-done + .adv-acc-step-line {
  background: var(--adv-primary);
}

/* ---------------------------------------------------------------------------
   Debt summary sidebar — sticky right column on acceptance shell
   --------------------------------------------------------------------------- */

.adv-debt-summary {
  position: sticky;
  top: 16px;
  align-self: flex-start;
}

.adv-debt-summary-card {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.adv-debt-summary-head {
  padding: 20px;
  border-bottom: 1px solid rgb(var(--adv-border));
}

.adv-debt-summary-eyebrow {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--muted-foreground));
  margin: 0 0 8px;
}

.adv-debt-summary-creditor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.adv-debt-summary-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--adv-primary);
  flex-shrink: 0;
}

.adv-debt-summary-creditor-name {
  font-family: var(--adv-font-sans);
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--foreground));
  line-height: 1.3;
}

.adv-debt-summary-ref {
  font-family: var(--adv-font-mono);
  font-size: 11px;
  color: rgb(var(--muted-foreground));
}

.adv-debt-summary-amount {
  font-family: var(--adv-font-mono);
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  font-weight: 700;
  color: rgb(var(--foreground));
  letter-spacing: -0.02em;
  margin: 0;
}

.adv-debt-summary-amount-sub {
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
  margin: 4px 0 0;
}

.adv-debt-summary-rows {
  padding: 20px;
}

.adv-debt-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
}

.adv-debt-summary-row > span:last-child { color: rgb(var(--foreground)); }
.adv-debt-summary-row.is-mono > span:last-child {
  font-family: var(--adv-font-mono);
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

.adv-debt-summary-foot {
  padding: 14px 16px;
  background: rgb(var(--muted));
  border-top: 1px solid rgb(var(--adv-border));
  display: flex;
  gap: 8px;
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
}

.adv-debt-summary-foot i {
  margin-top: 1px;
  flex-shrink: 0;
}

/* ==========================================================================
   PHASE 10 — Quick-Pay anonymous wizard
   Source of truth: _design-handoff-v2/project/marketing.jsx (QuickPayWizard).
   600px-wide wizard reused for the 4 unauthenticated steps:
     /Pay  → Reference
     /Pay/Verify
     /Pay/Amount
     /Pay/Stripe
   ========================================================================== */

.adv-qp-page {
  background: rgb(var(--background));
  min-height: 100%;
}

.adv-qp-body {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px;
}

.adv-qp-card {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 24px;
}

.adv-qp-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: rgb(var(--muted-foreground));
  font-family: var(--adv-font-sans);
  font-size: 12px;
}

.adv-qp-or > .line {
  flex: 1;
  height: 1px;
  background: rgb(var(--adv-border));
}

.adv-qp-balance-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgb(var(--muted));
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
}

.adv-qp-balance-amount {
  font-family: var(--adv-font-mono);
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 700;
  color: rgb(var(--foreground));
  letter-spacing: -0.02em;
  margin: 0;
}

.adv-qp-foot {
  margin-top: 12px;
  font-family: var(--adv-font-sans);
  font-size: 11px;
  color: rgb(var(--muted-foreground));
  text-align: center;
}

/* ==========================================================================
   PHASE 11 — Debtor portal (DARK Atlas)
   Source of truth: _design-handoff-v2/project/portal.jsx
                    + atlas.css (`bg-1`/`fg-2`/etc → mapped to dark RGB triplets)

   Scope: anything inside `.adv-portal-dark` gets the dark Atlas treatment.
   Existing token names are re-bound so nested .adv-card / .adv-btn / etc.
   inherit dark colours without per-component overrides.
   ========================================================================== */

.adv-portal-dark {
  --background: 11 14 19;            /* page bg */
  --card: 17 21 28;                  /* sidebar/header bg */
  --muted: 22 27 35;                 /* raised panel hover */
  --foreground: 245 246 250;         /* primary text */
  --muted-foreground: 156 163 175;   /* secondary text */
  --adv-border: 36 43 54;            /* divider */
  --adv-accent-soft: rgba(20, 184, 166, 0.12);
  background: rgb(var(--background));
  color: rgb(var(--foreground));
  min-height: 100vh;
}

.adv-portal-shell {
  display: flex;
  min-height: 100vh;
  background: rgb(var(--background));
}

.adv-portal-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: rgb(var(--card));
  border-right: 1px solid rgb(var(--adv-border));
  display: flex;
  flex-direction: column;
}

.adv-portal-sidebar-head {
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgb(var(--adv-border));
  display: flex;
  align-items: center;
  gap: 8px;
}

.adv-portal-sidebar-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--adv-font-mono);
  font-weight: 800;
  font-size: 14px;
  color: rgb(var(--foreground));
  text-decoration: none;
  letter-spacing: -0.01em;
}

.adv-portal-sidebar-logo span.adv-portal-logo-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--adv-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.adv-portal-nav {
  padding: 8px;
  flex: 1;
  overflow-y: auto;
}

.adv-portal-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-family: var(--adv-font-sans);
  font-size: 13px;
  font-weight: 500;
  color: rgb(var(--muted-foreground));
  text-decoration: none;
  margin-bottom: 1px;
  transition: background 0.12s, color 0.12s;
}

.adv-portal-nav-item:hover {
  background: rgb(var(--muted));
  color: rgb(var(--foreground));
}

.adv-portal-nav-item.is-active {
  background: var(--adv-accent-soft);
  color: var(--adv-primary);
  font-weight: 600;
}

.adv-portal-nav-item .adv-portal-nav-label { flex: 1; }

.adv-portal-nav-badge {
  font-family: var(--adv-font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgb(var(--muted));
  color: rgb(var(--foreground));
}

.adv-portal-nav-item.is-active .adv-portal-nav-badge {
  background: var(--adv-primary);
  color: #052B26;
}

.adv-portal-sidebar-foot {
  padding: 12px;
  border-top: 1px solid rgb(var(--adv-border));
  display: flex;
  align-items: center;
  gap: 10px;
}

.adv-portal-sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--adv-primary);
  color: #052B26;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--adv-font-sans);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.adv-portal-sidebar-user {
  flex: 1;
  min-width: 0;
}

.adv-portal-sidebar-user-name {
  font-family: var(--adv-font-sans);
  font-size: 12px;
  font-weight: 600;
  color: rgb(var(--foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adv-portal-sidebar-user-email {
  font-family: var(--adv-font-sans);
  font-size: 10px;
  color: rgb(var(--muted-foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adv-portal-main {
  flex: 1;
  overflow-y: auto;
  background: rgb(var(--background));
  display: flex;
  flex-direction: column;
}

.adv-portal-header {
  padding: 20px 28px;
  border-bottom: 1px solid rgb(var(--adv-border));
  background: rgb(var(--card));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.adv-portal-header-title {
  font-family: var(--adv-font-serif);
  font-size: 22px;
  font-weight: 700;
  color: rgb(var(--foreground));
  letter-spacing: -0.018em;
  margin: 0 0 2px;
}

.adv-portal-header-sub {
  font-family: var(--adv-font-sans);
  font-size: 12px;
  color: rgb(var(--muted-foreground));
  margin: 0;
}

.adv-portal-body {
  padding: 28px;
  flex: 1;
}

.adv-portal-card {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--radius-lg);
  padding: 24px;
}

.adv-portal-hero {
  background: linear-gradient(135deg, rgb(var(--muted)), rgb(var(--card)));
  border: 1px solid rgb(var(--adv-border));
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.adv-portal-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 1024px) {
  .adv-portal-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .adv-portal-shell { flex-direction: column; }
  .adv-portal-sidebar { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid rgb(var(--adv-border)); }
  .adv-portal-sidebar-foot { display: none; }
}

.adv-portal-money {
  font-family: var(--adv-font-mono);
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   PHASE 12 — Canonical logo lockup
   Source: _design-handoff-v2/project/styles.css → .logo / .logo-mark
   Used in every Adeva header (Accept shell, Quick-Pay, Portal sidebar,
   Onboarding wizard). Replaces the per-layout inline markup.
   ========================================================================== */

.adv-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--adv-font-sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: rgb(var(--foreground));
  text-decoration: none;
  line-height: 1;
}

.adv-logo:hover { text-decoration: none; color: rgb(var(--foreground)); }

.adv-logo-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--adv-primary) 0%, #0B2545 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.adv-logo-mark svg {
  width: 14px;
  height: 14px;
  display: block;
}

.adv-logo-wordmark {
  font-family: var(--adv-font-sans);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: rgb(var(--foreground));
  line-height: 1;
}

.adv-logo-wordmark span.adv-logo-plus { color: var(--adv-primary); }

/* Tighten the acceptance/quick-pay step indicator to design spec
   (22px dots, 1px connectors, dark-teal active text on light-teal bg). */
.adv-acc-step-dot {
  width: 22px;
  height: 22px;
  font-size: 11px;
  border-width: 1px;
}
.adv-acc-step.is-active .adv-acc-step-dot {
  color: #052B26;
}
.adv-acc-step-line {
  height: 1px;
  margin: 0 10px;
}
