/* ==========================================================================
   Components — shared across public site, Center, Buyer and Admin.
   One vocabulary, one set of colors, one behavior. This file is what makes
   the four surfaces read as a single product.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--blue-600);
  --btn-fg: #fff;
  --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px;
  font-family: var(--font-sans);
  font-size: var(--fs-base); font-weight: 650; letter-spacing: -0.008em;
  line-height: 1.2;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-md);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease), border-color var(--t) var(--ease),
              color var(--t) var(--ease);
  box-shadow: var(--sh-xs);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn[disabled], .btn.is-disabled {
  opacity: 0.48; pointer-events: none; box-shadow: none; transform: none;
}

.btn--primary { --btn-bg: var(--blue-600); box-shadow: var(--sh-blue-sm); }
.btn--primary:hover { --btn-bg: var(--blue-700); box-shadow: var(--sh-blue); }

.btn--red { --btn-bg: var(--red-600); box-shadow: var(--sh-red-sm); }
.btn--red:hover { --btn-bg: var(--red-700); }

.btn--dark { --btn-bg: var(--navy-900); }
.btn--dark:hover { --btn-bg: #16203a; }

.btn--outline {
  --btn-bg: #fff; --btn-fg: var(--navy-900); --btn-bd: var(--border-strong);
  box-shadow: var(--sh-sm);
}
.btn--outline:hover { --btn-bd: var(--blue-300); --btn-fg: var(--blue-700); background: var(--blue-50); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--slate-600); box-shadow: none; }
.btn--ghost:hover { --btn-bg: var(--slate-100); --btn-fg: var(--navy-900); transform: none; }

.btn--soft { --btn-bg: var(--blue-50); --btn-fg: var(--blue-700); --btn-bd: var(--blue-100); box-shadow: none; }
.btn--soft:hover { --btn-bg: var(--blue-100); }

.btn--soft-red { --btn-bg: var(--red-50); --btn-fg: var(--red-700); --btn-bd: var(--red-100); box-shadow: none; }
.btn--soft-red:hover { --btn-bg: var(--red-100); }

.btn--soft-ok { --btn-bg: var(--ok-50); --btn-fg: var(--ok-700); --btn-bd: var(--ok-100); box-shadow: none; }
.btn--soft-ok:hover { --btn-bg: var(--ok-100); }

.btn--on-dark {
  --btn-bg: rgba(255,255,255,0.08); --btn-fg: #fff; --btn-bd: rgba(255,255,255,0.22);
  backdrop-filter: blur(8px); box-shadow: none;
}
.btn--on-dark:hover { --btn-bg: rgba(255,255,255,0.15); --btn-bd: rgba(255,255,255,0.34); }

.btn--lg { padding: 15px 28px; font-size: var(--fs-md); border-radius: var(--r-lg); }
.btn--lg svg { width: 19px; height: 19px; }
.btn--sm { padding: 8px 14px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn--sm svg { width: 15px; height: 15px; }
.btn--xs { padding: 5px 10px; font-size: var(--fs-xs); border-radius: var(--r-xs); gap: 5px; }
.btn--xs svg { width: 13px; height: 13px; }
.btn--block { width: 100%; }
.btn--icon { padding: 9px; }
.btn--icon.btn--sm { padding: 7px; }

.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* Text link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 650; font-size: var(--fs-base); color: var(--blue-600);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform var(--t) var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   2. Cards & surfaces
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  position: relative;
}
.card--pad { padding: var(--s-6); }
.card--pad-sm { padding: var(--s-4); }
.card--pad-lg { padding: var(--s-8); }
.card--flat { box-shadow: none; }
.card--inset { background: var(--surface-inset); border-color: var(--border-soft); box-shadow: none; }
.card--raised { box-shadow: var(--sh-lg); }
.card--hover { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease); }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--blue-200); }
.card--glass {
  background: var(--surface-glass);
  backdrop-filter: blur(14px) saturate(1.4);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: var(--sh-lg);
}
.card--dark {
  background: linear-gradient(165deg, var(--navy-900), #0a1020);
  border-color: rgba(255,255,255,0.09); color: #fff;
}
.card--dark h1,.card--dark h2,.card--dark h3,.card--dark h4,.card--dark h5 { color:#fff; }
.card--dark .muted { color: var(--text-invert-muted); }

/* Accent rail — the single most reused status affordance */
.card--rail::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--blue-600);
}
.card--rail-red::before { background: var(--red-600); }
.card--rail-ok::before { background: var(--ok-500); }
.card--rail-warn::before { background: var(--warn-500); }
.card--rail-muted::before { background: var(--slate-300); }

