/* ════════════════════════════════════════════════════
   VARIABLES
════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;
  --bg:        #091525;
  --s1:        #0d1c34;
  --s2:        #102040;
  --s3:        #162a50;
  --border:    rgba(255,255,255,0.07);
  --border-md: rgba(255,255,255,0.12);
  --border-hi: rgba(255,255,255,0.22);
  --ink-1:     #f8faff;
  --ink:       #e2e8f8;
  --ink-2:     #7a8ab0;
  --ink-3:     #3a4a70;
  --ink-4:     #243058;
  --primary:   #2563eb;
  --primary-h: #1d4ed8;
  --cyan:      #00E5FF;
  --blue:      #3b82f6;
  --purple:    #7C3AED;
  --green:     #34d399;
  --yellow:    #fbbf24;
  --red:       #f87171;
  --orange:    #fb923c;
  --r:         8px;
  --r-lg:      12px;
  --rail-w:    72px;
  --rail-w-exp:220px;
  --top-h:     60px;
  font-family: 'DM Sans', system-ui, sans-serif;
}

:root.light-mode {
  color-scheme: light;
  --bg:        #dfe2e6;
  --s1:        #f3f4f1;
  --s2:        #e9ebe7;
  --s3:        #d7dacf;
  --border:    rgba(24,28,34,0.10);
  --border-md: rgba(24,28,34,0.16);
  --border-hi: rgba(24,28,34,0.24);
  --ink-1:     #11151b;
  --ink:       #1a1f27;
  --ink-2:     #4c5663;
  --ink-3:     #6c7580;
  --ink-4:     #8c949d;
  --cyan:      #008ea3;
  --blue:      #2563eb;
  --purple:    #6d28d9;
  --green:     #0f8a5f;
  --yellow:    #a16207;
  --red:       #c24141;
  --orange:    #c45a12;
}

/* ════════════════════════════════════════════════════
   RESET
════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 70% 50% at 110% -8%,  rgba(30,80,180,.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at -8%  110%,  rgba(15,40,100,.10) 0%, transparent 60%),
    var(--bg);
  overflow: hidden; /* prevent double scrollbars */
}

:root.light-mode body {
  background:
    linear-gradient(135deg, rgba(28,33,40,.06), transparent 34%),
    radial-gradient(ellipse 72% 58% at 108% -8%, rgba(0,142,163,.12) 0%, transparent 62%),
    radial-gradient(ellipse 58% 72% at -6% 108%, rgba(42,48,57,.16) 0%, transparent 65%),
    var(--bg);
}

button, input, select, textarea { font: inherit; cursor: pointer; }
h1,h2,h3,h4 { font-family: 'Space Grotesk', sans-serif; line-height: 1.2; }
strong { font-weight: 600; }
p { margin: 0; }
ul { list-style: none; padding: 0; }

/* ════════════════════════════════════════════════════
   APP SHELL — FLEX LAYOUT
════════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════
   SIDEBAR RAIL
════════════════════════════════════════════════════ */
.rail {
  flex-shrink: 0;
  width: var(--rail-w);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: rgba(5,11,24,.98);
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 1px 0 0 rgba(255,255,255,.03), inset -1px 0 0 rgba(255,255,255,.02);
  overflow: hidden;
  transition: width .24s cubic-bezier(.4,0,.2,1), margin-right .24s cubic-bezier(.4,0,.2,1);
  z-index: 50;
}

:root.light-mode .rail {
  background: linear-gradient(180deg, #20252d 0%, #15191f 100%);
  border-right-color: rgba(13,17,23,.18);
  box-shadow: 1px 0 0 rgba(255,255,255,.18), 18px 0 42px rgba(30,35,42,.12);
}

:root.light-mode .rail-top,
:root.light-mode .rail-bottom {
  border-color: rgba(255,255,255,.08);
}

:root.light-mode .rail-link,
:root.light-mode .rail-action-btn,
:root.light-mode .group-abbr,
:root.light-mode .group-full {
  color: #9aa3ad;
}

:root.light-mode .rail-link:hover,
:root.light-mode .rail-action-btn:hover {
  color: #f3f4f1;
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.10);
}

:root.light-mode .rail-link.active {
  color: #ffffff;
  background: #2563eb;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(37,99,235,.3);
}

:root.light-mode .brand-name {
  color: #f3f4f1;
}

.rail.expanded {
  width: var(--rail-w-exp);
  margin-right: calc(var(--rail-w) - var(--rail-w-exp));
  box-shadow: 10px 0 40px rgba(0,0,0,.55);
}

/* Rail top (brand + toggle) */
.rail-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  flex-shrink: 0;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--primary);
  box-shadow: 0 2px 12px rgba(37,99,235,.4), inset 0 1px 0 rgba(255,255,255,.2);
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width .22s ease, opacity .18s ease;
  letter-spacing: .01em;
}
.rail.expanded .brand-name { max-width: 140px; opacity: 1; }

.brand-logo {
  display: block;
  width: 124px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-logo-mark polygon,
.brand-logo-text {
  fill: #f7faff;
}

.brand-logo-text {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 45px;
  font-weight: 800;
  letter-spacing: 0;
}

.rail:not(.expanded) .brand-logo {
  width: 36px;
}

.rail:not(.expanded) .brand-logo-text {
  display: none;
}

.rail-toggle-btn {
  margin-top: 4px;
}
.rail.expanded .rail-toggle-btn i { transform: rotate(180deg); }
.rail-toggle-btn i { transition: transform .22s ease; }

/* ── Nav ── */
.rail-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail-nav::-webkit-scrollbar { width: 3px; }
.rail-nav::-webkit-scrollbar-track { background: transparent; }
.rail-nav::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 4px; }

/* Nav group separator */
.nav-group { margin-bottom: 2px; }

.nav-group-label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding: 0 14px;
  margin-top: 8px;
  margin-bottom: 2px;
  transition: max-height .22s ease, opacity .18s ease;
}
.rail.expanded .nav-group-label { max-height: 24px; opacity: 1; }

/* Subitems */
.nav-subitems {
  overflow: hidden;
  position: relative;
  padding: 4px 0 8px;
}
.rail.expanded .nav-subitems::before {
  content: "";
  position: absolute;
  left: 43px;
  top: 12px;
  bottom: 14px;
  width: 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(148,163,184,.12), rgba(148,163,184,.42), rgba(148,163,184,.12));
  pointer-events: none;
}
.nav-subitems.hidden { display: none; }
.nav-subitem {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 14px 0 40px;
  border: none;
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font: 500 12.5px/1 Inter, system-ui, sans-serif;
  text-align: left;
  transition: color .15s, background .15s;
  position: relative;
  z-index: 1;
}
.nav-subitem:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.nav-subitem.active { color: #93c5fd; font-weight: 600; }
.nav-sub-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--s1);
  transition: background .15s, box-shadow .15s;
}
.nav-subitem.active .nav-sub-dot {
  background: #93c5fd;
  box-shadow: 0 0 0 4px var(--s1), 0 0 14px rgba(147,197,253,.55);
}
.nav-subitem .link-label {
  max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap;
  transition: max-width .22s ease, opacity .18s ease;
}
.rail.expanded .nav-subitem .link-label { max-width: 160px; opacity: 1; }

/* Nav link */
.rail-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-height: 46px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-3);
  text-align: left;
  transition: color .15s, background .15s, border-color .15s;
  position: relative;
  cursor: pointer;
}
.rail.expanded .rail-link {
  justify-content: flex-start;
  padding: 0 14px;
  gap: 10px;
}

.rail-link:hover {
  color: var(--ink);
  background: rgba(255,255,255,.06);
  border-color: var(--border-md);
}

.rail-link.active {
  color: #ffffff;
  background: var(--primary);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(37,99,235,.35);
}

/* Tooltip for collapsed state */
.rail-link .link-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width .22s ease, opacity .18s ease;
}
.rail.expanded .rail-link .link-label { max-width: 160px; opacity: 1; }

/* Collapsed tooltip */
.rail-link::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  background: var(--s3);
  border: 1px solid var(--border-md);
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, transform .15s;
  z-index: 300;
  font-family: 'DM Sans', sans-serif;
}
.rail-link:not(.expanded-visible):hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.rail.expanded .rail-link::after { display: none; }

/* Rail bottom */
.rail-bottom {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 8px 10px;
  border-top: 1px solid var(--border);
}

/* User profile at sidebar bottom */
.rail-user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 9px;
  cursor: pointer;
  position: relative;
  transition: background .15s;
}
.rail-user-profile:hover { background: rgba(255,255,255,.05); }
.rail-avatar {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px;
  border-radius: 50% !important;
  font-size: 12px !important;
  flex-shrink: 0;
  position: relative;
}
.rail-avatar::after {
  content: '';
  position: absolute;
  bottom: 0px; right: 0px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid rgba(5,11,24,.98);
}
.rail-user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width .22s ease, opacity .18s ease;
}
.rail.expanded .rail-user-info { max-width: 130px; opacity: 1; }
.rail-user-info strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.rail-user-info small {
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Logout button */
.rail-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font: 500 13px/1 Inter, system-ui, sans-serif;
  transition: background .15s, color .15s;
}
.rail-logout-btn:hover { background: rgba(239,68,68,.08); color: #f87171; }
.rail-logout-btn .link-label {
  white-space: nowrap;
  max-width: 0; overflow: hidden; opacity: 0;
  transition: max-width .22s ease, opacity .18s ease;
}
.rail.expanded .rail-logout-btn .link-label { max-width: 140px; opacity: 1; }

/* Collapse button in rail-top */
.rail-collapse-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border-md);
  background: transparent;
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity .18s ease, max-width .22s ease, background .15s, color .15s;
}
.rail.expanded .rail-collapse-btn { opacity: 1; max-width: 28px; overflow: visible; }
.rail-collapse-btn:hover { background: rgba(255,255,255,.07); color: var(--ink); }

/* User menu from sidebar */
.rail-user-profile .user-menu {
  bottom: calc(100% + 6px);
  top: auto;
  left: 0;
  right: auto;
  min-width: 200px;
}

.rail-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-3);
  transition: color .15s;
}
.rail.expanded .rail-action-btn { justify-content: flex-start; padding: 0 14px; }
.rail-action-btn:hover { color: var(--ink); }
.rail-action-btn .link-label {
  font-size: 13px; font-weight: 500;
  max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap;
  transition: max-width .22s ease, opacity .18s ease;
}
.rail.expanded .rail-action-btn .link-label { max-width: 140px; opacity: 1; }

/* ── Rail user profile ── */
.rail-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 0 0 2px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  overflow: visible;
}
.rail-user:hover {
  background: rgba(255,255,255,.05);
  border-color: var(--border-md);
}
.rail-user .avatar {
  width: 32px; height: 32px;
  font-size: 12px;
  flex-shrink: 0;
}
.rail-user .user-info {
  flex: 1;
  min-width: 0;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width .22s ease, opacity .18s ease;
}
.rail.expanded .rail-user .user-info { max-width: 130px; opacity: 1; }
.rail-user-chevron {
  flex-shrink: 0;
  color: var(--ink-3);
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width .22s ease, opacity .18s ease;
}
.rail.expanded .rail-user-chevron { max-width: 18px; opacity: 1; }

/* User menu opens to the right when in sidebar */
.rail-user .user-menu {
  top: auto;
  bottom: 0;
  right: auto;
  left: calc(100% + 10px);
  min-width: 210px;
}

/* ── Rail tagline ── */
.rail-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 2px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .26s ease, opacity .22s ease;
}
.rail.expanded .rail-tagline { max-height: 60px; opacity: 1; }
.rail-tagline-text span {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-4);
  letter-spacing: .04em;
  line-height: 1.45;
}

/* Mobile backdrop */
.rail-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn    { from { opacity: 0 } to { opacity: 1 } }
@keyframes pulse-dot { 0%,100% { opacity:1 } 50% { opacity:.35 } }
@keyframes prosp-pulse {
  0%,100% { box-shadow: 0 0 0 2px rgba(6,182,212,.5), 0 0 12px rgba(6,182,212,.25); }
  50%      { box-shadow: 0 0 0 3px rgba(6,182,212,.9), 0 0 28px rgba(6,182,212,.5);  }
}
@keyframes spin { to { transform: rotate(360deg) } }
.rail-backdrop.active { display: block; }

/* Hamburger button — hidden on desktop */
.mob-menu-btn { display: none !important; }

/* ════════════════════════════════════════════════════
   TOPBAR
════════════════════════════════════════════════════ */
.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.topbar {
  flex-shrink: 0;
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 20px;
  background: rgba(6,14,30,.94);
  border-bottom: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 1px 0 rgba(255,255,255,.03), 0 4px 32px rgba(0,0,0,.4);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  position: relative;
}

:root.light-mode .topbar {
  background: rgba(237,239,235,.88);
  border-bottom-color: rgba(24,28,34,.10);
  box-shadow: 0 1px 0 rgba(255,255,255,.7), 0 14px 34px rgba(37,43,51,.10);
}

:root.light-mode .topbar::before {
  background: linear-gradient(90deg, transparent 0%, rgba(0,142,163,.28) 40%, rgba(47,54,64,.24) 60%, transparent 100%);
}
.topbar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0,229,255,.18) 40%, rgba(124,58,237,.18) 60%, transparent 100%);
  pointer-events: none;
}

.topbar-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  width: min(360px, 32vw);
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--ink-2);
  transition: border-color .15s;
}
.search-box:focus-within { border-color: rgba(0,229,255,.4); }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0;
  background: transparent; color: var(--ink);
}
.search-box input::placeholder { color: var(--ink-3); }

kbd {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  padding: 2px 5px;
  border: 1px solid var(--border-md);
  border-radius: 4px;
  color: var(--ink-3);
  white-space: nowrap;
}

.icon-btn {
  position: relative;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--s2);
  color: var(--ink-2);
  display: grid; place-items: center;
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--border-md); }

.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--s2);
}
.notif-dot.is-hidden { display: none; }

.user-chip {
  /* kept for compatibility — rail-user is the active element now */
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: 4px 12px 4px 5px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--s2);
  cursor: pointer;
}

.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #f59e0b; color: #1a0e00;
  font-weight: 700; font-size: 11px;
  display: grid; place-items: center;
}

.user-info strong { display: block; font-size: 13px; }
.user-info small  { display: block; font-size: 11px; color: var(--ink-3); }

.user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #0d1022;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 8px;
  z-index: 999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.user-menu-head {
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 4px;
}
.user-menu-email {
  font-size: 11px;
  color: var(--ink-3);
  word-break: break-all;
}
.user-menu-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 13px;
  border-radius: 8px;
  text-align: left;
}
.user-menu-action:hover { background: rgba(255,255,255,0.05); }
.user-menu-action.danger { color: #f87171; }
.user-menu-action.danger:hover { background: rgba(248,113,113,0.08); }

/* ════════════════════════════════════════════════════
   CONTENT AREA (scrollable)
════════════════════════════════════════════════════ */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px 28px 40px;
  background-image: radial-gradient(circle, rgba(255,255,255,.038) 1px, transparent 1px);
  background-size: 22px 22px;
}

:root.light-mode .content-area {
  background-color: rgba(223,226,230,.56);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0) 180px),
    radial-gradient(circle, rgba(25,30,38,.055) 1px, transparent 1px);
}

:root.light-mode .search-box,
:root.light-mode .icon-btn,
:root.light-mode .user-chip {
  background: rgba(246,247,244,.76);
  border-color: rgba(24,28,34,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

:root.light-mode .user-menu {
  background: #f4f5f2;
  border-color: rgba(24,28,34,.12);
  box-shadow: 0 18px 45px rgba(28,33,40,.18);
}

:root.light-mode .user-menu-action:hover {
  background: rgba(28,33,40,.06);
}
.content-area.full-bleed {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.content-area::-webkit-scrollbar { width: 4px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 4px; }

/* ════════════════════════════════════════════════════
   PAGE HERO (header of each page)
════════════════════════════════════════════════════ */
.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.page-hero h2 {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
  letter-spacing: -.02em;
}

.hero-desc { margin-top: 4px; color: var(--ink-2); font-size: 13px; max-width: 520px; }

.eyebrow {
  font-size: 11px; font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase; letter-spacing: .06em;
}

.hero-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   GRIDS
════════════════════════════════════════════════════ */
.grid   { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.col-2  { grid-column: span 2; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

/* ════════════════════════════════════════════════════
   ALERT BANNER
════════════════════════════════════════════════════ */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid;
  margin-bottom: 14px;
  font-size: 13px;
  flex-wrap: wrap;
}
.alert-banner > div { flex: 1; min-width: 0; overflow-wrap: break-word; line-height: 1.5; }
.alert-banner.bad  { border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.07); color: #fca5a5; }
.alert-banner.warn { border-color: rgba(251,191,36,.3);  background: rgba(251,191,36,.07);  color: #fcd34d; }
.alert-banner strong { color: inherit; }
.alert-banner .alert-action {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: var(--r);
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════
   KPI CARDS
════════════════════════════════════════════════════ */
.kpi-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--s1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 8px rgba(0,0,0,.4);
  display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden;
}
.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  pointer-events: none;
}

.kpi-label {
  font-size: 11px; font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.kpi-value {
  font-family: 'DM Mono', monospace;
  font-size: 26px; font-weight: 500;
  color: var(--ink); line-height: 1;
  margin-top: 4px;
}

.kpi-sub { font-size: 11.5px; color: var(--green); }
.kpi-sub.warn { color: var(--yellow); }
.kpi-sub.bad  { color: var(--red);    }

/* ════════════════════════════════════════════════════
   PANEL (dark card)
════════════════════════════════════════════════════ */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--s1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 2px 12px rgba(0,0,0,.4);
  overflow: hidden;
  position: relative;
}
.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.09), transparent);
  pointer-events: none;
}

.panel-head {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.panel-eyebrow {
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); margin-bottom: 2px;
}
.panel-head h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 700; color: var(--ink);
}

.icon-btn-xs {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px; background: transparent;
  color: var(--ink-3); display: grid; place-items: center;
  flex-shrink: 0; transition: color .15s;
}
.icon-btn-xs:hover { color: var(--ink); }

.panel-body { padding: 14px 16px 16px; }

/* ════════════════════════════════════════════════════
   DATA TABLE
════════════════════════════════════════════════════ */
.trows { display: flex; flex-direction: column; gap: 6px; }

.trow {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,.025);
  font-size: 13px;
}
.trow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow-action { justify-self: end; }

.trow-header {
  font-weight: 700; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); border: 0; background: transparent;
  padding-bottom: 2px; min-height: auto;
}

/* ════════════════════════════════════════════════════
   CHARTS
════════════════════════════════════════════════════ */
.chart-wrap    { height: 160px; position: relative; margin: 4px 0; }
.chart-wrap-lg { height: 200px; }

.chart-footer {
  display: flex; align-items: center; gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.stat-big { font-family: 'DM Mono', monospace; font-size: 22px; font-weight: 500; }
.stat-big.positive { color: var(--cyan); }
.stat-big.negative { color: var(--red);  }
.muted-text { font-size: 12px; color: var(--ink-3); }

/* ════════════════════════════════════════════════════
   BADGES
════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  white-space: nowrap; border: 1px solid;
}
.badge-ok     { color: var(--green);  background: rgba(52,211,153,.1);  border-color: rgba(52,211,153,.25); }
.badge-warn   { color: var(--yellow); background: rgba(251,191,36,.1);  border-color: rgba(251,191,36,.25); }
.badge-bad    { color: var(--red);    background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.25); }
.badge-muted  { color: var(--ink-3);  background: rgba(255,255,255,.05); border-color: var(--border); }
.badge-blue   { color: var(--blue);   background: rgba(59,130,246,.1);  border-color: rgba(59,130,246,.25); }
.badge-purple { color: var(--purple); background: rgba(124,58,237,.1);  border-color: rgba(124,58,237,.25); }
.badge-cyan   { color: var(--cyan);   background: rgba(0,229,255,.1);  border-color: rgba(0,229,255,.25); }

/* ════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════ */
.primary-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 16px;
  border-radius: var(--r);
  border: 1px solid rgba(37,99,235,.5);
  background: var(--primary);
  color: #ffffff;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
  transition: background .15s, box-shadow .15s;
}
.primary-btn:hover {
  background: var(--primary-h);
  box-shadow: 0 4px 16px rgba(37,99,235,.4);
}

.ghost-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: transparent; color: var(--ink-2);
  font-size: 12px;
  transition: color .15s, border-color .15s;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--border-md); }
.ghost-btn.bad   { color: var(--red); }
.ghost-btn.bad:hover { border-color: rgba(248,113,113,.4); }

