/* DV Portal — flat warm-beige system, matched to the approved prototype
   (dashboard-shell-login.html). No gradients, no heavy shadows. */

:root {
  --bg: #EFE8D8;
  --panel: #FAF7EF;
  --panel-2: #EFE7D5;
  --sidebar: #FBF8F1;
  --line: rgba(42, 36, 28, 0.09);
  --line-strong: rgba(42, 36, 28, 0.16);
  --ink: #2A241C;
  --text-2: #736A5B;      /* ink-dim */
  --faint: #A69C89;       /* ink-faint */
  --gold: #33409E;        /* brand indigo */
  --accent: #33409E;
  --accent-soft: rgba(51, 64, 158, 0.10);
  --indigo: #33409E;    --indigo-l: #ECEAF4;
  --blue: #2A66B8;      --blue-l: #E7EFFA;
  --coral: #C05A2C;     --coral-l: #F7E9E0;
  --teal: #1D8064;      --teal-l: #E2F0EA;
  --pink: #B3466F;      --pink-l: #F6E5EC;
  --amber: #B87A1E;     --amber-l: #F5E9D4;
  --red: #A6362E;       --red-l: #F6E2E0;
  --grey-dk: #5A524A;   --grey-dk-l: #E9E2D6;   /* lead stage: New (dark gray) */
  --grey: #8D857A;      --grey-l: #EFEBE1;      /* lead stages: No Answer / gray tones */
  --green: #2E7D4F;     --green-l: #E4F2E9;     /* lead stage: Qualified */
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Segoe UI", Inter, Manrope, sans-serif;
  font-size: 14px; line-height: 1.45;
}

h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13px; color: var(--ink); }

/* ----------------------------------------------------------------- shell */

.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--sidebar);
  border-right: .5px solid var(--line-strong);
  padding: 22px 16px;
  position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 22px; }
.mark {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold); color: #FAF7EF;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.sb-name { font-weight: 600; font-size: 14px; }

.sb-group {
  font-size: 11px; letter-spacing: .05em; color: var(--faint);
  text-transform: uppercase; margin: 18px 10px 8px;
}
.sb-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: none; border: none;
  padding: 9px 10px; border-radius: 8px;
  font-size: 13px; color: var(--text-2);
  margin-bottom: 2px;
}
.sb-item:hover { background: var(--panel-2); }
.sb-item.active { background: var(--panel-2); color: var(--ink); font-weight: 600; }
.sb-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; flex-shrink: 0; }

.sidebar-foot { margin-top: auto; padding: 14px 10px 0; font-size: 11px; color: var(--faint); }

/* Mobile nav drawer controls — hidden on desktop, switched on in the
   responsive block below. */
.menu-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none;
  background: var(--panel); border: .5px solid var(--line-strong);
  border-radius: 10px; color: var(--ink); padding: 0;
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle:hover { background: var(--panel-2); }
.menu-toggle:active { transform: scale(.96); }
.scrim {
  position: fixed; inset: 0;
  background: rgba(42, 36, 28, 0.42);
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
  z-index: 120;
}

.main { padding: 26px 32px 50px; min-width: 0; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; margin-bottom: 26px; position: relative;
}
.search {
  flex: 1; max-width: 360px;
  display: flex; align-items: center; gap: 8px;
  background: var(--panel);
  border: .5px solid var(--line);
  border-radius: 10px; padding: 9px 14px;
  color: var(--faint);
}
.search svg { width: 14px; height: 14px; flex: none; }
.search input { border: none; outline: none; background: transparent; flex: 1; color: var(--ink); }
.search input::placeholder { color: var(--faint); }

.top-right { display: flex; align-items: center; gap: 16px; }
.acct-meta { text-align: right; line-height: 1.25; }
.acct-meta strong { display: block; font-size: 13px; }
.acct-meta span { font-size: 11px; color: var(--faint); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold); color: #FAF7EF;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex: none;
  vertical-align: middle;
}
.avatar-sm { width: 22px; height: 22px; font-size: 9px; margin-right: 6px; }
#account-chip { background: none; border: none; display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 8px; }
#account-chip:hover { background: var(--panel-2); }

.acct-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--panel);
  border: .5px solid var(--line-strong);
  border-radius: 12px;
  padding: 8px; min-width: 190px;
  box-shadow: 0 8px 28px rgba(42, 36, 28, 0.10);
  z-index: 40;
}
.acct-menu-head { padding: 6px 8px; font-size: 13px; font-weight: 600; }
.acct-demo { padding: 2px 8px 8px; font-size: 11px; color: var(--amber); }
.acct-logout {
  width: 100%; border: none; background: var(--accent-soft); color: var(--accent);
  padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: 13px;
}
.acct-logout:hover { background: var(--gold); color: #fff; }

/* ------------------------------------------------------------- headings */

.page-title { font-size: 24px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.page-sub { color: var(--text-2); font-size: 14px; margin: 4px 0 0; }
.status-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--teal); margin-left: 6px; vertical-align: middle;
}

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 24px;
}

