
:root{
  --bg: #f5f7fb;           /* light gray background */
  --card: #ffffff;         /* white cards */
  --muted: #6b7280;        /* gray-500 */
  --primary: #6366F1;      /* indigo-500 */
  --primary-strong:#4F46E5;/* indigo-600 */
  --success:#10B981;       /* emerald-500 */
  --danger:#EF4444;        /* red-500 */
  --ring: #e5e7eb;         /* light border */
  --text: #0f172a;         /* slate-900 */
  --text-weak:#475569;     /* slate-600 */
}
html,body{height:100%; background:var(--bg); color:var(--text);}
a{color:#111827; text-decoration:none}
a:hover{color:#000}
.btn-primary{background:var(--primary); border-color:var(--primary-strong)}
.btn-outline-light{border-color:#e5e7eb;color:#374151}
.btn-outline-light:hover{background:#f3f4f6}
.navbar{background:var(--card); border-bottom:1px solid var(--ring)}

.sidebar{
  width:280px; position:fixed; top:61px; bottom:0; left:0; 
  background:linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-right:1px solid #e2e8f0; padding:20px 0; overflow-y:auto;
  display:flex; flex-direction:column;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

/* Desktop transitions */
@media (min-width: 993px) {
  .sidebar {
    transition: margin-left 0.3s ease;
  }
}

/* Mobile transitions */
@media (max-width: 992px) {
  .sidebar {
    transition: transform 0.3s ease;
  }
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Modern Brand Section */
.sidebar .brand{
  display:flex; align-items:center; gap:12px; padding:0 20px; margin-bottom:32px;
}
.sidebar .brand-icon{
  width:44px; height:44px; background:linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  border-radius:12px; display:flex; align-items:center; justify-content:center;
  color:white; box-shadow:0 4px 12px rgba(99,102,241,0.25);
}
.sidebar .brand-text{display:flex; flex-direction:column; gap:1px;}
.sidebar .brand-title{font-weight:700; font-size:18px; color:var(--text); letter-spacing:-0.02em;}
.sidebar .brand-subtitle{font-size:12px; color:var(--text-weak); font-weight:500; letter-spacing:0.02em;}

/* Navigation Sections */
.sidebar .nav{flex:1; padding:0px 12px 0 12px;}
.sidebar .nav-section{margin-bottom:28px;}
.sidebar .nav-section-title{
  font-size:11px; font-weight:600; color:#64748b; text-transform:uppercase;
  letter-spacing:0.05em; padding:0 12px 8px 12px; margin-bottom:4px;
  border-bottom:1px solid #e2e8f0; padding-bottom:12px;
}

/* Modern Navigation Links */
.sidebar .nav-link{
  color:#475569; border-radius:12px; padding:12px 16px; margin:3px 0;
  display:flex; align-items:center; gap:12px; font-size:14px; font-weight:500;
  transition:all 0.2s ease; position:relative; text-decoration:none;
  background:transparent;
}
.sidebar .nav-link:hover{
  background:rgba(255, 255, 255, 0.8); color:#1e293b; transform:translateX(3px);
  box-shadow:0 2px 8px rgba(0, 0, 0, 0.08);
}
.sidebar .nav-link.active{
  background:linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
  color:var(--primary-strong); box-shadow:0 3px 12px rgba(99,102,241,0.15);
  border:1px solid rgba(99,102,241,0.1);
}
.sidebar .nav-link.active::before{
  content:''; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:4px; height:24px; background:linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  border-radius:0 4px 4px 0; box-shadow:0 2px 4px rgba(99,102,241,0.3);
}

/* Navigation Icons */
.sidebar .nav-icon{
  flex-shrink:0; opacity:0.7; transition:opacity 0.2s ease;
}
.sidebar .nav-link:hover .nav-icon,
.sidebar .nav-link.active .nav-icon{
  opacity:1;
}
.sidebar .nav-link.active .nav-icon{
  color:var(--primary);
}

/* Navigation Badge */
.sidebar .nav-badge{
  margin-left:auto; font-size:10px; font-weight:600; color:var(--primary);
  background:rgba(99,102,241,0.1); padding:2px 6px; border-radius:4px;
  text-transform:uppercase; letter-spacing:0.02em;
}

/* Modern Footer */
.sidebar-footer{
  margin-top:auto; padding:20px 20px; 
  border-top:1px solid rgba(226, 232, 240, 0.8);
  background:rgba(255, 255, 255, 0.4);
  backdrop-filter:blur(8px);
}
.sidebar .footer-content{display:flex; flex-direction:column; gap:2px;}
.sidebar .footer-year{font-size:11px; color:var(--text-weak); font-weight:500;}
.sidebar .footer-company{font-size:12px; color:var(--text); font-weight:600;}
/* Sidebar States - Desktop (push content) */
@media (min-width: 993px) {
  .sidebar-collapsed .sidebar {
    margin-left: -280px;
  }

  .sidebar-collapsed .content {
    margin-left: 0;
  }
  
  /* When sidebar is expanded (not collapsed), only content should be pushed */
  body:not(.sidebar-collapsed) .content {
    margin-left: 280px;
  }
  
  body:not(.sidebar-collapsed) .sidebar {
    margin-left: 0;
  }
}

/* Sidebar States - Mobile (overlay) */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-280px);
  }
  
  .sidebar-open .sidebar {
    transform: translateX(0);
  }
  
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
  }
  
  .content {
    margin-left: 0 !important;
  }
}

.content{margin-left:280px; padding:16px; transition: margin-left 0.3s ease;}
.card{background:var(--card); border:1px solid var(--ring); border-radius:16px; color:var(--text)}
.card .card-title{color:#111827; font-size:16px}
.stat{font-size:12px; color:var(--text-weak)}
.kpi{font-size:22px; font-weight:700}
.user-pill{
  display:flex; align-items:center; gap:10px; padding:6px 10px; background:#f8fafc;
  border:1px solid var(--ring); border-radius:14px; color:#0f172a; font-size:14px
}
.avatar{
  width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  background:#eef2ff; color:#4f46e5; font-weight:700; letter-spacing:.5px; font-size:13px
}
.badge-soft{background:#f8fafc; border:1px solid var(--ring); color:#6b7280; padding:6px 10px; border-radius:999px; font-size:12px}
.form-control, .form-select{background:#ffffff; border-color:#e5e7eb; color:#111827; font-size:14px}
.form-control:focus, .form-select:focus{border-color:var(--primary); box-shadow:0 0 0 .25rem rgba(99,102,241,.15)}
.table-actions{display:flex; gap:8px; flex-wrap:wrap}
.footer{color:#9ca3af; font-size:12px; padding:10px 0}
.searchbar{max-width:560px; width:100%}
.searchbar input{border-radius:14px; background:#ffffff; border:1px solid #e5e7eb; color:#111827; font-size:14px}
#table-holder{min-height:420px}

/* Tabulator overrides (light) */
.tabulator{font-size: 0.85rem; line-height: 1.2; background:#ffffff; border:1px solid var(--ring); border-radius:12px}
.tabulator .tabulator-header{background:#f8fafc; color:#111827; border-bottom:1px solid var(--ring)}
.tabulator .tabulator-col{background:#f8fafc}
.tabulator .tabulator-tableholder{background:#ffffff}
.tabulator-row{color:#111827; border-bottom:1px solid #f1f5f9}
.tabulator-row.tabulator-selected{background:#eef2ff}
.tabulator .tabulator-page{background:#ffffff; color:#111827; border:1px solid #e5e7eb}

#export-csv,
#delete-selected,
#apply,
#filters-reset,
#columns-toggle,
#columns-show-all,
#columns-hide-all
 {
  font-size: 0.9rem;       /* smaller text */
  padding: 0.25rem 0.6rem; /* tighter padding */
  line-height: 1.2;
}

.logo {
  width: 170px;   /* pick your width */
  height: auto;   /* keeps proportions */
}

.logo-landing-page {
  width: 140px;   /* pick your width */
  height: auto;   /* keeps proportions */
}

/* Show a dropdown arrow on selects */
.form-select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color:#ffffff;                 /* keep your white bg */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center; /* arrow position */
  background-size: 1rem;                    /* arrow size */
  padding-right: 2rem;                      /* space so text doesn't overlap arrow */
  border-radius: 8px;                        /* optional: match your style */
}
.form-select:disabled{ opacity:.6; }

/* --- Sidebar collapse / expand --- */
.sidebar { transition: transform .25s ease, width .25s ease; }
.content { transition: margin-left .25s ease; }

/* Desktop: collapsed = sidebar slides out, content full width */
body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
body.sidebar-collapsed .content { margin-left: 0; }

/* Mobile: treat sidebar as off-canvas overlay */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); z-index: 1040; width: 280px; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .content { margin-left: 0 !important; }

  /* dark backdrop behind the off-canvas sidebar */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1030;
  }
  body.sidebar-open .sidebar-backdrop { display: block; }
}

/* Small style for the toggle button */
#sidebar-toggle.btn { line-height: 1; padding: .35rem .5rem; }


/* Filters collapsible */
/* AFTER: allow overlays to escape */
#filters-panel{
  overflow: visible;
  transition: max-height .25s ease, opacity .2s ease;
}



#filters-toggle .chev{ transition: transform .2s ease; }
#filters-toggle[aria-expanded="false"] .chev{ transform: rotate(-90deg); }

/* Columns dropdown: match button sizing */
.columns-menu { font-size: 0.9rem; }
.columns-menu .dropdown-item,
.columns-menu .form-check-label,
.columns-menu .btn { font-size: 0.9rem; line-height: 1.2; }

.columns-menu .form-check { margin-bottom: .25rem; }
.columns-menu .form-check-input {
  width: .9rem; height: .9rem; margin-top: .2rem;
}


.tabulator-cell[data-field="revised"],
.tabulator-cell[data-field="excluded"] {
  cursor: pointer;
  font-size: 18px;   /* makes the box a bit larger */
  line-height: 1;
}


/* Make sure Tom Select menu is above cards/table/sidebar */
/* TomSelect in-cell tweaks */
.ts-dropdown{
  z-index: 4000;        /* above the grid/toolbars */
  max-height: 680px;    /* reasonable height */
  overflow:auto;
}


.ts-dropdown .ts-dropdown-content{
  max-height: 280px;
  overflow: auto;
}

#lusha-tools .form-control { min-width: 180px; }



/* --- Contacts drawer: compact density --- */
.contacts-drawer {
  font-size: 0.8rem;               /* shrink everything inside the drawer */
}

.contacts-drawer .form-control,
.contacts-drawer .form-select,
.contacts-drawer .input-group-text,
.contacts-drawer .btn {
  font-size: 0.8rem;
}

/* Extra small button (smaller than Bootstrap .btn-sm) */
.btn-xxs {
  padding: .125rem .35rem;
  font-size: .78rem;
  line-height: 1.1;
  border-radius: .25rem;
}

/* Tabulator compact: smaller header, cells, and icons */
.contacts-drawer .tabulator {
  font-size: 0.85rem;
}
.contacts-drawer .tabulator-header {
  min-height: 28px;
}
.contacts-drawer .tabulator-header .tabulator-col,
.contacts-drawer .tabulator-cell {
  padding-top: 4px;
  padding-bottom: 4px;
}

/* If Tabulator header filters ever render, hide them hard */
.contacts-drawer .tabulator-header-filter {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}

/* Keep the offcanvas header compact too */
#companyContactsDrawer .offcanvas-header {
  padding-top: .5rem;
  padding-bottom: .5rem;
}


/* Solid Contacts button styling (slightly smaller) */
.btn-fetch-email{
  font-size: 0.8rem;
  line-height: 0.8;
  padding: .25rem .5rem;   /* tighter than default */
}

.btn-fetch-email.btn-primary{
  background-color: #0a58ca;  /* Bootstrap’s primary hover shade (darker blue) */
  border-color: #0a58ca;
}
.btn-fetch-email.btn-primary:hover{
  background-color: #094cab;
  border-color: #094cab;
}



/* Solid Contacts button styling (slightly smaller) */
.btn-contacts{
  font-size: 0.8rem;
  line-height: 0.8;
  padding: .25rem .5rem;   /* tighter than default */
}

/* (Optional) make it a bit darker than default primary */
.btn-contacts.btn-primary{
  background-color: #0a58ca;  /* Bootstrap's primary hover shade (darker blue) */
  border-color: #0a58ca;
}
.btn-contacts.btn-primary:hover{
  background-color: #094cab;
  border-color: #094cab;
}

/* ===== GLOBAL KPI DASHBOARD ===== */

/* Global KPI Dashboard Container */
.kpi-dashboard-global {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 1px solid #cbd5e1;
  padding: 0.75rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* KPI Cards in horizontal layout */
.kpi-dashboard-global .kpi-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.6);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  text-align: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  min-width: 90px;
  flex-shrink: 0;
}

.kpi-dashboard-global .kpi-card:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Technology KPIs have subtle accent */
.kpi-dashboard-global .kpi-card.tech-kpi {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(148, 163, 184, 0.4);
}

.kpi-dashboard-global .kpi-card.tech-kpi:hover {
  border-color: #64748b;
}

/* KPI Value (compact for horizontal layout) */
.kpi-dashboard-global .kpi-value {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

/* KPI Label (small caps) */
.kpi-dashboard-global .kpi-label {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.5rem;
  font-weight: 300;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
}

/* Loading Spinner in global KPIs */
.kpi-dashboard-global .kpi-value .spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.1em;
  color: var(--primary);
}

/* Responsive behavior for global KPIs */
@media (max-width: 1200px) {
  .kpi-dashboard-global .kpi-card {
    min-width: 80px;
    padding: 0.4rem 0.6rem;
  }
  
  .kpi-dashboard-global .kpi-value {
    font-size: 1.1rem;
  }
  
  .kpi-dashboard-global .kpi-label {
    font-size: 0.6rem;
  }
}

@media (max-width: 992px) {
  .kpi-dashboard-global .kpi-card {
    min-width: 70px;
    padding: 0.35rem 0.5rem;
  }
  
  .kpi-dashboard-global .kpi-value {
    font-size: 1rem;
  }
  
  .kpi-dashboard-global .kpi-label {
    font-size: 0.55rem;
  }
}

@media (max-width: 576px) {
  .kpi-dashboard-global {
    padding: 0.5rem 0;
  }
  
  .kpi-dashboard-global .d-flex {
    gap: 0.25rem;
  }
  
  .kpi-dashboard-global .kpi-card {
    min-width: 60px;
    padding: 0.25rem 0.4rem;
  }
  
  .kpi-dashboard-global .kpi-value {
    font-size: 1rem;
  }
  
  .kpi-dashboard-global .kpi-label {
    font-size: 0.5rem;
    letter-spacing: 0.05em;
  }
}

/* ===== TOPBAR KPI CARDS ===== */

/* Topbar KPI Container */
.kpi-topbar {
  flex-shrink: 0;
}

/* Compact KPI Cards for Topbar */
.kpi-card-topbar {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(203, 213, 225, 0.5);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  text-align: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
  min-width: 70px;
  flex-shrink: 0;
}

.kpi-card-topbar:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Lusha Processes KPI widget styling */
.kpi-card-topbar.lusha-processes {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.15));
  border-color: rgba(16, 185, 129, 0.3);
  position: relative;
}

.kpi-card-topbar.lusha-processes:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.2));
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.2);
}

.kpi-card-topbar.lusha-processes.running-processes {
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.kpi-card-topbar.lusha-processes .kpi-value {
  color: #059669;
  font-weight: 600;
}

.kpi-card-topbar.lusha-processes .kpi-label {
  color: #047857;
  font-weight: 500;
}

/* Tech KPIs in topbar have subtle accent */
.kpi-card-topbar.tech-kpi {
  background: rgba(248, 250, 252, 0.7);
  border-color: rgba(148, 163, 184, 0.3);
}

.kpi-card-topbar.tech-kpi:hover {
  border-color: #64748b;
}

/* Topbar KPI Value (extra compact) */
.kpi-card-topbar .kpi-value {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}

/* Topbar KPI Label (tiny) */
.kpi-card-topbar .kpi-label {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.45rem;
  font-weight: 300;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

/* Loading Spinner in topbar KPIs */
.kpi-card-topbar .kpi-value .spinner-border-sm {
  width: 0.875rem;
  height: 0.875rem;
  border-width: 0.1em;
  color: var(--primary);
}

/* Responsive behavior for topbar KPIs */
@media (max-width: 1200px) {
  .kpi-topbar {
    gap: 0.25rem;
  }
  
  .kpi-card-topbar {
    min-width: 50px;
    padding: 0.2rem 0.3rem;
  }
  
  .kpi-card-topbar .kpi-value {
    font-size: 0.7rem;
  }
  
  .kpi-card-topbar .kpi-label {
    font-size: 0.3rem;
  }
}

@media (max-width: 992px) {
  .kpi-topbar {
    display: none !important;
  }
}

/* Adjust content margin for global KPI bar */
.content {
  margin-top: 0;
}

/* ===== CAMPAIGNS PAGE ENHANCEMENTS ===== */

/* Ensure Inter font applies everywhere */
body, 
.card-title, 
.form-label, 
.form-control, 
.form-select, 
.btn, 
.badge, 
.stat,
.offcanvas-title,
#campaign-selector,
#campaign-selector option,
select,
select option {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Enhanced Card Styling */
.card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.card-body {
  padding: 1.5rem;
}

/* Modern Card Titles */
.card-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1e293b;
  letter-spacing: -0.01em;
  margin-bottom: 0;
}

/* Enhanced Form Elements */
.form-label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

.form-control, .form-select {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.875rem;
  padding: 0.625rem 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-weight: 400;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
  outline: none;
}

/* Modern Button Styling */
.btn {
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  border: none;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  background: linear-gradient(135deg, var(--primary-strong) 0%, #3730a3 100%);
}

.btn-outline-light {
  border-color: #e2e8f0;
  color: #64748b;
  font-weight: 500;
}

.btn-outline-light:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 8px;
  line-height: 1.1;
}

/* Delete Campaign and Export CSV buttons should be normal sized */
#delete-campaign-btn,
#export-csv-btn {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  line-height: 1.3 !important;
}

/* Left table "Add" buttons - smaller with smaller font */
#available-companies-table .btn {
  padding: 0.2rem 0.4rem !important;
  font-size: 0.7rem !important;
  line-height: 1 !important;
  border-radius: 6px;
}

/* Right table buttons - smaller but keep font size */
#campaign-companies-table .btn {
  padding: 0.15rem 0.4rem !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
  border-radius: 6px;
}

