/* Brutus CRM 7 — design tokens, taken verbatim from brutuscrm.ai (see CRMBuild/13_UI_DESIGN.md) */
:root {
  /* Brand */
  --cyan:        #29abe2;
  --cyan-bright: #4cc6ff;
  --blue:        #2f6fb0;
  --blue-deep:   #1c4a86;
  --red:         #e8412f;
  --red-soft:    #ff6a4d;

  /* Dark surface system */
  --bg:        #070d18;
  --bg-2:      #0b1322;
  --panel:     #0f1b2e;
  --panel-2:   #131f34;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);

  /* Text */
  --ink:       #eef4ff;
  --muted:     #9fb1c9;
  --muted-2:   #6e8099;

  /* Gradients & effects */
  --grad-brand: linear-gradient(120deg, #4cc6ff 0%, #29abe2 38%, #2f6fb0 70%, #1c4a86 100%);
  --grad-hot:   linear-gradient(120deg, #ff6a4d 0%, #e8412f 100%);
  --grad-text:  linear-gradient(100deg, #8fe1ff 0%, #29abe2 45%, #6aa9ff 100%);
  --ring:       0 0 0 1px var(--line);
  --shadow:     0 24px 60px -24px rgba(0,0,0,.65);
  --shadow-glow: 0 0 0 1px rgba(76,198,255,.18), 0 30px 80px -30px rgba(41,171,226,.45);
  --radius:    18px;
  --radius-sm: 12px;
  --ease:      cubic-bezier(.22,.61,.36,1);

  /* Type */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Space Grotesk', var(--font-body);

  /* Semantic — CRM concepts (13_UI_DESIGN §semantic mapping) */
  --lead-cold: var(--muted-2);
  --lead-warm: var(--cyan);
  --lead-hot:  var(--red-soft);
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  margin: 0;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(41,171,226,.35); }
* { scrollbar-width: thin; scrollbar-color: var(--panel-2) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: var(--blue); }
*::-webkit-scrollbar-track { background: transparent; }

/* ── DevExpress dark theme → Brutus palette ───────────────── */
.dxbl-grid {
  --dxbl-grid-bg: transparent;
  --dxbl-grid-border-color: var(--line);
  --dxbl-grid-header-bg: var(--bg-2);
  --dxbl-grid-row-hover-bg: rgba(41,171,226,.07);
  --dxbl-grid-selection-bg: rgba(41,171,226,.16);
  border-color: var(--line) !important;
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-family: var(--font-body);
}
.dxbl-grid .dxbl-grid-header-content { font-family: var(--font-head); letter-spacing: .02em; }
.dxbl-grid .dxbl-grid-table { background: transparent !important; color: var(--ink) !important; }
.dxbl-grid .dxbl-grid-header-row,
.dxbl-grid thead th { background: var(--bg-2) !important; color: var(--muted) !important; border-color: var(--line) !important; }
.dxbl-grid tbody td { border-color: var(--line) !important; }
.dxbl-grid tbody tr:hover td { background: rgba(41,171,226,.06) !important; }
.dxbl-grid tbody tr.dxbl-grid-selected-row td,
.dxbl-grid tbody tr[aria-selected="true"] td { background: rgba(41,171,226,.16) !important; box-shadow: inset 2px 0 0 var(--cyan); }
.dxbl-grid .dxbl-pager, .dxbl-grid .dxbl-grid-pager { background: var(--bg-2) !important; border-color: var(--line) !important; }
.dxbl-text-edit, .dxbl-btn-tool { background: var(--bg-2) !important; border-color: var(--line-2) !important; color: var(--ink) !important; }
.dxbl-grid .dxbl-grid-search-box { max-width: 280px; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--muted); }

/* ── App shell ─────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; }
.shell-nav {
  width: 236px; flex-shrink: 0; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-right: 1px solid var(--line); padding: 20px 14px 16px;
  position: sticky; top: 0; height: 100vh; box-sizing: border-box;
}
.shell-brand {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.nav-section {
  display: block; color: var(--muted-2); font-size: .68rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; padding: 14px 12px 5px;
  font-family: var(--font-head);
}
.shell-nav nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.shell-nav nav a {
  display: flex; align-items: center; gap: 11px;
  color: var(--muted); text-decoration: none; padding: 9px 12px;
  border-radius: var(--radius-sm); font-weight: 500; transition: all .15s var(--ease);
  border: 1px solid transparent;
}
.nav-ico { display: inline-flex; width: 17px; height: 17px; opacity: .8; }
.nav-ico svg { width: 17px; height: 17px; }
.shell-nav nav a:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.shell-nav nav a.active {
  color: var(--ink); background: linear-gradient(90deg, rgba(41,171,226,.16), rgba(41,171,226,.04));
  border-color: rgba(76,198,255,.22);
}
.shell-nav nav a.active .nav-ico { color: var(--cyan-bright); opacity: 1; }
.shell-footer { border-top: 1px solid var(--line); padding-top: 12px; }
.shell-userline { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--grad-brand); color: #fff; font-weight: 700; font-size: .8rem;
  font-family: var(--font-head); flex-shrink: 0;
}
.shell-user { display: block; color: var(--ink); font-size: .85rem; font-weight: 600; }
.link-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 0; font: inherit; font-size: .78rem;
}
.link-btn:hover { color: var(--cyan); }
.shell-main {
  flex: 1; padding: 26px 34px 40px; min-width: 0;
  background:
    radial-gradient(1100px 500px at 85% -20%, rgba(41,171,226,.07), transparent 60%),
    var(--bg);
}

/* ── Login ─────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background:
    radial-gradient(900px 500px at 70% -10%, rgba(41,171,226,.16), transparent 60%),
    radial-gradient(700px 420px at 10% 110%, rgba(28,74,134,.25), transparent 60%),
    var(--bg);
}
.login-card {
  width: min(400px, 92vw); background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 34px 32px; box-shadow: var(--shadow-glow);
}
.login-brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
}
.brand-icon { height: 40px; width: auto; }
.login-brand { justify-content: center; }
.login-icon { height: 84px; width: auto; }
.brand-wordmark { height: 26px; width: auto; }
.shell-brand { justify-content: center; }
.shell-brand .brand-icon { height: 46px; }
.login-sub { color: var(--muted); margin: 10px 0 22px; }
.login-error {
  background: rgba(232,65,47,.12); border: 1px solid rgba(232,65,47,.4);
  color: var(--red-soft); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 16px; font-size: .9rem;
}
.login-card label { display: block; color: var(--muted); font-size: .85rem; margin: 14px 0 6px; }
.login-card input {
  width: 100%; box-sizing: border-box; background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 11px 13px; font: inherit; outline: none; transition: border-color .15s var(--ease);
}
.login-card input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(41,171,226,.18); }
.login-btn {
  width: 100%; margin-top: 22px; padding: 12px; border: none; cursor: pointer;
  border-radius: var(--radius-sm); background: var(--grad-brand); color: #fff;
  font: inherit; font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.login-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }

/* ── Pages: shared chrome ─────────────────────────────────── */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.55rem; }
.split { display: flex; gap: 18px; align-items: flex-start; }
.split > .panel:first-child { flex: 1.3; min-width: 0; }
.panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 140%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 14px 40px -22px rgba(0,0,0,.6);
}
.panel h3 { margin-top: 0; }
.edit-panel { flex: 1; max-width: 520px; max-height: 78vh; overflow-y: auto; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select { min-width: 160px; width: auto !important; flex: 0 1 auto; }
.filter-bar input[placeholder] { flex: 1 1 260px; max-width: 420px; }

/* DevExpress pager + buttons → brand accent */
.dxbl-pager .dxbl-btn.dxbl-active, .dxbl-pager .dxbl-btn[aria-current="page"],
.dxbl-page-size-selector .dxbl-btn.dxbl-active {
  background: var(--grad-brand) !important; border-color: transparent !important; color: #fff !important;
}
.dxbl-btn-primary { background: var(--grad-brand) !important; border-color: transparent !important; }

.field { margin-bottom: 12px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.field label { display: block; color: var(--muted); font-size: .85rem; margin-bottom: 5px; }
.field input, .field select, .field textarea, .filter-bar input, .filter-bar select {
  width: 100%; box-sizing: border-box; background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 9px 12px; font: inherit; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus, .filter-bar input:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(41,171,226,.18);
}
.field input:disabled { opacity: .55; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 7px; margin: 8px 0 14px; }
.check-grid label, .check-inline { color: var(--ink); font-size: .92rem; display: flex; align-items: center; gap: 7px; cursor: pointer; }
.check-grid input[type=checkbox], .check-inline input[type=checkbox] { accent-color: var(--cyan); width: 16px; height: 16px; }

.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-primary {
  padding: 10px 22px; border: none; cursor: pointer; border-radius: var(--radius-sm);
  background: var(--grad-brand); color: #fff; font: inherit; font-weight: 600;
  transition: transform .15s var(--ease);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  padding: 10px 22px; cursor: pointer; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); border: 1px solid var(--line-2); font: inherit;
}
.btn-ghost:hover { color: var(--ink); background: rgba(255,255,255,.05); }

.mini-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; margin-bottom: 7px; font-size: .92rem;
}
.chip {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .75rem;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); margin-left: 6px;
}
.chip-on  { color: #8ff0b4; border-color: rgba(80,220,140,.4); }
.chip-off { color: var(--red-soft); border-color: rgba(232,65,47,.4); }
.chip-warm { color: var(--cyan-bright); border-color: rgba(76,198,255,.4); }
.chip-hot { color: var(--red-soft); border-color: rgba(255,106,77,.45); }

.perm-group { margin-bottom: 8px; }
.perm-group summary { cursor: pointer; color: var(--cyan-bright); font-weight: 600; padding: 6px 0; }

h4 {
  margin: 20px 0 8px; color: var(--cyan-bright); font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
}

/* ── Home dashboard ────────────────────────────────────────── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat-card {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 140%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  transition: all .18s var(--ease);
}
.stat-card:hover { border-color: rgba(76,198,255,.35); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.stat-label { color: var(--muted); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; font-family: var(--font-head); }
.stat-value { color: var(--ink); font-size: 2rem; font-weight: 700; font-family: var(--font-head); line-height: 1.1; }
.stat-sub { color: var(--muted-2); font-size: .82rem; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.quick-card {
  display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; transition: all .15s var(--ease);
}
.quick-card:hover { border-color: rgba(76,198,255,.35); background: var(--panel-2); }
.quick-card strong { font-family: var(--font-head); }

/* ── Copilot ───────────────────────────────────────────────── */
.copilot-thread { display: flex; flex-direction: column; gap: 12px; min-height: 180px; max-height: 52vh; overflow-y: auto; padding: 4px 2px; }
.copilot-msg { max-width: 88%; }
.copilot-msg.mine { align-self: flex-end; text-align: right; }
.copilot-who { display: block; color: var(--muted-2); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; font-family: var(--font-head); }
.copilot-text {
  display: inline-block; text-align: left; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; line-height: 1.5;
}
.copilot-msg.mine .copilot-text { background: rgba(41,171,226,.13); border-color: rgba(76,198,255,.3); }
.copilot-input { display: flex; gap: 10px; margin-top: 14px; }
.copilot-input input {
  flex: 1; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 11px 14px; font: inherit; outline: none;
}
.copilot-input input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(41,171,226,.18); }
.copilot-summary { border-color: rgba(76,198,255,.35); background: rgba(41,171,226,.07); line-height: 1.55; }