.muted { color: var(--text-2); }
.row { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }

.empty { color: var(--text-2); text-align: center; padding: 28px 12px; font-size: 13px; }
.error-box { border-left: 3px solid var(--red); color: var(--red); background: var(--red-l); padding: 16px 18px; border-radius: 14px; }
.placeholder-box {
  background: var(--panel); border: .5px dashed var(--line-strong);
  border-radius: 14px; padding: 60px 20px; text-align: center;
  color: var(--faint); font-size: 13px;
}

/* ----------------------------------------------------------------- kpi */

.grid { display: grid; gap: 14px; margin-bottom: 16px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-bottom: 14px; }

.kpi { border-radius: 14px; padding: 18px 20px; color: #fff; }
.kpi-label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; opacity: .85; margin-bottom: 12px; font-weight: 600; }
.kpi-value { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; font-size: 30px; font-weight: 500; line-height: 1; margin-bottom: 8px; }
.kpi-sub { font-size: 12px; opacity: .9; }

.k-blue  { background: var(--blue); }
.k-teal  { background: var(--teal); }
.k-amber { background: var(--amber); }
.k-pink  { background: var(--pink); }
.k-coral { background: var(--coral); }
.k-red   { background: var(--red); }

/* --------------------------------------------------------------- panels */

.panel {
  background: var(--panel);
  border: .5px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.panel-title { font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.panel-sub { font-size: 12px; color: var(--faint); margin: 0 0 18px; }

/* legacy card alias (leads / team / worklog views) */
.card {
  background: var(--panel);
  border: .5px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 14px; }

/* --------------------------------------------------------------- tables */

.tbl, .otable { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .otable th {
  text-align: left; padding: 0 0 10px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--faint); font-weight: 600;
  border-bottom: .5px solid var(--line-strong);
}
.tbl td, .otable td { padding: 11px 10px 11px 0; border-bottom: .5px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td, .otable tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: rgba(42, 36, 28, 0.02); }
.reason-cell { max-width: 260px; }

.pager { display: flex; gap: 8px; margin-top: 14px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type="text"] {
  flex: 1; min-width: 180px;
  background: var(--bg); border: .5px solid var(--line-strong);
  border-radius: 9px; padding: 9px 12px; outline: none;
}
.toolbar select {
  background: var(--panel-2); border: .5px solid var(--line-strong);
  border-radius: 9px; padding: 9px 10px; outline: none;
}

/* ---------------------------------------------------------- chips/badges */

.chip, .obadge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.c-blue   { background: var(--blue-l);   color: var(--blue); }
.c-teal   { background: var(--teal-l);   color: var(--teal); }
.c-amber  { background: var(--amber-l);  color: var(--amber); }
.c-pink   { background: var(--pink-l);   color: var(--pink); }
.c-coral  { background: var(--coral-l);  color: var(--coral); }
.c-red    { background: var(--red-l);    color: var(--red); }
.c-grey   { background: var(--panel-2);  color: var(--text-2); }
.c-indigo { background: var(--accent-soft); color: var(--gold); }
.c-grey-dk { background: var(--grey-dk-l); color: var(--grey-dk); }
.c-green   { background: var(--green-l);   color: var(--green); }

.ob-int   { background: var(--teal-l);  color: var(--teal); }
.ob-not   { background: var(--red-l);   color: var(--red); }
.ob-no    { background: var(--panel-2); color: var(--text-2); }
.ob-wrong { background: var(--amber-l); color: var(--amber); }
.ob-cb    { background: var(--blue-l);  color: var(--blue); }
.ob-cb    { background: var(--blue-l);  color: var(--blue); }

.badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; margin-left: auto; white-space: nowrap; }
.badge.pending  { background: var(--amber-l); color: var(--amber); }
.badge.approved { background: var(--teal-l);  color: var(--teal); }
.badge.rejected { background: var(--red-l);   color: var(--red); }

/* -------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #fff;
  border: none; border-radius: 10px;
  padding: 9px 16px;
  font-size: 13px; font-weight: 600;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.ghost {
  background: var(--panel); color: var(--ink);
  border: .5px solid var(--line-strong); font-weight: 500;
}
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { background: var(--red); }
.btn.ok { background: var(--teal); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.primary { background: var(--gold); }

.seg { display: inline-flex; background: var(--panel-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg-btn { border: none; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.seg-btn.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(42,36,28,0.08); }

/* ----------------------------------------------------- pipeline kanban */

.kanban {
  display: flex;
  gap: 14px;
  padding: 4px 6px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  align-items: stretch;
}
.kb-col {
  flex: 0 0 268px;
  width: 268px;
  min-width: 268px;
  background: var(--bg);
  border: .5px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 72vh;
}
.kb-col.kb-over { outline: 2px dashed var(--gold); outline-offset: -2px; background: var(--accent-soft); }
.kb-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 13px;
  border-bottom: .5px solid var(--line);
}
.kb-head strong {
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: var(--ink);
}
.kb-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.kb-count {
  margin-left: auto;
  min-width: 26px; text-align: center;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.kb-body {
  padding: 10px 12px 8px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 60px;
}
.kb-empty {
  color: var(--faint); font-size: 12px;
  text-align: center; padding: 18px 8px;
  border: 1px dashed var(--line-strong); border-radius: 10px;
  background: var(--panel);
}
.kb-card {
  background: var(--panel);
  border: .5px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 11px;
  padding: 11px 12px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(42, 36, 28, 0.06);
  transition: box-shadow .15s ease, transform .12s ease;
}
.kb-card:hover { box-shadow: 0 5px 16px rgba(42, 36, 28, 0.10); transform: translateY(-1px); }
.kb-card.kb-drag { opacity: .4; }
.kb-card[draggable="true"] { cursor: grab; }
.kb-card[draggable="true"]:active { cursor: grabbing; }
.kb-card-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kb-card-top strong {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.kb-stage { font-size: 10px; padding: 2px 8px; flex-shrink: 0; }
.kb-buyer {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
/* top-right contact slot (phone / email) — replaces the ₹ amount on lead cards */
.kb-contact { margin-left: auto; font-size: 11.5px; color: var(--text-2); min-width: 0; }
.kb-contact a { font-weight: 600; color: var(--gold); }
.kb-email { font-weight: 600; color: var(--gold); }
/* middle-right created/updated date, e.g. "05 Oct" */
.kb-card-date { font-size: 11px; color: var(--faint); margin-top: 4px; text-align: right; }
/* bottom-left assignee pill: circular initials badge + user label */
.kb-assignee {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel-2); border-radius: 20px;
  padding: 2px 8px; font-size: 10.5px; color: var(--text-2);
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kb-assignee .kb-avatar {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft); color: var(--gold);
  font-size: 7px; font-weight: 700; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
/* deal value, screenshot-style */
.kb-amount {
  font-size: 15px; font-weight: 700; color: var(--ink);
  margin: 6px 0 2px; letter-spacing: -0.01em;
}
.kb-meta { font-size: 11.5px; color: var(--text-2); margin-bottom: 7px; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.kb-tel { font-weight: 600; color: var(--gold); }
.kb-tel:hover { text-decoration: underline; }
.kb-city { color: var(--text-2); }
.kb-prop {
  font-size: 11.5px; color: var(--text-2);
  background: var(--panel-2); border-radius: 7px;
  padding: 4px 8px; margin-bottom: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kb-progress {
  display: flex; align-items: center; gap: 5px; margin-top: 8px;
}
.kb-progress .kp-label { font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.kb-progress .kp {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-strong);
}
.kb-progress .kp.on { background: var(--gold); }
.kb-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.kb-tags .chip { padding: 2px 8px; font-size: 10.5px; }
.kb-created { font-size: 10.5px; color: var(--faint); white-space: nowrap; margin-right: auto; }
.kb-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 5px; padding-top: 9px;
  border-top: .5px solid var(--line);
}
.kb-moves { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.kb-mv {
  border: none; border-radius: 8px;
  background: var(--accent-soft); color: var(--gold);
  width: 30px; height: 30px;
  font-size: 17px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.kb-mv:hover { background: var(--gold); color: #fff; }
.kb-move-hint { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }

/* ---- stage theming: headers, dots, counts, card accents ----------------- */
/* New = dark gray (untouched, unassigned) */
.kb-c-new       .kb-head { background: var(--grey-dk-l); }
.kb-c-new       .kb-dot,  .kb-c-new       .kb-count { background: var(--grey-dk); }
.kb-c-new       .kb-card  { border-left-color: var(--grey-dk); }
.kb-c-new       .kb-card  .avatar { background: var(--grey-dk-l); color: var(--grey-dk); }
.kb-c-new       .kb-progress .kp.on { background: var(--grey-dk); }

/* Assigned = blue (handed to a telecaller, not yet worked) */
.kb-c-assigned  .kb-head { background: var(--blue-l); }
.kb-c-assigned  .kb-dot,  .kb-c-assigned  .kb-count { background: var(--blue); }
.kb-c-assigned  .kb-card  { border-left-color: var(--blue); }
.kb-c-assigned  .kb-card  .avatar { background: var(--blue-l); color: var(--blue); }
.kb-c-assigned  .kb-progress .kp.on { background: var(--blue); }

/* No Answer = gray (attempted, no pickup) */
.kb-c-noanswer  .kb-head { background: var(--grey-l); }
.kb-c-noanswer  .kb-dot,  .kb-c-noanswer  .kb-count { background: var(--grey); }
.kb-c-noanswer  .kb-card  { border-left-color: var(--grey); }
.kb-c-noanswer  .kb-card  .avatar { background: var(--grey-l); color: var(--grey); }
.kb-c-noanswer  .kb-progress .kp.on { background: var(--grey); }

/* Call Back Later = amber, the "active follow-up" stage */
.kb-c-callback  .kb-head { background: var(--amber-l); }
.kb-c-callback  .kb-dot,  .kb-c-callback  .kb-count { background: var(--amber); }
.kb-c-callback  .kb-card  { border-left-color: var(--amber); }
.kb-c-callback  .kb-card  .avatar { background: var(--amber-l); color: var(--amber); }
.kb-c-callback  .kb-progress .kp.on { background: var(--amber); }

/* Qualified = green */
.kb-c-qualified .kb-head { background: var(--green-l); }
.kb-c-qualified .kb-dot,  .kb-c-qualified .kb-count { background: var(--green); }
.kb-c-qualified .kb-card  { border-left-color: var(--green); }
.kb-c-qualified .kb-card  .avatar { background: var(--green-l); color: var(--green); }
.kb-c-qualified .kb-progress .kp.on { background: var(--green); }

/* Converted = teal (won, became an Opportunity) */
.kb-c-converted .kb-head { background: var(--teal-l); }
.kb-c-converted .kb-dot,  .kb-c-converted .kb-count { background: var(--teal); }
.kb-c-converted .kb-card  { border-left-color: var(--teal); }
.kb-c-converted .kb-card  .avatar { background: var(--teal-l); color: var(--teal); }
.kb-c-converted .kb-progress .kp.on { background: var(--teal); }

/* Dead = red (lost) */
.kb-c-dead      .kb-head { background: var(--red-l); }
.kb-c-dead      .kb-dot,  .kb-c-dead      .kb-count { background: var(--red); }
.kb-c-dead      .kb-card  { border-left-color: var(--red); }
.kb-c-dead      .kb-card  .avatar { background: var(--red-l); color: var(--red); }
.kb-c-dead      .kb-progress .kp.on { background: var(--red); }

/* ---- pipeline kanban: responsive ---------------------------------- */
@media (max-width: 760px) {
  .kanban { gap: 10px; padding-bottom: 12px; }
  .kb-col { flex: 0 0 78vw; width: 78vw; min-width: 78vw; }
  .kb-body { max-height: none; }
  .kb-card { padding: 12px; }
}

/* ---- per-column "+ New" ------------------------------------------ */
.kb-add {
  width: 24px; height: 24px; border: none; border-radius: 6px;
  background: var(--panel); color: var(--ink);
  font-size: 15px; line-height: 1; margin-left: 2px;
  display: inline-flex; align-items: center; justify-content: center;
}
.kb-add:hover { background: var(--accent-soft); color: var(--gold); }

/* ---- EspoCRM-style record detail side-panel ------------------------ */
.kb-detail-scrim {
  position: fixed; inset: 0;
  background: rgba(42, 36, 28, 0.32);
  z-index: 190;
}
.kb-detail {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 360px; max-width: 94vw;
  background: var(--panel);
  border-left: .5px solid var(--line-strong);
  box-shadow: -14px 0 38px rgba(42, 36, 28, 0.24);
  z-index: 200; overflow-y: auto;
  padding: 18px 18px 22px;
}
.kb-detail[hidden], .kb-detail-scrim[hidden] { display: none; }
.kb-detail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kb-detail-head .avatar { width: 34px; height: 34px; font-size: 13px; }
.kb-detail-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-detail-head .modal-x { margin-left: auto; }
.kb-detail-amount { font-size: 20px; font-weight: 700; color: var(--ink); margin: 10px 0 14px; letter-spacing: -0.01em; }
.kb-detail-fields { margin: 0; padding: 0; font-size: 12.5px; }
.kb-detail-fields .kd-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 8px 0; border-bottom: .5px solid var(--line);
}
.kb-detail-fields .kd-row:last-child { border-bottom: none; }
.kb-detail-fields .kd-row span { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; }
.kb-detail-fields .kd-row div { text-align: right; overflow-wrap: anywhere; }
.kb-detail-moves { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.kb-detail-moves .kb-mv { width: 34px; height: 34px; }
.kb-detail-moves .kb-move-hint { margin-left: auto; }
.kb-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

@media (max-width: 760px) {
  .kb-detail { width: 100%; max-width: none; }
}

/* ----------------------------------------------------------------- bars */

.bar-row { display: grid; grid-template-columns: 130px 1fr 84px; align-items: center; gap: 10px; margin: 9px 0; }
.bar-label { font-size: 12.5px; color: var(--text-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 5px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width .35s ease; }
.bar-fill.fill-teal { background: var(--teal); }
.bar-fill.fill-red { background: var(--red); }
.bar-val { font-size: 12px; text-align: right; color: var(--text-2); }

/* ranked leaderboard rows (oversight) */
.mini-row {
  display: grid; grid-template-columns: 24px 1fr 90px 60px;
  align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: .5px solid var(--line);
  font-size: 13px;
}
.mini-row:last-child { border-bottom: none; }
.mini-rank { color: var(--gold); font-weight: 600; font-size: 11px; }

/* outcome share list (oversight) */
.outcome-line { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin-bottom: 10px; }
.outcome-line:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------- feed */

.feed { display: flex; flex-direction: column; }
.feed-row {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: .5px solid var(--line); align-items: flex-start;
}
.feed-row:last-child { border-bottom: none; }
.feed-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.fi-teal  { background: var(--teal-l);  color: var(--teal); }
.fi-blue  { background: var(--blue-l);  color: var(--blue); }
.fi-coral { background: var(--coral-l); color: var(--coral); }
.fi-pink  { background: var(--pink-l);  color: var(--pink); }
.fi-amber { background: var(--amber-l); color: var(--amber); }
.fi-gold  { background: var(--accent-soft); color: var(--gold); }
.feed-body { flex: 1; min-width: 0; }
.feed-title { font-size: 13px; font-weight: 500; }
.feed-sub { font-size: 11px; color: var(--faint); }
.feed-time { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }

.mini-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.mini-list li { padding: 7px 0; border-bottom: .5px solid var(--line); }
.mini-list li:last-child { border-bottom: none; }

.quick-actions { display: flex; flex-direction: column; gap: 10px; }
.qa {
  display: block; background: var(--panel-2);
  border: .5px solid var(--line-strong); border-radius: 12px;
  padding: 12px 14px; color: var(--ink); font-weight: 600; font-size: 13.5px;
}
.qa:hover { text-decoration: none; background: var(--accent-soft); }
.qa span { font-weight: 400; font-size: 12px; color: var(--text-2); }

.present-grid { display: flex; flex-wrap: wrap; gap: 8px; }

/* --------------------------------------------------------------- dialer */

.call-card {
  max-width: 420px; margin: 0 auto 20px;
  background: var(--panel);
  border: .5px solid var(--line);
  border-radius: 16px;
  padding: 26px; text-align: center;
}
.call-tag {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--gold); background: var(--blue-l);
  border-radius: 20px; padding: 4px 12px; margin-bottom: 14px;
}
.call-name { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
.call-phone {
  display: block;
  background: var(--panel-2); border-radius: 10px;
  padding: 14px; font-size: 19px; font-weight: 600;
  letter-spacing: .02em; color: var(--ink); text-decoration: none;
}
.call-phone:hover { text-decoration: none; background: var(--accent-soft); }
.call-hint { font-size: 12px; color: var(--faint); margin-top: 10px; }

/* Linked-property strip on the dialer card */
.dial-prop {
  margin-top: 16px; padding: 12px 14px;
  background: var(--panel-2);
  border: .5px solid var(--line-strong);
  border-radius: 12px;
  text-align: left;
}
.dp-title {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint);
  margin-bottom: 4px;
}
.dp-name { font-size: 14px; font-weight: 600; }
.dp-line { font-size: 12px; color: var(--text-2); margin-top: 3px; }
.dp-status { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dp-unit { font-size: 11.5px; color: var(--text-2); }

.outcomes { max-width: 420px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.out-btn {
  border: none; border-radius: 12px;
  padding: 16px; font-size: 13px; font-weight: 600; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.out-btn:hover { filter: brightness(1.06); }
.out-btn:disabled { opacity: .55; cursor: default; filter: none; }
.out-btn .ic { font-size: 18px; line-height: 1; }
.out-btn.full { grid-column: 1 / -1; }
.os-teal  { background: var(--teal); }
.os-red   { background: var(--red); }
.os-grey  { background: var(--faint); }
.os-amber { background: var(--amber); }
.os-blue  { background: var(--blue); }

/* ------------------------------------------------------------- call screen */

.cs-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.cs-back {
  border: none; background: var(--panel); color: var(--ink);
  width: 38px; height: 38px; border-radius: 10px; font-size: 18px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.cs-back:hover { background: var(--panel-2); }
.cs-brand { display: flex; align-items: center; gap: 8px; }
.cs-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: #FAF7EF;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex: none;
}
.cs-agent { font-weight: 600; font-size: 14px; }
.cs-demo {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--gold); background: var(--accent-soft);
  border-radius: 20px; padding: 3px 8px;
}
.cs-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cs-counter { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.cs-counter span { font-weight: 700; color: var(--ink); }
.cs-progress {
  width: 90px; height: 6px; background: var(--panel-2);
  border-radius: 3px; overflow: hidden;
}
.cs-progress-fill {
  height: 100%; background: var(--gold);
  border-radius: 3px; transition: width .35s ease;
}
.cs-body { max-width: 460px; margin: 0 auto; }

.cs-phone-row { display: flex; align-items: center; gap: 8px; }
.cs-phone { flex: 1; text-align: center; margin-bottom: 0; }
.cs-phone-empty { background: var(--panel-2); color: var(--faint); cursor: default; }
.cs-copy {
  border: none; background: var(--panel-2); color: var(--ink);
  width: 46px; height: 46px; border-radius: 10px; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.cs-copy:hover { background: var(--accent-soft); color: var(--gold); }

.cs-note {
  width: 100%; border: .5px solid var(--line-strong); border-radius: 10px;
  padding: 12px; font-family: inherit; font-size: 13px; color: var(--ink);
  resize: vertical; min-height: 70px; margin-top: 16px; outline: none;
}
.cs-note:focus { border-color: var(--gold); }
.cs-submit { width: 100%; margin-top: 14px; }

.out-btn.selected {
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px var(--accent-soft);
  filter: brightness(1.08);
}

/* empty / error state card */
.cs-state { text-align: center; padding: 36px 26px; }
.cs-state-ic { font-size: 40px; margin-bottom: 14px; }
.cs-state-title { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.cs-state-sub { color: var(--text-2); font-size: 13px; margin: 0 0 18px; }

/* skeleton loader + staggered shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--panel-2) 25%, var(--line) 50%, var(--panel-2) 75%);
  background-size: 200% 100%; border-radius: 8px;
  animation: cs-sheen 1.1s ease-in-out infinite;
}
@keyframes cs-sheen { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-chip { width: 90px; height: 22px; margin: 0 auto 14px; }
.sk-title { width: 60%; height: 22px; margin: 0 auto 18px; }
.sk-phone { height: 52px; margin-bottom: 16px; }
.sk-btn { height: 52px; }
.sk-full { grid-column: 1 / -1; }
.sk-note { height: 70px; margin-top: 16px; }
.sk-submit { height: 46px; margin-top: 14px; }

@media (max-width: 760px) {
  .cs-topbar { gap: 8px; }
  .cs-progress { width: 60px; }
}
/* ----------------------------------------------------------- attendance */

.att-status {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel);
  border: .5px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px; margin-bottom: 16px;
}
.att-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.att-dot.off { background: var(--faint); }
.att-main { font-weight: 600; font-size: 14px; }
.att-sub { font-size: 12px; color: var(--faint); }
.att-status .btn { margin-left: auto; }
.att-time { margin-left: auto; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.att-status .btn ~ .att-time,
.att-status .att-time ~ .btn { margin-left: 0; }

.leave-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: .5px solid var(--line);
}
.leave-row:last-child { border-bottom: none; }
.leave-dates { font-size: 13px; font-weight: 500; }
.leave-reason { font-size: 11px; color: var(--faint); }

/* ---------------------------------------------------------- forms/login */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field-wide { grid-column: 1 / -1; }
.field span { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--faint); }
.field input, .field textarea {
  background: var(--bg);
  border: .5px solid var(--line-strong);
  border-radius: 9px; padding: 10px 12px; outline: none;
  resize: vertical; width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.form-grid .btn { justify-self: start; }
.check-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }

.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 20%, rgba(51, 64, 158, 0.06), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(51, 64, 158, 0.05), transparent 45%),
    var(--bg);
}
.login-card {
  width: 380px; max-width: 100%;
  background: var(--panel);
  border: .5px solid var(--line);
  border-radius: 18px;
  padding: 36px 32px;
  text-align: center;
}
.login-mark {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold); color: #FAF7EF;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  margin: 0 auto 16px;
}
.login-title { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
.login-sub { font-size: 13px; color: var(--faint); margin: 0 0 26px; }
.login-field { text-align: left; margin-bottom: 14px; }
.login-field label {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 6px;
}
.login-field input {
  width: 100%;
  border: .5px solid var(--line-strong); background: var(--bg);
  border-radius: 9px; padding: 10px 12px; font-size: 13px; color: var(--ink);
  outline: none;
}
.login-field input:focus { border-color: var(--gold); }
.login-submit {
  width: 100%; background: var(--gold); color: #fff;
  border: none; border-radius: 10px;
  padding: 12px; font-size: 13px; font-weight: 600;
}
.login-submit:hover { filter: brightness(1.08); }
.login-submit:disabled { opacity: .55; }
.login-error {
  background: var(--red-l); color: var(--red);
  border-radius: 9px; padding: 9px 12px;
  font-size: 12.5px; margin-bottom: 12px; text-align: left;
}
.login-note { font-size: 11px; color: var(--faint); margin: 16px 0 0; }
.demo-strip { margin-top: 18px; padding-top: 16px; border-top: .5px solid var(--line); text-align: center; }
.demo-strip-label {
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); font-weight: 700;
}
.demo-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0 6px; }
.demo-chips .chip { border: none; cursor: pointer; }

/* --------------------------------------------------------------- toasts */

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; }
.toast {
  background: rgba(42, 36, 28, 0.92); color: #FAF7EF;
  padding: 11px 16px; border-radius: 11px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(8px);
  transition: all .3s ease;
  max-width: 360px; text-align: center;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-err { background: var(--red); color: #fff; }
.toast-warn { background: var(--amber); color: #fff; }

/* -------------------------------------------------------------- modals */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(42, 36, 28, 0.38);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal {
  background: var(--panel);
  border: .5px solid var(--line-strong);
  border-radius: 16px;
  padding: 22px;
  width: 580px; max-width: 100%;
  max-height: 90vh; overflow: auto;
  box-shadow: 0 22px 60px rgba(42, 36, 28, 0.30);
}
.modal-sm { width: 380px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head strong { font-size: 15px; }
.modal-x { background: none; border: none; font-size: 22px; line-height: 1; color: var(--text-2); cursor: pointer; }

.cb-group { display: flex; flex-wrap: wrap; gap: 8px; }
.cb {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text);
  background: var(--bg); border: .5px solid var(--line-strong);
  border-radius: 8px; padding: 6px 10px; cursor: pointer;
}
.cb:hover { border-color: var(--gold); }
.cb input { accent-color: var(--gold); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .cols-2, .grid2 { grid-template-columns: 1fr; }
}

/* Phones & tablets in portrait: sidebar becomes a slide-in drawer, tables
   scroll horizontally, and the shell stacks for a thumb-friendly layout. */
@media (max-width: 760px) {
  html, body { -webkit-tap-highlight-color: transparent; }
  button, a, .chip, .cb, .seg-btn { touch-action: manipulation; }

  /* ---- shell / nav drawer ------------------------------------------- */
  .shell { display: block; min-height: 100vh; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 258px; max-width: 84vw;
    height: 100vh; height: 100dvh;
    z-index: 130;
    padding: 18px 14px 24px;
    transform: translateX(-106%);
    transition: transform .28s ease;
    border-right: .5px solid var(--line-strong);
    box-shadow: 12px 0 34px rgba(42, 36, 28, 0.16);
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .scrim { display: block; opacity: 1; pointer-events: auto; }
  .menu-toggle { display: inline-flex; }
  /* labels are useful again now that the drawer is full-width */
  .sb-name, .sb-group, .sidebar-foot { display: block; }
  .sb-item { justify-content: flex-start; padding: 11px 12px; }
  .sb-item span:last-child { display: inline; }
  .sb-brand { padding: 0 6px 18px; }

  /* ---- main / topbar ------------------------------------------------ */
  .main { padding: 12px 14px 46px; padding-bottom: calc(46px + env(safe-area-inset-bottom)); }
  .topbar { flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
  .search { order: 3; flex: 1 1 100%; max-width: none; padding: 8px 12px; }
  .top-right { margin-left: auto; }
  .acct-meta { display: none; }
  #account-chip { padding: 4px; }

  /* ---- headings ------------------------------------------------------ */
  .page-head { flex-wrap: wrap; gap: 12px 14px; margin-bottom: 18px; align-items: flex-start; }
  .page-title { font-size: 20px; }
  .page-sub { font-size: 13px; }

  /* ---- grids / KPI tiles -------------------------------------------- */
  .kpi { padding: 14px 16px; border-radius: 12px; }
  .kpi-value { font-size: 24px; }
  .kpi-label { margin-bottom: 8px; }
  .kpi-sub { font-size: 11.5px; }

  /* ---- panels / cards (scrollable so wide tables swipe) ------------- */
  .panel, .card { padding: 16px; border-radius: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .panel-title { font-size: 13.5px; }
  .panel-sub { margin-bottom: 14px; }

  /* ---- tables: keep columns readable, swipe for the rest ------------- */
  .tbl, .otable { width: max-content; min-width: 100%; }
  .tbl th, .tbl td, .otable th, .otable td { white-space: nowrap; }
  .toolbar { gap: 8px; }
  .toolbar input[type="text"] { min-width: 100%; flex: 1 1 100%; }

  /* ---- charts -------------------------------------------------------- */
  .vchart { height: 150px; }
  .vlabel { display: none; }
  .vnum { font-size: 8.5px; }

  /* ---- dialer -------------------------------------------------------- */
  .call-card { padding: 20px 16px; margin-bottom: 14px; }
  .outcomes { grid-template-columns: 1fr; }
  .out-btn.full { grid-column: auto; }
  .out-btn { padding: 14px; min-height: 54px; }

  /* ---- attendance ----------------------------------------------------- */
  .att-status { flex-wrap: wrap; gap: 12px 14px; padding: 16px; }
  .att-time { margin-left: auto; }
  .att-status .btn { flex: 1 1 100%; margin-left: 0; order: 5; }

  /* ---- bars / leaderboards -------------------------------------------- */
  .bar-row { grid-template-columns: 1fr 74px; gap: 4px 10px; }
  .bar-label { grid-column: 1 / -1; white-space: normal; }
  .mini-row { grid-template-columns: 22px 1fr auto auto; gap: 8px; }
  .feed-time { margin-left: auto; }

  /* ---- forms / modals --------------------------------------------------- */
  .form-grid { grid-template-columns: 1fr; }
  .field input, .field textarea, .toolbar select,
  .search input, .login-field input { font-size: 16px; } /* avoids iOS auto-zoom on focus */
  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal { padding: 18px 16px; border-radius: 16px 16px 12px 12px; max-height: 94vh; }
  .modal-head strong { font-size: 14px; }
  .modal .row { flex-wrap: wrap; }
  .cb { padding: 8px 10px; }
  .field-wide .row { justify-content: flex-end; }

  /* ---- toasts ----------------------------------------------------------- */
  #toasts { left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast { max-width: none; text-align: center; }

  /* ---- login ------------------------------------------------------------- */
  .login-screen { padding: 12px; min-height: 100dvh; }
  .login-card { padding: 26px 20px; border-radius: 14px; }

  /* ---- misc touch targets ------------------------------------------------- */
  .seg-btn { padding: 8px 12px; }
  .chip { padding: 6px 12px; }
  .btn.sm { min-height: 36px; }
}

/* ------------------------------------------------------------ analytics */

.vchart {
  display: flex; align-items: stretch; gap: 4px;
  height: 180px; padding-top: 14px;
}
.vcol {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; gap: 4px;
}
.vnum { font-size: 9.5px; color: var(--text-2); }
.vbar {
  width: 72%; background: var(--gold);
  border-radius: 3px 3px 0 0; min-height: 2px;
}
.vbar.alt { background: var(--blue); }
.vlabel { font-size: 9.5px; color: var(--faint); white-space: nowrap; }

.funnel-note { font-size: 11.5px; color: var(--faint); margin-top: 12px; }

.cs-greet {
  padding: 20px 20px 8px;
  text-align: center;
}
.cs-greet h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.cs-queue-ind {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  padding: 4px 20px 16px;
}

.cs-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 20px;
}
.cs-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 12px;
  padding: 18px 12px;
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--panel-2);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cs-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  border-color: var(--gold);
}
.cs-box:active { transform: scale(.98); }
.cs-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.cs-box-icon { font-size: 16px; }
.cs-box-title { font-weight: 500; }
.cs-box-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.cs-box.k-coral { border-left: 4px solid var(--coral); }
.cs-box.k-blue { border-left: 4px solid var(--blue); }
.cs-box.k-teal { border-left: 4px solid var(--teal); }
.cs-box.k-pink { border-left: 4px solid var(--pink); }

.cs-goal-label {
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  padding: 12px 20px 4px;
}

.cs-source-chart {
  margin: 16px 20px 20px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-2);
  border-radius: 12px;
}
.cs-source-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.cs-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.cs-source-name {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-source-bar {
  flex: 1;
  height: 6px;
  background: var(--panel-2);
  border-radius: 3px;
  overflow: hidden;
}
.cs-source-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width .4s ease;
}
.cs-source-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  width: 24px;
  text-align: right;
}

.cs-leads-btn {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px 24px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  background: var(--gold);
  color: #fff;
  border: none;
  cursor: pointer;
}
.cs-leads-btn:hover { filter: brightness(1.08); }

.cs-list-title {
  font-size: 18px;
  font-weight: 600;
  margin: 16px 20px 12px;
  color: var(--ink);
}
.cs-list-container { padding: 0 20px; }
.cs-bucket-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 14px 8px 6px;
}

.cs-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease;
  animation: fadeSlideIn .35s ease both;
}
.cs-list-row:hover { background: var(--panel); }
.cs-list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.cs-list-info { flex: 1; min-width: 0; }
.cs-list-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-list-time {
  font-size: 11px;
  color: var(--faint);
  margin-top: 2px;
}
.cs-list-phone {
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.cs-chevron { font-size: 18px; color: var(--faint); padding: 0 4px; }

.skeleton-row .cs-list-avatar { background: var(--panel-2); }
.skeleton-row .cs-list-name { background: var(--panel-2); height: 14px; border-radius: 3px; }
.skeleton-row .cs-list-time { background: var(--panel-2); height: 11px; border-radius: 3px; width: 60px; }
.skeleton-row .cs-list-phone { background: var(--panel-2); height: 12px; border-radius: 3px; width: 80px; }
.skeleton-row .cs-chevron { background: var(--panel-2); height: 14px; width: 10px; border-radius: 3px; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
