/* ==========================================================================
   Wealth360 — Design System
   Brand anchor: Wealth360 logo (navy #082B45, teal #0C8A87, gold #D2AE55)
   ========================================================================== */

:root {
  /* --- Brand ---------------------------------------------------------- */
  --brand-navy:      #082B45;
  --brand-navy-deep: #051D2F;
  --brand-navy-lift: #0E3A59;
  --brand-teal:      #0C8A87;
  --brand-teal-dark: #076B69;
  --brand-teal-soft: #E2F1F0;
  --brand-gold:      #D2AE55;
  --brand-gold-deep: #9B7626;
  --brand-gold-soft: #FBF3DF;

  /* --- Neutrals (cool, navy-biased) ----------------------------------- */
  --ground:        #F2F5F8;
  --surface:       #FFFFFF;
  --surface-2:     #F8FAFC;
  --surface-sunk:  #EDF1F5;
  --line:          #DCE4EC;
  --line-strong:   #C3CFDA;
  --ink:           #0F2233;
  --ink-2:         #3B5063;
  --ink-muted:     #6A7F91;
  --ink-faint:     #94A5B4;
  --on-brand:      #F1F7F9;
  --on-brand-dim:  #9BB4C6;

  /* --- Semantic (state) ----------------------------------------------- */
  --ok:        #10704F;
  --ok-bg:     #E3F3EC;
  --ok-line:   #B3DCC9;
  --warn:      #97600C;
  --warn-bg:   #FCF1DC;
  --warn-line: #EBD1A0;
  --crit:      #A82A24;
  --crit-bg:   #FBE9E7;
  --crit-line: #EFC1BC;
  --info:      #1F5E9E;
  --info-bg:   #E6EFF8;
  --info-line: #B9D2EA;
  --neutral:      #4A5F71;
  --neutral-bg:   #EDF1F5;
  --neutral-line: #D3DDE6;

  /* --- Elevation / form ------------------------------------------------ */
  --r-sm: 3px;
  --r:    5px;
  --r-lg: 8px;
  --shadow-1: 0 1px 2px rgba(8,43,69,.06), 0 1px 1px rgba(8,43,69,.04);
  --shadow-2: 0 4px 14px rgba(8,43,69,.10), 0 1px 3px rgba(8,43,69,.06);
  --shadow-3: 0 18px 48px rgba(5,29,47,.24);

  /* --- Type ------------------------------------------------------------ */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- Shell metrics --------------------------------------------------- */
  --rail: 246px;
  --topbar: 56px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:       #071824;
    --surface:      #0C2433;
    --surface-2:    #102D3E;
    --surface-sunk: #0A1F2C;
    --line:         #1B3A4D;
    --line-strong:  #2A4D62;
    --ink:          #E4EDF3;
    --ink-2:        #BACBD8;
    --ink-muted:    #8EA6B6;
    --ink-faint:    #6B8395;
    --brand-navy:      #0A2438;
    --brand-navy-deep: #06192A;
    --brand-navy-lift: #14415F;
    --brand-teal:      #17A6A2;
    --brand-teal-soft: #0F3A3A;
    --brand-gold-soft: #3A2F13;
    --ok:        #5FCEA4;
    --ok-bg:     #0E3529;
    --ok-line:   #1D5B46;
    --warn:      #E6B860;
    --warn-bg:   #3A2C0F;
    --warn-line: #5E4819;
    --crit:      #F0958D;
    --crit-bg:   #3B1917;
    --crit-line: #632925;
    --info:      #7FB5EA;
    --info-bg:   #10304C;
    --info-line: #1E4D75;
    --neutral:      #A6BAC8;
    --neutral-bg:   #14303F;
    --neutral-line: #24485C;
    --shadow-1: 0 1px 2px rgba(0,0,0,.35);
    --shadow-2: 0 4px 14px rgba(0,0,0,.42);
    --shadow-3: 0 18px 48px rgba(0,0,0,.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground:       #071824;
  --surface:      #0C2433;
  --surface-2:    #102D3E;
  --surface-sunk: #0A1F2C;
  --line:         #1B3A4D;
  --line-strong:  #2A4D62;
  --ink:          #E4EDF3;
  --ink-2:        #BACBD8;
  --ink-muted:    #8EA6B6;
  --ink-faint:    #6B8395;
  --brand-navy:      #0A2438;
  --brand-navy-deep: #06192A;
  --brand-navy-lift: #14415F;
  --brand-teal:      #17A6A2;
  --brand-teal-soft: #0F3A3A;
  --brand-gold-soft: #3A2F13;
  --ok:        #5FCEA4;
  --ok-bg:     #0E3529;
  --ok-line:   #1D5B46;
  --warn:      #E6B860;
  --warn-bg:   #3A2C0F;
  --warn-line: #5E4819;
  --crit:      #F0958D;
  --crit-bg:   #3B1917;
  --crit-line: #632925;
  --info:      #7FB5EA;
  --info-bg:   #10304C;
  --info-line: #1E4D75;
  --neutral:      #A6BAC8;
  --neutral-bg:   #14303F;
  --neutral-line: #24485C;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35);
  --shadow-2: 0 4px 14px rgba(0,0,0,.42);
  --shadow-3: 0 18px 48px rgba(0,0,0,.6);
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { font-size: 21px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 13.5px; font-weight: 600; }
p { margin: 0 0 10px; }
a { color: var(--brand-teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

:root[data-theme="dark"] a, :root:not([data-theme="light"]) a { }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: var(--brand-teal); } }
:root[data-theme="dark"] a { color: var(--brand-teal); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: 1px;
  border-radius: 2px;
}

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.eyebrow {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   Shell
   ========================================================================== */

.app {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  /* Bound the single row to the viewport height. Without this the grid row
     auto-sizes to content, so the inner overflow:auto areas (.scroll and
     .rail-nav) never get a capped height and the page cannot scroll. */
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
}

/* --- Left rail -------------------------------------------------------- */
.rail {
  background: var(--brand-navy-deep);
  color: var(--on-brand);
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid rgba(255,255,255,.06);
}
.rail-head {
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex: none;
}
.rail-head .mark { flex: none; }
.rail-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -.02em;
  color: #fff;
}
.rail-word span { color: var(--brand-teal); }
.rail-slogan {
  padding: 11px 16px 8px;
  font-size: 9.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255,255,255,.34);
  font-family: var(--font-display);
  font-weight: 500;
}
.rail-nav { flex: 1; overflow-y: auto; padding: 0 8px 18px; }
.rail-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }
.nav-group {
  padding: 13px 8px 5px;
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: var(--r);
  color: rgba(238,246,250,.82);
  font-size: 13px;
  cursor: pointer;
  position: relative;
  border-left: 2px solid transparent;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-item.active {
  background: rgba(12,138,135,.20);
  border-left-color: var(--brand-teal);
  color: #fff;
  font-weight: 500;
}
.nav-item svg { flex: none; opacity: .85; }
.nav-item.active svg { opacity: 1; color: var(--brand-teal); }
.nav-item .count {
  margin-left: auto;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.08);
  border-radius: 9px;
  padding: 1px 6px;
}
.nav-item.soon { color: rgba(238,246,250,.42); cursor: default; }
.nav-item.soon:hover { background: rgba(255,255,255,.04); color: rgba(238,246,250,.55); }
.nav-item .soon-tag {
  margin-left: auto;
  font-size: 8.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-gold);
  border: 1px solid rgba(210,174,85,.4);
  border-radius: 3px;
  padding: 0 4px;
  font-family: var(--font-display);
  font-weight: 600;
}
.rail-foot {
  flex: none;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 9px 12px;
  font-size: 10.5px;
  color: rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rail-foot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-teal); flex: none; }

/* --- Main column ------------------------------------------------------ */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }

.topbar {
  height: var(--topbar);
  flex: none;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}
.topbar .crumbs { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.topbar .crumbs .page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .crumbs .page-sub { font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; }

.gsearch { position: relative; margin-left: auto; width: min(360px, 34vw); }
.gsearch input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 30px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
}
.gsearch input::placeholder { color: var(--ink-faint); }
.gsearch .ico { position: absolute; left: 9px; top: 8px; color: var(--ink-faint); pointer-events: none; }
.gsearch-results {
  position: absolute;
  top: 38px; left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  max-height: 60vh; overflow: auto;
  z-index: 60;
  padding: 5px;
}
.gsearch-results .hit { padding: 7px 9px; border-radius: var(--r-sm); cursor: pointer; display: flex; gap: 9px; align-items: center; }
.gsearch-results .hit:hover { background: var(--surface-sunk); }
.gsearch-results .hit .nm { font-weight: 500; }
.gsearch-results .grp { padding: 7px 9px 3px; }

.topbar-actions { display: flex; align-items: center; gap: 7px; flex: none; }

.iconbtn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--r);
  color: var(--ink-2);
  cursor: pointer;
  position: relative;
}
.iconbtn:hover { background: var(--surface-sunk); border-color: var(--line); }
.iconbtn .pip {
  position: absolute; top: 5px; right: 5px;
  min-width: 14px; height: 14px; padding: 0 3px;
  background: var(--crit); color: #fff;
  border-radius: 8px; font-size: 9px; font-weight: 600;
  display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--surface);
}

.juris-select, .topbar select {
  height: 32px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--r);
  padding: 0 7px;
  font-size: 12.5px;
  cursor: pointer;
}

.who { display: flex; align-items: center; gap: 8px; padding-left: 10px; border-left: 1px solid var(--line); cursor: pointer; }
.who .meta { line-height: 1.25; min-width: 0; max-width: 168px; }
.who .meta b, .who .meta span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .meta b { font-size: 12.5px; font-weight: 600; display: block; }
.who .meta span { font-size: 10.5px; color: var(--ink-muted); }

.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(140deg, var(--brand-navy), var(--brand-teal));
  color: #fff; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; font-family: var(--font-display);
  flex: none; letter-spacing: .02em;
}
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.gold { background: linear-gradient(140deg, var(--brand-gold-deep), var(--brand-gold)); }

/* --- Scroll area ------------------------------------------------------ */
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }

