/* ============================================================
   NEW SCREENS — Complaints (DISP), registers, MFA, search,
   notifications, profile. Uses existing design tokens.
   ============================================================ */

/* ---------- Topbar avatar + bell badge ---------- */
.avatar-btn{
  width:34px;height:34px;border-radius:var(--r-full);border:none;cursor:pointer;
  color:#fff;font-family:var(--font-display);font-weight:600;font-size:var(--text-sm);
  display:inline-flex;align-items:center;justify-content:center;background:#5B6178;
  letter-spacing:.2px;transition:transform .12s ease,box-shadow .12s ease;
}
.avatar-btn:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(10,14,42,.25)}
.global-search{cursor:pointer;font-family:inherit;text-align:left}
.bell-badge{
  position:absolute;top:-3px;right:-3px;min-width:16px;height:16px;padding:0 4px;
  border-radius:var(--r-full);background:var(--red);color:#fff;font-size:10px;font-weight:700;
  line-height:16px;text-align:center;border:2px solid var(--topbar-bg);
}
#bellWrap{position:relative}
#bellWrap .icon-btn{position:relative}

/* ---------- DISP stepper (complaint stages) ---------- */
.disp-stepper{display:flex;align-items:flex-start;width:100%;gap:0}
.disp-step{flex:1;display:flex;flex-direction:column;align-items:center;text-align:center;position:relative;min-width:0}
.ds-dot{
  width:28px;height:28px;border-radius:var(--r-full);display:flex;align-items:center;justify-content:center;
  background:var(--surface-3);border:2px solid var(--border-strong);color:var(--text-faint);
  font-size:var(--text-xs);font-weight:700;z-index:2;flex:0 0 auto;
}
.disp-step.done .ds-dot{background:var(--green);border-color:var(--green);color:#fff}
.disp-step.current .ds-dot{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 0 0 4px var(--brand-soft)}
.ds-l{font-size:var(--text-xs);color:var(--text-muted);margin-top:8px;line-height:1.25;max-width:120px}
.disp-step.done .ds-l,.disp-step.current .ds-l{color:var(--text);font-weight:600}
.ds-line{position:absolute;top:13px;left:50%;width:100%;height:2px;background:var(--border-strong);z-index:1}
.disp-step.done .ds-line{background:var(--green)}
.disp-step:last-child .ds-line{display:none}

/* ---------- Activity feed (timeline) — new child classes only;
   the .feed container is styled by the original app2.css and is left untouched ---------- */
.feed-item{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--divider)}
.feed-item:last-child{border-bottom:none}
.fi-dot{width:10px;height:10px;border-radius:50%;background:var(--brand);margin-top:5px;flex:0 0 auto}
.fi-body{flex:1;min-width:0}
.fi-text{font-size:var(--text-md);color:var(--text-2)}
.fi-text b{color:var(--text);font-weight:600}
.fi-meta{font-size:var(--text-xs);color:var(--text-faint);margin-top:2px}