/* tags + folders */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 4px; }
.tag-x { cursor: pointer; margin-left: 5px; color: var(--muted-2); }
.tag-x:hover { color: var(--red-soft); }
.tag-input {
  background: transparent; border: 1px dashed var(--line-2); border-radius: 999px;
  color: var(--ink); padding: 2px 12px; font: inherit; font-size: .8rem; width: 90px; outline: none;
}
.tag-input:focus { border-color: var(--cyan); width: 150px; }
.folder-row { display: flex; gap: 7px; }
.folder-btn {
  width: 36px; height: 32px; cursor: pointer; border-radius: var(--radius-sm); font: inherit;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2);
}
.folder-btn.on { background: var(--grad-brand); color: #fff; border-color: transparent; }

/* Run Payments */
.run-iframe-mount { min-height: 200px; margin-bottom: 8px; }
.zip-in {
  width: 140px; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 9px 11px; font: inherit; outline: none;
}
.zip-in:focus { border-color: var(--cyan); }

/* ── Reports ───────────────────────────────────────────────── */
.col-chart { display: flex; align-items: flex-end; gap: 6px; height: 178px; padding-top: 8px; }
.col-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; }
.col-bar { width: 100%; max-width: 34px; min-height: 2px; border-radius: 5px 5px 0 0;
  background: var(--grad-brand); transition: height .3s var(--ease); }