.danger-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r);
  border: 1px solid rgba(248,113,113,.3);
  background: rgba(248,113,113,.08);
  color: var(--red); font-size: 12px; font-weight: 600;
  transition: background .15s;
}
.danger-btn:hover { background: rgba(248,113,113,.15); }

/* ════════════════════════════════════════════════════
   ACTION LIST
════════════════════════════════════════════════════ */
.action-list { display: flex; flex-direction: column; gap: 6px; }

.action-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255,255,255,.028);
  color: var(--ink); font-size: 13px; text-align: left;
  transition: background .15s, border-color .15s, color .15s;
}
.action-item:hover { background: rgba(0,229,255,.08); border-color: rgba(0,229,255,.25); color: var(--cyan); }
.action-arrow { margin-left: auto; color: var(--ink-3); }
.action-item:hover .action-arrow { color: var(--cyan); }

/* ════════════════════════════════════════════════════
   FORMS
════════════════════════════════════════════════════ */
.form-grid { display: grid; gap: 14px; }

.field { display: grid; gap: 5px; }
.field label {
  font-size: 11.5px; font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .04em;
}
.field input, .field select, .field textarea {
  padding: 10px 14px;
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  background: var(--s2); color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(0,229,255,.45);
  box-shadow: 0 0 0 3px rgba(0,229,255,.07);
}
.login-card .field input {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
}
.login-card .field input:focus {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.28);
  box-shadow: 0 0 0 3px rgba(255,255,255,.04);
}
.field textarea { resize: vertical; min-height: 80px; font-size: 13px; line-height: 1.5; }

.native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.pv-select {
  position: relative;
  display: inline-flex;
  min-width: 142px;
  max-width: 100%;
  vertical-align: middle;
}
.field .pv-select,
.pv-select-form {
  width: 100%;
}
.pv-select-compact {
  min-width: 100px;
  max-width: 150px;
}
.pv-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.2;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.field .pv-select-button {
  min-height: 40px;
  padding: 9px 12px;
  background: var(--s2);
  color: var(--ink);
  font-size: 13px;
}
.pv-select-compact .pv-select-button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11.5px;
}
.pv-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-select-button i {
  flex-shrink: 0;
  color: var(--ink-3);
  transition: transform .16s, color .16s;
}
.pv-select:hover .pv-select-button,
.pv-select.open .pv-select-button {
  color: var(--ink);
  background: rgba(255,255,255,.065);
  border-color: rgba(0,229,255,.38);
  box-shadow: 0 0 0 3px rgba(0,229,255,.075), inset 0 1px 0 rgba(255,255,255,.05);
}
.pv-select.open .pv-select-button i {
  color: var(--cyan);
  transform: rotate(180deg);
}

.pv-select-menu {
  position: fixed;
  z-index: 12050;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: rgba(29,29,30,.98);
  box-shadow:
    0 18px 45px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  transform-origin: top;
  animation: pvSelectIn .12s ease-out;
}
.pv-select-menu::-webkit-scrollbar { width: 5px; }
.pv-select-menu::-webkit-scrollbar-track { background: transparent; }
.pv-select-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }
.pv-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 28px;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-align: left;
}
.pv-select-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-select-option:hover,
.pv-select-option:focus-visible {
  background: rgba(255,255,255,.09);
  outline: none;
}
.pv-select-option.selected {
  color: var(--cyan);
  background: rgba(0,229,255,.10);
}
.pv-select-option.selected i {
  color: var(--cyan);
  flex-shrink: 0;
}
.pv-select-option:disabled {
  cursor: not-allowed;
  color: var(--ink-3);
  opacity: .65;
}

#subModalOverlay .pv-select {
  width: 100%;
  display: flex;
}
#subModalOverlay .pv-select-button {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 9px;
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: #f0f2fc;
  font-size: 13px;
}
#subModalOverlay .pv-select.open .pv-select-button,
#subModalOverlay .pv-select:hover .pv-select-button {
  border-color: rgba(6,182,212,.55);
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 3px rgba(6,182,212,.10), inset 0 1px 0 rgba(255,255,255,.05);
}
#subModalOverlay .pv-select-label {
  color: #f0f2fc;
}

@keyframes pvSelectIn {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cold-owner-select {
  color-scheme: dark;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.cold-owner-select:hover {
  background-color: rgba(255,255,255,.075) !important;
  border-color: rgba(255,255,255,.18) !important;
  color: var(--ink) !important;
}
.cold-owner-select:focus {
  border-color: rgba(0,229,255,.42) !important;
  box-shadow: 0 0 0 3px rgba(0,229,255,.08), inset 0 1px 0 rgba(255,255,255,.05);
}
.cold-owner-select option {
  background: #0d0e17;
  color: var(--ink);
}
.cold-owner-select option:checked {
  background: rgba(0,229,255,.18);
  color: var(--cyan);
}

/* ════════════════════════════════════════════════════
   CALENDAR
════════════════════════════════════════════════════ */
.cal-month-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-month-header h3 { font-size: 16px; font-weight: 700; color: var(--ink); }
.cal-month-header small { font-size: 12px; color: var(--ink-3); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-head {
  text-align: center; font-size: 10.5px;
  font-weight: 700; color: var(--ink-3);
  padding-bottom: 4px;
  text-transform: uppercase;
}

.cal-day, .cal-empty {
  aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: 7px;
  font-size: 12.5px; font-weight: 500;
  transition: background .15s;
}
.cal-day { color: var(--ink-2); background: var(--s3); }
.cal-day:hover { background: var(--s2); color: var(--ink); }
.cal-day.cal-today { background: var(--blue); color: white; font-weight: 700; }
.cal-day.cal-busy {
  background: rgba(0,229,255,.12);
  color: var(--cyan); font-weight: 700;
  outline: 2px solid rgba(0,229,255,.3); outline-offset: -1px;
}
.cal-day.cal-today.cal-busy { background: var(--blue); outline-color: var(--cyan); }
.cal-empty { background: transparent; }

.cal-legend {
  display: flex; gap: 14px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.cal-legend span {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-3);
}
.cal-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   KANBAN BOARD
════════════════════════════════════════════════════ */
.kanban-page {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--top-h) - 68px);
  min-height: 0;
}

.kanban-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-shrink: 0; flex-wrap: wrap;
}
.kanban-toolbar-stat { flex: 0 0 auto; padding: 8px 14px; white-space: nowrap; overflow: visible; }

.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  cursor: grab;
  flex: 1;
  min-height: 0;
  padding-bottom: 12px;
  align-items: flex-start;
}
.kanban-board::-webkit-scrollbar { height: 5px; }
.kanban-board::-webkit-scrollbar-track { background: transparent; }
.kanban-board::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 999px; }

/* ── Column ── */
.kanban-col {
  flex: 0 0 268px;
  display: flex; flex-direction: column;
  border-radius: var(--r-lg);
  background: rgba(8,9,14,.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 8px 32px rgba(0,0,0,.5);
  overflow: hidden;
  max-height: 100%;
  position: relative;
}

:root.light-mode .kanban-col {
  background: rgba(244,245,242,.86);
  border-color: rgba(24,28,34,.12);
  box-shadow: 0 16px 40px rgba(35,41,49,.12), inset 0 1px 0 rgba(255,255,255,.82);
}

:root.light-mode .kanban-col-head {
  border-bottom-color: rgba(24,28,34,.08);
}

.kcol-topbar { height: 4px; flex-shrink: 0; border-radius: 0; }

.kanban-col-head {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 13px 11px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.kcol-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
}

.kcol-label {
  font-size: 12.5px; font-weight: 700; color: var(--ink); flex: 1;
  font-family: 'Space Grotesk', sans-serif; white-space: nowrap;
}

.kcol-count {
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  font-family: 'DM Mono', monospace; display: grid; place-items: center;
}

.kanban-cards {
  flex: 1; overflow-y: auto;
  padding: 10px 10px 4px;
  display: flex; flex-direction: column; gap: 8px;
  transition: background .15s, outline .15s;
  min-height: 60px;
}
.kanban-cards.drag-over {
  background: rgba(6,182,212,0.07);
  outline: 2px dashed rgba(6,182,212,0.45);
  outline-offset: -4px;
  border-radius: 8px;
}
.kanban-cards::-webkit-scrollbar { width: 3px; }
.kanban-cards::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 4px; }

.kcol-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 32px 12px; color: var(--ink-3); font-size: 12px;
}

/* ── Card ── */
.kanban-card {
  border: 1px solid rgba(255,255,255,.07);
  border-left: 3px solid var(--cc, rgba(255,255,255,.15));
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 2px 8px rgba(0,0,0,.2);
  padding: 13px 14px 11px; cursor: pointer;
  transition: background .14s, transform .16s, box-shadow .14s, border-color .14s;
  margin-bottom: 8px;
}
:root.light-mode .kanban-card {
  background: rgba(255,255,255,.72);
  border-color: rgba(24,28,34,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 4px 14px rgba(35,41,49,.08);
}
:root.light-mode .kanban-card:hover {
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 28px rgba(35,41,49,.13), inset 0 1px 0 rgba(255,255,255,.95);
  border-color: rgba(24,28,34,.16);
}
.kanban-card:hover {
  background: rgba(255,255,255,.07);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.13);
}

/* Card — top row: names + badge */
.kcard-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; margin-bottom: 9px;
}
.kcard-names { flex: 1; min-width: 0; }
.kcard-name {
  display: block; font-size: 13px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
}
.kcard-co {
  display: block; font-size: 11px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kcard-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 5px; border: 1px solid;
  white-space: nowrap; align-self: flex-start;
}
.kcard-badge--urgent {
  background: rgba(248,113,113,.18); border-color: rgba(248,113,113,.4);
  color: #f87171; animation: prosp-pulse 2s ease-in-out infinite;
}

/* Card — phone row */
.kcard-phone-row {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap;
}
.kcard-phone {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--ink-2); font-weight: 500;
}
.kcard-chip-status {
  display: flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 5px;
}
.kcard-chip--calling {
  background: rgba(251,146,60,.14); color: #fb923c;
  animation: prosp-pulse 1.5s ease-in-out infinite;
}
.kcard-chip--answered { background: rgba(16,185,129,.13); color: #10b981; }

/* Card — chips row (tentativa, relatório) */
.kcard-chips {
  display: flex; flex-direction: row; flex-wrap: wrap;
  gap: 5px; margin-bottom: 9px;
}
.kchip {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 5px;
  font-size: 10.5px; font-weight: 600; border: 1px solid;
  white-space: nowrap;
}

/* Card footer */
.kcard-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px; margin-top: 9px; padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.055);
}
.kcard-resp {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--ink-3); min-width: 0;
}
.kcard-noresp { font-size: 10.5px; color: var(--ink-4); }
.kcard-delay {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  background: rgba(248,113,113,.12); color: #f87171;
}
.kcard-delay--urgent {
  background: rgba(248,113,113,.24);
  animation: prosp-pulse 2s ease-in-out infinite;
}
.kcard-origin {
  flex-shrink: 0; font-size: 9px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(52,211,153,.12); color: #34d399;
}
.kcard-src, .kcard-days { display: none; }

/* Add button */
.kanban-add-btn {
  display: flex; align-items: center; gap: 7px;
  width: calc(100% - 20px); margin: 0 10px 10px;
  padding: 8px 12px; border: 1px dashed rgba(255,255,255,.12);
  border-radius: var(--r); background: transparent; color: var(--ink-3);
  font-size: 12px; flex-shrink: 0;
  transition: border-color .15s, color .15s, background .15s;
}
.kanban-add-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,229,255,.04); }

/* ════════════════════════════════════════════════════
   VIEW TOGGLE (List / Kanban)
════════════════════════════════════════════════════ */
.view-toggle {
  display: flex;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.view-toggle-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 7px;
  border: none; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  background: transparent; color: var(--ink-3);
  font-family: inherit; white-space: nowrap;
}
.view-toggle-btn.active {
  background: var(--s3);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.view-toggle-btn:not(.active):hover { color: var(--ink-2); }

/* ════════════════════════════════════════════════════
   LIST VIEW (shared by pipeline + prospecão)
════════════════════════════════════════════════════ */
.pl-view {
  flex: 1; min-height: 0; overflow-y: auto;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r-lg);
  background: rgba(8,9,14,.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 8px 32px rgba(0,0,0,.5);
}
.pl-view::-webkit-scrollbar { width: 4px; }
.pl-view::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.pl-header {
  display: grid;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: sticky; top: 0; z-index: 2;
  background: rgba(8,9,14,.97);
  backdrop-filter: blur(8px);
}
.pl-header-cell {
  font-size: 10.5px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .06em;
}

.pl-row {
  display: grid;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: pointer;
  transition: background .12s;
}
.pl-row:hover { background: rgba(255,255,255,.04); }
.pl-row:last-child { border-bottom: none; }

.pl-av {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800; font-size: 10.5px;
}
.pl-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-co   { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pl-stage-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600; border: 1px solid;
  white-space: nowrap;
}
.pl-src {
  font-size: 11.5px; color: var(--ink-3);
  display: flex; align-items: center; gap: 4px;
}
.pl-days {
  font-size: 11px; color: var(--ink-3);
  font-family: 'DM Mono', monospace;
}

/* Grid templates — set per use site via inline style */
.pl-cols-pipeline  { grid-template-columns: 30px 1fr 130px 155px 100px 55px 36px; }
.pl-cols-prospecao { grid-template-columns: 30px 1fr 160px 130px 120px 85px 36px; }

/* ════════════════════════════════════════════════════
   CARD DETAIL PANEL (side drawer)
════════════════════════════════════════════════════ */
.card-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .25s;
}

.panel-drawer {
  position: absolute;
  top: 0; right: 0;
  width: min(480px, 92vw);
  height: 100%;
  background: var(--s1);
  border-left: 1px solid var(--border-md);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  display: flex; flex-direction: column;
}
#panelContent {
  flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.panel-drawer::-webkit-scrollbar { width: 4px; }
.panel-drawer::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 4px; }

.card-panel.open { pointer-events: all; }
.card-panel.open .panel-overlay { opacity: 1; }
.card-panel.open .panel-drawer  { transform: translateX(0); }

#cold-script-panel {
  top: 0 !important;
  bottom: 0 !important;
  width: min(420px, 100vw) !important;
  max-width: 100vw !important;
  z-index: 50000 !important;
  box-shadow: -28px 0 70px rgba(0,0,0,.55) !important;
}

/* Panel internal sections */
.pd-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  background: var(--s1);
  backdrop-filter: blur(8px);
}
.pd-header h2 { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.pd-header p  { font-size: 13px; color: var(--ink-2); }
.pd-close {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r); background: transparent;
  color: var(--ink-3); display: grid; place-items: center;
  flex-shrink: 0; transition: color .15s;
}
.pd-close:hover { color: var(--ink); }

.pd-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.pd-section:last-child { border-bottom: 0; }
.pd-section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-3); margin-bottom: 12px;
}

.pd-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pd-info-item { display: flex; flex-direction: column; gap: 3px; }
.pd-info-label { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pd-info-value { font-size: 13.5px; color: var(--ink); font-weight: 500; }

/* Playbook */
.playbook-step {
  padding: 12px 14px;
  border: 1px solid rgba(251,191,36,.15);
  border-radius: var(--r);
  background: rgba(251,191,36,.04);
  margin-bottom: 8px;
}
.playbook-step h4 { font-size: 12.5px; font-weight: 700; color: var(--yellow); margin-bottom: 6px; }
.playbook-step p, .playbook-step li { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.playbook-step ul { padding-left: 16px; list-style: disc; }
.playbook-step li { margin-top: 4px; }

/* Activity log */
.activity-item {
  display: flex; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: 0; }
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); flex-shrink: 0; margin-top: 5px;
}
.activity-dot.muted { background: var(--ink-3); }
.activity-body { flex: 1; min-width: 0; }
.activity-time { font-size: 11.5px; color: var(--ink-3); font-family: 'DM Mono', monospace; }
.activity-text { font-size: 13px; color: var(--ink); }

/* Transcript box */
.transcript-box {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--s2);
  padding: 14px;
  font-size: 13px; color: var(--ink-2);
  line-height: 1.7;
  max-height: 200px;
  overflow-y: auto;
}
.transcript-box::-webkit-scrollbar { width: 3px; }
.transcript-box::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 4px; }

.pd-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px;
  position: sticky; bottom: 0;
  background: var(--s1);
}

/* ════════════════════════════════════════════════════
   MISC UTILITIES
════════════════════════════════════════════════════ */
.mono      { font-family: 'DM Mono', monospace; }
.positive  { color: var(--green);  }
.warn-text { color: var(--yellow); }
.bad-text  { color: var(--red);    }
.muted     { color: var(--ink-3);  }

.divider { height: 1px; background: var(--border); margin: 14px 0; }
.section-gap { margin-top: 14px; }

.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
}
.segmented button {
  border: 0; background: transparent; color: var(--ink-3);
  padding: 7px 14px; font-size: 12px; font-weight: 500;
  transition: background .15s, color .15s;
}
.segmented .active { background: rgba(255,255,255,.1); color: var(--ink); }

/* WhatsApp preview */
.wa-preview {
  padding: 14px; border-radius: var(--r);
  background: linear-gradient(135deg, #0b3b2c, #0f2518);
  border: 1px solid rgba(0,229,255,.15);
  color: white; display: flex; flex-direction: column; gap: 10px;
}
.wa-preview strong { font-size: 13px; color: var(--cyan); }
.wa-preview p { font-size: 13px; color: #9ed4c0; }

/* Health bar */
.health-bar {
  height: 5px; border-radius: 999px;
  background: var(--s3); overflow: hidden; margin: 12px 0 6px;
}
.health-bar span {
  display: block; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}

/* Client card */
.client-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, var(--s1), var(--s2));
  padding: 16px;
}
.client-card h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.client-card > p { font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }

.client-status-row {
  display: flex; gap: 12px; margin: 10px 0;
  padding: 10px; border-radius: var(--r);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
}
.client-status-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.client-status-item span { font-size: 10.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; }

