/* ============================================================
   Omnichannel Real Estate AI-CRM
   Professional light theme — committed single look.
   ============================================================ */

:root {
  /* surfaces */
  --bg:         #f7f8fa;
  --surface:    #ffffff;
  --surface-2:  #f4f6f9;
  --surface-3:  #eef1f6;
  --border:     #e3e8ef;
  --border-str: #d3dae5;

  /* type */
  --text:       #0f172a;
  --text-2:     #475569;
  --text-3:     #7c8798;

  /* brand */
  --brand:      #2563eb;
  --brand-h:    #1d4ed8;
  --brand-soft: #eff4ff;
  --brand-line: #c7d9fe;

  --gold:       #a16207;
  --gold-soft:  #fefaf0;
  --gold-line:  #f0dfb8;

  --green:      #047857;
  --green-soft: #ecfdf5;
  --green-line: #b9e6d3;
  --amber:      #b45309;
  --amber-soft: #fffbeb;
  --amber-line: #f5e0b0;
  --red:        #be123c;
  --red-soft:   #fff1f3;
  --red-line:   #f6ccd6;
  --violet:     #6d28d9;
  --violet-soft:#f6f3ff;

  --sh-xs: 0 1px 2px rgba(15,23,42,.04);
  --sh-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --sh-md: 0 4px 12px rgba(15,23,42,.07), 0 1px 3px rgba(15,23,42,.05);
  --sh-lg: 0 18px 44px rgba(15,23,42,.13), 0 4px 12px rgba(15,23,42,.07);

  --r-sm: 6px;
  --r:    9px;
  --r-lg: 13px;
  --sidebar: 244px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "tnum" 0;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { letter-spacing: -.018em; font-weight: 600; }

::selection { background: var(--brand-line); }

*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-radius: 4px;
}

