/* SalesRoads Operational Performance Dashboard Styling */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
  
  --bg-page: #ffffff;
  --card-primary: #06467A;
  --card-secondary: #D1B051;
  
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  
  --accent-blue: #06467A;
  --accent-gold: #D1B051;
  --accent-rose: #f43f5e;
}

body {
  font-family: var(--font-sans);
  background-color: #ffffff !important;
  color: #0f172a;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
}

/* Primary Card Style (#06467A primary, #D1B051 secondary) */
.glass-card {
  background-color: #06467A;
  border: 1.5px solid #D1B051;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(6, 70, 122, 0.25), 0 4px 12px -2px rgba(209, 176, 81, 0.15);
  transition: all 0.25s ease-in-out;
  color: #ffffff;
}

.glass-card:hover {
  border-color: #e5c66b;
  box-shadow: 0 14px 35px -5px rgba(6, 70, 122, 0.35), 0 6px 16px -2px rgba(209, 176, 81, 0.25);
}

.kpi-card {
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--card-accent, #3b82f6), transparent);
  opacity: 0.8;
}

/* Custom Gradients */
.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-gold {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%);
}

.gradient-silver {
  background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
}

.gradient-bronze {
  background: linear-gradient(135deg, #fdba74 0%, #d97706 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Subtle glowing pulse */
@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.96);
  }
}

.pulse-dot {
  animation: pulse-glow 2s infinite ease-in-out;
}

/* ApexCharts customization */
.apexcharts-tooltip {
  background: #111827 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6) !important;
  color: #f8fafc !important;
  border-radius: 0.5rem !important;
}

.apexcharts-tooltip-title {
  background: #1e293b !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-weight: 600 !important;
  color: #f1f5f9 !important;
}

.apexcharts-text {
  fill: #94a3b8 !important;
}

.apexcharts-gridline {
  stroke: rgba(255, 255, 255, 0.05) !important;
}

/* Tab active indicator */
.tab-btn.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
}

/* Modal backdrop */
.modal-backdrop {
  background-color: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(8px);
}

@keyframes spin-once {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-anim {
  animation: spin-once 0.8s linear infinite;
}

/* Sankey Pipeline Flow Styling */
.sankey-node {
  transition: all 0.2s ease-in-out;
}

.sankey-node:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 20px -2px rgba(59, 130, 246, 0.3);
}

.sankey-branch-leak {
  transition: all 0.2s ease-in-out;
}

.sankey-branch-leak:hover {
  transform: translateX(3px);
  background-color: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.5);
}

.sankey-stream-line {
  stroke-dasharray: 6 3;
  animation: stream-flow 25s linear infinite;
}

@keyframes stream-flow {
  from { stroke-dashoffset: 200; }
  to { stroke-dashoffset: 0; }
}

.funnel-tier {
  transition: transform 0.2s ease-in-out;
}

.funnel-tier:hover {
  transform: scale(1.015);
}

/* SDR Performance Leaderboard Active Row Selection Styling */
#exec-sdr-leaderboard-body tr {
  transition: all 0.15s ease-in-out;
}

#exec-sdr-leaderboard-body tr.active-sdr-row {
  background-color: rgba(209, 176, 81, 0.22) !important;
}

#exec-sdr-leaderboard-body tr.active-sdr-row td:first-child {
  position: relative !important;
}

#exec-sdr-leaderboard-body tr.active-sdr-row td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #D1B051;
  box-shadow: 0 0 10px rgba(209, 176, 81, 0.85);
  border-radius: 2px 0 0 2px;
}
