/* ==============================================================================
   NUEVO PIXELS CRM — COMMERCIAL SAAS DESIGN SYSTEM
   Modern, calm, premium, and efficient presentation layer.
   Comparable to modern benchmarks (Linear, Stripe, Supabase, Tailwind UI).
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* --- 1. Neutral Palette (Slate / Zinc Scale) --- */
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-850: #151e32;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-150: #eef2f6;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;

  /* --- 2. Brand & Semantic Colors --- */
  --primary-50:  #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-ring: rgba(37, 99, 235, 0.16);

  --emerald-50:  #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-600: #059669;
  --emerald-700: #047857;

  --amber-50:  #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --amber-700: #b45309;

  --rose-50:  #fff1f2;
  --rose-100: #ffe4e6;
  --rose-600: #e11d48;
  --rose-700: #be123c;

  --violet-50:  #f5f3ff;
  --violet-100: #ede9fe;
  --violet-600: #7c3aed;
  --violet-700: #6d28d9;

  --sky-50:  #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-600: #0284c7;
  --sky-700: #0369a1;

  /* --- 3. App Surfaces & Tokens --- */
  --app-bg:         #f8fafc;
  --surface-bg:     #ffffff;
  --sidebar-bg:     #090d16;
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --sidebar-hover:  rgba(255, 255, 255, 0.06);
  --topbar-bg:      rgba(255, 255, 255, 0.94);
  --border-subtle:  #e2e8f0;
  --border-hairline:#f1f5f9;
  --text-main:      #0f172a;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;

  /* --- 4. Elevation Shadows --- */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.07), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-dropdown: 0 16px 32px -4px rgba(15, 23, 42, 0.18), 0 4px 12px -2px rgba(15, 23, 42, 0.08);

  /* --- 5. Geometry & Radii --- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* Backward-compatible variables */
  --primary-color: var(--primary-600);
  --primary-hover: var(--primary-700);
  --primary-subtle: var(--primary-50);
  --success-color: var(--emerald-600);
  --success-subtle: var(--emerald-50);
  --warning-color: var(--amber-600);
  --warning-subtle: var(--amber-50);
  --danger-color: var(--rose-600);
  --danger-subtle: var(--rose-50);
  --purple-color: var(--violet-600);
  --purple-subtle: var(--violet-50);
  --nav-bg: var(--sidebar-bg);
  --nav-border: var(--sidebar-border);
  --body-bg: var(--app-bg);
  --card-bg: var(--surface-bg);
  --border-color: var(--border-subtle);
  --card-shadow: var(--shadow-sm);
  --dropdown-shadow: var(--shadow-dropdown);
}