/* Companies HUB page buttons - same size as left table Add buttons */
.tabulator .btn,
#table-holder .btn {
  padding: 0.2rem 0.4rem !important;
  font-size: 0.7rem !important;
  line-height: 1 !important;
  border-radius: 6px;
}

/* Enhanced Badges */
.badge {
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.badge.bg-secondary {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border: 1px solid #e2e8f0;
}

.badge.bg-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%) !important;
  border: none;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.25);
}

/* Stats Text Enhancement */
.stat {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Form Text Enhancement */
.form-text {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 400;
  margin-top: 0.25rem;
}

/* Enhanced Spacing */
.row.g-3 > * {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Modern Select Multiple Styling */
.form-select[multiple] {
  min-height: 80px;
  padding: 0.5rem;
}

/* Offcanvas Enhancements */
.offcanvas-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
}

.offcanvas-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 1.25rem;
}

.offcanvas-body {
  padding: 1.5rem;
}

/* Modal Enhancements */
.modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
}

.modal-title {
  font-weight: 600;
  color: #1e293b;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
}

/* Compact Filter Styles */
.filters-compact .form-label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #374151;
}

.filters-compact .form-control,
.filters-compact .form-select {
  font-size: 0.8rem;
  padding: 0.375rem 0.5rem;
  min-height: auto;
  line-height: 1.3;
}

