/* ════════════════════════════════════════════════════
   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; }
.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;
}
.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;
  transition: background .15s;
}
.nav-subitem.active .nav-sub-dot { background: #93c5fd; }
.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: 10050;
  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;
}

@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: 12px;
  font-weight: 800;
}
.prospec-page .kcard-co,
.prospec-page .kcard-footer span { font-size: 10.5px; }
.prospec-page .kcard-chips {
  gap: 4px;
  margin-bottom: 8px;
}
.prospec-page .kchip {
  padding: 3px 5px;
  border-radius: 5px;
  font-size: 9.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: thin;
  scrollbar-color: rgba(71, 109, 255, .55) transparent;
}
.prospec-page .kanban-col {
  flex-basis: 178px;
}
.prospec-page .kanban-cards {
  gap: 8px;
  padding: 8px 8px 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: 9px 8px;
  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;
}

/* 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; }