/* Setting card */
.setting-card {
  border: 1px solid rgba(0,229,255,.14);
  border-radius: var(--r-lg);
  background: rgba(0,229,255,.03);
  padding: 18px;
}
.setting-card > div { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.setting-card h3 { font-size: 14px; font-weight: 700; color: var(--ink); }
.setting-card p  { font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }

/* Mail thumbnail */
.mail-thumb {
  height: 100px; border-radius: 8px;
  background: linear-gradient(150deg, #1a2035, #0d1220);
  border: 1px solid var(--border-md);
  padding: 12px; display: flex; flex-direction: column;
  gap: 7px; justify-content: center; margin-bottom: 12px;
}
.mail-thumb span {
  display: block; height: 8px;
  border-radius: 999px; background: var(--s3);
}
.mail-thumb span:nth-child(2) { width: 70%; }
.mail-thumb span:nth-child(3) { width: 44%; }

/* ════════════════════════════════════════════════════
   MENSAGENS / CHAT
════════════════════════════════════════════════════ */
.chat-page {
  display: flex;
  height: calc(100dvh - var(--top-h) - 68px);
  min-height: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── Conversation List ── */
.chat-list {
  width: 300px; flex-shrink: 0;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(13,15,23,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.chat-list-head {
  padding: 18px 16px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.chat-list-head h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 2px;
}
.chat-list-head p { font-size: 12px; color: var(--ink-3); margin-bottom: 12px; }
.chat-search-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-md);
  border-radius: var(--r); padding: 8px 12px; color: var(--ink-3);
}
.chat-search-box input {
  background: transparent; border: none; outline: none;
  font-size: 13px; color: var(--ink); flex: 1;
}
.chat-list-items { flex: 1; overflow-y: auto; }

.chat-item {
  display: flex; width: 100%; padding: 13px 14px; gap: 11px;
  cursor: pointer; border: none; border-bottom: 1px solid var(--border);
  background: transparent; text-align: left;
  border-left: 2px solid transparent;
  transition: background .12s, border-color .12s;
}
.chat-item:hover  { background: rgba(255,255,255,.03); }
.chat-item.active { background: rgba(0,229,255,.07); border-left-color: var(--cyan); }

.ci-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px;
  flex-shrink: 0; position: relative;
}
.ci-online {
  position: absolute; width: 10px; height: 10px;
  background: var(--green); border: 2px solid var(--s1);
  border-radius: 50%; bottom: 0; right: 0;
}
.ci-body { flex: 1; min-width: 0; }
.ci-top  { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 3px; }
.ci-name { font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-time { font-size: 11px; color: var(--ink-3); flex-shrink: 0; }
.ci-bottom { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ci-preview { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.ci-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--cyan); color: #000a0c;
  border-radius: 99px; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}

/* ── Chat Window ── */
.chat-window {
  flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: rgba(7,8,12,.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.chat-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.chat-win-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  background: rgba(13,15,23,.5);
}
.chat-win-info { flex: 1; min-width: 0; }
.chat-win-info strong { display: block; font-size: 14px; color: var(--ink); font-weight: 600; }
.chat-win-info small  { font-size: 12px; color: var(--ink-3); }
.chat-win-actions { display: flex; gap: 2px; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px 24px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 4px; }

.msg-row { display: flex; margin-bottom: 10px; }
.msg-row.me    { justify-content: flex-end; }
.msg-row.them  { justify-content: flex-start; }

.msg-bubble {
  max-width: 62%; padding: 10px 14px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.5;
}
.msg-row.me   .msg-bubble {
  background: rgba(0,229,255,.13); border: 1px solid rgba(0,229,255,.22);
  color: var(--ink); border-bottom-right-radius: 4px;
}
.msg-row.them .msg-bubble {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09);
  color: var(--ink); border-bottom-left-radius: 4px;
}
.msg-time { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; padding: 0 2px; }
.msg-row.me .msg-time { text-align: right; }

.chat-input-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-top: 1px solid var(--border); flex-shrink: 0;
  background: rgba(13,15,23,.5);
}
.chat-input {
  flex: 1; background: rgba(255,255,255,.05);
  border: 1px solid var(--border-md); border-radius: 24px;
  padding: 10px 18px; color: var(--ink); font-size: 13.5px;
  outline: none; transition: border-color .2s;
}
.chat-input:focus { border-color: rgba(0,229,255,.4); }
.chat-input::placeholder { color: var(--ink-3); }
.chat-send-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--cyan); color: #000a0c; border: none;
  display: grid; place-items: center; flex-shrink: 0;
  transition: background .15s, transform .1s;
}
.chat-send-btn:hover { background: #00c8e0; transform: scale(1.05); box-shadow: 0 0 14px rgba(0,229,255,.3); }

.chat-back-btn { display: none; flex-shrink: 0; }

@media (max-width: 900px) {
  .chat-page { height: calc(100dvh - var(--top-h)); border-radius: 0; border: 0; }
  .chat-list { width: 260px; }
}


/* ════════════════════════════════════════════════════
   RESPONSIVE — 1280 · 1100 · 900 · 600 · 400
════════════════════════════════════════════════════ */

/* ── Small desktop (1280px) ── */
@media (max-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* ── Laptop (1100px) ── */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .col-2  { grid-column: span 1; }
  .search-box { width: min(260px, 26vw); }
}

/* ── Tablet landscape (900px) — ajusta grids, sidebar continua no fluxo ── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .chat-page { height: calc(100dvh - var(--top-h)); border-radius: 0; border: 0; }
  .chat-list { width: 240px; }
}

/* ════════════════════════════════════════════════════
   RAIL VERSION LABEL
════════════════════════════════════════════════════ */
.rail-version {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  margin: 0 0 4px;
  overflow: hidden;
}
.rail-version-icon {
  width: 28px; height: 28px;
  background: rgba(37,99,235,.18);
  border-radius: 7px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.rail-version-info {
  flex: 1; min-width: 0;
  max-width: 0; overflow: hidden; opacity: 0;
  transition: max-width .22s ease, opacity .18s ease;
}
.rail.expanded .rail-version-info { max-width: 140px; opacity: 1; }
.rail-version-name { font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap; letter-spacing:.04em; }
.rail-version-tag  { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--ink-3); white-space: nowrap; margin-top: 1px; }
.rail-version-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   DASHBOARD PAGE
════════════════════════════════════════════════════ */
.dash-page { display: flex; flex-direction: column; gap: 18px; }

.dash-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.dash-greeting { font-family:'Space Grotesk',sans-serif; font-size: 26px; font-weight: 700; color: var(--ink-1); margin-bottom: 5px; }
.dash-greeting-sub { font-size: 13.5px; color: var(--ink-2); }
.dash-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dash-date-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border-md);
  border-radius: 10px;
  background: var(--s2);
  color: var(--ink-2); font-size: 12.5px;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.dash-date-pill:hover { border-color: var(--border-hi); color: var(--ink); }

/* KPI Row */
.dash-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.dash-kpi-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 14px;
  transition: border-color .15s, transform .15s;
}
.dash-kpi-card:hover { border-color: var(--border-md); transform: translateY(-1px); }
.dash-kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.dash-kpi-body { flex: 1; min-width: 0; }
.dash-kpi-label { font-size: 12px; color: var(--ink-2); display: block; margin-bottom: 5px; }
.dash-kpi-value { font-family:'Space Grotesk',sans-serif; font-size: 22px; font-weight: 700; color: var(--ink-1); line-height: 1.1; margin-bottom: 5px; }
.dash-kpi-foot  { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dash-kpi-period { font-size: 11px; color: var(--ink-3); }
.dash-kpi-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }

/* Mid Row */
.dash-mid-row {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
}

/* Melgrim Index */
.melgrim-index-card {
  display: grid;
  grid-template-columns: 190px 1fr 180px;
  gap: 16px;
  padding: 28px 28px;
  background: linear-gradient(135deg, var(--s1) 0%, rgba(37,99,235,.055) 100%);
  align-items: center;
}
.mi-left { display: flex; flex-direction: column; align-items: flex-start; }
.mi-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 12px;
}
.mi-score { font-family:'Space Grotesk',sans-serif; font-size: 60px; font-weight: 700; color: var(--ink-1); line-height: 1; margin-bottom: 8px; }
.mi-total { font-size: 26px; color: var(--ink-3); font-weight: 400; }
.mi-status { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink); margin-bottom: 5px; }
.mi-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink:0; }
.mi-change { font-size: 12px; color: var(--green); }
.mi-visual { display: flex; align-items: center; justify-content: center; }
.mountain-svg {
  width: 100%; max-width: 280px;
  animation: mountainPulse 4s ease-in-out infinite;
}
@keyframes mountainPulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(37,99,235,.25)); }
  50%       { filter: drop-shadow(0 0 28px rgba(96,165,250,.55)) drop-shadow(0 0 55px rgba(37,99,235,.18)); }
}
.mi-metrics { display: flex; flex-direction: column; gap: 8px; }
.mi-metric-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.mi-metric-label { flex: 1; font-size: 12px; color: var(--ink-2); }
.mi-metric-val   { font-family:'Space Grotesk',sans-serif; font-size: 13px; font-weight: 700; color: var(--ink); }
.mi-metric-pct   { font-size: 11px; color: var(--ink-3); min-width: 30px; text-align: right; }

/* Melgrim AI */
.melgrim-ai-card { padding: 22px 22px; }
.ai-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ai-title { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.ai-badge { background: rgba(251,191,36,.14); color: #fbbf24; border: 1px solid rgba(251,191,36,.22); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.ai-sub   { font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.ai-insights { display: flex; flex-direction: column; gap: 8px; }
.ai-insight-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer; transition: background .14s, border-color .14s;
}
.ai-insight-row:hover { background: rgba(255,255,255,.06); border-color: var(--border-md); }
.ai-insight-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.ai-insight-text { flex: 1; min-width: 0; }
.ai-insight-text strong { display: block; font-size: 12.5px; color: var(--ink); }
.ai-insight-text small  { display: block; font-size: 11px; color: var(--ink-3); }
.ai-link { display: flex; align-items: center; gap: 5px; margin-top: 14px; border: 0; background: none; color: var(--primary); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.ai-link:hover { color: var(--primary-h); }

/* Bottom Row */
.dash-bot-row {
  display: grid;
  grid-template-columns: 1fr 200px 240px;
  gap: 14px;
}

/* Activity Feed */
.dash-activity-card { padding: 18px 20px; }
.dash-activity-list { display: flex; flex-direction: column; gap: 3px; }
.dash-activity-row  {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-radius: var(--r);
  transition: background .12s;
}
.dash-activity-row:hover { background: rgba(255,255,255,.04); }
.dash-act-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.dash-act-info { flex: 1; min-width: 0; }
.dash-act-info strong { display: block; font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-act-info small  { display: block; font-size: 11px; color: var(--ink-3); }
.dash-act-time { font-size: 11px; color: var(--ink-3); white-space: nowrap; font-family:'DM Mono',monospace; }

/* Meta Mensal */
.dash-goal-card {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
}
.dash-goal-logo { color: var(--ink-3); flex-shrink: 0; }
.dash-goal-bar-wrap { height: 5px; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.dash-goal-bar      { height: 100%; background: var(--primary); border-radius: 999px; transition: width .7s ease; }
.dash-goal-right    { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }

/* Responsive */
@media (max-width: 1100px) {
  .dash-mid-row { grid-template-columns: 1fr; }
  .melgrim-index-card { grid-template-columns: 160px 1fr 160px; padding: 20px; }
  .dash-bot-row { grid-template-columns: 1fr 200px; }
  .dash-activity-card { grid-column: span 2; }
  .dash-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .dash-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .melgrim-index-card { grid-template-columns: 1fr; }
  .mi-visual, .mi-metrics { display: none; }
  .dash-bot-row { grid-template-columns: 1fr; }
  .dash-activity-card { grid-column: span 1; }
  .dash-header { flex-direction: column; }
  .dash-header-actions { flex-wrap: wrap; }
}

/* ── Mobile (700px) — sidebar vira overlay, hamburger aparece ── */
@media (max-width: 700px) {
  .mob-menu-btn { display: flex !important; align-items: center; justify-content: center; }

  .rail {
    position: fixed !important;
    left: 0; top: 0;
    height: 100dvh !important;
    width: var(--rail-w-exp) !important;
    margin-right: 0 !important;
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: none;
    transition: transform .28s cubic-bezier(.4,0,.2,1), box-shadow .28s ease !important;
  }
  .rail.expanded {
    transform: translateX(0);
    box-shadow: 6px 0 40px rgba(0,0,0,.7);
  }
  .rail .link-label                  { max-width: 200px !important; opacity: 1 !important; }
  .rail .brand-name                  { max-width: 140px !important; opacity: 1 !important; }
  .rail .group-full                  { max-width: 180px !important; opacity: 1 !important; }
  .rail .group-abbr                  { max-width: 0    !important; opacity: 0 !important; }
  .rail .rail-action-btn .link-label { max-width: 200px !important; opacity: 1 !important; }
  .workspace { width: 100%; }

  #cold-script-panel {
    width: 100vw !important;
    border-left: 0 !important;
  }

  .cold-batch-topbar {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }
  .cold-batch-topbar > p {
    order: 20;
    flex-basis: 100% !important;
    font-size: 12px !important;
  }
  .cold-batch-split {
    flex-direction: column !important;
    overflow-y: auto !important;
  }
  .cold-batch-list {
    width: 100% !important;
    height: min(45dvh, 360px) !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  }
  .cold-batch-detail {
    min-height: 55dvh !important;
    overflow: visible !important;
  }
}

/* ── Grande celular (600px) ── */
@media (max-width: 600px) {
  .content-area { padding: 16px 14px 24px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .col-2  { grid-column: span 1; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }

  /* Topbar: 3 colunas — hamburger | marca centralizada | ações */
  .topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    padding: 0 12px;
  }
  .topbar-brand {
    display: block;
    text-align: center;
    font-size: 11px;
    letter-spacing: .06em;
    align-self: center;
  }
  .topbar-actions { justify-self: end; }
  .search-box { display: none; }
  kbd { display: none; }

  .page-hero { flex-direction: column; align-items: flex-start; gap: 10px; padding-bottom: 14px; margin-bottom: 14px; }
  .page-hero h2 { font-size: 24px; }
  .hero-actions { width: 100%; }

  .kanban-toolbar .kpi-card { display: none; }
  .kanban-page { height: calc(100dvh - var(--top-h) - 44px); }

  .chat-page .chat-window { display: none; }
  .chat-page.mob-chat-open .chat-list { display: none; }
  .chat-page.mob-chat-open .chat-window { display: flex; }
  .chat-back-btn { display: grid !important; }

  #coldProspDetail [style*="grid-template-columns:1fr 1fr"],
  #panelContent [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  #coldProspDetail [style*="white-space:nowrap"],
  #panelContent [style*="white-space:nowrap"] {
    white-space: normal !important;
  }
}

/* ── Celular pequeno (400px) ── */
@media (max-width: 400px) {
  .kpi-row { grid-template-columns: 1fr; }
  .topbar-actions { gap: 4px; }
  .user-info { display: none; }
  .content-area { padding: 12px 10px 20px; }
}

/* ════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--s2);
  border: 1px solid var(--border-md);
  border-radius: var(--r);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  font-size: 13.5px; color: var(--ink);
  transform: translateY(80px); opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  max-width: 380px; pointer-events: none;
}
.toast.visible { transform: translateY(0); opacity: 1; }
.toast-ok   { border-color: rgba(52,211,153,.3); }
.toast-bad  { border-color: rgba(248,113,113,.3); color: #fca5a5; }
.toast-warn { border-color: rgba(251,191,36,.3);  color: #fcd34d; }

/* ════════════════════════════════════════════════════
   LOGIN SCREEN
════════════════════════════════════════════════════ */
#loginOverlay,
#setPasswordOverlay {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: stretch;
  background: #060e1e;
}

/* ── Split layout ── */
.lv2-wrap { display: flex; width: 100%; height: 100%; }

/* Left panel */
.lv2-left {
  flex: 0 0 58%;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg,
      #060e1e 0%,
      #060e1e 20%,
      rgba(6,14,30,.88) 42%,
      rgba(5,11,24,.55) 62%,
      rgba(3,8,18,.20) 82%,
      rgba(2,6,14,.08) 100%
    ),
    url('https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1400&q=80') bottom center/cover no-repeat;
  padding: 56px 72px 0;
  overflow: hidden;
  position: relative;
}
.lv2-left-inner { flex: 1; display: flex; flex-direction: column; }

.lv2-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.lv2-brand-name {
  font-size: 20px; font-weight: 700; color: #f0f4ff; letter-spacing: -.01em;
}

.lv2-hero { margin-bottom: 0; }
.lv2-hero h1 {
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 800;
  color: #f0f4ff;
  line-height: 1.12;
  margin-bottom: 20px;
  letter-spacing: -.03em;
}
.lv2-accent { color: #2563eb; }
.lv2-hero p {
  font-size: 16px;
  color: rgba(180,200,240,.6);
  line-height: 1.7;
  max-width: 460px;
}

.lv2-features {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-top: auto;
  padding-bottom: 0;
}
.lv2-feat {
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
  padding: 0 20px;
  border-right: 1px solid rgba(255,255,255,.07);
}
.lv2-feat:first-child { padding-left: 0; }
.lv2-feat:last-child { border-right: none; padding-right: 0; }
.lv2-feat-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: rgba(37,99,235,.15);
  border: 1px solid rgba(37,99,235,.25);
  display: flex; align-items: center; justify-content: center;
  color: #60a5fa;
  margin-bottom: 8px;
}
.lv2-feat strong {
  font-size: 12.5px; font-weight: 700; color: #e2e8f0;
}
.lv2-feat small {
  font-size: 11.5px; color: rgba(160,185,220,.5); line-height: 1.4;
}

.lv2-mountain { display: none; }

.lv2-left-footer {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: rgba(140,165,200,.35);
  padding: 20px 0 28px;
  flex-shrink: 0;
}

/* Right panel */
.lv2-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #040b18;
  padding: 48px 40px;
}
.lv2-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  background: #0a1828;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
  padding: 52px 48px;
  box-shadow: 0 32px 100px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06);
}
.lv2-card-logo {
  display: flex; justify-content: center;
  margin-bottom: 12px;
}
.lv2-card-title {
  font-size: 24px; font-weight: 800; color: #f0f4ff;
  text-align: center; margin-bottom: 6px; letter-spacing: -.02em;
}
.lv2-card-sub {
  font-size: 13.5px; color: rgba(160,185,220,.55);
  text-align: center; margin-bottom: 32px;
}

.lv2-field { margin-bottom: 16px; }
.lv2-field label {
  display: block;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  color: rgba(160,185,220,.55);
  margin-bottom: 7px;
}
.lv2-input-wrap {
  display: flex; align-items: center;
  gap: 12px;
  padding: 0 14px 0 16px;
  height: 52px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
}
.lv2-input-wrap:focus-within {
  border-color: rgba(37,99,235,.55);
  background: rgba(37,99,235,.06);
}
.lv2-input-wrap > i:first-child {
  color: rgba(120,150,200,.45);
  pointer-events: none;
  flex-shrink: 0;
}
.lv2-input-wrap input {
  flex: 1;
  height: 100%;
  padding: 0;
  background: none;
  border: none;
  outline: none;
  color: #f0f4ff;
  font: 500 14px/1 Inter, system-ui, sans-serif;
  min-width: 0;
}
.lv2-input-wrap input::placeholder { color: rgba(120,150,200,.35); }
.lv2-eye-btn {
  background: none; border: none;
  color: rgba(120,150,200,.45); cursor: pointer;
  display: flex; align-items: center;
  padding: 4px; flex-shrink: 0;
}
.lv2-eye-btn:hover { color: rgba(160,185,220,.8); }

.lv2-row-opts {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.lv2-remember {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: rgba(160,185,220,.65);
  cursor: pointer;
}
.lv2-remember input[type="checkbox"] { accent-color: #2563eb; width: 14px; height: 14px; cursor: pointer; }
.lv2-forgot {
  background: none; border: none;
  color: #2563eb; font-size: 13px; cursor: pointer;
  padding: 0; transition: color .15s;
}
.lv2-forgot:hover { color: #60a5fa; }

.login-err { display: none; font-size: 12.5px; color: #fca5a5; margin-bottom: 10px; }
.login-err.visible { display: block; }

.lv2-btn-primary {
  width: 100%; height: 50px;
  border-radius: 11px; border: none;
  background: #2563eb; color: #fff;
  font: 700 15px/1 Inter, system-ui, sans-serif;
  letter-spacing: .01em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(37,99,235,.4);
  transition: background .15s, box-shadow .15s;
  margin-bottom: 20px;
}
.lv2-btn-primary:hover { background: #1d4ed8; box-shadow: 0 6px 28px rgba(37,99,235,.5); }

.lv2-or {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
  color: rgba(120,150,200,.35); font-size: 12px;
}
.lv2-or::before, .lv2-or::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,.08);
}

.lv2-btn-google {
  width: 100%; height: 48px;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #e2e8f0;
  font: 600 14px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 28px;
  transition: background .15s, border-color .15s;
}
.lv2-btn-google:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }

.lv2-card-footer {
  text-align: center; font-size: 13px;
  color: rgba(140,165,200,.45);
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .lv2-left { display: none; }
  .lv2-right { width: 100%; border: none; }
}

.login-link-btn {
  display: block;
  margin: 18px auto 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 12px;
}
.login-link-btn:hover { color: var(--cyan); }
.login-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0; color: var(--ink-3); font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ════════════════════════════════════════════════════
   MODAL
════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--s1);
  border: 1px solid var(--border-md);
  border-radius: var(--r-lg);
  width: 100%; max-width: 520px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  transform: translateY(16px) scale(.98);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}

:root.light-mode .modal,
:root.light-mode .panel,
:root.light-mode .kpi-v2,
:root.light-mode .client-card,
:root.light-mode .setting-card,
:root.light-mode .chat-list,
:root.light-mode .chat-window,
:root.light-mode .pl-view {
  background: rgba(244,245,242,.88);
  border-color: rgba(24,28,34,.12);
  box-shadow: 0 18px 44px rgba(35,41,49,.12), inset 0 1px 0 rgba(255,255,255,.8);
}

:root.light-mode .modal-overlay {
  background: rgba(28,33,40,.28);
}

:root.light-mode .ctrl-btn,
:root.light-mode .kpi-v2-icon,
:root.light-mode .slug-suffix {
  background: rgba(233,235,231,.82);
  border-color: rgba(24,28,34,.12);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 16px; margin: 0; }
.modal-body {
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.slug-input-wrap { display: flex; align-items: stretch; }
.slug-input-wrap input { border-radius: var(--r) 0 0 var(--r); flex: 1; min-width: 0; }
.slug-suffix {
  padding: 0 12px; display: flex; align-items: center;
  background: var(--s3); border: 1px solid var(--border);
  border-left: 0; border-radius: 0 var(--r) var(--r) 0;
  color: var(--ink-3); font-size: 12.5px; white-space: nowrap;
}

/* ════════════════════════════════════════════════════
   CLIENT CONTROL PANEL
════════════════════════════════════════════════════ */
.ctrl-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 4px;
}
.ctrl-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px; padding: 12px 14px;
  border-radius: var(--r);
  background: var(--s2); border: 1px solid var(--border);
  color: var(--ink-2); text-align: left;
  transition: border-color .15s, background .15s, color .15s;
}
.ctrl-btn:hover { border-color: var(--border-md); background: var(--s3); color: var(--ink); }
.ctrl-btn strong { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.ctrl-btn span   { font-size: 11.5px; line-height: 1.3; }
.ctrl-btn.danger { border-color: rgba(248,113,113,.2); }
.ctrl-btn.danger:hover { border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.06); }
.ctrl-btn.danger strong { color: var(--red); }
.ctrl-btn.success { border-color: rgba(52,211,153,.2); }
.ctrl-btn.success:hover { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.04); }
.ctrl-btn.success strong { color: var(--green); }

