/* ==========================================================================
   LUX & JGH LIVE TELECALLER AGENT PERFORMANCE ANALYTICS — POWER BI THEME
   Corporate Executive Dashboard matching the reference screenshots
   ========================================================================== */

:root {
  --sidebar-bg: #111114;
  --sidebar-border: #222227;
  --sidebar-text: #8E8E93;
  --sidebar-active-bg: #FFFFFF;
  --sidebar-active-text: #111114;
  
  --app-bg: #ECEEF2;
  --card-bg: #FFFFFF;
  --card-border: #E2E4E9;
  --text-main: #1C1C1E;
  --text-sub: #636366;
  --text-muted: #8E8E93;
  
  /* KPI Card Colors from Reference Screenshots */
  --kpi-charcoal: #1C1C20;
  --kpi-coral: #C57973;
  --kpi-slate: #444D5E;
  --kpi-darkslate: #2B3342;
  
  --color-good: #10B981;
  --color-avg: #F59E0B;
  --color-poor: #F97316;
  --color-vpoor: #EF4444;
  --color-prov: #0284C7;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.05);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', var(--font-family);
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dashboard-body {
  font-family: var(--font-family);
  background-color: var(--app-bg);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ==========================================================================
   1. Dark Navigation Sidebar
   ========================================================================== */
.dark-sidebar {
  width: 250px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.5rem 1.25rem 0.5rem;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 1.25rem;
}

.brand-icon-box {
  color: #38BDF8;
}

.brand-names {
  display: flex;
  flex-direction: column;
}

.brand-corp {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #FFFFFF;
}

.brand-sub {
  font-size: 0.7rem;
  color: #38BDF8;
  font-weight: 600;
}

/* Project Slicer */
.sidebar-project-filter {
  margin-bottom: 1.5rem;
  padding: 0 0.25rem;
}

.slicer-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--sidebar-text);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.project-pill-group {
  display: flex;
  background: #1C1C22;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid #2C2C34;
}

.proj-pill {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--sidebar-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.proj-pill.active {
  background: #0284C7;
  color: #FFFFFF;
}

/* Nav Pills (White Active State matching Screenshots) */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: transparent;
  border: none;
  color: var(--sidebar-text);
  font-family: var(--font-family);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.nav-pill:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.nav-pill.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.nav-icon {
  font-size: 1rem;
}

/* User Avatar */
.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--sidebar-border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #2C2C34;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #444;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
}

.user-role {
  font-size: 0.7rem;
  color: var(--sidebar-text);
}

/* ==========================================================================
   2. Main Wrapper & Top Header Card
   ========================================================================== */
.main-wrapper {
  flex: 1;
  padding: 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.top-header-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-card);
}

.header-title-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.65rem;
}

.active-campaign-badge {
  background: #0284C7;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
}

.global-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
}

.date-range-box {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #F8FAFC;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
}