.filters-compact .stat {
  font-size: 0.65rem;
  margin-top: 0.125rem;
}

.filters-compact .btn {
  font-size: 0.8rem;
  padding: 0.375rem 0.75rem;
  line-height: 1.3;
}

.filters-compact .col-md-2,
.filters-compact .col-md-3,
.filters-compact .col-md-4 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Filter buttons alignment */
.filter-buttons {
  margin-top: 1.6rem;
}

.filter-buttons .btn {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  line-height: 1.4;
}

/* Filter sections */
.filter-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
}

.filter-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.filter-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

.filter-section-toggle {
  background: none;
  border: none;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-section-toggle:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.filter-section-content {
  transition: all 0.3s ease;
  overflow: hidden;
}

.filter-section-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* TomSelect dropdown z-index and positioning fix */
.ts-dropdown {
  z-index: 9999 !important;
  position: absolute !important;
}

/* Ensure parent containers don't clip dropdowns */
.filter-section {
  position: relative;
  overflow: visible !important;
}

.filter-section-content {
  overflow: visible !important;
  position: relative;
}

/* Only hide overflow when collapsed */
.filter-section-content.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden !important;
}

/* TomSelect specific fixes */
.ts-wrapper {
  position: relative;
  z-index: 1;
}

.ts-wrapper.multi .ts-control {
  position: relative;
}

