.topbar{
  position:sticky;
  top:0;
  z-index:40;
  border-bottom:1px solid rgba(221,229,240,.72);
  background:rgba(255,255,255,.78);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}

.topbarIn{
  max-width:1440px;
  margin:0 auto;
  padding:16px 22px;
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) minmax(320px, 1fr) auto;
  gap:16px;
  align-items:center;
}

.topbarLeft,
.topbarCenter,
.topbarRight{
  min-width:0;
}

.topbarLeft{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.topbarCenter{
  min-width:0;
}

.topbarRight{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

.topbarMobileSearch{
  display:none;
  max-width:1440px;
  margin:0 auto;
  padding:0 22px 14px;
}

.mobileOnly{
  display:none;
}

.visuallyHidden{
  position:absolute !important;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}

.iconBtn{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:linear-gradient(180deg, #ffffff, #f8fbff);
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
  cursor:pointer;
  color:var(--text);
  transition:all .18s ease;
  flex-shrink:0;
}

.iconBtn:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-md);
  background:#ffffff;
}

.brand{
  display:flex;
  gap:14px;
  align-items:center;
  min-width:0;
  flex:1;
}

.logo{
  width:46px;
  height:46px;
  border-radius:16px;
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:19px;
  color:#ffffff;
  background:
    linear-gradient(135deg, #2563eb 0%, #0ea5e9 52%, #0f9d58 100%);
  box-shadow:
    0 10px 24px rgba(37,99,235,.22),
    inset 0 1px 0 rgba(255,255,255,.25);
  flex-shrink:0;
}

.titleWrap{
  min-width:0;
}

.titleWrap .title{
  font-weight:800;
  letter-spacing:-.03em;
  font-size:20px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.titleWrap .subtitle{
  color:var(--muted);
  font-size:13px;
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.search{
  display:flex;
  gap:10px;
  align-items:center;
  min-height:50px;
  padding:0 16px;
  border-radius:18px;
  background:rgba(255,255,255,.95);
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
  min-width:0;
  width:100%;
}

.search span{
  color:var(--muted-2);
  flex-shrink:0;
}

.search input{
  flex:1;
  background:transparent;
  border:0;
  outline:none;
  font-size:14px;
  color:var(--text);
  min-width:0;
}

.topActions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-shrink:0;
  justify-content:flex-end;
}

.avatar{
  width:44px;
  height:44px;
  border-radius:16px;
  display:grid;
  place-items:center;
  font-weight:700;
  color:#1d4ed8;
  background:linear-gradient(180deg, #ffffff, #f5f9ff);
  border:1px solid var(--line);
  box-shadow:var(--shadow-sm);
  flex-shrink:0;
}

.selectSlim,
.field input,
.field select,
.field textarea,
.filterField input,
.filterField select{
  min-height:44px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:0 12px;
  background:rgba(255,255,255,.96);
  color:var(--text);
  font:inherit;
  outline:none;
  box-shadow:none;
  width:100%;
  min-width:0;
}

.field textarea{
  min-height:110px;
  padding:12px;
  resize:vertical;
}

.selectSlim:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.filterField input:focus,
.filterField select:focus,
.search input:focus{
  border-color:#8ab4f8;
  box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

.app{
  max-width:1440px;
  margin:0 auto;
  padding:24px 22px 36px;
  display:grid;
  grid-template-columns:290px minmax(0,1fr);
  gap:24px;
}

.sidenav{
  position:sticky;
  top:92px;
  align-self:start;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,252,255,.96));
  border:1px solid var(--line);
  border-radius:26px;
  padding:18px;
  box-shadow:var(--shadow-md);
}

.main{
  min-width:0;
}

.navSection{
  margin-bottom:8px;
}

.navLabel{
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted-2);
  padding:10px 12px;
}

.navItem{
  padding:13px 14px;
  border-radius:16px;
  display:flex;
  align-items:center;
  gap:12px;
  cursor:pointer;
  color:#243041;
  transition:all .16s ease;
}

.navItem:hover{
  background:#f7faff;
  transform:translateX(1px);
}

.navItem.active{
  background:linear-gradient(180deg, #eef5ff, #e8f1ff);
  border:1px solid #d4e3ff;
  color:#1d4ed8;
  font-weight:700;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}

.navDot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#b0b7c3;
  flex-shrink:0;
}

.navItem.active .navDot{
  background:var(--accent);
  box-shadow:0 0 0 6px rgba(37,99,235,.08);
}

.navMeta{
  margin-left:auto;
  font-size:12px;
  color:var(--muted);
}

.drawer{
  position:fixed;
  top:0;
  left:0;
  width:320px;
  max-width:88vw;
  height:100vh;
  background:rgba(255,255,255,.98);
  border-right:1px solid var(--line);
  transform:translateX(-110%);
  transition:.22s ease;
  z-index:80;
  padding:18px;
  box-shadow:var(--shadow-lg);
  overflow:auto;
}

.drawer.open{
  transform:translateX(0);
}

.backdrop{
  position:fixed;
  inset:0;
  background:rgba(18,31,53,.18);
  opacity:0;
  pointer-events:none;
  transition:.2s ease;
  z-index:70;
}

.backdrop.show{
  opacity:1;
  pointer-events:auto;
}

.crumbs{
  color:var(--muted);
  font-size:13px;
  margin-bottom:12px;
}

.sep{
  margin:0 6px;
  color:var(--muted-2);
}

.pageHead{
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
  align-items:flex-start;
}

.pageHeadContent{
  min-width:0;
}

.pageHeadActions{
  flex-shrink:0;
  justify-content:flex-end;
}

.pageHead h1{
  margin:0;
  font-size:48px;
  line-height:1.02;
  letter-spacing:-.055em;
  font-weight:800;
}

.pageHead p{
  margin:10px 0 0;
  color:#5f6b7a;
  max-width:860px;
  font-size:15px;
}

.card{
  background:
    linear-gradient(180deg, rgba(255,255,255,.985), rgba(251,252,255,.97));
  border:1px solid rgba(221,229,240,.95);
  border-radius:26px;
  box-shadow:var(--shadow-md);
  overflow:hidden;
}

.heroPanel{
  position:relative;
}

.heroPanel::after{
  content:"";
  position:absolute;
  inset:auto -10% -35% auto;
  width:280px;
  height:280px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(37,99,235,.08) 0%, rgba(14,165,233,.04) 42%, transparent 70%);
  pointer-events:none;
}

.cardHead{
  padding:20px 22px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--line-2);
}