/* ---------- MFA ---------- */
.mfa-qr{display:flex;justify-content:center;padding:16px;background:var(--surface-3);border-radius:var(--r-md);border:1px solid var(--border)}
.mfa-qr .qr{border-radius:6px;background:#fff;border:1px solid var(--border)}
.mfa-center{display:flex;justify-content:center;padding:24px 0}
.mfa-lock{display:flex;justify-content:center;margin-bottom:12px}
.mfa-lock svg{width:34px;height:34px;color:var(--brand)}
.otp-input{display:flex;gap:10px;justify-content:center;margin:6px 0}
.otp-cell{
  width:46px;height:56px;text-align:center;font-size:1.4rem;font-family:var(--font-mono);font-weight:600;
  border:1.5px solid var(--border-strong);border-radius:var(--r-md);background:var(--surface);color:var(--text);
}
.otp-cell:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.mfa-on{display:flex;align-items:center;gap:12px}
.mfa-badge{
  width:40px;height:40px;border-radius:var(--r-full);background:var(--green-soft);color:var(--green);
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.mfa-badge svg{width:22px;height:22px}

/* ---------- Global search results ---------- */
.search-list{display:flex;flex-direction:column}
.search-row{
  display:flex;gap:14px;align-items:center;padding:13px 20px;border-bottom:1px solid var(--divider);
  cursor:pointer;text-decoration:none;color:inherit;transition:background .12s ease;
}
.search-row:last-child{border-bottom:none}
.search-row:hover{background:var(--surface-3)}
.sr-ic{
  width:36px;height:36px;border-radius:var(--r-md);background:var(--brand-soft);color:var(--brand);
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.sr-ic svg{width:18px;height:18px}
.sr-body{flex:1;min-width:0}
.sr-t{font-size:var(--text-md);font-weight:600;color:var(--text)}
.sr-s{font-size:var(--text-xs);color:var(--text-muted);margin-top:1px}
.sr-tag{font-size:var(--text-xs);color:var(--text-faint);flex:0 0 auto}

/* ---------- Notifications ---------- */
.notif-list{display:flex;flex-direction:column}
.notif-row{
  display:flex;gap:13px;align-items:flex-start;padding:14px 20px;border-bottom:1px solid var(--divider);
  cursor:pointer;transition:background .12s ease;position:relative;
}
.notif-row:last-child{border-bottom:none}
.notif-row:hover{background:var(--surface-3)}
.notif-row.unread{background:var(--brand-soft)}
.notif-row.unread:hover{background:var(--brand-soft-2)}
.nr-ic{
  width:34px;height:34px;border-radius:var(--r-full);background:var(--surface-3);color:var(--text-muted);
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.nr-ic svg{width:17px;height:17px}
.nr-body{flex:1;min-width:0}
.nr-t{font-size:var(--text-md);font-weight:600;color:var(--text)}
.nr-d{font-size:var(--text-sm);color:var(--text-2);margin-top:1px}
.nr-meta{font-size:var(--text-xs);color:var(--text-faint);margin-top:3px}
.nr-dot{width:8px;height:8px;border-radius:50%;background:var(--brand);flex:0 0 auto;margin-top:6px}

/* notifications dropdown from bell */
.notif-dd{width:360px;max-width:92vw;padding:0;overflow:hidden}
.notif-dd .dd-label{padding:12px 16px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--divider)}
.notif-dd .notif-list{max-height:360px;overflow-y:auto}
.notif-dd .notif-row{padding:11px 16px}
.dd-foot{padding:10px 16px;border-top:1px solid var(--divider);text-align:center}
.dd-empty{padding:32px 16px;text-align:center;color:var(--text-muted);font-size:var(--text-sm)}

/* ---------- Profile ---------- */
.profile-head{display:flex;align-items:flex-start;gap:18px}
.ph-ava{
  width:64px;height:64px;border-radius:var(--r-full);color:#fff;font-family:var(--font-display);
  font-weight:600;font-size:1.5rem;display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.ph-meta{flex:1;min-width:0}
.ph-name{font-family:var(--font-display);font-size:var(--text-xl);font-weight:600;color:var(--text)}
.ph-title{font-size:var(--text-md);color:var(--text-muted);margin-top:2px}
.ph-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.ph-actions{display:flex;gap:8px;flex:0 0 auto}

/* ---------- Segmented control (mine/all) ---------- */
.seg{display:inline-flex;background:var(--surface-3);border:1px solid var(--border);border-radius:var(--r-md);padding:3px;gap:2px}
.seg-btn{
  border:none;background:transparent;color:var(--text-muted);font-family:inherit;font-size:var(--text-sm);
  font-weight:600;padding:5px 14px;border-radius:7px;cursor:pointer;transition:all .12s ease;
}
.seg-btn.on{background:var(--surface);color:var(--brand);box-shadow:0 1px 3px rgba(10,14,42,.12)}

/* .tbl-scroll is provided by the original app2.css and is intentionally NOT redefined here. */

/* purple chip variant (new) */
.chip-purple{background:#EDE7FB;color:#6B3FD4}

/* dark theme adjustments */
[data-theme="dark"] .otp-cell{background:var(--surface-2)}
[data-theme="dark"] .mfa-qr .qr{background:#fff}
[data-theme="dark"] .notif-row.unread{background:rgba(42,62,244,.12)}
[data-theme="dark"] .notif-row.unread:hover{background:rgba(42,62,244,.18)}
[data-theme="dark"] .chip-purple{background:rgba(107,63,212,.22);color:#B79BEE}

/* ============================================================
   BROKER PORTAL — agency application, broker login, broker
   workspace. Additive classes only; reuses existing tokens.
   ============================================================ */

/* portal context banner shown above broker screens */
.bk-banner{
  display:flex;align-items:center;gap:12px;padding:11px 16px;border-radius:var(--r-md);
  background:var(--brand-soft);border:1px solid var(--brand-soft-2);margin-bottom:18px;
}
.bk-banner svg{width:18px;height:18px;color:var(--brand);flex:0 0 auto}
.bk-banner .bk-bt{font-size:var(--text-sm);color:var(--text-2)}
.bk-banner .bk-bt b{color:var(--text);font-weight:600}
.bk-banner .bk-who{margin-left:auto;font-size:var(--text-xs);color:var(--text-muted);text-align:right;line-height:1.3}

/* in-page broker nav (tab pills) */
.bk-nav{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.bk-tab{
  display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border-radius:var(--r-md);
  font-size:var(--text-sm);font-weight:600;color:var(--text-2);background:var(--surface-2);
  border:1px solid var(--border);text-decoration:none;cursor:pointer;transition:all .12s ease;
}
.bk-tab svg{width:15px;height:15px}
.bk-tab:hover{background:var(--surface-3);color:var(--text)}
.bk-tab.active{background:var(--brand);border-color:var(--brand);color:#fff}
.bk-tab.locked{color:var(--text-faint);cursor:not-allowed;opacity:.85}
.bk-tab.locked:hover{background:var(--surface-2);color:var(--text-faint)}
.bk-tab .lk{margin-left:3px}
.bk-tab .lk svg{width:13px;height:13px}

/* "subscribers only" lock pill */
.sub-pill{
  display:inline-flex;align-items:center;gap:5px;padding:2px 8px;border-radius:var(--r-full);
  font-size:var(--text-xs);font-weight:600;background:var(--surface-3);color:var(--text-muted);
  border:1px solid var(--border);
}
.sub-pill svg{width:12px;height:12px}

/* locked feature card (shown but greyed) */
.bk-locked-card{position:relative;opacity:.72}
.bk-locked-card .bk-lock-ov{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;
  background:rgba(247,246,242,.55);border-radius:var(--r-lg);text-align:center;padding:16px;
}
[data-theme="dark"] .bk-locked-card .bk-lock-ov{background:rgba(23,22,20,.55)}
.bk-lock-ov svg{width:22px;height:22px;color:var(--text-muted)}

/* upload dropzone for compliance documents */
.up-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:900px){.up-grid{grid-template-columns:1fr}}
.up-tile{
  border:1.5px dashed var(--border-strong);border-radius:var(--r-md);padding:16px;background:var(--surface-2);
  display:flex;gap:13px;align-items:flex-start;transition:border-color .12s ease,background .12s ease;
}
.up-tile.req{border-left:3px solid var(--brand)}
.up-tile.done{border-style:solid;border-color:var(--green);background:var(--green-soft)}
.up-ic{
  width:38px;height:38px;border-radius:var(--r-md);background:var(--brand-soft);color:var(--brand);
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.up-tile.done .up-ic{background:var(--green);color:#fff}
.up-ic svg{width:19px;height:19px}
.up-body{flex:1;min-width:0}
.up-t{font-size:var(--text-md);font-weight:600;color:var(--text);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.up-d{font-size:var(--text-xs);color:var(--text-muted);margin-top:3px;line-height:1.4}
.up-file{font-size:var(--text-xs);color:var(--green);font-weight:600;margin-top:6px;display:flex;align-items:center;gap:5px}
.up-file svg{width:13px;height:13px}
.up-act{margin-top:9px}
.req-star{color:var(--red);font-weight:700}
.opt-tag{font-size:var(--text-xs);color:var(--text-faint);font-weight:500}

/* application progress strip */
.appbar{display:flex;gap:10px;margin-bottom:18px;flex-wrap:wrap}
.appbar .ab-step{
  flex:1;min-width:150px;padding:10px 14px;border-radius:var(--r-md);background:var(--surface-2);
  border:1px solid var(--border);
}
.appbar .ab-step.done{border-color:var(--green);background:var(--green-soft)}
.ab-n{font-size:var(--text-xs);color:var(--text-faint);font-weight:600}
.ab-l{font-size:var(--text-sm);color:var(--text);font-weight:600;margin-top:2px}

/* broker login card */
.bk-login-wrap{display:flex;justify-content:center;padding:24px 0}
.bk-login{max-width:430px;width:100%}
.bk-login .bk-logo{display:flex;align-items:center;gap:10px;margin-bottom:18px;justify-content:center}
.bk-login .bk-logo svg{width:34px;height:34px}
.bk-login .bk-logo .bn{font-family:var(--font-display);font-weight:700;font-size:1.25rem;color:var(--text);letter-spacing:.3px}
.bk-login .bk-logo .bn .os{color:var(--brand)}

/* ---- broker portal: locked "subscribers only" sidebar items ---- */
.nav-item.sub-only{cursor:not-allowed;color:#5A6090;opacity:.85}
.nav-item.sub-only:hover{background:rgba(255,255,255,.03);color:#6A70A0}
.nav-item.sub-only svg{opacity:.45}
.nav-item.sub-only .lock-ic{margin-left:auto;display:flex;align-items:center;gap:5px}
.nav-item.sub-only .lock-ic svg{width:12px;height:12px;opacity:.7}
.nav-item.sub-only .so-tag{font-size:9px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#8A4B00;background:#FFE7C2;border-radius:99px;padding:2px 7px;white-space:nowrap}
.nav-item.brk.active{background:rgba(42,62,244,.18);color:#fff}