/* A field shown in the UI that has no column in the compliance database. */
.dl dd.nodb { color: var(--crit); }
.nodb-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--crit);
  background: color-mix(in srgb, var(--crit) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--crit) 28%, transparent);
  padding: 0 6px; border-radius: 4px; white-space: nowrap;
}
.page { padding: 20px 24px 56px; max-width: 1560px; }

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 220px; }
.page-head h1 { margin-bottom: 3px; }
.page-head .lede { color: var(--ink-muted); font-size: 12.5px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-sunk); text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand-teal); border-color: var(--brand-teal); color: #fff; }
.btn.primary:hover { background: var(--brand-teal-dark); border-color: var(--brand-teal-dark); }
.btn.navy { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.btn.navy:hover { background: var(--brand-navy-lift); }
.btn.gold { background: var(--brand-gold); border-color: var(--brand-gold-deep); color: #29200A; }
.btn.gold:hover { background: var(--brand-gold-deep); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-sunk); }
.btn.danger { color: var(--crit); border-color: var(--crit-line); background: var(--crit-bg); }
.btn.danger:hover { background: var(--crit); color: #fff; border-color: var(--crit); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 11.5px; }
.btn.lg { height: 38px; padding: 0 18px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn svg { flex: none; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ==========================================================================
   Cards & panels
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.card > .card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.card > .card-head h2, .card > .card-head h3 { font-size: 13px; }
.card > .card-head .spacer { flex: 1; }
.card > .card-body { padding: 14px; }
.card > .card-body.flush { padding: 0; }
.card > .card-foot { padding: 9px 14px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
/* Onboarding stage footer: what still blocks "Mark stage complete" */
.stage-gaps-head { margin-top: 9px; font-size: 11.5px; font-weight: 600; color: var(--ink-muted); }
.stage-gaps-head.warn { color: var(--warn); }
.stage-gaps { margin: 5px 0 0; padding-left: 0; list-style: none; display: grid; gap: 2px; font-size: 12.5px; }
.stage-gaps li { display: flex; align-items: baseline; gap: 6px; }
.stage-gaps li::before { content: '!'; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); font-size: 9.5px; font-weight: 700; line-height: 12px; text-align: center; }
.stage-gaps .link-btn { padding: 0 2px; font-size: 12px; }
.card-foot .btn[disabled] { opacity: .5; cursor: not-allowed; }

.grid { display: grid; gap: 14px; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1080px) { .g-main { grid-template-columns: minmax(0,1fr); } }

.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.stack.tight { gap: 9px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* --- KPI tile --------------------------------------------------------- */
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 13px 14px 12px;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .14s, box-shadow .14s;
}
.kpi:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--kpi-accent, var(--brand-teal));
}
.kpi .label { font-size: 11px; color: var(--ink-muted); font-weight: 500; letter-spacing: .01em; }
.kpi .value {
  font-family: var(--font-display);
  font-size: 27px; font-weight: 600; line-height: 1.12;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  letter-spacing: -.025em;
}
.kpi .value small { font-size: 14px; font-weight: 500; color: var(--ink-muted); margin-left: 3px; }
.kpi .foot { margin-top: 5px; font-size: 11px; color: var(--ink-muted); display: flex; align-items: center; gap: 5px; }
.kpi .trend { font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi .trend.up { color: var(--ok); }
.kpi .trend.down { color: var(--crit); }

/* ==========================================================================
   Badges, chips, tags
   ========================================================================== */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 19px; padding: 0 7px;
  border-radius: 3px;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .015em;
  border: 1px solid var(--neutral-line);
  background: var(--neutral-bg);
  color: var(--neutral);
  white-space: nowrap;
  font-family: var(--font-body);
}
.badge .glyph { font-size: 9px; line-height: 1; }
.badge.ok   { background: var(--ok-bg);   color: var(--ok);   border-color: var(--ok-line); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.crit { background: var(--crit-bg); color: var(--crit); border-color: var(--crit-line); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge.gold { background: var(--brand-gold-soft); color: var(--brand-gold-deep); border-color: rgba(210,174,85,.5); }
.badge.brand{ background: var(--brand-teal-soft); color: var(--brand-teal-dark); border-color: rgba(12,138,135,.28); }
.badge.lg { height: 23px; font-size: 11.5px; padding: 0 9px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.gold { color: var(--brand-gold); } }
:root[data-theme="dark"] .badge.gold { color: var(--brand-gold); }
:root[data-theme="dark"] .badge.brand { color: var(--brand-teal); }

/* Data-source badges (KYC field provenance: CRM vs compliance DB) */
.src {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 7px; border-radius: 3px;
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; font-family: var(--font-body); vertical-align: middle;
  border: 1px solid transparent;
}
.src::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.src.mini { height: 15px; padding: 0 5px; font-size: 8.5px; letter-spacing: .03em; }
.src.mini::before { display: none; }
form.locked { opacity: .55; }
.src-crm     { background: var(--brand-teal-soft); color: var(--brand-teal-dark); border-color: rgba(12,138,135,.28); }
.src-db      { background: #EEF2F6; color: var(--brand-navy); border-color: var(--line); }
.src-overlay { background: var(--brand-gold-soft); color: var(--brand-gold-deep); border-color: rgba(210,174,85,.5); }
.src-legend { display: inline-flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 11px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .src-db { background: rgba(255,255,255,.06); color: #AFC3D4; border-color: rgba(255,255,255,.12); }
  :root:not([data-theme="light"]) .src-overlay { color: var(--brand-gold); }
}
:root[data-theme="dark"] .src-db { background: rgba(255,255,255,.06); color: #AFC3D4; border-color: rgba(255,255,255,.12); }
:root[data-theme="dark"] .src-overlay { color: var(--brand-gold); }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 8px;
  border-radius: 11px;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  font-size: 11px; color: var(--ink-2);
  white-space: nowrap;
}
.tag button { border: 0; background: none; cursor: pointer; color: var(--ink-faint); padding: 0; line-height: 1; }

.stage-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px 0 7px;
  border-radius: 3px;
  font-size: 11px; font-weight: 600;
  background: var(--brand-navy); color: #fff;
  letter-spacing: .01em;
}
.stage-chip .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-teal); }
.stage-chip[data-stage="lead"]      { background: #2C4A61; }
.stage-chip[data-stage="prospect"]  { background: #1F5E9E; }
.stage-chip[data-stage="onboarding"]{ background: #8A6414; }
.stage-chip[data-stage="client"]    { background: var(--brand-teal-dark); }
.stage-chip[data-stage="dormant"]   { background: #5A6875; }
.stage-chip[data-stage="closed"]    { background: #6E4340; }

.flag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; white-space: nowrap;
}
.flag .fl {
  width: 17px; height: 12px; border-radius: 2px; flex: none;
  border: 1px solid rgba(0,0,0,.14);
  background-size: cover;
  display: inline-block;
}
.fl-KW { background: linear-gradient(to bottom, #007A3D 0 33.3%, #fff 33.3% 66.6%, #CE1126 66.6%) ; position: relative; }
.fl-KW::before { content:""; position:absolute; left:0; top:0; bottom:0; width:33%; background:#000; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.fl-SA { background: #006C35; position: relative; }
.fl-SA::after { content:""; position:absolute; left:2px; right:2px; top:4px; height:1.5px; background:#fff; }
.fl-AE { background: linear-gradient(to bottom, #00732F 0 33.3%, #fff 33.3% 66.6%, #000 66.6%); position: relative; }
.fl-AE::before { content:""; position:absolute; left:0; top:0; bottom:0; width:28%; background:#CE1126; }

.risk {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
}
.risk .bars { display: inline-flex; gap: 2px; align-items: flex-end; }
.risk .bars i { width: 3px; background: var(--line-strong); border-radius: 1px; display: block; }
.risk .bars i:nth-child(1) { height: 6px; }
.risk .bars i:nth-child(2) { height: 9px; }
.risk .bars i:nth-child(3) { height: 12px; }
.risk[data-lvl="Low"]      { color: var(--ok); }
.risk[data-lvl="Low"] .bars i:nth-child(1) { background: var(--ok); }
.risk[data-lvl="Medium"]   { color: var(--warn); }
.risk[data-lvl="Medium"] .bars i:nth-child(-n+2) { background: var(--warn); }
.risk[data-lvl="High"]     { color: var(--crit); }
.risk[data-lvl="High"] .bars i { background: var(--crit); }

/* ==========================================================================
   Tables / data grid
   ========================================================================== */

.tablewrap { overflow-x: auto; }
table.grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 720px;
}
table.grid-table thead th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface-2);
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
  cursor: pointer;
  user-select: none;
}
table.grid-table thead th.nosort { cursor: default; }
table.grid-table thead th .sortmark { color: var(--brand-teal); margin-left: 3px; }
table.grid-table tbody td {
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
table.grid-table tbody tr { cursor: pointer; }
table.grid-table tbody tr:hover { background: var(--surface-2); }
table.grid-table tbody tr.sel { background: var(--brand-teal-soft); }
table.grid-table td .primary-cell { display: flex; align-items: center; gap: 8px; }
table.grid-table td .primary-cell b { font-weight: 600; }
table.grid-table td.rt { text-align: right; font-variant-numeric: tabular-nums; }
table.grid-table td.actions { text-align: right; }
.rowmenu { position: relative; display: inline-block; }

.toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.toolbar .searchbox { position: relative; flex: 1; min-width: 180px; max-width: 320px; }
.toolbar .searchbox input { width: 100%; height: 30px; padding-left: 28px; }
.toolbar .searchbox .ico { position: absolute; left: 8px; top: 7px; color: var(--ink-faint); }
.toolbar .spacer { flex: 1; }

.viewtabs { display: flex; gap: 2px; background: var(--surface-sunk); padding: 2px; border-radius: var(--r); }
.viewtabs button {
  border: 0; background: transparent; cursor: pointer;
  padding: 4px 10px; border-radius: var(--r-sm);
  font-size: 11.5px; font-weight: 500; color: var(--ink-muted);
}
.viewtabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

.filterbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.filterbar label { font-size: 10.5px; color: var(--ink-muted); display: block; margin-bottom: 2px; font-weight: 500; }
.filterbar .f { min-width: 130px; }
.filterbar .f select, .filterbar .f input { height: 28px; width: 100%; font-size: 12px; }

.tablefoot {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; font-size: 11.5px; color: var(--ink-muted);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.tablefoot .spacer { flex: 1; }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { margin-bottom: 12px; min-width: 0; }
.field > label {
  display: block; font-size: 11.5px; font-weight: 500;
  color: var(--ink-2); margin-bottom: 4px;
}
/* Mandatory-field marker: a clear red asterisk */
.req { color: var(--crit); font-weight: 700; font-size: 1.15em; line-height: 1; margin-left: 3px; vertical-align: -1px; }
.field .hint { font-size: 11px; color: var(--ink-faint); margin-top: 3px; }
.field .err { font-size: 11px; color: var(--crit); margin-top: 3px; display: flex; gap: 4px; align-items: center; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
}
textarea { height: auto; padding: 7px 9px; resize: vertical; min-height: 66px; line-height: 1.45; }
select { cursor: pointer; padding-right: 26px; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 14px, calc(100% - 9px) 14px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand-teal); outline: none; box-shadow: 0 0 0 2px rgba(12,138,135,.16); }
input.bad, select.bad { border-color: var(--crit); }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input[disabled], select[disabled] { background: var(--surface-sunk); color: var(--ink-faint); cursor: not-allowed; }

/* Combined input: a dial code (or currency) select joined to an input in one box */
.combo { display: flex; height: 32px; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.combo:focus-within { border-color: var(--brand-teal); box-shadow: 0 0 0 2px rgba(12,138,135,.16); }
.combo .cs { border: 0; border-right: 1px solid var(--line); border-radius: 0; background-color: var(--surface-2); width: auto; max-width: 152px; height: 100%; font-weight: 500; }
.combo .ci { border: 0; border-radius: 0; background: transparent; flex: 1; min-width: 0; height: 100%; }
.combo .cs:focus, .combo .ci:focus { box-shadow: none; }

/* Phone input: flag + dial-code trigger with a custom dropdown + number input */
.phone { display: flex; height: 32px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); position: relative; }
.phone:focus-within { border-color: var(--brand-teal); box-shadow: 0 0 0 2px rgba(12,138,135,.16); }
.phone-trigger { display: flex; align-items: center; gap: 6px; border: 0; border-right: 1px solid var(--line); background: var(--surface-2); padding: 0 10px; cursor: pointer; border-radius: var(--r) 0 0 var(--r); font-weight: 500; color: var(--ink); white-space: nowrap; }
.phone-trigger .chev { font-size: 8px; color: var(--ink-muted); }
.phone-num { border: 0; border-radius: 0 var(--r) var(--r) 0; background: transparent; flex: 1; min-width: 0; height: 100%; padding: 0 11px; }
.phone-num:focus { outline: none; box-shadow: none; }
/* Real country flag chip (flag-icons), squared 1:1 variant — crisp on Windows */
.flagico { display: inline-block; width: 17px !important; height: 17px !important; flex: 0 0 auto; border-radius: 3px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 .5px rgba(8,43,69,.22); vertical-align: middle; }
.flagico.flagico-none { background: var(--surface-3, #e6ebed); }
/* Flag inline with a value in a definition list / display row */
.dl dd .flagico { vertical-align: -4px; margin-right: 6px; }
.phone-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 10; width: 290px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; }
.phone-search { padding: 7px; border-bottom: 1px solid var(--line); background: var(--surface); }
.phone-search input { width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; }
.phone-list { max-height: 228px; overflow-y: auto; padding: 5px; }
.phone-list button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 9px; border-radius: var(--r-sm); cursor: pointer; text-align: left; font-size: 13px; color: var(--ink); }
.phone-list button:hover { background: var(--surface-2); }
.phone-list button .nm { flex: 1; }
.phone-list button .cd { color: var(--ink-muted); font-family: var(--font-mono); font-size: 12px; }
/* Neutralise flag-icons' own sizing pseudo so our fixed chip size wins */
.flagico::before { content: "" !important; display: none !important; }

/* ---- Custom select (styled dropdown over a hidden native <select>) -------- */
.cs { position: relative; }
.cs-native { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.cs-trigger { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); font: inherit; font-size: 13.5px; }
.cs-trigger:hover { border-color: var(--line-strong); background: var(--surface-2); }
.cs-trigger .cs-val { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; overflow: hidden; }
.cs-trigger .cs-val .cs-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-trigger .cs-val .cs-txt.ph { color: var(--ink-faint, #9aa6ab); }
.cs-trigger .chev { font-size: 8px; color: var(--ink-muted); flex: 0 0 auto; }
.cs-native.bad ~ .cs-trigger { border-color: var(--danger, #c0392b); box-shadow: 0 0 0 2px rgba(192,57,43,.14); }
.cs-trigger:focus-visible { outline: none; border-color: var(--brand-teal); box-shadow: 0 0 0 2px rgba(12,138,135,.16); }
.cs.is-disabled .cs-trigger, .cs-trigger:disabled { background: var(--surface-2); color: var(--ink-muted); cursor: not-allowed; opacity: .75; }
.cs-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; width: 100%; min-width: 220px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-3); overflow: hidden; }
/* Floating dropdowns: fixed to the viewport so modal scroll areas never clip them */
.cs-menu.floating, .phone-menu.floating { position: fixed; right: auto; bottom: auto; z-index: 250; }
.cs-menu.floating.up, .phone-menu.floating.up { box-shadow: 0 -8px 24px rgba(8,43,69,.16); }
.cs-search { padding: 7px; border-bottom: 1px solid var(--line); background: var(--surface); }
.cs-search input { width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2); font-size: 13px; }
.cs-list { max-height: 248px; overflow-y: auto; padding: 5px; }
.cs-list button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 9px; border-radius: var(--r-sm); cursor: pointer; text-align: left; font-size: 13.5px; color: var(--ink); }
.cs-list button:hover { background: var(--surface-2); }
.cs-list button.sel { background: var(--brand-teal); color: #fff; }
.cs-list button.sel .flagico { box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.cs-list button .cs-opt { flex: 1; min-width: 0; }
/* Compact custom select for filter bars */
.cs-sm .cs-trigger { height: 28px; font-size: 12px; padding: 0 9px; gap: 7px; }
.cs-sm .cs-trigger .chev { font-size: 7px; }
/* Top-bar jurisdiction switcher */
.juris-cs { width: auto; }
.juris-cs .cs-trigger { width: auto; min-width: 150px; height: 32px; font-size: 12.5px; background: var(--surface-2); border-color: var(--line); }
.juris-cs .cs-menu { width: auto; min-width: 180px; right: 0; left: auto; }

/* Rail scroll-nav needs a positioned scroll container so section offsetTop is correct */
.lead-content { position: relative; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 14px; }
.form-grid .span2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid .span2 { grid-column: span 1; } }

.section-title {
  display: flex; align-items: center; gap: 9px;
  margin: 4px 0 11px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.section-title .n {
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--brand-teal-soft); color: var(--brand-teal-dark);
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none;
  font-family: var(--font-display);
}
.section-title h3 { font-size: 12.5px; }

.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.segmented button {
  border: 0; background: var(--surface); cursor: pointer;
  padding: 6px 13px; font-size: 12.5px; color: var(--ink-2);
  border-right: 1px solid var(--line);
}
.segmented button:last-child { border-right: 0; }
.segmented button.on { background: var(--brand-teal); color: #fff; font-weight: 500; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.choice {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 12px;
  cursor: pointer;
  background: var(--surface);
  display: flex; gap: 10px; align-items: flex-start;
  transition: border-color .12s, background .12s;
}
.choice:hover { border-color: var(--brand-teal); }
.choice.on { border-color: var(--brand-teal); background: var(--brand-teal-soft); box-shadow: inset 0 0 0 1px var(--brand-teal); }
.choice .t { font-weight: 600; font-size: 13px; }
.choice .d { font-size: 11.5px; color: var(--ink-muted); margin-top: 2px; }

.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 6px 14px; }
.check { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; cursor: pointer; padding: 3px 0; }
.check input { width: 14px; height: 14px; margin: 2px 0 0; accent-color: var(--brand-teal); flex: none; cursor: pointer; }

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0; background: none; cursor: pointer;
  padding: 9px 13px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--brand-teal-dark); border-bottom-color: var(--brand-teal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabs button.on { color: var(--brand-teal); } }
:root[data-theme="dark"] .tabs button.on { color: var(--brand-teal); }
.tabs button .cnt {
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
  padding: 1px 6px; border-radius: 9px;
  background: #EEF2F6; color: var(--ink-muted); border: 1px solid var(--line);
}
.tabs button .cnt.part { background: var(--brand-gold-soft); color: var(--brand-gold-deep); border-color: rgba(210,174,85,.5); }
.tabs button .cnt.done { background: var(--brand-teal-soft); color: var(--brand-teal-dark); border-color: rgba(12,138,135,.28); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tabs button .cnt { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
  :root:not([data-theme="light"]) .tabs button .cnt.done { color: var(--brand-teal); }
  :root:not([data-theme="light"]) .tabs button .cnt.part { color: var(--brand-gold); }
}
:root[data-theme="dark"] .tabs button .cnt { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
:root[data-theme="dark"] .tabs button .cnt.done { color: var(--brand-teal); }
:root[data-theme="dark"] .tabs button .cnt.part { color: var(--brand-gold); }
.tabs button .cnt {
  font-size: 10px; background: var(--surface-sunk); border-radius: 8px;
  padding: 0 5px; font-variant-numeric: tabular-nums; color: var(--ink-muted);
}
.tabs button.soon { color: var(--ink-faint); }

/* ==========================================================================
   Record header (360 pages)
   ========================================================================== */

.rec-head {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.rec-top { display: flex; gap: 14px; padding: 14px 16px 12px; align-items: flex-start; flex-wrap: wrap; }
.rec-id-block { flex: 1; min-width: 240px; }
.rec-name { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.rec-name h1 { font-size: 20px; }
.rec-sub { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; font-size: 12px; color: var(--ink-muted); }
.rec-sub .sep { color: var(--line-strong); }
.rec-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: flex-start; }

.factstrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.factstrip .fact {
  padding: 9px 14px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.factstrip .fact:last-child { border-right: 0; }
.factstrip .fact .k { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-muted); font-weight: 600; font-family: var(--font-display); }
.factstrip .fact .v { font-size: 13px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.factstrip .fact .v.gold { color: var(--brand-gold-deep); }
.factstrip .fact .fact-edit { border: 1px solid transparent; border-radius: var(--r-sm, 3px); background: none; padding: 1px 3px; margin-left: 5px; color: var(--brand-teal); cursor: pointer; vertical-align: -3px; line-height: 1; }
.factstrip .fact .fact-edit:hover, .factstrip .fact .fact-edit:focus-visible { border-color: var(--brand-teal); background: var(--surface, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .factstrip .fact .v.gold { color: var(--brand-gold); } }
:root[data-theme="dark"] .factstrip .fact .v.gold { color: var(--brand-gold); }

/* --- Lifecycle rail --------------------------------------------------- */
.lifecycle {
  display: flex; align-items: stretch; gap: 0;
  border-top: 1px solid var(--line);
  overflow-x: auto;
}
.lifecycle .lc {
  flex: 1; min-width: 112px;
  padding: 8px 10px 8px 18px;
  position: relative;
  font-size: 11.5px;
  color: var(--ink-faint);
  background: var(--surface);
}
.lifecycle .lc:first-child { padding-left: 14px; }
.lifecycle .lc::after {
  content: ""; position: absolute; right: -9px; top: 50%; z-index: 2;
  width: 17px; height: 17px;
  transform: translateY(-50%) rotate(45deg);
  background: inherit;
  border-right: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.lifecycle .lc:last-child::after { display: none; }
.lifecycle .lc .lc-k { font-weight: 600; color: inherit; }
.lifecycle .lc .lc-d { font-size: 10.5px; margin-top: 1px; }
.lifecycle .lc.done { background: var(--brand-teal-soft); color: var(--brand-teal-dark); }
.lifecycle .lc.now { background: var(--brand-navy); color: #fff; }
.lifecycle .lc.now .lc-d { color: rgba(255,255,255,.7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lifecycle .lc.done { color: var(--brand-teal); } }
:root[data-theme="dark"] .lifecycle .lc.done { color: var(--brand-teal); }

/* ==========================================================================
   Definition lists
   ========================================================================== */

.dl { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 0; font-size: 12.5px; }
.dl dt { color: var(--ink-muted); padding: 5px 0; border-bottom: 1px solid var(--line); }
.dl dd { margin: 0; padding: 5px 0; border-bottom: 1px solid var(--line); font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }
.dl.plain dt, .dl.plain dd { border-bottom: 0; padding: 3px 0; }

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline { position: relative; padding-left: 4px; }
.timeline .tl {
  position: relative;
  padding: 0 0 15px 24px;
  border-left: 1.5px solid var(--line);
  margin-left: 8px;
}
.timeline .tl:last-child { border-left-color: transparent; padding-bottom: 2px; }
.timeline .tl .node {
  position: absolute; left: -8.5px; top: 1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; color: var(--ink-muted);
}
.timeline .tl .node svg { width: 9px; height: 9px; }
.timeline .tl.stage .node { border-color: var(--brand-teal); color: var(--brand-teal); background: var(--brand-teal-soft); }
.timeline .tl.compliance .node { border-color: var(--info-line); color: var(--info); background: var(--info-bg); }
.timeline .tl.alert .node { border-color: var(--crit-line); color: var(--crit); background: var(--crit-bg); }
.timeline .tl .th { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.timeline .tl .th b { font-size: 12.5px; font-weight: 600; }
.timeline .tl .th .when { font-size: 11px; color: var(--ink-faint); margin-left: auto; white-space: nowrap; }
.timeline .tl .body { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.timeline .tl .who { font-size: 11px; color: var(--ink-faint); margin-top: 3px; padding: 0; border: 0; }

/* ==========================================================================
   Stepper (onboarding)
   ========================================================================== */

.stepper { display: flex; flex-direction: column; gap: 1px; }
.step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 11px;
  border-radius: var(--r);
  cursor: pointer;
  border: 1px solid transparent;
}
.step:hover { background: var(--surface-2); }
.step.on { background: var(--brand-teal-soft); border-color: rgba(12,138,135,.3); }
.step .mk {
  width: 21px; height: 21px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; font-family: var(--font-display);
  border: 1.5px solid var(--line-strong); color: var(--ink-muted);
  background: var(--surface);
}
.step.done .mk { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.current .mk { background: var(--brand-teal); border-color: var(--brand-teal); color: #fff; }
.step.blocked .mk { background: var(--crit-bg); border-color: var(--crit-line); color: var(--crit); }
.step .txt { min-width: 0; }
.step .txt b { font-size: 12.5px; font-weight: 600; display: block; }
.step .txt span { font-size: 11px; color: var(--ink-muted); }

.progress { height: 6px; background: var(--surface-sunk); border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand-teal); border-radius: 4px; transition: width .4s ease; }
.progress.gold > i { background: linear-gradient(90deg, var(--brand-gold-deep), var(--brand-gold)); }
.progress.thin { height: 4px; }
/* Indeterminate progress (e.g. while OCR runs server-side). */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-flex; animation: spin .8s linear infinite; }
@keyframes indet { 0% { left: -40%; } 60% { left: 100%; } 100% { left: 100%; } }
.progress.indet > i { position: absolute; width: 40%; left: -40%; animation: indet 1.15s ease-in-out infinite; transition: none; }
.progress.indet { position: relative; }
/* OCR "scanned data" section — tinted so it reads as machine-extracted. */
.ocr-card { box-shadow: none; border: 1px solid color-mix(in srgb, var(--brand-teal) 32%, var(--line)); border-left: 3px solid var(--brand-teal); background: color-mix(in srgb, var(--brand-teal) 6%, transparent); }
.ocr-eyebrow { color: var(--brand-teal); display: inline-flex; align-items: center; gap: 5px; }
.ocr-card .field input, .ocr-card .field select { background: color-mix(in srgb, var(--brand-teal) 5%, var(--surface)); border-color: color-mix(in srgb, var(--brand-teal) 28%, var(--line)); }
.ocr-card .dl dd { color: var(--brand-teal-ink, var(--ink)); }

/* ==========================================================================
   Pipeline / funnel
   ========================================================================== */

.funnel { display: flex; gap: 0; align-items: stretch; overflow-x: auto; }
.funnel .fstage {
  flex: 1; min-width: 132px;
  padding: 12px 12px 12px 22px;
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-right: 0;
  cursor: pointer;
}
.funnel .fstage:first-child { border-radius: var(--r-lg) 0 0 var(--r-lg); padding-left: 14px; }
.funnel .fstage:last-child { border-right: 1px solid var(--line); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.funnel .fstage::after {
  content: ""; position: absolute; right: -10px; top: 50%; z-index: 2;
  width: 19px; height: 19px; transform: translateY(-50%) rotate(45deg);
  background: inherit; border-right: 1px solid var(--line); border-top: 1px solid var(--line);
}
.funnel .fstage:last-child::after { display: none; }
.funnel .fstage:hover { background: var(--surface-sunk); }
.funnel .fstage .k { font-size: 11px; color: var(--ink-muted); font-weight: 500; }
.funnel .fstage .v {
  font-family: var(--font-display); font-size: 24px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -.02em;
}
.funnel .fstage .conv { font-size: 10.5px; color: var(--ink-muted); margin-top: 2px; }
.funnel .fstage .conv b { color: var(--brand-teal-dark); font-variant-numeric: tabular-nums; }
.funnel .fstage[data-k="client"] { background: var(--brand-navy); border-color: var(--brand-navy); }
.funnel .fstage[data-k="client"] .k { color: rgba(255,255,255,.66); }
.funnel .fstage[data-k="client"] .v { color: #fff; }
.funnel .fstage[data-k="client"] .conv { color: rgba(255,255,255,.6); }
.funnel .fstage[data-k="client"] .conv b { color: var(--brand-gold); }

/* ==========================================================================
   Kanban
   ========================================================================== */

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.kcol { flex: 0 0 258px; background: var(--surface-sunk); border-radius: var(--r-lg); border: 1px solid var(--line); }
.kcol .kh { padding: 9px 11px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 7px; }
.kcol .kh b { font-size: 12px; font-weight: 600; }
.kcol .kh .n { font-size: 10.5px; color: var(--ink-muted); background: var(--surface); border-radius: 8px; padding: 0 6px; border: 1px solid var(--line); }
.kcol .kh .sum { margin-left: auto; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.kcol .kb { padding: 8px; display: flex; flex-direction: column; gap: 7px; min-height: 56px; }
.kcol.over .kb { background: var(--brand-teal-soft); border-radius: var(--r); }
.kcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 9px 10px; cursor: grab;
  box-shadow: var(--shadow-1);
}
.kcard:hover { border-color: var(--line-strong); }
.kcard.dragging { opacity: .45; }
.kcard .t { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.kcard .c { font-size: 11.5px; color: var(--ink-muted); margin-top: 2px; }
.kcard .m { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.kcard .amt { font-family: var(--font-display); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Modal / drawer / toast
   ========================================================================== */

.scrim {
  position: fixed; inset: 0; background: rgba(5,24,40,.5);
  z-index: 200; display: flex; align-items: flex-start; justify-content: center;
  padding: 44px 16px; overflow-y: auto;
  animation: fade .14s ease;
}
@keyframes fade { from { opacity: 0 } }
.modal {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-3); width: 100%; max-width: 620px;
  border: 1px solid var(--line);
  /* Animate with `top`, not transform: a transform would make the modal the containing
     block for position:fixed children and misplace floating dropdown menus. */
  position: relative;
  animation: modalrise .18s cubic-bezier(.2,.7,.3,1);
}
@keyframes modalrise { from { top: 10px; opacity: 0 } }
.modal.wide { max-width: 860px; }
.modal.narrow { max-width: 440px; }
@keyframes rise { from { transform: translateY(10px); opacity: 0 } }
.modal-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.modal-head .grow { flex: 1; min-width: 0; }
.modal-head h2 { font-size: 15px; }
.modal-head .sub { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.modal-body { padding: 16px; max-height: min(66vh, 620px); overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); align-items: center; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }
.modal-foot-left { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 11px; }
.modal-pbar { width: 120px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.modal-pbar i { display: block; height: 100%; width: 0; background: var(--brand-teal); transition: width .3s; }

.drawer-scrim { position: fixed; inset: 0; background: rgba(5,24,40,.42); z-index: 200; animation: fade .14s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3); z-index: 201;
  display: flex; flex-direction: column;
  animation: slide .2s cubic-bezier(.2,.7,.3,1);
}
.drawer.wide { width: min(640px, 100%); }
@keyframes slide { from { right: -28px; opacity: .4 } }   /* positional, not transform — see .modal */
.drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex: none; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.drawer-foot { flex: none; padding: 11px 16px; border-top: 1px solid var(--line); background: var(--surface-2); display: flex; gap: 8px; align-items: center; }
.drawer-foot .spacer { flex: 1; }

/* ---- header extras (title badge + header-right slot) ---- */
.modal-head .htop { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.modal-tag { font: 500 10.5px var(--font-mono); color: var(--brand-teal-dark); background: var(--brand-teal-soft); padding: 3px 7px; border-radius: 4px; letter-spacing: .04em; }
.kind-toggle { display: inline-flex; background: #EEF2F4; border-radius: 8px; padding: 3px; gap: 2px; align-self: center; }
.kind-toggle button { height: 30px; padding: 0 14px; border: 0; background: none; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink-muted); cursor: pointer; }
.kind-toggle button.on { background: var(--surface); color: var(--brand-teal-dark); box-shadow: 0 1px 2px rgba(16,32,36,.12); }

/* ---- lead popup (rail + scrollable content) ---- */
.modal.lead-modal { height: min(856px, 92vh); max-width: 1060px; display: flex; flex-direction: column; }
.modal.lead-modal .modal-body { padding: 0; max-height: none; flex: 1; min-height: 0; overflow: hidden; }
.lead-layout { display: flex; height: 100%; min-height: 0; }
.lead-side { width: 226px; flex-shrink: 0; background: var(--surface-2); border-right: 1px solid var(--line); padding: 18px 13px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.lead-steps { display: flex; flex-direction: column; gap: 2px; }
.lead-step { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; width: 100%; color: var(--ink); }
.lead-step.on { background: var(--surface); box-shadow: 0 1px 2px rgba(16,32,36,.08), 0 0 0 1px var(--line); }
.lead-step .n { width: 24px; height: 24px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font: 600 12px var(--font-mono); background: #E9EEEF; color: var(--ink-muted); }
.lead-step.on .n { background: var(--brand-teal-soft); color: var(--brand-teal-dark); }
.lead-step.done .n { background: var(--brand-teal); color: #fff; }
.lead-step .tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lead-step .tx b { font-size: 13.5px; font-weight: 500; }
.lead-step .tx i { font-size: 11.5px; color: var(--ink-faint); font-style: normal; }
.lead-booking { margin-top: auto; display: flex; flex-direction: column; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.lead-booking .be { font-size: 13px; font-weight: 500; }
.lead-booking .rg { font-size: 12px; color: var(--ink-muted); }
.lead-booking .note { font-size: 12px; color: var(--ink-muted); line-height: 1.45; border-top: 1px solid var(--line); padding-top: 9px; }
.lead-content { flex: 1; min-width: 0; overflow-y: auto; }
.lead-content .inner { max-width: 764px; padding: 6px 30px 46px; }
.lead-sec { padding: 24px 0 26px; border-bottom: 1px solid var(--line); scroll-margin-top: 8px; }
.lead-sec:last-child { border-bottom: 0; }
.lead-sechead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.lead-sechead .n { font: 500 12px var(--font-mono); color: var(--brand-teal); }
.lead-sechead h3 { font-size: 15px; font-weight: 600; margin: 0; }
.ar-panel { grid-column: 1 / -1; background: var(--surface-2); border-radius: 10px; padding: 12px 13px; }
.ar-panel .arh { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 9px; }
.ar-panel .arh b { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.ar-panel .arh span { font-size: 11.5px; color: var(--ink-faint); }
.booked-card { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 11px 13px; border: 1px dashed var(--line-strong); border-radius: 10px; flex-wrap: wrap; }
.booked-card .bl { flex: 1; min-width: 210px; display: flex; flex-direction: column; gap: 2px; }
.booked-card .bl .t { font-size: 12px; color: var(--ink-faint); }
.booked-card .bl .v { font-size: 13.5px; }
.link-btn { border: 0; background: none; color: var(--brand-teal); font-size: 13px; font-weight: 500; cursor: pointer; padding: 6px 4px; }
.link-btn:hover { text-decoration: underline; }
/* product / contact pills (styles the form-grid checks + custom pill rows) */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-content .checks { display: flex; flex-wrap: wrap; gap: 8px; }
.lead-content .checks .check { height: 36px; padding: 0 13px; border-radius: 19px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 0; margin: 0; }
.lead-content .checks .check input { position: absolute; opacity: 0; width: 0; height: 0; }
.lead-content .checks .check:has(input:checked), .lead-content .checks .check.on { border-color: var(--brand-teal); background: var(--brand-teal-soft); color: var(--brand-teal-dark); font-weight: 500; }
.lead-content .checks .check.on::before { content: "✓"; margin-right: 6px; font-weight: 600; }
.pill { height: 36px; padding: 0 13px; border-radius: 19px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; color: var(--ink); }
.pill.on { border-color: var(--brand-teal); background: var(--brand-teal-soft); color: var(--brand-teal-dark); font-weight: 500; }
/* Reusable pill-style multi-select (checks) — e.g. investment objective */
.checks.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.checks.pills .check { height: 36px; padding: 0 13px; border-radius: 19px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 0; margin: 0; }
.checks.pills .check input { position: absolute; opacity: 0; width: 0; height: 0; }
.checks.pills .check:has(input:checked) { border-color: var(--brand-teal); background: var(--brand-teal-soft); color: var(--brand-teal-dark); font-weight: 500; }
.checks.pills .check:has(input:checked)::before { content: "✓"; margin-right: 6px; font-weight: 600; }
/* Single-select pill group + Yes/No toggle (hidden input holds the value) */
.choicegroup.pills-single { display: flex; flex-wrap: wrap; gap: 8px; }
.choicegroup.pills-single button { height: 36px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; color: var(--ink); }
.choicegroup.pills-single button:hover { border-color: var(--line-strong); }
.choicegroup.pills-single button.on { border-color: var(--brand-teal); background: var(--brand-teal-soft); color: var(--brand-teal-dark); font-weight: 500; }
.choicegroup.pills-single button.on::before { content: "✓"; margin-right: 6px; font-weight: 600; }
.choicegroup[data-disabled] { opacity: .5; pointer-events: none; }
.choicegroup.pills-single:has(input.bad) button { border-color: var(--danger, #c0392b); }
.choicegroup.segmented:has(input.bad) { border-color: var(--danger, #c0392b); box-shadow: 0 0 0 2px rgba(192,57,43,.14); }

/* ---- Rich KYC editor (numbered sections, option cards, suitability footer) ---- */
.modal.kyc-modal { max-width: 760px; }
.kyc-body { display: flex; flex-direction: column; }
.kyc-sec { padding: 20px 0 22px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.kyc-sec:first-child { padding-top: 8px; }
.kyc-sec:last-child { border-bottom: 0; }
.kyc-sechead { display: flex; align-items: baseline; gap: 10px; }
.kyc-sechead .num { font: 500 12px var(--font-mono); color: var(--brand-teal); }
.kyc-sechead h3 { font-size: 15px; font-weight: 600; margin: 0; }
.kyc-fieldhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.kyc-fieldhead .lbl { font-size: 13.5px; font-weight: 500; }
.kyc-fieldhead .muted { font-size: 12.5px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 8px; }
.opt-grid.risk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 13px; text-align: left; border-radius: 9px; cursor: pointer; color: var(--ink); border: 1.5px solid var(--line); background: var(--surface); }
.opt-card:hover { border-color: var(--line-strong); }
.opt-card.on { border-color: var(--brand-teal); background: var(--brand-teal-soft); }
.opt-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.opt-card .top .t { font-size: 13.5px; font-weight: 500; }
.opt-card .desc { font-size: 12px; color: var(--ink-muted); line-height: 1.4; }
.opt-box { width: 18px; height: 18px; border-radius: 4px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; border: 1.5px solid var(--line-strong); box-sizing: border-box; }
.opt-card.on .opt-box { background: var(--brand-teal); border: none; }
.risk-bars { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.risk-bars i { width: 5px; border-radius: 1px; display: block; }
.kyc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.kyc-pill { height: 36px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-size: 13px; cursor: pointer; white-space: nowrap; }
.kyc-pill:hover { border-color: var(--brand-teal); }
.kyc-pill.on { border-color: var(--brand-teal); background: var(--brand-teal-soft); color: var(--brand-teal-dark); font-weight: 500; }
.kyc-warn { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: #fbf4e4; border: 1px solid #efdcae; border-radius: 10px; }
.kyc-warn .ic { width: 20px; height: 20px; border-radius: 50%; background: #b07a12; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.kyc-warn .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kyc-warn .tx b { font-size: 13.5px; color: #5e420a; font-weight: 500; }
.kyc-warn .tx span { font-size: 12.5px; color: #6e5320; line-height: 1.45; }
.kyc-warn button { border: none; background: none; color: #7a5410; font-size: 13px; font-weight: 600; cursor: pointer; padding: 2px 4px; white-space: nowrap; }
.advisor-row { display: flex; align-items: center; gap: 16px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.advisor-row .tx { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.advisor-row .tx b { font-size: 13.5px; font-weight: 500; }
.advisor-row .tx span { font-size: 12.5px; color: var(--ink-muted); }
.kyc-foot-left { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kyc-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.link-btn { border: none; background: none; color: var(--brand-teal); font-size: 13px; font-weight: 500; cursor: pointer; padding: 4px; }
/* kycEditor field grid + inputs */
.modal.kyc-modal .modal-body.kyc-modal-body { padding: 0 24px 6px; }
.kyc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 16px; }
.opt-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kyc-fieldwrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kyc-fieldwrap.span { grid-column: 1 / -1; }
.kyc-lbl { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.kyc-input { height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 12px; font-size: 14.5px; color: var(--ink); background: var(--surface); outline: none; min-width: 0; width: 100%; box-sizing: border-box; }
.kyc-input:focus { border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(12,138,135,.14); }
textarea.kyc-input { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.kyc-hint { font-size: 12px; color: var(--ink-muted); }
.kyc-hint.warn { color: #8a5c0c; font-weight: 500; }
.kyc-sel .cs-trigger { height: 42px; font-size: 14.5px; }
.kyc-step { display: flex; align-items: center; height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.kyc-step button { width: 44px; height: 100%; border: none; background: var(--surface-2); font-size: 18px; color: var(--ink-2); cursor: pointer; }
.kyc-step button:first-child { border-right: 1px solid var(--line); }
.kyc-step button:last-child { border-left: 1px solid var(--line); }
.kyc-step button:hover { background: var(--surface-3, #eef2f2); }
.kyc-step .val { width: 56px; text-align: center; font: 500 15px var(--font-mono); }
.kyc-warns { display: flex; flex-direction: column; gap: 10px; padding: 2px 0 18px; }
.kyc-secsub { margin: -8px 0 0; font-size: 12.5px; color: var(--ink-muted); }
.kyc-desc { font-size: 12.5px; color: var(--ink-muted); margin-top: -2px; }
.kyc-hint.ok { color: #2f6e4a; font-weight: 500; }
.kyc-input.bad { border-color: #d9a840; }
.kyc-input.mono, .kyc-pills.mono .kyc-pill { font-family: var(--font-mono); }
.kyc-pill:disabled { opacity: .45; cursor: not-allowed; }
.kyc-pill.multi.on::before { content: "✓"; margin-right: 6px; font-weight: 600; }
.kyc-static { height: 42px; display: flex; align-items: center; padding: 0 12px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); font-size: 14.5px; color: var(--ink-2); }
.kyc-notes { display: flex; flex-direction: column; gap: 10px; }
.kyc-notes.kyc-top { padding-top: 16px; }
.kyc-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid; }
.kyc-note .ic { width: 20px; height: 20px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; font-style: normal; }
.kyc-note .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kyc-note .tx b { font-size: 13.5px; font-weight: 500; }
.kyc-note .tx span { font-size: 12.5px; line-height: 1.45; }
.kyc-note button { border: none; background: none; font-size: 13px; font-weight: 600; cursor: pointer; padding: 2px 4px; white-space: nowrap; }
.kyc-note.info { background: #eef5f7; border-color: #d3e4e9; }
.kyc-note.info .ic { background: #4f7e8c; }
.kyc-note.info .tx b { color: #23444d; } .kyc-note.info .tx span { color: #3c5b63; }
.kyc-note.warn { background: #fbf4e4; border-color: #efdcae; }
.kyc-note.warn .ic { background: #b07a12; }
.kyc-note.warn .tx b { color: #5e420a; } .kyc-note.warn .tx span { color: #6e5320; } .kyc-note.warn button { color: #7a5410; }
.kyc-note.ok { background: #eef7f1; border-color: #cfe6d7; }
.kyc-note.ok .ic { background: #2f6e4a; }
.kyc-note.ok .tx b { color: #1f4a32; } .kyc-note.ok .tx span { color: #35593f; }
.kyc-inline-card { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.kyc-amt { display: flex; align-items: stretch; height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.kyc-amt:focus-within { border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(12,138,135,.14); }
.kyc-amt .pre { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border-right: 1px solid var(--line); font: 500 13px var(--font-mono); color: var(--ink-2); }
.kyc-amt .kyc-input { border: 0; height: 100%; text-align: right; box-shadow: none; border-radius: 0; }
.kyc-amt .kyc-input:focus { box-shadow: none; }
.iw-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.iw-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px 44px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); min-height: 42px; }
.iw-row:last-child { border-bottom: 0; }
.iw-row.on { background: var(--brand-teal-soft); }
.iw-chk { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; margin: 0; }
.iw-chk input { width: 16px; height: 16px; accent-color: var(--brand-teal); flex: 0 0 auto; }
.iw-amt { height: 34px; }
.iw-pct { font: 500 12px var(--font-mono); color: var(--ink-muted); text-align: right; }
.iw-total { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.iw-totline { display: flex; justify-content: space-between; font-size: 13.5px; }
.iw-totline b { font-size: 15px; }
.iw-bar { position: relative; height: 10px; border-radius: 5px; background: var(--line); }
.iw-bar .rng { position: absolute; top: 0; bottom: 0; background: rgba(12,138,135,.35); border-radius: 5px; }
.iw-bar .mk { position: absolute; top: -4px; width: 3px; height: 18px; margin-left: -1px; border-radius: 2px; background: var(--brand-teal); }
.iw-bar .mk.out { background: #b07a12; }
.iw-scale { display: flex; justify-content: space-between; font: 11px var(--font-mono); color: var(--ink-faint, #97a5a9); }
@media (max-width: 640px) { .iw-row { grid-template-columns: 1fr 1fr; } .iw-pct { display: none; } }
.kyc-rows { display: flex; flex-direction: column; gap: 8px; }
.kyc-row3 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 96px 32px; gap: 8px; align-items: center; }
.kyc-pct { display: flex; align-items: center; gap: 6px; }
.kyc-pct .kyc-input { text-align: right; }
.kyc-pct span { color: var(--ink-muted); font-size: 13px; }
.kyc-x { width: 32px; height: 32px; border: none; background: none; border-radius: 6px; font-size: 18px; color: var(--ink-muted); cursor: pointer; }
.kyc-x:hover { background: var(--surface-2); color: var(--ink); }
.kyc-rowfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .kyc-row3 { grid-template-columns: 1fr 1fr; } }
.kyc-inline-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.kyc-inline-row .tx { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.kyc-inline-row .tx b { font-size: 13.5px; font-weight: 500; }
.kyc-inline-row .tx span { font-size: 12.5px; color: var(--ink-muted); }
.lead-foot-left { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 11px; }
.lead-pbar { width: 120px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.lead-pbar i { display: block; height: 100%; width: 0; background: var(--brand-teal); transition: width .3s; }
@media (max-width: 720px) { .lead-side { display: none; } .lead-content .inner { padding: 6px 18px 40px; } }

.toasts { position: fixed; bottom: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  background: var(--brand-navy); color: #fff;
  border-radius: var(--r); padding: 10px 13px;
  box-shadow: var(--shadow-3); font-size: 12.5px;
  display: flex; gap: 9px; align-items: flex-start;
  animation: rise .18s ease;
  border-left: 3px solid var(--brand-teal);
}
.toast.ok { border-left-color: #35C79A; }
.toast.warn { border-left-color: var(--brand-gold); }
.toast.crit { border-left-color: #F06A60; }
.toast b { display: block; font-size: 12.5px; }
.toast span { color: rgba(255,255,255,.72); font-size: 11.5px; }
.toast.update-toast { align-items: center; border-left-color: var(--brand-gold); }
.toast.update-toast .btn { flex: none; }
.toast button { margin-left: auto; background: none; border: 0; color: rgba(255,255,255,.6); cursor: pointer; padding: 0; }

.menu {
  position: absolute; z-index: 150; min-width: 176px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-2); padding: 4px;
}
.menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 0; background: none; cursor: pointer; text-align: left;
  padding: 6px 9px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--ink);
}
.menu button:hover { background: var(--surface-sunk); }
.menu button.danger { color: var(--crit); }
.menu button[disabled] { color: var(--ink-faint); cursor: not-allowed; }
.menu .sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu .lbl { padding: 5px 9px 3px; }

/* ==========================================================================
   Alerts / states
   ========================================================================== */

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--r);
  border: 1px solid var(--info-line); background: var(--info-bg); color: var(--info);
  font-size: 12.5px;
}
.alert .txt { color: var(--ink); flex: 1; min-width: 0; }
.alert .txt b { display: block; margin-bottom: 1px; }
.alert.ok   { border-color: var(--ok-line);   background: var(--ok-bg);   color: var(--ok); }
.alert.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.alert.crit { border-color: var(--crit-line); background: var(--crit-bg); color: var(--crit); }
.alert svg { flex: none; margin-top: 1px; }

.empty {
  text-align: center; padding: 36px 20px; color: var(--ink-muted);
}
.empty .ill {
  width: 46px; height: 46px; margin: 0 auto 11px;
  border-radius: 50%; background: var(--surface-sunk);
  display: grid; place-items: center; color: var(--ink-faint);
  border: 1px solid var(--line);
}
.empty b { display: block; color: var(--ink); font-size: 13.5px; margin-bottom: 3px; font-family: var(--font-display); }
.empty p { font-size: 12.5px; max-width: 330px; margin: 0 auto 12px; }

.skel { background: linear-gradient(90deg, var(--surface-sunk) 25%, var(--surface-2) 37%, var(--surface-sunk) 63%);
  background-size: 400% 100%; animation: sh 1.3s ease infinite; border-radius: var(--r-sm); }
@keyframes sh { from { background-position: 100% 0 } to { background-position: 0 0 } }
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.alert-list .al {
  display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: flex-start;
  cursor: pointer;
}
.alert-list .al:last-child { border-bottom: 0; }
.alert-list .al:hover { background: var(--surface-2); }
.alert-list .al .sev { width: 3px; align-self: stretch; border-radius: 2px; background: var(--neutral-line); flex: none; }
.alert-list .al .sev.crit { background: var(--crit); }
.alert-list .al .sev.warn { background: var(--brand-gold); }
.alert-list .al .sev.info { background: var(--info); }
.alert-list .al .t { font-size: 12.5px; font-weight: 500; }
.alert-list .al .d { font-size: 11.5px; color: var(--ink-muted); }
.alert-list .al .w { font-size: 10.5px; color: var(--ink-faint); margin-left: auto; white-space: nowrap; }

/* --- Task list --------------------------------------------------------- */
.tasklist .tk {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.tasklist .tk:last-child { border-bottom: 0; }
.tasklist .tk input { margin-top: 2px; width: 14px; height: 14px; accent-color: var(--brand-teal); flex: none; cursor: pointer; }
.tasklist .tk .b { flex: 1; min-width: 0; }
.tasklist .tk .b .t { font-size: 12.5px; font-weight: 500; }
.tasklist .tk .b .m { font-size: 11px; color: var(--ink-muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.tasklist .tk.done .b .t { text-decoration: line-through; color: var(--ink-faint); }

/* --- Bars / mini charts ------------------------------------------------ */
.barlist { display: flex; flex-direction: column; gap: 9px; }
.barlist .bl { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 12px; }
.barlist .bl .k { display: flex; align-items: center; gap: 6px; min-width: 0; }
.barlist .bl .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.barlist .bl .track { grid-column: 1 / -1; height: 5px; background: var(--surface-sunk); border-radius: 3px; overflow: hidden; }
.barlist .bl .track i { display: block; height: 100%; border-radius: 3px; background: var(--brand-teal); }
.barlist .bl .track i.navy { background: var(--brand-navy-lift); }
.barlist .bl .track i.gold { background: var(--brand-gold); }
.barlist .bl .track i.info { background: var(--info); }

.donut-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut-legend { display: flex; flex-direction: column; gap: 5px; font-size: 12px; min-width: 150px; flex: 1; }
.donut-legend .lg { display: flex; align-items: center; gap: 7px; }
.donut-legend .lg .sw { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.donut-legend .lg .v { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }

/* --- Doc list ---------------------------------------------------------- */
.doclist .dc {
  display: flex; gap: 10px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.doclist .dc:last-child { border-bottom: 0; }
.doclist .dc .ic {
  width: 30px; height: 30px; border-radius: var(--r-sm); flex: none;
  background: var(--surface-sunk); display: grid; place-items: center; color: var(--ink-muted);
  border: 1px solid var(--line);
}
.doclist .dc .b { flex: 1; min-width: 0; }
.doclist .dc .b .t { font-size: 12.5px; font-weight: 500; }
.doclist .dc .b .m { font-size: 11px; color: var(--ink-muted); }

/* --- Relationship map --------------------------------------------------- */
.relmap { display: flex; flex-direction: column; gap: 0; }
.relmap .rl {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.relmap .rl:last-child { border-bottom: 0; }
.relmap .node { display: flex; align-items: center; gap: 8px; min-width: 0; }
.relmap .node .nm { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relmap .node .sb { font-size: 10.5px; color: var(--ink-muted); }
.relmap .link { text-align: center; font-size: 10px; color: var(--ink-muted); white-space: nowrap; }
.relmap .link .ln { height: 1px; background: var(--line-strong); margin: 3px 0; }

/* --- Integration widget -------------------------------------------------- */
.ext {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(12,138,135,.028) 9px 18px);
}
.ext-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px dashed var(--line-strong);
  font-size: 11px; color: var(--ink-muted);
}
.ext-head .src {
  font-family: var(--font-display); font-size: 9.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid var(--line-strong); border-radius: 3px; padding: 1px 5px;
  color: var(--ink-2);
}

/* --- Audit ------------------------------------------------------------- */
.audit { font-size: 11.5px; }
.audit .au { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.audit .au:last-child { border-bottom: 0; }
.audit .au .w { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.audit .au .e b { font-weight: 600; }

/* --- Design system page ------------------------------------------------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 10px; }
.sw {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface);
}
.sw .chip { height: 52px; }
.sw .meta { padding: 7px 9px; font-size: 11px; }
.sw .meta b { display: block; font-size: 11.5px; }
.sw .meta code { font-family: var(--font-mono); color: var(--ink-muted); font-size: 10.5px; }

.spec-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec-row:last-child { border-bottom: 0; }
.spec-row .lbl { width: 128px; flex: none; font-size: 11px; color: var(--ink-muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */

.rail-toggle { display: none; }

@media (max-width: 1180px) {
  :root { --rail: 210px; }
  .gsearch { width: min(280px, 28vw); }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    position: fixed; top: 0; bottom: 0; left: 0; width: 246px; z-index: 210;
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: var(--shadow-3);
  }
  .app.nav-open .rail { transform: none; }
  .rail-toggle { display: grid; }
  .page { padding: 16px 16px 48px; }
  .who .meta { display: none; }
  .gsearch { width: auto; flex: 1; min-width: 120px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .nav-scrim { position: fixed; inset: 0; background: rgba(5,24,40,.45); z-index: 205; }
}

@media (max-width: 620px) {
  .topbar .crumbs { display: none; }
  .factstrip { grid-template-columns: repeat(2, 1fr); }
  .factstrip .fact:nth-child(2n) { border-right: 0; }
  .dl { grid-template-columns: 1fr; }
  .dl dd { text-align: left; font-weight: 600; padding-top: 0; }
  .dl dt { border-bottom: 0; padding-bottom: 0; }
}

.hidden { display: none !important; }

/* ---- Record / Replace document popup ------------------------------------ */
.dd-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.dd-step { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-muted); }
.dd-step i { display: block; height: 3px; border-radius: 2px; background: var(--line); }
.dd-step.on i { background: var(--brand-teal); }
.dd-step.cur { color: var(--ink); font-weight: 500; }
.dd-body { display: flex; flex-direction: column; gap: 18px; padding: 20px 0 18px; }
.dd-replacing { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--surface-2); border-radius: var(--r-lg); font-size: 13px; }
.dd-replacing .k { font: 500 11px var(--font-mono); letter-spacing: .08em; color: var(--ink-muted); }
.dd-replacing .t { flex: 1; min-width: 200px; color: var(--ink-2, var(--ink)); }
.dd-replacing a { font-weight: 500; }
.dd-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dd-slot { display: flex; align-items: center; gap: 12px; padding: 12px; min-width: 0; text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); font: inherit; color: inherit; }
.dd-slot.has { border: 1px solid var(--line-strong); }
.dd-slot:hover:not([disabled]) { border-color: var(--brand-teal); }
.dd-slot[disabled] { cursor: progress; }
.dd-thumb { width: 52px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 6px; font: 500 12px var(--font-mono);
  background: var(--surface-2); color: var(--ink-muted); border: 1px dashed var(--line-strong); }
.dd-slot.has .dd-thumb { background: #e6f3f2; color: var(--brand-teal); border: 1px solid #cfe7e4; }
.dd-slot-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dd-slot-tx .t { font-size: 14px; font-weight: 500; }
.dd-slot-tx .s { font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-slot-tx .s.ok { color: #2f6e4a; font-weight: 500; }
.dd-slot-tx .s.bad { color: var(--crit); font-weight: 500; }
.dd-slot-act { flex: none; font-size: 13px; font-weight: 500; color: var(--brand-teal); }
.dd-bar { display: block; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.dd-bar i { display: block; height: 100%; background: var(--brand-teal); transition: width .14s linear; }
.dd-help { margin: -6px 0 0; font-size: 13px; color: var(--ink-muted); line-height: 1.5; }
.dd-help .link-btn { padding: 0 2px; }
.dd-scanning { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #f0f8f7; border: 1px solid #cfe7e4; border-radius: var(--r-lg); font-size: 13px; }
.dd-spin { width: 16px; height: 16px; flex: none; box-sizing: border-box; border-radius: 50%; border: 2px solid #b7dcd8; border-top-color: var(--brand-teal); animation: spin .8s linear infinite; }
.dd-review { display: flex; flex-direction: column; gap: 12px; }
.dd-rhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dd-rhead h3 { margin: 0; flex: 1; font-size: 16px; font-weight: 600; }
.dd-rhead .muted { font-size: 13px; }
.dd-table { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.dd-row { display: grid; grid-template-columns: minmax(110px, .9fr) minmax(0, 1.6fr) minmax(0, 1.1fr); gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: start; }
.dd-row.head { border-top: 0; padding: 9px 14px; background: var(--surface-2); font: 500 11px var(--font-mono); letter-spacing: .06em; color: var(--ink-muted); }
.dd-row.flag { background: #fffdf7; }
.dd-f, .dd-r { display: flex; flex-direction: column; gap: 3px; padding-top: 10px; min-width: 0; }
.dd-f .l { font-size: 13px; font-weight: 500; }
.dd-f .c { font: 11px var(--font-mono); }
.dd-f .c.ok { color: #2f6e4a; } .dd-f .c.bad { color: var(--crit); } .dd-f .c.muted { color: #8a5c0c; }
.dd-v { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dd-v .kyc-input { height: 40px; width: 100%; box-sizing: border-box; }
.dd-v .kyc-input.warn { border-color: #e5c98a; }
.dd-v .kyc-input.bad { border-color: #e4b4ae; }
.dd-v .kyc-input[dir="rtl"] { font-family: 'IBM Plex Sans Arabic', var(--font-body, sans-serif); font-size: 15px; }
.dd-note { font-size: 12px; font-weight: 500; color: #8a5c0c; }
.dd-note.bad { color: var(--crit); }
.dd-note.info { color: var(--ink-muted); font-weight: 400; }
.dd-r .rv { font-size: 13px; overflow-wrap: anywhere; }
.dd-r .rv.same { color: var(--ink-muted); }
.dd-r .rv[dir="rtl"] { text-align: left; }
.dd-r .link-btn { align-self: flex-start; padding: 0; font-size: 12px; font-weight: 600; }
.dd-sync { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; }
.dd-sync input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand-teal); }
.dd-sync > span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-muted); }
.dd-sync b { font-size: 14px; font-weight: 500; color: var(--ink); }
.dd-fname { display: flex; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.dd-fname input { flex: 1; min-width: 0; border: 0; padding: 0 12px; font: 14px var(--font-mono); color: var(--ink); background: transparent; outline: none; }
.dd-fname:focus-within { border-color: var(--brand-teal); box-shadow: 0 0 0 3px #d4ecea; }
.dd-fname span { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border-left: 1px solid var(--line); font: 13px var(--font-mono); color: var(--ink-muted); }
@media (max-width: 640px) { .dd-row { grid-template-columns: 1fr; gap: 6px; } .dd-row.head { display: none; } .dd-f, .dd-r { padding-top: 0; } }

/* Record document without OCR */
.modal.kyc-modal.dd-narrow { max-width: 640px; }
.rd-body { gap: 20px; }
.rd-pick { display: flex; flex-direction: column; gap: 10px; }
.rd-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 20px; border: 1.5px dashed var(--line-strong); border-radius: 12px;
  background: var(--surface-2); cursor: pointer; color: var(--ink); font: inherit; }
.rd-drop:hover, .rd-drop.over { border-color: var(--brand-teal); background: #f0f8f7; }
.rd-up { width: 40px; height: 40px; border-radius: 50%; background: #e6f3f2; color: var(--brand-teal); font-size: 20px; display: grid; place-items: center; }
.rd-drop .t { font-size: 15px; font-weight: 500; }
.rd-drop .lnk { color: var(--brand-teal); }
.rd-drop .s { font-size: 13px; color: var(--ink-muted); }
.rd-or { display: flex; align-items: center; gap: 12px; }
.rd-or i { flex: 1; height: 1px; background: var(--line); min-width: 40px; }
.rd-reject { font-size: 13px; color: var(--crit); font-weight: 500; text-align: center; }
.rd-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); }
.rd-badge { width: 40px; height: 48px; flex: none; border-radius: 6px; display: grid; place-items: center; font: 600 11px var(--font-mono); background: #fbe9e7; color: var(--crit); }
.rd-badge.img { background: #e6f3f2; color: var(--brand-teal); }
.rd-ftx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rd-ftx .n { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-ftx .s { font-size: 12px; color: #2f6e4a; font-weight: 500; }
.rd-file .link-btn { flex: none; padding: 4px; }
.rd-photo { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-lg); font-size: 13px; line-height: 1.45; }
.rd-photo .link-btn { padding: 0; font-weight: 600; }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.rd-grid .kyc-input.bad { border-color: #e4b4ae; } .rd-grid .kyc-input.warn { border-color: #e5c98a; }
.kyc-hint.bad { color: var(--crit); font-weight: 500; }

/* ---- Onboarding: Documents stage ----------------------------------------- */
.ds-chip { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 10px; white-space: nowrap; margin-left: 10px; }
.ds-chip.ok { background: #e8f4ec; color: #2f6e4a; } .ds-chip.warn { background: var(--warn-bg); color: var(--warn); } .ds-chip.prog { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.ds-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.ds-stats > div { background: var(--surface); padding: 12px 18px; display: flex; flex-direction: column; gap: 2px; }
.ds-stats .v { font: 600 20px var(--font-mono); color: var(--ink); }
.ds-stats .v.warn { color: var(--warn); } .ds-stats .v.crit { color: var(--crit); }
.ds-stats .l { font-size: 12px; color: var(--ink-muted); }
.ds-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ds-filters { display: flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); flex-wrap: wrap; }
.ds-filters button { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-muted); font: 500 13px var(--font-body, inherit); cursor: pointer; white-space: nowrap; }
.ds-filters button.on { background: var(--surface); color: var(--brand-teal); box-shadow: 0 1px 2px rgba(16,32,36,.12); }
.ds-filters .c { font: 11px var(--font-mono); padding: 1px 6px; border-radius: 8px; background: var(--line); color: var(--ink-muted); }
.ds-filters .c.warn { background: var(--warn-bg); color: var(--warn); }
.ds-flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-muted); }
.ds-status { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 10px; white-space: nowrap; text-align: center; background: var(--surface-2); color: var(--ink-muted); }
.ds-status.ok { background: #e8f4ec; color: #2f6e4a; } .ds-status.appr { background: #e8f0fb; color: #24589e; } .ds-status.pend { background: #eef1f8; color: #3d4f8a; }
.ds-status.warn { background: var(--warn-bg); color: var(--warn); } .ds-status.crit { background: #fbe9e7; color: var(--crit); }
.ds-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.ds-ghead { display: flex; align-items: baseline; gap: 10px; }
.ds-ghead .t { font: 500 11px var(--font-mono); letter-spacing: .1em; color: var(--ink-muted); }
.ds-ghead .s { font-size: 12px; color: var(--ink-muted); }
.ds-list { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; container-type: inline-size; }
.ds-doc + .ds-doc { border-top: 1px solid var(--line); }
.ds-doc.att { background: #fffdf7; }
/* Fixed widths for every column after the name, so expiry, status and actions line up across rows
   whatever the number of buttons (actions column fits View + Scanned data + Replace). */
.ds-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 150px 130px 280px; align-items: center; gap: 14px; padding: 12px 16px; }
.ds-thumb { width: 52px; height: 40px; border-radius: 6px; display: grid; place-items: center; font: 500 11px var(--font-mono); background: var(--surface-2); color: var(--ink-faint, #97a5a9); border: 1px dashed var(--line-strong); }
.ds-thumb.on { background: #e6f3f2; color: var(--brand-teal); border: 1px solid #cfe7e4; }
.ds-name { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ds-name b { font-size: 14px; font-weight: 500; }
.ds-name .m { font-size: 12px; color: var(--ink-muted); display: flex; flex-wrap: wrap; column-gap: 4px; min-width: 0; white-space: nowrap; }
/* The file name gives way; the upload date always stays visible (it drops to its own line when narrow). */
.ds-name .m .fn { overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; }
.ds-name .m .up { flex: none; }
.ds-ocrtag { font: 500 10px var(--font-mono); color: var(--brand-teal); background: #e6f3f2; padding: 2px 5px; border-radius: 3px; letter-spacing: .04em; }
.ds-exp { font-size: 12px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; justify-self: end; text-align: right; }
.ds-exp.warn { color: var(--warn); background: var(--warn-bg); padding: 3px 9px; border-radius: 10px; }
.ds-exp.crit { color: var(--crit); background: #fbe9e7; padding: 3px 9px; border-radius: 10px; }
.ds-row .ds-status { justify-self: start; }
.ds-act { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.ds-act .btn.on { border-color: var(--brand-teal); background: #e6f3f2; color: #0a5f5a; }
.ds-ocr { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 20px; padding: 12px 16px 14px 82px; background: var(--surface-2); border-top: 1px solid var(--line); }
.ds-ocr .k { display: block; font-size: 11px; color: var(--ink-muted); }
.ds-ocr .v { display: block; font-size: 14px; }
.ds-ocr .v[dir="rtl"] { font-family: 'IBM Plex Sans Arabic', sans-serif; text-align: left; }
.ds-empty { padding: 16px; font-size: 13px; color: var(--ink-muted); }
/* Narrow panel (not window): name and dates on the first line, status and actions underneath. */
@container (max-width: 860px) {
  .ds-row { grid-template-columns: 52px auto minmax(0, 1fr) auto; grid-template-areas: "th nm nm ex" "th st ac ac"; row-gap: 8px; }
  .ds-thumb { grid-area: th; align-self: start; } .ds-name { grid-area: nm; } .ds-exp { grid-area: ex; align-self: start; }
  .ds-row .ds-status { grid-area: st; justify-self: start; } .ds-act { grid-area: ac; justify-content: flex-end; }
  .ds-ocr { padding-left: 16px; }
}

/* Client Activation: outstanding items per stage */
.act-gap { margin-top: 10px; }
.act-gap .h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.act-gap .h .link-btn { padding: 0 4px; font-size: 12.5px; }
.act-gap .stage-gaps { margin-top: 3px; }
.btn.gold[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- Activate client popup ----------------------------------------------- */
.ac-life { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ac-life span { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 10px; background: var(--surface-2); color: var(--ink-muted); white-space: nowrap; }
.ac-life span.past { background: #e6f3f2; color: #0a5f5a; } .ac-life span.cur { background: var(--brand-teal); color: #fff; }
.ac-life i { font-style: normal; font-size: 12px; color: var(--line-strong); }
.ac-ready { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid #cfe6d7; background: #eef7f1; border-radius: var(--r-lg); cursor: pointer; text-align: left; color: var(--ink); font: inherit; }
.ac-ready .ic { width: 22px; height: 22px; flex: none; border-radius: 50%; background: #2f7a4a; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ac-ready .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ac-ready .tx b { font-size: 14px; font-weight: 500; color: #1f5233; } .ac-ready .tx span { font-size: 13px; color: #3d6b4c; }
.ac-ready .lnk { font-size: 13px; font-weight: 500; color: #2f6e4a; white-space: nowrap; }
.ac-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 20px; padding: 4px 4px 0; }
.ac-checks div { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.ac-checks b { color: #2f7a4a; } .ac-checks span { flex: 1; } .ac-checks em { font-style: normal; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.ac-ro { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; }
.ac-ro .mono { flex: 1; font: 500 15px var(--font-mono); letter-spacing: .03em; }
.ac-tag { font-size: 11px; font-weight: 500; color: var(--ink-muted); background: var(--line); padding: 2px 7px; border-radius: 8px; }
.ac-risk { font-weight: 500; } .ac-risk.low { color: #2f6e4a; } .ac-risk.medium { color: var(--warn); } .ac-risk.high { color: var(--crit); }
.kyc-hint .warn { color: #8a5c0c; font-weight: 500; }
.ac-rm { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-lg); border: 1.5px solid var(--brand-teal); background: #f0f8f7; max-width: 320px; }
.ac-rm .av { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--brand-teal); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.ac-rm .tx { display: flex; flex-direction: column; gap: 1px; } .ac-rm .tx b { font-size: 14px; font-weight: 500; } .ac-rm .tx span { font-size: 12px; color: var(--brand-teal); }
.ac-effects { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.ac-effects div { display: flex; align-items: baseline; gap: 12px; padding: 11px 14px; flex-wrap: wrap; }
.ac-effects div + div { border-top: 1px solid var(--line); }
.ac-effects .n { font: 500 12px var(--font-mono); color: var(--brand-teal); width: 20px; flex: none; }
.ac-effects .t { flex: 1; min-width: 0; font-size: 14px; } .ac-effects .m { font-size: 12px; color: var(--ink-muted); text-align: right; }
.ac-done { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 36px 8px; }
.ac-done .ok { width: 56px; height: 56px; border-radius: 50%; background: #e8f4ec; color: #2f7a4a; font-size: 26px; font-weight: 700; display: grid; place-items: center; }
.ac-done h3 { margin: 0; font-size: 22px; font-weight: 600; } .ac-done p { margin: 0; font-size: 14px; color: var(--ink-muted); max-width: 440px; line-height: 1.5; }
.ac-done .dl2 { display: grid; grid-template-columns: auto auto; gap: 6px 18px; padding: 14px 18px; background: var(--surface-2); border-radius: var(--r-lg); font-size: 13px; text-align: left; }
.ac-done .dl2 span { color: var(--ink-muted); } .ac-done .dl2 b { font-weight: 500; }

/* Client activated — summary */
.acd { display: flex; flex-direction: column; gap: 22px; padding: 22px 0 18px; }
.acd-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.acd-head .ok { width: 52px; height: 52px; flex: none; border-radius: 50%; background: #e8f4ec; color: #2f7a4a; font-size: 24px; font-weight: 700; display: grid; place-items: center; }
.acd-head > div { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 3px; }
.acd-head h3 { margin: 0; font-size: 20px; font-weight: 600; } .acd-head span { font-size: 14px; color: var(--ink-muted); }
.acd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.acd-stats > div { background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.acd-stats .k { font-size: 12px; color: var(--ink-muted); } .acd-stats .v { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.acd-stats .mono { font: 500 15px var(--font-mono); } .acd-stats .link-btn { padding: 0; font-size: 12px; font-weight: 600; }
.acd-sec { display: flex; flex-direction: column; gap: 10px; }
.acd-sec h4 { margin: 0; font: 500 11px var(--font-mono); color: var(--ink-muted); letter-spacing: .1em; }
.acd-list { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.acd-list > div { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.acd-list > div + div { border-top: 1px solid var(--line); }
.acd-list .ic { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.acd-list .ic.ok { background: #e8f4ec; color: #2f7a4a; } .acd-list .ic.wait { background: var(--warn-bg); color: var(--warn); }
.acd-list .t { flex: 1; min-width: 0; font-size: 14px; }
.acd-list .m { font-size: 12px; color: var(--ink-muted); white-space: nowrap; } .acd-list .m.wait { color: var(--warn); }
.acd-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.acd-next button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; text-align: left; color: var(--ink); font: inherit; }
.acd-next button:hover { border-color: var(--brand-teal); background: #f0f8f7; }
.acd-next b { font-size: 14px; font-weight: 500; } .acd-next span { font-size: 12px; color: var(--ink-muted); line-height: 1.4; }

/* Task title opens the Complete task popup */
.tasklist .t .task-open { padding: 0; color: var(--ink); font-weight: 500; text-align: left; font-size: inherit; }
.tasklist .t .task-open:hover { color: var(--brand-teal); text-decoration: underline; }

/* ==========================================================================
   Dashboard (design: Dashboard.html) and Client list (design: Client List.html)
   ========================================================================== */
.db, .cl { display: flex; flex-direction: column; gap: 18px; max-width: 1500px; }
.db-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.db-head > div:first-child { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 4px; }
.db-head h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.db-head span { font-size: 14px; color: var(--ink-muted); }
.db-card, .cl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.db-ch { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.db-ch h2 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; }
.db-ch .muted { font-size: 13px; } .db-ch a { font-size: 13px; font-weight: 500; }
.db-ch .mono { font: 500 13px var(--font-mono); }
.db-pipe { padding: 0; } .db-pipe .db-ch { border-bottom: 0; padding-bottom: 6px; } .db-pipe .db-ch .muted { font-size: 12px; }
.db-pipe-row { display: flex; gap: 16px; flex-wrap: wrap; padding: 6px 18px 0; }
.db-funnel { flex: 4 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.db-side { flex: 2 1 260px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-left: 16px; border-left: 1px solid var(--line); }
.db-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none !important; color: var(--ink); }
.db-tile .l { font-size: 12px; color: var(--ink-muted); }
.db-tile .v { font: 600 24px var(--font-mono); color: var(--ink); } .db-tile .v.zero { color: var(--ink-faint); }
.db-tile .s { font-size: 12px; color: var(--ink-muted); } .db-tile .s.warn { color: var(--warn); font-weight: 500; }
.db-tile.dark { background: #0f3d3a; border-color: #0f3d3a; } .db-tile.dark .l { color: #b7dcd8; } .db-tile.dark .v { color: #fff; } .db-tile.dark .s { color: #cfe7e4; }
.db-tile.dashed { background: var(--surface); border-style: dashed; border-color: var(--line-strong); }
.db-tile:hover { border-color: var(--brand-teal); }
.db-pipe-foot { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--ink-muted); padding: 12px 18px 16px; }
.db-pipe-foot b { font: 500 13px var(--font-mono); color: var(--ink); } .db-pipe-foot b.teal { color: var(--brand-teal); font-weight: 600; }
.db-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 18px; align-items: start; }
.db-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.db-empty { padding: 18px; font-size: 13px; color: var(--ink-muted); }
.db-task { display: flex; align-items: center; gap: 12px; padding: 12px 18px; flex-wrap: wrap; }
.db-task + .db-task, .db-next + .db-task { border-top: 1px solid var(--line); }
.db-task .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.db-task .t { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font: 500 14px var(--font-body, inherit); color: var(--ink); }
.db-task .t:hover { color: var(--brand-teal); }
.db-task.done { background: var(--surface-2); } .db-task.done .t { color: var(--ink-faint); text-decoration: line-through; cursor: default; }
.db-task .m { font-size: 12px; color: var(--ink-muted); } .db-task .m .od { color: var(--crit); font-weight: 500; }
.db-kind { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 8px; background: var(--surface-2); color: var(--ink-muted); border: 1px solid var(--line); }
.db-kind.fu { background: #eef1f8; color: #3d4f8a; border-color: #dde3f2; }
.db-out { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 10px; white-space: nowrap; }
.db-out.ok { background: #e8f4ec; color: #2f6e4a; } .db-out.warn { background: var(--warn-bg); color: var(--warn); } .db-out.grey { background: var(--surface-2); color: var(--ink-muted); }
.db-next { display: flex; align-items: center; gap: 10px; padding: 0 18px 12px 18px; flex-wrap: wrap; background: var(--surface-2); }
.db-next span { font-size: 13px; color: #2f6e4a; }
.db-seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; }
.db-seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; background: transparent; color: var(--ink-muted); }
.db-seg button.on { background: var(--surface); color: var(--brand-teal); box-shadow: 0 1px 2px rgba(16,32,36,.12); }
.db-feed { padding: 6px 18px 14px; display: flex; flex-direction: column; }
.db-day { font: 500 11px var(--font-mono); color: var(--ink-muted); letter-spacing: .1em; padding: 10px 0 4px; }
.db-ev { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.db-ev .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--brand-teal); } .db-ev .dot.comp { background: #7b8fc7; }
.db-ev .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.db-ev .t { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.db-ev .t em { font: 500 11px var(--font-mono); font-style: normal; color: var(--ink-muted); background: var(--surface-2); padding: 1px 6px; border-radius: 8px; }
.db-ev .b { font-size: 13px; color: var(--ink-muted); line-height: 1.45; }
.db-ev .w { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.db-more { font-size: 13px; font-weight: 500; padding-top: 12px; }
.db-fu { display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; }
.db-fu + .db-fu { border-top: 1px solid var(--line); } .db-fu.new { background: #f6fbfa; } .db-fu:hover { background: var(--surface-2); }
.db-fu .av { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: #0f3d3a; color: #fff; }
.db-fu .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.db-fu .t { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.db-fu .t em { font-style: normal; font-size: 10px; font-weight: 600; color: #0a5f5a; background: #d4ecea; padding: 1px 6px; border-radius: 6px; }
.db-fu .m { font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-fu .w { font-size: 12px; font-weight: 500; color: var(--ink-muted); white-space: nowrap; } .db-fu .w.today { color: var(--warn); } .db-fu .w.od { color: var(--crit); }
.db-chip { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 10px; } .db-chip.ok { background: #e8f4ec; color: #2f6e4a; } .db-chip.crit { background: #fbe9e7; color: var(--crit); }
.db-att { display: flex; gap: 12px; padding: 14px 18px; align-items: flex-start; }
.db-att + .db-att { border-top: 1px solid var(--line); }
.db-att .ic { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; font: 600 12px var(--font-mono); background: #e6f3f2; color: var(--brand-teal); }
.db-att.crit .ic { background: #fbe9e7; color: var(--crit); } .db-att.warn .ic { background: var(--warn-bg); color: var(--warn); } .db-att.muted .ic { background: var(--surface-2); color: var(--ink-muted); }
.db-att .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.db-att .tx b { font-size: 14px; font-weight: 500; } .db-att .tx > span { font-size: 13px; color: var(--ink-muted); line-height: 1.45; }
.db-att .bar { display: block; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 4px; } .db-att .bar i { display: block; height: 100%; background: var(--brand-teal); }
.db-att .pct { font: 500 12px var(--font-mono); color: var(--ink-2); }
.db-att .link-btn { padding: 2px 0; font-weight: 600; white-space: nowrap; }
.db-opp { padding: 18px; display: flex; flex-direction: column; gap: 12px; } .db-opp > b { font-size: 14px; font-weight: 500; } .db-opp > .muted { font-size: 13px; line-height: 1.5; }
.db-opp-row { display: flex; align-items: center; gap: 12px; cursor: pointer; } .db-opp-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.db-opp-row b { font-size: 14px; font-weight: 500; } .db-opp-row span { font-size: 12px; color: var(--ink-muted); } .db-opp-row .v { font: 500 14px var(--font-mono); color: var(--ink); }
.db-opp-foot { display: flex; gap: 16px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-muted); flex-wrap: wrap; }
.db-opp-foot b { font: 500 12px var(--font-mono); color: var(--ink-2); }
.db-jur { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.db-jur > div { display: flex; flex-direction: column; gap: 6px; }
.db-jur .h { display: flex; align-items: baseline; gap: 8px; } .db-jur .h span { font-size: 14px; font-weight: 500; flex: 1; } .db-jur .h em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.db-jur .h b { font: 500 14px var(--font-mono); } .db-jur .h b.zero { color: var(--ink-faint); }
.db-jur .bar { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; } .db-jur .bar i { display: block; height: 100%; background: var(--brand-teal); }
.db-jur .s { font-size: 12px; color: var(--ink-muted); } .db-jur .s.foot { padding-top: 6px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .db-side { padding-left: 0; border-left: 0; } .db-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cl-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 18px; border: 0; background: var(--surface); text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.cl-stat[disabled] { cursor: default; } .cl-stat:not([disabled]):hover { background: var(--surface-2); }
.cl-stat .l { font-size: 13px; color: var(--ink-muted); } .cl-stat .v { font: 600 24px var(--font-mono); letter-spacing: -.01em; }
.cl-stat .s { font-size: 12px; color: var(--ink-muted); } .cl-stat .warn { color: var(--warn); } .cl-stat .s.warn { font-weight: 500; }
.cl-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cl-bar .ds-filters { flex-wrap: wrap; }
.cl-search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink-muted); cursor: text; }
.cl-search:focus-within { border-color: var(--brand-teal); box-shadow: 0 0 0 3px #d4ecea; }
.cl-search input { flex: 1; min-width: 0; border: 0; outline: none; font: 14px var(--font-body, inherit); color: var(--ink); background: transparent; }
.cl-filters { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cl-chip { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border-radius: 15px; background: #e6f3f2; color: #0a5f5a; font-size: 13px; font-weight: 500; }
.cl-chip button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: #0a5f5a; cursor: pointer; font-size: 14px; } .cl-chip button:hover { background: #cfe7e4; }
.cl-add { height: 30px; border: 1px dashed var(--line-strong); border-radius: 15px; padding: 0 26px 0 12px; font: 13px var(--font-body, inherit); color: var(--ink-2); cursor: pointer; outline: none; appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%235b6b70'/%3E%3C/svg%3E") no-repeat right 10px center; }
.cl-add:hover, .cl-add:focus { border-color: var(--brand-teal); }
.cl-selbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #0f3d3a; color: #fff; flex-wrap: wrap; }
.cl-selbar span { font-size: 14px; font-weight: 500; flex: 1; min-width: 120px; }
.cl-selbar button { height: 32px; padding: 0 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; background: transparent; color: #fff; font-size: 13px; cursor: pointer; }
.cl-selbar button:hover { background: rgba(255,255,255,.08); } .cl-selbar .clr { border: 0; color: #b7dcd8; }
.cl-scroll { overflow-x: auto; } .cl-table { min-width: 1080px; }
.cl-row { display: grid; gap: 0 12px; align-items: center; padding: 0 16px; min-height: 60px; border-bottom: 1px solid var(--line); font-size: 13px; }
.cl-row:hover:not(.head) { background: #f7faf9; } .cl-row.sel { background: #f0f8f7; }
.cl-row.head { min-height: 40px; background: var(--surface-2); font: 500 11px var(--font-mono); color: var(--ink-muted); letter-spacing: .06em; }
.cl-row.head button { border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; }
.cl-row input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-teal); }
.cl-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cl-name .av { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: #e6f3f2; color: var(--brand-teal); }
.cl-name .av.corp { border-radius: 8px; background: #f3ead5; color: #8a5c0c; }
.cl-name .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cl-name a { font-size: 14px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-name .tx > span { font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.cl-row .jur { font: 500 12px var(--font-mono); color: var(--ink-2); } .cl-row .seg { font-weight: 500; }
.cl-row .warn { color: var(--warn); } .cl-row .crit { color: var(--crit); font-weight: 500; } .cl-row .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cl-row .aum { display: flex; flex-direction: column; gap: 4px; } .cl-row .aum .mono { font: 500 14px var(--font-mono); }
.cl-row .aum .bar { display: block; height: 4px; width: 120px; border-radius: 2px; background: var(--surface-2); overflow: hidden; } .cl-row .aum .bar i { display: block; height: 100%; background: #7fc0ba; }
.cl-row .risk { font-weight: 500; } .cl-row .risk.ok { color: #2f6e4a; } .cl-row .risk.warn { color: var(--warn); } .cl-row .risk.crit { color: var(--crit); }
.cl-status { justify-self: start; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 10px; } .cl-status.act { background: #e8f4ec; color: #2f6e4a; } .cl-status.dorm { background: var(--surface-2); color: var(--ink-muted); }
.cl-row .act { display: flex; justify-content: flex-end; gap: 4px; }
.cl-row .more { width: 30px; height: 30px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 16px; cursor: pointer; line-height: 1; } .cl-row .more:hover { background: var(--surface-2); }
.cl-none { padding: 40px 16px; text-align: center; font-size: 14px; color: var(--ink-muted); }
.cl-pop { position: fixed; z-index: 260; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,32,36,.18); overflow: hidden; }
.cl-pop-h { padding: 10px 14px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; } .cl-pop-h.row { flex-direction: row; align-items: center; justify-content: space-between; }
.cl-pop-h b { font-size: 13px; font-weight: 600; } .cl-pop-h .mono { font: 12px var(--font-mono); color: var(--ink-muted); } .cl-pop-h .link-btn { padding: 2px; font-size: 12px; font-weight: 600; }
.cl-pop-g { padding: 4px 0; } .cl-pop-g + .cl-pop-g { border-top: 1px solid var(--line); }
.cl-pop-g button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; border: 0; background: none; text-align: left; font: 14px var(--font-body, inherit); color: var(--ink); cursor: pointer; }
.cl-pop-g button:hover { background: #f0f8f7; } .cl-pop-g button span { flex: 1; } .cl-pop-g em { font-style: normal; font-size: 12px; color: var(--ink-faint); } .cl-pop-g em.warn { color: var(--warn); }
.cl-pop-g label { display: flex; align-items: center; gap: 10px; padding: 7px 14px; font-size: 14px; cursor: pointer; } .cl-pop-g label:hover { background: var(--surface-2); } .cl-pop-g label.dis { color: var(--ink-muted); cursor: default; }
.cl-pop-g input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-teal); }
.cl-pop-f { padding: 8px 14px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-muted); }

/* Complete task popup */
.ct-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 18px; padding: 14px 16px; background: var(--surface-2); border-radius: 10px; }
.ct-details > div { display: flex; flex-direction: column; gap: 2px; }
.ct-details span { font-size: 11px; color: var(--ink-muted); } .ct-details b { font-size: 14px; font-weight: 500; }
.ct-details .desc { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line); } .ct-details .desc b { font-weight: 400; line-height: 1.5; }
.opt-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.db-later { display: block; padding: 10px 18px 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.cl-filters .cl-add { width: auto; flex: none; min-width: 0; max-width: 220px; }

/* Form framework rendered in a side panel */
.drawer .htop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drawer.kyc-drawer { width: min(600px, 100vw); }
.drawer.kyc-drawer .drawer-body { padding: 0 24px 6px; }
.drawer.kyc-drawer .drawer-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.drawer.kyc-drawer .kyc-foot-left { flex: 1; min-width: 160px; }

/* Opportunity panel */
.opp-range { display: flex; align-items: center; gap: 12px; } .opp-range input { flex: 1; accent-color: var(--brand-teal); } .opp-range b { width: 44px; text-align: right; font: 500 15px var(--font-mono); }
.opp-weighted { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; margin-top: 4px; }
.opp-weighted span { flex: 1; font-size: 13px; color: var(--ink-muted); } .opp-weighted b { font: 600 18px var(--font-mono); }
.opt-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opt-grid.c4 .opt-card, .opt-grid.c6 .opt-card { padding: 8px 10px; }

/* Leads / Prospects (designs: Leads.html, Prospects.html) */
.ld-grid { grid-template-columns: 44px minmax(220px, 2fr) 110px 130px 150px 120px 140px 150px 200px; min-height: 62px; }
.pr-grid { grid-template-columns: minmax(230px, 2fr) minmax(170px, 1.4fr) 120px 150px 140px 130px 180px; gap: 0 14px; min-height: 64px; }
.cl-row.head.ld-grid, .cl-row.head.pr-grid { min-height: 40px; }
.cl-row.lost { opacity: .7; } .cl-row.stalled { background: #fffdf7; }
.cl-row .muted { color: var(--ink-muted); }
.ld-type { justify-self: start; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 10px; background: #e6f3f2; color: #0a5f5a; }
.ld-type.corp { background: #f3ead5; color: #8a5c0c; }
.ld-pot { font: 500 14px var(--font-mono); } .ld-pot.hi, .pr-pot .hi { color: var(--brand-teal); }
.ld-stage { display: flex; flex-direction: column; gap: 5px; } .ld-stage b { font-size: 12px; font-weight: 500; }
.ld-stage span { display: flex; gap: 3px; } .ld-stage i { width: 22px; height: 4px; border-radius: 2px; background: var(--line); } .ld-stage i.on { background: var(--brand-teal); }
.cl-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-muted); flex-wrap: wrap; }
.cl-pop-g button.danger { color: var(--crit); }
.cl-pop-h > span:not(.mono) { font-size: 12px; color: var(--ink-muted); }
.ld-lost { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; } .ld-lost b { font-size: 13px; font-weight: 500; }
.ld-lost .kyc-pill { height: 30px; padding: 0 10px; font-size: 12px; } .ld-lost .kyc-pill.on { border-color: var(--crit); background: #fbe9e7; color: var(--crit); }
.ld-empty { padding: 40px 32px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.ld-empty h2 { margin: 0; font-size: 20px; font-weight: 600; } .ld-empty p { margin: -14px 0 0; font-size: 14px; color: var(--ink-muted); max-width: 460px; line-height: 1.5; }
.ld-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; width: 100%; max-width: 720px; text-align: left; }
.ld-steps > div { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ld-steps .n { font: 500 12px var(--font-mono); color: var(--brand-teal); } .ld-steps b { font-size: 14px; font-weight: 500; } .ld-steps span:last-child { font-size: 12px; color: var(--ink-muted); line-height: 1.4; }
.pr-int { display: flex; align-items: center; gap: 6px; min-width: 0; } .pr-int .ell { font-size: 13px; }
.pr-int em { flex: none; font: 500 11px var(--font-mono); font-style: normal; color: var(--ink-muted); background: var(--surface-2); padding: 2px 6px; border-radius: 8px; }
.pr-pot { display: flex; flex-direction: column; gap: 2px; } .pr-pot .mono { font: 500 14px var(--font-mono); } .pr-pot span:last-child { font-size: 11px; color: var(--ink-muted); }
.pr-prob { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--ink-muted); } .pr-prob b { font: 500 13px var(--font-mono); color: var(--ink); }
.pr-prob .bar { display: block; height: 4px; width: 110px; border-radius: 2px; background: var(--line); overflow: hidden; }
.pr-prob .bar i { display: block; height: 100%; } .pr-prob .bar i.hi { background: var(--brand-teal); } .pr-prob .bar i.mid { background: #7fc0ba; } .pr-prob .bar i.lo { background: #c9a23a; }

/* Opportunities board (design: Opportunities.html) */
.op-stats .cl-stat { cursor: default; }
.op-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)) minmax(200px, .8fr); gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.op-col { display: flex; flex-direction: column; min-height: 220px; background: #f2f5f6; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.op-col.closed { background: var(--surface-2); border-style: dashed; } .op-col.over { background: #e6f3f2; border-color: var(--brand-teal); }
.op-ch { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.op-ch .r1 { display: flex; align-items: center; gap: 8px; } .op-ch .r1 b { font-size: 14px; font-weight: 600; flex: 1; } .op-ch .r1 .mono { font: 500 12px var(--font-mono); color: var(--ink-muted); }
.op-ch .r2 { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-muted); } .op-ch .r2 .mono { flex: 1; font-family: var(--font-mono); color: var(--ink-2); }
.op-ch .bar { display: block; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; } .op-ch .bar i { display: block; height: 100%; background: var(--brand-teal); }
.op-cards { display: flex; flex-direction: column; gap: 8px; padding: 10px; flex: 1; }
.op-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: grab; }
.op-card:hover { border-color: #9fcfca; box-shadow: 0 2px 8px rgba(16,32,36,.06); } .op-card.dragging { opacity: .5; } .op-card.closed { opacity: .85; }
.op-card .h { display: flex; flex-direction: column; gap: 2px; } .op-card .h b { font-size: 14px; font-weight: 600; } .op-card .h span { font-size: 12px; color: var(--ink-muted); }
.op-card .v { display: flex; align-items: baseline; gap: 8px; } .op-card .v .mono { font: 600 15px var(--font-mono); } .op-card .v em { font: 500 12px var(--font-mono); font-style: normal; color: var(--ink-muted); }
.op-card .t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; font-weight: 500; color: var(--ink-muted); }
.op-card .t .chip { padding: 2px 8px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); } .op-card .t .warn { color: var(--warn); } .op-card .t .crit { color: var(--crit); }
.op-card .f { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--surface-2); font-size: 12px; color: var(--ink-2); }
.op-card .f span:last-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .op-card .f .warn { color: var(--warn); font-weight: 500; }
.op-card .av { width: 22px; height: 22px; flex: none; border-radius: 50%; background: #e6f3f2; color: var(--brand-teal); font-size: 10px; font-weight: 600; display: grid; place-items: center; }
.op-add { padding: 14px 10px; border: 1px dashed var(--line-strong); border-radius: 10px; background: transparent; color: var(--ink-muted); font: 13px var(--font-body, inherit); cursor: pointer; text-align: center; }
.op-add:hover:not(.static) { border-color: var(--brand-teal); color: var(--brand-teal); } .op-add.static { cursor: default; }
.cl-bar .cl-add { width: auto; flex: none; height: 38px; border-radius: 19px; max-width: 220px; }

/* My tasks / Calls / Meetings (designs: My Tasks.html, Calls.html, Meetings.html) */
.cl.at { max-width: 1300px; }
.at-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.at-bar .cl-search { background: var(--surface); height: 36px; min-width: 200px; }
.ds-filters .c.crit { background: #fbe9e7; color: #a8322b; }
.at-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.at-pill { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: 12px var(--font-body); cursor: pointer; white-space: nowrap; }
.at-pill.on { border-color: var(--brand-teal); background: var(--brand-teal-soft); color: var(--brand-teal-dark); font-weight: 500; }
.at-flag { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: #fbf4e4; border: 1px solid #efdcae; border-radius: 10px; flex-wrap: wrap; }
.at-flag .ic { width: 20px; height: 20px; border-radius: 50%; background: #b07a12; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.at-flag .tx { flex: 1; min-width: 220px; font-size: 13px; color: #5e420a; line-height: 1.45; } .at-flag strong { font-weight: 600; }
.at-flag button { border: 0; background: none; color: #7a5410; font: 600 13px var(--font-body); cursor: pointer; white-space: nowrap; }
.at-group { display: flex; flex-direction: column; gap: 8px; }
.at-gh { display: flex; align-items: baseline; gap: 10px; } .at-gh b { font: 500 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.at-gh.late b { color: #a8322b; } .at-gh.today b { color: #8a5c0c; } .at-gh span { font-size: 12px; color: var(--ink-faint); }
.at-list { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.at-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; flex-wrap: wrap; background: var(--surface); }
.at-row + .at-row { border-top: 1px solid #eef2f2; } .at-row:hover { background: #f7faf9; }
.at-row.late { background: #fffafa; } .at-row.late:hover { background: #fdf3f2; }
.at-time { width: 96px; flex: none; font: 500 13px var(--font-mono); color: var(--ink); } .at-row.late .at-time { color: #a8322b; } .at-row.done .at-time { color: var(--ink-faint); }
.at-chip { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 10px; white-space: nowrap; width: 72px; text-align: center; box-sizing: border-box; flex: none; background: #eef2f2; color: var(--ink-2); }
.at-chip.st { width: 86px; }
.at-chip.call { background: #e6f3f2; color: #0a5f5a; } .at-chip.task { background: #eef1f8; color: #3d4f8a; } .at-chip.fu { background: #fbf4e4; color: #8a5c0c; } .at-chip.meet { background: #f3eef8; color: #6a4a8a; }
.at-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.at-subj { font-size: 14px; font-weight: 500; color: var(--ink); } .at-row.done .at-subj { color: var(--ink-faint); text-decoration: line-through; }
.at-meta { font-size: 12px; color: var(--ink-muted); } .at-meta .faint { color: #97a5a9; }
.at-out { width: 170px; flex: none; display: flex; justify-content: flex-end; }
.at-out span { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 10px; background: #e8f4ec; color: #2f6e4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.at-av { width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; background: #e9eeef; color: var(--ink-2); }
.at-av.me { background: #0f3d3a; color: #fff; }
.at-btn.btn { height: 32px; width: 124px; justify-content: center; flex: none; font-size: 13px; }
.at-more { display: block; width: 100%; padding: 10px; border: 0; border-top: 1px solid #eef2f2; background: var(--surface-2); color: var(--brand-teal); font: 500 13px var(--font-body); cursor: pointer; }
.at-empty { padding: 40px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; color: var(--ink-muted); }
.at-cal { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.at-calbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #eef2f2; flex-wrap: wrap; }
.at-calbar b { font-size: 16px; font-weight: 600; flex: 1; min-width: 160px; } .at-calbar > span { font-size: 12px; color: var(--ink-faint); }
.at-nav { width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 16px; color: var(--ink); }
.at-nav.wide { width: auto; padding: 0 12px; font: 500 13px var(--font-body); white-space: nowrap; }
.at-calscroll { overflow-x: auto; }
.at-grid { min-width: 700px; display: grid; grid-template-columns: 52px repeat(7, minmax(88px, 1fr)); }
.at-hd0 { border-bottom: 1px solid #e4e9ea; }
.at-hd { display: flex; align-items: baseline; gap: 6px; padding: 10px 10px 8px; border-bottom: 1px solid #e4e9ea; border-left: 1px solid #eef2f2; background: var(--surface); }
.at-hd.wkend { background: #f7f9f9; } .at-hd span { font: 500 11px var(--font-mono); letter-spacing: .08em; color: var(--ink-muted); }
.at-hd b { font-size: 15px; font-weight: 600; } .at-hd.wkend b { color: var(--ink-faint); }
.at-hd b.today { font-size: 13px; color: #fff; background: var(--brand-teal); border-radius: 10px; padding: 1px 7px; }
.at-hours div { height: 48px; box-sizing: border-box; padding: 2px 8px 0 0; text-align: right; font: 11px var(--font-mono); color: #97a5a9; }
.at-col { position: relative; border-left: 1px solid #eef2f2; background: var(--surface); } .at-col.wkend { background: #f9fafa; } .at-col.today { background: #f6fbfa; }
.at-slot { height: 48px; box-sizing: border-box; border-top: 1px solid #f0f3f4; }
.at-now { position: absolute; left: 0; right: 0; height: 2px; background: #c2413a; z-index: 2; }
.at-ev { position: absolute; height: 44px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 5px 7px; border-radius: 6px; border: 0; border-left: 3px solid rgba(0,0,0,.25); color: #fff; text-align: left; cursor: pointer; overflow: hidden; box-sizing: border-box; font-family: inherit; z-index: 1; }
.at-ev.tight { padding: 4px; }
.at-ev .r1 { display: flex; gap: 6px; width: 100%; min-width: 0; align-items: baseline; } .at-ev .mono { font: 500 11px var(--font-mono); flex: none; }
.at-ev b { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-ev .r2 { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; width: 100%; }
.at-ev.call { background: var(--brand-teal); } .at-ev.task { background: #3d4f8a; } .at-ev.fu { background: #8a5c0c; } .at-ev.meet { background: #6a4a8a; } .at-ev.other { background: #5b6b70; }
.at-ev.late { background: #c2413a; border-left-color: #8f2a24; }
.at-ev.done { background: #eef2f2; color: #3a4a4f; border-left-color: #97a5a9; }
.at-ev.noout { background: #fbf0d6; color: #5e420a; border-left-color: #b07a12; }
.at-legend { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid #eef2f2; font-size: 12px; color: var(--ink-muted); flex-wrap: wrap; }
.at-legend span { display: flex; align-items: center; gap: 6px; } .at-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--brand-teal); }
.at-legend i.task { background: #3d4f8a; } .at-legend i.fu { background: #8a5c0c; } .at-legend i.meet { background: #6a4a8a; } .at-legend i.done { background: #dfe6e7; } .at-legend i.late { background: #c2413a; } .at-legend i.noout { background: #f6dfa0; }
.modal-tag.at-tag { font: 600 11px var(--font-body); letter-spacing: 0; padding: 3px 9px; border-radius: 10px; background: #eef2f2; color: var(--ink-2); }
.modal-tag.at-tag.call { background: #e6f3f2; color: #0a5f5a; } .modal-tag.at-tag.task { background: #eef1f8; color: #3d4f8a; } .modal-tag.at-tag.fu { background: #fbf4e4; color: #8a5c0c; } .modal-tag.at-tag.meet { background: #f3eef8; color: #6a4a8a; }
.at-panel { display: flex; flex-direction: column; gap: 16px; }
.at-donebar { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: #eef7f1; border: 1px solid #cfe6d7; border-radius: 10px; }
.at-donebar .ic { width: 22px; height: 22px; border-radius: 50%; background: #2f7a4a; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.at-donebar > span:nth-child(2) { flex: 1; font-size: 14px; color: #1f5233; } .at-donebar em { font-style: normal; font-size: 12px; color: #4f7a5f; margin-left: 6px; }
.at-note { font-size: 14px; line-height: 1.5; } .at-note span { display: block; font-size: 11px; color: var(--ink-muted); margin-bottom: 2px; }
.at-logged { font-size: 12px; color: #97a5a9; }
@media (max-width: 760px) { .at-out { display: none; } .at-time { width: auto; } }

/* Onboarding cases / KYC reviews / Approvals (designs: Onboarding Cases.html, KYC Reviews.html, Pending Approvals.html) */
.cl.oc { max-width: 1400px; } .cl.oc.ap { max-width: 1300px; }
.oc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.oc-stats button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 18px; border: 0; background: var(--surface); text-align: left; cursor: pointer; color: var(--ink); box-shadow: 1px 0 0 #e4e9ea, 0 1px 0 #e4e9ea; font-family: inherit; }
.oc-stats button:hover { background: #f7faf9; }
.oc-stats .l { font-size: 13px; color: var(--ink-muted); } .oc-stats .v { font: 600 24px var(--font-mono); } .oc-stats .s { font-size: 12px; color: var(--ink-faint); } .oc-stats .s.warn { color: #8a5c0c; font-weight: 500; }
.ds-filters .c.hi { background: var(--brand-teal); color: #fff; }
.oc-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: #e6f3f2; color: var(--brand-teal); }
.oc-av.corp { border-radius: 10px; background: #f3ead5; color: #8a5c0c; } .oc-av.sm { width: 34px; height: 34px; font-size: 12px; } .oc-av.sm.corp { border-radius: 8px; }
.oc-card, .ap-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.oc-card.bad { border-color: #efc6c1; } .oc-card.warn { border-color: #efdcae; } .oc-card.done { opacity: .85; }
.oc-top { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; } .oc-top.bordered { border-bottom: 1px solid #eef2f2; }
.oc-id { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px; }
.oc-id > span:first-child { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .oc-id a { font-size: 16px; font-weight: 600; color: var(--ink); }
.oc-id .mono { font: 500 12px var(--font-mono); color: var(--ink-muted); } .oc-id .meta { font-size: 13px; color: var(--ink-muted); }
.oc-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 110px; } .oc-amt b { font: 600 15px var(--font-mono); } .oc-amt span { font-size: 12px; color: var(--ink-faint); }
.oc-go.btn { height: 36px; font-weight: 600; }
.oc-track { display: grid; gap: 4px; padding: 0 18px; }
.oc-track > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.oc-track i { height: 5px; border-radius: 3px; background: #e1e7e8; } .oc-track span { font-size: 11px; color: #97a5a9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-track .past i { background: var(--brand-teal); } .oc-track .past span { color: var(--ink-2); }
.oc-track .cur i { background: #7fc0ba; } .oc-track .cur.bad i { background: #c2413a; } .oc-track .cur span { color: var(--ink); font-weight: 600; }
.oc-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; margin-top: 14px; background: #f7f9f9; border-top: 1px solid #eef2f2; flex-wrap: wrap; }
.oc-foot > i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-teal); flex: none; }
.oc-card.bad .oc-foot { background: #fdf3f2; } .oc-card.bad .oc-foot > i { background: #a8322b; }
.oc-card.warn .oc-foot { background: #fbf4e4; } .oc-card.warn .oc-foot > i { background: #b07a12; }
.oc-card.ok .oc-foot { background: #eef7f1; } .oc-card.ok .oc-foot > i { background: #2f7a4a; }
.oc-foot .tx { flex: 1; min-width: 200px; font-size: 13px; line-height: 1.45; color: var(--ink-2); } .oc-foot strong { font-weight: 600; }
.oc-comp { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 10px; white-space: nowrap; background: #f0f3f4; color: var(--ink-muted); } .oc-comp.ok { background: #e8f4ec; color: #2f6e4a; }
.oc-flag { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; flex-wrap: wrap; background: #f7f9f9; border: 1px solid #e4e9ea; }
.oc-flag .ic { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-teal); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.oc-flag > div { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 2px; } .oc-flag b { font-size: 14px; font-weight: 600; } .oc-flag div span { font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.oc-flag.warn { background: #fbf4e4; border-color: #efdcae; } .oc-flag.warn .ic { background: #b07a12; } .oc-flag.warn b { color: #5e420a; } .oc-flag.warn div span { color: #6e5320; }
.oc-flag.ok { background: #eef7f1; border-color: #cfe6d7; } .oc-flag.ok .ic { background: #2f7a4a; } .oc-flag.ok b { color: #1f5233; } .oc-flag.ok div span { color: #3d6b4c; }
.oc-flag .btn { height: 34px; font-weight: 600; }
.rv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rv-scroll { overflow-x: auto; } .rv-in { min-width: 840px; }
.rv-row { display: grid; grid-template-columns: minmax(200px, 2fr) 90px 90px minmax(200px, 1.6fr) 100px 120px; gap: 0 14px; align-items: center; padding: 0 16px; min-height: 58px; border-bottom: 1px solid #eef2f2; }
.rv-row:hover { background: #f7faf9; } .rv-row.late { background: #fffafa; }
.rv-row.head { min-height: 40px; background: #f7f9f9; border-bottom-color: #e4e9ea; font: 500 11px var(--font-mono); color: var(--ink-muted); letter-spacing: .06em; }
.rv-who { display: flex; align-items: center; gap: 12px; min-width: 0; } .rv-who > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
.rv-who a { font-size: 14px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rv-who em { font-style: normal; font-size: 12px; color: var(--ink-faint); white-space: nowrap; }
.rv-risk { font-size: 13px; font-weight: 500; } .rv-risk.low { color: #2f6e4a; } .rv-risk.medium, .rv-risk.none { color: #8a5c0c; } .rv-risk.high { color: #a8322b; }
.rv-cyc { font-size: 13px; color: var(--ink-2); }
.rv-dates { display: flex; flex-direction: column; gap: 5px; } .rv-dates > span { font-size: 13px; color: var(--ink-2); } .rv-dates em { font-style: normal; color: var(--ink-faint); } .rv-dates b { font-weight: 400; }
.rv-row.late .rv-dates b { color: #a8322b; font-weight: 500; } .rv-row.soon .rv-dates b { color: #8a5c0c; font-weight: 500; }
.rv-dates i { display: block; height: 4px; width: 180px; border-radius: 2px; background: #e1e7e8; overflow: hidden; } .rv-dates u { display: block; height: 100%; background: var(--brand-teal); }
.rv-row.late .rv-dates u { background: #c2413a; } .rv-row.soon .rv-dates u { background: #c9a23a; }
.rv-st { justify-self: start; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 10px; background: #e8f4ec; color: #2f6e4a; white-space: nowrap; }
.rv-row.late .rv-st { background: #fbe9e7; color: #a8322b; } .rv-row.soon .rv-st { background: #fbf4e4; color: #8a5c0c; } .rv-row.rev .rv-st { background: #eef1f8; color: #3d4f8a; }
.rv-act { display: flex; justify-content: flex-end; } .rv-act .btn { height: 32px; width: 112px; justify-content: center; font-weight: 600; }
.at-empty.flat { border: 0; border-radius: 0; }
.ap-card.mine { border-color: #9fcfca; box-shadow: 0 2px 10px rgba(15,127,120,.08); }
.ap-st { font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 10px; background: #eef1f8; color: #3d4f8a; }
.ap-st.ok { background: #e8f4ec; color: #2f6e4a; } .ap-st.warn { background: #fbf4e4; color: #8a5c0c; } .ap-st.bad { background: #fbe9e7; color: #a8322b; }
.ap-facts { display: flex; gap: 18px; flex-wrap: wrap; } .ap-facts > div { display: flex; flex-direction: column; gap: 2px; }
.ap-facts span { font-size: 11px; color: var(--ink-faint); } .ap-facts b { font-size: 14px; font-weight: 600; } .ap-facts b.mono { font-family: var(--font-mono); } .ap-facts b.warn { color: #8a5c0c; }
.ap-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ap-ttl { font: 500 11px var(--font-mono); color: var(--ink-muted); letter-spacing: .1em; }
.ap-chain { display: grid; gap: 8px; }
.ap-chain > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; min-width: 0; border: 1.5px solid #e4e9ea; background: var(--surface); }
.ap-chain .h { display: flex; align-items: flex-start; gap: 8px; } .ap-chain .h b { font-size: 13px; font-weight: 600; line-height: 1.3; min-width: 0; }
.ap-chain .h i { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font: 700 11px var(--font-body); font-style: normal; background: #e1e7e8; color: var(--ink-faint); }
.ap-chain .w { font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ap-chain .t { font-size: 12px; color: #97a5a9; }
.ap-chain .dn { background: #fbfdfc; } .ap-chain .dn .h i { background: #2f7a4a; color: #fff; } .ap-chain .dn .t { color: #2f6e4a; }
.ap-chain .cur { border-color: var(--brand-teal); background: #f0f8f7; } .ap-chain .cur .h i { background: var(--brand-teal); color: #fff; } .ap-chain .cur .t { color: var(--brand-teal); font-weight: 600; }
.ap-chain .cur.over .t { color: #8a5c0c; }
.ap-note { font-size: 13px; line-height: 1.45; padding: 10px 12px; border-radius: 8px; } .ap-note strong { font-weight: 600; }
.ap-note.warn { background: #fbf4e4; color: #5e420a; border: 1px solid #efdcae; } .ap-note.bad { background: #fdf3f2; color: #8f2a24; border: 1px solid #efc6c1; } .ap-note.ok { background: #eef7f1; color: #1f5233; border: 1px solid #cfe6d7; }
.ap-ask { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; background: #f7f9f9; border-top: 1px solid #eef2f2; }
.ap-ask .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .ap-ask .tx { flex: 1; min-width: 200px; font-size: 13px; color: var(--ink-2); }
.ap-ask textarea { border: 1px solid #e4b4ae; border-radius: 8px; padding: 8px 10px; font: 14px var(--font-body); outline: none; resize: vertical; background: #fff; }
.ap-ask .btn { height: 36px; font-weight: 600; } .ap-ret.btn { color: #a8322b; font-weight: 500; }
.ap-ret.btn.danger-solid { background: #a8322b; border-color: #a8322b; color: #fff; }
.ap-ready { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #eef7f1; border-top: 1px solid #cfe6d7; flex-wrap: wrap; }
.ap-ready span { flex: 1; min-width: 200px; font-size: 13px; color: #1f5233; } .ap-ready .btn { height: 36px; font-weight: 600; }
@media (max-width: 760px) { .ap-chain { grid-template-columns: 1fr 1fr !important; } .oc-track span { display: none; } }

/* Log activity (design: Log Activity.html) */
.la-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -6px; }
.la-chips button { height: 28px; padding: 0 10px; border: 1px dashed #c3cdd0; border-radius: 14px; background: var(--surface); font: 12px var(--font-body); color: var(--ink-2); cursor: pointer; }
.la-chips button:hover { border-color: var(--brand-teal); color: var(--brand-teal-dark); }

/* Design system additions */
.ds-frame { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 16px 18px; background: var(--ground); margin-bottom: 6px; }
.ds-tints { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 8px; }
.ds-tints .tn { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.ds-tints .chip { height: 44px; display: flex; align-items: center; padding: 0 12px; font-weight: 600; font-size: 15px; }
.ds-tints .meta { padding: 8px 10px; } .ds-tints b { display: block; font-size: 12.5px; } .ds-tints code { font: 10.5px var(--font-mono); color: var(--ink-muted); }
.ds-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ds-cal .at-ev { position: static; width: 100%; }
.ds-rules { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.55; } .ds-rules li { margin-bottom: 6px; }
/* Status pills carry a shape glyph as well as tone (constraint: status never by colour alone). */
.rv-st::before, .ap-st::before, .oc-comp::before { content: '●'; font-size: 8px; margin-right: 5px; vertical-align: 1px; }
.rv-row.late .rv-st::before, .ap-st.bad::before { content: '■'; }
.rv-row.soon .rv-st::before, .ap-st.warn::before { content: '▲'; }
.rv-row.rev .rv-st::before, .ap-st:not(.ok):not(.warn):not(.bad)::before { content: '◆'; }
.oc-comp:not(.ok)::before { content: '○'; }

/* Onboarding workspace: stage list on the right, kept in view while the stage panel scrolls */
.ob-grid { grid-template-columns: minmax(0, 1fr) 262px; }
.ob-grid .ob-panel { grid-column: 1; grid-row: 1; }
.ob-grid .ob-stages { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--topbar) + 14px); }
@media (max-width: 900px) {
  .ob-grid { grid-template-columns: minmax(0, 1fr); }
  .ob-grid .ob-panel, .ob-grid .ob-stages { grid-column: auto; grid-row: auto; position: static; }
}

/* ==========================================================================
   Sign-in (design: Login v2.html). Fixed palette — it sits outside the app shell and its theme.
   ========================================================================== */
body.lg-open { overflow: hidden; }
.lg-screen { position: fixed; inset: 0; z-index: 400; overflow: auto; background: #F2F5F8; color: #0F2233; font-family: var(--font-body); transition: opacity .26s ease; }
.lg-screen.out { opacity: 0; }
.lg-screen a { color: #0C8A87; text-decoration: none; } .lg-screen a:hover { text-decoration: underline; }
.lg-screen .mono { font-family: var(--font-mono); }
.lg-wrap { min-height: 100%; display: flex; flex-wrap: wrap; }
.lg-hero { flex: 1.25 1 560px; min-height: 640px; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(320px, .9fr) minmax(0, 1fr); align-items: center;
  background: radial-gradient(110% 90% at 82% 50%, #0E3A59 0%, #082B45 55%, #061F33 100%); color: #fff; }
.lg-vis { grid-column: 2; grid-row: 1; position: relative; justify-self: center; width: min(100% - 40px, 82vh); aspect-ratio: 1; margin-right: 24px; }
.lg-orbit { position: absolute; inset: 0; pointer-events: none; }
.lg-fade { opacity: 0; animation: lgFade 2s ease 1.4s forwards; }
.lg-marker { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 7px 13px 7px 10px; border-radius: 999px; background: rgba(8,43,69,.92); border: 1px solid rgba(255,255,255,.14);
  color: #8FA9BB; font: 600 12.5px var(--font-display); white-space: nowrap; cursor: pointer; transition: background .4s, border-color .4s, color .4s, box-shadow .4s; }
.lg-marker i { width: 8px; height: 8px; border-radius: 50%; background: #4F7088; transition: background .4s; }
.lg-marker.on { background: rgba(12,138,135,.28); border-color: #2FBDB6; color: #fff; box-shadow: 0 0 0 6px rgba(47,189,182,.12); } .lg-marker.on i { background: #2FBDB6; }
.lg-marker.gold.on { background: rgba(210,174,85,.16); border-color: #D2AE55; box-shadow: 0 0 0 6px rgba(210,174,85,.1); } .lg-marker.gold.on i { background: #D2AE55; }
.lg-stack { position: absolute; left: 50%; top: 50%; width: 272px; margin-left: -136px; transform: translateY(-50%); }
.lg-tilt { position: relative; transition: transform .35s cubic-bezier(.22,1,.36,1); transform-style: preserve-3d; }
.lg-ghost { position: absolute; inset: 0; border-radius: 14px; }
.lg-ghost.g2 { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); transform: translate(18px, 18px) scale(.97); }
.lg-ghost.g1 { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14); transform: translate(9px, 9px) scale(.985); }
.lg-front { position: relative; }
.lg-card { background: #fff; color: #0F2233; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); padding: 18px; display: flex; flex-direction: column; gap: 14px; animation: lgUp .6s cubic-bezier(.22,1,.36,1) both; }
.lg-card .ey { font: 600 10px var(--font-display); letter-spacing: .12em; color: #6A7F91; } .lg-card .mono { font-size: 11.5px; color: #6A7F91; }
.lg-who { display: flex; gap: 12px; align-items: center; } .lg-who .av { width: 40px; height: 40px; border-radius: 50%; background: #082B45; color: #fff; display: flex; align-items: center; justify-content: center; font: 600 14px var(--font-display); flex: none; }
.lg-who b { display: block; font: 600 15px var(--font-display); white-space: nowrap; }
.lg-tags { display: flex; gap: 6px; } .lg-tags span { font-size: 11.5px; background: #F2F5F8; padding: 3px 8px; border-radius: 999px; } .lg-tags .ok { color: #10704F; background: #E3F2EC; font-weight: 500; }
.lg-kv { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #DCE4EC; padding-top: 12px; font-size: 12.5px; } .lg-kv.one { padding-top: 10px; }
.lg-kv > div { display: flex; justify-content: space-between; } .lg-kv span { color: #6A7F91; } .lg-kv b { font-weight: 500; } .lg-kv b.teal { color: #0C8A87; }
.lg-row { display: flex; justify-content: space-between; align-items: center; } .lg-row.base { align-items: baseline; gap: 8px; }
.lg-row b.gold { font: 600 24px var(--font-display); color: #9B7626; font-variant-numeric: tabular-nums; white-space: nowrap; } .lg-row .up { font-size: 12px; font-weight: 500; color: #10704F; white-space: nowrap; }
.lg-steps { display: flex; flex-direction: column; gap: 10px; font-size: 13px; } .lg-steps > div { display: flex; align-items: center; gap: 10px; } .lg-steps .todo { color: #6A7F91; }
.lg-steps i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #DCE4EC; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 10px; font-style: normal; flex: none; }
.lg-steps i.dn { background: #10704F; border: 0; color: #fff; } .lg-steps i.cur { border-color: #97600C; } .lg-steps span { flex: 1; }
.lg-steps em { font-style: normal; font-size: 11px; font-weight: 500; color: #97600C; background: #FBF0DD; padding: 2px 7px; border-radius: 999px; }
.lg-prog { display: flex; flex-direction: column; gap: 6px; } .lg-prog > div { height: 5px; border-radius: 5px; background: #E2F1F0; overflow: hidden; }
.lg-prog i { display: block; height: 100%; width: 62%; background: #0C8A87; border-radius: 5px; animation: lgProg .9s cubic-bezier(.4,0,.2,1) .2s both; } .lg-prog span { font-size: 11.5px; color: #6A7F91; }
.lg-bars { display: flex; align-items: flex-end; gap: 7px; height: 72px; } .lg-bars i { flex: 1; border-radius: 3px 3px 0 0; transform-origin: bottom; animation: lgGrow .9s cubic-bezier(.22,1,.36,1) both; }
.lg-bars i.a { background: #DCE4EC; } .lg-bars i.b { background: #B9C6D2; } .lg-bars i.c { background: #0C8A87; } .lg-bars i.d { background: linear-gradient(0deg, #9B7626, #F0D27E); }
.lg-segs { display: flex; gap: 6px; margin-top: 28px; padding: 0 30px; } .lg-segs > div { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; cursor: pointer; }
.lg-segs i { display: block; height: 100%; width: 0; background: #2FBDB6; } .lg-segs i.on { width: 100%; animation: lgProg 3.8s linear both; }
.lg-copy { grid-column: 1; grid-row: 1; align-self: stretch; position: relative; z-index: 1; min-height: 640px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 40px 8px 36px 56px; }
.lg-brand { display: flex; align-items: center; gap: 12px; font: 700 23px var(--font-display); letter-spacing: -.02em; } .lg-brand .t { color: #2FBDB6; }
.lg-pitch { display: flex; flex-direction: column; gap: 22px; } .lg-pitch .ey { font: 600 11px var(--font-display); letter-spacing: .14em; color: #6FCFCA; }
.lg-pitch h1 { margin: 0; font: 600 clamp(34px, 3vw, 50px)/1.06 var(--font-display); letter-spacing: -.025em; text-wrap: balance; color: #fff; } .lg-pitch h1 span { color: #6FCFCA; }
.lg-pitch p { margin: 0; font-size: 16px; line-height: 1.6; color: #B4C7D4; max-width: 420px; }
.lg-pillars { display: flex; flex-direction: column; gap: 4px; max-width: 420px; }
.lg-pillar { display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.08); cursor: pointer; position: relative; }
.lg-pillar u { position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: #2FBDB6; transition: width .5s ease; } .lg-pillar.on u { width: 100%; }
.lg-pillar .n { font: 12px var(--font-mono); padding-top: 3px; color: #4F7088; transition: color .4s; } .lg-pillar b { font: 600 17px var(--font-display); letter-spacing: -.01em; color: #8FA9BB; transition: color .4s; }
.lg-pillar .tx { font-size: 13.5px; line-height: 1.5; color: #5F7F96; transition: color .4s; }
.lg-pillar.on .n { color: #6FCFCA; } .lg-pillar.on b { color: #fff; } .lg-pillar.on .tx { color: #B4C7D4; }
.lg-side { flex: 1 1 420px; background: #fff; display: flex; flex-direction: column; padding: 32px 56px; min-height: 640px; box-sizing: border-box; }
.lg-top { display: flex; justify-content: flex-end; gap: 6px; font-size: 13px; color: #6A7F91; }
.lg-mid { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; } .lg-box { width: 100%; max-width: 380px; }
.lg-form { display: flex; flex-direction: column; gap: 20px; } .lg-form.enter { animation: lgUp .5s cubic-bezier(.22,1,.36,1) both; }
.lg-head { display: flex; flex-direction: column; gap: 8px; } .lg-head .ey { font: 600 10px var(--font-display); letter-spacing: .12em; color: #6A7F91; } .lg-head .ey.gold { color: #9B7626; }
.lg-head h2 { margin: 0; font: 600 28px var(--font-display); letter-spacing: -.02em; color: #0F2233; } .lg-head p { margin: 0; font-size: 14px; line-height: 1.55; color: #6A7F91; } .lg-head p b { color: #0F2233; font-weight: 500; }
.lg-head .mono { font-size: 13px; color: #6A7F91; }
.lg-field { display: flex; flex-direction: column; gap: 6px; } .lg-field label { font-size: 13px; font-weight: 500; color: #0F2233; }
.lg-lblrow { display: flex; justify-content: space-between; align-items: baseline; } .lg-lblrow a { font-size: 13px; }
.lg-field input { height: 46px; padding: 0 14px; border: 1px solid #DCE4EC; border-radius: 8px; font: 15px var(--font-body); color: #0F2233; outline: none; background: #fff; width: 100%; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
.lg-field input:focus { border-color: #0C8A87; box-shadow: 0 0 0 3px #E2F1F0; } .lg-field input.bad { border-color: #A82A24; }
.lg-screen .err { font-size: 12.5px; color: #A82A24; }
.lg-pw { position: relative; } .lg-pw input { padding-right: 48px; }
.lg-pw button { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: #6A7F91; display: flex; align-items: center; justify-content: center; }
.lg-pw button:hover { background: #F2F5F8; color: #0F2233; }
.lg-check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #0F2233; cursor: pointer; user-select: none; } .lg-check input { width: 16px; height: 16px; accent-color: #0C8A87; margin: 0; }
.lg-primary { height: 48px; border: 0; border-radius: 8px; background: #0C8A87; color: #fff; font: 600 15px var(--font-display); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .15s, transform .1s; }
.lg-primary:hover { background: #0A7774; } .lg-primary:active { transform: scale(.99); } .lg-primary:disabled { cursor: wait; opacity: .85; }
.lg-secondary { height: 46px; border: 1px solid #DCE4EC; border-radius: 8px; background: #fff; color: #0F2233; font: 500 14.5px var(--font-body); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; }
.lg-secondary:hover { border-color: #B9C6D2; background: #F7F9FB; }
.lg-or { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #9AA7B4; } .lg-or i { flex: 1; height: 1px; background: #DCE4EC; }
.lg-alert { font-size: 13px; line-height: 1.45; color: #8F2A24; background: #FDF3F2; border: 1px solid #EFC6C1; border-radius: 8px; padding: 10px 12px; }
.lg-note { font-size: 13px; line-height: 1.45; color: #3A4A4F; background: #F2F5F8; border: 1px solid #DCE4EC; border-radius: 8px; padding: 10px 12px; }
.lg-reason { font-size: 13px; line-height: 1.45; color: #5E420A; background: #FBF4E4; border: 1px solid #EFDCAE; border-radius: 8px; padding: 10px 12px; }
.lg-back { align-self: flex-start; border: 0; background: transparent; padding: 6px 8px 6px 0; font: 13.5px var(--font-body); color: #6A7F91; cursor: pointer; display: flex; align-items: center; gap: 6px; } .lg-back:hover { color: #0F2233; }
.lg-badge { width: 48px; height: 48px; border-radius: 12px; background: #E2F1F0; display: flex; align-items: center; justify-content: center; }
.lg-qr { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid #DCE4EC; border-radius: 10px; }
.lg-qr .code { width: 132px; height: 132px; flex: none; } .lg-qr .code svg { width: 100%; height: 100%; display: block; }
.lg-qr .key { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; color: #6A7F91; } .lg-qr code { font: 500 13px var(--font-mono); color: #0F2233; word-break: break-all; letter-spacing: .04em; }
.lg-otp { position: relative; } .lg-otp .boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.lg-otp .boxes div { height: 56px; border-radius: 8px; border: 1px solid #DCE4EC; background: #fff; display: flex; align-items: center; justify-content: center; font: 500 22px var(--font-mono); color: #0F2233; transition: border-color .15s, box-shadow .15s; }
.lg-otp .boxes .act { border-color: #0C8A87; box-shadow: 0 0 0 3px #E2F1F0; } .lg-otp .boxes .fill { border-color: #B9C6D2; background: #F7F9FB; } .lg-otp .boxes .bad { border-color: #A82A24; }
.lg-otp input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: text; font-size: 16px; }
.lg-small { font-size: 13px; color: #6A7F91; }
.lg-done svg .lg-c1 { stroke-dasharray: 1; stroke-dashoffset: 1; animation: lgDraw .9s cubic-bezier(.65,0,.35,1) forwards; }
.lg-done svg .lg-c2 { stroke-dasharray: 1; stroke-dashoffset: 1; animation: lgDraw .5s cubic-bezier(.65,0,.35,1) .7s forwards; }
.lg-stats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #DCE4EC; border-radius: 10px; overflow: hidden; }
.lg-stats > div { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; } .lg-stats > div + div { border-left: 1px solid #DCE4EC; }
.lg-stats span { font-size: 12px; color: #6A7F91; } .lg-stats b { font: 600 22px var(--font-display); font-variant-numeric: tabular-nums; } .lg-stats b.gold { color: #9B7626; }
.lg-opening { display: flex; flex-direction: column; gap: 10px; } .lg-opening > div { height: 4px; border-radius: 4px; background: #E2F1F0; overflow: hidden; }
.lg-opening i { display: block; height: 100%; background: #0C8A87; border-radius: 4px; animation: lgProg 2.4s cubic-bezier(.4,0,.2,1) .2s both; } .lg-opening span { font-size: 13px; color: #6A7F91; }
.lg-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: #9AA7B4; } .lg-foot > span:first-child { display: flex; align-items: center; gap: 8px; }
.lg-spin { animation: lgSpin .8s linear infinite; }
@keyframes lgUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lgProg { from { width: 0; } }
@keyframes lgGrow { from { transform: scaleY(0); } }
@keyframes lgSpin { to { transform: rotate(360deg); } }
@keyframes lgDraw { to { stroke-dashoffset: 0; } }
@keyframes lgFade { to { opacity: 1; } }
@media (max-width: 1100px) { .lg-hero { grid-template-columns: 1fr; } .lg-vis { display: none; } .lg-copy { min-height: 0; padding: 32px 32px 28px; } }
@media (max-width: 760px) { .lg-hero { min-height: 0; flex-basis: 100%; } .lg-copy { gap: 24px; } .lg-pillars { display: none; } .lg-side { padding: 24px 16px; min-height: 0; } .lg-qr { flex-direction: column; align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) { .lg-screen *, .lg-screen { animation: none !important; transition: none !important; } .lg-fade { opacity: 1; } .lg-segs i.on { width: 100%; } }
.lg-rules { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: #6A7F91; }
.lg-rules li::before { content: '○'; display: inline-block; width: 16px; } .lg-rules li.ok { color: #10704F; } .lg-rules li.ok::before { content: '✓'; }

/* Users (sign-in accounts) */
.us-in { min-width: 1000px; }
.us-row { display: grid; grid-template-columns: minmax(230px, 2fr) 140px minmax(170px, 1.4fr) 100px 110px 130px 170px 44px; gap: 0 14px; align-items: center; padding: 0 16px; min-height: 60px; border-bottom: 1px solid #eef2f2; cursor: pointer; }
.us-row:hover { background: #f7faf9; } .us-row.off { opacity: .6; }
.us-row.head { min-height: 40px; background: #f7f9f9; border-bottom-color: #e4e9ea; font: 500 11px var(--font-mono); color: var(--ink-muted); letter-spacing: .06em; cursor: default; }
.us-row.ro { grid-template-columns: minmax(230px, 2fr) 160px minmax(200px, 2fr); cursor: default; }
.us-row .rv-who b { font-size: 14px; font-weight: 500; } .us-row .rv-who em { font-style: normal; font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-row .you { font: 500 10px var(--font-mono); color: var(--brand-teal); background: var(--brand-teal-soft); padding: 1px 5px; border-radius: 4px; margin-left: 4px; }
.us-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .us-t b { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .us-t em { font-style: normal; font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-chip.us-acc { width: auto; padding: 3px 10px; } .at-chip.navy { background: #e3e9ef; color: #082b45; }
.us-act { display: flex; justify-content: flex-end; }
.us-pw { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-2); margin: 12px 0; }
.us-pw code { flex: 1; font: 600 17px var(--font-mono); letter-spacing: .04em; user-select: all; }
.us-steps { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; color: var(--ink-muted); }

/* Change password (design: Change Password.html) */
.cp-scrim { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: rgba(15,34,51,.5); overflow: auto; color: #0F2233; font-family: var(--font-body); }
.cp { width: 100%; max-width: 560px; background: #fff; border-radius: 14px; box-shadow: 0 40px 80px -24px rgba(8,43,69,.45); overflow: hidden; animation: lgUp .35s cubic-bezier(.22,1,.36,1) both; margin: auto; }
.cp-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 18px; border-bottom: 1px solid #DCE4EC; }
.cp-ic { width: 40px; height: 40px; border-radius: 10px; background: #E2F1F0; display: flex; align-items: center; justify-content: center; flex: none; }
.cp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .cp-t > div { display: flex; align-items: center; gap: 10px; }
.cp-t b { font: 600 19px var(--font-display); letter-spacing: -.01em; } .cp-t > span { font-size: 13.5px; color: #6A7F91; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-tag { font: 10.5px var(--font-mono); letter-spacing: .08em; color: #0C8A87; background: #E2F1F0; padding: 3px 8px; border-radius: 5px; }
.cp-x { width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; color: #6A7F91; display: flex; align-items: center; justify-content: center; } .cp-x:hover { background: #F2F5F8; color: #0F2233; }
.cp-body { padding: 22px 24px 8px; display: flex; flex-direction: column; gap: 20px; }
.cp-f { display: flex; flex-direction: column; gap: 6px; } .cp-f label { font-size: 13.5px; font-weight: 500; } .cp-f .req { color: #A82A24; }
.cp-lr { display: flex; justify-content: space-between; align-items: baseline; } .cp-lr a { font-size: 13px; color: #0C8A87; }
.cp-rule { height: 1px; background: #EEF2F6; }
.cp-pw { position: relative; }
.cp-pw input { width: 100%; height: 46px; padding: 0 48px 0 14px; border: 1px solid #DCE4EC; border-radius: 8px; font: 15px var(--font-body); color: #0F2233; outline: none; background: #fff; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
.cp-pw input.mono { font-family: var(--font-mono); } .cp-pw input:focus { border-color: #0C8A87; box-shadow: 0 0 0 3px #E2F1F0; }
.cp-pw input.ok { border-color: #10704F; } .cp-pw input.bad { border-color: #A82A24; }
.cp-pw button { position: absolute; right: 4px; top: 4px; width: 38px; height: 38px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: #6A7F91; display: flex; align-items: center; justify-content: center; }
.cp-pw button:hover { background: #F2F5F8; } .cp-pw button.on { color: #0C8A87; }
.cp-suggest { border: 0; background: transparent; padding: 0; font: 13px var(--font-body); color: #0C8A87; cursor: pointer; display: flex; align-items: center; gap: 5px; } .cp-suggest:hover { color: #0A6F6D; }
.cp-meter { display: flex; align-items: center; gap: 12px; margin-top: 2px; } .cp-seg { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.cp-seg i { height: 4px; border-radius: 4px; background: #E6EBF0; transition: background .25s; } #cp-lvl { width: 72px; text-align: right; font-size: 12.5px; font-weight: 600; }
.cp-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 12px 14px; background: #F7F9FB; border: 1px solid #EEF2F6; border-radius: 8px; margin-top: 2px; }
.cp-rules > div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6A7F91; transition: color .2s; }
.cp-rules i { width: 16px; height: 16px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: #fff; border: 1.5px solid #B9C6D2; box-sizing: border-box; transition: all .2s; }
.cp-rules i svg { opacity: 0; } .cp-rules .ok { color: #10704F; } .cp-rules .ok i { background: #10704F; border-color: #10704F; } .cp-rules .ok i svg { opacity: 1; }
.cp-msg { font-size: 12.5px; font-weight: 500; } .cp-msg.ok { color: #10704F; } .cp-msg.bad { color: #A82A24; } .cp-msg:empty { display: none; }
.cp-note { font-size: 12.5px; line-height: 1.45; color: #3A4A4F; background: #F2F5F8; border: 1px solid #DCE4EC; border-radius: 8px; padding: 9px 11px; }
.cp-so { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid #DCE4EC; border-radius: 8px; cursor: pointer; user-select: none; } .cp-so:hover { background: #F7F9FB; }
.cp-so input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: #0C8A87; flex: none; } .cp-so div { display: flex; flex-direction: column; gap: 2px; }
.cp-so b { font-size: 13.5px; font-weight: 500; } .cp-so span { font-size: 12.5px; color: #6A7F91; }
.cp-foot { display: flex; align-items: center; gap: 12px; padding: 16px 24px; margin-top: 14px; background: #F7F9FB; border-top: 1px solid #DCE4EC; font-size: 13px; color: #6A7F91; }
.cp-foot .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; } .cp-foot #cp-status { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-foot.ok { color: #10704F; } .cp-foot.err { color: #A82A24; }
.cp-cancel { height: 42px; padding: 0 16px; border: 0; background: transparent; border-radius: 8px; font: 500 14.5px var(--font-body); color: #0F2233; cursor: pointer; } .cp-cancel:hover { background: #EEF2F6; }
.cp-primary { height: 42px; padding: 0 18px; border: 0; border-radius: 8px; background: #0C8A87; color: #fff; font: 600 14.5px var(--font-display); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s; }
.cp-primary:hover { background: #0A7774; } .cp-primary:disabled { background: #C9D3DC; cursor: not-allowed; } .cp-primary.wide { width: 100%; height: 44px; margin-top: 6px; }
.cp-done { padding: 36px 32px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; animation: lgUp .4s cubic-bezier(.22,1,.36,1) both; }
.cp-done > b { font: 600 22px var(--font-display); letter-spacing: -.01em; } .cp-done p { margin: 0; font-size: 14px; line-height: 1.55; color: #6A7F91; max-width: 380px; }
.cp-done svg .d1, .cp-done svg .d2 { stroke-dasharray: 1; stroke-dashoffset: 1; } .cp-done svg .d1 { animation: lgDraw .7s cubic-bezier(.65,0,.35,1) forwards; } .cp-done svg .d2 { animation: lgDraw .45s cubic-bezier(.65,0,.35,1) .55s forwards; }
.cp-facts { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px; padding: 14px 16px; background: #F7F9FB; border: 1px solid #EEF2F6; border-radius: 8px; text-align: left; font-size: 13px; box-sizing: border-box; }
.cp-facts > div { display: flex; justify-content: space-between; gap: 12px; } .cp-facts span:first-child { color: #6A7F91; } .cp-facts .mono { font-family: var(--font-mono); }
@media (max-width: 560px) { .cp-rules { grid-template-columns: 1fr; } .cp-foot { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { .cp, .cp-done, .cp-done svg .d1, .cp-done svg .d2 { animation: none !important; stroke-dashoffset: 0; } }
/* Timeline entries that record an activity open it */
.timeline .tl.opens { cursor: pointer; border-radius: var(--r); } .timeline .tl.opens:hover .th b { color: var(--brand-teal); }
.timeline .tl.opens:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 2px; }
.tl-open { color: var(--brand-teal); font-weight: 500; }
