/* public/css/dashboard.css - Clean, Light & Bright Commercial SaaS Dashboard Layout */
:root {
  --sidebar-width: 260px;
  --topbar-height: 64px;
  
  --font-heading: 'Times New Roman', Times, 'Newsreader', Georgia, serif;
  --font-sans: 'Times New Roman', Times, 'Newsreader', Georgia, serif;

  --sidebar-bg: #FFFFFF;
  --sidebar-border: #E2E8F0;
  --sidebar-active-bg: #EFF6FF;
  --sidebar-active-text: #1D4ED8;
  --sidebar-active-border: #BFDBFE;
  
  --app-bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --card-border: #E2E8F0;
  
  --brand-blue: #2563EB;
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
}

body.dashboard-body {
  margin: 0;
  padding: 0;
  background-color: var(--app-bg);
  color: var(--text-main);
  font-family: 'Times New Roman', Times, 'Newsreader', Georgia, serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.dashboard-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==================== 1. LIGHT SIDEBAR ==================== */
.dashboard-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  padding: 20px 16px;
  transition: transform 0.25s ease;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
  margin-bottom: 28px;
  padding: 0 8px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.sidebar-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.sidebar-nav-item {
  width: 100%;
}

.sidebar-tab-btn {
  width: 100%;
  height: 44px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.sidebar-tab-btn:hover {
  background: #F1F5F9;
  color: var(--text-main);
}

.sidebar-tab-btn.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-color: var(--sidebar-active-border);
  font-weight: 700;
}

.sidebar-tab-counter {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #E2E8F0;
  color: #334155;
}

.sidebar-tab-btn.active .sidebar-tab-counter {
  background: #DBEAFE;
  color: #1D4ED8;
}

/* Sidebar Footer: Profile & Tier Card */
.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-status-card {
  background: #F8FAFC;
  border: 1px solid var(--sidebar-border);
  border-radius: 12px;
  padding: 12px 14px;
}

.user-status-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.user-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-status-meta {
  overflow: hidden;
}

.user-status-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status-tier {
  font-size: 11.5px;
  color: var(--brand-blue);
  font-weight: 700;
}

.sidebar-credits-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-sidebar-upgrade {
  width: 100%;
  height: 36px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.btn-sidebar-upgrade:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.sidebar-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.sidebar-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar-link-btn:hover {
  color: var(--text-main);
}

/* ==================== 2. MAIN APP CONTENT ==================== */
.dashboard-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--app-bg);
}