.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--border-soft);
}
.card-head h3, .card-head h4 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: var(--tr-snug); }
.card-head .card-sub { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 2px; }
.card-body { padding: var(--s-6); }
.card-body--tight { padding: var(--s-4); }
.card-foot {
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--border-soft);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* --------------------------------------------------------------------------
   3. Badges, pills & status vocabulary
   Status colors are FIXED platform-wide. Never re-map them per screen.
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: var(--fs-xs); font-weight: 650; line-height: 1.45;
  letter-spacing: -0.005em; white-space: nowrap;
  background: var(--slate-100); color: var(--slate-600);
  border: 1px solid transparent;
}
.badge svg { width: 13px; height: 13px; flex: none; }
.badge--sm { padding: 2px 8px; font-size: var(--fs-2xs); }
.badge--lg { padding: 6px 14px; font-size: var(--fs-sm); }

.badge--live   { background: var(--ok-50);   color: var(--ok-700);   border-color: #a7f3d0; }
.badge--ok     { background: var(--ok-50);   color: var(--ok-700);   border-color: #a7f3d0; }
.badge--blue   { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.badge--info   { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.badge--warn   { background: var(--warn-50); color: var(--warn-700); border-color: #fde68a; }
.badge--risk   { background: var(--risk-50); color: var(--risk-700); border-color: #fecaca; }
.badge--red    { background: var(--red-50);  color: var(--red-700);  border-color: var(--red-100); }
.badge--violet { background: var(--violet-50); color: var(--violet-600); border-color: #ddd6fe; }
.badge--neutral{ background: var(--slate-100); color: var(--slate-600); border-color: var(--slate-200); }
.badge--dark   { background: var(--navy-900); color: #fff; }
.badge--outline{ background: #fff; color: var(--slate-600); border-color: var(--border-strong); }

/* Status dot */
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--slate-400); }
.dot--live { background: var(--ok-500); box-shadow: 0 0 0 3px var(--ok-100); }
.dot--warn { background: var(--warn-500); box-shadow: 0 0 0 3px var(--warn-100); }
.dot--risk { background: var(--risk-500); box-shadow: 0 0 0 3px var(--risk-100); }
.dot--blue { background: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-100); }
.dot--off  { background: var(--slate-300); box-shadow: 0 0 0 3px var(--slate-100); }

.dot--pulse { animation: dotPulse 2.4s var(--ease) infinite; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--ok-100); }
  50%      { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12); }
}

/* Verified partner badge — the trust mark */
.verified-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px 8px 10px; border-radius: var(--r-full);
  background: linear-gradient(120deg, var(--blue-50), #fff 62%);
  border: 1px solid var(--blue-200);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}
.verified-badge .vb-check {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--blue-500), var(--blue-800));
  box-shadow: 0 2px 6px rgba(27, 98, 212, 0.4);
}
.verified-badge .vb-check svg { width: 15px; height: 15px; }
.verified-badge .vb-text { display: flex; flex-direction: column; line-height: 1.15; }
.verified-badge .vb-label {
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: var(--tr-caps);
  text-transform: uppercase; color: var(--blue-700);
}
.verified-badge .vb-name { font-size: var(--fs-sm); font-weight: 700; color: var(--navy-900); }
.verified-badge--lg { padding: 12px 22px 12px 14px; }
.verified-badge--lg .vb-check { width: 34px; height: 34px; }
.verified-badge--lg .vb-check svg { width: 19px; height: 19px; }
.verified-badge--lg .vb-name { font-size: var(--fs-md); }

/* Tier chips — the six center tiers, fixed colors */
.tier { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
        border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 700;
        border: 1px solid transparent; white-space: nowrap; }
.tier::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tier--preferred { background: linear-gradient(120deg, #fff5f4, #fff); color: var(--red-700); border-color: var(--red-200); }
.tier--verified  { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-200); }
.tier--new       { background: var(--slate-100); color: var(--slate-600); border-color: var(--slate-200); }
.tier--review    { background: var(--warn-50); color: var(--warn-700); border-color: #fde68a; }
.tier--suspended { background: var(--risk-50); color: var(--risk-700); border-color: #fecaca; }
.tier--terminated{ background: var(--slate-800); color: #fff; }

/* Placeholder marker — makes unverified stats impossible to ship by accident */
.ph {
  background: repeating-linear-gradient(135deg, var(--warn-50), var(--warn-50) 7px, #fffdf5 7px, #fffdf5 14px);
  border: 1px dashed var(--warn-500); color: var(--warn-700);
  padding: 1px 7px; border-radius: var(--r-xs); font-size: 0.86em; font-weight: 650;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   4. Stats & metrics
   -------------------------------------------------------------------------- */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-label {
  font-size: var(--fs-xs); font-weight: 650; color: var(--text-muted);
  letter-spacing: 0.03em; text-transform: uppercase;
}
.stat-value {
  font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 800;
  letter-spacing: var(--tr-tight); color: var(--text-strong);
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.stat-value--sm { font-size: var(--fs-2xl); }
.stat-value--lg { font-size: var(--fs-4xl); }
.stat-meta { font-size: var(--fs-sm); color: var(--text-muted); }
.stat-delta { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 650; }
.stat-delta--up { color: var(--ok-600); }
.stat-delta--down { color: var(--risk-600); }
.stat-delta--flat { color: var(--slate-500); }
.stat-delta svg { width: 13px; height: 13px; }

.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--sh-sm); position: relative; overflow: hidden;
}
.stat-card .stat-ico {
  position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--blue-50); color: var(--blue-600);
}
.stat-card .stat-ico svg { width: 17px; height: 17px; }
.stat-card .stat-ico--red { background: var(--red-50); color: var(--red-600); }
.stat-card .stat-ico--ok { background: var(--ok-50); color: var(--ok-600); }
.stat-card .stat-ico--warn { background: var(--warn-50); color: var(--warn-600); }
.stat-card .stat-ico--violet { background: var(--violet-50); color: var(--violet-600); }
.stat-card .stat-ico--slate { background: var(--slate-100); color: var(--slate-500); }

/* --------------------------------------------------------------------------
   5. Progress, meters & score visualizations
   -------------------------------------------------------------------------- */
.meter { height: 7px; border-radius: var(--r-full); background: var(--slate-150); overflow: hidden; }
.meter__fill {
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-700));
  transition: width 900ms var(--ease-out);
}
.meter--sm { height: 5px; }
.meter--lg { height: 10px; }
.meter--ok .meter__fill { background: linear-gradient(90deg, var(--ok-500), var(--ok-700)); }
.meter--warn .meter__fill { background: linear-gradient(90deg, var(--warn-500), var(--warn-700)); }
.meter--risk .meter__fill { background: linear-gradient(90deg, var(--risk-500), var(--risk-700)); }
.meter--red .meter__fill { background: linear-gradient(90deg, var(--brand-red-light), var(--brand-red)); }

/* Segmented meter (used for trust factor breakdowns) */
.seg-meter { display: flex; gap: 3px; }
.seg-meter i { flex: 1; height: 6px; border-radius: 2px; background: var(--slate-150); }
.seg-meter i.on { background: var(--blue-600); }
.seg-meter.ok i.on { background: var(--ok-500); }
.seg-meter.warn i.on { background: var(--warn-500); }
.seg-meter.risk i.on { background: var(--risk-500); }

/* Radial score ring */
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring__track { fill: none; stroke: var(--slate-150); }
.ring__bar {
  fill: none; stroke: var(--blue-600); stroke-linecap: round;
  transition: stroke-dashoffset 1100ms var(--ease-out);
}
.ring--ok .ring__bar { stroke: var(--ok-500); }
.ring--warn .ring__bar { stroke: var(--warn-500); }
.ring--risk .ring__bar { stroke: var(--risk-500); }
.ring--red .ring__bar { stroke: var(--red-600); }
.ring__center {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-align: center; line-height: 1.05;
}
.ring__num {
  font-family: var(--font-display); font-weight: 800; letter-spacing: var(--tr-tight);
  color: var(--text-strong); font-variant-numeric: tabular-nums;
}
.ring__cap { font-size: var(--fs-2xs); font-weight: 650; color: var(--text-muted);
             text-transform: uppercase; letter-spacing: var(--tr-caps); }

/* Checklist of matched criteria — the "why this score" pattern */
.criteria { display: flex; flex-direction: column; gap: 9px; }
.criteria li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-base); }
.criteria .ck {
  width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--ok-50); color: var(--ok-600);
}
.criteria .ck svg { width: 12px; height: 12px; }
.criteria .ck--no { background: var(--slate-100); color: var(--slate-400); }
.criteria .ck--warn { background: var(--warn-50); color: var(--warn-600); }
.criteria .ck--risk { background: var(--risk-50); color: var(--risk-600); }
.criteria li.off { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   6. Steps, timelines & launch trackers
   -------------------------------------------------------------------------- */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: var(--s-4); position: relative; padding-bottom: var(--s-5); }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px;
  background: var(--slate-150);
}
.step:last-child::before { display: none; }
.step__mark {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--fs-xs); font-weight: 700; z-index: 1;
  background: #fff; border: 2px solid var(--slate-200); color: var(--slate-400);
}
.step__mark svg { width: 14px; height: 14px; }
.step__title { font-weight: 650; color: var(--text-strong); font-size: var(--fs-base); }
.step__desc { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 3px; }
.step__meta { font-size: var(--fs-xs); color: var(--text-subtle); margin-top: 5px; }