.audit-log { display: flex; flex-direction: column; }
.audit-entry {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.audit-entry:last-child { border-bottom: 0; }
.audit-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-md); flex-shrink: 0; margin-top: 5px;
}
.audit-dot.ok   { background: var(--green); }
.audit-dot.warn { background: var(--yellow); }
.audit-dot.bad  { background: var(--red); }
.audit-body { flex: 1; min-width: 0; }
.audit-text { color: var(--ink-2); display: block; }
.audit-who  { color: var(--ink-3); font-size: 11px; }
.audit-time { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; margin-left: auto; }

/* ── TOGGLE SWITCH ─────────────────────────────────── */
.toggle-btn {
  position: relative; width: 38px; height: 22px;
  border-radius: 11px; border: none; cursor: pointer;
  background: var(--surface-2); transition: background .2s;
  flex-shrink: 0; padding: 0;
}
.toggle-btn.on { background: var(--cyan); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink-3); transition: transform .2s, background .2s;
  display: block;
}
.toggle-btn.on .toggle-thumb { transform: translateX(16px); background: #0a0a0f; }

/* ════════════════════════════════════════════════════
   DASHBOARD V2 — KPI, CHARTS, LIST
════════════════════════════════════════════════════ */
:root {
  --surface-1: var(--s1);
  --surface-2: var(--s2);
}

/* 4-column KPI grid */
.kpi-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

/* KPI v2 card */
.kpi-v2 {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.045);
  position: relative;
  overflow: hidden;
}
.kpi-v2::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.09), transparent);
  pointer-events: none;
}
.kpi-v2-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.kpi-v2-label {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
}
.kpi-v2-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--s2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-v2-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -.5px;
}
.kpi-v2-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.kpi-v2-period { font-size: 11px; color: var(--ink-3); }
.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.kpi-trend.up   { background: rgba(52,211,153,.12); color: #34d399; }
.kpi-trend.down { background: rgba(248,113,113,.12); color: #f87171; }
.kpi-trend.warn { background: rgba(251,191,36,.12);  color: #fbbf24; }

/* Charts row (analytics + donut) */
.dash-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.analytics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
  margin-bottom: 16px;
}
.analytics-head h3 { font-size: 14px; font-weight: 600; }
.analytics-controls { display: flex; align-items: center; gap: 8px; }
.atabs {
  display: flex;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.atab {
  border: none;
  background: none;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s;
}
.atab.active {
  background: var(--s1);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.analytics-chart-wrap {
  padding: 0 16px 16px;
  height: 220px;
}

/* Revenue donut panel */
.revenue-panel { display: flex; flex-direction: column; }
.revenue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 0;
  margin-bottom: 8px;
}
.revenue-head h3 { font-size: 14px; font-weight: 600; }
.donut-legend {
  display: flex;
  gap: 14px;
  padding: 0 18px;
  margin-bottom: 8px;
}
.donut-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.donut-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.donut-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px 20px;
  min-height: 180px;
}
.donut-wrap canvas { max-width: 190px; max-height: 190px; }
.donut-center {
  position: absolute;
  text-align: center;
  pointer-events: none;
}
.donut-center strong {
  display: block;
  font-size: 15px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.donut-center small {
  font-size: 10.5px;
  color: var(--ink-3);
  display: block;
  margin-top: 3px;
}

/* Dashboard client list */
.dash-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.dash-list-head h3 { font-size: 14px; font-weight: 600; }
.list-controls { display: flex; align-items: center; gap: 8px; }
.list-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
}
.list-search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 12px;
  width: 150px;
}

/* Stage badges */
.stage-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.stage-ativo        { background: rgba(52,211,153,.12); color: #34d399; border: 1px solid rgba(52,211,153,.2); }
.stage-trial        { background: rgba(251,191,36,.12);  color: #fbbf24; border: 1px solid rgba(251,191,36,.2); }
.stage-inadimplente { background: rgba(248,113,113,.12); color: #f87171; border: 1px solid rgba(248,113,113,.2); }
.stage-provisionando{ background: rgba(139,92,246,.12);  color: #a78bfa; border: 1px solid rgba(139,92,246,.2); }

/* Financeiro monthly chart */
.fin-chart-wrap { height: 200px; padding: 0 16px 16px; }

/* Responsive */
@media (max-width: 1100px) {
  .dash-charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .kpi-row-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .kpi-row-4 { grid-template-columns: 1fr 1fr; }
  .kpi-v2-value { font-size: 20px; }
}

/* ════════════════════════════════════════════════════
   REFERENCE UI PASS — Melgrim OS dashboard shell
════════════════════════════════════════════════════ */
:root {
  --bg: #020715;
  --s1: rgba(8,18,40,.86);
  --s2: rgba(12,28,62,.78);
  --s3: rgba(20,42,86,.86);
  --border: rgba(74,116,220,.24);
  --border-md: rgba(92,136,245,.34);
  --border-hi: rgba(100,151,255,.58);
  --ink-1: #f5f8ff;
  --ink: #e7edff;
  --ink-2: #a3acc6;
  --ink-3: #66728f;
  --ink-4: #384560;
  --primary: #2f6dff;
  --primary-h: #3e7cff;
  --cyan: #45a3ff;
  --blue: #2f6dff;
  --purple: #8b5cf6;
  --green: #20d6a0;
  --red: #ff5f6d;
  --rail-w: 220px;
  --rail-w-exp: 220px;
  --top-h: 0px;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 38% 18%, rgba(47,109,255,.18), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(69,163,255,.11), transparent 24%),
    linear-gradient(180deg, #020715 0%, #050b1b 54%, #030817 100%);
}

h1,h2,h3,h4,
.brand-name,
.brand-logo-text,
.login-brand-name,
.dash-greeting,
.dash-kpi-value,
.mi-score,
.kpi-v2-value {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
  letter-spacing: 0;
}

.app-shell {
  gap: 32px;
  padding: 14px 18px 14px 0;
}

.workspace {
  position: relative;
  height: calc(100dvh - 28px);
  min-width: 0;
}

.content-area {
  height: 100%;
  padding: 52px 0 0;
  background:
    linear-gradient(rgba(76,126,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76,126,255,.035) 1px, transparent 1px);
  background-size: 24px 24px;
  border-radius: 0;
}

.content-area.full-bleed {
  padding: 0;
}

.topbar {
  position: absolute;
  top: 4px;
  right: 0;
  z-index: 30;
  width: auto;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar::before,
.topbar-brand {
  display: none;
}
.topbar-actions {
  gap: 16px;
}
.search-box {
  width: 356px;
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(4,10,27,.78);
  border-color: rgba(71,108,206,.36);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 0 0 1px rgba(0,0,0,.18);
}
.search-box input {
  font-size: 13px;
}
.search-box input::placeholder {
  color: #7280a0;
}
kbd {
  border-color: rgba(100,130,210,.26);
  background: rgba(255,255,255,.03);
  color: #7d89a8;
}
.icon-btn,
.user-chip {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(8,18,42,.82);
  border-color: rgba(71,108,206,.36);
  color: #c8d4f4;
}
.user-chip {
  width: auto;
  min-width: 156px;
  padding: 4px 12px 4px 4px;
  gap: 10px;
}
.avatar {
  background: radial-gradient(circle at 30% 20%, rgba(90,157,255,.45), rgba(8,15,34,.92));
  border: 1px solid rgba(111,160,255,.62);
  color: #f5f8ff;
}
.user-info strong {
  color: #f5f8ff;
  font-weight: 600;
}
.user-info small {
  color: #8e99b7;
}

@media (min-width: 701px) {
  .rail,
  .rail.expanded {
    width: 220px !important;
    height: calc(100dvh - 28px);
    margin: 14px 0 14px 14px !important;
    border-radius: 22px;
    background:
      radial-gradient(circle at 88% 14%, rgba(47,109,255,.14), transparent 34%),
      linear-gradient(180deg, rgba(5,11,27,.98), rgba(3,8,22,.98));
    border: 1px solid rgba(71,108,206,.22);
    box-shadow: 0 28px 80px rgba(0,0,0,.46), inset 1px 0 0 rgba(255,255,255,.04);
  }
  .rail .brand-name,
  .rail .link-label,
  .rail .rail-action-btn .link-label,
  .rail .rail-version-info {
    max-width: 180px !important;
    opacity: 1 !important;
  }
  .rail .group-abbr,
  .rail .group-full,
  .nav-group-title,
  .nav-divider {
    display: none !important;
  }
  .rail-link,
  .rail.expanded .rail-link {
    justify-content: flex-start;
    min-height: 48px;
    padding: 0 14px 0 16px;
    gap: 14px;
    border-radius: 12px;
    color: #c3cce2;
    font-size: 14px;
  }
  .rail-link svg {
    width: 21px;
    height: 21px;
  }
  .rail-link.active {
    color: #fff;
    background:
      radial-gradient(circle at 95% 50%, rgba(68,139,255,.95), transparent 38%),
      linear-gradient(90deg, rgba(48,111,255,.48), rgba(32,71,160,.22));
    border-color: rgba(85,142,255,.76);
    box-shadow: 0 0 0 1px rgba(60,120,255,.18), 0 0 32px rgba(47,109,255,.48), inset 0 1px 0 rgba(255,255,255,.10);
  }
  .rail-link:hover {
    color: #fff;
    background: rgba(35,70,150,.20);
    border-color: rgba(86,130,230,.28);
  }
  .rail-top {
    min-height: 78px;
    padding: 22px 22px 12px;
    gap: 0;
    border-bottom: 0;
  }
  .brand-logo {
    width: 126px;
  }
  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
  }
  .brand-mark svg {
    width: 48px;
    height: 30px;
  }
  .brand-mark polygon,
  .rail-version-icon polygon,
  .dash-goal-logo polygon {
    fill: #2f6dff;
  }
  .brand-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
  }
  .rail-nav {
    padding: 4px 18px 14px;
    gap: 4px;
  }
  .nav-divider {
    margin: 4px 4px;
  }
  .nav-group {
    margin-bottom: 0;
  }
  .nav-group-title {
    height: 20px;
    margin: 4px 0 2px;
    padding: 0 12px;
  }
  .group-full {
    font-size: 9px;
    letter-spacing: .08em;
  }
  .rail-link,
  .rail.expanded .rail-link {
    min-height: 38px;
    border-radius: 10px;
  }
  .rail.expanded .rail-link {
    padding: 0 12px;
    gap: 9px;
  }
  .rail-link svg {
    width: 17px;
    height: 17px;
  }
  .rail.expanded .rail-link .link-label {
    font-size: 12px;
    max-width: 152px;
  }
  .rail-bottom {
    padding: 18px 22px 24px;
    border-top: 0;
    gap: 16px;
  }
  #themeToggle {
    display: none;
  }
  .rail-version {
    height: 76px;
    padding: 16px 18px;
    border-radius: 14px;
    border-color: rgba(71,108,206,.24);
    background: rgba(8,18,42,.72);
  }
  .rail-version-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(47,109,255,.18);
    border: 1px solid rgba(80,130,255,.28);
  }
  .rail-version-name {
    color: #f5f8ff;
    font-size: 13px;
    letter-spacing: 0;
  }
  .rail-version-tag {
    color: #7f8ba8;
    font-size: 11px;
  }
  .rail-action-btn.rail-toggle-btn {
    width: 38px;
    min-height: 38px;
    margin: 22px auto 0;
    padding: 0;
    color: #8b98b6;
    background: transparent;
  }
  .rail-action-btn.rail-toggle-btn .link-label {
    display: none;
  }
}

.panel,
.kpi-v2,
.dash-kpi-card,
.client-card,
.chat-list,
.chat-window,
.pl-view {
  background:
    linear-gradient(145deg, rgba(12,26,58,.88), rgba(5,13,32,.88));
  border: 1px solid rgba(71,108,206,.32);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 46px rgba(0,0,0,.24);
}

.primary-btn {
  height: 42px;
  padding: 0 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f6dff, #2456d9);
  border-color: rgba(100,151,255,.42);
  box-shadow: 0 12px 28px rgba(47,109,255,.26), inset 0 1px 0 rgba(255,255,255,.14);
  color: #fff;
  font-weight: 700;
}
.ghost-btn {
  border-radius: 10px;
  background: rgba(13,29,67,.66);
  border-color: rgba(71,108,206,.28);
  color: #c6d2f0;
}

.dash-page {
  max-width: 1252px;
  margin: 0 auto;
  gap: 18px;
  padding: 0 2px 26px;
}
.dash-header {
  min-height: 84px;
  align-items: flex-end;
  padding-right: 0;
}
.dash-greeting {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 8px;
}
.dash-greeting-sub {
  font-size: 14px;
  color: #9ca8c2;
}
.dash-header-actions {
  margin-right: 0;
}
.dash-date-pill {
  height: 42px;
  border-radius: 12px;
  padding: 0 18px;
  background: rgba(6,14,34,.72);
  border-color: rgba(71,108,206,.34);
  color: #d5def4;
}
.dash-kpi-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.dash-kpi-card {
  position: relative;
  min-height: 140px;
  padding: 26px 20px 18px;
  overflow: hidden;
  align-items: flex-start;
  gap: 18px;
}
.dash-kpi-card::before {
  content: "";
  position: absolute;
  inset: -1px auto auto 0;
  width: 42%;
  height: 2px;
  background: linear-gradient(90deg, #2f6dff, transparent);
  opacity: .85;
}
.dash-kpi-spark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 58px;
  opacity: .82;
  pointer-events: none;
}
.dash-kpi-spark path {
  fill: none;
  stroke: #2f6dff;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 8px rgba(47,109,255,.55));
}
.dash-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 18px;
  border: 1px solid rgba(111,160,255,.24);
}
.dash-kpi-label {
  font-size: 14px;
  color: #98a4bf;
}
.dash-kpi-value {
  font-size: 26px;
  font-weight: 500;
}
.dash-kpi-period {
  color: #838eaa;
}
.dash-mid-row {
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 18px;
}
.melgrim-index-card {
  min-height: 324px;
  grid-template-columns: 205px minmax(340px, 1fr) 230px;
  padding: 36px 40px;
  overflow: hidden;
  background:
    radial-gradient(circle at 57% 60%, rgba(47,109,255,.22), transparent 44%),
    linear-gradient(145deg, rgba(12,26,58,.90), rgba(5,13,32,.92));
}
.mi-score {
  font-size: 68px;
  font-weight: 600;
}
.mi-total {
  font-size: 32px;
}
.mi-status {
  font-size: 18px;
}
.mi-visual {
  min-height: 250px;
}
.mountain-svg {
  max-width: 520px;
  min-width: 360px;
}
.mi-metrics {
  gap: 12px;
}
.mi-metric-row {
  min-height: 44px;
  border-radius: 12px;
  background: rgba(7,17,40,.62);
  border-color: rgba(71,108,206,.24);
}
.melgrim-ai-card {
  padding: 30px 24px;
}
.ai-title {
  font-size: 15px;
  color: #cbd6f4;
  letter-spacing: 0;
}
.ai-badge {
  color: #86a9ff;
  background: rgba(47,109,255,.14);
  border-color: rgba(91,137,255,.36);
}
.ai-sub {
  margin: 12px 0 18px;
  font-size: 14px;
}
.ai-insights {
  gap: 10px;
}
.ai-insight-row {
  min-height: 62px;
  border-radius: 12px;
  background: rgba(9,23,54,.72);
  border-color: rgba(71,108,206,.22);
}
.dash-bot-row {
  grid-template-columns: minmax(0, 1fr) 252px 370px;
  gap: 18px;
}
.analytics-head,
.revenue-head {
  padding: 24px 24px 0;
}
.analytics-head h3,
.revenue-head h3,
.dash-list-head h3 {
  font-size: 15px;
  font-weight: 700;
}
.analytics-chart-wrap {
  height: 230px;
  padding: 0 24px 20px;
}
.atabs {
  height: 36px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(8,18,42,.86);
}
.atab {
  border-radius: 8px;
  padding: 0 16px;
}
.atab.active {
  background: rgba(47,109,255,.20);
  color: #eef4ff;
}
.revenue-panel {
  min-height: 272px;
}
.donut-wrap {
  min-height: 176px;
}
.donut-wrap canvas {
  max-width: 150px;
  max-height: 150px;
}
.dash-activity-card {
  padding: 24px;
}
.dash-list-head {
  padding: 0 0 16px;
  border-bottom-color: rgba(71,108,206,.18);
}
.dash-activity-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(71,108,206,.14);
}
.dash-act-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.dash-goal-card {
  min-height: 72px;
  padding: 16px 24px;
  border-radius: 14px;
}
.dash-goal-logo {
  color: #2f6dff;
}
.dash-goal-bar {
  background: linear-gradient(90deg, #2f6dff, #6aa2ff);
  box-shadow: 0 0 16px rgba(47,109,255,.55);
}

@media (max-width: 1250px) and (min-width: 701px) {
  .app-shell { gap: 22px; }
  .dash-page { max-width: 100%; }
  .dash-mid-row { grid-template-columns: minmax(0, 1fr) 300px; }
  .melgrim-index-card { grid-template-columns: 190px minmax(240px,1fr) 180px; padding: 28px; }
  .mountain-svg { min-width: 250px; }
  .dash-bot-row { grid-template-columns: minmax(0, 1fr) 220px 260px; }
}

/* Prospecção Ativa reference layout */
.prospec-page {
  height: calc(100dvh - 96px);
  min-height: 0;
  padding: 0 22px 14px;
  gap: 16px;
  color: #f7faff;
}
.prosp-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 54px;
  flex-shrink: 0;
}
.prosp-hero h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}
.prosp-hero p {
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8d9abb;
  font-size: 13px;
}
.prosp-hero p span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.24);
  color: #22c55e;
  font-size: 11px;
  font-weight: 700;
}
.prosp-primary-btn,
.prosp-tool-btn,
.prosp-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(83,134,255,.42);
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.prosp-primary-btn {
  min-height: 40px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(135deg, #2f6dff, #1757ee);
  box-shadow: 0 14px 34px rgba(47,109,255,.36);
}
.prosp-tool-btn,
.prosp-mini-btn {
  min-height: 38px;
  padding: 0 14px;
  color: #c9d5f2;
  background: rgba(7,15,35,.78);
  border-color: rgba(71,108,206,.26);
}
.prosp-mini-btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
  color: #a8b5d3;
}
.prosp-top-grid {
  display: grid;
  grid-template-columns: minmax(420px, 2.15fr) repeat(4, minmax(150px, 1fr));
  gap: 14px;
  flex-shrink: 0;
}
.prosp-goals-card,
.prosp-kpi-card,
.prosp-bottom-summary {
  background: linear-gradient(145deg, rgba(11,24,54,.9), rgba(5,12,29,.92));
  border: 1px solid rgba(71,108,206,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 18px 42px rgba(0,0,0,.22);
}
.prosp-goals-card,
.prosp-kpi-card {
  min-height: 112px;
  border-radius: 8px;
  padding: 16px;
}
.prosp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.prosp-card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.prosp-card-head p {
  margin: 4px 0 0;
  color: #8290af;
  font-size: 12px;
}
.prosp-goals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}
.prosp-goal-person {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
}
.prosp-goal-name {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #a9b6d3;
}
.prosp-goal-name strong {
  color: #f3f7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prosp-goal-name span,
.prosp-goal-pct {
  color: #8d9abb;
  font-size: 11px;
  font-weight: 700;
}
.prosp-goal-track {
  height: 5px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(58,84,146,.42);
  overflow: hidden;
}
.prosp-goal-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.prosp-kpi-card {
  position: relative;
  overflow: hidden;
}
.prosp-kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #aab6d3;
  font-size: 13px;
}
.prosp-kpi-label i { color: var(--kpi); }
.prosp-kpi-card strong {
  display: block;
  margin-top: 16px;
  color: #f6f9ff;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}
.prosp-kpi-card p {
  margin: 11px 0 0;
  color: #8b98b6;
  font-size: 12px;
}
.prosp-kpi-card p span {
  color: #22c55e;
  font-weight: 800;
}
.prosp-kpi-spark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 92px;
  height: 40px;
  opacity: .82;
}
.prosp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
}
.prosp-left-tools,
.prosp-right-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.prosp-left-tools { flex: 1; }
.prosp-segmented {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(71,108,206,.24);
  background: rgba(5,13,32,.78);
  border-radius: 8px;
  flex-shrink: 0;
}
.prosp-segmented button {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #aebad5;
  font: 700 13px/1 inherit;
  cursor: pointer;
}
.prosp-segmented button.active {
  color: #fff;
  background: rgba(47,109,255,.36);
  box-shadow: inset 0 0 0 1px rgba(83,134,255,.42);
}
.prosp-filter-shell {
  flex: 0 1 420px;
  min-width: 280px;
}
.prosp-filter-shell > div {
  border: 1px solid rgba(71,108,206,.24);
  border-radius: 8px;
  background: rgba(5,13,32,.78);
  overflow: hidden;
}
.prosp-filter-shell > div > div:first-child {
  padding: 0 !important;
  border-bottom: 0 !important;
  min-height: 38px;
}
.prospec-page .view-toggle {
  height: 38px;
  border-radius: 8px;
  background: rgba(5,13,32,.78);
  border-color: rgba(71,108,206,.24);
}
.prospec-page .view-toggle-btn {
  border-radius: 6px;
  color: #9eabc9;
}
.prospec-page .view-toggle-btn.active {
  background: rgba(47,109,255,.42);
  color: #fff;
}
.prospec-page .kanban-board {
  gap: 8px;
  padding-bottom: 6px;
  min-height: 0;
}
.prospec-page .kanban-col {
  flex: 0 0 158px;
  border-radius: 8px;
  background: rgba(8,17,38,.88);
  border-color: rgba(71,108,206,.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 30px rgba(0,0,0,.22);
}
.prospec-page .kcol-topbar { height: 2px; }
.prospec-page .kanban-col-head {
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 10px 10px;
  border-bottom-color: rgba(71,108,206,.16);
}
.prospec-page .kcol-label {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #f2f6ff;
  font: 800 13px/1.15 'Inter', system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
  white-space: normal;
}
.prospec-page .prosp-col-total {
  display: block;
  margin-top: 9px;
  color: #a1acc8;
  font-size: 12px;
  font-weight: 700;
}
.prospec-page .kcol-count {
  min-width: 0;
  width: auto;
  height: auto;
  padding: 0;
  background: transparent !important;
  font-size: 0;
}
.prospec-page .kanban-cards {
  padding: 8px 8px 4px;
  gap: 6px;
}
.prospec-page .kanban-card {
  padding: 10px 8px;
  border-radius: 7px;
  border: 1px solid rgba(91,122,190,.28);
  border-left: 1px solid rgba(91,122,190,.28);
  background: rgba(13,27,59,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.prospec-page .kanban-card:hover {
  transform: translateY(-1px);
  background: rgba(18,36,76,.86);
  box-shadow: 0 12px 26px rgba(0,0,0,.26);
}
.prospec-page .kcard-header {
  gap: 0;
  margin-bottom: 8px;
}
.prospec-page .kcard-av { display: none; }
.prospec-page .kcard-name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.prospec-page .kcard-co {
  font-size: 10.5px;
  margin-top: 1px;
  color: rgba(140, 158, 198, .7);
}
.prospec-page .kcard-footer span { font-size: 10.5px; }
.prospec-page .kcard-chips {
  gap: 4px;
  margin-bottom: 0;
  margin-top: 7px;
}
.prospec-page .kchip {
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 9.5px;
}
.prospec-page .kcard-top {
  margin-bottom: 6px;
}
.prospec-page .kcard-badge {
  font-size: 9.5px;
  padding: 2px 7px;
}
.prospec-page .kcard-phone-row {
  margin-bottom: 0;
}
.prospec-page .kcard-phone {
  font-size: 11px;
  color: rgba(161, 178, 215, .75);
}
.prospec-page .kcard-delay {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 5px;
}
.prospec-page .kanban-add-btn {
  width: calc(100% - 16px);
  margin: 4px 8px 8px;
  padding: 8px 6px;
  border-radius: 6px;
  font-size: 10.5px;
}
.prosp-loading {
  flex: 1;
  display: grid;
  place-items: center;
  color: #8d9abb;
}
.prosp-bottom-summary {
  display: grid;
  grid-template-columns: 1.45fr 1.05fr 1fr .8fr;
  gap: 18px;
  flex-shrink: 0;
  padding: 18px;
  border-radius: 8px;
}
.prosp-bottom-summary h3 {
  margin: 0 0 14px;
  color: #aab6d3;
  font-size: 13px;
  font-weight: 700;
}
.prosp-summary-stats,
.prosp-rings {
  display: flex;
  align-items: center;
  gap: 24px;
}
.prosp-summary-stats span,
.prosp-rings span {
  color: #8d9abb;
  font-size: 12px;
}
.prosp-summary-stats strong,
.prosp-rings strong {
  display: block;
  margin-bottom: 5px;
  color: #f6f9ff;
  font-size: 22px;
  line-height: 1;
}
.prosp-rings span {
  min-width: 72px;
  min-height: 72px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(8,17,38,.92) 54%, transparent 56%),
    conic-gradient(from 180deg, #2f6dff 0 68%, rgba(71,108,206,.18) 68% 100%);
}
.prosp-rings em {
  display: block;
  max-width: 58px;
  color: #8d9abb;
  font-style: normal;
  font-size: 10px;
}
.prosp-activity-list,
.prosp-ranking {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.prosp-activity-list li,
.prosp-ranking li {
  display: grid;
  align-items: center;
  gap: 8px;
  color: #c7d2ee;
  font-size: 12px;
}
.prosp-activity-list li { grid-template-columns: 16px minmax(0, 1fr) auto; }
.prosp-activity-list small,
.prosp-ranking em {
  color: #7f8ba8;
  font-style: normal;
}
.prosp-ranking li { grid-template-columns: 18px minmax(0, 1fr) auto; }
.prosp-ranking span { color: #8d9abb; }

@media (max-width: 1200px) {
  .prosp-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prosp-goals-card { grid-column: 1 / -1; }
  .prosp-bottom-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .prospec-page { height: auto; min-height: 0; padding: 0 14px 18px; }
  .prosp-hero,
  .prosp-toolbar,
  .prosp-left-tools,
  .prosp-right-tools { align-items: stretch; flex-direction: column; }
  .prosp-top-grid,
  .prosp-bottom-summary { grid-template-columns: 1fr; }
  .prosp-goals-grid { grid-template-columns: 1fr; }
  .prosp-filter-shell { min-width: 0; width: 100%; flex-basis: auto; }
  .prospec-page .kanban-board { min-height: 520px; }
}

/* Prospecção Ativa proportion pass */
.prospec-page {
  height: calc(100dvh - 84px);
  padding: 0 20px 10px;
  gap: 9px;
}
.prosp-hero {
  min-height: 42px;
}
.prosp-hero h1 {
  font-size: 23px;
}
.prosp-hero p {
  margin-top: 4px;
  font-size: 11px;
}
.prosp-hero p span {
  padding: 2px 8px;
  font-size: 10px;
}
.prosp-primary-btn {
  min-height: 34px;
  padding: 0 18px;
}
.prosp-top-grid {
  gap: 10px;
}
.prosp-goals-card,
.prosp-kpi-card {
  min-height: 86px;
  padding: 10px 12px;
}
.prosp-card-head {
  margin-bottom: 8px;
}
.prosp-card-head h3 {
  font-size: 12px;
}
.prosp-card-head p {
  margin-top: 3px;
  font-size: 10px;
}
.prosp-mini-btn {
  min-height: 24px;
  padding: 0 8px;
  font-size: 10.5px;
}
.prosp-goals-grid {
  gap: 8px 12px;
}
.prosp-goal-person {
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  gap: 7px;
}
.prosp-goal-person .user-avatar-img,
.prosp-goal-person .user-avatar-fallback,
.prosp-goal-person .avatar {
  width: 28px !important;
  height: 28px !important;
}
.prosp-goal-name,
.prosp-goal-name span,
.prosp-goal-pct {
  font-size: 10px;
}
.prosp-goal-track {
  height: 4px;
  margin-top: 5px;
}
.prosp-kpi-label {
  font-size: 11px;
}
.prosp-kpi-card strong {
  margin-top: 10px;
  font-size: 24px;
}
.prosp-kpi-card p {
  margin-top: 7px;
  font-size: 10.5px;
}
.prosp-kpi-spark {
  right: 8px;
  bottom: 7px;
  width: 72px;
  height: 30px;
}
.prosp-toolbar {
  gap: 8px;
}
.prosp-left-tools,
.prosp-right-tools {
  gap: 8px;
}
.prosp-segmented button {
  height: 31px;
  padding: 0 13px;
  font-size: 12px;
}
.prosp-filter-shell > div > div:first-child {
  min-height: 32px;
}
.prospec-page .view-toggle {
  height: 32px;
}
.prospec-page .view-toggle-btn {
  padding: 5px 10px;
  font-size: 11px;
}
.prosp-tool-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 11px;
}
.prospec-page .kanban-board {
  flex: 1 1 auto;
  min-height: 380px;
  gap: 8px;
}
.prospec-page .kanban-col {
  flex-basis: 164px;
}
.prospec-page .kanban-col-head {
  padding: 10px 9px 8px;
}
.prospec-page .prosp-col-total {
  margin-top: 7px;
}
.prospec-page .kanban-cards {
  padding: 7px 7px 3px;
}
.prospec-page .kanban-card {
  padding: 9px 7px;
}
.prosp-bottom-summary {
  min-height: 72px;
  padding: 10px 12px;
  gap: 12px;
}
.prosp-bottom-summary h3 {
  margin-bottom: 7px;
  font-size: 11px;
}
.prosp-summary-stats,
.prosp-rings {
  gap: 14px;
}
.prosp-summary-stats span {
  font-size: 10px;
}
.prosp-summary-stats strong {
  margin-bottom: 3px;
  font-size: 18px;
}
.prosp-rings span {
  width: 56px;
  min-width: 56px;
  height: 56px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
}
.prosp-rings strong {
  margin: 0;
  font-size: 14px;
  line-height: 1;
}
.prosp-rings em {
  max-width: 42px;
  font-size: 8px;
  line-height: 1.05;
}
.prosp-activity-list,
.prosp-ranking {
  gap: 4px;
}
.prosp-activity-list li,
.prosp-ranking li {
  gap: 6px;
  font-size: 10px;
}

/* Prospecção Ativa kanban reference pass */
.prospec-page {
  gap: 7px;
}
.prosp-top-grid {
  grid-template-columns: minmax(360px, 1.65fr) repeat(4, minmax(140px, .8fr));
  gap: 8px;
}
.prosp-goals-card,
.prosp-kpi-card {
  min-height: 78px;
  padding: 9px 11px;
}
.prosp-card-head {
  margin-bottom: 6px;
}
.prosp-goals-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.prosp-goal-person:nth-child(n+5) {
  display: none;
}
.prosp-kpi-card strong {
  margin-top: 7px;
  font-size: 22px;
}
.prosp-kpi-card p {
  margin-top: 5px;
}
.prosp-toolbar {
  min-height: 34px;
}
.prospec-page .kanban-board {
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 430px;
  padding: 0 0 8px;
}
.prospec-page .kanban-col {
  align-self: stretch;
  min-height: 100%;
  max-height: none;
  flex: 0 0 166px;
  background:
    linear-gradient(180deg, rgba(12,27,61,.96), rgba(6,14,34,.94));
}
.prospec-page .kanban-col-head {
  min-height: 57px;
}
.prospec-page .kanban-cards {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.prospec-page .kanban-card {
  min-height: 92px;
}
.prospec-page .kanban-card .kcard-footer {
  margin-top: 2px;
}
.prospec-page .kcol-empty {
  min-height: 190px;
  justify-content: center;
  color: rgba(141,154,187,.58);
}
.prosp-bottom-summary {
  min-height: 62px;
  padding: 8px 12px;
  grid-template-columns: 1.35fr .95fr .85fr .75fr;
}
.prosp-bottom-summary h3 {
  margin-bottom: 5px;
}
.prosp-summary-stats strong {
  font-size: 16px;
}
.prosp-rings span {
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  background:
    radial-gradient(circle at center, rgba(8,17,38,.95) 57%, transparent 59%),
    conic-gradient(from 180deg, #2f6dff 0 68%, rgba(71,108,206,.2) 68% 100%);
}
.prosp-rings strong {
  font-size: 12px;
}
.prosp-rings em {
  max-width: 36px;
  font-size: 7px;
}
.prosp-activity-list li,
.prosp-ranking li {
  line-height: 1.18;
}

/* Prospecção Ativa access pass */
.prospec-page .kanban-board {
  min-height: 500px;
  scrollbar-width: none;
}
.prospec-page .kanban-board::-webkit-scrollbar {
  display: none;
}
.prospec-page .kanban-col {
  flex-basis: 216px;
}
.prospec-page .kanban-cards {
  gap: 9px;
  padding: 9px 9px 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(71, 109, 255, .45) transparent;
}
.prospec-page .kanban-cards::-webkit-scrollbar {
  width: 6px;
}
.prospec-page .kanban-cards::-webkit-scrollbar-thumb {
  background: rgba(71, 109, 255, .42);
  border-radius: 999px;
}
.prospec-page .kanban-card {
  flex: 0 0 auto;
  min-height: 0;
  padding: 11px 11px 10px;
  overflow: hidden;
}
.prospec-page .kcard-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 7px;
}
.prospec-page .kcard-title {
  min-width: 0;
}
.prospec-page .kcard-header > span {
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prospec-page .kcard-chips {
  overflow: hidden;
}
.prospec-page .kchip {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prospec-page .kchip svg {
  flex: 0 0 auto;
}
.prospec-page .kcard-footer,
.prospec-page .kcard-footer > div {
  min-width: 0;
}
.prospec-page .kcard-footer span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Prospecção Ativa — card reference redesign */
.prospec-page .kcard-resp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  min-width: 0;
  overflow: hidden;
}
.prospec-page .kcard-resp-lbl {
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(141, 154, 187, .48);
  flex-shrink: 0;
}
.prospec-page .kcard-av-sm {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0;
}
.prospec-page .kcard-resp-row .avatar {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  box-shadow: none !important;
  background-size: cover !important;
  display: inline-block !important;
}
.prospec-page .kcard-resp-name {
  font-size: 11px;
  font-weight: 500;
  color: #a8b8d8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prospec-page .kcard-next-action {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 5px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(71, 108, 206, .15);
  line-height: 1.35;
}
.prospec-page .kcard-next-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(141, 154, 187, .55);
  white-space: nowrap;
  flex-shrink: 0;
}
.prospec-page .kcard-next-txt {
  font-size: 11px;
  font-weight: 700;
  color: #d0dcf4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.prospec-page .kcard-next-due {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  margin-top: 2px;
  font-size: 9.5px;
  color: #6e7d9e;
}
.prospec-page .kanban-card .kcard-footer {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(71, 108, 206, .15);
  border-left: none;
  justify-content: flex-end;
  gap: 6px;
}
.prospec-page .kanban-card .kcard-footer > span:first-child {
  overflow: visible;
}

/* Cold call lead script redesign */
.cold-script-inline-panel {
  background:
    radial-gradient(circle at 20% 0%, rgba(47,109,255,.10), transparent 34%),
    linear-gradient(180deg, #080d19 0%, #050912 100%) !important;
}
.cold-script-inline-head {
  min-height: 62px;
}
.cold-script-body-redesign,
#cold-script-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(71,109,255,.48) transparent;
}
.cold-script-body-redesign::-webkit-scrollbar,
#cold-script-body::-webkit-scrollbar {
  width: 6px;
}
.cold-script-body-redesign::-webkit-scrollbar-thumb,
#cold-script-body::-webkit-scrollbar-thumb {
  background: rgba(71,109,255,.42);
  border-radius: 999px;
}
.cs-context-card {
  padding: 14px 22px 16px;
  border-bottom: 1px solid rgba(62,88,138,.22);
  background: rgba(5,10,22,.62);
}
.cs-context-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  min-width: 0;
}
.cs-context-head > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 16px currentColor;
}
.cs-context-head div {
  min-width: 0;
}
.cs-context-head strong,
.cs-context-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-context-head strong {
  color: #f5f7ff;
  font-size: 13px;
  font-weight: 800;
}
.cs-context-head small {
  margin-top: 2px;
  color: #7f8bad;
  font-size: 11px;
}
.cs-context-card textarea,
.cs-field input,
.cs-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(82,108,170,.24);
  border-radius: 10px;
  background: rgba(7,15,33,.76);
  color: #eef3ff;
  outline: none;
  font: 500 12.5px/1.45 Inter, system-ui, sans-serif;
}
.cs-context-card textarea {
  min-height: 74px;
  padding: 9px 11px;
  resize: vertical;
}
.cs-field input,
.cs-field textarea {
  padding: 10px 11px;
}
.cs-field {
  display: grid;
  gap: 6px;
}
.cs-field span,
.cs-card-title {
  color: #8f9dc1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.cs-redesign {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #edf3ff;
}
.cs-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cs-progress button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(122,142,190,.24);
  cursor: pointer;
}
.cs-progress button.active {
  width: 28px;
  background: var(--step-color, #2f6dff);
  box-shadow: 0 0 18px color-mix(in srgb, var(--step-color, #2f6dff) 55%, transparent);
}
.cs-stage span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(47,109,255,.18);
  color: #69a0ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cs-stage h2 {
  margin: 16px 0 8px;
  color: #f8fbff;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0;
}
.cs-stage p {
  margin: 0;
  color: #aeb9d3;
  font-size: 14px;
  line-height: 1.5;
}
.cs-card {
  border: 1px solid rgba(82,108,170,.22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(14,24,49,.72), rgba(8,14,30,.76));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  padding: 16px;
}
.cs-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #b7c3df;
}
.cs-card-title svg {
  color: var(--step-color, #2f6dff);
}
.cs-script-card {
  padding: 20px;
}
.cs-script-text,
.cs-mini-script {
  white-space: pre-wrap;
  color: #d9e2f6;
  font-size: 14px;
  line-height: 1.85;
}
.cs-mini-script {
  margin-top: 12px;
  padding: 12px 13px;
  border-left: 3px solid #10b981;
  border-radius: 9px;
  background: rgba(16,185,129,.08);
  font-style: italic;
}
.cs-tip,
.cs-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.cs-tip svg {
  color: #0ea5e9;
}
.cs-warning svg {
  color: #f59e0b;
}
.cs-tip p,
.cs-warning p {
  margin: 0;
  color: #aeb9d3;
  font-size: 12.5px;
  line-height: 1.55;
}
.cs-fields-card {
  display: grid;
  gap: 12px;
}
.cs-check-row,
.cs-decision-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid rgba(82,108,170,.13);
}
.cs-check-row:first-of-type {
  border-top: 0;
}
.cs-check-row span,
.cs-decision-row span,
.cs-choice-row > span {
  color: #c9d3ea;
  font-size: 12.5px;
  line-height: 1.35;
}
.cs-check-row button,
.cs-decision-row button,
.cs-choice-grid button,
.cs-choice-row button {
  min-height: 30px;
  border: 1px solid rgba(97,124,190,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: #9ca9c8;
  cursor: pointer;
  font: 800 11.5px/1 Inter, system-ui, sans-serif;
}
.cs-check-row button {
  min-width: 48px;
}
.cs-check-row button.active.good,
.cs-decision-row button.active.good {
  border-color: rgba(16,185,129,.55);
  background: rgba(16,185,129,.18);
  color: #70e8bd;
}
.cs-check-row button.active.bad,
.cs-decision-row button.active.bad {
  border-color: rgba(239,68,68,.55);
  background: rgba(239,68,68,.16);
  color: #fca5a5;
}
.cs-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.cs-choice-row {
  display: grid;
  gap: 8px;
}
.cs-choice-row div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.cs-choice-grid button.active,
.cs-choice-row button.active {
  border-color: rgba(6,182,212,.55);
  background: rgba(6,182,212,.16);
  color: #67e8f9;
}
.cs-objections {
  border-color: rgba(248,113,113,.22);
}
.cs-objections .cs-card-title,
.cs-objections .cs-card-title svg {
  color: #fb7185;
}
.cs-obj-group {
  display: grid;
  gap: 7px;
}
.cs-obj-group + .cs-obj-group {
  margin-top: 14px;
}
.cs-obj-group > strong {
  color: #7785a8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.cs-obj-item button {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(111,126,166,.20);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: #c9d3ea;
  cursor: pointer;
  text-align: left;
  font: 750 12px/1.35 Inter, system-ui, sans-serif;
}
.cs-obj-item.active button {
  border-color: rgba(248,113,113,.50);
  background: rgba(248,113,113,.14);
  color: #fecdd3;
}
.cs-obj-item p {
  margin: 6px 0 0;
  padding: 12px 13px;
  border-left: 3px solid #fb7185;
  border-radius: 9px;
  background: rgba(2,6,23,.46);
  color: #f1f5ff;
  font-size: 12.8px;
  line-height: 1.7;
}
.cs-next-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  padding: 14px 15px;
  border: 1px solid rgba(82,108,170,.22);
  border-radius: 10px;
  background: rgba(6,12,26,.72);
}
.cs-next-card small {
  color: #8f9dc1;
  font-size: 12px;
}
.cs-next-card strong {
  grid-column: 1;
  color: #f5f7ff;
  font-size: 13px;
}
.cs-next-card i {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: #9aa7c7;
}
.cs-footer {
  margin-top: auto;
  position: sticky;
  bottom: -18px;
  background: linear-gradient(180deg, rgba(7,11,20,0), #070b14 26%);
  padding-top: 16px;
}
.cs-ligar-center {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(6,182,212,.42);
  background: rgba(6,182,212,.10);
  color: #67e8f9;
  font: 800 13px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s;
}
.cs-ligar-center:hover { background: rgba(6,182,212,.18); }
.cs-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
}
.cs-action-group {
  flex: 1;
  display: flex;
  gap: 7px;
}
.cs-action-group button {
  flex: 1;
  min-height: 44px;
  border-radius: 10px;
  cursor: pointer;
  font: 750 12px/1.2 Inter, system-ui, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(97,124,190,.22);
  background: rgba(255,255,255,.035);
  color: #c9d3ea;
}
.cs-action-group .danger {
  border-color: rgba(244,63,94,.32);
  color: #fda4af;
}
.cs-action-group .warn {
  border-color: rgba(245,158,11,.35);
  color: #fbbf24;
}
.cs-action-group .ok {
  border-color: rgba(16,185,129,.38);
  background: rgba(16,185,129,.11);
  color: #6ee7b7;
}
.cs-arr {
  width: 38px;
  min-height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(97,124,190,.22);
  background: rgba(255,255,255,.035);
  color: #9cc2ff;
  transition: background .15s;
}
.cs-arr:hover { background: rgba(47,109,255,.18); }
.cs-arr.next { background: rgba(47,109,255,.18); border-color: transparent; }
.cs-arr:disabled { opacity: .25; cursor: not-allowed; }

/* Prospecção Ativa: keep only top information */
.prospec-page .prosp-bottom-summary {
  display: none !important;
}
.prospec-page .kanban-board {
  min-height: calc(100dvh - 255px);
}

/* Prospecção Ativa filter popup floats over the board */
.prosp-toolbar {
  position: relative;
  z-index: 40;
}
.prosp-filter-shell {
  position: relative;
  z-index: 45;
  height: 34px;
}
.prosp-filter-shell > div {
  position: relative;
  overflow: visible !important;
}
.prosp-filter-shell > div:nth-child(2) {
  position: absolute !important;
  top: calc(100% + 8px);
  left: 0;
  width: min(380px, calc(100vw - 48px));
  z-index: 90;
  border: 1px solid rgba(71,108,206,.34);
  border-radius: 10px;
  background: rgba(5,8,18,.98) !important;
  box-shadow: 0 22px 60px rgba(0,0,0,.58), 0 0 0 1px rgba(47,109,255,.08);
  overflow: hidden;
}
.prosp-filter-shell > div:first-child {
  height: 34px;
}
.prospec-page .kanban-board {
  position: relative;
  z-index: 1;
}

/* Cold lead modal: reference color balance */
#modalOverlay > div {
  background: #070b14 !important;
  border-color: rgba(65, 84, 126, .34) !important;
}
#modalOverlay [data-prosp-detail-modal] {
  border-right-color: rgba(65, 84, 126, .28) !important;
}
#modalOverlay [data-prosp-detail-modal] > div {
  background:
    radial-gradient(circle at 12% 0%, rgba(47,109,255,.08), transparent 32%),
    linear-gradient(180deg, #080d19 0%, #060a13 100%) !important;
}
#modalOverlay [data-prosp-detail-modal] a[href^="tel:"] {
  background: rgba(14,165,233,.10) !important;
  border: 1px solid rgba(56,189,248,.32) !important;
  color: #38bdf8 !important;
}
#modalOverlay [data-prosp-detail-modal] a[href*="wa.me"] {
  background: rgba(16,185,129,.10) !important;
  border: 1px solid rgba(16,185,129,.30) !important;
  color: #6ee7b7 !important;
}
#modalOverlay [data-prosp-detail-modal] a[href*="maps"],
#modalOverlay [data-prosp-detail-modal] a[href*="google"] {
  background: rgba(255,255,255,.035) !important;
  border-color: rgba(115,135,178,.18) !important;
  color: #c4cce0 !important;
}
#modalOverlay [data-prosp-detail-modal] textarea,
#modalOverlay [data-prosp-detail-modal] input,
#modalOverlay [data-prosp-detail-modal] select {
  background-color: rgba(7,13,28,.78) !important;
  border-color: rgba(82,108,170,.22) !important;
  color: #e7edf9 !important;
}
#modalOverlay [data-prosp-detail-modal] button {
  box-shadow: none !important;
}
.cold-script-inline-panel {
  width: 430px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(47,109,255,.08), transparent 30%),
    linear-gradient(180deg, #080d19 0%, #050912 100%) !important;
  border-left: 1px solid rgba(65,84,126,.30);
}
.cold-script-inline-head {
  border-bottom-color: rgba(65,84,126,.28) !important;
}
.cold-script-inline-head i {
  color: #60a5fa !important;
}
.cs-context-card {
  background: rgba(5,10,22,.46) !important;
  border-bottom-color: rgba(65,84,126,.22) !important;
}
.cs-progress button {
  background: rgba(117,132,170,.26);
}
.cs-progress button.active {
  background: #4f83ff;
  box-shadow: 0 0 18px rgba(79,131,255,.36);
}
.cs-stage span {
  background: rgba(47,109,255,.18) !important;
  color: #7fb0ff !important;
}
.cs-stage h2 {
  color: #f6f8ff;
}
.cs-stage p {
  color: #a8b2ca;
}
.cs-card,
.cs-next-card {
  background: linear-gradient(180deg, rgba(12,21,43,.74), rgba(7,13,28,.78)) !important;
  border-color: rgba(82,108,170,.24) !important;
}
.cs-script-text,
.cs-mini-script {
  color: #d6deef;
}
.cs-tip {
  background: rgba(12,21,43,.58) !important;
}
.cs-tip svg,
.cs-card-title svg {
  color: #38bdf8 !important;
}
.cs-ligar-center {
  border-color: rgba(56,189,248,.34) !important;
  background: rgba(14,165,233,.10) !important;
  color: #7dd3fc !important;
}
.cs-ligar-center:hover {
  background: rgba(14,165,233,.16) !important;
}
.cs-action-group button,
.cs-arr {
  background: rgba(255,255,255,.035) !important;
  border-color: rgba(97,124,190,.22) !important;
}
.cs-action-group .danger {
  background: rgba(244,63,94,.06) !important;
}
.cs-action-group .warn {
  background: rgba(245,158,11,.07) !important;
}
.cs-action-group .ok {
  background: rgba(16,185,129,.08) !important;
}
.cs-arr.next {
  background: rgba(47,109,255,.14) !important;
}