.col-wrap:hover .col-bar { filter: brightness(1.25); }
.col-label { font-size: .66rem; color: var(--muted-2); white-space: nowrap; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.bar-label { width: 110px; flex-shrink: 0; font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 18px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--grad-brand); border-radius: 999px; min-width: 2px; transition: width .4s var(--ease); }
.bar-fill.hot { background: var(--grad-hot); }
.bar-val { width: 120px; flex-shrink: 0; text-align: right; font-size: .82rem; color: var(--ink); }
.lb-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.lb-table th { text-align: left; color: var(--muted); font-family: var(--font-head); font-size: .76rem;
  text-transform: uppercase; letter-spacing: .06em; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.lb-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.lb-table tbody tr:hover td { background: rgba(41,171,226,.06); }
.lb-table td:first-child { color: var(--cyan-bright); font-weight: 700; font-family: var(--font-head); width: 36px; }
.lb-table td:last-child, .lb-table th:last-child { text-align: right; }

/* ── TV Wallboard ──────────────────────────────────────────── */
.wall { position: fixed; inset: 0; background:
  radial-gradient(1200px 600px at 80% -10%, rgba(41,171,226,.16), transparent 60%),
  radial-gradient(900px 500px at 10% 110%, rgba(28,74,134,.30), transparent 60%), var(--bg);
  color: var(--ink); padding: 2.2vh 2.4vw; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column; }
.wall-head { display: flex; align-items: center; gap: 18px; }
.wall-logo { height: 56px; }
.wall-clock { font-family: var(--font-head); font-size: 1.7rem; color: var(--muted); }
.wall-test { margin-left: auto; display: flex; gap: 6px; opacity: .25; transition: opacity .2s; }
.wall-test:hover { opacity: 1; }
.wall-test button { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.wall-title-txt { font-family: var(--font-head); font-size: 1.7rem; color: var(--cyan-bright); font-weight: 700; }
.wall-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4vw; margin: 2.4vh 0; }
.wall-goals { display: flex; gap: 1.6vw; margin-bottom: 2.2vh; }
.goal { flex: 1; }
.goal-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 1vw; letter-spacing: .06em; margin-bottom: .8vh; text-transform: uppercase; }
.goal-track { height: 2.2vh; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 99px; overflow: hidden; }
.goal-fill { height: 100%; background: var(--grad-brand); border-radius: 99px; transition: width .6s var(--ease); }
.goal-fill.hit { background: linear-gradient(90deg, #4cd47a, #ffd24c); }
.wall-milestone { position: absolute; top: 12%; left: 50%; transform: translateX(-50%) scale(.6); opacity: 0;
  font-family: var(--font-head); font-weight: 800; font-size: 5vw; color: #ffd24c;
  text-shadow: 0 0 40px rgba(255,210,76,.6); animation: flashIn .5s var(--ease) forwards; white-space: nowrap; }
.wall-milestone.out { animation: none; opacity: 0; transition: opacity .6s ease; }
.wall-kpi { background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 140%); border: 1px solid var(--line-2);
  border-radius: 20px; padding: 2.4vh 2vw; text-align: center; box-shadow: var(--shadow); }
.wall-kpi .k-val { display: block; font-family: var(--font-head); font-weight: 700; font-size: 4.2vw; line-height: 1;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wall-kpi .k-lab { display: block; margin-top: 1vh; color: var(--muted); font-size: 1.1vw; letter-spacing: .08em; text-transform: uppercase; }
.wall-board { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6vw; flex: 1; min-height: 0; }
.wall-col { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 2vh 1.6vw; overflow: hidden; }
.wall-col h3 { font-size: 1.5vw; margin: 0 0 1.4vh; color: var(--cyan-bright); }
.wall-leader { display: flex; align-items: center; gap: 1vw; padding: 1.1vh 0; border-bottom: 1px solid var(--line); font-size: 1.5vw; }
.wl-rank { width: 2.2vw; height: 2.2vw; display: grid; place-items: center; border-radius: 50%; background: var(--grad-brand); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.2vw; flex-shrink: 0; }
.wl-name { flex: 1; font-weight: 600; }
.wl-stat { color: var(--muted); }
.wall-recent { display: flex; align-items: baseline; gap: 1vw; padding: 1.1vh 0; border-bottom: 1px solid var(--line); font-size: 1.4vw; }
.wr-amt { font-family: var(--font-head); font-weight: 700; }
.wr-who { font-weight: 600; }
.wr-co { color: var(--muted); margin-left: auto; }

/* celebration overlay */
.wall-stage { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.wall-flash { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.4); text-align: center;
  background: rgba(7,13,24,.86); border: 3px solid var(--accent); border-radius: 28px; padding: 5vh 6vw;
  box-shadow: 0 0 0 6px rgba(255,255,255,.04), 0 40px 120px -20px var(--accent);
  animation: flashIn .5s var(--ease) forwards, flashPulse 1.2s ease-in-out .5s infinite alternate; }
.wall-flash.out { animation: flashOut .8s var(--ease) forwards; }
.wall-emoji { font-size: 7vw; line-height: 1; animation: emojiBounce .6s ease infinite alternate; }
.wall-title { font-family: var(--font-head); font-weight: 700; font-size: 4.5vw; letter-spacing: .02em; margin-top: 1vh; }
.wall-amount { font-family: var(--font-head); font-weight: 700; font-size: 6vw; color: #fff; line-height: 1.05; }
.wall-agent { font-size: 2.6vw; font-weight: 600; margin-top: 1vh; }
.wall-meta { font-size: 1.4vw; color: var(--muted); margin-top: .6vh; }
@keyframes flashIn { from { transform: translate(-50%,-50%) scale(.3); opacity: 0; } to { transform: translate(-50%,-50%) scale(1); opacity: 1; } }
@keyframes flashOut { to { transform: translate(-50%,-50%) scale(1.3); opacity: 0; } }
@keyframes flashPulse { from { box-shadow: 0 0 0 6px rgba(255,255,255,.04), 0 40px 120px -20px var(--accent); } to { box-shadow: 0 0 0 10px rgba(255,255,255,.10), 0 50px 160px -10px var(--accent); } }
@keyframes emojiBounce { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-18px) rotate(6deg); } }
.wall-rain { position: absolute; inset: 0; pointer-events: none; }
.rain-piece { position: absolute; top: -8vh; animation: rainFall linear forwards; }
@keyframes rainFall { to { transform: translateY(116vh) rotate(360deg); opacity: .85; } }

/* ── Mail ──────────────────────────────────────────────────── */
.mail-row { cursor: pointer; transition: border-color .12s; }
.mail-row:hover { border-color: rgba(76,198,255,.35); }
.mail-row.on { border-color: var(--cyan); background: rgba(41,171,226,.08); }
.mail-row.unread { border-left: 3px solid var(--cyan); }
.mail-line1 { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; }
.mail-when { color: var(--muted-2); font-size: .78rem; white-space: nowrap; }
.mail-subj { font-size: .88rem; margin: 2px 0; }
.mail-snip { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-body { background: #fff; color: #111; border-radius: var(--radius-sm); padding: 16px; max-height: 56vh; overflow: auto; }

/* ── Notification toasts ───────────────────────────────────── */
#notify-host { position: fixed; top: 18px; right: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.notify-toast {
  display: flex; gap: 12px; align-items: flex-start; width: 320px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm); padding: 13px 15px; box-shadow: var(--shadow);
  transform: translateX(380px); opacity: 0; transition: all .35s var(--ease);
}
.notify-toast.in { transform: translateX(0); opacity: 1; }
.nt-kind { font-size: 1.3rem; line-height: 1; }
.nt-title { font-weight: 600; font-size: .9rem; color: var(--ink); }
.nt-text { color: var(--muted); font-size: .82rem; margin-top: 2px; }

.neg { color: var(--red); }

/* ── Deploy action bar ─────────────────────────────────────── */
.deploy-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

/* ── Address autocomplete ──────────────────────────────────── */
.addr-ac { position: relative; }
.addr-input { width: 100%; }
.addr-list { position: absolute; z-index: 60; left: 0; right: 0; margin-top: 2px; max-height: 240px; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.addr-item { padding: 8px 12px; cursor: pointer; font-size: .9rem; border-bottom: 1px solid var(--line-2); }
.addr-item:last-child { border-bottom: none; }
.addr-item:hover { background: var(--panel-2); color: var(--cyan-bright); }

/* ── Shell top bar (persistent softphone) ──────────────────── */
.shell-topbar { display: flex; justify-content: flex-end; align-items: center; padding: 8px 4px 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; }

/* ── Modal overlay (add-lead, etc.) ────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(4,8,16,.7); display: grid; place-items: center; padding: 20px; overflow: auto; }
.modal-card { width: min(640px, 96vw); max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-glow); }

/* ── Employee editor tabs ──────────────────────────────────── */
.emp-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); margin: 8px 0 14px; }
.emp-tab { background: transparent; border: none; color: var(--muted); padding: 8px 14px; font: inherit; cursor: pointer; border-bottom: 2px solid transparent; }
.emp-tab:hover { color: var(--ink); }
.emp-tab.active { color: var(--ink); border-bottom-color: var(--cyan-bright); font-weight: 600; }
.emp-photo-row { display: flex; align-items: center; gap: 16px; }
.emp-photo { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line-2); }
.emp-photo-empty { display: grid; place-items: center; color: var(--muted-2); background: var(--panel-2); font-size: .8rem; }