.step.done .step__mark { background: var(--ok-500); border-color: var(--ok-500); color: #fff; }
.step.done::before { background: var(--ok-500); }
.step.current .step__mark {
  background: var(--blue-600); border-color: var(--blue-600); color: #fff;
  box-shadow: 0 0 0 4px var(--blue-100);
}
.step.current .step__title { color: var(--blue-700); }
.step.blocked .step__mark { background: var(--warn-50); border-color: var(--warn-500); color: var(--warn-700); }
.step.failed .step__mark { background: var(--risk-500); border-color: var(--risk-500); color: #fff; }

/* Horizontal stepper (wizards) */
.stepper { display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.stepper__item { display: flex; align-items: center; gap: 9px; flex: none; padding-right: 6px; }
.stepper__num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--fs-xs); font-weight: 700;
  background: #fff; border: 1.5px solid var(--slate-200); color: var(--slate-400);
}
.stepper__num svg { width: 13px; height: 13px; }
.stepper__label { font-size: var(--fs-sm); font-weight: 600; color: var(--slate-400); white-space: nowrap; }
.stepper__line { width: 26px; height: 1.5px; background: var(--slate-200); flex: none; margin-inline: 4px; }
.stepper__item.done .stepper__num { background: var(--ok-500); border-color: var(--ok-500); color: #fff; }
.stepper__item.done .stepper__label { color: var(--slate-600); }
.stepper__item.done + .stepper__line { background: var(--ok-500); }
.stepper__item.current .stepper__num { background: var(--blue-600); border-color: var(--blue-600); color: #fff; box-shadow: 0 0 0 3px var(--blue-100); }
.stepper__item.current .stepper__label { color: var(--blue-700); font-weight: 700; }

/* Flow chips — the arrow chain used across marketing + admin */
.flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flow__node {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--r-md);
  background: #fff; border: 1px solid var(--border); box-shadow: var(--sh-xs);
  font-size: var(--fs-sm); font-weight: 650; color: var(--navy-900);
}
.flow__node.is-active { border-color: var(--blue-300); background: var(--blue-50); color: var(--blue-700); }
.flow__node.is-final { border-color: #a7f3d0; background: var(--ok-50); color: var(--ok-700); }
.flow__arrow { color: var(--slate-300); flex: none; display: grid; place-items: center; }
.flow__arrow svg { width: 15px; height: 15px; }
.flow--vertical { flex-direction: column; align-items: stretch; }
.flow--vertical .flow__arrow { transform: rotate(90deg); }

/* Activity timeline */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 26px 1fr; gap: var(--s-3); position: relative; padding-bottom: var(--s-5); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 12px; top: 24px; bottom: 0; width: 1.5px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--slate-100); color: var(--slate-500); z-index: 1; border: 2px solid #fff;
}
.tl-dot svg { width: 12px; height: 12px; }
.tl-dot--ok { background: var(--ok-50); color: var(--ok-600); }
.tl-dot--blue { background: var(--blue-50); color: var(--blue-600); }
.tl-dot--warn { background: var(--warn-50); color: var(--warn-600); }
.tl-dot--risk { background: var(--risk-50); color: var(--risk-600); }
.tl-title { font-size: var(--fs-base); font-weight: 600; color: var(--text-strong); }
.tl-meta { font-size: var(--fs-xs); color: var(--text-subtle); margin-top: 2px; }
.tl-body { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 5px; }

/* --------------------------------------------------------------------------
   7. Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: var(--fs-sm); font-weight: 650; color: var(--slate-700); display: flex; align-items: center; gap: 6px; }
.label .req { color: var(--red-600); }
.label .opt { color: var(--text-subtle); font-weight: 500; font-size: var(--fs-xs); }
.hint { font-size: var(--fs-xs); color: var(--text-muted); }
.err { font-size: var(--fs-xs); color: var(--risk-600); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.err svg { width: 13px; height: 13px; }

.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  font-size: var(--fs-base); font-family: var(--font-sans); color: var(--text);
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--r-md);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t) var(--ease);
  box-shadow: var(--sh-xs);
}
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--slate-300); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: var(--focus-ring);
}
.input[disabled], .select[disabled], .textarea[disabled] { background: var(--surface-3); color: var(--text-muted); cursor: not-allowed; }
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--risk-500); }
.textarea { min-height: 108px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.input--sm { padding: 8px 11px; font-size: var(--fs-sm); }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-left: 40px; }
.input-group__ico { position: absolute; left: 13px; color: var(--text-subtle); pointer-events: none; display: grid; }
.input-group__ico svg { width: 16px; height: 16px; }
.input-group__suffix { position: absolute; right: 13px; font-size: var(--fs-sm); color: var(--text-muted); font-weight: 600; }
.input-group--suffix .input { padding-right: 52px; }

/* Choice chips (multi-select for states, verticals, etc.) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-full);
  background: #fff; border: 1px solid var(--border-strong);
  font-size: var(--fs-sm); font-weight: 600; color: var(--slate-600);
  cursor: pointer; user-select: none;
  transition: all var(--t) var(--ease);
}
.chip:hover { border-color: var(--blue-300); color: var(--blue-700); background: var(--blue-50); }
.chip.is-on { background: var(--blue-600); border-color: var(--blue-600); color: #fff; box-shadow: var(--sh-blue-sm); }
.chip.is-on:hover { background: var(--blue-700); }
.chip svg { width: 14px; height: 14px; }
.chip--sm { padding: 5px 11px; font-size: var(--fs-xs); }
.chip--static { cursor: default; }
.chip--static:hover { border-color: var(--border-strong); color: var(--slate-600); background: #fff; }

/* Selectable option cards (radio/checkbox as card) */
.opt-card {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4); border-radius: var(--r-md);
  border: 1.5px solid var(--border); background: #fff; cursor: pointer;
  transition: all var(--t) var(--ease);
}
.opt-card:hover { border-color: var(--blue-300); background: var(--blue-50); }
.opt-card.is-on { border-color: var(--blue-600); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(37,99,235,0.09); }
.opt-card__box {
  width: 19px; height: 19px; border-radius: 6px; flex: none; margin-top: 1px;
  border: 1.5px solid var(--border-strong); background: #fff;
  display: grid; place-items: center; color: transparent;
  transition: all var(--t) var(--ease);
}
.opt-card__box svg { width: 12px; height: 12px; }
.opt-card.is-on .opt-card__box { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.opt-card--radio .opt-card__box { border-radius: 50%; }
/* These stack, so they must be block even when authored as <span>. */
.opt-card__title { display: block; font-weight: 650; font-size: var(--fs-base); color: var(--text-strong); }
.opt-card__desc { display: block; font-size: var(--fs-sm); color: var(--text-muted); margin-top: 3px; line-height: 1.5; }

/* Toggle */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle__track {
  width: 40px; height: 23px; border-radius: var(--r-full); background: var(--slate-300);
  position: relative; transition: background-color var(--t) var(--ease); flex: none;
}
.toggle__track::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: var(--sh-sm);
  transition: transform var(--t) var(--ease);
}
.toggle.is-on .toggle__track { background: var(--blue-600); }
.toggle.is-on .toggle__track::after { transform: translateX(17px); }
.toggle__label { font-size: var(--fs-sm); font-weight: 600; color: var(--slate-700); }