/* Clients reference layout */
.clients-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100dvh - 96px);
  color: #f5f7ff;
}
.clients-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.clients-head h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
}
.clients-head p {
  margin: 0;
  color: #9da9c3;
  font-size: 14px;
}
.clients-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.clients-search,
.clients-list-search {
  min-height: 38px;
  border: 1px solid rgba(71,108,206,.25);
  border-radius: 9px;
  background: rgba(5,10,24,.78);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  color: #8390b1;
}
.clients-search { width: 330px; }
.clients-search input,
.clients-list-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e7edf9;
  font: 500 13px Inter, system-ui, sans-serif;
}
.client-ghost,
.client-primary,
.client-detail-btn,
.client-link-btn {
  min-height: 38px;
  border-radius: 9px;
  font: 800 12px Inter, system-ui, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.client-ghost {
  padding: 0 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(71,108,206,.25);
  color: #d7def1;
}
.client-primary {
  padding: 0 18px;
  border: 1px solid rgba(83,134,255,.55);
  background: linear-gradient(180deg, #2f6dff, #164bd7);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47,109,255,.28);
}
.clients-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.clients-kpi {
  min-height: 112px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(71,108,206,.28);
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--k) 16%, transparent), transparent 36%),
    linear-gradient(180deg, rgba(12,25,56,.84), rgba(7,14,32,.88));
  padding: 18px;
}
.clients-kpi > span {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--k) 18%, transparent);
  color: var(--k);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.clients-kpi small,