/* Ensure form and card don't clip */
.filters-compact,
.card,
.card-body {
  overflow: visible !important;
}

/* Handle bootstrap container overflow */
.container,
.container-fluid {
  overflow: visible !important;
}

/* Z-index hierarchy for modals and off-canvas components */
/* Bootstrap defaults: modal=1055, modal-backdrop=1050, offcanvas=1045, offcanvas-backdrop=1040 */
/* Our hierarchy: progress-modal=1070, off-canvas=1065, off-canvas-backdrop=1064, other-modals=1055 */

/* Ensure contacts drawer appears above modals with proper shadow */
#companyContactsDrawer.offcanvas {
  z-index: 1065 !important; /* Above all other modals */
}

/* Campaign page off-canvas (set in inline style, but ensure consistent) */
#companyContactsOffcanvas.offcanvas {
  z-index: 1065 !important; /* Same as contacts drawer */
}

/* Off-canvas backdrop should appear above regular modals but below off-canvas */
.offcanvas-backdrop {
  z-index: 1064 !important; /* Below off-canvas (1065) but above modals (1055) */
  background-color: rgba(0, 0, 0, 0.4) !important; /* Darker overlay */
}

/* Progress modal has higher z-index to avoid conflicts */
#addAllProgressModal {
  z-index: 1070 !important; /* Highest priority modal */
}

