/*
 * EYL Agent portal styles.
 * Reuses the design tokens defined in the public frontend style.css (:root),
 * then layers a portal-specific layout (sidebar + topbar + content).
 */

:root {
  --blue: #0b5cff;
  --blue-dark: #0742bd;
  --navy: #0a2e6e;
  --ink: #14243f;
  --muted: #5a6b85;
  --line: #e3e9f4;
  --bg-soft: #f4f7fd;
  --white: #fff;
  --green: #0aa389;
  --red: #e5484d;
  --amber: #e78a00;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(10, 46, 110, .08);
  --shadow-lg: 0 18px 44px rgba(10, 46, 110, .13);
  --grad: linear-gradient(120deg, #0b5cff 0%, #2f7bff 60%, #22b8e6 120%);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar-w: 256px;
}

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

body.agent-app, body.agent-auth {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg-soft);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 .5em; font-weight: 800; }
h2 { font-size: clamp(20px, 3vw, 26px); }

/* ============================================================ AUTH PAGES */

body.agent-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--grad);
}
.auth-wrap { width: 100%; max-width: 540px; }
.auth-wrap.auth-wrap--wide { max-width: 760px; }
.auth-brand { display: block; text-align: center; margin-bottom: 18px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.25)); }
.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 30px 60px rgba(0,0,0,.25);
}
.auth-card h1 { font-size: 24px; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.auth-card.register { max-width: 760px; margin: 0 auto; }
.auth-foot { text-align: center; margin-top: 18px; }
.auth-foot a { color: rgba(255,255,255,.92); font-weight: 600; }
.auth-foot a:hover { color: #fff; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-switch a { font-weight: 700; }

/* ============================================================ FORMS */

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font: inherit; color: var(--ink);
  background: var(--white); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.14);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.checkbox-line { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 14px; cursor: pointer; }
.checkbox-line input { width: auto; margin-top: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-section { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.form-section h3 { font-size: 15px; margin-bottom: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border: 0; border-radius: 999px; font: inherit; font-weight: 700;
  cursor: pointer; transition: transform .08s, box-shadow .15s, background .15s; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(11,92,255,.3); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-gradient { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(11,92,255,.3); }
.btn-gradient:hover { filter: brightness(1.05); color: #fff; }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-light { background: var(--bg-soft); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px 12px; }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn-ghost.btn-lg { padding: 14px 28px; } /* large ghost uses large padding, not the small ghost default */
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(.95); color: #fff; }

/* ============================================================ APP SHELL */

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--navy); color: rgba(255,255,255,.92);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
  padding: 20px 0;
}
.sidebar-brand { padding: 0 22px 22px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 12px; }
.sidebar-brand img { filter: brightness(0) invert(1); }
.sidebar-nav { flex: 1; padding: 0 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.78); font-weight: 600; font-size: 14px; margin-bottom: 2px;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.is-active { background: var(--blue); color: #fff; }
.nav-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 12px 0;
  padding: 12px; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 700; font-size: 14px;
}
.nav-cta:hover { filter: brightness(1.05); color: #fff; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-foot .nav-item { font-size: 13px; }
.nav-logout:hover { background: rgba(229,72,77,.25); color: #fff; }

.app-main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: var(--white); border-bottom: 1px solid var(--line); padding: 14px 28px;
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 30;
}
.topbar-menu { display: none; background: none; border: 0; font-size: 20px; color: var(--ink); cursor: pointer; }
.topbar-title { font-weight: 800; font-size: 18px; color: var(--navy); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.topbar-icon { position: relative; color: var(--muted); font-size: 19px; padding: 8px; }
.topbar-icon:hover { color: var(--blue); }
.topbar-icon .dot {
  position: absolute; top: 2px; right: 0; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
}
.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-user .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.topbar-user-name { font-weight: 600; font-size: 14px; color: var(--ink); }

.app-content { padding: 28px; width: 100%; }

/* ============================================================ CARDS / GRID */

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.card-head h3 { margin: 0; font-size: 17px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .field-row { grid-template-columns: 1fr; } }

/* Plan catalog: fits more cards per row as the viewport widens, instead of a fixed column count. */
.plan-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 560px) { .plan-grid { grid-template-columns: 1fr; } }

/* ============================================================ CATALOG TOOLBAR (search + filter) */

.catalog-toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.catalog-search { position: relative; flex: 1 1 280px; max-width: 380px; }
.catalog-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.catalog-search input {
  width: 100%; padding: 10px 14px 10px 38px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 14px; color: var(--ink); background: var(--white); transition: border-color .15s, box-shadow .15s;
}
.catalog-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.12); }
.catalog-search .clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted);
  cursor: pointer; padding: 6px; display: none; border-radius: 50%; font-size: 12px;
}
.catalog-search.has-value .clear { display: block; }
.catalog-search .clear:hover { color: var(--ink); background: var(--surface-2, #f2f5fa); }
.catalog-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.catalog-chip {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  border: 1.5px solid var(--line); background: var(--white); color: var(--muted);
  padding: 6px 14px; border-radius: 999px; transition: background .15s, color .15s, border-color .15s;
}
.catalog-chip:hover { border-color: var(--navy); color: var(--navy); }
.catalog-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.catalog-chip .n { opacity: .7; font-size: .85em; margin-left: 3px; }
.catalog-empty { display: none; }
.catalog-empty.show { display: block; }

/* KPI cards */
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.kpi-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.kpi-value { font-size: 28px; font-weight: 800; color: var(--navy); margin-top: 6px; }
.kpi-icon { float: right; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; background: var(--grad); }
.kpi-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ============================================================ TABLES */

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); }
table.tbl th { text-align: left; padding: 12px 14px; background: var(--bg-soft); color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
table.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:hover td { background: rgba(11,92,255,.025); }
table.tbl .text-right { text-align: right; }
table.tbl .nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.fw-bold { font-weight: 700; }

/* ============================================================ BADGES */

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.badge--success { background: rgba(10,163,137,.14); color: #087f6b; }
.badge--info { background: rgba(11,92,255,.12); color: var(--blue-dark); }
.badge--warn { background: rgba(231,138,0,.16); color: #b36b00; }
.badge--danger { background: rgba(229,72,77,.14); color: #c2363a; }
.badge--mute { background: var(--bg-soft); color: var(--muted); }

/* ============================================================ FLASH + BANNERS */

.flash { padding: 13px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; margin-bottom: 16px; }
.flash--success { background: rgba(10,163,137,.12); color: #087f6b; border: 1px solid rgba(10,163,137,.25); }
.flash--danger { background: rgba(229,72,77,.1); color: #c2363a; border: 1px solid rgba(229,72,77,.25); }
.flash--warning { background: rgba(231,138,0,.12); color: #b36b00; border: 1px solid rgba(231,138,0,.25); }
.flash--info { background: rgba(11,92,255,.1); color: var(--blue-dark); border: 1px solid rgba(11,92,255,.22); }

/* Register page flash messages on white background */
.register .flash { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--muted); box-shadow: 0 4px 16px rgba(16,24,40,.06); }
.register .flash::before { font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 15px; }
.register .flash--success { color: #0a7d68; border-left-color: #0aa389; }
.register .flash--success::before { content: "\f058"; color: #0aa389; }
.register .flash--danger { color: #c2363a; border-left-color: #e5484d; }
.register .flash--danger::before { content: "\f06a"; color: #e5484d; }
.register .flash--warning { color: #a85f00; border-left-color: #e78a00; }
.register .flash--warning::before { content: "\f071"; color: #e78a00; }
.register .flash--info { color: var(--blue-dark); border-left-color: var(--blue); }
.register .flash--info::before { content: "\f05a"; color: var(--blue); }

.status-banner { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 600; font-size: 14px; }
.status-banner--pending, .status-banner--email_verified { background: rgba(231,138,0,.12); color: #b36b00; }
.status-banner--suspended { background: rgba(229,72,77,.1); color: #c2363a; }
.status-banner i { margin-right: 6px; }

/* ============================================================ EMPTY STATES */

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty i { font-size: 38px; color: var(--line); display: block; margin-bottom: 12px; }
.empty h4 { color: var(--muted); }

/* ============================================================ MISC */

/* Sale status pipeline */
.pipeline { display: flex; gap: 0; margin: 4px 0 8px; }
.pipe-step { flex: 1; text-align: center; position: relative; padding-top: 6px; }
.pipe-step::before { content: ''; position: absolute; top: 22px; left: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.pipe-step:last-child::before { display: none; }
.pipe-dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-soft); color: var(--muted); border: 2px solid var(--line); font-size: 14px; }
.pipe-label { display: block; font-size: 12px; font-weight: 600; margin-top: 8px; color: var(--muted); }
.pipe-step.is-done .pipe-dot { background: var(--green); color: #fff; border-color: var(--green); }
.pipe-step.is-done .pipe-label { color: var(--ink); }
.pipe-step.is-done::before { background: var(--green); }
.pipe-step.is-current .pipe-dot { background: var(--blue); color: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11,92,255,.18); }
.pipe-step.is-current .pipe-label { color: var(--blue-dark); font-weight: 800; }

.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--white); transition: box-shadow .15s, transform .12s; }
.plan-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.plan-card .insurer { font-size: 13px; color: var(--muted); font-weight: 600; }
.plan-card .name { font-size: 17px; font-weight: 800; color: var(--navy); margin: 2px 0; }
.plan-card .cover { font-size: 13px; color: var(--muted); }
.plan-card .price { font-size: 22px; font-weight: 800; color: var(--navy); }
.plan-card .price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tag { background: var(--bg-soft); color: var(--muted); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; color: var(--ink); }

/* ============================================================ SALE DETAIL */

.sale-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 14px; }
.sale-back:hover { color: var(--blue); }

.sale-hero { display: flex; align-items: flex-start; gap: 16px; }
.sale-avatar {
  width: 56px; height: 56px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .02em;
}
.sale-hero-main { flex: 1; min-width: 0; }
.sale-hero-name { font-size: 21px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.sale-hero-sub { font-size: 13.5px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.sale-hero-sub .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
.sale-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.qa-btn {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 7px 13px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink);
  transition: border-color .15s, background .15s, color .15s; cursor: pointer;
}
.qa-btn:hover { border-color: var(--blue); color: var(--blue); }
.qa-btn i { font-size: 13px; }
.qa-btn.wa i { color: #25d366; }
.qa-btn.copied { border-color: var(--green); color: var(--green); }

.pipe-date { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.pipe-step.is-done .pipe-date { color: var(--green); }

.process-note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 14px 0 2px; }
.process-note strong { color: var(--ink); }

.sale-banner { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 12px; font-size: 14px; margin-top: 2px; }
.sale-banner i { margin-top: 2px; }
.sale-banner.rejected { background: rgba(229,72,77,.09); color: #b53a3d; border: 1px solid rgba(229,72,77,.22); }
.sale-banner.cancelled { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }
.sale-banner.draft { background: rgba(11,92,255,.07); color: var(--blue-dark); border: 1px solid rgba(11,92,255,.18); }

.copy-inline { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 5px; font-size: 12px; }
.copy-inline:hover { color: var(--blue); }
.copy-inline.copied { color: var(--green); }

/* Commission sidebar card */
.comm-hero { border: 1.5px solid rgba(10,163,137,.28); border-radius: var(--radius); overflow: hidden; }
.comm-hero-top { background: linear-gradient(135deg, rgba(10,163,137,.10), rgba(10,163,137,.02)); padding: 20px; text-align: center; }
.comm-hero-amt { font-size: 34px; font-weight: 800; color: var(--green); line-height: 1; }
.comm-hero-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.comm-hero-body { padding: 16px 20px; }
.comm-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; padding: 7px 0; border-top: 1px dashed var(--line); }
.comm-row:first-child { border-top: 0; }
.comm-row .lbl { color: var(--muted); }
.comm-row .val { font-weight: 700; color: var(--ink); }

.mini-contact { display: flex; align-items: center; gap: 9px; font-size: 14px; padding: 8px 0; }
.mini-contact i { width: 16px; color: var(--muted); text-align: center; flex: none; }
.mini-contact a { color: inherit; text-decoration: none; word-break: break-all; }
.mini-contact a:hover { color: var(--blue); }

@media print {
  .sidebar, .topbar, .sale-back, .sale-hero-actions, .side-actions, .nav-cta { display: none !important; }
  .app-main { margin-left: 0 !important; }
  .app-content { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .grid-2 { grid-template-columns: 1fr 1fr !important; }
}

.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-list li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; display: flex; gap: 12px; align-items: center; }
.activity-list li:first-child { border-top: 0; }
.activity-list .at { color: var(--muted); font-size: 12px; min-width: 140px; }

.mobile-backdrop { display: none; }

/* ============================================================ REGISTER WIZARD */

/* Auth pages — split editorial layout (login / register / forgot / reset) */
body.agent-auth.register,
body.agent-auth.login,
body.agent-auth.forgot,
body.agent-auth.reset {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow-x: hidden;
  background: #f7f6f3;
  min-height: 100vh;
}
body.agent-auth.register::before,
body.agent-auth.register::after,
body.agent-auth.login::before,
body.agent-auth.login::after,
body.agent-auth.forgot::before,
body.agent-auth.forgot::after,
body.agent-auth.reset::before,
body.agent-auth.reset::after { display: none; }
body.agent-auth.register .auth-wrap,
body.agent-auth.login .auth-wrap,
body.agent-auth.forgot .auth-wrap,
body.agent-auth.reset .auth-wrap {
  max-width: none;
  width: 100%;
  margin: 0;
  position: relative;
}
.rw-flash {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(480px, calc(100% - 32px));
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(16,24,40,.08);
}

.rw-shell {
  display: grid;
  grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

.rw-aside {
  background: #0a2e6e;
  color: rgba(255,255,255,.88);
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.rw-aside::after {
  content: '';
  position: absolute;
  inset: auto -20% -30% 20%;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.08) 0%, transparent 70%);
  pointer-events: none;
}
.rw-aside-brand { display: inline-flex; margin-bottom: 48px; position: relative; z-index: 1; }
.rw-aside-brand img { height: 36px; width: auto; }
.rw-aside-copy { position: relative; z-index: 1; max-width: 340px; flex: 1; }
.rw-aside-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin: 0 0 14px;
}
.rw-aside h1 {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: -.02em;
}
.rw-aside-copy > p {
  font-size: 15px; line-height: 1.65; color: rgba(255,255,255,.72); margin: 0 0 28px;
}
.rw-aside-points {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid rgba(255,255,255,.14);
}
.rw-aside-points li {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
  font-size: 14px;
  color: rgba(255,255,255,.82);
}
.rw-aside-foot {
  position: relative; z-index: 1;
  margin: 36px 0 0; font-size: 14px; color: rgba(255,255,255,.55);
}
.rw-aside-foot a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rw-aside-foot a:hover { color: #fff; }

.rw-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: none;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 40px 32px 48px;
  background: #f7f6f3;
}
.rw-brand-mobile { display: none; margin-bottom: 20px; }
.rw-brand-mobile img { height: 34px; width: auto; }
.rw-login-mobile { display: none; }

.rw-card {
  background: #fff;
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e5e2db;
  box-shadow: 0 1px 2px rgba(20, 36, 63, .04);
  width: 100%;
  max-width: 560px;
}
.rw-card--success { max-width: 480px; }
.rw-card--auth { max-width: 440px; }
.rw-card--auth .rw-brand-mobile { padding: 32px 36px 0; margin-bottom: 0; }
.rw-auth-form { padding: 32px 36px 36px; }
.rw-auth-form h1 {
  font-family: var(--font);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.02em;
  color: #0a2e6e;
  margin: 0 0 8px;
}
.rw-auth-form .rw-sub { margin-bottom: 28px; }
.rw-auth-actions { margin-top: 8px; }
.rw-auth-actions .btn {
  border-radius: 4px;
  box-shadow: none;
  height: 48px;
  background: #0a2e6e;
}
.rw-auth-actions .btn:hover { background: #082456; color: #fff; }
.rw-forgot {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #0a2e6e;
}
.rw-forgot:hover { color: #082456; }
body.agent-auth.login .rw-wrap .auth-switch,
body.agent-auth.forgot .rw-wrap .auth-switch,
body.agent-auth.reset .rw-wrap .auth-switch {
  color: #5a6b85;
  margin-top: 18px;
}
body.agent-auth.login .rw-wrap .auth-switch a,
body.agent-auth.forgot .rw-wrap .auth-switch a,
body.agent-auth.reset .rw-wrap .auth-switch a {
  color: #0a2e6e;
}

.rw-head { padding: 36px 40px 0; }
.rw-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: #8a7f6e; margin: 0 0 10px;
}
.rw-head h1 {
  font-family: var(--font);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.02em;
  color: #0a2e6e;
  margin: 0 0 8px;
}
.rw-head .rw-sub {
  color: #5a6b85; font-size: 15px; margin: 0 0 22px; line-height: 1.5;
}

.rw-progress {
  height: 2px; background: #e8e4dc; border-radius: 0; overflow: hidden; margin-bottom: 18px;
}
.rw-progress-fill {
  display: block; height: 100%; width: 25%;
  background: #0a2e6e;
  transition: width .35s ease;
}

/* Compact text stepper — no circles / glow rings */
.rw-steps {
  display: flex; align-items: center; gap: 0;
  list-style: none; margin: 0; padding: 0 0 8px;
  border-bottom: 1px solid #efece6;
}
.rw-step {
  flex: 1; display: flex; align-items: center; gap: 8px;
  position: relative; cursor: pointer;
  padding: 10px 4px 14px 0;
  opacity: .45; transition: opacity .2s;
}
.rw-step.current, .rw-step.done { opacity: 1; }
.rw-step:not(:last-child)::after { display: none; }
.rw-dot {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
  background: transparent; color: #8a7f6e;
  border: 1px solid #cfc8bc;
  transition: all .2s; flex-shrink: 0;
}
.rw-step.done .rw-dot { background: #0a2e6e; color: #fff; border-color: #0a2e6e; }
.rw-step.current .rw-dot { background: #0a2e6e; color: #fff; border-color: #0a2e6e; box-shadow: none; }
.rw-step .rw-label {
  font-size: 13px; font-weight: 600; color: #8a7f6e; margin: 0;
}
.rw-step.current .rw-label { color: #0a2e6e; }
.rw-step.done .rw-label { color: #14243f; }
.rw-step .rw-dot .rw-check { display: none; font-size: 10px; }
.rw-step.done .rw-dot .rw-num { display: none; }
.rw-step.done .rw-dot .rw-check { display: block; }

.rw-body { padding: 28px 40px 8px; }
.rw-pane { display: none; animation: rwFade .3s ease; }
.rw-pane.is-active { display: block; }
@keyframes rwFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rw-pane { animation: none; } }

.rw-intro { font-size: 14px; color: #5a6b85; margin: 0 0 22px; line-height: 1.55; }
.rw-pane h2 {
  font-family: var(--font);
  font-weight: 700; font-size: 18px; margin: 0 0 6px; color: #0a2e6e;
}
.rw-review-heading {
  font-family: var(--font);
  font-weight: 700; font-size: 18px; margin: 32px 0 14px; color: #0a2e6e;
}

/* Floating-label field */
.fl { position: relative; margin-bottom: 18px; }
.fl > input, .fl > select, .fl > textarea {
  width: 100%; padding: 22px 14px 9px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 15px; color: var(--ink); background: var(--white); transition: border-color .15s, box-shadow .15s; height: 56px;
}
.fl > textarea { height: auto; min-height: 72px; padding-top: 26px; resize: vertical; }
.fl > label {
  /* Anchor the resting label to the input's own vertical centre (56px height / 2),
     NOT top:50% of the container — an in-flow hint/status sibling, or a grid row
     stretching this cell to match a taller neighbour, would otherwise drop it. */
  position: absolute; left: 15px; top: 28px; transform: translateY(-50%); color: var(--muted);
  font-size: 15px; font-weight: 500; pointer-events: none; transition: all .14s ease; background: transparent;
}
.fl > textarea + label { top: 19px; transform: none; }
.fl > input:focus, .fl > select:focus, .fl > textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.12); }
.fl > input:focus + label, .fl > input:not(:placeholder-shown) + label,
.fl > select:focus + label, .fl > select.has-value + label,
.fl > textarea:focus + label, .fl > textarea:not(:placeholder-shown) + label {
  top: 11px; transform: none; font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: .02em;
}
/* Select always shows a value, so float its label persistently. */
.fl > select + label, .fl.has-value > label { top: 11px; transform: none; font-size: 11px; font-weight: 700; }
/* align-items:start so a short cell doesn't stretch to match a taller sibling
   (e.g. the IFSC field with its hint + lookup status line). */
.fl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
/* Phone field: a single bordered input with an absolutely-positioned "+91".
   The prefix mirrors the floating label's vertical position: at rest it sits at
   the field's vertical center (next to the "Mobile" placeholder label); on focus
   or when digits are typed it stays put while the label floats up — so the "+91"
   always reads as part of the typed content. */
.fl-with-prefix { position: relative; }
/* Center the input text vertically (line-height = content-box height, i.e. the
   56px field height minus its 1.5px top/bottom border) so typed digits share
   the exact center as the prefix and the resting label. */
.fl-with-prefix > input { padding-left: 58px; line-height: 49px; padding-top: 4px; padding-bottom: 0; }
.fl-prefix-box {
  /* Span only the input's height (56px), NOT bottom:0 — the .fl-hint and
     .fl-err siblings live inside this same container, so bottom:0 would
     stretch the box over them and center "+91" too low. */
  position: absolute; left: 0; top: 0; height: 56px; width: 50px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--muted); line-height: 1;
  pointer-events: none; z-index: 2;
  border-right: 1.5px solid var(--line);
}
/* The floating label clears the prefix when resting; returns to normal when floated.
   top:28px pins the resting label to the input's true center (56px height / 2),
   because the in-flow .fl-hint below inflates this container so top:50% sits too low. */
.fl-with-prefix > label { left: 58px; top: 28px; }
/* When floated, the label moves to the top-left over the +91 box. Give it a solid
   background and a z-index above the prefix (z-index:2) so "+91" doesn't paint over
   it; the small padding notches it cleanly into the field's top border. */
.fl-with-prefix > input:focus + label,
.fl-with-prefix > input:not(:placeholder-shown) + label {
  left: 13px; top: 8px; line-height: 1; padding: 0 4px; background: var(--white); z-index: 3;
}
.fl-with-prefix.invalid > input { border-color: var(--red); }
/* Same reason: keep the success check centered on the input, not the whole box. */
.fl-with-prefix .fl-ok { top: 28px; }
.fl-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); cursor: pointer; background: none; border: 0; padding: 6px; font-size: 16px; display: flex; }
.fl-suffix:hover { color: var(--navy); }
.fl-hint { font-size: 12px; color: var(--muted); margin: 6px 4px 0; display: flex; align-items: center; gap: 5px; }
.fl-hint .fa { font-size: 11px; }
.fl-err { font-size: 12px; color: var(--red); margin: 6px 4px 0; display: none; align-items: center; gap: 5px; font-weight: 600; }
.fl.invalid > input, .fl.invalid > select, .fl.invalid > textarea { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,72,77,.10); }
.fl.invalid .fl-err { display: flex; }
.fl.invalid .fl-hint { display: none; }
.fl.valid > input, .fl.valid > select { border-color: var(--green); }
.fl .fl-ok { position: absolute; right: 14px; top: 28px; transform: translateY(-50%); color: var(--green); font-size: 15px; display: none; }
.fl.valid .fl-ok { display: block; }
.fl .req { color: var(--red); margin-left: 2px; }
.fl .opt { color: var(--muted); font-weight: 500; font-size: 11px; }

/* Async check status line */
.fl-status { font-size: 12px; margin: 6px 4px 0; font-weight: 600; display: none; align-items: center; gap: 5px; }
.fl.checking .fl-status { display: flex; color: var(--muted); }
.fl.taken .fl-status { display: flex; color: var(--red); }
.fl.available .fl-status { display: flex; color: var(--green); }
.fl.info .fl-status { display: flex; color: var(--muted); }
.fl.taken > input { border-color: var(--red); }
/* IFSC: hide the static hint while a live status line is showing. */
.fl.checking .fl-hint, .fl.available .fl-hint, .fl.info .fl-hint { display: none; }

/* Searchable combobox (State / City) */
.fl-combo { position: relative; }
.fl-combo > input { padding-right: 38px; cursor: text; }
.fl-combo-caret {
  position: absolute; right: 14px; top: 28px; transform: translateY(-50%);
  color: var(--muted); font-size: 12px; pointer-events: auto; cursor: pointer;
  transition: transform .15s, color .15s;
}
.fl-combo.is-open .fl-combo-caret { transform: translateY(-50%) rotate(180deg); color: var(--blue); }
.fl-combo-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 28px rgba(16,24,40,.14); max-height: 240px; overflow-y: auto;
  padding: 6px; display: none;
}
.fl-combo.is-open .fl-combo-panel { display: block; }
.fl-combo-opt {
  padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink);
  cursor: pointer; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fl-combo-opt:hover, .fl-combo-opt.is-active { background: rgba(11,92,255,.08); color: var(--navy); }
.fl-combo-opt.is-selected { font-weight: 700; color: var(--blue); }
.fl-combo-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* Password strength */
.pw-strength { margin: 10px 2px 0; }
.pw-bar { height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pw-bar > span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .25s, background .25s; }
.pw-bar.weak > span { background: var(--red); }
.pw-bar.fair > span { background: #e78a00; }
.pw-bar.good > span { background: #3b82f6; }
.pw-bar.strong > span { background: var(--green); }
.pw-label { font-size: 12px; font-weight: 700; margin-top: 6px; color: var(--muted); }
.pw-reqs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; }
.pw-reqs li { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pw-reqs li::before { content: '\f111'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 8px; }
.pw-reqs li.met { color: var(--green); }
.pw-reqs li.met::before { content: '\f00c'; }

/* Segmented control — square, understated */
.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  flex: 1; min-width: 72px; text-align: center; padding: 11px 12px;
  border: 1px solid #e5e2db; border-radius: 4px; font-weight: 600; font-size: 14px;
  color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s, background .15s;
  background: #fff;
}
.segmented label:hover { border-color: #0a2e6e; color: #0a2e6e; }
.segmented input:checked + label {
  border-color: #0a2e6e; background: #0a2e6e; color: #fff; box-shadow: none;
}
.segmented input:focus-visible + label { outline: 2px solid rgba(10,46,110,.35); outline-offset: 2px; }

/* Dropzones — quiet document slots */
.dz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dz {
  position: relative; border: 1px solid #e5e2db; border-radius: 4px;
  padding: 18px 16px; background: #faf9f7; transition: border-color .15s, background .15s;
  cursor: pointer; text-align: left;
}
.dz:hover { border-color: #0a2e6e; background: #fff; }
.dz.dragover { border-color: #0a2e6e; background: #f0f4fb; transform: none; }
.dz.has-file { border-style: solid; border-color: #0aa389; background: #f3faf8; cursor: default; }
.dz.dz-error { border-color: var(--red); background: rgba(229,72,77,.05); }
.dz-icon { display: none; }
.dz-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.dz-required { color: #a85f00; font-size: 11px; font-weight: 600; margin-left: 4px; text-transform: none; }
.dz-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dz-file { display: none; }
.dz-preview { display: none; align-items: center; gap: 10px; text-align: left; }
.dz.has-file .dz-preview { display: flex; }
.dz.has-file .dz-empty { display: none; }
.dz-thumb { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; background: var(--white); }
.dz-thumb-icon { width: 44px; height: 44px; border-radius: 9px; background: rgba(229,72,77,.1); color: var(--red); display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.dz-fname { font-size: 13px; font-weight: 600; color: var(--ink); word-break: break-all; line-height: 1.3; }
.dz-fsize { font-size: 11px; color: var(--muted); }
.dz-remove { position: absolute; top: 10px; right: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 50%; width: 26px; height: 26px; display: none; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; cursor: pointer; }
.dz.has-file .dz-remove { display: flex; }
.dz.has-file .dz-remove:hover { color: var(--red); border-color: var(--red); }

/* Footer nav */
.rw-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 40px 32px; border-top: 1px solid #efece6; margin-top: 8px; background: #fff;
}
.rw-foot .btn {
  height: 46px; box-sizing: border-box; border-radius: 4px;
  box-shadow: none; padding: 0 22px;
}
.rw-foot .btn-primary { background: #0a2e6e; }
.rw-foot .btn-primary:hover { background: #082456; }
.rw-foot .btn-ghost { color: #5a6b85; }
.rw-foot .btn-ghost:hover { background: #f7f6f3; color: #0a2e6e; }
.rw-foot #rwBack { min-width: 88px; }
.rw-foot #rwBack[hidden], .rw-foot #rwBack.is-hidden { display: none; }
.rw-foot #rwNext, .rw-foot #rwSubmit { min-width: 140px; }
.rw-foot .rw-progress-text { margin-left: auto; font-size: 13px; color: #8a7f6e; font-weight: 500; }
.rw-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: rwSpin .6s linear infinite; }
.btn.is-loading .rw-spinner { display: inline-block; }
.btn.is-loading .rw-btn-label { opacity: .8; }
@keyframes rwSpin { to { transform: rotate(360deg); } }

.rw-errors { display: none; background: #fff5f5; border: 1px solid #f0c4c6; border-radius: 4px; padding: 13px 16px; margin-bottom: 18px; }
.rw-errors.show { display: block; }
.rw-errors-title { font-weight: 700; color: #c2363a; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.rw-errors ul { margin: 8px 0 0; padding-left: 22px; color: #c2363a; font-size: 13px; }

.rw-review-group { border: 1px solid #e5e2db; border-radius: 4px; padding: 16px 18px; margin-bottom: 12px; position: relative; background: #faf9f7; }
.rw-review-group h3 { font-size: 13px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; color: #0a2e6e; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.rw-review-group h3 .fa { display: none; }
.rw-review-edit { position: absolute; top: 14px; right: 16px; font-size: 12px; font-weight: 700; color: #0a2e6e; }
.rw-review-dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.rw-review-dl dt { color: var(--muted); font-weight: 500; }
.rw-review-dl dd { margin: 0; font-weight: 600; color: var(--ink); word-break: break-word; }
.rw-review-dl .empty-val { color: var(--muted); font-weight: 400; font-style: italic; }

.rw-terms { background: #faf9f7; border: 1px solid #e5e2db; border-radius: 4px; padding: 16px; margin-top: 16px; }
.rw-terms label { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.rw-terms input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; cursor: pointer; accent-color: #0a2e6e; }
.rw-terms a { font-weight: 700; color: #0a2e6e; }

.rw-trust { display: none; }

.rw-wrap .auth-switch { color: var(--muted); margin-top: 22px; }
.rw-wrap .auth-switch a { color: #0a2e6e; }

/* Success screen */
.rw-success { text-align: left; padding: 44px 40px 40px; }
.rw-success-check {
  width: 48px; height: 48px; margin: 0 0 20px; border-radius: 50%;
  background: #e8f7f3; display: flex; align-items: center; justify-content: center;
}
.rw-success-check .fa { font-size: 20px; color: #0aa389; }
.rw-success h1 {
  font-family: var(--font); font-weight: 800;
  font-size: 26px; margin: 0 0 10px; color: #0a2e6e;
}
.rw-success p { color: var(--muted); font-size: 15px; max-width: none; margin: 0 0 20px; line-height: 1.55; }
.rw-code-chip {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 24px;
  background: #f7f6f3; border: 1px solid #e5e2db; border-radius: 4px;
  padding: 10px 16px; font-family: ui-monospace, monospace; font-size: 15px;
  font-weight: 700; color: #0a2e6e;
}
.rw-next-steps {
  margin: 0 0 28px; padding: 0 0 0 18px; color: #14243f; font-size: 14px; line-height: 1.8;
}
.rw-timeline { display: none; }
.rw-success-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 0; flex-wrap: wrap; }
.rw-success-actions .btn { border-radius: 4px; box-shadow: none; }
.rw-success-actions .btn-primary { background: #0a2e6e; }
.rw-success-actions .btn-primary:hover { background: #082456; color: #fff; }

/* Modal (terms) */
.rw-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.rw-modal.show { display: flex; }
.rw-modal-bg { position: absolute; inset: 0; background: rgba(10,46,110,.5); backdrop-filter: blur(2px); }
.rw-modal-card { position: relative; background: var(--white); border-radius: 18px; max-width: 520px; width: 100%; max-height: 80vh; overflow-y: auto; padding: 28px; box-shadow: var(--shadow-lg); animation: rwFade .25s ease; }
.rw-modal-card h3 { margin-top: 0; }
.rw-modal-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; }
/* Wider variant for tables (compare) — the card itself scrolls both ways. */
.rw-modal-card.rw-modal-card--wide { max-width: 960px; max-height: 88vh; padding: 28px 24px 24px; }
.rw-modal-card--wide > .rw-modal-body { overflow: auto; max-height: calc(88vh - 80px); }

/* ============================================================ PICKER (plan / customer select modal) */

.picker-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white);
  font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.picker-btn:hover { border-color: var(--blue); }
.picker-btn:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.12); }
.picker-btn .placeholder { color: var(--muted); }
.picker-btn .val { font-weight: 700; line-height: 1.25; min-width: 0; }
.picker-btn .val small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.picker-btn > i { color: var(--muted); font-size: 12px; flex: none; }

/* Discoverable "choose from existing" button in the customer section */
.picker-secondary {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; margin-bottom: 16px;
  padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
  background: rgba(11,92,255,.035); color: var(--navy); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.picker-secondary:hover { border-color: var(--blue); background: rgba(11,92,255,.07); }
.picker-secondary .lead-ic { color: var(--blue); font-size: 15px; flex: none; }
.picker-secondary .arrow { margin-left: auto; color: var(--muted); font-size: 12px; flex: none; }

/* ---------- modal shell ---------- */
.eyl-modal { position: fixed; inset: 0; z-index: 3000; display: none; align-items: flex-start; justify-content: center; padding: 6vh 18px; overflow-y: auto; }
.eyl-modal.eyl-open { display: flex; }
.eyl-modal-bg { position: fixed; inset: 0; background: rgba(9,25,58,.55); backdrop-filter: blur(3px); }
.eyl-modal-card {
  position: relative; background: var(--white); border-radius: 16px; width: min(600px, 100%); max-height: 86vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(9,25,58,.30); overflow: hidden; animation: rwFade .2s ease;
}
.eyl-modal-card.narrow { width: min(460px, 100%); }
.eyl-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); }
.eyl-modal-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--navy); }
.eyl-modal-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.eyl-modal-close {
  background: none; border: 0; font-size: 17px; color: var(--muted); cursor: pointer; padding: 7px; line-height: 1;
  border-radius: 8px; flex: none; transition: background .15s, color .15s;
}
.eyl-modal-close:hover { background: var(--bg-soft, #f2f5fa); color: var(--ink); }
.eyl-modal-tools { padding: 15px 22px 0; }
.eyl-modal-body { padding: 6px 14px 16px; overflow-y: auto; flex: 1; }
.eyl-modal-empty { text-align: center; padding: 42px 18px; color: var(--muted); }
.eyl-modal-empty i { font-size: 30px; opacity: .35; display: block; margin-bottom: 12px; }
.eyl-modal-empty p { margin: 0; font-size: 13.5px; line-height: 1.5; max-width: 34ch; margin-inline: auto; }

/* ---------- modal search ---------- */
.modal-search { position: relative; margin-bottom: 12px; }
.modal-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.modal-search input {
  width: 100%; padding: 11px 40px 11px 38px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 14.5px; color: var(--ink); background: var(--white); transition: border-color .15s, box-shadow .15s;
}
.modal-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.12); }
.modal-search .clr { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; display: none; border-radius: 50%; font-size: 12px; }
.modal-search.has-value .clr { display: block; }
.modal-search .clr:hover { color: var(--ink); }

/* ---------- category chips: single scrollable row ---------- */
.modal-chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.modal-chips::-webkit-scrollbar { height: 5px; }
.modal-chips::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.modal-chip {
  flex: none; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--white); color: var(--muted); padding: 6px 14px; border-radius: 999px;
  transition: background .15s, color .15s, border-color .15s;
}
.modal-chip:hover { border-color: var(--navy); color: var(--navy); }
.modal-chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- result rows (plans + customers) ---------- */
.pick-list { display: flex; flex-direction: column; }
.pick-item {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 13px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; transition: background .12s;
}
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover, .pick-item:focus-visible { background: rgba(11,92,255,.06); outline: none; }
.pick-item .pk-main { flex: 1; min-width: 0; }
.pick-item .pk-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pick-item .pk-name { font-weight: 700; font-size: 15px; color: var(--navy); line-height: 1.3; margin-top: 1px; }
.pick-item .pk-cat { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--bg-soft, #f2f5fa); padding: 1px 7px; border-radius: 6px; margin-left: 7px; vertical-align: middle; }
.pick-item .pk-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item .pk-right { text-align: right; flex: none; }
.pick-item .pk-price { font-weight: 800; font-size: 15px; color: var(--ink); white-space: nowrap; }
.pick-item .pk-price small { font-weight: 500; color: var(--muted); font-size: 11px; }
.pick-item .pk-permo { font-size: 12px; color: var(--muted); margin-top: 1px; }
.pick-item .pk-chevron { color: var(--muted); font-size: 12px; flex: none; opacity: .45; transition: opacity .12s, color .12s; }
.pick-item:hover .pk-chevron { opacity: 1; color: var(--blue); }
.pick-item .pk-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; flex: none; white-space: nowrap; }
.pick-item .pk-tag.lead { color: var(--blue); background: rgba(11,92,255,.1); }
.pick-item .pk-tag.prev { color: #087f6b; background: rgba(10,163,137,.12); }

@media (max-width: 960px) {
  .rw-shell { grid-template-columns: 1fr; }
  .rw-aside { display: none; }
  .rw-brand-mobile { display: block; }
  .rw-login-mobile { display: block; text-align: center; }
  .rw-wrap { padding: 28px 16px 40px; }
  .rw-card { max-width: 100%; }
}

@media (max-width: 640px) {
  .rw-head, .rw-body, .rw-foot { padding-left: 22px; padding-right: 22px; }
  .rw-head { padding-top: 28px; }
  .rw-head h1 { font-size: 26px; }
  .rw-step .rw-label { display: none; }
  .rw-steps { gap: 4px; }
  .dz-grid, .fl-row { grid-template-columns: 1fr; }
  .pw-reqs { grid-template-columns: 1fr; }
  .rw-review-dl { grid-template-columns: 110px 1fr; }
  .rw-success { padding: 32px 22px; }
  .rw-foot { flex-wrap: wrap; }
  .rw-foot .rw-progress-text { width: 100%; margin: 4px 0 0; order: -1; }
}

/* Softer field chrome on auth pages */
body.agent-auth.register .fl > input,
body.agent-auth.register .fl > select,
body.agent-auth.register .fl > textarea,
body.agent-auth.login .fl > input,
body.agent-auth.forgot .fl > input,
body.agent-auth.reset .fl > input {
  border-radius: 4px;
  border-width: 1px;
  border-color: #d9d4cb;
}
body.agent-auth.register .fl > input:focus,
body.agent-auth.register .fl > select:focus,
body.agent-auth.register .fl > textarea:focus,
body.agent-auth.login .fl > input:focus,
body.agent-auth.forgot .fl > input:focus,
body.agent-auth.reset .fl > input:focus {
  border-color: #0a2e6e;
  box-shadow: 0 0 0 2px rgba(10,46,110,.12);
}
body.agent-auth.register .btn-primary,
body.agent-auth.register .btn-gradient,
body.agent-auth.login .btn-primary,
body.agent-auth.login .btn-gradient,
body.agent-auth.forgot .btn-primary,
body.agent-auth.forgot .btn-gradient,
body.agent-auth.reset .btn-primary,
body.agent-auth.reset .btn-gradient {
  background: #0a2e6e !important;
  background-image: none !important;
  border-radius: 4px;
  box-shadow: none;
}
body.agent-auth.register .btn-primary:hover,
body.agent-auth.register .btn-gradient:hover,
body.agent-auth.login .btn-primary:hover,
body.agent-auth.login .btn-gradient:hover,
body.agent-auth.forgot .btn-primary:hover,
body.agent-auth.forgot .btn-gradient:hover,
body.agent-auth.reset .btn-primary:hover,
body.agent-auth.reset .btn-gradient:hover {
  background: #082456 !important;
  filter: none;
  color: #fff;
}
body.agent-auth.register .rw-modal-card { border-radius: 6px; }
body.agent-auth.register .rw-modal-bg { background: rgba(10,26,50,.45); backdrop-filter: none; }

/* Password eye button — pin to field height, not whole .fl box */
body.agent-auth.login .fl .fl-suffix,
body.agent-auth.reset .fl .fl-suffix {
  top: 28px;
}

/* ============================================================ PLAN CATALOG v2 */

.catalog-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; flex: 1 1 320px; }
.catalog-actions { display: flex; align-items: center; gap: 10px; }

/* View toggle */
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--white); }
.view-btn { border: 0; background: transparent; color: var(--muted); padding: 6px 11px; border-radius: 999px; cursor: pointer; font-size: 14px; transition: all .15s; }
.view-btn:hover { color: var(--navy); }
.view-btn.is-active { background: var(--navy); color: #fff; }

/* Enhanced plan card */
.plan-card-v2 {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 16px;
  background: var(--white); transition: box-shadow .15s, transform .12s, border-color .15s; display: flex; flex-direction: column;
}
.plan-card-v2:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent, #0b5cff) 40%, var(--line)); }

/* Badge ribbon */
.pc-badge {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 14px 6px; border-radius: 0 0 8px 8px; color: #fff; white-space: nowrap; z-index: 3;
}
.plan-card-v2.has-badge { padding-top: 30px; }
.pc-badge-popular { background: var(--blue); }
.pc-badge-best { background: var(--green); }
.pc-badge-value { background: #8b5cf6; }
.pc-badge-info { background: var(--navy); }

/* Top row: compare checkbox + category pill */
.pc-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

/* Compare checkbox */
.pc-compare { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.pc-compare input { position: absolute; opacity: 0; width: 0; height: 0; }
.pc-compare span { width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 5px; display: inline-block; position: relative; transition: all .15s; }
.pc-compare:hover span { border-color: var(--accent, var(--blue)); }
.pc-compare input:checked + span { background: var(--accent, var(--blue)); border-color: var(--accent, var(--blue)); }
.pc-compare input:checked + span::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: #fff; font-size: 10px; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); }

/* Category pill — colored by the card's accent */
.pc-cat-pill {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px;
  color: var(--accent, var(--blue)); background: color-mix(in srgb, var(--accent, #0b5cff) 12%, #fff); white-space: nowrap;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}

/* Insurer row */
.pc-insurer-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pc-ins-logo { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); padding: 4px; flex-shrink: 0; object-fit: contain; }
.pc-ins-text { min-width: 0; }
.pc-insurer { font-size: 13px; color: var(--muted); font-weight: 700; line-height: 1.2; }
.pc-ins-type { font-size: 11px; color: var(--accent, var(--blue)); font-weight: 700; }

.pc-name { font-size: 16px; font-weight: 800; color: var(--navy); line-height: 1.25; }
.pc-cover { font-size: 13px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.pc-cover i { font-size: 11px; color: color-mix(in srgb, var(--accent, #0b5cff) 70%, var(--muted)); }

/* Price block — accent-tinted strip */
.pc-price-block {
  display: flex; align-items: baseline; gap: 6px; margin: 14px 0 0; padding: 12px 14px;
  border-radius: 10px; background: color-mix(in srgb, var(--accent, #0b5cff) 6%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent, #0b5cff) 14%, var(--line));
}
.pc-price { font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1; }
.pc-price-unit { font-size: 13px; color: var(--muted); font-weight: 600; }
.pc-price-alt { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }

.pc-comm { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 12px; color: var(--green); font-weight: 600; background: rgba(10,163,137,.08); padding: 5px 10px; border-radius: 8px; align-self: flex-start; }
.pc-comm i { font-size: 10px; }

.pc-highlights { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.pc-highlights li { font-size: 12.5px; color: var(--ink); display: flex; align-items: flex-start; gap: 7px; margin-bottom: 5px; line-height: 1.4; }
.pc-highlights li i { color: var(--accent, var(--green)); font-size: 10px; margin-top: 4px; flex-shrink: 0; }

.pc-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; }
.pc-actions .btn { flex: 1; }

/* List view */
.view-list .plan-grid { grid-template-columns: 1fr !important; }
.view-list .plan-card-v2 { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 16px; padding: 14px 20px; }
.view-list .pc-card-top { flex: 0 0 auto; order: -1; margin-bottom: 0; }
.view-list .pc-cat-pill { order: 1; }
.view-list .pc-insurer-row { flex: 1 1 180px; margin-bottom: 0; min-width: 160px; }
.view-list .pc-name { flex: 1 1 200px; font-size: 15px; }
.view-list .pc-cover { flex: 0 0 auto; }
.view-list .pc-price-block { flex: 0 0 auto; margin: 0; }
.view-list .pc-comm { margin: 0; }
.view-list .pc-highlights { display: none; }
.view-list .pc-actions { padding-top: 0; flex: 0 0 auto; margin-left: auto; }
.view-list .pc-actions .btn { flex: none; }

/* Category chip dot */
.catalog-chip .chip-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.catalog-chip.is-active { background: var(--chip-accent, var(--navy)); border-color: var(--chip-accent, var(--navy)); color: #fff; }
.catalog-chip.is-active .chip-dot { background: #fff !important; }
.catalog-chip.is-active .n { opacity: .8; }

/* Compare bar (sticky bottom) */
.compare-bar {
  position: fixed; bottom: 0; left: var(--sidebar-w); right: 0; z-index: 50;
  background: var(--navy); color: #fff; transform: translateY(100%); transition: transform .3s;
  box-shadow: 0 -6px 24px rgba(10,46,110,.18);
}
.compare-bar.show { transform: translateY(0); }
.compare-bar-inner { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
.compare-bar-info { font-size: 14px; }
.compare-bar-slots { display: flex; gap: 8px; flex: 1; }
.compare-slot { background: rgba(255,255,255,.12); border-radius: 8px; padding: 6px 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.compare-slot-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-slot-x { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 10px; }
.compare-slot-x:hover { background: rgba(255,255,255,.3); }
.compare-bar-actions { display: flex; gap: 8px; }
@media (max-width: 880px) { .compare-bar { left: 0; } }

/* Compare table */
.compare-table th:first-child { width: 130px; }
.compare-table .ct-name { font-weight: 800; color: var(--navy); font-size: 14px; }
.compare-table .ct-insurer { font-size: 12px; color: var(--muted); }
.compare-table .ct-comm { color: var(--green); font-weight: 800; }
.compare-table .ct-hl { list-style: none; margin: 0; padding: 0; }
.compare-table .ct-hl li { font-size: 12px; margin-bottom: 4px; }
.compare-table .ct-hl li i { color: var(--green); font-size: 9px; margin-right: 4px; }

/* ============================================================ PLAN DETAIL PAGE */

.pd-back { margin-bottom: 14px; }

.pd-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }

/* HERO — gradient header using the category accent color */
.pd-hero-v2 {
  position: relative; border-radius: var(--radius); overflow: hidden; padding: 26px 28px 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #fff 0%) 0%, color-mix(in srgb, var(--accent) 70%, var(--navy) 0%) 100%);
  color: #fff;
}
.pd-hero-v2.has-badge { padding-top: 36px; }
.pd-hero-v2 .pc-badge { background: rgba(255,255,255,.22); backdrop-filter: blur(4px); }
.pd-hero-strip { display: flex; align-items: center; justify-content: space-between; }
.pd-insurer-block { display: flex; align-items: center; gap: 14px; }
.pd-ins-logo {
  width: 52px; height: 52px; border-radius: 12px; background: #fff; padding: 6px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.3); box-shadow: 0 4px 12px rgba(0,0,0,.12); object-fit: contain;
}
.pd-ins-logo--fallback { display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--accent); }
.pd-ins-name { font-size: 16px; font-weight: 800; color: #fff; }
.pd-ins-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pd-ins-meta span {
  font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
  background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(2px);
}

.pd-h1 { font-size: 24px; font-weight: 800; color: #fff; margin: 18px 0 8px; line-height: 1.22; }
.pd-cover-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: #fff; background: rgba(255,255,255,.15); padding: 6px 14px; border-radius: 999px; }

/* Price strip — white slab at the bottom of the hero */
.pd-price-strip {
  display: flex; align-items: center; gap: 20px; margin-top: 20px;
  background: #fff; border-radius: var(--radius) var(--radius) 0 0; padding: 18px 24px; flex-wrap: wrap;
}
.pd-price-lead { display: flex; align-items: baseline; gap: 5px; }
.pd-price-num { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1; }
.pd-price-lab { font-size: 13px; color: var(--muted); font-weight: 600; }
.pd-price-sep { width: 1px; height: 32px; background: var(--line); }
.pd-price-ann { display: flex; align-items: baseline; gap: 4px; }
.pd-price-ann-v { font-size: 16px; font-weight: 700; color: var(--ink); }
.pd-price-ann-l { font-size: 12px; color: var(--muted); }
.pd-save-tag { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pd-save-tag strong { background: rgba(10,163,137,.14); color: #087f6b; font-size: 12px; padding: 4px 11px; border-radius: 999px; }
.pd-save-tag span { font-size: 13px; font-weight: 700; color: var(--green); }

/* Section cards */
.pd-section { margin-top: 18px; }
.pd-sec-title { font-size: 16px; margin: 0 0 18px; display: flex; align-items: center; gap: 9px; }
.pd-sec-title .fa { color: var(--accent, var(--blue)); font-size: 14px; width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 12%, #fff); display: inline-flex; align-items: center; justify-content: center; }

/* Feature tiles (highlights) */
.pd-feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-feat-tile {
  display: flex; align-items: flex-start; gap: 11px; padding: 14px; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid var(--line); transition: border-color .15s, transform .12s;
}
.pd-feat-tile:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-1px); }
.pd-feat-icon { width: 28px; height: 28px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 14%, #fff); color: var(--accent, var(--green)); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.pd-feat-text { font-size: 13.5px; line-height: 1.4; color: var(--ink); font-weight: 500; }

/* Spec grid */
.pd-spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.pd-spec-item { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pd-spec-item:nth-child(odd) { border-right: 1px solid var(--line); }
.pd-spec-item:nth-last-child(-n+2) { border-bottom: 0; }
.pd-spec-grid:has(.pd-spec-item:nth-last-child(2):nth-child(odd)) .pd-spec-item:nth-last-child(1) { border-bottom: 0; }
.pd-spec-item dt { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 4px; }
.pd-spec-item dd { margin: 0; font-weight: 600; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 6px; line-height: 1.3; }
.pd-spec-item dd .fa { font-size: 13px; }
.pd-spec-item.is-yes dd { color: var(--green); }
.pd-spec-item.is-yes dd .fa { color: var(--green); }
.pd-spec-item.is-no dd { color: var(--muted); }
.pd-spec-item.is-no dd .fa { color: var(--muted); }

/* Sidebar commission card */
.pd-side { position: sticky; top: 80px; }
.pd-comm-card { padding: 24px; text-align: center; }
.pd-comm-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pd-comm-big { font-size: 38px; font-weight: 800; color: var(--green); line-height: 1; margin: 6px 0 2px; }
.pd-comm-rate { font-size: 13px; color: var(--muted); }
.pd-comm-rate strong { color: var(--ink); }
.pd-comm-breakdown { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; }
.pd-cb-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; color: var(--muted); }
.pd-cb-row strong { color: var(--ink); }
.pd-cb-total { padding-top: 12px; margin-top: 6px; border-top: 1px solid var(--line); font-size: 16px; color: var(--green); }
.pd-cb-total strong { color: var(--green); }
.pd-cta { margin-top: 18px; }
.pd-side-trust { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; }
.pd-side-trust div { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pd-side-trust .fa { color: var(--green); font-size: 11px; width: 14px; text-align: center; }

@media (max-width: 980px) {
  .pd-layout { grid-template-columns: 1fr; }
  .pd-side { position: static; }
}
@media (max-width: 640px) {
  .pd-feat-grid, .pd-spec-grid { grid-template-columns: 1fr; }
  .pd-spec-item:nth-child(odd) { border-right: 0; }
  .pd-price-strip { gap: 12px; }
  .pd-save-tag { margin-left: 0; }
}

/* ============================================================ SUPPORT / TICKETS */

/* Tabs */
.support-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 2px solid var(--line); }
.support-tab { padding: 10px 20px; border: 0; background: none; font: inherit; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; }
.support-tab:hover { color: var(--navy); }
.support-tab.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.support-tab .tab-count { display: inline-block; background: var(--bg-soft); color: var(--muted); font-size: 11px; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.support-tab.is-active .tab-count { background: rgba(11,92,255,.12); color: var(--blue); }
.support-pane { display: none; }
.support-pane.is-active { display: block; }

/* Ticket list */
.ticket-item {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--white); margin-bottom: 10px; transition: all .15s; text-decoration: none; color: var(--ink);
}
.ticket-item:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateX(2px); color: var(--ink); }
.ticket-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 17px; color: #fff; flex-shrink: 0; background: linear-gradient(135deg, var(--blue), #2f7bff); }
.ticket-icon.resolved { background: linear-gradient(135deg, var(--green), #14b88f); }
.ticket-icon.closed { background: linear-gradient(135deg, #5a6b85, #748398); }
.ticket-body { flex: 1; min-width: 0; }
.ticket-subject { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.ticket-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.ticket-meta span { display: flex; align-items: center; gap: 4px; }
.ticket-badges { display: flex; gap: 6px; flex-shrink: 0; flex-direction: column; align-items: flex-end; }
.ticket-reply-count { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* Ticket status badge (data-driven color) */
.tkt-status { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.tkt-priority { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }

/* Thread view */
.ticket-thread-head { margin-bottom: 20px; }
.ticket-thread-head h2 { margin: 0 0 6px; font-size: 22px; }
.thread-bubbles { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.bubble { max-width: 75%; padding: 14px 18px; border-radius: 16px; font-size: 14px; line-height: 1.5; position: relative; }
.bubble-meta { font-size: 11px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.bubble-agent { align-self: flex-end; background: linear-gradient(135deg, var(--blue), #2f7bff); color: #fff; border-bottom-right-radius: 4px; }
.bubble-agent .bubble-meta { color: rgba(255,255,255,.8); }
.bubble-agent .bubble-meta .bubble-from { color: #fff; }
.bubble-staff { align-self: flex-start; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.bubble-from { font-weight: 800; }
.bubble-opener { align-self: stretch; max-width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }

/* Reply box */
.reply-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.reply-box textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 14px; resize: vertical; min-height: 80px; }
.reply-box textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.12); }

/* ============================================================ PROFILE PAGE */

/* Profile hero header */
.profile-hero {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 32px; display: flex; align-items: flex-start; gap: 24px; margin-bottom: 18px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.profile-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 80px;
  background: linear-gradient(135deg, var(--navy), #1a4a8a);
}
@media (max-width: 640px) { .profile-hero { flex-direction: column; align-items: center; text-align: center; padding: 24px 20px; } }

.profile-avatar-lg {
  width: 88px; height: 88px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800;
  border: 4px solid #fff; box-shadow: 0 4px 16px rgba(0,0,0,.15); flex-shrink: 0; position: relative; z-index: 1;
}
/* padding-top clears the 80px navy band so the (dark navy) name never overlaps it */
.profile-hero-info { flex: 1; position: relative; z-index: 1; padding-top: 60px; min-width: 0; }
@media (max-width: 640px) { .profile-hero-info { padding-top: 12px; } }
.profile-hero-info h2 { margin: 0 0 4px; font-size: 22px; color: var(--navy); line-height: 1.2; }
.profile-hero-info .ph-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 640px) { .profile-hero-info .ph-meta { justify-content: center; } }
.ph-meta-item { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.ph-meta-item i { font-size: 12px; color: var(--blue); }

/* Completion meter */
.profile-completion { margin-top: 16px; position: relative; z-index: 1; }
.profile-completion .pc-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.profile-completion .pc-pct { font-weight: 800; color: var(--navy); }

/* KYC status badge */
.kyc-status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.kyc-status-complete { background: rgba(10,163,137,.12); color: #087f6b; }
.kyc-status-partial { background: rgba(231,138,0,.12); color: #b36b00; }
.kyc-status-none { background: rgba(229,72,77,.10); color: #c2363a; }

/* Profile section header */
.profile-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.profile-sec-head .ps-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; flex-shrink: 0; }
.ps-icon--blue { background: linear-gradient(135deg, #0b5cff, #2f7bff); }
.ps-icon--green { background: linear-gradient(135deg, #0aa389, #14b88f); }
.ps-icon--purple { background: linear-gradient(135deg, #6c4fe0, #8456f0); }
.profile-sec-head h3 { margin: 0; font-size: 16px; }

/* Info row (read-only display) */
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.info-row:last-child { border-bottom: 0; }
.info-row .ir-label { color: var(--muted); font-weight: 600; }
.info-row .ir-value { font-weight: 600; color: var(--ink); text-align: right; }

/* ============================================================ SETTINGS PAGE */

/* Referral hero card */
.referral-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #143d7a 50%, #0b5cff 100%);
  border-radius: var(--radius); padding: 32px; color: #fff; position: relative; overflow: hidden;
}
.referral-hero::before {
  content: ''; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px;
  border-radius: 50%; background: rgba(255,255,255,.06);
}
.referral-hero::after {
  content: ''; position: absolute; bottom: -80px; left: 40px; width: 160px; height: 160px;
  border-radius: 50%; background: rgba(255,255,255,.04);
}
.referral-hero h3 { color: #fff; margin: 0 0 6px; position: relative; }
.referral-hero p { color: rgba(255,255,255,.8); font-size: 14px; margin: 0 0 20px; position: relative; }

.referral-layout { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; position: relative; }
@media (max-width: 640px) { .referral-layout { grid-template-columns: 1fr; gap: 20px; } }

.referral-code-box {
  display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.12);
  border: 2px dashed rgba(255,255,255,.3); border-radius: 12px; padding: 10px 20px; margin-bottom: 16px;
  backdrop-filter: blur(4px);
}
.referral-code-box code { font-size: 20px; font-weight: 800; letter-spacing: .04em; color: #fff; font-family: ui-monospace, monospace; }
.referral-code-box .ref-code-copy { background: rgba(255,255,255,.15); border: 0; color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.referral-code-box .ref-code-copy:hover { background: rgba(255,255,255,.25); }

.referral-link-row { display: flex; gap: 8px; margin-bottom: 16px; }
.referral-link-row input { flex: 1; padding: 10px 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-size: 13px; font-family: ui-monospace, monospace; }
.referral-link-row input:focus { outline: none; border-color: rgba(255,255,255,.4); }
.referral-link-row input::placeholder { color: rgba(255,255,255,.5); }

/* Share buttons */
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08); transition: all .15s; cursor: pointer;
}
.share-btn:hover { color: #fff; transform: translateY(-1px); }
.share-btn i { font-size: 15px; }
.share-wa { background: rgba(37,211,102,.85); border-color: rgba(37,211,102,.5); }
.share-wa:hover { background: rgba(37,211,102,1); }
.share-tg { background: rgba(36,161,222,.85); border-color: rgba(36,161,222,.5); }
.share-tg:hover { background: rgba(36,161,222,1); }
.share-em { background: rgba(91,76,255,.8); border-color: rgba(91,76,255,.4); }
.share-em:hover { background: rgba(91,76,255,1); }
.share-tw { background: rgba(29,155,240,.85); border-color: rgba(29,155,240,.4); }
.share-tw:hover { background: rgba(29,155,240,1); }
.share-native { background: rgba(255,255,255,.12); }

/* QR code */
.qr-card {
  background: #fff; border-radius: 16px; padding: 16px; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.qr-card img, .qr-card canvas { border-radius: 8px; }
.qr-card .qr-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 8px; }

/* Referral stats */
.ref-stats { display: flex; gap: 24px; margin-top: 20px; position: relative; }
.ref-stat { text-align: center; }
.ref-stat-num { font-size: 22px; font-weight: 800; color: #fff; }
.ref-stat-label { font-size: 11px; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }

/* Security tip box */
.security-tip { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 12px; background: rgba(11,92,255,.05); border: 1px solid rgba(11,92,255,.15); font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 16px; }
.security-tip i { color: var(--blue); font-size: 16px; margin-top: 1px; flex-shrink: 0; }

/* ============================================================ SHARED ENHANCEMENTS */

/* Greeting header */
.greeting { margin-bottom: 22px; }
.greeting h2 { font-size: 24px; margin: 0 0 2px; }
.greeting p { color: var(--muted); font-size: 14px; margin: 0; }

/* Quick-action tiles */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 768px) { .quick-actions { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .quick-actions { grid-template-columns: 1fr; } }
.qa-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: all .15s; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.qa-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--blue); color: var(--ink); }
.qa-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 17px; color: #fff; }
.qa-icon--blue { background: linear-gradient(135deg, #0b5cff, #2f7bff); }
.qa-icon--green { background: linear-gradient(135deg, #0aa389, #14b88f); }
.qa-icon--purple { background: linear-gradient(135deg, #6c4fe0, #8456f0); }
.qa-icon--amber { background: linear-gradient(135deg, #e78a00, #f59e0b); }
.qa-tile h4 { margin: 0; font-size: 15px; color: var(--navy); }
.qa-tile p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.3; }

/* Progress bar (payout milestone) */
.progress-track { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.progress-fill { height: 100%; background: var(--grad); border-radius: 999px; transition: width .4s ease; }

/* Summary row in tables */
.tbl tfoot td { font-weight: 800; color: var(--navy); background: var(--bg-soft); border-top: 2px solid var(--line); }

/* Status legend chips */
.status-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* Document card (marketing) */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.doc-card {
  display: flex; flex-direction: column; padding: 20px; border-radius: var(--radius); background: var(--white);
  border: 1px solid var(--line); transition: all .15s; text-decoration: none; color: var(--ink);
}
.doc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: rgba(11,92,255,.3); color: var(--ink); }
.doc-icon-lg { width: 52px; height: 52px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; margin-bottom: 14px; }
.doc-icon-pdf { background: linear-gradient(135deg, #e5484d, #f43f5e); }
.doc-icon-xls { background: linear-gradient(135deg, #0aa389, #14b88f); }
.doc-icon-img { background: linear-gradient(135deg, #6c4fe0, #8456f0); }
.doc-icon-doc { background: linear-gradient(135deg, #0b5cff, #2f7bff); }
.doc-icon-default { background: linear-gradient(135deg, #5a6b85, #748398); }
.doc-ext { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; margin-bottom: 8px; }
.doc-title { font-size: 15px; font-weight: 800; color: var(--navy); line-height: 1.3; margin-bottom: 4px; }
.doc-desc { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.4; flex: 1; }
.doc-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
.doc-date { font-size: 11px; color: var(--muted); font-weight: 600; }
.doc-dl { font-size: 13px; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 5px; }

/* Info note box */
.info-note { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 12px; background: rgba(11,92,255,.05); border: 1px solid rgba(11,92,255,.15); font-size: 13px; color: var(--ink); line-height: 1.5; }
.info-note i { color: var(--blue); font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.info-note strong { color: var(--navy); }

/* Checklist (welcome/onboarding) */
.checklist { list-style: none; margin: 16px 0 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checklist li:last-child { border-bottom: 0; }
.checklist-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.checklist-done .checklist-icon { background: rgba(10,163,137,.14); color: var(--green); }
.checklist-pending .checklist-icon { background: var(--bg-soft); color: var(--muted); }
.checklist-done span { color: var(--ink); }
.checklist-pending span { color: var(--muted); }

/* Activity feed icons */
.activity-list li .act-icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.act-icon--info { background: rgba(11,92,255,.1); color: var(--blue); }
.act-icon--success { background: rgba(10,163,137,.1); color: var(--green); }
.act-icon--warn { background: rgba(231,138,0,.1); color: #b36b00; }
.act-icon--money { background: rgba(10,163,137,.1); color: var(--green); }

/* Toolbar row (reusable across pages).
   Root-cause fix (not a breakpoint tweak): every DIRECT child of .page-toolbar
   gets flex-grow. A flex item with flex-grow:0 (the default) that wraps onto
   its own row does NOT expand to fill that row — it just sits at its natural
   content width, left-aligned, looking "narrower than the row above it". That
   was the real bug, and it happens at ANY container width where wrapping
   occurs, which is why tuning the wrap breakpoint kept missing it. Giving
   every child flex-grow means: enough room → they share the row proportionally;
   not enough room → whichever one(s) wrap alone still expand to fill their row.
   This works at every width automatically, no media query needed. */
.page-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
/* min-width (not 0) so the browser wraps a control onto a new row once it
   can't fit at a legible size, instead of squeezing it uncomfortably narrow
   first — flex-shrink is still on, it just won't shrink below this floor. */
.page-toolbar > .toolbar-search,
.page-toolbar > .toolbar-select { flex: 1 1 220px; min-width: 160px; }
.page-toolbar > .toolbar-actions { flex: 1 1 260px; min-width: 200px; }
.page-toolbar .toolbar-search input { width: 100%; }
/* Some toolbars wrap their <select> in a <form> (onchange="this.form.submit()").
   Without this the <form> — not the <select> — becomes the flex/wrap item, so
   it doesn't grow/shrink like its sibling controls. */
.page-toolbar form { display: contents; }

/* Toolbars with a trailing action (New Sale / CSV / Add Lead) after the
   search+select pair: grouping select+button as one atomic (nowrap) unit
   means they always move together — never splitting so the button orphans
   onto its own line. Within the group, the select grows to fill the
   available space and the button stays its natural compact size. */
.toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.toolbar-actions .toolbar-select { flex: 1 1 auto; min-width: 0; }
.toolbar-actions > .btn,
.toolbar-actions > a,
.toolbar-actions > button { flex: 0 0 auto; white-space: nowrap; }

/* ============================================================ LEADS PAGE */

.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid-5 { grid-template-columns: 1fr 1fr; } }

/* Stage stat chips */
.stat-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 16px 12px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line);
  cursor: pointer; transition: all .15s; box-shadow: var(--shadow); text-align: center;
}
.stat-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--blue); }
.stat-chip-num { font-size: 24px; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-chip-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.stat-chip.stat-new { border-top: 3px solid #3b82f6; }
.stat-chip.stat-contacted { border-top: 3px solid #8b5cf6; }
.stat-chip.stat-qualified { border-top: 3px solid #e78a00; }
.stat-chip.stat-converted { border-top: 3px solid var(--green); }
.stat-chip.stat-lost { border-top: 3px solid var(--red); }

/* Toolbar search + filter */
.toolbar-search { position: relative; display: flex; align-items: center; }
.toolbar-search > i { position: absolute; left: 12px; color: var(--muted); font-size: 13px; pointer-events: none; }
.toolbar-search > input { padding: 9px 12px 9px 34px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 13px; width: 240px; background: var(--white); transition: border-color .15s, box-shadow .15s; }
.toolbar-search > input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.12); }
.toolbar-select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 13px; background: var(--white); cursor: pointer; }
.toolbar-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,92,255,.12); }

/* Lead table cells */
.lead-name { display: flex; align-items: center; gap: 10px; }
.lead-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}

/* Stage badges */
.stage-badge { text-transform: uppercase; font-size: 10px; letter-spacing: .03em; }
.stage-badge.stage-new { background: rgba(59,130,246,.12); color: #1d4ed8; }
.stage-badge.stage-contacted { background: rgba(139,92,246,.12); color: #6d28d9; }
.stage-badge.stage-qualified { background: rgba(231,138,0,.14); color: #b36b00; }
.stage-badge.stage-converted { background: rgba(10,163,137,.14); color: #087f6b; }
.stage-badge.stage-lost { background: rgba(229,72,77,.12); color: #c2363a; }

/* Add-lead modal icon */
.lead-modal-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--grad); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }

/* The toolbar wrapper itself needs to claim the full row once it wraps below
   the card's title (card-head uses justify-content:space-between, and a
   wrapped flex item doesn't get full width by default) — otherwise its
   .toolbar-search/.toolbar-select/.toolbar-actions children have less room
   than they could, and wrap/shrink sooner than necessary. */
@media (max-width: 768px) {
  .card-head > div:last-child { width: 100%; }
}

/* Mobile: collapse sidebar */
@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .app-main { margin-left: 0; }
  .topbar-menu { display: block; }
  .topbar-user-name { display: none; }
  .mobile-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,46,110,.4); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .mobile-backdrop.show { opacity: 1; pointer-events: auto; }
  .app-content { padding: 18px; }
}