/* Fieldset grouping used through the long onboarding forms */
.fieldset { display: flex; flex-direction: column; gap: var(--s-5); }
.fieldset__head { display: flex; flex-direction: column; gap: 3px; }
.fieldset__title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; letter-spacing: var(--tr-snug); }
.fieldset__desc { font-size: var(--fs-sm); color: var(--text-muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* File / upload dropzone */
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md);
  padding: var(--s-6); text-align: center; background: var(--surface-inset);
  transition: all var(--t) var(--ease); cursor: pointer;
}
.dropzone:hover { border-color: var(--blue-400); background: var(--blue-50); }
.dropzone__ico { width: 38px; height: 38px; margin: 0 auto 10px; border-radius: var(--r-md);
  background: #fff; border: 1px solid var(--border); display: grid; place-items: center; color: var(--blue-600); }
.file-row {
  display: flex; align-items: center; gap: var(--s-3); padding: 11px 14px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: #fff;
}
.file-row__ico { width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--blue-50);
  color: var(--blue-600); display: grid; place-items: center; flex: none; }

/* --------------------------------------------------------------------------
   8. Tables (with mobile card transformation)
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-base); }
/* Scroll rather than crush: a data table needs room for its columns. */
.table-wrap > .table { min-width: 720px; }
.table-wrap > .table--wide { min-width: 920px; }
.table thead th {
  text-align: left; padding: 11px var(--s-4);
  font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.035em; text-transform: uppercase;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
}
.table thead th:first-child { border-radius: var(--r-md) 0 0 0; }
.table thead th:last-child { border-radius: 0 var(--r-md) 0 0; }
.table tbody td { padding: 13px var(--s-4); border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.table tbody tr { transition: background-color var(--t-fast) var(--ease); }
.table tbody tr:hover { background: var(--surface-inset); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .t-actions { text-align: right; white-space: nowrap; }
.table--compact tbody td { padding: 9px var(--s-3); }
.table--compact thead th { padding: 8px var(--s-3); }

.cell-primary { display: block; font-weight: 650; color: var(--text-strong); }
.cell-sub { display: block; font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }

@media (max-width: 860px) {
  .table-wrap > .table--responsive { min-width: 0; }
  .table--responsive thead { display: none; }
  .table--responsive, .table--responsive tbody, .table--responsive tr, .table--responsive td { display: block; width: 100%; }
  .table--responsive tr {
    border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px;
    padding: var(--s-4); background: #fff; box-shadow: var(--sh-xs);
  }
  .table--responsive tbody td { border: none; padding: 5px 0; display: flex; justify-content: space-between; gap: var(--s-4); align-items: center; }
  .table--responsive tbody td::before {
    content: attr(data-th); font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.03em; flex: none;
  }
  .table--responsive td.t-actions { justify-content: flex-end; padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--border-soft); }
  .table--responsive td.t-actions::before { margin-right: auto; }
  .table--responsive .num { text-align: right; }
}

/* --------------------------------------------------------------------------
   9. Avatars & identity
   -------------------------------------------------------------------------- */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm);
  color: #fff; background: linear-gradient(148deg, var(--blue-500), var(--blue-800));
  letter-spacing: 0.01em; overflow: hidden;
}
.avatar--sm { width: 28px; height: 28px; font-size: var(--fs-xs); }
.avatar--lg { width: 52px; height: 52px; font-size: var(--fs-md); }
.avatar--xl { width: 72px; height: 72px; font-size: var(--fs-xl); }
.avatar--red { background: linear-gradient(148deg, var(--brand-red-light), var(--brand-red-deep)); }
.avatar--slate { background: linear-gradient(148deg, var(--slate-400), var(--slate-600)); }
.avatar--violet { background: linear-gradient(148deg, #a78bfa, #6d28d9); }
.avatar--square { border-radius: var(--r-md); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid #fff; margin-left: -9px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.identity { display: flex; align-items: center; gap: var(--s-3); }
.identity__name { font-weight: 650; color: var(--text-strong); font-size: var(--fs-base); }
.identity__meta { font-size: var(--fs-xs); color: var(--text-muted); }

/* Company logo tile placeholder */
.logo-tile {
  width: 44px; height: 44px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: var(--fs-base);
  background: var(--surface-3); color: var(--slate-500); border: 1px solid var(--border);
  font-family: var(--font-display);
}

/* --------------------------------------------------------------------------
   10. Alerts, banners & callouts
   -------------------------------------------------------------------------- */
.alert {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4); border-radius: var(--r-md);
  border: 1px solid var(--blue-100); background: var(--blue-50);
  font-size: var(--fs-base);
}
.alert__ico { width: 20px; height: 20px; flex: none; color: var(--blue-600); margin-top: 1px; }
.alert__title { font-weight: 700; color: var(--navy-900); margin-bottom: 3px; }
.alert__body { color: var(--slate-600); font-size: var(--fs-sm); line-height: 1.55; }
.alert--warn { background: var(--warn-50); border-color: #fde68a; }
.alert--warn .alert__ico { color: var(--warn-600); }
.alert--risk { background: var(--risk-50); border-color: #fecaca; }
.alert--risk .alert__ico { color: var(--risk-600); }
.alert--ok { background: var(--ok-50); border-color: #a7f3d0; }
.alert--ok .alert__ico { color: var(--ok-600); }
.alert--neutral { background: var(--surface-2); border-color: var(--border); }
.alert--neutral .alert__ico { color: var(--slate-500); }

/* Blocker list — "the blocker is always named" */
.blockers { display: flex; flex-direction: column; gap: 8px; }
.blocker {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px;
  background: var(--warn-50); border: 1px solid #fde68a; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600; color: var(--warn-700);
}
.blocker svg { width: 15px; height: 15px; flex: none; }
.blocker .push { font-weight: 650; }

/* --------------------------------------------------------------------------
   11. Tabs & segmented controls
   -------------------------------------------------------------------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 11px 16px; font-size: var(--fs-base); font-weight: 650; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
  background: none; border-top: 0; border-left: 0; border-right: 0;
  transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
  display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--navy-900); }
.tab.is-on { color: var(--blue-700); border-bottom-color: var(--blue-600); }
.tab__count {
  font-size: var(--fs-2xs); font-weight: 700; padding: 1px 7px; border-radius: var(--r-full);
  background: var(--slate-100); color: var(--slate-600);
}
.tab.is-on .tab__count { background: var(--blue-100); color: var(--blue-700); }

.segmented {
  display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 3px; gap: 2px;
  background: var(--surface-3); border-radius: var(--r-md); border: 1px solid var(--border-soft);
}
.segmented button {
  padding: 7px 15px; border: 0; background: transparent; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 650; color: var(--text-muted); cursor: pointer;
  transition: all var(--t) var(--ease); white-space: nowrap;
}
.segmented button:hover { color: var(--navy-900); }
.segmented button.is-on { background: #fff; color: var(--navy-900); box-shadow: var(--sh-sm); }

.tabpanel[hidden] { display: none; }

/* --------------------------------------------------------------------------
   12. Empty & loading states
   -------------------------------------------------------------------------- */
.empty { text-align: center; padding: var(--s-12) var(--s-6); }
.empty__ico {
  width: 56px; height: 56px; margin: 0 auto var(--s-4); border-radius: var(--r-lg);
  background: var(--surface-3); color: var(--slate-400); display: grid; place-items: center;
}
.empty__ico svg { width: 26px; height: 26px; }
.empty__title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; color: var(--navy-900); }
.empty__desc { font-size: var(--fs-base); color: var(--text-muted); margin-top: 6px; max-width: 400px; margin-inline: auto; }

/* --------------------------------------------------------------------------
   13. Charts (lightweight, CSS/SVG — no library)
   -------------------------------------------------------------------------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bars__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 100%; }
.bars__bar {
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--blue-400), var(--blue-600));
  min-height: 3px; transition: height 700ms var(--ease-out);
}
.bars__bar--soft { background: linear-gradient(180deg, var(--blue-200), var(--blue-300)); }
.bars__bar--red { background: linear-gradient(180deg, var(--red-400), var(--red-600)); }
.bars__lab { font-size: var(--fs-2xs); color: var(--text-subtle); text-align: center; font-weight: 600; }

.spark { display: block; width: 100%; height: 44px; }
.spark path { fill: none; stroke: var(--blue-600); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .area { fill: url(#sparkGrad); stroke: none; }

.legend { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600; }
.legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--blue-600); }

/* Donut / distribution bar */
.dist { display: flex; height: 9px; border-radius: var(--r-full); overflow: hidden; background: var(--slate-150); }
.dist i { height: 100%; }

/* --------------------------------------------------------------------------
   14. Misc
   -------------------------------------------------------------------------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px var(--s-5); font-size: var(--fs-base); align-items: baseline; }
.kv dt { color: var(--text-muted); font-size: var(--fs-sm); }
.kv dd { margin: 0; font-weight: 600; color: var(--text-strong); }
.kv--rows { grid-template-columns: 1fr; gap: 0; }
.kv--rows > div {
  display: flex; justify-content: space-between; gap: var(--s-4); align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap;
}
.kv--rows > div > * { min-width: 0; }
.kv--rows > div:last-child { border-bottom: none; }
.kv--rows dt { color: var(--text-muted); font-size: var(--fs-sm); }
.kv--rows dd { margin: 0; font-weight: 650; color: var(--text-strong); text-align: right; }

.divider-label { display: flex; align-items: center; gap: var(--s-4); color: var(--text-subtle); font-size: var(--fs-xs);
  font-weight: 700; text-transform: uppercase; letter-spacing: var(--tr-caps); }
.divider-label::before, .divider-label::after { content: ""; height: 1px; background: var(--border); flex: 1; }

.tooltip-host { position: relative; display: inline-flex; }
/* display toggle rather than opacity: a nowrap absolutely-positioned tooltip
   still contributes to document scroll width while hidden, which overflows
   narrow viewports. */
.tooltip {
  display: none;
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--navy-900); color: #fff; padding: 7px 11px; border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 500; z-index: var(--z-modal);
  max-width: min(260px, 78vw); width: max-content; text-align: center; line-height: 1.4;
  pointer-events: none; box-shadow: var(--sh-lg);
}
.tooltip-host:hover .tooltip, .tooltip-host:focus-within .tooltip { display: block; }

.help {
  width: 15px; height: 15px; border-radius: 50%; background: var(--slate-200); color: var(--slate-600);
  font-size: 10px; font-weight: 800; display: inline-grid; place-items: center; cursor: help; flex: none;
}

.scroll-y { overflow-y: auto; scrollbar-width: thin; }
.scroll-y::-webkit-scrollbar { width: 8px; }
.scroll-y::-webkit-scrollbar-thumb { background: var(--slate-200); border-radius: 4px; }
.scroll-y::-webkit-scrollbar-track { background: transparent; }

/* Evidence / log output — fraud investigation, audit trails, worked examples */
.evidence {
  background: var(--surface-inset); border: 1px solid var(--border-soft); border-radius: var(--r-md);
  padding: var(--s-4); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--slate-700);
  line-height: 1.75; overflow-x: auto;
  /* Column-aligned output: preserve it, and scroll rather than reflow so the
     alignment survives on narrow viewports. */
  white-space: pre; tab-size: 2;
}
.evidence .k { color: var(--slate-500); }
.evidence .flag { color: var(--risk-600); font-weight: 700; }
.evidence .ok { color: var(--ok-600); font-weight: 700; }

.code-inline {
  font-family: var(--font-mono); font-size: 0.86em; padding: 2px 7px;
  background: var(--surface-3); border: 1px solid var(--border-soft); border-radius: var(--r-xs); color: var(--slate-700);
}

/* Notification list item */
.notif {
  display: grid; grid-template-columns: 36px 1fr auto; gap: var(--s-3);
  padding: var(--s-4); border-bottom: 1px solid var(--border-soft);
  transition: background-color var(--t-fast) var(--ease);
}
.notif:hover { background: var(--surface-inset); }
.notif.unread { background: linear-gradient(90deg, rgba(37,99,235,0.045), transparent 40%); }
.notif.unread .notif__title::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-600);
  display: inline-block; margin-left: 7px; vertical-align: middle;
}
.notif__ico { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; }
.notif__ico svg { width: 17px; height: 17px; }
.notif__title { font-weight: 650; font-size: var(--fs-base); color: var(--text-strong); }
.notif__body { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.notif__time { font-size: var(--fs-xs); color: var(--text-subtle); white-space: nowrap; }

/* Modal (static representation for the prototype) */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(11, 19, 36, 0.42);
  backdrop-filter: blur(3px); z-index: var(--z-modal);
  display: grid; place-items: center; padding: var(--s-6);
}
.modal {
  background: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-xl);
  width: 100%; max-width: 520px; overflow: hidden;
}
.modal__head { padding: var(--s-6) var(--s-6) var(--s-4); }
.modal__body { padding: 0 var(--s-6) var(--s-6); }
.modal__foot { padding: var(--s-4) var(--s-6); background: var(--surface-2); border-top: 1px solid var(--border-soft);
  display: flex; justify-content: flex-end; gap: 10px; }