/* ==============================================================================
   GLOBAL RESET & TYPOGRAPHY
   ============================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  min-height: 100vh;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--app-bg);
  color: var(--text-main);
  font-size: 0.8125rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-tabular,
.table td,
.table th,
.p-val,
.stat-value,
.counter-num,
.badge,
.font-monospace {
  font-variant-numeric: tabular-nums lining-nums;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--slate-100);
}
::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

/* ==============================================================================
   1. UNIVERSAL APPLICATION SHELL (LEFT SIDEBAR + TOPBAR + MAIN)
   ============================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--app-bg);
}

.app-sidebar {
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 1040;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none !important;
}

.sidebar-brand-logo {
  height: 38px;
  width: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.sidebar-brand-text {
  line-height: 1.15;
}

.sidebar-brand-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-brand-badge {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.12rem 0.38rem;
  border-radius: var(--radius-xs);
  background: rgba(37, 99, 235, 0.25);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-brand-sub {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.6rem;
}

.sidebar-section-title {
  font-size: 0.62rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.65rem 0.55rem 0.25rem;
  margin-top: 0.2rem;
}

.sidebar-link {
  color: #94a3b8 !important;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.42rem 0.65rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none !important;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.sidebar-link i {
  font-size: 0.88rem;
  width: 1.15rem;
  text-align: center;
  color: #64748b;
  transition: color 0.15s ease;
}

.sidebar-link:hover {
  color: #ffffff !important;
  background: var(--sidebar-hover);
}

.sidebar-link:hover i {
  color: #93c5fd;
}

.sidebar-link.active {
  color: #ffffff !important;
  background: var(--primary-600) !important;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.sidebar-link.active i {
  color: #ffffff !important;
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.12rem 0.42rem;
  border-radius: var(--radius-pill);
}

.sidebar-section-admin {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-link-admin {
  color: #cbd5e1 !important;
}
.sidebar-link-admin i {
  color: #fbbf24;
}
.sidebar-link-admin:hover i {
  color: #fef08a;
}
.sidebar-link-admin.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
}

.sidebar-footer {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--sidebar-border);
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow: hidden;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.sidebar-avatar.admin {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.sidebar-user-meta {
  line-height: 1.15;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sidebar-user-role {
  font-size: 0.63rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.sidebar-btn-exit {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  transition: all 0.15s ease;
  text-decoration: none !important;
  flex-shrink: 0;
}
.sidebar-btn-exit:hover {
  background: var(--rose-600);
  border-color: var(--rose-600);
  color: #ffffff;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1030;
  }
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--app-bg);
}

.app-topbar {
  height: 52px;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-toggle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--slate-700);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.topbar-toggle:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

@media (max-width: 991.98px) {
  .topbar-toggle {
    display: inline-flex;
  }
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--slate-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-breadcrumb a {
  color: var(--slate-600);
  text-decoration: none;
  font-weight: 500;
}
.topbar-breadcrumb a:hover {
  color: var(--primary-600);
}
.topbar-breadcrumb .separator {
  color: var(--slate-300);
  font-size: 0.68rem;
}
.topbar-breadcrumb .current {
  color: var(--slate-900);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.topbar-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--emerald-600);
  display: inline-block;
  box-shadow: 0 0 0 2px var(--emerald-100);
}

.topbar-quick-search {
  position: relative;
  width: 220px;
}
.topbar-quick-search input {
  font-size: 0.74rem;
  padding: 0.28rem 0.6rem 0.28rem 1.8rem;
  border-radius: var(--radius-sm);
  background: var(--slate-100);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.topbar-quick-search input:focus {
  background: #ffffff;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.topbar-quick-search i {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-400);
  font-size: 0.75rem;
  pointer-events: none;
}

.app-content {
  flex: 1;
  padding: 1rem 1.25rem 2rem;
  min-width: 0;
}

.app-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--slate-500);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.app-footer a {
  color: var(--slate-600);
  text-decoration: none;
}
.app-footer a:hover {
  color: var(--primary-600);
}

/* ==============================================================================
   2. MODERN SAAS CARDS & CONTAINERS
   ============================================================================== */
.card,
.saas-card {
  background: var(--surface-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover,
.saas-card:hover {
  border-color: var(--slate-300);
}

.card-header,
.saas-card-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 0.95rem !important;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body,
.saas-card-body {
  padding: 0.85rem 0.95rem !important;
}

.saas-kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none !important;
  display: block;
}
.saas-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-500);
}

.saas-kpi-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
}

.saas-kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.saas-kpi-sub {
  font-size: 0.65rem;
  color: var(--slate-400);
  margin-top: 0.2rem;
}

/* ==============================================================================
   3. CONNECTED LIFECYCLE PIPELINE STRIP
   ============================================================================== */
.pipeline-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  transition: all 0.15s ease;
  text-decoration: none !important;
  display: block;
  position: relative;
}
.pipeline-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-500);
}
.pipeline-card .p-title {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pipeline-card .p-val {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--slate-900);
  margin: 1px 0;
}
.pipeline-card .p-sub {
  font-size: 0.63rem;
  color: var(--slate-500);
}

