:root{
  --bg:#f6f9fc;--surface:#fff;--surface-2:#f8fafc;--ink:#0a2540;--muted:#6b7c93;--line:#e3e8ee;
  --primary:#635bff;--primary-dark:#4f46e5;--cyan:#00d4ff;--green:#00a76f;--amber:#f59e0b;--red:#ef4444;
  --purple:#7c3aed;--shadow:0 24px 80px rgba(50,50,93,.12),0 8px 24px rgba(0,0,0,.06);--shadow-sm:0 12px 36px rgba(50,50,93,.08),0 4px 12px rgba(0,0,0,.04);--radius:24px;
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);letter-spacing:-.012em}.text-muted{color:var(--muted)!important}a{color:var(--primary);text-decoration:none}.fw-black{font-weight:900}.btn{border-radius:999px;font-weight:800;padding:.72rem 1.12rem;transition:.18s ease}.btn-primary{background:linear-gradient(135deg,var(--primary),#7c3aed);border:0;box-shadow:0 12px 30px rgba(99,91,255,.28)}.btn-primary:hover{transform:translateY(-2px);box-shadow:0 18px 40px rgba(99,91,255,.34)}.btn-light{background:#fff}.btn-outline-primary{border-color:#d7d5ff;color:var(--primary)}.btn-outline-primary:hover{background:var(--primary);border-color:var(--primary);transform:translateY(-1px)}.badge{border-radius:999px;padding:.5rem .76rem;font-weight:850}.form-control,.form-select{border:1px solid var(--line);border-radius:16px;padding:.82rem .95rem;background:#fff}.form-control:focus,.form-select:focus{border-color:var(--primary);box-shadow:0 0 0 .25rem rgba(99,91,255,.12)}
/* Public pages */
.public-nav{background:rgba(255,255,255,.82);backdrop-filter:blur(18px);border-bottom:1px solid rgba(226,232,240,.78)}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--ink);font-weight:950;font-size:1.22rem}.brand-mark{width:40px;height:40px;border-radius:15px;background:linear-gradient(135deg,var(--primary),var(--cyan));display:grid;place-items:center;color:#fff;box-shadow:0 18px 35px rgba(99,91,255,.28)}.hero{position:relative;overflow:hidden;background:radial-gradient(circle at 15% 4%,rgba(99,91,255,.24),transparent 28%),radial-gradient(circle at 92% 12%,rgba(0,212,255,.18),transparent 26%),linear-gradient(180deg,#fff,#f6f9fc 82%)}.hero:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(10,37,64,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(10,37,64,.045) 1px,transparent 1px);background-size:52px 52px;mask-image:linear-gradient(to bottom,#000,transparent 82%)}.hero .container{position:relative}.hero-badge{display:inline-flex;align-items:center;gap:8px;background:#fff;border:1px solid #dfe7ff;color:var(--primary);border-radius:999px;padding:.62rem .94rem;font-weight:900;box-shadow:var(--shadow-sm)}.hero-title{font-size:clamp(3rem,7.5vw,6.8rem);font-weight:950;letter-spacing:-.085em;line-height:.91}.gradient{background:linear-gradient(90deg,var(--primary),#00b8d9);-webkit-background-clip:text;background-clip:text;color:transparent}.hero-copy{font-size:1.22rem;line-height:1.7}.hero-panel{border:1px solid rgba(226,232,240,.92);border-radius:34px;background:rgba(255,255,255,.88);backdrop-filter:blur(22px);box-shadow:var(--shadow);padding:20px;position:relative}.hero-panel:before{content:"";position:absolute;inset:-1px;border-radius:34px;background:linear-gradient(135deg,rgba(99,91,255,.18),rgba(0,212,255,.12));z-index:-1}.floating-card{animation:floaty 5.5s ease-in-out infinite}@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}.live-card{border:1px solid var(--line);background:#fff;border-radius:24px;padding:18px;box-shadow:0 16px 40px rgba(50,50,93,.08)}.logo-strip{border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff}.feature-card,.segment-card{height:100%;padding:28px;border-radius:28px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow-sm)}.feature-icon{width:50px;height:50px;border-radius:18px;background:#f0f2ff;color:var(--primary);display:grid;place-items:center;font-size:1.3rem;margin-bottom:18px}.section-title{font-weight:950;letter-spacing:-.045em}.page-eyebrow{font-size:.77rem;text-transform:uppercase;letter-spacing:.14em;color:var(--primary);font-weight:950}.pricing-card{position:relative;overflow:hidden}.pricing-card.featured{border:2px solid var(--primary)!important;transform:translateY(-8px)}.pricing-card.featured:before{content:"";position:absolute;inset:0 0 auto 0;height:6px;background:linear-gradient(90deg,var(--primary),var(--cyan))}
/* App shell */
.app-shell{display:flex;min-height:100vh}.sidebar{position:fixed;inset:16px auto 16px 16px;width:292px;background:rgba(255,255,255,.88);backdrop-filter:blur(20px);border:1px solid rgba(226,232,240,.88);border-radius:28px;padding:18px;box-shadow:var(--shadow-sm);z-index:20}.sidebar-caption{font-size:.7rem;text-transform:uppercase;letter-spacing:.14em;color:#94a3b8;margin:24px 14px 8px;font-weight:950}.sidebar .nav-link{display:flex;align-items:center;gap:11px;border-radius:16px;color:#52667a;padding:.86rem .98rem;font-weight:850}.sidebar .nav-link:hover,.sidebar .nav-link.active{background:#f0f2ff;color:var(--primary);transform:translateX(2px)}.sidebar .nav-link i{font-size:1.08rem}.sidebar-upgrade{margin-top:18px;padding:18px;border-radius:24px;background:linear-gradient(135deg,#0a2540,#312e81);color:#fff;overflow:hidden;position:relative}.sidebar-upgrade:after{content:"";position:absolute;right:-35px;bottom:-35px;width:110px;height:110px;border-radius:50%;background:rgba(255,255,255,.12)}.main-content{margin-left:324px;min-height:100vh;width:calc(100% - 324px)}.topbar{min-height:88px;background:rgba(255,255,255,.84);backdrop-filter:blur(18px);border-bottom:1px solid rgba(226,232,240,.88);display:flex;align-items:center;justify-content:space-between;padding:0 36px;position:sticky;top:0;z-index:10}.content-wrap{padding:32px 36px 54px}.avatar{width:38px;height:38px;border-radius:50%;background:#eef2ff;color:var(--primary);display:grid;place-items:center;font-weight:950}.glass-card,.card{border:1px solid var(--line)!important;border-radius:var(--radius)!important;box-shadow:var(--shadow-sm);background:var(--surface)}.card-header{border-bottom:1px solid var(--line);border-radius:var(--radius) var(--radius) 0 0!important;padding:18px 22px}.card-body{padding:24px}.table{--bs-table-bg:transparent}.table th{font-size:.72rem;text-transform:uppercase;letter-spacing:.1em;color:#94a3b8;font-weight:950;border-bottom-color:var(--line)}.table td{border-bottom-color:#edf1f7;padding:1rem .85rem}.metric-card{background:linear-gradient(180deg,#fff,#fbfdff);border:1px solid var(--line);border-radius:26px;padding:22px;box-shadow:var(--shadow-sm);position:relative;overflow:hidden}.metric-card:after{content:"";position:absolute;right:-36px;top:-36px;width:96px;height:96px;border-radius:999px;background:rgba(99,91,255,.08)}.metric-icon{width:44px;height:44px;border-radius:17px;background:#f0f2ff;color:var(--primary);display:grid;place-items:center;margin-bottom:18px}.metric-card span{display:block;color:var(--muted);font-size:.86rem;font-weight:800}.metric-card strong{display:block;font-size:2.14rem;letter-spacing:-.055em;line-height:1}.metric-trend{font-size:.82rem;color:var(--green);font-weight:900;margin-top:10px}.score-pill{background:#dcfce7;color:#166534;padding:.42rem .74rem;border-radius:999px;font-weight:950}.score-pill.big{font-size:1.35rem;padding:.6rem .94rem}.signal-card{border:1px solid var(--line)!important;border-radius:26px!important;box-shadow:var(--shadow-sm);transition:.18s ease;background:#fff}.signal-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.source-dot{width:9px;height:9px;border-radius:50%;background:var(--primary);display:inline-block;margin-right:7px}.intent-text{font-size:1.03rem;line-height:1.62}.empty-state{border:1px dashed #cbd5e1;border-radius:26px;background:#fff;padding:48px;text-align:center;color:var(--muted)}.bar-row{display:grid;grid-template-columns:136px 1fr 44px;gap:12px;align-items:center;margin:15px 0}.bar-track{height:10px;background:#eef2ff;border-radius:999px;overflow:hidden}.bar-fill{height:100%;background:linear-gradient(90deg,var(--primary),var(--cyan));border-radius:999px}.pill-soft{background:#f8fafc;border:1px solid var(--line);color:#475569}.copy-box{background:#f8fafc;border:1px solid var(--line);border-radius:20px;padding:18px}.status-new{background:#eef2ff;color:#4338ca}.status-saved{background:#ecfdf5;color:#047857}.status-ignored{background:#f1f5f9;color:#475569}.status-contacted{background:#fff7ed;color:#c2410c}.insight-ribbon{display:flex;gap:12px;align-items:center;border:1px solid #dfe7ff;background:linear-gradient(135deg,#fff,#f4f7ff);border-radius:24px;padding:16px 18px}.sparkline{height:54px;border-radius:18px;background:linear-gradient(135deg,rgba(99,91,255,.12),rgba(0,212,255,.16));position:relative;overflow:hidden}.sparkline:after{content:"";position:absolute;left:-10%;right:-10%;bottom:14px;height:3px;background:linear-gradient(90deg,transparent,var(--primary),var(--cyan),transparent);transform:rotate(-4deg)}
/* Auth */
.auth-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 30% 10%,rgba(99,91,255,.24),transparent 28%),radial-gradient(circle at 85% 85%,rgba(0,212,255,.18),transparent 26%),linear-gradient(135deg,#fff,#f6f9fc);padding:28px}.auth-card{background:rgba(255,255,255,.92);backdrop-filter:blur(20px);padding:36px;border-radius:30px;box-shadow:var(--shadow);width:min(492px,94vw);border:1px solid var(--line)}.auth-card form p{margin-bottom:.9rem}.auth-card input{display:block;width:100%;padding:.82rem .95rem;border:1px solid var(--line);border-radius:16px}.auth-card label{font-weight:850;font-size:.9rem;margin-bottom:.28rem}
@media(max-width:992px){.sidebar{position:static;width:auto;margin:14px;border-radius:24px}.app-shell{display:block}.main-content{margin-left:0;width:100%}.topbar{height:auto;padding:18px;gap:14px;align-items:flex-start;flex-direction:column}.content-wrap{padding:18px}.hero-title{font-size:3.5rem}.pricing-card.featured{transform:none}.bar-row{grid-template-columns:100px 1fr 36px}.public-nav .nav-link{display:none!important}}


/* Layout fixes */
.sidebar {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.sidebar .nav {
  overflow-y: auto;
  flex: 1;
}

.sidebar-upgrade {
  flex-shrink: 0;
  margin-top: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.no-scroll {
  overflow: hidden;
}

.mobile-backdrop {
  display: none;
}

/* Better dashboard card behavior */
.metric-card {
  min-height: 190px;
}

.card {
  overflow: hidden;
}

.insight-ribbon {
  flex-wrap: wrap;
}

.insight-ribbon .btn {
  margin-left: auto;
}

/* Public nav mobile cleanup */
.public-nav .container {
  gap: 12px;
}

.public-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Mobile app layout */
@media (max-width: 991.98px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 12px;
    left: 12px;
    bottom: 12px;
    width: min(320px, calc(100vw - 24px));
    margin: 0;
    transform: translateX(-112%);
    transition: transform 0.24s ease;
    z-index: 1050;
    max-height: calc(100vh - 24px);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 37, 64, 0.38);
    backdrop-filter: blur(4px);
    z-index: 1040;
  }

  .mobile-backdrop.show {
    display: block;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .topbar {
    min-height: auto;
    padding: 14px 16px;
    flex-direction: row;
    align-items: center;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar .avatar {
    display: none;
  }

  .content-wrap {
    padding: 18px 14px 42px;
  }

  .sidebar-upgrade {
    display: none;
  }

  .hero {
    padding-top: 0 !important;
  }

  .hero .container {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  .hero-title {
    font-size: clamp(3rem, 15vw, 4.7rem);
    letter-spacing: -0.075em;
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .public-links {
    display: none;
  }

  .public-nav .container {
    justify-content: space-between;
  }

  .public-actions .btn {
    padding: .62rem .82rem;
    font-size: .92rem;
  }

  .brand {
    font-size: 1.05rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 575.98px) {
  .topbar h1 {
    font-size: 1.2rem;
  }

  .page-eyebrow {
    font-size: .65rem;
  }

  .btn {
    padding: .64rem .92rem;
  }

  .hero-badge {
    font-size: .86rem;
  }

  .hero .d-flex.flex-wrap.gap-3 .btn {
    width: 100%;
    justify-content: center;
  }

  .public-actions {
    gap: 6px;
  }

  .public-actions .btn {
    padding: .55rem .72rem;
  }
}

/* Sidebar nav fix */
.sidebar .nav {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 6px;
  overflow-x: hidden !important;
  overflow-y: auto;
  width: 100%;
}

.sidebar .nav-link {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.sidebar .nav-link i {
  flex: 0 0 auto;
}

.sidebar {
  width: 292px;
}

@media (min-width: 992px) {
  .sidebar {
    overflow-x: hidden;
  }
}


/* Premium desktop sidebar fit */
@media (min-width: 992px) {
  .sidebar {
    padding: 16px;
    display: flex;
    flex-direction: column;
  }

  .sidebar .brand {
    flex-shrink: 0;
  }

  .sidebar-caption {
    margin: 18px 12px 6px;
    flex-shrink: 0;
  }

  .sidebar .nav {
    flex: 0 0 auto;
    overflow: visible !important;
    gap: 3px;
  }

  .sidebar .nav-link {
    padding: 0.68rem 0.82rem;
    border-radius: 14px;
    font-size: 0.94rem;
  }

  .sidebar .nav-link i {
    font-size: 1rem;
  }

  .sidebar-upgrade {
    margin-top: auto;
    padding: 16px;
    border-radius: 22px;
  }

  .sidebar-upgrade strong {
    font-size: 0.94rem;
    line-height: 1.35;
  }

  .sidebar-upgrade .btn {
    padding: 0.58rem 0.9rem;
  }
}

/* Premium responsive auth pages */
.auth-split {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(99,91,255,.22), transparent 28%),
    radial-gradient(circle at 90% 85%, rgba(0,212,255,.16), transparent 30%),
    linear-gradient(135deg, #fff, #f6f9fc);
}

.auth-visual {
  position: relative;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.auth-visual:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(10,37,64,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,37,64,.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
  pointer-events: none;
}

.auth-visual-content {
  position: relative;
  max-width: 560px;
  padding-bottom: 64px;
}

.auth-title {
  margin-top: 24px;
  font-size: clamp(3rem, 5.8vw, 5.7rem);
  line-height: .92;
  letter-spacing: -.075em;
  font-weight: 950;
  color: var(--ink);
}

.auth-copy {
  margin-top: 24px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.75;
  max-width: 520px;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: 34px;
}

.auth-form-panel .auth-card {
  width: min(520px, 100%);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form .form-group {
  display: grid;
  gap: 7px;
}

.auth-form ul {
  margin-bottom: 0;
  color: var(--muted);
  font-size: .88rem;
}

.auth-form .helptext {
  color: var(--muted);
  font-size: .82rem;
}

.auth-form input {
  display: block;
  width: 100%;
  padding: .88rem .98rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.auth-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .25rem rgba(99,91,255,.12);
  outline: none;
}

.auth-form label {
  font-weight: 850;
  font-size: .9rem;
  color: var(--ink);
}

@media (max-width: 991.98px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: auto;
    padding: 24px 18px 10px;
    border-right: 0;
  }

  .auth-visual-content {
    padding: 48px 0 20px;
  }

  .auth-title {
    font-size: clamp(2.8rem, 13vw, 4.5rem);
  }

  .auth-copy {
    font-size: 1rem;
  }

  .auth-form-panel {
    padding: 18px;
    place-items: start center;
  }

  .auth-card {
    border-radius: 26px;
    padding: 26px;
  }
}

@media (max-width: 575.98px) {
  .auth-visual {
    padding: 18px 14px 0;
  }

  .auth-visual-content {
    padding: 34px 0 14px;
  }

  .auth-title {
    font-size: clamp(2.55rem, 14vw, 3.7rem);
    letter-spacing: -.07em;
  }

  .auth-form-panel {
    padding: 14px;
  }

  .auth-card {
    padding: 22px;
  }
}

.signal-intent-cell {
  min-width: 340px;
}

.signal-reason {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 0.38rem 0.58rem;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
}

@media (max-width: 575.98px) {
  .signal-intent-cell {
    min-width: 280px;
  }

  .signal-reason {
    border-radius: 14px;
    display: flex;
  }
}



/* =========================================================
   DEMISENSE UI POLISH LAYER
   ========================================================= */

/* Global readability */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

img,
svg {
  max-width: 100%;
}

/* Content width and spacing consistency */
.content-wrap {
  max-width: 1600px;
  margin: 0 auto;
}

.section-title {
  line-height: 1.08;
}

.page-eyebrow {
  display: inline-block;
  margin-bottom: 0.35rem;
}

/* Premium card consistency */
.card,
.glass-card,
.metric-card,
.signal-card {
  border: 1px solid rgba(226, 232, 240, 0.92) !important;
  border-radius: 24px !important;
  box-shadow: 0 14px 42px rgba(50, 50, 93, 0.07), 0 5px 16px rgba(0, 0, 0, 0.035);
}

.card {
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 18px 54px rgba(50, 50, 93, 0.09), 0 7px 20px rgba(0, 0, 0, 0.04);
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  background: #fff;
}

/* Softer bordered panels used inside pages */
.border.rounded-4 {
  border-color: rgba(226, 232, 240, 0.95) !important;
}

.bg-light {
  background-color: #f8fafc !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  line-height: 1.1;
}

.btn-sm {
  min-height: 34px;
  padding: 0.5rem 0.8rem;
  font-size: 0.86rem;
}

.btn-light.border {
  border-color: var(--line) !important;
  color: #334155;
}

.btn-light.border:hover {
  background: #f8fafc;
  color: var(--primary);
  border-color: #d7d5ff !important;
  transform: translateY(-1px);
}

/* Badges */
.badge {
  line-height: 1.15;
  white-space: normal;
}

.badge.rounded-pill {
  padding: 0.48rem 0.72rem;
}

.text-bg-light.border {
  border-color: var(--line) !important;
  color: #475569 !important;
  background: #fff !important;
}

/* Forms */
.form-label {
  color: #23364d;
  margin-bottom: 0.45rem;
}

.form-text {
  color: var(--muted);
  font-size: 0.82rem;
}

textarea.form-control {
  line-height: 1.6;
  resize: vertical;
}

.form-control::placeholder,
.form-select::placeholder {
  color: #9aa8b7;
}

/* Tables */
.table-responsive {
  border-radius: 20px;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 1rem;
  white-space: nowrap;
}

.table tbody td {
  vertical-align: middle;
  padding: 1rem;
}

.table tbody tr:hover {
  background: #fbfdff;
}

/* Empty states */
.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 26px;
  background:
    radial-gradient(circle at 20% 0%, rgba(99, 91, 255, 0.06), transparent 28%),
    #fff;
  padding: 48px 28px;
  text-align: center;
}

.empty-state h4,
.empty-state h5 {
  color: var(--ink);
}

/* Alerts */
.alert {
  border-radius: 22px;
}

.alert-light {
  background: #fff;
}

/* Long URLs and debug payloads */
.text-break,
pre,
code {
  word-break: break-word;
  overflow-wrap: anywhere;
}

pre {
  max-height: 420px;
  overflow: auto;
}

/* Modal polish */
.modal-content {
  border-radius: 26px;
}

.modal-header,
.modal-body,
.modal-footer {
  padding: 1.25rem 1.5rem;
}

/* Utility cards inside dashboards */
.h-100 {
  min-height: 100%;
}

/* Dashboard/list card layout */
.d-grid.gap-3 > .border.rounded-4,
.d-grid.gap-2 > .border.rounded-4 {
  background: #fff;
}

/* Source/signal text blocks */
.intent-text,
.lead {
  line-height: 1.72;
}

.copy-box {
  line-height: 1.65;
}

/* Keep action rows responsive */
.d-flex.flex-wrap.gap-2,
.d-flex.flex-wrap.gap-3 {
  min-width: 0;
}

/* Pagination cards */
.pagination,
.card .btn {
  flex-wrap: wrap;
}

/* Pricing cards */
.pricing-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card.featured:hover {
  transform: translateY(-10px);
}

/* Sidebar polish */
.sidebar {
  background: rgba(255, 255, 255, 0.94);
}

.sidebar .nav-link {
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar .nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(99, 91, 255, 0.08);
}

.sidebar-caption {
  color: #94a3b8;
}

/* Topbar */
.topbar {
  gap: 1rem;
}

.topbar h1,
.topbar h2,
.topbar h3 {
  margin-bottom: 0;
}

/* Improve metric card appearance but avoid old cramped look */
.metric-card {
  min-height: auto;
}

.metric-card strong {
  font-size: clamp(1.6rem, 3vw, 2.14rem);
}

/* Status helpers */
.status-new,
.status-saved,
.status-ignored,
.status-contacted {
  border-radius: 999px;
  padding: 0.42rem 0.74rem;
  font-weight: 850;
}

/* Better mobile tables */
@media (max-width: 767.98px) {
  .table-responsive {
    border: 1px solid var(--line);
  }

  .table {
    min-width: 760px;
  }
}

/* Tablet/mobile layout polish */
@media (max-width: 991.98px) {
  .content-wrap {
    padding: 20px 14px 42px;
  }

  .card-body {
    padding: 1.15rem;
  }

  .display-5 {
    font-size: 2.3rem;
  }

  .display-6 {
    font-size: 2rem;
  }

  .section-title {
    font-size: clamp(1.85rem, 5vw, 2.4rem);
  }

  .btn {
    min-height: 40px;
  }

  .pricing-card.featured:hover,
  .pricing-card.featured {
    transform: none;
  }
}

/* Small mobile polish */
@media (max-width: 575.98px) {
  .content-wrap {
    padding: 16px 12px 36px;
  }

  .card,
  .glass-card,
  .metric-card,
  .signal-card {
    border-radius: 20px !important;
  }

  .card-body {
    padding: 1rem;
  }

  .empty-state {
    padding: 34px 18px;
    border-radius: 22px;
  }

  .section-title {
    letter-spacing: -0.035em;
  }

  .page-eyebrow {
    font-size: 0.64rem;
  }

  .btn {
    padding: 0.62rem 0.82rem;
  }

  .btn-sm {
    padding: 0.45rem 0.7rem;
  }

  .badge.rounded-pill,
  .badge {
    font-size: 0.74rem;
  }

  .row.g-4 {
    --bs-gutter-y: 1rem;
  }

  .row.g-3 {
    --bs-gutter-y: 0.85rem;
  }

  .display-5 {
    font-size: 2rem;
  }

  .display-6 {
    font-size: 1.85rem;
  }

  .lead {
    font-size: 1rem;
  }

  .topbar {
    padding: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .d-flex.justify-content-between,
  .d-flex.flex-wrap.justify-content-between {
    row-gap: 0.85rem;
  }
}

/* Prevent horizontal overflow from long cards/forms */
.main-content,
.content-wrap,
.card,
.card-body,
.row,
.col,
[class*="col-"] {
  min-width: 0;
}

/* Cleaner scrollbar for sidebar/nav areas */
.sidebar .nav::-webkit-scrollbar,
pre::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.sidebar .nav::-webkit-scrollbar-thumb,
pre::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.sidebar .nav::-webkit-scrollbar-track,
pre::-webkit-scrollbar-track {
  background: transparent;
}

/* Public landing section consistency */
.feature-card,
.segment-card,
.live-card,
.hero-panel {
  border-color: rgba(226, 232, 240, 0.92);
}

/* Safer focus states */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 3px solid rgba(99, 91, 255, 0.22);
  outline-offset: 2px;
}


.onboarding-progress {
  height: 10px;
}


.topbar {
  gap: 1rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.topbar-user {
  line-height: 1.15;
}

@media (max-width: 575.98px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar .h3 {
    font-size: 1.1rem;
  }

  .topbar-actions {
    align-items: flex-start;
    gap: 0.5rem;
  }

  .topbar-user {
    max-width: 90px;
    font-size: 0.8rem;
  }

  .topbar-user small {
    display: block;
    font-size: 0.68rem;
    white-space: normal;
  }

  .topbar-logout .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar .nav {
  flex-shrink: 0;
}

.sidebar-upgrade {
  margin-top: auto;
  flex-shrink: 0;
}

.sidebar-logout-form {
  margin: 0;
}

.sidebar-logout-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-weight: 700;
}

.sidebar-logout-button:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--bs-primary);
}

.topbar {
  gap: 1rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.topbar-user {
  line-height: 1.15;
}

.topbar-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 991.98px) {
  .sidebar-upgrade {
    margin-top: 1rem;
  }
}

@media (max-width: 575.98px) {
  .topbar {
    align-items: flex-start;
    padding-inline: 1rem;
  }

  .topbar .h3 {
    font-size: 1.08rem;
    line-height: 1.15;
  }

  .topbar .page-eyebrow {
    font-size: 0.68rem;
    max-width: 120px;
    overflow-wrap: anywhere;
  }

  .topbar-actions {
    margin-left: auto;
    gap: 0;
  }

  .topbar-avatar {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }
}


@media (max-width: 575.98px) {
  .topbar {
    min-height: 72px;
    padding: 0.85rem 1rem;
  }

  .topbar > .d-flex:first-child {
    min-width: 0;
    flex: 1;
  }

  .topbar .page-eyebrow {
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    max-width: 140px;
    line-height: 1.2;
  }

  .topbar .h3 {
    font-size: 1.05rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
  }

  .section-title,
  .content-wrap h2.section-title {
    font-size: 1.65rem;
    line-height: 1.08;
  }

  .content-wrap h4.fw-black {
    font-size: 1.2rem;
    line-height: 1.18;
  }

  .content-wrap {
    padding-top: 1.25rem;
  }

  .btn {
    white-space: nowrap;
  }
}

@media (max-width: 575.98px) {
  .content-wrap .d-flex.flex-wrap.gap-2,
  .content-wrap .d-flex.flex-wrap.gap-3 {
    gap: 0.5rem !important;
  }

  .content-wrap .btn {
    padding-inline: 0.85rem;
  }
}