.clients-kpi em {
  display: block;
  color: #aab5cf;
  font-size: 13px;
  font-style: normal;
}
.clients-kpi strong {
  display: block;
  margin: 8px 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}
.clients-kpi em {
  color: var(--k);
  font-size: 12px;
}
.clients-kpi svg {
  position: absolute;
  right: 12px;
  bottom: 14px;
  width: 104px;
  height: 38px;
  opacity: .95;
}
.clients-kpi polyline {
  fill: none;
  stroke: var(--k);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.clients-workspace {
  display: grid;
  grid-template-columns: minmax(360px, .68fr) minmax(560px, 1.22fr);
  gap: 14px;
  min-height: 620px;
}
.clients-list-panel,
.client-detail-panel,
.clients-empty {
  border: 1px solid rgba(71,108,206,.24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(8,18,42,.84), rgba(5,11,26,.90));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.clients-list-panel {
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.clients-list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}
.clients-list-tools button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid rgba(71,108,206,.25);
  background: rgba(255,255,255,.025);
  color: #d8def0;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font: 800 12px Inter, system-ui, sans-serif;
}
.clients-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  min-height: 0;
}
.client-row {
  width: 100%;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 92px 96px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #f5f7ff;
  text-align: left;
  cursor: pointer;
}
.client-row:hover {
  background: rgba(255,255,255,.035);
}
.client-row.active {
  background: linear-gradient(90deg, rgba(47,109,255,.28), rgba(47,109,255,.08));
  border-color: rgba(83,134,255,.65);
  box-shadow: inset 3px 0 0 #2f6dff, 0 0 24px rgba(47,109,255,.16);
}
.clients-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: hsl(var(--h), 62%, 42%);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
}
.clients-logo.active {
  background: #071024;
  border: 1px solid rgba(83,134,255,.36);
  box-shadow: 0 0 20px rgba(47,109,255,.20);
}
.client-row-main,
.client-row-state,
.client-row-money {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.client-row-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.client-row-main small,
.client-row-money small {
  color: #8793b1;
  font-size: 11px;
}
.client-row-main em {
  margin-left: 8px;
  font-style: normal;
}
.client-row-state em,
.client-detail-money > span {
  width: max-content;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  font: 800 11px Inter, system-ui, sans-serif;
  font-style: normal;
}
.client-row-state em.ok,
.client-detail-money > span.ok {
  background: rgba(16,185,129,.13);
  color: #34d399;
}
.client-row-state em.warn,
.client-detail-money > span.warn {
  background: rgba(245,158,11,.13);
  color: #fbbf24;
}
.client-row-state em.bad,
.client-detail-money > span.bad {
  background: rgba(244,63,94,.13);
  color: #fb7185;
}
.client-row-state small {
  font-size: 11px;
}
.client-row-money {
  align-items: flex-end;
  font-size: 13px;
}
.clients-list-panel footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 8px 4px;
  color: #8793b1;
  font-size: 12px;
}
.clients-list-panel footer div {
  display: flex;
  gap: 6px;
}
.clients-list-panel footer button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(71,108,206,.24);
  background: rgba(255,255,255,.025);
  color: #d8def0;
}
.client-detail-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.client-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.client-detail-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.client-detail-title .clients-logo {
  width: 68px;
  height: 68px;
  font-size: 26px;
}
.client-detail-title h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: 0;
}
.client-detail-title p {
  margin: 0;
  color: #aeb8d0;
  font-size: 13px;
}
.client-detail-title p span {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 9px 2px;
  border-radius: 999px;
  background: #6280c4;
}
.client-detail-title em {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(47,109,255,.12);
  color: #79a8ff;
  font-style: normal;
  font-size: 11px;
}
.client-detail-money {
  text-align: right;
}
.client-detail-money strong {
  display: block;
  margin: 9px 0 4px;
  font-size: 20px;
  font-weight: 800;
}
.client-detail-money small {
  color: #b2bdd4;
  font-size: 13px;
}
.client-detail-money p {
  margin: 0;
  color: #8793b1;
  font-size: 12px;
}
.client-integrations {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.client-health-card,
.client-integration,
.client-live-metrics,
.client-detail-card {
  border: 1px solid rgba(71,108,206,.22);
  border-radius: 10px;
  background: rgba(8,18,42,.72);
}
.client-health-card,
.client-integration {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
}
.client-health-card > span,
.client-integration > span,
.client-live-metrics article > span,
.client-activity > li > span {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.client-health-card > span {
  color: #34d399;
  background: rgba(16,185,129,.12);
}
.client-integration > span {
  color: var(--i);
  background: color-mix(in srgb, var(--i) 13%, transparent);
}
.client-health-card small,
.client-integration small,
.client-live-metrics small {
  display: block;
  color: #aeb8d0;
  font-size: 12px;
}
.client-health-card strong {
  display: block;
  margin: 4px 0;
  font-size: 22px;
}
.client-health-card em,
.client-integration em,
.client-live-metrics em {
  color: #8793b1;
  font-size: 12px;
  font-style: normal;
}
.client-integration strong {
  display: block;
  color: #f5f7ff;
  font-size: 13px;
}
.client-integration small.ok {
  color: #34d399;
}
.client-integration small.bad {
  color: #fb7185;
}
.client-live-metrics {
  padding: 16px;
}
.client-live-metrics h3,
.client-detail-card h3 {
  margin: 0 0 14px;
  font-size: 14px;
}
.client-live-metrics > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.client-live-metrics article {
  min-height: 84px;
  border: 1px solid rgba(71,108,206,.20);
  border-radius: 9px;
  background: rgba(6,13,31,.62);
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.client-live-metrics article > span {
  width: 34px;
  height: 34px;
  color: var(--m);
  background: color-mix(in srgb, var(--m) 13%, transparent);
}
.client-live-metrics strong {
  display: block;
  margin: 5px 0;
  font-size: 22px;
  font-weight: 800;
}
.client-live-metrics em {
  color: #34d399;
}
.client-tabs {
  display: flex;
  border-bottom: 1px solid rgba(71,108,206,.22);
  gap: 2px;
}
.client-tabs button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #d8def0;
  cursor: pointer;
  font: 700 13px Inter, system-ui, sans-serif;
}
.client-tabs button.active {
  color: #fff;
  border-bottom-color: #2f6dff;
  background: rgba(47,109,255,.10);
}
.client-tab-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.client-detail-card {
  padding: 16px;
}
.client-detail-card.wide {
  grid-column: 1 / -1;
}
.client-activity {
  display: grid;
  gap: 12px;
}
.client-activity li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.client-activity span.ok {
  background: rgba(16,185,129,.12);
  color: #34d399;
}
.client-activity span.warn {
  background: rgba(245,158,11,.12);
  color: #f59e0b;
}
.client-activity strong {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}
.client-activity small {
  color: #8793b1;
  font-size: 11px;
}
.client-usage-row {
  margin-bottom: 13px;
}
.client-usage-row span {
  display: flex;
  justify-content: space-between;
  color: #c8d1e7;
  font-size: 12px;
  margin-bottom: 7px;
}
.client-usage-row em {
  color: #aeb8d0;
  font-style: normal;
}
.client-usage-row div {
  height: 5px;
  border-radius: 999px;
  background: rgba(71,108,206,.20);
  overflow: hidden;
}
.client-usage-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f6dff;
}
.client-detail-btn,
.client-link-btn {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(71,108,206,.22);
  background: rgba(255,255,255,.025);
  color: #d8def0;
}
.client-link-btn {
  width: auto;
  color: #79a8ff;
  border: 0;
  padding: 0;
  background: transparent;
}
.client-info-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  color: #8793b1;
  font-size: 12px;
}
.client-info-row strong {
  color: #c8d1e7;
  font-weight: 600;
  text-align: right;
}
.client-admin-grid,
.client-onboarding {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.client-admin-grid button,
.client-onboarding span {
  border: 1px solid rgba(71,108,206,.22);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
  color: #d8def0;
  padding: 13px;
  display: grid;
  gap: 6px;
}
.client-admin-grid button {
  cursor: pointer;
  text-align: left;
}
.client-admin-grid small {
  color: #8793b1;
}
.client-onboarding span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.client-onboarding span.done {
  color: #34d399;
  border-color: rgba(16,185,129,.24);
  background: rgba(16,185,129,.06);
}
.clients-empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 70px 20px;
  color: #9da9c3;
}
.clients-empty h2 {
  margin: 16px 0 8px;
  color: #f5f7ff;
}
@media (max-width: 1180px) {
  .clients-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clients-workspace { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .clients-head { flex-direction: column; }
  .clients-actions, .clients-search { width: 100%; }
  .clients-kpis, .client-integrations, .client-live-metrics > div, .client-tab-body, .client-admin-grid, .client-onboarding { grid-template-columns: 1fr; }
  .client-row { grid-template-columns: 42px minmax(0, 1fr); }
  .client-row-state, .client-row-money { display: none; }
}

/* Cold Call reference layout */
.coldcall-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: calc(100dvh - 92px);
  color: #f6f8ff;
}
.cc-head,
.cc-main-grid > .cc-table-card > header,
.cc-queue,
.cc-detail header,
.cc-detail-info p,
.cc-tab-grid p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.cc-head h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
}
.cc-head p,
.cc-import p,
.cc-queue p,
.cc-table-card header p,
.cc-detail header p,
.cc-tab-grid span,
.cc-detail-info span {
  margin: 0;
  color: #8f9bb7;
  font-size: 12px;
}
.cc-search {
  width: min(430px, 42vw);
  height: 40px;
  border: 1px solid rgba(71,108,206,.25);
  border-radius: 10px;
  background: rgba(4,9,22,.82);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #8ea0c6;
}
.cc-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e7edf9;
  font: 500 12px Inter, system-ui, sans-serif;
}
.cc-search kbd {
  min-width: 38px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(71,108,206,.22);
  display: grid;
  place-items: center;
  color: #9aa7c7;
  font: 700 10px Inter, system-ui, sans-serif;
}
.cc-top-grid {
  display: grid;
  grid-template-columns: 270px 315px minmax(430px, 1fr);
  grid-template-rows: 112px 112px;
  gap: 14px;
}
.cc-import,
.cc-batches,
.cc-kpi,
.cc-queue,
.cc-table-card,
.cc-detail {
  border: 1px solid rgba(71,108,206,.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(47,109,255,.08), transparent 34%),
    linear-gradient(180deg, rgba(8,18,42,.86), rgba(4,10,24,.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.cc-import {
  grid-row: 1 / 3;
  padding: 16px;
}
.cc-import h3,
.cc-batches h3,
.cc-queue h3,
.cc-table-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
}
.cc-import button {
  width: 100%;
  min-height: 150px;
  margin-top: 14px;
  border: 1px dashed rgba(104,132,194,.34);
  border-radius: 10px;
  background: rgba(4,9,22,.56);
  color: #aab6d2;
  display: grid;
  place-items: center;
  gap: 9px;
  cursor: pointer;
}
.cc-import button em {
  padding: 8px 14px;
  border-radius: 7px;
  background: rgba(47,109,255,.16);
  color: #7aa6ff;
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
}
.cc-batches {
  grid-row: 1 / 3;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cc-batches > button:not(.cc-all-batches) {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dbe4f7;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}
.cc-batches > button.active,
.cc-batches > button:not(.cc-all-batches):hover {
  background: rgba(47,109,255,.10);
}
.cc-batches strong,
.cc-batches small {
  display: block;
}
.cc-batches strong {
  max-width: 205px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.cc-batches small {
  margin-top: 4px;
  color: #8f9bb7;
  font-size: 11px;
}
.cc-batches em {
  align-self: center;
  min-width: 42px;
  min-height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(139,92,246,.20);
  color: #c4b5fd;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}
.cc-all-batches {
  margin-top: auto;
  min-height: 34px;
  border: 0;
  border-top: 1px solid rgba(71,108,206,.18);
  background: transparent;
  color: #5b8cff;
  cursor: pointer;
  font-weight: 800;
}
.cc-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.cc-kpi {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}
.cc-kpi > span {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c) 17%, transparent);
  color: var(--c);
}
.cc-kpi small,
.cc-kpi em {
  display: block;
  color: #9da8c2;
  font-style: normal;
  font-size: 12px;
}
.cc-kpi strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 24px;
}
.cc-kpi em {
  color: var(--c);
}
.cc-kpi svg {
  position: absolute;
  right: 14px;
  bottom: 13px;
  width: 100px;
  height: 32px;
}
.cc-kpi polyline {
  fill: none;
  stroke: var(--c);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cc-queue {
  grid-column: 3;
  padding: 16px;
}
.cc-queue > div {
  min-width: 250px;
}
.cc-queue > div > div {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.cc-queue button,
.cc-table-card header select {
  min-height: 36px;
  border: 1px solid rgba(71,108,206,.25);
  border-radius: 8px;
  background: rgba(47,109,255,.10);
  color: #7fa9ff;
  cursor: pointer;
  padding: 0 14px;
  font-weight: 800;
}
.cc-queue article {
  min-width: 145px;
  border-left: 1px solid rgba(71,108,206,.18);
  padding-left: 18px;
}
.cc-queue article small {
  color: #9da8c2;
  font-size: 12px;
}
.cc-queue article strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}
.cc-goal {
  flex: 1;
  min-width: 260px;
}
.cc-goal span {
  display: block;
  height: 5px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(71,108,206,.24);
  overflow: hidden;
}
.cc-goal i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6dff, #06b6d4);
}
.cc-goal em {
  float: right;
  margin-top: -20px;
  color: #cbd5ea;
  font-style: normal;
  font-size: 12px;
}
.cc-avatar,
.cc-more {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: hsl(var(--a), 62%, 36%);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.cc-more {
  background: rgba(255,255,255,.06);
  color: #b9c5dd;
}
.cc-main-grid {
  display: grid;
  grid-template-columns: minmax(620px, 1.03fr) minmax(470px, .97fr);
  gap: 14px;
  min-height: 570px;
}
.cc-table-card,
.cc-detail {
  min-width: 0;
  overflow: hidden;
}
.cc-table-card {
  display: flex;
  flex-direction: column;
}
.cc-table-card > header {
  padding: 16px;
  border-bottom: 1px solid rgba(71,108,206,.17);
}
.cc-filter-wrap {
  position: relative;
  z-index: 35;
  width: min(470px, 48%);
  min-width: 330px;
}
.cc-filter-wrap > div:first-child {
  border: 1px solid rgba(71,108,206,.20) !important;
  border-radius: 9px !important;
  background: rgba(4,9,22,.58) !important;
}
.cc-filter-wrap > div:nth-child(2) {
  position: absolute !important;
  top: calc(100% + 8px);
  left: 0;
  width: min(390px, 90vw);
  z-index: 120;
  border: 1px solid rgba(71,108,206,.30);
  border-radius: 10px;
  background: rgba(4,8,18,.98) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.62);
  overflow: hidden;
}
.cc-table-head,
.cc-row {
  display: grid;
  grid-template-columns: 28px 38px minmax(120px, 1.2fr) minmax(120px, 1fr) 98px 118px 112px 62px 90px 132px;
  align-items: center;
  gap: 10px;
}
.cc-table-head {
  min-height: 38px;
  padding: 0 16px;
  color: #7f8aaa;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid rgba(71,108,206,.14);
}
.cc-table-body {
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.cc-row {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid rgba(71,108,206,.12);
  background: transparent;
  color: #edf3ff;
  padding: 0 16px;
  text-align: left;
  cursor: pointer;
}
.cc-row:hover,
.cc-row.active {
  background: rgba(47,109,255,.08);
}
.cc-check {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(123,144,194,.40);
}
.cc-row .cc-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}
.cc-cell {
  min-width: 0;
  color: #aeb8d0;
  font-size: 12px;
}
.cc-cell.main strong,
.cc-cell.main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-cell.main strong {
  color: #f6f8ff;
  font-size: 12px;
  margin-bottom: 4px;
}
.cc-cell.main small {
  color: #8f9bb7;
  font-size: 11px;
}
.cc-stage,
.cc-priority {
  width: max-content;
  min-height: 23px;
  border-radius: 7px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.cc-stage {
  color: var(--s);
  background: color-mix(in srgb, var(--s) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--s) 31%, transparent);
}
.cc-mono {
  color: #aab6d2;
  font: 600 11px "DM Mono", monospace;
}
.cc-score {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #22c55e;
  display: grid;
  place-items: center;
  color: #22c55e;
  font-size: 10px;
  font-weight: 900;
}
.cc-score.big {
  width: 42px;
  height: 42px;
  font-size: 12px;
}
.cc-priority.high {
  color: #fb7185;
  background: rgba(244,63,94,.13);
}
.cc-priority.mid {
  color: #fbbf24;
  background: rgba(245,158,11,.13);
}
.cc-priority.low {
  color: #7dd3fc;
  background: rgba(14,165,233,.12);
}
.cc-owner {
  transform: scale(.82);
  transform-origin: left center;
}
.cc-table-card footer {
  min-height: 54px;
  padding: 0 16px;
  border-top: 1px solid rgba(71,108,206,.14);
  color: #8f9bb7;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cc-table-card footer div {
  display: flex;
  gap: 6px;
}
.cc-table-card footer button {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(71,108,206,.20);
  background: rgba(255,255,255,.025);
  color: #b8c4dc;
}
.cc-table-card footer button.active {
  border-color: rgba(47,109,255,.60);
  background: rgba(47,109,255,.16);
  color: #fff;
}
.cc-detail {
  display: flex;
  flex-direction: column;
}
.cc-detail header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(71,108,206,.15);
}
.cc-detail header > div {
  display: flex;
  align-items: center;
  gap: 13px;
}
.cc-detail header .cc-avatar {
  width: 50px;
  height: 50px;
  font-size: 16px;
}
.cc-detail h2 {
  margin: 0 0 5px;
  font-size: 18px;
}
.cc-detail header button,
.cc-actions button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(71,108,206,.20);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: #b8c4dc;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cc-live {
  border-radius: 999px;
  background: rgba(16,185,129,.14);
  color: #34d399;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 850;
}
.cc-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px;
}
.cc-detail-metrics article {
  min-height: 74px;
  border: 1px solid rgba(71,108,206,.20);
  border-radius: 9px;
  background: rgba(6,13,31,.58);
  padding: 12px;
}
.cc-detail-metrics small {
  display: block;
  color: #8f9bb7;
  margin-bottom: 8px;
  font-size: 11px;
}
.cc-detail-metrics strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f7f9ff;
  font-size: 12px;
}
.cc-detail-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 18px 16px;
}
.cc-detail-info p,
.cc-tab-grid p {
  margin: 0;
  min-height: 28px;
}
.cc-detail-info strong,
.cc-tab-grid strong {
  min-width: 0;
  color: #dfe7f8;
  font-size: 12px;
  text-align: right;
  word-break: break-word;
}
.cc-detail-info a {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(47,109,255,.10);
  color: #7fa9ff;
}
.cc-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.cc-tabs {
  display: flex;
  gap: 2px;
  padding: 0 18px;
  border-top: 1px solid rgba(71,108,206,.15);
  border-bottom: 1px solid rgba(71,108,206,.15);
  overflow-x: auto;
}
.cc-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #a7b2cc;
  padding: 0 13px;
  cursor: pointer;
  font: 800 11px Inter, system-ui, sans-serif;
  white-space: nowrap;
}
.cc-tabs button.active {
  color: #fff;
  border-bottom-color: #2f6dff;
  background: rgba(47,109,255,.10);
}
.cc-tab-body {
  flex: 1;
  overflow: auto;
  padding: 16px 18px;
}
.cc-tab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 36px;
}
.cc-tab-list {
  display: grid;
  gap: 10px;
}
.cc-tab-list article,
.cc-script-cta {
  border: 1px solid rgba(71,108,206,.18);
  border-radius: 9px;
  background: rgba(6,13,31,.56);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cc-tab-list i,
.cc-script-cta > i {
  color: #60a5fa;
}
.cc-tab-list article.danger i {
  color: #fb7185;
}
.cc-tab-list strong,
.cc-script-cta strong {
  display: block;
  color: #eef4ff;
  font-size: 12px;
}
.cc-tab-list small,
.cc-script-cta small {
  color: #8f9bb7;
  font-size: 11px;
}
.cc-script-cta button {
  margin-left: auto;
  min-height: 34px;
  border: 1px solid rgba(47,109,255,.38);
  border-radius: 8px;
  background: rgba(47,109,255,.14);
  color: #8bb2ff;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 850;
}
.cc-empty-note,
.cc-empty-detail {
  color: #8f9bb7;
  font-size: 12px;
}
.cc-empty-detail {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
}
@media (max-width: 1320px) {
  .cc-top-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .cc-import,
  .cc-batches,
  .cc-queue {
    grid-row: auto;
    grid-column: auto;
  }
  .cc-kpis {
    grid-column: 1 / -1;
  }
  .cc-main-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  .cc-head {
    align-items: stretch;
    flex-direction: column;
  }
  .cc-search {
    width: 100%;
  }
  .cc-top-grid,
  .cc-kpis,
  .cc-detail-metrics,
  .cc-detail-info,
  .cc-tab-grid {
    grid-template-columns: 1fr;
  }
  .cc-table-head,
  .cc-row {
    grid-template-columns: 34px minmax(0, 1fr) 70px;
  }
  .cc-table-head span:nth-child(n+4),
  .cc-row > :nth-child(n+4) {
    display: none;
  }
  .cc-filter-wrap {
    width: 100%;
    min-width: 0;
  }
}

/* Financeiro reference layout */
.finance-page {
  position: relative;
  min-height: calc(100dvh - 92px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #f6f8ff;
}
.fin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.fin-head h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: 0;
}
.fin-head p,
.fin-panel header p,
.fin-kpi small,
.fin-kpi em {
  margin: 0;
  color: #98a4bf;
  font-size: 12px;
}
.fin-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.fin-search {
  width: min(430px, 38vw);
  height: 40px;
  border: 1px solid rgba(71,108,206,.25);
  border-radius: 10px;
  background: rgba(4,9,22,.82);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #8ea0c6;
}
.fin-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e7edf9;
  font: 500 12px Inter, system-ui, sans-serif;
}
.fin-search kbd {
  min-width: 38px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(71,108,206,.22);
  display: grid;
  place-items: center;
  color: #9aa7c7;
  font: 700 10px Inter, system-ui, sans-serif;
}
.fin-month-btn,
.fin-income-btn,
.fin-expense-btn {
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(71,108,206,.25);
  background: rgba(255,255,255,.025);
  color: #d9e3f8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  cursor: pointer;
  font: 850 12px Inter, system-ui, sans-serif;
  white-space: nowrap;
}
.fin-month-btn.wide {
  min-width: 156px;
}
.fin-income-btn {
  color: #34d399;
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.32);
}
.fin-expense-btn {
  color: #fb7185;
  background: rgba(244,63,94,.10);
  border-color: rgba(244,63,94,.32);
}
.fin-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.fin-kpi,
.fin-panel {
  border: 1px solid rgba(71,108,206,.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(47,109,255,.08), transparent 34%),
    linear-gradient(180deg, rgba(8,18,42,.86), rgba(4,10,24,.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.fin-kpi {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 18px;
}
.fin-kpi > div:first-child {
  min-width: 0;
}
.fin-kpi > div:first-child > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--f) 14%, transparent);
  color: var(--f);
  margin-bottom: 12px;
}
.fin-kpi strong {
  display: block;
  margin: 7px 0;
  color: var(--f);
  font-size: 24px;
  line-height: 1;
  font-weight: 850;
}
.fin-kpi em {
  color: #34d399;
  font-style: normal;
}
.fin-kpi svg {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 120px;
  height: 34px;
}
.fin-kpi polyline {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fin-ring {
  position: absolute;
  right: 20px;
  top: 26px;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: conic-gradient(#2f6dff calc(var(--ring) * 1%), rgba(71,108,206,.18) 0);
  display: grid;
  place-items: center;
}
.fin-ring:after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: #071024;
}
.fin-ring span {
  position: relative;
  z-index: 1;
  color: #dce6ff;
  font-weight: 850;
  font-size: 12px;
}
.fin-grid-main {
  display: grid;
  grid-template-columns: 1.18fr .86fr .96fr;
  gap: 14px;
  align-items: stretch;
}
.fin-panel {
  min-width: 0;
  overflow: hidden;
}
.fin-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
}
.fin-panel h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 850;
}
.fin-panel select {
  min-height: 34px;
  border: 1px solid rgba(71,108,206,.25);
  border-radius: 8px;
  background: rgba(4,9,22,.70);
  color: #aab6d2;
  padding: 0 12px;
  font: 700 12px Inter, system-ui, sans-serif;
}
.fin-chart-panel {
  grid-column: span 1;
  min-height: 360px;
}
.fin-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  color: #9aa7c7;
  font-size: 12px;
}
.fin-legend span {
  width: 19px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
}
.fin-legend .rec { background: #22c55e; }
.fin-legend .desp { background: #ef4444; margin-left: 18px; }
.fin-bars {
  height: 250px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  padding: 34px 26px 18px;
  background:
    linear-gradient(rgba(71,108,206,.10) 1px, transparent 1px) 0 22px / 100% 48px;
}
.fin-bars > div {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-items: end;
  justify-items: center;
}
.fin-bar-pair {
  height: 190px;
  width: 38px;
  display: flex;
  align-items: end;
  gap: 7px;
}
.fin-bar-pair span {
  flex: 1;
  min-height: 4px;
  border-radius: 5px 5px 0 0;
}
.fin-bar-pair .rec {
  background: linear-gradient(180deg, #22c55e, rgba(16,185,129,.35));
}
.fin-bar-pair .desp {
  background: linear-gradient(180deg, #ef4444, rgba(239,68,68,.38));
}
.fin-bars small {
  color: #8793b1;
  font-size: 11px;
}
.fin-list-panel {
  min-height: 360px;
}
.fin-list-panel header > div:last-child {
  display: flex;
  gap: 8px;
}
.fin-tx-list,
.fin-delete-list {
  display: grid;
  gap: 4px;
  padding: 0 20px 10px;
}
.fin-tx-row,
.fin-delete-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgba(71,108,206,.12);
}
.fin-tx-row > span,
.fin-delete-row > span {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--tx);
  background: color-mix(in srgb, var(--tx) 14%, transparent);
}
.fin-tx-row strong,
.fin-delete-row strong {
  display: block;
  color: #eaf0ff;
  font-size: 12px;
  margin-bottom: 3px;
}
.fin-tx-row small,
.fin-delete-row small {
  color: #8f9bb7;
  font-size: 11px;
}
.fin-tx-row em,
.fin-delete-row em {
  color: #f7fbff;
  font: 850 12px "DM Mono", monospace;
  font-style: normal;
}
.fin-tx-row button {
  min-height: 24px;
  border: 0;
  border-radius: 7px;
  background: rgba(16,185,129,.12);
  color: #34d399;
  padding: 0 8px;
  font-weight: 850;
  font-size: 10px;
  cursor: pointer;
}
.fin-panel-link {
  width: calc(100% - 40px);
  min-height: 34px;
  margin: 8px 20px 14px;
  border: 1px solid rgba(71,108,206,.20);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: #7fa9ff;
  cursor: pointer;
  font-weight: 800;
}
.fin-donut-panel {
  min-height: 360px;
}
.fin-donut-content {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 28px 24px 24px;
}
.fin-donut {
  width: 174px;
  height: 174px;
  border-radius: 999px;
  position: relative;
  display: grid;
  place-items: center;
}
.fin-donut:after {
  content: "";
  position: absolute;
  inset: 36px;
  border-radius: inherit;
  background: #071024;
  box-shadow: inset 0 0 0 1px rgba(71,108,206,.12);
}
.fin-donut span {
  position: relative;
  z-index: 1;
  color: #9aa7c7;
  text-align: center;
  font-size: 12px;
}
.fin-donut strong {
  display: block;
  color: #f7fbff;
  margin-top: 7px;
  font: 850 13px "DM Mono", monospace;
}
.fin-donut-list {
  display: grid;
  gap: 18px;
}
.fin-donut-list p {
  margin: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  color: #dce6ff;
  font-size: 12px;
}
.fin-donut-list span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.fin-donut-list i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.fin-donut-list strong {
  text-align: right;
  color: #dfe7f8;
  font: 800 12px "DM Mono", monospace;
}
.fin-donut-list small {
  display: block;
  margin-top: 3px;
  color: #8f9bb7;
  font-family: Inter, system-ui, sans-serif;
}
.fin-history-panel {
  grid-column: span 2;
  min-height: 300px;
}
.fin-delete-row {
  grid-template-columns: 34px minmax(0, 1fr) auto 110px 90px;
}
.fin-delete-row span.ok {
  --tx: #22c55e;
}
.fin-delete-row span.bad {
  --tx: #ef4444;
}
.fin-delete-row b {
  color: #9aa7c7;
  font-size: 11px;
  text-align: right;
}
.fin-empty {
  margin: 0;
  padding: 22px;
  color: #8f9bb7;
  text-align: center;
  font-size: 12px;
}
.fin-floating-actions {
  position: fixed;
  right: 26px;
  bottom: 34px;
  z-index: 30;
  display: grid;
  gap: 10px;
}
.fin-floating-actions button {
  min-width: 170px;
  justify-content: space-between;
}
.fin-modal {
  width: min(420px, 94vw);
  max-width: 420px;
  border: 1px solid rgba(71,108,206,.28) !important;
  border-radius: 10px !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(47,109,255,.12), transparent 34%),
    linear-gradient(180deg, rgba(10,22,50,.96), rgba(5,10,24,.98)) !important;
  box-shadow: 0 26px 80px rgba(0,0,0,.62);
}
.fin-modal .modal-head {
  border-bottom: 1px solid rgba(71,108,206,.20) !important;
  padding: 16px 18px !important;
}
.fin-modal .modal-head h3 {
  font-size: 14px;
  color: #f6f8ff !important;
}
.fin-modal .modal-body {
  padding: 16px 18px !important;
  display: grid;
  gap: 12px;
}
.fin-modal .field {
  display: grid;
  gap: 7px;
}
.fin-modal .field label {
  color: #9da8c2;
  font-size: 11px;
  font-weight: 800;
}
.fin-modal input,
.fin-modal select {
  min-height: 38px;
  border: 1px solid rgba(71,108,206,.24) !important;
  border-radius: 8px !important;
  background: rgba(5,11,26,.72) !important;
  color: #dfe7f8 !important;
  padding: 0 11px !important;
  font: 600 12px Inter, system-ui, sans-serif;
}
.fin-modal .modal-foot {
  padding: 14px 18px !important;
  border-top: 1px solid rgba(71,108,206,.18) !important;
}
.fin-modal .primary-btn {
  box-shadow: 0 14px 30px rgba(47,109,255,.18);
}
@media (max-width: 1340px) {
  .fin-grid-main {
    grid-template-columns: 1fr 1fr;
  }
  .fin-chart-panel,
  .fin-history-panel {
    grid-column: 1 / -1;
  }
}
@media (max-width: 1040px) {
  .fin-head {
    flex-direction: column;
  }
  .fin-head-actions,
  .fin-search {
    width: 100%;
  }
  .fin-kpis,
  .fin-grid-main {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .fin-kpis,
  .fin-grid-main,
  .fin-donut-content {
    grid-template-columns: 1fr;
  }
  .fin-floating-actions {
    position: static;
    grid-template-columns: 1fr 1fr;
  }
  .fin-tx-row,
  .fin-delete-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }
  .fin-tx-row button,
  .fin-delete-row > small,
  .fin-delete-row b {
    display: none;
  }
}

/* Metricas de Funil reference layout */
.funil-page {
  min-height: calc(100dvh - 92px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #f6f8ff;
}
.fm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.fm-head h1 {
  margin: 0 0 7px;
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
}
.fm-head p,
.fm-head-actions,
.fm-card header span,
.fm-kpi small,
.fm-kpi em,
.fm-goal p,
.fm-empty {
  margin: 0;
  color: #98a4bf;
  font-size: 12px;
}
.fm-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.fm-periods {
  display: inline-grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  border: 1px solid rgba(71,108,206,.24);
  border-radius: 9px;
  overflow: hidden;
  background: rgba(4,9,22,.76);
}
.fm-periods button,
.fm-date-btn,
.fm-footer button,
.fm-card header button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #aab6d2;
  padding: 0 13px;
  cursor: pointer;
  font: 800 12px Inter, system-ui, sans-serif;
  white-space: nowrap;
}
.fm-periods button {
  border-right: 1px solid rgba(71,108,206,.16);
}
.fm-periods button:last-child {
  border-right: 0;
}
.fm-periods button.active {
  color: #f6f8ff;
  background: linear-gradient(180deg, rgba(47,109,255,.26), rgba(47,109,255,.10));
  box-shadow: inset 0 0 0 1px rgba(47,109,255,.72);
}
.fm-date-btn,
.fm-footer button,
.fm-card header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(71,108,206,.24);
  border-radius: 9px;
  background: rgba(4,9,22,.76);
}
.fm-kpis {
  display: grid;
  grid-template-columns: 1.04fr repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.fm-card,
.fm-kpi {
  border: 1px solid rgba(71,108,206,.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 16% 0%, rgba(47,109,255,.08), transparent 34%),
    linear-gradient(180deg, rgba(8,18,42,.86), rgba(4,10,24,.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.fm-kpi {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  padding: 18px;
}
.fm-kpi > div:first-child > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--fm-color) 14%, transparent);
  color: var(--fm-color);
  margin-bottom: 12px;
}
.fm-kpi strong {
  display: block;
  margin: 6px 0 5px;
  color: #f6f8ff;
  font-size: 25px;
  line-height: 1;
  font-weight: 850;
}
.fm-kpi em {
  color: #34d399;
  font-style: normal;
}
.fm-kpi svg {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 120px;
  height: 36px;
}
.fm-kpi polyline {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fm-goal .fm-goal-values {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 8px;
}
.fm-goal .fm-goal-values strong,
.fm-goal .fm-goal-values b {
  margin: 0;
  font-size: 25px;
  font-weight: 850;
}
.fm-goal p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.fm-progress,
.fm-mini-bar,
.fm-rate > div {
  height: 7px;
  border-radius: 999px;
  background: rgba(71,108,206,.18);
  overflow: hidden;
}
.fm-progress {
  margin-top: 13px;
}
.fm-progress i,
.fm-mini-bar i,
.fm-rate i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6dff, #06b6d4);
}
.fm-row {
  display: grid;
  gap: 14px;
}
.fm-row-top {
  grid-template-columns: .8fr 1.56fr;
}
.fm-row-mid {
  grid-template-columns: 1.55fr .72fr .72fr;
}
.fm-row-bottom {
  grid-template-columns: 1.55fr .86fr;
}
.fm-card {
  min-width: 0;
  overflow: hidden;
}
.fm-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
}
.fm-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 850;
}
.fm-card header button {
  min-height: 28px;
  padding: 0 10px;
  color: #6ea0ff;
}
.fm-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.fm-live i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34,197,94,.8);
}
.fm-sdr-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 16px;
}
.fm-sdr-row {
  display: grid;
  grid-template-columns: 22px 28px minmax(72px, 1fr) 74px minmax(90px, .78fr) 42px;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: #dfe7f8;
  font-size: 12px;
}
.fm-sdr-row > span:first-child,
.fm-sdr-row em,
.fm-sdr-row b {
  color: #9aa7c7;
  font-style: normal;
  font-weight: 750;
}
.fm-sdr-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fm-sdr-row b {
  color: #34d399;
  text-align: right;
}
.fm-summary > div {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  padding: 12px 16px 18px;
}
.fm-summary section {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px 14px;
  border-right: 1px solid rgba(71,108,206,.16);
}
.fm-summary section:last-child {
  border-right: 0;
}
.fm-summary section > span,
.fm-dist-grid section > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--fm-color);
  background: color-mix(in srgb, var(--fm-color) 14%, transparent);
}
.fm-summary p,
.fm-dist-grid p {
  margin: 0;
  color: #a5b1cd;
  font-size: 12px;
}
.fm-summary strong,
.fm-dist-grid strong {
  color: #f6f8ff;
  font-size: 22px;
  line-height: 1;
  font-weight: 850;
}
.fm-summary small,
.fm-dist-grid small {
  color: #9aa7c7;
  font-size: 12px;
}
.fm-funnel-card {
  display: grid;
  grid-template-columns: 1fr .86fr;
  min-height: 326px;
}
.fm-funnel-wrap,
.fm-rates {
  min-width: 0;
}
.fm-funnel-wrap {
  border-right: 1px solid rgba(71,108,206,.16);
}
.fm-funnel {
  height: 260px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 4px 26px 24px;
}
.fm-funnel-step {
  width: var(--fm-w);
  min-height: 34px;
  margin-inline: auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  clip-path: polygon(4% 0, 96% 0, 90% 100%, 10% 100%);
  border: 1px solid color-mix(in srgb, var(--fm-color) 60%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--fm-color) 34%, transparent), color-mix(in srgb, var(--fm-color) 14%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 14px 32px color-mix(in srgb, var(--fm-color) 18%, transparent);
}
.fm-funnel-step span,
.fm-funnel-step strong {
  color: #f6f8ff;
  font-size: 12px;
  font-weight: 850;
  text-shadow: 0 1px 14px rgba(0,0,0,.38);
}
.fm-rates {
  padding-bottom: 16px;
}
.fm-rate {
  display: grid;
  gap: 8px;
  padding: 7px 20px;
}
.fm-rate p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: #a5b1cd;
  font-size: 12px;
}
.fm-rate strong {
  color: #f6f8ff;
}
.fm-donut-layout {
  display: grid;
  grid-template-columns: 154px 1fr;
  align-items: center;
  gap: 18px;
  padding: 12px 18px 20px;
}
.fm-donut {
  width: 142px;
  height: 142px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
}
.fm-donut:after {
  content: "";
  position: absolute;
  inset: 25px;
  border-radius: inherit;
  background: #061025;
}
.fm-donut span {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: center;
  gap: 4px;
  color: #9aa7c7;
  font-size: 12px;
}
.fm-donut strong {
  color: #f6f8ff;
  font-size: 20px;
  line-height: 1;
}
.fm-donut-list {
  display: grid;
  gap: 13px;
  min-width: 0;
}
.fm-donut-list p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #aab6d2;
  font-size: 12px;
}
.fm-donut-list span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fm-donut-list i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.fm-donut-list strong {
  color: #f6f8ff;
  font-size: 12px;
  white-space: nowrap;
}
.fm-donut-list small {
  color: #8b98b6;
  font-weight: 700;
}
.fm-dist-grid {
  display: grid;
  grid-template-columns: repeat(11, minmax(86px, 1fr));
  gap: 8px;
  padding: 10px 16px 20px;
  overflow-x: auto;
}
.fm-dist-grid section {
  min-height: 116px;
  padding: 11px 10px;
  border: 1px solid rgba(71,108,206,.18);
  border-radius: 8px;
  background: color-mix(in srgb, var(--fm-color) 8%, rgba(255,255,255,.025));
  display: grid;
  align-content: start;
  gap: 8px;
}
.fm-dist-card footer {
  display: flex;
  justify-content: center;
  gap: 22px;
  border-top: 1px solid rgba(71,108,206,.14);
  padding: 12px 16px 16px;
  color: #9aa7c7;
  font-size: 12px;
}
.fm-dist-card footer strong {
  color: #f6f8ff;
  font-size: 17px;
}
.fm-attempt-legend {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  color: #9aa7c7;
  font-size: 12px;
}
.fm-attempt-legend span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.fm-attempt-legend .ok,
.fm-attempt-bars .ok {
  background: #10b981;
}
.fm-attempt-legend .bad,
.fm-attempt-bars .bad {
  background: #ef4444;
}
.fm-attempt-chart {
  height: 230px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: end;
  padding: 18px 28px 24px;
}
.fm-attempt-chart section {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.fm-attempt-bars {
  height: 172px;
  width: 58px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
}
.fm-attempt-bars i {
  position: relative;
  width: 22px;
  min-height: 6px;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 12px 22px rgba(0,0,0,.22);
}
.fm-attempt-bars em {
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  color: #dfe7f8;
  font-style: normal;
  font-size: 11px;
  font-weight: 850;
}
.fm-attempt-chart small {
  color: #9aa7c7;
  font-size: 11px;
  text-align: center;
}
.fm-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr) auto;
  align-items: center;
  gap: 14px;
  padding: 2px 0 8px;
}
.fm-footer p {
  margin: 0;
  color: #8d99b6;
  font-size: 12px;
}
.fm-recent {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.fm-recent span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #aab6d2;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fm-recent em {
  color: #6ea0ff;
  font-style: normal;
}
@media (max-width: 1440px) {
  .fm-summary > div {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .fm-summary section:nth-child(4n) {
    border-right: 0;
  }
  .fm-row-mid {
    grid-template-columns: 1fr 1fr;
  }
  .fm-funnel-card {
    grid-column: 1 / -1;
  }
}
@media (max-width: 1180px) {
  .fm-head {
    flex-direction: column;
  }
  .fm-kpis,
  .fm-row-top,
  .fm-row-bottom {
    grid-template-columns: 1fr 1fr;
  }
  .fm-goal {
    grid-column: 1 / -1;
  }
  .fm-footer {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .fm-periods {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
  .fm-kpis,
  .fm-row-top,
  .fm-row-mid,
  .fm-row-bottom,
  .fm-funnel-card,
  .fm-donut-layout {
    grid-template-columns: 1fr;
  }
  .fm-summary > div {
    grid-template-columns: 1fr 1fr;
  }
  .fm-summary section {
    border-right: 0;
  }
  .fm-funnel-wrap {
    border-right: 0;
    border-bottom: 1px solid rgba(71,108,206,.16);
  }
  .fm-sdr-row {
    grid-template-columns: 18px 26px minmax(0, 1fr) 56px;
  }
  .fm-sdr-row .fm-mini-bar,
  .fm-sdr-row b {
    display: none;
  }
}

/* Mensagens reference layout */
.messages-page {
  min-height: calc(100dvh - 92px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #f6f8ff;
}
.msg-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.msg-head h1 {
  margin: 0 0 7px;
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
}
.msg-head p {
  margin: 0;
  color: #98a4bf;
  font-size: 12px;
}
.msg-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}
.msg-search {
  width: min(520px, 34vw);
  height: 40px;
  border: 1px solid rgba(71,108,206,.25);
  border-radius: 10px;
  background: rgba(4,9,22,.82);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #8ea0c6;
}
.msg-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e7edf9;
  font: 600 12px Inter, system-ui, sans-serif;
}
.msg-search kbd {
  min-width: 38px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(71,108,206,.22);
  display: grid;
  place-items: center;
  color: #9aa7c7;
  font: 700 10px Inter, system-ui, sans-serif;
}
.msg-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(71,108,206,.25);
  background: rgba(4,9,22,.82);
  color: #d9e3f8;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.msg-shell {
  min-height: 0;
  height: calc(100dvh - 154px);
  display: grid;
  grid-template-columns: 350px minmax(460px, 1fr) 310px;
  gap: 12px;
}
.msg-list-panel,
.msg-chat-panel,
.msg-contact-panel {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(71,108,206,.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(47,109,255,.08), transparent 34%),
    linear-gradient(180deg, rgba(8,18,42,.86), rgba(4,10,24,.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  overflow: hidden;
}
.msg-list-panel {
  display: flex;
  flex-direction: column;
}
.msg-list-panel > header {
  padding: 16px 16px 12px;
}
.msg-list-panel > header button {
  border: 0;
  background: transparent;
  color: #f6f8ff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  cursor: pointer;
  font: 850 13px Inter, system-ui, sans-serif;
}
.msg-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(71,108,206,.16);
}
.msg-tabs button {
  min-height: 30px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #98a4bf;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  cursor: pointer;
  font: 800 11px Inter, system-ui, sans-serif;
}
.msg-tabs button span {
  min-width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(71,108,206,.18);
  display: grid;
  place-items: center;
  color: #d9e3f8;
}
.msg-tabs button.active {
  color: #f6f8ff;
  border-color: rgba(47,109,255,.68);
  background: linear-gradient(180deg, rgba(47,109,255,.24), rgba(47,109,255,.10));
  box-shadow: 0 0 18px rgba(47,109,255,.18);
}
.msg-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.msg-thread {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(71,108,206,.13);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.msg-thread:before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
}
.msg-thread:hover {
  background: rgba(47,109,255,.06);
}
.msg-thread.active {
  background: linear-gradient(90deg, rgba(47,109,255,.18), rgba(47,109,255,.04));
}
.msg-thread.active:before {
  background: #2f6dff;
  box-shadow: 0 0 18px rgba(47,109,255,.9);
}
.msg-avatar {
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--msg-color) 34%, rgba(255,255,255,.04));
  color: #f6f8ff;
  font: 850 13px Inter, system-ui, sans-serif;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--msg-color) 34%, transparent);
}
.msg-thread-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.msg-thread-main strong {
  color: #f6f8ff;
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-thread-main small,
.msg-thread-main em {
  color: #98a4bf;
  font-size: 11px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-thread-main em {
  color: #b8c3da;
}
.msg-thread-meta {
  display: grid;
  justify-items: end;
  gap: 7px;
}
.msg-thread-meta time {
  color: #78a5ff;
  font-size: 11px;
}
.msg-thread-meta b {
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7b869f;
  font-size: 9px;
  font-weight: 850;
}
.msg-thread-meta b.online {
  color: #22c55e;
}
.msg-thread-meta i {
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: #2f6dff;
  color: #fff;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 10px;
  font-weight: 850;
}
.msg-chat-panel {
  display: flex;
  flex-direction: column;
}
.msg-chat-head {
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(71,108,206,.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.msg-chat-head > div:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.msg-chat-head span {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.msg-chat-head strong,
.msg-contact-panel h2 {
  margin: 0;
  color: #f6f8ff;
  font-size: 15px;
  font-weight: 850;
}
.msg-chat-head small,
.msg-contact-panel header p {
  color: #98a4bf;
  font-size: 12px;
}
.msg-chat-head em,
.msg-contact-panel header > span {
  border-radius: 6px;
  background: rgba(16,185,129,.12);
  color: #22c55e;
  padding: 4px 8px;
  font-style: normal;
  font-size: 10px;
  font-weight: 850;
}
.msg-chat-head em.off,
.msg-contact-panel header > span.off {
  background: rgba(148,163,184,.10);
  color: #94a3b8;
}
.msg-chat-head > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
}
.msg-chat-head button,
.msg-composer button,
.msg-quick button,
.msg-notes button,
.msg-file button {
  min-height: 34px;
  border: 1px solid rgba(71,108,206,.24);
  border-radius: 8px;
  background: rgba(4,9,22,.72);
  color: #dbe6fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 11px;
  cursor: pointer;
  font: 850 12px Inter, system-ui, sans-serif;
}
.msg-chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg-day {
  align-self: center;
  padding: 5px 13px;
  border: 1px solid rgba(71,108,206,.18);
  border-radius: 999px;
  background: rgba(4,9,22,.72);
  color: #8f9cb8;
  font-size: 11px;
}
.msg-bubble-row {
  display: flex;
}
.msg-bubble-row.me {
  justify-content: flex-end;
}
.msg-bubble-row.them {
  justify-content: flex-start;
}
.msg-bubble-new {
  max-width: min(520px, 76%);
  border-radius: 8px;
  padding: 12px 14px 18px;
  position: relative;
  color: #f6f8ff;
  font-size: 13px;
  line-height: 1.45;
}
.msg-bubble-row.them .msg-bubble-new {
  background: rgba(22,36,64,.78);
  border: 1px solid rgba(71,108,206,.15);
}
.msg-bubble-row.me .msg-bubble-new {
  background: linear-gradient(180deg, rgba(47,109,255,.82), rgba(21,72,190,.72));
  border: 1px solid rgba(92,141,255,.28);
}
.msg-bubble-new time {
  position: absolute;
  right: 10px;
  bottom: 4px;
  color: #9fb2d9;
  font-size: 10px;
}
.msg-bubble-row.me .msg-bubble-new time {
  color: #c8d9ff;
}
.msg-file {
  width: min(330px, 76%);
  min-height: 70px;
  border-radius: 8px;
  border: 1px solid rgba(71,108,206,.18);
  background: rgba(22,36,64,.78);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  position: relative;
}
.msg-file > span {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(47,109,255,.26);
  color: #8fb4ff;
  display: grid;
  place-items: center;
}
.msg-file strong {
  color: #f6f8ff;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-file small {
  grid-column: 2;
  color: #98a4bf;
  font-size: 11px;
  margin-top: -12px;
}
.msg-file time {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: #98a4bf;
  font-size: 10px;
}
.msg-unread-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 14px 0;
  color: #2f6dff;
  font-size: 12px;
}
.msg-unread-line:before,
.msg-unread-line:after {
  content: "";
  height: 1px;
  background: rgba(47,109,255,.50);
}
.msg-composer {
  min-height: 68px;
  border-top: 1px solid rgba(71,108,206,.16);
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px 52px;
  gap: 8px;
  align-items: center;
}
.msg-composer input {
  height: 44px;
  border-radius: 9px;
  border: 1px solid rgba(71,108,206,.24);
  background: rgba(4,9,22,.72);
  color: #e7edf9;
  outline: 0;
  padding: 0 14px;
  font: 600 13px Inter, system-ui, sans-serif;
}
.msg-composer .send {
  height: 44px;
  border-color: rgba(47,109,255,.58);
  background: #2f6dff;
  color: #fff;
  box-shadow: 0 14px 30px rgba(47,109,255,.25);
}
.msg-contact-panel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.msg-contact-panel header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 20px 16px 16px;
}
.msg-contact-panel h2 {
  font-size: 15px;
}
.msg-contact-panel header p {
  margin: 3px 0 0;
}
.msg-contact-lines,
.msg-info,
.msg-quick,
.msg-media,
.msg-notes {
  padding: 16px;
  border-top: 1px solid rgba(71,108,206,.15);
}
.msg-contact-lines p,
.msg-info p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  color: #aab6d2;
  font-size: 12px;
}
.msg-contact-lines p:last-child,
.msg-info p:last-child {
  margin-bottom: 0;
}
.msg-contact-lines i:first-of-type {
  color: #22c55e;
}
.msg-info h3,
.msg-quick h3,
.msg-media h3,
.msg-notes h3 {
  margin: 0 0 14px;
  color: #f6f8ff;
  font-size: 13px;
  font-weight: 850;
}
.msg-info p span {
  color: #98a4bf;
}
.msg-info p strong {
  color: #e8efff;
  font-size: 12px;
  text-align: right;
}
.msg-quick div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.msg-quick button:last-child {
  grid-column: 1 / -1;
}
.msg-media h3,
.msg-notes h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.msg-media div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.msg-media span {
  aspect-ratio: 1 / .86;
  border-radius: 8px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #081024;
  font-size: 10px;
  font-weight: 850;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.1)),
    linear-gradient(145deg, #f59e0b, #dbeafe 45%, #0f172a);
}
.msg-media span:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,255,255,.1)),
    linear-gradient(145deg, #dbeafe, #64748b);
}
.msg-media span:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(255,255,255,.52), rgba(255,255,255,.08)),
    linear-gradient(145deg, #a16207, #334155);
}
.msg-media small {
  color: rgba(8,16,36,.76);
  font-size: 9px;
}
.msg-notes p {
  margin: 0 0 14px;
  color: #98a4bf;
  font-size: 12px;
  line-height: 1.55;
}
.msg-notes button {
  color: #6ea0ff;
}
.msg-empty {
  margin: 18px;
  color: #98a4bf;
  font-size: 13px;
}
@media (max-width: 1440px) {
  .msg-shell {
    grid-template-columns: 320px minmax(420px, 1fr) 290px;
  }
}
@media (max-width: 1180px) {
  .msg-head {
    flex-direction: column;
  }
  .msg-head-actions,
  .msg-search {
    width: 100%;
  }
  .msg-shell {
    height: auto;
    grid-template-columns: 330px minmax(0, 1fr);
  }
  .msg-contact-panel {
    grid-column: 1 / -1;
    max-height: none;
  }
}
@media (max-width: 820px) {
  .msg-shell {
    grid-template-columns: 1fr;
  }
  .msg-list-panel,
  .msg-chat-panel,
  .msg-contact-panel {
    min-height: 420px;
  }
  .msg-chat-head,
  .msg-contact-panel header {
    align-items: flex-start;
  }
  .msg-chat-head {
    flex-direction: column;
  }
}

/* ── Context menu (botão direito no card) ──────────── */
.ctx-menu {
  position: fixed;
  z-index: 99999;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 5px;
  min-width: 192px;
  box-shadow: 0 12px 40px rgba(0,0,0,.7);
  animation: ctx-in .12s ease;
}
@keyframes ctx-in {
  from { opacity:0; transform:scale(.95) translateY(-4px); }
  to   { opacity:1; transform:scale(1)  translateY(0); }
}
.ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: none;
  color: #d0dcf4;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background .1s;
}
.ctx-item:hover { background: rgba(255,255,255,.07); }
.ctx-item--danger { color: #f87171; }
.ctx-item--danger:hover { background: rgba(248,113,113,.1); }
.ctx-item-sub { font-size: 12px; padding: 6px 10px; }
.ctx-separator { height: 1px; background: rgba(255,255,255,.07); margin: 4px 0; }
.ctx-group-label {
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(160,175,210,.5);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px 2px;
}