/* ==============================================================================
   4. SEGMENTED VIEW CONTROLS & RECESSED TABS
   ============================================================================== */
.segmented-control {
  background: var(--slate-100);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.segmented-link {
  color: var(--slate-600) !important;
  font-size: 0.73rem;
  font-weight: 500;
  padding: 0.26rem 0.65rem;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.segmented-link:hover {
  color: var(--slate-900) !important;
  background: rgba(255, 255, 255, 0.6);
}

.segmented-link.active {
  background: #ffffff !important;
  color: var(--slate-950) !important;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.segmented-link.active-primary {
  background: var(--primary-600) !important;
  color: #ffffff !important;
}

.segmented-link.active-danger {
  background: var(--rose-600) !important;
  color: #ffffff !important;
}

.segmented-link.active-warning {
  background: var(--amber-600) !important;
  color: #ffffff !important;
}

.segmented-link.active-success {
  background: var(--emerald-600) !important;
  color: #ffffff !important;
}

/* ==============================================================================
   5. LINEAR / STRIPE DATA TABLES
   ============================================================================== */
.table-responsive {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  min-height: 260px;
}

.table {
  font-size: 0.78rem !important;
  margin-bottom: 0;
  width: 100%;
}

.table thead th {
  background-color: var(--slate-50) !important;
  color: var(--slate-600) !important;
  font-weight: 600 !important;
  font-size: 0.70rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  vertical-align: middle;
  white-space: nowrap;
}

.table thead th a {
  color: inherit;
  text-decoration: none;
}
.table thead th a:hover {
  color: var(--primary-600);
}

.table tbody td {
  padding: 5px 8px !important;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-hairline);
  color: var(--slate-900);
}

.table-hover tbody tr {
  transition: background-color 0.12s ease;
}

.table-hover tbody tr:hover {
  background-color: #f8fafc !important;
}

.table-sticky-header thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 var(--border-subtle);
}

/* ==============================================================================
   6. MICRO STATUS BADGES (WITH STATUS DOTS)
   ============================================================================== */
.badge {
  font-weight: 600 !important;
  font-size: 0.65rem !important;
  padding: 0.22em 0.55em !important;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  line-height: 1.2;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}

.badge-subtle-success, .bg-success-subtle {
  background-color: var(--emerald-50) !important;
  color: var(--emerald-700) !important;
  border: 1px solid rgba(5, 150, 105, 0.25) !important;
}

.badge-subtle-primary, .bg-primary-subtle {
  background-color: var(--primary-50) !important;
  color: var(--primary-700) !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
}

.badge-subtle-warning, .bg-warning-subtle {
  background-color: var(--amber-50) !important;
  color: var(--amber-700) !important;
  border: 1px solid rgba(217, 119, 6, 0.25) !important;
}

.badge-subtle-danger, .bg-danger-subtle {
  background-color: var(--rose-50) !important;
  color: var(--rose-700) !important;
  border: 1px solid rgba(225, 29, 72, 0.25) !important;
}

.badge-subtle-info, .bg-info-subtle {
  background-color: var(--sky-50) !important;
  color: var(--sky-700) !important;
  border: 1px solid rgba(2, 132, 199, 0.25) !important;
}

.badge-subtle-purple, .bg-purple-subtle {
  background-color: var(--violet-50) !important;
  color: var(--violet-700) !important;
  border: 1px solid rgba(124, 58, 237, 0.25) !important;
}

.badge-hot-glow {
  background: var(--rose-600) !important;
  color: #ffffff !important;
  border: 1px solid var(--rose-700) !important;
  box-shadow: 0 1px 4px rgba(225, 29, 72, 0.3);
}

/* ==============================================================================
   7. FORM CONTROLS & MODERN BUTTONS
   ============================================================================== */
.form-control, .form-select {
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  border-color: var(--border-subtle);
  color: var(--slate-900);
  background-color: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.form-control-sm, .form-select-sm {
  font-size: 0.75rem !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: var(--radius-sm);
}

.form-label {
  font-size: 0.73rem !important;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 0.25rem;
}

.btn {
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-700);
  border-color: var(--primary-700);
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.btn-xs {
  font-size: 0.71rem !important;
  padding: 2px 7px !important;
  line-height: 1.3;
  border-radius: var(--radius-sm);
}

.btn-sm {
  font-size: 0.76rem !important;
  padding: 0.28rem 0.65rem !important;
  border-radius: var(--radius-sm);
}

.dropdown-menu {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 0.35rem 0;
  font-size: 0.78rem;
  z-index: 1070;
}

.dropdown-item {
  color: var(--slate-800);
  padding: 0.38rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  transition: background-color 0.12s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: var(--primary-50);
  color: var(--primary-700);
}

.dropdown-item.text-danger:hover {
  background-color: var(--rose-50);
  color: var(--rose-700);
}

/* ==============================================================================
   8. FLOATING TOAST NOTIFICATIONS
   ============================================================================== */
.toast-container-floating {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  z-index: 1090;
  max-width: 360px;
  width: 100%;
}

.saas-toast {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  animation: toastSlideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==============================================================================
   9. TELECALLER WORKSTATION COMPONENTS
   ============================================================================== */
.tc-lead-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tc-lead-card:hover {
  box-shadow: var(--shadow-md);
}

.tc-btn-call {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  padding: 0.55rem 0.85rem !important;
  border-radius: var(--radius-sm) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
  transition: all 0.15s ease;
}
.tc-btn-call:hover, .tc-btn-call:active {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
  transform: translateY(-1px);
}

.tc-btn-update {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  padding: 0.52rem 0.85rem !important;
  border-radius: var(--radius-sm) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
}
.tc-btn-update:hover, .tc-btn-update:active {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  transform: translateY(-1px);
}

.tc-outcome-box {
  background: var(--slate-50);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.tc-outcome-select {
  width: 175px;
  max-width: 190px;
  font-size: 0.72rem !important;
  padding: 0.20rem 0.45rem !important;
  border-radius: var(--radius-sm);
}

.tc-outcome-grid {
  width: 100%;
}

.tc-btn-outcome {
  border: 1px solid var(--slate-300);
  background: #ffffff;
  color: var(--slate-800);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.38rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  line-height: 1.25;
  text-align: center;
  user-select: none;
  box-shadow: var(--shadow-xs);
}
.tc-btn-outcome:hover {
  background: var(--slate-100);
  border-color: var(--slate-400);
  color: var(--slate-950);
}
.tc-btn-outcome.active {
  background: var(--primary-600) !important;
  border-color: var(--primary-700) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3);
}

.tc-software-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.48rem;
  border-radius: var(--radius-xs);
  background: var(--slate-50);
  border: 1px solid var(--slate-300);
  color: var(--slate-800);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}
.tc-software-pill:hover {
  background: var(--slate-200);
  border-color: var(--slate-400);
}

.tc-module-pill {
  font-size: 0.66rem;
  font-weight: 500;
  padding: 0.14rem 0.42rem;
  border-radius: var(--radius-xs);
  background: var(--emerald-50);
  border: 1px solid var(--emerald-100);
  color: var(--emerald-700);
  display: inline-flex;
  align-items: center;
}

.tc-timeline-item {
  position: relative;
  padding-left: 1.25rem;
  padding-bottom: 0.85rem;
  border-left: 2px solid var(--border-subtle);
}
.tc-timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}
.tc-timeline-dot {
  position: absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary-600);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px var(--primary-600);
}

.card-action-counter {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 0.85rem 1rem;
  transition: all 0.2s ease;
  text-decoration: none !important;
  display: block;
  box-shadow: var(--shadow-xs);
}
.card-action-counter:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-action-counter .counter-num {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 4px;
  color: var(--slate-900);
}
.card-action-counter .counter-label {
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
}