.cardHeadResponsive{
  flex-wrap:wrap;
}

.cardBody{
  padding:22px;
}

.cardHead h2,
.cardHead h3,
.drawerSection h4{
  margin:0;
  letter-spacing:-.03em;
  font-size:18px;
}

.hint{
  color:var(--muted);
  font-size:13px;
  margin-top:6px;
}

.btn{
  min-height:44px;
  border-radius:14px;
  padding:0 16px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, #ffffff, #f8fbff);
  font-weight:600;
  color:#1f2937;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
  white-space:nowrap;
  transition:all .18s ease;
}

.btn:hover{
  background:#ffffff;
  box-shadow:var(--shadow-md);
  transform:translateY(-1px);
}

.btnPrimary{
  background:linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #0ea5e9 100%);
  border-color:#1d4ed8;
  color:#fff;
  box-shadow:
    0 14px 30px rgba(37,99,235,.22),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.btnPrimary:hover{
  background:linear-gradient(135deg, #1f5ae0 0%, #1b47c7 55%, #0891d8 100%);
}

.btnGhost{
  background:#f8fbff;
}

.kpiGrid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
  margin-bottom:16px;
}

.kpiCard{
  padding:22px 22px 20px;
  min-height:148px;
  position:relative;
  background:
    radial-gradient(120px 60px at 0% 0%, rgba(37,99,235,.10), transparent 60%),
    linear-gradient(180deg, #ffffff, #fbfdff);
}

.kpiCard::before{
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:100%;
  height:4px;
  opacity:.95;
}

.kpiCardCaptured::before{
  background:linear-gradient(90deg, #2563eb, #0ea5e9);
}

.kpiCardOpen::before{
  background:linear-gradient(90deg, #0f9d58, #34d399);
}

.kpiCardClosed::before{
  background:linear-gradient(90deg, #7c3aed, #a78bfa);
}

.kpiCardContacts::before{
  background:linear-gradient(90deg, #f59e0b, #fbbf24);
}

.kpiLabel,
.miniKpiLabel{
  color:var(--muted-2);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.16em;
}

.kpiValue{
  font-size:50px;
  line-height:1;
  font-weight:800;
  letter-spacing:-.065em;
  margin-top:18px;
  color:#0f1728;
}

.kpiMeta{
  margin-top:12px;
  font-size:13px;
  color:#667085;
  line-height:1.45;
}

.miniKpiGrid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
  margin-bottom:20px;
}

.miniKpi{
  padding:18px 20px;
  min-height:98px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.96));
}

.miniKpiValue{
  font-size:32px;
  font-weight:800;
  margin-top:12px;
  letter-spacing:-.05em;
}

.pipeline{
  display:grid;
  grid-template-columns:repeat(11, minmax(0, 1fr));
  align-items:center;
  gap:8px;
  padding:22px;
}

.stage{
  padding:16px 14px;
  min-height:88px;
  border:1px solid var(--line);
  border-radius:18px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  font-weight:600;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
}

.stage small{
  color:var(--muted);
  display:block;
  margin-top:10px;
  font-size:22px;
  font-weight:800;
}

.arrow{
  color:#a5afbe;
  text-align:center;
  font-size:20px;
  font-weight:700;
}

.filterBar{
  display:grid;
  gap:12px;
  margin-bottom:14px;
  align-items:end;
}

.filterBarLeads{
  grid-template-columns:repeat(5, minmax(0, 1fr));
}

.filterBarTimeline{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.filterField{
  display:grid;
  gap:6px;
  min-width:0;
}

.filterField span{
  font-size:12px;
  font-weight:600;
  color:var(--muted-2);
  letter-spacing:.02em;
}

.activeFilters{
  margin-bottom:14px;
  padding:11px 13px;
  border-radius:14px;
  background:linear-gradient(180deg, #f7fbff, #f3f8ff);
  border:1px dashed #d3e2fb;
  color:#445266;
  font-size:13px;
}

.tableWrap{
  overflow:auto;
  border-radius:20px;
  border:1px solid var(--line);
  background:var(--surface);
  max-height:420px;
}

.tableWrapLeads{
  max-height:500px;
  overflow-y:auto;
  overflow-x:auto;
}

.tableWrapLeads thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#fcfdff;
}

.tableWrap thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#fcfdff;
}

table{
  width:100%;
  border-collapse:collapse;
  min-width:1040px;
}

th,td{
  padding:15px 16px;
  border-bottom:1px solid var(--line-2);
  text-align:left;
  vertical-align:top;
}

th{
  color:#667085;
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  font-weight:700;
  background:#fcfdff;
}

.leadRow,
.campaignRow{
  cursor:pointer;
  transition:background .15s ease;
}

.leadRow:hover,
.campaignRow:hover{
  background:#f7fbff;
}

.leadName{
  font-weight:700;
  color:#18202f;
}

.leadSub,
.nba{
  color:#5f6b7a;
}

.small{
  font-size:12px;
}

.muted{
  color:var(--muted);
}

.tag{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:4px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--surface);
  font-weight:600;
}

.tag.good{
  color:var(--success);
  border-color:#bfe3ce;
  background:var(--success-soft);
}

.tag.warn{
  color:var(--warn);
  border-color:#f1ddb0;
  background:var(--warn-soft);
}

.tag.bad{
  color:var(--danger);
  border-color:#f1c2bb;
  background:var(--danger-soft);
}

.tag.temperatureHot{
  color:#dc2626;
  border-color:#fecaca;
  background:#fff1f2;
}

.tag.temperatureWarm{
  color:#d97706;
  border-color:#fde68a;
  background:#fffbeb;
}

.tag.temperatureCold{
  color:#2563eb;
  border-color:#bfdbfe;
  background:#eff6ff;
}

.twoCol{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.logItem{
  display:grid;
  grid-template-columns:minmax(160px, 220px) minmax(0,1fr) auto;
  align-items:start;
  gap:12px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
}

.logItem .t{
  color:var(--muted);
  white-space:nowrap;
  align-self:start;
  padding-top:2px;
}

.logMain{
  min-width:0;
}

.logMain b{
  display:block;
  line-height:1.35;
  word-break:break-word;
}

.logMeta{
  min-width:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.logScroll{
  max-height:360px;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:6px;
}

.logScroll::-webkit-scrollbar{
  width:6px;
}

.logScroll::-webkit-scrollbar-thumb{
  background:#cfd6e4;
  border-radius:4px;
}

.logScroll::-webkit-scrollbar-thumb:hover{
  background:#b5bfd3;
}

.timelineItem{
  display:grid;
  grid-template-columns:110px 1fr;
  gap:14px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  position:relative;
}

.timelineItem::before{
  content:"";
  position:absolute;
  left:0;
  top:14px;
  bottom:14px;
  width:4px;
  border-radius:999px;
  background:linear-gradient(180deg, #2563eb, #0ea5e9);
}

.timelineItem.timelineWa::before{
  background:linear-gradient(180deg, #0f9d58, #34d399);
}

.timelineItem.timelineCall::before{
  background:linear-gradient(180deg, #7c3aed, #a78bfa);
}

.timelineItem.timelineAppointment::before{
  background:linear-gradient(180deg, #2563eb, #60a5fa);
}

.timelineItem.timelineOperator::before{
  background:linear-gradient(180deg, #f59e0b, #fbbf24);
}

.timelineTime{
  font-weight:700;
  color:var(--muted);
  padding-left:8px;
}

.timelineMain{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.timelineType{
  font-weight:700;
  color:#142033;
}

.timelineMeta{
  color:var(--muted);
  font-size:13px;
}

.timelineChip{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  width:max-content;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
}

.timelineChip.wa{
  background:#e9fbf3;
  color:#0c8a5b;
}

.timelineChip.call{
  background:#f4efff;
  color:#6d28d9;
}

.timelineChip.appointment{
  background:#eaf2ff;
  color:#2563eb;
}

.timelineChip.operator{
  background:#fff4df;
  color:#d97706;
}

.timelineChip.system{
  background:#eef2f7;
  color:#475569;
}

.chips{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:var(--surface);
  border:1px solid var(--line);
  font-weight:600;
  font-size:12px;
}

.chipDot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#b0b7c3;
}

.chip.good .chipDot{
  background:var(--success);
}

.chip.bad .chipDot{
  background:var(--danger);
}

.operatorActionGrid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:14px;
  margin-bottom:14px;
}

.actionTile{
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius:20px;
  padding:18px 16px;
  text-align:left;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.actionTile:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
  border-color:#cfe0ff;
  background:#ffffff;
}

.actionTile:nth-child(1){
  background:linear-gradient(180deg, #ffffff, #f1f8ff);
}
.actionTile:nth-child(2){
  background:linear-gradient(180deg, #ffffff, #f7f2ff);
}
.actionTile:nth-child(3){
  background:linear-gradient(180deg, #ffffff, #eef4ff);
}
.actionTile:nth-child(4){
  background:linear-gradient(180deg, #ffffff, #eefbfd);
}
.actionTile:nth-child(5){
  background:linear-gradient(180deg, #ffffff, #eefaf3);
}

.actionTilePrimary {
  background: linear-gradient(180deg, #eef6ff 0%, #e1efff 100%);
  border: 1px solid #b7d3ff;
  box-shadow: 0 8px 20px rgba(32, 94, 220, 0.10);
}

.actionTilePrimary .actionTileTitle {
  color: #123a86;
}

.actionTilePrimary .actionTileMeta {
  color: #3d5f9a;
}

.leadDrawer{
  position:fixed;
  top:0;
  right:0;
  width:min(760px, 100vw);
  height:100vh;
  background:rgba(252,254,255,.98);
  border-left:1px solid var(--line);
  transform:translateX(110%);
  transition:.22s ease;
  z-index:90;
  display:flex;
  flex-direction:column;
  box-shadow:var(--shadow-lg);
}

.leadDrawer.open{
  transform:translateX(0);
}

.leadDrawerHead{
  padding:20px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid var(--line-2);
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.08), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,251,255,.96));
}

.leadDrawerTitleWrap{
  display:grid;
  gap:8px;
  min-width:0;
}

.eyebrow{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.16em;
  color:var(--muted-2);
  font-weight:700;
}

.leadDrawerMetaRow{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}

.leadTemperature{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:4px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid var(--line);
  background:#fff;
}

.leadTemperature.hot{
  color:#dc2626;
  border-color:#fecaca;
  background:#fff1f2;
}

.leadTemperature.warm{
  color:#d97706;
  border-color:#fde68a;
  background:#fffbeb;
}

.leadTemperature.cold{
  color:#2563eb;
  border-color:#bfdbfe;
  background:#eff6ff;
}

.leadDrawerBody{
  padding:20px;
  overflow:auto;
  display:grid;
  gap:20px;
}

.drawerGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.drawerSection{
  display:grid;
  gap:12px;
}

.drawerSectionHero{
  gap:14px;
}

.drawerSectionHead{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.nbaCard{
  border:1px solid #dce8ff;
  border-radius:22px;
  padding:18px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 36%),
    linear-gradient(180deg, #ffffff, #f5f9ff);
  box-shadow:var(--shadow-sm);
}

.nbaTopRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.nbaAction{
  font-size:20px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:-.03em;
  color:#10213a;
}

.nbaConfidence{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:4px 10px;
  border-radius:999px;
  background:#eaf2ff;
  color:#1d4ed8;
  font-weight:700;
  font-size:12px;
  white-space:nowrap;
}

.nbaReason{
  margin-top:10px;
  color:#58677a;
  font-size:14px;
  line-height:1.55;
}

.nbaActions{
  margin-top:14px;
}

.insightGrid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.insightCard{
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  background:linear-gradient(180deg, #ffffff, #fbfdff);
  min-height:78px;
  display:grid;
  gap:8px;
}

.journeyRail{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.journeyStep{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:600;
  color:#334155;
}

.journeyStep.active{
  color:#1d4ed8;
  border-color:#cfe0ff;
  background:linear-gradient(180deg, #eef5ff, #e8f1ff);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}

.journeyArrow{
  color:#94a3b8;
  font-weight:700;
}

.emptyMini{
  color:var(--muted);
  padding:10px 0;
  font-size:13px;
}

.modal{
  position:fixed;
  inset:0;
  background:rgba(20,33,52,.18);
  display:none;
  place-items:center;
  z-index:100;
  padding:12px;
}

.modal.show{
  display:grid;
}

.modalCard{
  width:min(540px, calc(100vw - 24px));
  background:#fff;
  border:1px solid var(--line);
  border-radius:26px;
  box-shadow:var(--shadow-lg);
  overflow:hidden;
  max-height:calc(100vh - 24px);
  display:flex;
  flex-direction:column;
}

.modalWide{
  width:min(820px, calc(100vw - 24px));
}

.modalHead,
.modalFoot{
  padding:18px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-shrink:0;
}

.modalBody{
  padding:0 20px 20px;
  display:grid;
  gap:14px;
  overflow:auto;
}

.twoColForm{
  grid-template-columns:1fr 1fr;
}

.field{
  display:grid;
  gap:8px;
}

.field span{
  font-size:12px;
  color:var(--muted-2);
  text-transform:uppercase;
  letter-spacing:.12em;
  font-weight:600;
}

.field.fullWidth{
  grid-column:1 / -1;
}

.toast{
  position:fixed;
  right:18px;
  bottom:18px;
  width:min(380px, calc(100vw - 24px));
  padding:14px 16px;
  border-radius:18px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.98);
  box-shadow:var(--shadow-lg);
  opacity:0;
  pointer-events:none;
  transform:translateY(8px);
  transition:.18s ease;
  z-index:110;
}

.toast.show{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

.toastTitle{
  font-weight:700;
}

.toastMsg{
  color:var(--muted);
  margin-top:4px;
}

.spacer{
  height:18px;
}

.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

@media (max-width: 1360px){
  .topbarIn{
    grid-template-columns:minmax(0, 1fr) minmax(260px, .9fr) auto;
  }

  .operatorActionGrid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  .filterBarLeads{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1120px){
  .kpiGrid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .miniKpiGrid{
    grid-template-columns:1fr;
  }

  .twoCol{
    grid-template-columns:1fr;
  }

  .pipeline{
    grid-template-columns:repeat(6, minmax(0,1fr));
  }

  .arrow{
    display:none;
  }

  .operatorActionGrid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .topbarIn{
    grid-template-columns:minmax(0, 1fr) auto;
  }

  .topbarCenter{
    display:none;
  }

  .topbarMobileSearch{
    display:block;
  }
}

@media (max-width: 980px){
  .app{
    grid-template-columns:1fr;
  }

  .sidenav{
    display:none;
  }

  .mobileOnly{
    display:grid;
  }

  .pageHead{
    flex-direction:column;
    align-items:flex-start;
  }

  .pageHead h1{
    font-size:36px;
  }

  .pageHeadActions{
    width:100%;
    justify-content:flex-start;
  }

  .cardHeadResponsive{
    flex-direction:column;
    align-items:flex-start;
  }

  .filterBar,
  .filterBarLeads,
  .filterBarTimeline,
  .drawerGrid,
  .twoColForm,
  .operatorActionGrid,
  .insightGrid{
    grid-template-columns:1fr;
  }

  .logScroll{
    max-height:340px;
  }

  .modalWide{
    width:min(96vw, calc(100vw - 24px));
  }

  .journeyRail{
    align-items:flex-start;
  }

  .journeyArrow{
    display:none;
  }

  .leadDrawer{
    width:min(100vw, 100vw);
  }
}

@media (max-width: 768px){
  .topbarIn{
    padding:14px 16px;
    grid-template-columns:minmax(0, 1fr) auto;
    gap:12px;
  }

  .topbarMobileSearch{
    padding:0 16px 14px;
  }

  .titleWrap .title{
    font-size:18px;
  }

  .titleWrap .subtitle{
    font-size:12px;
  }

  .topActions{
    gap:8px;
  }

  .topActions .selectSlim{
    min-width:0;
    max-width:146px;
  }

  .pageHead h1{
    font-size:32px;
  }

  .pageHead p{
    font-size:14px;
  }
}

@media (max-width: 640px){
  .app{
    padding:18px 16px 28px;
  }

  .crumbs{
    display:none;
  }

  .brand{
    gap:10px;
  }

  .logo{
    width:40px;
    height:40px;
    border-radius:14px;
    font-size:17px;
  }

  .titleWrap .title{
    font-size:17px;
  }

  .titleWrap .subtitle{
    display:none;
  }

  .topActions{
    gap:8px;
  }

  .topActions .btn{
    min-width:auto;
    padding:0 14px;
  }

  .topActions .selectSlim{
    max-width:132px;
    font-size:13px;
  }

  .avatar{
    width:40px;
    height:40px;
    border-radius:14px;
    font-size:13px;
  }

  .kpiGrid{
    grid-template-columns:1fr;
  }

  .cardHead,
  .cardBody,
  .modalHead,
  .modalFoot{
    padding-left:16px;
    padding-right:16px;
  }

  .modalBody{
    padding:0 16px 16px;
  }

  .leadDrawer{
    width:100vw;
  }

  .leadDrawerHead,
  .leadDrawerBody{
    padding:16px;
  }

  .timelineItem{
    grid-template-columns:1fr;
  }

  .timelineTime{
    padding-left:0;
  }

  .nbaTopRow{
    flex-direction:column;
    align-items:flex-start;
  }

  .tableWrapLeads{
    max-height:470px;
  }

  .btn,
  .btnPrimary,
  .btnGhost{
    width:100%;
    justify-content:center;
  }

  .pageHeadActions .btn,
  .row .btn,
  .nbaActions .btn,
  .modalFoot .btn,
  .cardHead .btn{
    width:100%;
  }

  .operatorActionGrid .actionTile{
    min-height:92px;
  }

  .leadDrawerMetaRow{
    gap:8px;
  }
}

@media (max-width: 480px){
  .topbarIn{
    grid-template-columns:minmax(0, 1fr);
  }

  .topbarRight{
    justify-content:stretch;
  }

  .topActions{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:8px;
  }

  .topActions .selectSlim{
    max-width:none;
  }

  .topActions .btn{
    width:100%;
  }

  .topbarMobileSearch{
    padding:0 16px 12px;
  }

  .pageHead h1{
    font-size:28px;
  }

  .kpiValue{
    font-size:42px;
  }

  .miniKpiValue{
    font-size:28px;
  }

  .card{
    border-radius:22px;
  }

  .modalCard{
    border-radius:22px;
  }

  .drawer{
    width:86vw;
  }

  .journeyStep{
    width:100%;
    justify-content:flex-start;
  }
}


.heroPanelCompact::after{
  display:none;
}

.cardHeadCompact{
  padding:16px 18px;
}

.pipelineFunnelShape{
  padding:18px 18px 22px;
  display:grid;
  gap:14px;
}

.funnelShapeRow{
  display:grid;
  grid-template-columns:120px minmax(0, 1fr) 44px;
  align-items:center;
  gap:14px;
}

.funnelShapeLabel{
  font-weight:600;
  font-size:14px;
  color:#1f2937;
}

.funnelShapeCenter{
  display:flex;
  justify-content:center;
  align-items:center;
}

.funnelShapeRail{
  width:100%;
  max-width:760px;
  height:16px;
  display:flex;
  justify-content:center;
  align-items:center;
}

.funnelShapeBar{
  height:14px;
  min-width:14px;
  border-radius:999px;
  background:linear-gradient(90deg, #93c5fd, #3b82f6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    0 4px 10px rgba(59,130,246,.14);
  transition:width .35s ease;
}

.funnelShapeValue{
  text-align:right;
  font-size:18px;
  font-weight:700;
  letter-spacing:-.03em;
  color:#111827;
}

@media (max-width: 768px){
  .pipelineFunnelShape{
    padding:16px;
    gap:12px;
  }

  .funnelShapeRow{
    grid-template-columns:88px minmax(0, 1fr) 32px;
    gap:10px;
  }

  .funnelShapeLabel{
    font-size:12px;
  }

  .funnelShapeRail{
    height:14px;
  }

  .funnelShapeBar{
    height:12px;
  }

  .funnelShapeValue{
    font-size:14px;
  }
}

@media (max-width: 480px){
  .pipelineFunnelShape{
    padding:14px;
  }

  .funnelShapeRow{
    grid-template-columns:76px minmax(0, 1fr) 28px;
    gap:8px;
  }

  .funnelShapeLabel{
    font-size:11px;
  }

  .funnelShapeValue{
    font-size:13px;
  }
}

.conversationSummaryCard{
  margin-bottom:14px;
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.96));
  box-shadow:var(--shadow-sm);
}

.conversationSummaryCard .muted{
  display:block;
  margin-bottom:8px;
}

#ldIntelSummary{
  color:var(--text);
  line-height:1.55;
}