/* ============================ LOGIN ============================ */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(1000px 520px at 12% -12%, #eef3ff 0%, transparent 62%),
    radial-gradient(760px 420px at 108% 112%, #fdf8ee 0%, transparent 62%),
    var(--bg);
}
.login-card {
  width: min(540px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--sh-lg);
  padding: 34px 32px;
}
.login-card .brandline {
  display: flex; align-items: center; gap: 10px; margin-bottom: 22px;
}
.login-card .brandline .mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 15px;
  background: linear-gradient(145deg, #3b82f6, #1e3a8a);
  box-shadow: 0 2px 8px rgba(37,99,235,.28);
}
.login-card h1 { margin: 0 0 5px; font-size: 21px; }
.login-card .sub { color: var(--text-2); margin: 0 0 24px; font-size: 13px; }

.role-grid { display: grid; gap: 9px; }
.role-btn {
  display: flex; align-items: center; gap: 13px; text-align: left; width: 100%;
  padding: 13px 14px; border-radius: var(--r);
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .14s, background .14s, box-shadow .14s;
}
.role-btn:hover {
  border-color: var(--brand-line); background: var(--brand-soft);
  box-shadow: var(--sh-sm);
}
.role-btn .ico {
  width: 38px; height: 38px; border-radius: var(--r-sm); flex: none;
  display: grid; place-items: center; font-size: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.role-btn:hover .ico { background: #fff; border-color: var(--brand-line); }
.role-btn.broker:hover { border-color: var(--gold-line); background: var(--gold-soft); }
.role-btn.broker:hover .ico { border-color: var(--gold-line); }
.role-btn b { display: block; font-size: 13.5px; font-weight: 600; }
.role-btn span span, .role-btn > span > span { color: var(--text-3); font-size: 12px; font-weight: 400; }

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

.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-str); border-radius: 3px; }

.brand { padding: 16px 16px 14px; border-bottom: 1px solid var(--border); }
.brand .logo { display: flex; align-items: center; gap: 9px; }
.brand .mark {
  width: 29px; height: 29px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 13px;
  background: linear-gradient(145deg, #3b82f6, #1e3a8a);
  box-shadow: 0 1px 4px rgba(37,99,235,.3);
}
.brand .logo > span { font-weight: 600; font-size: 13.5px; letter-spacing: -.015em; line-height: 1.25; }
.brand small { color: var(--text-3); font-size: 10.5px; display: block; font-weight: 400; letter-spacing: 0; }

.nav { padding: 8px; flex: 1; }
.nav-group {
  color: var(--text-3); font-size: 10px; text-transform: uppercase;
  letter-spacing: .085em; padding: 13px 9px 5px; font-weight: 600;
}
.nav button {
  position: relative;
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; margin-bottom: 1px; border-radius: var(--r-sm);
  color: var(--text-2); text-align: left; font-size: 13px; font-weight: 450;
  transition: background .12s, color .12s;
}
.nav button:hover { background: var(--surface-2); color: var(--text); }
.nav button.active { background: var(--brand-soft); color: var(--brand-h); font-weight: 600; }
.nav button.active::before {
  content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav button .ni { width: 16px; text-align: center; flex: none; font-size: 13px; opacity: .85; }
.nav button .badge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 10px;
  padding: 0 6px; border-radius: 99px; font-weight: 600; line-height: 17px; min-width: 18px; text-align: center;
}

.side-foot { padding: 10px; border-top: 1px solid var(--border); }
.who { display: flex; align-items: center; gap: 9px; padding: 5px 4px; }
.who .av {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.who b { font-size: 12.5px; display: block; font-weight: 600; }
.who > span > span { font-size: 11px; color: var(--text-3); text-transform: capitalize; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 11px;
  padding: 0 22px; height: 56px; flex: none;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky; top: 0; z-index: 30;
}
.topbar h2 { margin: 0; font-size: 15px; font-weight: 600; }
.topbar .spacer { flex: 1; }

.content { padding: 22px; }
.page-intro {
  color: var(--text-2); font-size: 13px; margin: 0 0 18px; max-width: 78ch;
}

/* ============================ PRIMITIVES ============================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
}
.card-h {
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px; min-height: 48px;
}
.card-h h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.card-h .spacer { flex: 1; }
.card-b { padding: 16px; }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 1080px) { .g3 { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 820px)  { .g4,.g3,.g2 { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-str); background: var(--surface); color: var(--text);
  padding: 6px 12px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 500;
  box-shadow: var(--sh-xs); transition: background .13s, border-color .13s, box-shadow .13s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: #c3ccda; }
.btn:active { box-shadow: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,.28); }
.btn.primary:hover { background: var(--brand-h); border-color: var(--brand-h); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.gold:hover { filter: brightness(1.08); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn.sm { padding: 3px 9px; font-size: 11.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 8px; border-radius: 5px; font-size: 11px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
  white-space: nowrap; line-height: 18px;
}
.pill.green { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.pill.amber { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.pill.red   { background: var(--red-soft);   color: var(--red);   border-color: var(--red-line); }
.pill.blue  { background: var(--brand-soft); color: var(--brand-h); border-color: var(--brand-line); }
.pill.gold  { background: var(--gold-soft);  color: var(--gold);  border-color: var(--gold-line); }

.chan {
  width: 19px; height: 19px; border-radius: 5px; flex: none;
  display: inline-grid; place-items: center; color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th {
  text-align: left; padding: 8px 14px; color: var(--text-3);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .055em;
  border-bottom: 1px solid var(--border); font-weight: 600; white-space: nowrap;
  background: var(--surface-2);
}
th:first-child { border-top-left-radius: 0; }
td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-str); border-radius: 4px; }

/* forms */
input[type=text], input[type=search], input[type=number], select, textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border-str);
  border-radius: var(--r-sm); background: var(--surface); outline: none;
  font-size: 13px; box-shadow: var(--sh-xs); transition: border-color .13s, box-shadow .13s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none;
}
textarea { resize: vertical; }
select { cursor: pointer; }
label.f { display: block; font-size: 11.5px; color: var(--text-2); margin-bottom: 4px; font-weight: 500; }
.field { margin-bottom: 12px; }

.muted { color: var(--text-2); }
.mono { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace; font-size: 11.5px; letter-spacing: -.01em; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }

/* ============================ KPI ============================ */

.kpi { padding: 14px 16px; }
.kpi .lbl {
  color: var(--text-3); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .055em;
}
.kpi .val {
  font-size: 24px; font-weight: 650; letter-spacing: -.032em;
  margin: 6px 0 2px; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.kpi .dl { font-size: 11.5px; color: var(--text-3); }
.kpi .dl.up { color: var(--green); font-weight: 500; }
.kpi .dl.dn { color: var(--amber); font-weight: 500; }

/* ============================ INBOX ============================ */

.inbox { display: grid; grid-template-columns: 312px 1fr; gap: 14px; align-items: start; }
@media (max-width: 1040px) { .inbox { grid-template-columns: 1fr; } }

.thread-list { max-height: calc(100vh - 232px); overflow-y: auto; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.thread-list::-webkit-scrollbar { width: 6px; }
.thread-list::-webkit-scrollbar-thumb { background: var(--border-str); border-radius: 3px; }
.thread {
  display: flex; gap: 10px; padding: 10px 13px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s; position: relative;
}
.thread:hover { background: var(--surface-2); }
.thread.active { background: var(--brand-soft); }
.thread.active::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brand);
}
.thread .t-main { min-width: 0; flex: 1; }
.thread .t-top { display: flex; align-items: center; gap: 5px; }
.thread b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .prev { color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .t-time { font-size: 10px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }

.msgs {
  padding: 16px; max-height: 440px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface-2);
}
.msgs::-webkit-scrollbar { width: 6px; }
.msgs::-webkit-scrollbar-thumb { background: var(--border-str); border-radius: 3px; }
.msg {
  max-width: 74%; padding: 8px 12px; border-radius: 11px; font-size: 13px;
  box-shadow: var(--sh-xs); line-height: 1.45;
}
.msg .meta { font-size: 10px; opacity: .72; margin-top: 4px; }
.msg.customer { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 3px; }
.msg.agent { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 3px; }
.msg.ai { align-self: flex-end; background: var(--violet); color: #fff; border-bottom-right-radius: 3px; }
.msg.system {
  align-self: center; background: var(--amber-soft); color: var(--amber);
  border: 1px solid var(--amber-line); font-size: 11.5px; border-radius: 7px; max-width: 88%;
}
.composer { display: flex; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 11px 14px 0; background: var(--surface); }

/* ============================ PIPELINE ============================ */

.pipe { display: grid; grid-template-columns: repeat(6, minmax(184px,1fr)); gap: 11px; overflow-x: auto; padding-bottom: 10px; }
.pipe::-webkit-scrollbar { height: 8px; }
.pipe::-webkit-scrollbar-thumb { background: var(--border-str); border-radius: 4px; }
.col {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 9px; min-height: 330px; transition: background .15s, border-color .15s;
}
.col.over { background: var(--brand-soft); border-color: var(--brand); border-style: dashed; }
.col-h { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; padding: 2px 3px; }
.col-h b { font-size: 11.5px; font-weight: 600; }
.col-h .n {
  margin-left: auto; font-size: 10.5px; color: var(--text-2); background: var(--surface);
  padding: 0 6px; border-radius: 99px; border: 1px solid var(--border); line-height: 17px; font-weight: 600;
}
.deal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 9px 10px; margin-bottom: 7px; cursor: grab; box-shadow: var(--sh-xs);
  transition: box-shadow .13s, border-color .13s, transform .1s;
}
.deal:hover { box-shadow: var(--sh-md); border-color: var(--border-str); }
.deal:active { cursor: grabbing; }
.deal.dragging { opacity: .35; transform: rotate(1.5deg); }
.deal b { font-size: 12.5px; display: block; font-weight: 600; }
.deal .amt { font-weight: 650; font-size: 12.5px; color: var(--green); font-variant-numeric: tabular-nums; }
.score-bar { height: 3px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 7px; }
.score-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ============================ CALL PANEL ============================ */

.dialer { display: grid; grid-template-columns: 292px 1fr; gap: 14px; align-items: start; }
@media (max-width: 940px) { .dialer { grid-template-columns: 1fr; } }
.phone {
  background: linear-gradient(168deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--r-lg); padding: 26px 20px; color: #fff; text-align: center;
  box-shadow: var(--sh-lg); border: 1px solid #1e293b;
}
.phone .pav {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 13px;
  display: grid; place-items: center; font-size: 22px; font-weight: 600;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
}
.phone.ringing .pav { animation: pulse 1.15s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(96,165,250,.42); }
  70%  { box-shadow: 0 0 0 18px rgba(96,165,250,0); }
  100% { box-shadow: 0 0 0 0 rgba(96,165,250,0); }
}
.phone h3 { margin: 0 0 3px; font-size: 16px; color: #fff; }
.phone .st { color: #94a3b8; font-size: 12px; min-height: 17px; }
.phone .timer {
  font-size: 30px; font-weight: 300; margin: 12px 0 4px;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.phone .keys { display: flex; gap: 11px; justify-content: center; margin-top: 17px; }
.kbtn {
  width: 50px; height: 50px; border-radius: 50%; font-size: 18px;
  display: grid; place-items: center; color: #fff; transition: transform .12s, filter .12s;
}
.kbtn:hover { transform: scale(1.06); }
.kbtn.call { background: #059669; box-shadow: 0 3px 12px rgba(5,150,105,.4); }
.kbtn.hang { background: #e11d48; box-shadow: 0 3px 12px rgba(225,29,72,.4); }
.kbtn.mute { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); }
.rec-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #f43f5e; animation: blink 1.3s infinite; margin-right: 5px;
}
@keyframes blink { 50% { opacity: .2; } }
.wave { display: flex; align-items: center; gap: 2px; height: 24px; justify-content: center; margin-top: 6px; }
.wave i { width: 3px; background: #60a5fa; border-radius: 2px; animation: w .9s infinite ease-in-out; }
@keyframes w { 0%,100% { height: 4px; } 50% { height: 20px; } }

/* ============================ AI ============================ */

.ai-chat { display: grid; grid-template-columns: 1fr 288px; gap: 14px; align-items: start; }
@media (max-width: 1040px) { .ai-chat { grid-template-columns: 1fr; } }
.typing { display: inline-flex; gap: 3px; align-items: center; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .45; animation: t 1.15s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes t { 0%,60%,100% { transform: translateY(0); opacity: .3; } 30% { transform: translateY(-4px); opacity: 1; } }
.src {
  display: inline-block; font-size: 10px; background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.18);
  padding: 1px 7px; border-radius: 4px; margin: 5px 4px 0 0; font-weight: 500;
}
.ai-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 5px; line-height: 18px;
  background: var(--violet-soft); color: var(--violet); border: 1px solid #ddd0fb;
}
.ai-badge.sim { background: var(--surface-2); color: var(--text-3); border-color: var(--border); }

/* ============================ ROUTING ============================ */

.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.hit {
  background: var(--green-soft) !important;
  box-shadow: inset 0 0 0 2px var(--green);
  font-weight: 600; color: var(--green);
}
.esc-bar { height: 5px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.esc-bar i { display: block; height: 100%; background: var(--amber); transition: width .2s linear; border-radius: 99px; }
.step {
  display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--border);
  opacity: .4; transition: opacity .3s;
}
.step:last-child { border-bottom: 0; }
.step.on { opacity: 1; }
.step .dot {
  width: 21px; height: 21px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-3); font-size: 10.5px; font-weight: 700;
}
.step.on .dot { background: var(--brand); color: #fff; }
.step.done .dot { background: var(--green); color: #fff; }

/* ============================ CHARTS ============================ */

.bars { display: flex; align-items: flex-end; gap: 9px; height: 148px; padding-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bars .b i { width: 100%; border-radius: 4px 4px 0 0; min-height: 3px; transition: height .45s ease; }
.bars .b span { font-size: 10px; color: var(--text-3); font-weight: 600; }
.funnel-row { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.funnel-row .fb { height: 22px; border-radius: 4px; background: var(--brand); min-width: 3px; transition: width .45s ease; }
.funnel-row b { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.legend { display: flex; gap: 13px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 5px; }

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

.toast {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  background: #0f172a; color: #fff; padding: 10px 15px; border-radius: var(--r);
  box-shadow: var(--sh-lg); font-size: 12.5px; animation: slide .22s ease;
  max-width: 340px; line-height: 1.45;
}
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }

.modal-bg {
  position: fixed; inset: 0; background: rgba(15,23,42,.42); z-index: 150;
  display: grid; place-items: center; padding: 26px; backdrop-filter: blur(3px);
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(700px,100%); max-height: 86vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg);
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.98) translateY(6px); opacity: 0; } }
.modal h4 { margin: 18px 0 9px; font-size: 12.5px; }

.demo-flag {
  background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-line);
  padding: 2px 8px; border-radius: 5px; font-size: 10px; font-weight: 700;
  letter-spacing: .04em; line-height: 18px; white-space: nowrap;
}

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1.5px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 15px; font-size: 12.5px; }
.tl-item::before {
  content: ""; position: absolute; left: -20px; top: 5px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2.5px var(--surface);
}
.tl-item.call::before { background: var(--amber); }
.tl-item.ai::before { background: var(--violet); }

.empty { text-align: center; padding: 44px 20px; color: var(--text-3); font-size: 12.5px; }
.empty .big { font-size: 28px; margin-bottom: 8px; opacity: .5; }

/* Broker portal — gold accent */
body.broker {
  --brand: #a16207;
  --brand-h: #854d0e;
  --brand-soft: #fefaf0;
  --brand-line: #f0dfb8;
}
body.broker .brand .mark,
body.broker .login-card .brandline .mark {
  background: linear-gradient(145deg, #d4a340, #8a5a10);
  box-shadow: 0 2px 8px rgba(161,98,7,.28);
}
body.broker .btn.primary { box-shadow: 0 1px 2px rgba(161,98,7,.28); }

/* ============================================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================================ */

/* ---------- GLOBAL: respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ========== 1. LOGIN PAGE ========== */

/* Card floats up from below */
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
.login-card {
  animation: loginCardIn .52s cubic-bezier(.16,1,.3,1) both;
}

/* Brand mark rotates in */
@keyframes markSpin {
  from { opacity: 0; transform: rotate(-18deg) scale(.7); }
  to   { opacity: 1; transform: rotate(0deg)   scale(1);  }
}
.login-card .brandline .mark {
  animation: markSpin .45s cubic-bezier(.34,1.56,.64,1) .12s both;
}

/* Headline slides in */
@keyframes headIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.login-card h1 { animation: headIn .4s ease .22s both; }
.login-card .sub { animation: headIn .4s ease .30s both; }

/* Role buttons stagger up */
@keyframes roleIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.role-btn:nth-child(1) { animation: roleIn .38s cubic-bezier(.16,1,.3,1) .30s both; }
.role-btn:nth-child(2) { animation: roleIn .38s cubic-bezier(.16,1,.3,1) .40s both; }
.role-btn:nth-child(3) { animation: roleIn .38s cubic-bezier(.16,1,.3,1) .50s both; }
.role-btn:nth-child(4) { animation: roleIn .38s cubic-bezier(.16,1,.3,1) .60s both; }

/* Role button click ripple + spring scale */
.role-btn { transition: border-color .14s, background .14s, box-shadow .14s, transform .15s cubic-bezier(.34,1.56,.64,1); }
.role-btn:active { transform: scale(.97); }

/* Role icon hop on hover */
.role-btn .ico { transition: background .14s, border-color .14s, transform .2s cubic-bezier(.34,1.56,.64,1); }
.role-btn:hover .ico { transform: scale(1.12) rotate(-4deg); }

/* Floating gradient orbs on login background */
@keyframes orb1 { 0%,100%{transform:translate(0,0);}50%{transform:translate(18px,-22px);} }
@keyframes orb2 { 0%,100%{transform:translate(0,0);}50%{transform:translate(-14px,18px);} }
.login-wrap::before, .login-wrap::after {
  content: ""; position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(80px); opacity: .38;
}
.login-wrap::before {
  width: 520px; height: 360px; top: -80px; left: -120px;
  background: radial-gradient(circle, #93c5fd, #6366f1);
  animation: orb1 9s ease-in-out infinite;
}
.login-wrap::after {
  width: 440px; height: 320px; bottom: -60px; right: -100px;
  background: radial-gradient(circle, #fde68a, #fb7185);
  animation: orb2 11s ease-in-out infinite;
}
.login-card { position: relative; z-index: 1; }

/* ========== 2. PAGE / CONTENT TRANSITIONS ========== */

/* Every page content area fades + slides on render */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.content { animation: pageIn .3s cubic-bezier(.16,1,.3,1) both; }

/* Page intro text */
.page-intro { animation: pageIn .35s ease .05s both; }

/* ========== 3. SIDEBAR ========== */

/* Sidebar slides in from left on login */
@keyframes sidebarIn {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.sidebar { animation: sidebarIn .38s cubic-bezier(.16,1,.3,1) both; }

/* Brand mark subtle pulse every 8s */
@keyframes brandPulse {
  0%,90%,100% { box-shadow: 0 1px 4px rgba(37,99,235,.3); }
  95% { box-shadow: 0 0 0 6px rgba(37,99,235,.12), 0 1px 4px rgba(37,99,235,.3); }
}
.brand .mark { animation: brandPulse 8s ease-in-out infinite 3s; }

/* Nav item: active indicator slides in from left */
.nav button.active::before {
  animation: navBarIn .25s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes navBarIn {
  from { height: 0; opacity: 0; }
  to   { height: calc(100% - 12px); opacity: 1; }
}

/* Nav buttons: icon nudge on hover */
.nav button .ni { transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.nav button:hover .ni { transform: translateX(2px) scale(1.12); }

/* ========== 4. TOPBAR ========== */

/* Topbar slides down */
@keyframes topbarIn {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}
.topbar { animation: topbarIn .32s cubic-bezier(.16,1,.3,1) both; }

/* AI badge shimmer */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.ai-badge {
  background-size: 200% auto;
  transition: box-shadow .2s;
}
.ai-badge:not(.sim) {
  background: linear-gradient(90deg, var(--violet-soft) 0%, #e9d8fd 40%, var(--violet-soft) 80%);
  background-size: 200% auto;
  animation: shimmer 3.5s linear infinite;
}

/* ========== 5. CARDS ========== */

/* Cards lift on hover */
.card {
  transition: box-shadow .2s ease, transform .2s cubic-bezier(.16,1,.3,1);
}
.card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-1px);
}
/* KPI cards: float up staggered */
@keyframes kpiIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
.kpi { animation: kpiIn .42s cubic-bezier(.16,1,.3,1) both; }
.grid.g4 .kpi:nth-child(1) { animation-delay: .04s; }
.grid.g4 .kpi:nth-child(2) { animation-delay: .10s; }
.grid.g4 .kpi:nth-child(3) { animation-delay: .16s; }
.grid.g4 .kpi:nth-child(4) { animation-delay: .22s; }

/* KPI value count-up look: starts semi-transparent */
.kpi .val { animation: kpiVal .6s ease .2s both; }
@keyframes kpiVal {
  from { opacity: 0; letter-spacing: .04em; }
  to   { opacity: 1; letter-spacing: -.032em; }
}

/* ========== 6. BUTTONS ========== */

/* Primary button pulse glow on hover */
.btn.primary {
  transition: background .13s, border-color .13s, box-shadow .2s, transform .15s cubic-bezier(.34,1.56,.64,1);
}
.btn.primary:hover {
  box-shadow: 0 0 0 4px rgba(37,99,235,.18), 0 1px 3px rgba(37,99,235,.3);
  transform: translateY(-1px);
}
.btn.primary:active { transform: scale(.96); }

/* Regular button spring */
.btn { transition: background .13s, border-color .13s, box-shadow .13s, transform .15s cubic-bezier(.34,1.56,.64,1); }
.btn:active { transform: scale(.96); }

/* ========== 7. PILLS ========== */

/* "Live" green pill pulses */
@keyframes livePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(4,120,87,.35); }
  50%      { box-shadow: 0 0 0 5px rgba(4,120,87,0); }
}
.pill.green { animation: livePulse 2.8s ease-in-out infinite; }

/* Unread dot pulses */
@keyframes dotPulse {
  0%,100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.5); opacity: .7; }
}
.unread-dot { animation: dotPulse 1.8s ease-in-out infinite; }

/* ========== 8. INBOX ========== */

/* Thread rows slide in */
@keyframes threadIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
.thread { animation: threadIn .28s ease both; }
.thread:nth-child(1)  { animation-delay: .02s; }
.thread:nth-child(2)  { animation-delay: .05s; }
.thread:nth-child(3)  { animation-delay: .08s; }
.thread:nth-child(4)  { animation-delay: .11s; }
.thread:nth-child(5)  { animation-delay: .14s; }
.thread:nth-child(6)  { animation-delay: .17s; }
.thread:nth-child(7)  { animation-delay: .20s; }
.thread:nth-child(8)  { animation-delay: .23s; }

/* Message bubbles slide in */
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);   }
}
.msg { animation: msgIn .25s cubic-bezier(.16,1,.3,1) both; }
.msg:nth-child(1)  { animation-delay: .02s; }
.msg:nth-child(2)  { animation-delay: .06s; }
.msg:nth-child(3)  { animation-delay: .10s; }
.msg:nth-child(4)  { animation-delay: .14s; }
.msg:nth-child(5)  { animation-delay: .18s; }
.msg:nth-child(6)  { animation-delay: .22s; }
.msg:nth-child(7)  { animation-delay: .26s; }