/* ── Controller row status colors (tinted for the dark grid) ── */
tr.ctrl-ready    td { background: rgba(245, 222, 80, .16) !important; }
tr.ctrl-otd      td { background: rgba(80, 215, 235, .16) !important; }
tr.ctrl-received td { background: rgba(70, 200, 120, .16) !important; }
tr.ctrl-credit   td { background: rgba(150, 120, 230, .18) !important; }
tr.ctrl-ach      td { background: rgba(160, 210, 90, .16) !important; }
tr.ctrl-mailin   td { background: rgba(240, 110, 180, .16) !important; }
tr.ctrl-mailout  td { background: rgba(150, 150, 160, .16) !important; }
tr.ctrl-returned td { background: rgba(240, 100, 70, .18) !important; }
tr.ctrl-delete   td { background: rgba(20, 20, 24, .55) !important; }
tr.ctrl-deposited td { background: rgba(70, 120, 230, .20) !important; }

/* ── Controller filters & saved views ──────────────────────── */
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.view-select { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 10px; font: inherit; }
.save-view-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.save-view-bar input[type=text], .save-view-bar input:not([type]) { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 10px; font: inherit; min-width: 220px; }
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.filter-dd { position: relative; }
.filter-dd > summary { list-style: none; cursor: pointer; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 12px; user-select: none; display: inline-flex; align-items: center; gap: 6px; }
.filter-dd > summary::-webkit-details-marker { display: none; }
.filter-dd > summary::after { content: "▾"; color: var(--muted-2); }
.filter-dd[open] > summary { border-color: var(--cyan-bright); }
.filter-dd .dd-body { position: absolute; z-index: 50; margin-top: 6px; min-width: 220px; max-height: 320px; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.dd-badge { background: var(--grad-brand); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; }
.filter-date { display: inline-flex; gap: 6px; align-items: center; }
.filter-date label { color: var(--muted); font-size: .85rem; }
.filter-date input[type=date] { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 6px 8px; font: inherit; }
.ctrl-search { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 7px 12px; font: inherit; min-width: 280px; }

/* ── Co-browse ─────────────────────────────────────────────── */
.cobrowse-viewer { background: #fff; border-radius: var(--radius-sm); height: 74vh; overflow-y: auto; overflow-x: hidden; position: relative; }
.cobrowse-viewer .cb-empty { color: var(--muted-2); padding: 40px; text-align: center; }
.cobrowse-viewer .replayer-wrapper { transform-origin: top left; }
.cobrowse-viewer iframe { border: 0; }
#cobrowse-consent { position: fixed; inset: 0; z-index: 10000; background: rgba(4,8,16,.7); display: grid; place-items: center; }
#cobrowse-consent .cb-card { width: min(440px, 92vw); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-glow); }
#cobrowse-consent .cb-title { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
#cobrowse-consent .cb-text { color: var(--muted); margin: 12px 0 20px; line-height: 1.5; }
#cobrowse-consent .cb-btns { display: flex; gap: 10px; justify-content: flex-end; }
#cobrowse-consent .cb-allow { background: var(--grad-brand); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px 22px; font: inherit; font-weight: 600; cursor: pointer; }
#cobrowse-consent .cb-deny { background: transparent; color: var(--muted); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 22px; font: inherit; cursor: pointer; }
#cobrowse-banner { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; align-items: center; gap: 12px; background: var(--panel-2); border: 1px solid var(--red-soft); border-radius: 999px; padding: 9px 16px; color: var(--ink); font-size: .88rem; box-shadow: var(--shadow); }
#cobrowse-banner .cb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: emojiBounce 1s infinite alternate; }
#cobrowse-banner .cb-stop { background: var(--red); color: #fff; border: none; border-radius: 999px; padding: 5px 14px; font: inherit; font-size: .8rem; cursor: pointer; }
#cobrowse-banner.cb-controlling { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft), var(--shadow); }

/* ── Import ────────────────────────────────────────────────── */
.file-input { color: var(--muted); margin: 8px 0 12px; }
.file-input::file-selector-button {
  background: var(--grad-brand); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 10px 18px; margin-right: 12px; font: inherit; font-weight: 600; cursor: pointer;
}
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.map-cell label { display: block; font-size: .78rem; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-sample { display: block; font-size: .72rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-scroll { overflow-x: auto; }
.preview-table { border-collapse: collapse; font-size: .82rem; width: 100%; }
.preview-table th {
  text-align: left; color: var(--cyan-bright); background: var(--bg-2); padding: 7px 10px;
  border: 1px solid var(--line); font-family: var(--font-head); white-space: nowrap;
}
.preview-table td { padding: 6px 10px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* DevExpress editor sizing + dark blending */
.w-70 { width: 70px !important; } .w-90 { width: 90px !important; }
.w-180 { width: 180px !important; } .w-220 { width: 220px !important; } .w-320 { width: 320px !important; }

/* Sale line items (workspace sale dialog) */
.sale-lines { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.sale-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sale-line-name { flex: 1; min-width: 120px; color: var(--ink); font-size: .92rem; }
.sale-line-total { min-width: 70px; text-align: right; color: var(--cyan); font-weight: 600; }
.sale-line-memo { flex-basis: 100%; background: var(--surface-2, #1a1f2b); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); padding: 5px 8px; font-size: .88rem; }
.btn-x { background: transparent; border: none; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.btn-x:hover { color: var(--danger, #e5484d); }
.btn-x-text { background: transparent; border: none; color: var(--cyan); font-size: .85rem; cursor: pointer; padding: 2px 6px; }
.btn-x-text:hover { text-decoration: underline; }
.btn-x-text.danger { color: var(--danger, #e5484d); }

/* Reminders / appointments / tasks */
.reminder-pop { border-left: 3px solid var(--cyan); }
.reminder-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.reminder-stars { color: #ffd166; min-width: 60px; font-size: .85rem; }
.reminder-text { flex: 1; color: var(--ink); }
.appt-row { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.appt-time { min-width: 72px; color: var(--cyan); font-weight: 600; }
.appt-dur { min-width: 48px; font-size: .85rem; }
.appt-title { flex: 1; color: var(--ink); }
.task-overdue td { color: #ffb4ab !important; }
.consent-note { margin: 8px 0; padding: 7px 10px; border-radius: var(--radius-sm); background: rgba(255,210,76,.12); border: 1px solid rgba(255,210,76,.4); color: #ffd166; font-size: .9rem; }
.research-panel { margin: 10px 0; border-left: 3px solid var(--cyan); background: rgba(41,171,226,.05); }
.chat-panel { margin: 10px 0; border-left: 3px solid #8b5cf6; }
.chat-log { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.chat-msg { padding: 7px 11px; border-radius: 12px; max-width: 85%; white-space: pre-wrap; font-size: .92rem; line-height: 1.35; }
.chat-msg.from-user { align-self: flex-end; background: var(--grad-brand); color: #fff; }
.chat-msg.from-ai { align-self: flex-start; background: rgba(255,255,255,.05); color: var(--ink); border: 1px solid var(--line); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input { flex: 1; background: var(--surface-2, #1a1f2b); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); padding: 8px 10px; }
.lb-top td { font-weight: 600; color: var(--cyan-bright, var(--cyan)); }
.role-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); }
.role-item:hover { background: rgba(255,255,255,.04); }
.role-item.on { background: var(--grad-brand); color: #fff; }
.role-item.on .muted { color: rgba(255,255,255,.8); }

/* Reports drill-down */
.clickable { cursor: pointer; }
.bar-row.clickable:hover .bar-label, tr.clickable:hover td { color: var(--cyan); }
.drill-detail { margin: 4px 0 10px; padding: 8px 10px; background: rgba(255,255,255,.03); border-radius: var(--radius-sm); }
.drill-row { display: flex; gap: 14px; align-items: baseline; padding: 3px 0; font-size: .88rem; }
.drill-co { flex: 1; color: var(--ink); }
.drill-row a { color: var(--cyan); text-decoration: none; }
.drill-row a:hover { text-decoration: underline; }
.dxbl-text-edit, .dxbl-combobox, .dxbl-spin-edit, .dxbl-date-edit, .dxbl-memo {
  border-radius: var(--radius-sm) !important;
}
.dxbl-text-edit input, .dxbl-memo textarea { color: var(--ink) !important; }
.dxbl-listbox, .dxbl-dropdown-dialog, .dxbl-popup {
  background: var(--panel-2) !important; border-color: var(--line-2) !important; color: var(--ink) !important;
}

/* ── Workspace ─────────────────────────────────────────────── */
.btn-play {
  padding: 11px 30px; border: none; cursor: pointer; border-radius: var(--radius-sm);
  background: var(--grad-brand); color: #fff; font: inherit; font-family: var(--font-head);
  font-weight: 700; font-size: 1.05rem; transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.btn-play:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.play-campaign {
  background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 10px 12px; font: inherit;
}
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btn-call {
  padding: 7px 14px; border: 1px solid rgba(76,198,255,.4); cursor: pointer;
  border-radius: var(--radius-sm); background: rgba(41,171,226,.12); color: var(--cyan-bright); font: inherit;
}
.btn-call:hover { background: rgba(41,171,226,.25); }
.dispo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.btn-dispo {
  padding: 11px 8px; cursor: pointer; border-radius: var(--radius-sm); font: inherit; font-weight: 600;
  background: var(--panel-2); color: var(--ink); border: 1px solid var(--line-2);
}
.btn-dispo:hover { border-color: var(--cyan); }
.btn-dispo.warn { color: #ffd479; border-color: rgba(255,200,100,.35); }
.btn-dispo.danger { color: var(--red-soft); border-color: rgba(232,65,47,.4); }

/* ── Softphone ─────────────────────────────────────────────── */
.softphone { display: flex; align-items: center; gap: 10px; }
.softphone .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-2); display: inline-block; }
.softphone .dot-on { background: #4cd47a; box-shadow: 0 0 8px rgba(76,212,122,.7); }
.softphone .dot-busy { background: var(--cyan-bright); box-shadow: 0 0 8px rgba(76,198,255,.7); }
.softphone .dot-off { background: var(--red); box-shadow: 0 0 8px rgba(232,65,47,.6); }
.btn-call.danger { color: var(--red-soft); border-color: rgba(232,65,47,.4); background: rgba(232,65,47,.08); }