/* Top Bar */
.dashboard-topbar {
  height: var(--topbar-height);
  background: #FFFFFF;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.topbar-breadcrumb span.active {
  color: var(--text-main);
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-topbar-pill.credits {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.btn-topbar-pill.upgrade {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

/* Dashboard Workspace Area */
.dashboard-workspace {
  padding: 24px 32px 60px;
  flex: 1;
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* Sidebar Close Button */
.sidebar-close-btn {
  display: none;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.sidebar-close-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Mobile Sidebar Toggle Button in Topbar */
.mobile-sidebar-toggle {
  display: none;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  color: var(--text-main);
  font-size: 18px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.mobile-sidebar-toggle:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
}

@media (max-width: 900px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 999;
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .dashboard-sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-close-btn {
    display: flex;
  }
  .dashboard-main {
    margin-left: 0;
  }
  .mobile-sidebar-toggle {
    display: inline-flex;
  }
  .dashboard-topbar {
    padding: 0 16px;
    height: 60px;
  }
  .dashboard-workspace {
    padding: 16px 14px 48px;
  }
}

@media (max-width: 768px) {
  .btn-topbar-pill.tour-pill {
    display: none; /* Hide verbose tour pill on mobile to prevent header overflow */
  }
  .topbar-actions {
    gap: 8px;
  }
  .btn-topbar-pill {
    padding: 5px 10px;
    font-size: 12px;
  }
  .dashboard-workspace {
    padding: 14px 12px 40px;
  }
}

@media (max-width: 480px) {
  .topbar-breadcrumb span:first-child,
  .topbar-breadcrumb span:nth-child(2) {
    display: none; /* Show only active section title on compact phones */
  }
  .topbar-breadcrumb {
    font-size: 13.5px;
    font-weight: 700;
  }
  .topbar-breadcrumb span.active {
    color: var(--text-main);
  }
  .dashboard-topbar {
    padding: 0 10px;
    height: 56px;
  }
  .mobile-sidebar-toggle {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
  .btn-topbar-pill {
    padding: 4px 8px;
    font-size: 11px;
    gap: 4px;
  }
  .dashboard-workspace {
    padding: 10px 8px 36px;
  }
}

/* ==================== ONBOARDING STEP-BY-STEP TOUR ==================== */
.btn-topbar-pill.tour-pill {
  background: #F8FAFC;
  color: #0F172A;
  border: 1px solid #CBD5E1;
  transition: all 0.2s ease;
}
.btn-topbar-pill.tour-pill:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
  transform: translateY(-1px);
}

.spotlight-tour {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: auto;
}

.spotlight-svg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spotlight-highlight-frame {
  position: fixed;
  pointer-events: none;
  z-index: 100000;
  border: 2.5px solid #FF6F00;
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(255, 111, 0, 0.28), 0 0 24px rgba(255, 111, 0, 0.35);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.spotlight-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  border: 2px solid rgba(255, 111, 0, 0.6);
  animation: spotlightPulse 1.8s infinite;
  pointer-events: none;
}

@keyframes spotlightPulse {
  0% {
    transform: scale(0.96);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.3;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

.spotlight-popover {
  position: fixed;
  z-index: 100002;
  width: 330px;
  max-width: calc(100vw - 32px);
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 20px 45px -10px rgba(0, 30, 60, 0.35), 0 0 1px 1px rgba(0, 0, 0, 0.08);
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: popoverFadeIn 0.25s ease-out;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.spotlight-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.spotlight-step-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0284C7;
  background: #EFF6FF;
  border: 1px solid #DBEAFE;
  padding: 3px 8px;
  border-radius: 9999px;
}

.spotlight-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #94A3B8;
  cursor: pointer;
  padding: 2px 4px;
}
.spotlight-close-btn:hover {
  color: #0F172A;
}

.spotlight-icon-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.spotlight-large-icon {
  font-size: 24px;
  line-height: 1;
  padding: 6px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spotlight-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #002B49;
  letter-spacing: -0.01em;
}

.spotlight-desc {
  margin: 0 0 16px 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.spotlight-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
}

.btn-spotlight-skip {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  cursor: pointer;
  padding: 6px 4px;
}
.btn-spotlight-skip:hover {
  color: #475569;
  text-decoration: underline;
}

.spotlight-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-spotlight-prev {
  background: transparent;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-spotlight-prev:hover {
  background: #F8FAFC;
  color: #0F172A;
}

.btn-spotlight-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #002B49;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 43, 73, 0.2);
}
.btn-spotlight-next:hover {
  background: #003F6B;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 43, 73, 0.3);
}
.btn-spotlight-next.btn-spotlight-finish {
  background: linear-gradient(135deg, #FF6F00 0%, #E65100 100%);
  box-shadow: 0 2px 8px rgba(230, 81, 0, 0.3);
}
.btn-spotlight-next.btn-spotlight-finish:hover {
  background: linear-gradient(135deg, #FF8F00 0%, #EF6C00 100%);
}

/* ==================== LINKEDIN-STYLE SEARCH STATISTICS & PAYWALL ==================== */
.search-stats-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 22px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.stats-top-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.stat-metric-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}

.stat-metric-card.accent {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.stat-metric-icon {
  font-size: 22px;
  line-height: 1;
}

.stat-metric-info {
  display: flex;
  flex-direction: column;
}

.stat-metric-val {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.2;
}

.stat-metric-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.stats-unis-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}

.stats-unis-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  margin-right: 4px;
}

.stat-uni-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stat-uni-pill:hover {
  background: #EFF6FF;
  border-color: #3B82F6;
  color: #1D4ED8;
  transform: translateY(-1px);
}

.stat-uni-pill .pill-count {
  background: #F1F5F9;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

/* LinkedIn-style Gated Search Paywall Card */
.search-paywall-card {
  grid-column: 1 / -1;
  background: linear-gradient(145deg, #002B49 0%, #0F172A 100%);
  border: 1px solid #1E3A8A;
  border-radius: 16px;
  padding: 36px 32px;
  color: #FFFFFF;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 43, 73, 0.25);
  margin-top: 12px;
  position: relative;
  overflow: hidden;
}

.search-paywall-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.paywall-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FBBF24;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.paywall-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.paywall-title .highlight-num {
  color: #60A5FA;
}

.paywall-subtitle {
  font-size: 14.5px;
  color: #CBD5E1;
  max-width: 680px;
  margin: 0 auto 24px auto;
  line-height: 1.55;
}

.paywall-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 28px auto;
  text-align: left;
}

.paywall-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 13px;
  color: #E2E8F0;
}

.paywall-feature-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #10B981;
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.paywall-cta-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-paywall-unlock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 16px;
  font-weight: 800;
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-paywall-unlock:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.paywall-subtext {
  font-size: 12px;
  color: #94A3B8;
}