/* Channel badge bounce on appear */
@keyframes chanBounce {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  70%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.chan { animation: chanBounce .3s cubic-bezier(.34,1.56,.64,1) both; }

/* ========== 9. PIPELINE ========== */

/* Pipeline columns slide up staggered */
@keyframes colIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.col { animation: colIn .35s cubic-bezier(.16,1,.3,1) both; }
.pipe .col:nth-child(1) { animation-delay: .04s; }
.pipe .col:nth-child(2) { animation-delay: .09s; }
.pipe .col:nth-child(3) { animation-delay: .14s; }
.pipe .col:nth-child(4) { animation-delay: .19s; }
.pipe .col:nth-child(5) { animation-delay: .24s; }
.pipe .col:nth-child(6) { animation-delay: .29s; }

/* Deal card grab spring */
.deal {
  transition: box-shadow .13s, border-color .13s, transform .18s cubic-bezier(.34,1.56,.64,1), opacity .15s;
}
.deal:hover { transform: translateY(-2px) rotate(.4deg); }
.deal.dragging { opacity: .3; transform: rotate(2.5deg) scale(1.04); }

/* ========== 10. TABLE ROWS ========== */

@keyframes rowIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
tbody tr { animation: rowIn .22s ease both; }
tbody tr:nth-child(1)  { animation-delay: .02s; }
tbody tr:nth-child(2)  { animation-delay: .04s; }
tbody tr:nth-child(3)  { animation-delay: .06s; }
tbody tr:nth-child(4)  { animation-delay: .08s; }
tbody tr:nth-child(5)  { animation-delay: .10s; }
tbody tr:nth-child(6)  { animation-delay: .12s; }
tbody tr:nth-child(7)  { animation-delay: .14s; }
tbody tr:nth-child(8)  { animation-delay: .16s; }
tbody tr:nth-child(9)  { animation-delay: .18s; }
tbody tr:nth-child(10) { animation-delay: .20s; }
tbody tr:nth-child(n+11) { animation-delay: .22s; }

/* ========== 11. CALL PANEL ========== */

/* Phone card drops in */
@keyframes phoneIn {
  from { opacity: 0; transform: scale(.92) translateY(14px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
.phone { animation: phoneIn .4s cubic-bezier(.34,1.56,.64,1) both; }

/* Call button spring */
.kbtn { transition: transform .16s cubic-bezier(.34,1.56,.64,1), filter .14s; }
.kbtn:hover { transform: scale(1.1); }
.kbtn:active { transform: scale(.92); }

/* Ring animation on avatar */
@keyframes ringPulse {
  0%   { box-shadow: 0 0 0 0   rgba(96,165,250,.5); }
  70%  { box-shadow: 0 0 0 20px rgba(96,165,250,0);  }
  100% { box-shadow: 0 0 0 0   rgba(96,165,250,0);  }
}
.phone.ringing .pav { animation: ringPulse 1s ease-out infinite; }

/* Wave bars animated fill */
.wave i:nth-child(1) { animation-delay: 0s; }
.wave i:nth-child(2) { animation-delay: .12s; }
.wave i:nth-child(3) { animation-delay: .24s; }
.wave i:nth-child(4) { animation-delay: .36s; }
.wave i:nth-child(5) { animation-delay: .48s; }

/* ========== 12. SMART ROUTING ========== */

/* Routing steps pop in when .on */
.step { transition: opacity .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1); }
.step.on { transform: translateX(0); }

/* Routing step dot bounces when active */
@keyframes dotBounce {
  0%   { transform: scale(0.6); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.step.on .dot { animation: dotBounce .35s cubic-bezier(.34,1.56,.64,1) both; }

/* Hit cell in routing matrix flashes */
@keyframes hitFlash {
  0%,100% { background: var(--green-soft); }
  50%      { background: #bbf7d0; }
}
.hit { animation: hitFlash 1.2s ease-in-out 2; }

/* Escalation bar fill animation */
.esc-bar i { transition: width .25s linear; }

/* ========== 13. TIMELINE (Customer 360) ========== */

@keyframes tlIn {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}
.tl-item { animation: tlIn .3s ease both; }
.tl-item:nth-child(1) { animation-delay: .04s; }
.tl-item:nth-child(2) { animation-delay: .09s; }
.tl-item:nth-child(3) { animation-delay: .14s; }
.tl-item:nth-child(4) { animation-delay: .19s; }
.tl-item:nth-child(5) { animation-delay: .24s; }
.tl-item:nth-child(n+6) { animation-delay: .29s; }

/* Timeline dot pop */
@keyframes tlDot {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.tl-item::before { animation: tlDot .25s cubic-bezier(.34,1.56,.64,1) both; }

/* ========== 14. PROGRESS BARS ========== */

/* Score bars animate width on load */
@keyframes barFill {
  from { width: 0 !important; }
}
.score-bar i      { animation: barFill .7s cubic-bezier(.16,1,.3,1) .1s both; }
.esc-bar i        { animation: none; }  /* controlled by JS */
.funnel-row .fb   { animation: barFill .65s cubic-bezier(.16,1,.3,1) .15s both; }
.bars .b i        { animation: barFill .65s cubic-bezier(.16,1,.3,1) .2s both; }

/* ========== 15. TOAST ========== */

@keyframes toastIn {
  from { transform: translateY(16px) scale(.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}
.toast { animation: toastIn .26s cubic-bezier(.34,1.56,.64,1) both; }

/* ========== 16. MODAL ========== */

@keyframes modalBgIn  { from { opacity: 0; backdrop-filter: blur(0); } }
@keyframes modalCardIn {
  from { transform: scale(.94) translateY(16px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}
.modal-bg { animation: modalBgIn .18s ease both; }
.modal     { animation: modalCardIn .26s cubic-bezier(.34,1.56,.64,1) .05s both; }

/* ========== 17. AI CHAT ========== */

/* Source chips slide in */
@keyframes srcIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.src { animation: srcIn .25s ease both; }
.src:nth-child(1) { animation-delay: .1s; }
.src:nth-child(2) { animation-delay: .17s; }
.src:nth-child(3) { animation-delay: .24s; }
.src:nth-child(4) { animation-delay: .31s; }
.src:nth-child(5) { animation-delay: .38s; }

/* ========== 18. BRAND MARK (sidebar) SPIN ON LOAD ========== */

@keyframes markIn {
  from { transform: rotate(-20deg) scale(.75); opacity: 0; }
  to   { transform: rotate(0deg)   scale(1);   opacity: 1; }
}
.brand .mark { animation: markIn .4s cubic-bezier(.34,1.56,.64,1) .1s both, brandPulse 8s ease-in-out infinite 4s; }

/* ========== 19. FUNNEL ROWS stagger ========== */

.funnel-row:nth-child(1)  { animation: rowIn .22s ease .03s both; }
.funnel-row:nth-child(2)  { animation: rowIn .22s ease .06s both; }
.funnel-row:nth-child(3)  { animation: rowIn .22s ease .09s both; }
.funnel-row:nth-child(4)  { animation: rowIn .22s ease .12s both; }
.funnel-row:nth-child(5)  { animation: rowIn .22s ease .15s both; }
.funnel-row:nth-child(6)  { animation: rowIn .22s ease .18s both; }

/* ========== 20. FORM INPUTS focus glow ========== */

input[type=text], input[type=search], input[type=number], select, textarea {
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
input:focus, select:focus, textarea:focus { transform: translateY(-1px); }

/* ============================================================
   ROLE-SPECIFIC DASHBOARD BACKGROUNDS
   Each role gets a distinct, signature colour identity.
   The sidebar stays white — colour is in the main area only.
   ============================================================ */

/* ── Sales Agent — Cool Sky Blue ── */
.shell[data-role="agent"] {
  background:
    radial-gradient(ellipse 900px 560px at 85% 10%,  rgba(219,234,254,.72) 0%, transparent 65%),
    radial-gradient(ellipse 700px 420px at 10% 90%,  rgba(224,242,254,.55) 0%, transparent 60%),
    radial-gradient(ellipse 500px 300px at 50% 50%,  rgba(239,246,255,.40) 0%, transparent 70%),
    #f4f8ff;
}
.shell[data-role="agent"] .main {
  background: transparent;
}
.shell[data-role="agent"] .content {
  background: transparent;
}
/* Sidebar: keep crisp white */
.shell[data-role="agent"] .sidebar {
  background: #ffffff;
}
/* Topbar: slightly tinted */
.shell[data-role="agent"] .topbar {
  background: rgba(239,246,255,.90);
  border-bottom-color: rgba(147,197,253,.35);
}

/* ── Sales Manager — Deep Indigo-Violet ── */
.shell[data-role="manager"] {
  background:
    radial-gradient(ellipse 1000px 600px at 80% -5%,  rgba(221,214,254,.65) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 5%  95%,   rgba(196,181,253,.45) 0%, transparent 65%),
    radial-gradient(ellipse 500px 350px at 55% 55%,   rgba(237,233,254,.35) 0%, transparent 70%),
    #f6f4ff;
}
.shell[data-role="manager"] .sidebar {
  background: #ffffff;
}
.shell[data-role="manager"] .topbar {
  background: rgba(246,243,255,.92);
  border-bottom-color: rgba(196,181,253,.40);
}

/* ── Executive — Premium Navy Teal ── */
.shell[data-role="executive"] {
  background:
    radial-gradient(ellipse 1100px 620px at 90%  0%,  rgba(186,230,253,.58) 0%, transparent 60%),
    radial-gradient(ellipse  800px 500px at  0% 100%, rgba(199,236,234,.52) 0%, transparent 65%),
    radial-gradient(ellipse  600px 380px at 45%  55%, rgba(224,242,254,.38) 0%, transparent 72%),
    #f0f9ff;
}
.shell[data-role="executive"] .sidebar {
  background: #ffffff;
}
.shell[data-role="executive"] .topbar {
  background: rgba(240,249,255,.92);
  border-bottom-color: rgba(125,211,252,.35);
}
/* Give KPI cards a very subtle teal tint */
.shell[data-role="executive"] .kpi {
  background: linear-gradient(135deg, #ffffff 70%, rgba(224,242,254,.55));
}

/* ── Agent — accent on active nav ── */
.shell[data-role="agent"]    .nav button.active { background: rgba(219,234,254,.80); color: #1e40af; }
.shell[data-role="manager"]  .nav button.active { background: rgba(237,233,254,.80); color: #5b21b6; }
.shell[data-role="executive"].nav button.active { background: rgba(224,242,254,.80); color: #075985; }

/* Coloured left accent bar per role */
.shell[data-role="agent"]    .nav button.active::before { background: #3b82f6; }
.shell[data-role="manager"]  .nav button.active::before { background: #7c3aed; }
.shell[data-role="executive"].nav button.active::before { background: #0284c7; }

/* Coloured brand mark per role (overrides single colour) */
.shell[data-role="agent"]    .brand .mark { background: linear-gradient(145deg, #3b82f6, #1e3a8a); }
.shell[data-role="manager"]  .brand .mark { background: linear-gradient(145deg, #8b5cf6, #4c1d95); }
.shell[data-role="executive"].brand .mark { background: linear-gradient(145deg, #0ea5e9, #075985); }

/* ── Broker portal gets warm gold background (broker.html) ── */
body.broker {
  background:
    radial-gradient(ellipse 900px 560px at 85% 5%,   rgba(254,243,199,.75) 0%, transparent 60%),
    radial-gradient(ellipse 700px 440px at 5%  95%,  rgba(253,230,138,.55) 0%, transparent 65%),
    radial-gradient(ellipse 500px 320px at 50% 50%,  rgba(255,251,235,.45) 0%, transparent 70%),
    #fffbeb;
}