.date-range-box input[type="date"] {
  border: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.range-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.global-filter-bar select {
  background: #F8FAFC;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.global-filter-bar select:hover,
.global-filter-bar select:focus {
  border-color: #0284C7;
  background: #FFFFFF;
}

.header-main-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #E8F5E9;
  color: #2E7D32;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(46, 125, 50, 0.2);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #2E7D32;
  border-radius: 50%;
}

.btn-action {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-excel {
  background: #F1F5F9;
  color: #1E3A8A;
  border-color: #CBD5E1;
}

.btn-excel:hover {
  background: #E2E8F0;
}

.btn-pdf {
  background: #1E3A8A;
  color: #FFFFFF;
}

.btn-pdf:hover {
  background: #1E40AF;
}

.btn-reset {
  background: #FFFFFF;
  border: 1px solid #1C1C1E;
  color: #1C1C1E;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.btn-reset:hover {
  background: #1C1C1E;
  color: #FFFFFF;
}

/* ==========================================================================
   3. Page Container & Transitions
   ========================================================================== */
.page-container {
  flex: 1;
}

.report-page {
  display: none;
  animation: fadeIn 0.25s ease;
}

.report-page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   4. Top KPI Cards Row (Spacious & Clean Layout)
   ========================================================================== */
.kpi-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.kpi-box {
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 165px;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.kpi-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  opacity: 0.85;
}

.kpi-icon-pill {
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

.kpi-main-val {
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1;
  margin: 0.6rem 0 0.85rem 0;
  letter-spacing: -0.5px;
}

.kpi-sub-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 0.65rem;
}

.kpi-metric-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.line-label {
  opacity: 0.85;
  font-weight: 500;
}

.line-val {
  font-weight: 700;
}

.card-charcoal { background-color: var(--kpi-charcoal); }
.card-coral { background-color: var(--kpi-coral); }
.card-slate { background-color: var(--kpi-slate); }
.card-darkslate { background-color: var(--kpi-darkslate); }

/* Color text helpers */
.text-emerald { color: #10B981 !important; }
.text-rose { color: #F43F5E !important; }
.text-amber { color: #F59E0B !important; }
.text-blue { color: #38BDF8 !important; }

/* Spacious Donuts Card */
.donuts-spacious-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 280px;
  padding: 0.5rem 1rem;
}

.donut-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.donut-canvas-wrap {
  width: 140px;
  height: 140px;
  position: relative;
}

.donut-legend-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-sub);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}
.dot-green { background: #10B981; }
.dot-rose { background: #C57973; }
.dot-amber { background: #F59E0B; }
.dot-blue { background: #0284C7; }

/* State Performance Grid */
.state-performance-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.state-cards-scrollable {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 330px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.state-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.state-row-card:hover {
  border-color: #0284C7;
  background: #F0F9FF;
}

.state-row-card.active {
  border-color: #10B981;
  background: #ECFDF5;
}

.state-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.state-name-txt {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
}

.state-sub-txt {
  font-size: 0.72rem;
  color: var(--text-sub);
}

.state-bar-wrap {
  width: 140px;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.state-bar-fill {
  height: 100%;
  background: #2B3342;
  border-radius: 3px;
}

.state-stats {
  text-align: right;
  margin-left: 1rem;
}

.state-call-num {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-main);
}

.state-rate-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #E0F2FE;
  color: #0369A1;
  display: inline-block;
  margin-top: 2px;
}
}

.donut-sub-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center-lbl {
  position: absolute;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-main);
  pointer-events: none;
}

/* ==========================================================================
   5. Clean White Cards & Visual Grids
   ========================================================================== */
.white-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-card);
}

.visual-row-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.chart-card-lg {
  min-height: 340px;
}

.chart-card-sm {
  min-height: 340px;
}

.table-card-flex {
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.card-header-clean {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.card-titles h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.card-titles p {
  font-size: 0.78rem;
  color: var(--text-sub);
  margin-top: 2px;
}

.chart-canvas-box {
  position: relative;
  flex: 1;
  width: 100%;
  height: 260px;
}

/* ==========================================================================
   6. Corporate Tables (Matching Screenshot 2 Table Style)
   ========================================================================== */
.table-scroll-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 270px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}

.large-scroll {
  max-height: 600px;
}

.corp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.corp-table thead {
  background: #F8F9FA;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--card-border);
}

.corp-table th {
  padding: 0.65rem 0.8rem;
  font-weight: 700;
  color: var(--text-sub);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.corp-table th.th-sortable {
  cursor: pointer;
}

.corp-table th.th-sortable:hover {
  color: #0284C7;
}

.corp-table td {
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid #ECEEF2;
  color: var(--text-main);
  white-space: nowrap;
}

.corp-table tbody tr:hover {
  background: #F8FAFC;
}

.th-right, .td-right { text-align: right; }
.th-center, .td-center { text-align: center; }

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
}

.badge-good { background: #D1FAE5; color: #065F46; }
.badge-avg { background: #FEF3C7; color: #92400E; }
.badge-poor { background: #FFEDD5; color: #9A3412; }
.badge-vpoor { background: #FEE2E2; color: #991B1B; }
.badge-prov { background: #E0F2FE; color: #075985; }

.badge-lux { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.badge-jgh { background: #FAF5FF; color: #6B21A8; border: 1px solid #E9D5FF; }

/* Search Bar */
.table-action-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.table-search-bar input {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  width: 260px;
  outline: none;
}

.table-search-bar input:focus {
  border-color: #0284C7;
}

/* ==========================================================================
   Global Filter Bar (Header)
   ========================================================================== */
.active-campaign-badge {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #0284C7;
  background: #E0F2FE;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-top: 0.25rem;
}

.global-filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-item label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}

.filter-item select {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-family);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.filter-item select:focus {
  border-color: #0284C7;
}

.date-picker-box input[type="date"] {
  padding: 0.38rem 0.65rem;
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  outline: none;
  background: #FFFFFF;
  color: var(--text-main);
  cursor: pointer;
}

.date-picker-box input[type="date"]:focus {
  border-color: #0284C7;
}

.chart-canvas-box-tall {
  position: relative;
  height: 330px;
  width: 100%;
}

.chart-canvas-box-large {
  position: relative;
  height: 420px;
  width: 100%;
}

/* ==========================================================================
   India Geographic Map with State Bubbles (Matching Screenshot 1 & 3)
   ========================================================================== */
.india-map-wrapper {
  position: relative;
  width: 100%;
  height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.india-map-large-wrapper {
  position: relative;
  width: 100%;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.india-map-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  height: 100%;
  background: #F8FAFC;
  border-radius: var(--radius-md);
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.india-svg-silhouette {
  width: 85%;
  height: 85%;
  fill: #E2E8F0;
  stroke: #CBD5E1;
  stroke-width: 1.5;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.03));
}

.state-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  background: #1C1C20;
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.state-bubble:hover {
  transform: translate(-50%, -50%) scale(1.18);
  background: #0284C7;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
  z-index: 20;
}

.state-bubble.active-bubble {
  background: #10B981;
  border-color: #FFFFFF;
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.bubble-val {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1;
}

.bubble-abbr {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  opacity: 0.8;
  margin-top: 1px;
}

.map-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-pill-sm {
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: #F1F5F9;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pill-sm:hover {
  background: #E2E8F0;
}

/* ==========================================================================
   7. Drill-Through Profile Card
   ========================================================================== */
.agent-drill-selector {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.agent-drill-selector label {
  font-size: 0.88rem;
  font-weight: 700;
}

.agent-drill-selector select {
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: #FFF;
}

.agent-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #ECEEF2;
  margin-bottom: 1.25rem;
}

.agent-profile-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.agent-big-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #111114;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
}

.agent-name-meta h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.agent-sub-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.agent-score-block {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.drill-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 1200px) {
  .drill-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .drill-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-mini-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 124px;
}

.kpi-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: #CBD5E1;
}

/* Elegant top accent borders */
.kpi-mini-card.accent-blue { border-top: 3.5px solid #2563EB; }
.kpi-mini-card.accent-emerald { border-top: 3.5px solid #10B981; }
.kpi-mini-card.accent-cyan { border-top: 3.5px solid #0284C7; }
.kpi-mini-card.accent-rose { border-top: 3.5px solid #F43F5E; }
.kpi-mini-card.accent-indigo { border-top: 3.5px solid #6366F1; }
.kpi-mini-card.accent-amber { border-top: 3.5px solid #F59E0B; }
.kpi-mini-card.accent-teal { border-top: 3.5px solid #0D9488; }
.kpi-mini-card.accent-purple { border-top: 3.5px solid #8B5CF6; }

.kpi-mini-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.kpi-mini-card .lbl {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.kpi-mini-card .card-icon {
  font-size: 1rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
}

.kpi-mini-card .val {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0.2rem 0 0.35rem 0;
  line-height: 1.15;
}

.kpi-mini-card .sub {
  font-size: 0.78rem;
  color: #64748B;
  line-height: 1.35;
  font-weight: 500;
}

.outcome-bar-box {
  margin-bottom: 1.5rem;
}

.outcome-bar-title {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 0.5rem;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: #E2E8F0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
}

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.coaching-card {
  background: #F8FAFC;
  border-left: 4px solid #0284C7;
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

/* ==========================================================================
   8. Audit Banner & Status
   ========================================================================== */
.audit-banner-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 1.5rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.audit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.audit-val {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
}

.audit-lbl {
  font-size: 0.75rem;
  color: var(--text-sub);
}

.audit-op {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
}

.text-emerald { color: #10B981; }
.text-amber { color: #F59E0B; }
.text-blue { color: #0284C7; }

/* Status Bar */
.app-status-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mt-4 { margin-top: 1.25rem; }
.mt-2 { margin-top: 0.5rem; }

/* ==========================================================================
   9. Zero Data Banner, State Grid & Leaflet Real Map
   ========================================================================== */
.zero-data-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  color: #1E3A8A;
  animation: fadeIn 0.3s ease;
}

.banner-icon {
  font-size: 1.4rem;
}

.banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.banner-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1E40AF;
}

.banner-text span {
  font-size: 0.8rem;
  color: #3B82F6;
}

.btn-pill-sm {
  background: #0284C7;
  color: #FFFFFF;
  border: none;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-pill-sm:hover {
  background: #0369A1;
}

/* State Performance Grid */
.state-performance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.state-cards-scrollable {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.state-row-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: #F8FAFC;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.state-row-card:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
  transform: translateX(2px);
}

.state-row-card.active {
  background: #EFF6FF;
  border-color: #38BDF8;
  box-shadow: 0 0 0 1px #38BDF8;
}

.state-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.state-name-txt {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.state-sub-txt {
  font-size: 0.72rem;
  color: var(--text-sub);
}

.state-bar-wrap {
  width: 90%;
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.state-bar-fill {
  height: 100%;
  background: #2563EB;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.state-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.state-call-num {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.state-rate-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: #ECFDF5;
  color: #065F46;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
}

/* Leaflet Container Styling */
#leafletIndiaMap {
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.1);
  background: #F8FAFC;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
}

.leaflet-popup-content {
  margin: 10px 12px !important;
  line-height: 1.4 !important;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .kpi-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .visual-row-2 {
    grid-template-columns: 1fr;
  }
  .state-performance-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   10. Header Live Sync & Scoring Modal Styles
   ========================================================================== */
.title-and-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-live-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.live-status-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.6s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-live-sync {
  background: #10B981;
  color: #FFFFFF;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-live-sync:hover {
  background: #059669;
}

.btn-scoring-modal {
  background: #F1F5F9;
  color: #1E293B;
  border: 1px solid #CBD5E1;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-scoring-modal:hover {
  background: #E2E8F0;
  color: #0284C7;
  border-color: #0284C7;
}

/* Scoring Modal Backdrop & Card */
.scoring-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.scoring-modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-icon {
  font-size: 1.8rem;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #0F172A;
  margin: 0;
}

.modal-header p {
  font-size: 0.78rem;
  color: #64748B;
  margin: 0.2rem 0 0 0;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #64748B;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

.btn-close-modal:hover {
  color: #0F172A;
}

.modal-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
}

.scoring-formula-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #1E3A8A;
}

.scoring-formula-box code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #1D4ED8;
  font-size: 0.85rem;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.pillar-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pillar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pillar-top h4 {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  color: #0F172A;
  margin: 0;
}

.pillar-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

.weight-35 { background: #ECFDF5; color: #065F46; }
.weight-25 { background: #EFF6FF; color: #1E40AF; }
.weight-15 { background: #FEF3C7; color: #92400E; }

.pillar-metric {
  font-size: 0.78rem;
  color: #475569;
}

.pillar-formula code {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #0F172A;
}

.pillar-desc {
  font-size: 0.72rem;
  color: #64748B;
  margin: 0;
}

.scoring-example-box {
  background: #F1F5F9;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.scoring-example-box h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  margin: 0 0 0.5rem 0;
  color: #0F172A;
}

.example-breakdown-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.break-chip {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.total-score-pill {
  background: #10B981;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
}

.tier-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tier-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.tier-good { background: #ECFDF5; color: #065F46; }
.tier-avg { background: #FEF3C7; color: #92400E; }
.tier-poor { background: #FEE2E2; color: #991B1B; }
.tier-prov { background: #F1F5F9; color: #475569; }

/* Header Live Toggle Buttons */
.btn-live-toggle {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-live-toggle:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.btn-live-toggle.active {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   Modal Overlay & Card Styling
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 12px;
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  border: 1px solid #E2E8F0;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-15px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #E2E8F0;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-icon {
  font-size: 1.6rem;
}

.modal-title-wrap h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #0F172A;
  margin: 0;
}

.modal-title-wrap p {
  font-size: 0.8rem;
  color: #64748B;
  margin: 0.15rem 0 0 0;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #64748B;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
}

.btn-close-modal:hover {
  color: #0F172A;
}

.modal-body {
  padding: 1.5rem;
}

.scoring-formula-box {
  background: #EFF6FF;
  border-left: 4px solid #0284C7;
  padding: 0.85rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.scoring-formula-box code {
  background: #FFFFFF;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

/* ==========================================================================
   Exact User Reference Summary Table Styles (Matching Screenshot)
   ========================================================================== */
.manual-ref-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--card-border);
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
}

.ref-table-header-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ref-table-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ref-table-desc {
  font-size: 0.78rem;
  color: var(--text-sub);
  margin-top: 0.2rem;
}

.ref-table-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-export-csv {
  background: #10B981;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.2s ease;
}

.btn-export-csv:hover {
  background: #059669;
}

.ref-table-wrapper {
  overflow-x: auto;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
}

.excel-reference-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-family);
  font-size: 0.88rem;
  text-align: center;
}

.excel-reference-table th {
  background: #0F172A;
  color: #FFFFFF;
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  border: 1px solid #334155;
  text-transform: none;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.excel-reference-table th.col-name {
  text-align: left;
  padding-left: 1rem;
}

.excel-reference-table td {
  padding: 0.55rem 0.85rem;
  border: 1px solid #E2E8F0;
  color: #1E293B;
  font-weight: 500;
}

.excel-reference-table td.col-name {
  text-align: left;
  font-weight: 700;
  padding-left: 1rem;
  color: #0F172A;
}

.excel-reference-table tbody tr:hover {
  background: #F8FAFC;
}

.excel-reference-table tbody tr:nth-child(even) {
  background: #FAFAFA;
}

.excel-reference-table tfoot tr {
  background: #FDBA74; /* Soft peach/salmon matching user's Total row */
  font-weight: 900;
  color: #000000;
  border: 2px solid #000000;
}

.excel-reference-table tfoot td {
  border: 1px solid #000000;
  padding: 0.65rem 0.85rem;
  font-weight: 900;
  font-size: 0.92rem;
}

.excel-reference-table tfoot td.col-name {
  text-align: left;
  padding-left: 1rem;
}

.connectivity-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.82rem;
}

.connectivity-high {
  background: #DCFCE7;
  color: #15803D;
}

.connectivity-mid {
  background: #FEF3C7;
  color: #B45309;
}

.connectivity-low {
  background: #FEE2E2;
  color: #B91C1C;
}

.talktime-cell {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: #1E293B;
}

.pill-btn {
  background: transparent;
  color: #475569;
  border: none;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  color: #0F172A;
  background: #E2E8F0;
}

.pill-btn.active {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3) !important;
}

/* ==========================================================================
   RETAILER ONBOARDING & TELECALLER TRACKING DASHBOARD STYLES
   ========================================================================== */

/* Hero Search & Title Card */
.onb-hero-card {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.onb-hero-card .hero-content {
  max-width: 650px;
}

.onb-hero-card .hero-badge {
  display: inline-block;
  background: rgba(14, 165, 233, 0.2);
  color: #38BDF8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.onb-hero-card .hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 0.4rem 0;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.onb-hero-card .hero-desc {
  font-size: 0.85rem;
  color: #94A3B8;
  line-height: 1.45;
  margin: 0;
}

.hero-search-area {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 380px;
}

.search-bar-wrap {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 0.3rem 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.search-bar-wrap:focus-within {
  border-color: #38BDF8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

.search-bar-wrap .search-icon {
  font-size: 1.05rem;
  padding: 0 0.4rem;
  color: #64748B;
}

.search-bar-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-family, 'Inter', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: #0F172A;
  padding: 0.45rem 0.25rem;
  background: transparent;
}

.search-bar-wrap input::placeholder {
  color: #94A3B8;
  font-weight: 500;
}

.btn-search-action {
  background: #0284C7;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.95rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.btn-search-action:hover {
  background: #0369A1;
}

.btn-search-reset {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0.4rem;
}

.btn-search-reset:hover {
  color: #DC2626;
}

.search-hint {
  font-size: 0.73rem;
  color: #94A3B8;
  padding-left: 0.25rem;
}

/* 9 Executive Onboarding KPI Grid */
.onb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1200px) {
  .onb-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .onb-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.onb-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid #E2E8F0;
  border-left: 5px solid #64748B;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.onb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.onb-card.card-accent-blue    { border-left-color: #0284C7; }
.onb-card.card-accent-green   { border-left-color: #16A34A; }
.onb-card.card-accent-red     { border-left-color: #DC2626; }
.onb-card.card-accent-teal    { border-left-color: #0D9488; }
.onb-card.card-accent-purple  { border-left-color: #8B5CF6; }
.onb-card.card-accent-amber   { border-left-color: #F59E0B; }
.onb-card.card-accent-slate   { border-left-color: #334155; }
.onb-card.card-accent-emerald { border-left-color: #059669; }
.onb-card.card-accent-rose    { border-left-color: #E11D48; }

.onb-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.onb-card-data {
  display: flex;
  flex-direction: column;
}

.onb-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748B;
  margin-bottom: 0.2rem;
}

.onb-card-num {
  font-size: 1.65rem;
  font-weight: 900;
  color: #0F172A;
  line-height: 1.1;
  font-family: var(--font-family, 'Outfit', sans-serif);
}

.onb-card-meta {
  font-size: 0.73rem;
  color: #94A3B8;
  margin-top: 0.2rem;
}

/* Instant Retailer Profile Lookup Card */
.retailer-profile-card {
  background: #FFFFFF;
  border-radius: 14px;
  border: 2px solid #0284C7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.profile-title-group h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-title-group .phone-pill {
  font-family: var(--font-mono, monospace);
  background: #E0F2FE;
  color: #0369A1;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: #F8FAFC;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 992px) {
  .profile-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.profile-field-box {
  display: flex;
  flex-direction: column;
}

.profile-field-box .lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748B;
  margin-bottom: 0.2rem;
}

.profile-field-box .val {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0F172A;
}

.profile-field-box .val-highlight {
  color: #0284C7;
  font-weight: 800;
}

/* Historical Calls Section in Profile Card */
.profile-calls-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.history-mini-table th {
  background: #0F172A;
  color: #FFFFFF;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.history-mini-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #E2E8F0;
  color: #334155;
  font-weight: 500;
}

.history-mini-table tr:hover {
  background: #F1F5F9;
}

/* Filter Strip */
.onb-filter-strip {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.filter-controls-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.filter-field select {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0F172A;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.filter-field select:focus {
  border-color: #0284C7;
}

.btn-refresh-pill {
  background: #F1F5F9;
  color: #0F172A;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh-pill:hover {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
}

/* Table Specific Badges */
.badge-count {
  background: #0284C7;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 12px;
  margin-left: 0.5rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-registered     { background: #DCFCE7; color: #166534; }
.status-not-registered { background: #FEE2E2; color: #991B1B; }
.status-logged         { background: #CCFBF1; color: #0F766E; }
.status-no-login       { background: #FEF3C7; color: #92400E; }
.status-scanned        { background: #EDE9FE; color: #5B21B6; }
.status-never-scanned  { background: #F1F5F9; color: #64748B; }

.stage-chip {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
}

.stage-onboarded    { background: #15803D; color: #FFFFFF; }
.stage-login-noscan { background: #0284C7; color: #FFFFFF; }
.stage-reg-nologin  { background: #D97706; color: #FFFFFF; }
.stage-not-reg      { background: #DC2626; color: #FFFFFF; }

/* Call History Button & Accordion in Table */
.btn-view-history {
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.2s ease;
}

.btn-view-history:hover {
  background: #0284C7;
}

.call-history-accordion-row {
  background: #F8FAFC !important;
}

.accordion-inner-box {
  padding: 1rem 1.5rem;
  border-left: 4px solid #0284C7;
  background: #FFFFFF;
  border-radius: 6px;
  margin: 0.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.accordion-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 800;
  color: #0F172A;
  font-size: 0.88rem;
}

.accordion-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.accordion-table th {
  background: #334155 !important;
  color: #FFFFFF !important;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.accordion-table td {
  padding: 0.45rem 0.75rem;
  border: 1px solid #E2E8F0;
  color: #1E293B;
  font-weight: 600;
}

.accordion-table tr:hover {
  background: #F1F5F9 !important;
}

/* Table Pagination Controls */
.table-pager-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pager-info {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748B;
  margin-right: 0.5rem;
}

.pager-btn {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #0F172A;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pager-btn:hover:not(:disabled) {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
}

.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pager-cur {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0F172A;
  padding: 0 0.3rem;
}