/* Progress modal backdrop - ONLY for progress modal */
#addAllProgressModal ~ .modal-backdrop {
  z-index: 1069 !important; /* Just below progress modal */
}

/* Clean up any orphaned backdrops that might interfere with off-canvas */
.modal-backdrop.orphaned {
  display: none !important;
}

/* Prevent TomSelect from affecting the campaign selector */
#campaign-selector.no-tomselect,
#campaign-selector[data-no-tomselect="true"] {
  position: relative !important;
  z-index: auto !important;
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

/* Ensure no TomSelect dropdowns appear for campaign selector */
#campaign-selector.no-tomselect + .ts-dropdown,
#campaign-selector[data-no-tomselect="true"] + .ts-dropdown {
  display: none !important;
}

/* Clean modal styles - no interference */

/* Ensure Lusha processes modal is always interactive */
#lushaProcessesModal {
  z-index: 1080 !important; /* Higher than any other modal */
}

/* Ensure Lusha modal backdrop works correctly */
#lushaProcessesModal ~ .modal-backdrop {
  z-index: 1079 !important; /* Just below Lusha modal */
  pointer-events: auto !important;
  opacity: 0.5 !important;
}

/* Force interactivity for Lusha modal content */
#lushaProcessesModal .modal-content {
  pointer-events: auto !important;
  position: relative !important;
  z-index: 1081 !important;
}