/* Dashboard Styles */

/* Extend background to full page with mobile overscroll protection */
html:has(.dashboard-body) {
  min-height: 100vh;
  background-color: #0b1328;
  background-image: radial-gradient(circle at 12% 8%, #0f172a 0, #0b1328 38%, #020617 68%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Prevent horizontal overflow globally in dashboard */
.dashboard-body,
.dashboard-body * {
  box-sizing: border-box;
  max-width: 100%;
}

.dashboard-body {
  background: transparent;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px 24px 24px;
  display: flex;
  justify-content: center;
  width: 100%;
}

@media (max-width: 900px) {
  .dashboard-body {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

.dashboard-page {
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

/* Match home page zoom level for desktop (1.20x scale) - applied to .dashboard-page not body for consistency */
@media (min-width: 1024px) {
  .dashboard-page {
    zoom: 120%;
  }
}

/* Logo styling for dashboard - override max-width constraint */
.dashboard-body .nav {
  overflow: visible;
}

.dashboard-body .nav-left {
  overflow: visible;
  max-width: none;
}

.dashboard-body .logo-icon {
  height: 40.47px;
  width: auto;
  max-width: none;
  margin: -5.225px 0 -5.225px -5.415px; /* negative left margin to compensate for PNG whitespace */
}

/* Dashboard nav mobile fixes */
@media (max-width: 480px) {
  .dashboard-body {
    padding: 16px 12px 24px;
  }
  
  .dashboard-page {
    gap: 16px;
    width: 100%;
  }
  
  .dashboard-body .nav {
    padding: 10px 10px;
    overflow: visible;
  }
  
  .dashboard-body .nav-left {
    overflow: visible;
  }
  
  .dashboard-body .nav-cta {
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
  }
  
  .dashboard-body .badge-chip {
    padding: 5px 10px;
    font-size: 10px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .dashboard-body #logout-btn {
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
  }
  
  .dashboard-body .logo-icon {
    height: 35.15px;
    width: auto;
    max-width: none;
    margin: -4.465px 0 -4.465px -4.56px; /* negative left margin to compensate for PNG whitespace */
  }
  
  /* Ensure all sections stay within bounds */
  .dashboard-section {
    width: 100%;
    box-sizing: border-box;
  }
  
  .stats-grid {
    width: 100%;
  }
  
  .stat-card {
    width: 100%;
    box-sizing: border-box;
  }
  
  .credit-card {
    width: 100%;
    box-sizing: border-box;
  }
  
  .pricing-table-wrapper {
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Fix scrollbar being covered by sticky header on mobile */
  .pricing-row.pricing-header > span {
    position: relative; /* Remove sticky on mobile to prevent scrollbar overlap */
    z-index: auto;
  }
  
  /* Account section mobile fix */
  .account-info {
    flex-direction: column;
    gap: 12px;
  }
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.dashboard-hero {
  text-align: center;
  padding: 24px 0;
}

.dashboard-hero h1 {
  font-size: 30px;
  font-weight: 600;
  color: #f8fafc;
  margin: 0 0 8px;
}

.dashboard-hero h1 span {
  color: #60a5fa;
}

.dashboard-subtitle {
  color: #94a3b8;
  font-size: 14px;
  margin: 0;
}

/* Mobile dashboard hero */
@media (max-width: 480px) {
  .dashboard-hero {
    padding: 20px 0;
  }
  
  .dashboard-hero h1 {
    font-size: 22px;
  }
  
  .dashboard-subtitle {
    font-size: 14px;
  }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  /* Fix scrollbar being covered by sticky header on tablet/mobile */
  .pricing-row.pricing-header > span {
    position: relative;
    z-index: auto;
  }
}

.stat-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background 250ms ease, border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
  cursor: default;
  min-height: 72px; /* Fixed minimum height to prevent layout shift when preview badge appears */
  box-sizing: border-box;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.4);
}

/* Primary stat card - constant subtle glow (Credit Balance) */
.stat-card-primary {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 
    0 0 20px rgba(139, 92, 246, 0.15),
    0 4px 16px rgba(15, 23, 42, 0.3);
  animation: subtle-pulse 4s ease-in-out infinite;
}

@keyframes subtle-pulse {
  0%, 100% { 
    box-shadow: 
      0 0 20px rgba(139, 92, 246, 0.15),
      0 4px 16px rgba(15, 23, 42, 0.3);
  }
  50% { 
    box-shadow: 
      0 0 28px rgba(139, 92, 246, 0.25),
      0 4px 16px rgba(15, 23, 42, 0.3);
  }
}

.stat-card-primary:hover {
  border-color: rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 
    0 0 32px rgba(139, 92, 246, 0.3),
    0 8px 24px rgba(15, 23, 42, 0.4);
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 21px;
  height: 21px;
  color: #60a5fa;
}

.stat-card-primary .stat-icon {
  background: rgba(26, 115, 232, 0.2);
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 3px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.stat-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  min-height: 18px; /* Reserve space for preview badge to prevent layout shift */
  line-height: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Dashboard Sections */
.dashboard-section {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 250ms ease;
  width: 100%;
}

.dashboard-section:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-section h2 {
  font-size: 17px;
  font-weight: 600;
  color: #f8fafc;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Pricing per 100 badge - make cost basis obvious */
.pricing-per-100-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
  border: 1px solid rgba(96, 165, 250, 0.4);
  padding: 4px 9px;
  border-radius: 18px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 
    0 0 12px rgba(96, 165, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { 
    box-shadow: 
      0 0 12px rgba(96, 165, 250, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% { 
    box-shadow: 
      0 0 18px rgba(139, 92, 246, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

.section-desc {
  color: #94a3b8;
  font-size: 14px;
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.section-desc strong {
  color: #e2e8f0;
}

/* Pricing header row - contains title/desc and button */
.pricing-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.pricing-header-left {
  flex: 1;
  min-width: 0;
}

.pricing-header-left h2 {
  margin-bottom: 4px;
}

.pricing-header-left .section-desc {
  margin-bottom: 0;
}

/* Subtle hint in description */
.subtle-hint {
  color: #64748b;
  font-weight: 400;
  cursor: help;
}

.desc-separator {
  color: #475569;
  margin: 0 2px;
}

/* Set as Default Button Container - positioned above table, aligned right */
.set-default-container {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  transform: translateY(-4px);
}

.set-default-container.visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Change default model button */
.set-default-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.set-default-badge:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(96, 165, 250, 0.4);
}

.set-default-badge:active {
  background: rgba(255, 255, 255, 0.08);
}

/* Loading state for button */
.set-default-badge.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Highlight effect triggered by JS class (for Current Rate tooltip) */
.pricing-section.pricing-highlight-active .pricing-table-wrapper {
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow: 
    0 0 0 1px rgba(139, 92, 246, 0.5),
    0 0 15px rgba(139, 92, 246, 0.25),
    0 0 30px rgba(139, 92, 246, 0.15),
    inset 0 0 20px rgba(139, 92, 246, 0.05);
}

@keyframes model-name-shimmer {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

/* Bottom Grid - side by side layout */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
  grid-auto-rows: 1fr;
  width: 100%;
}

@media (max-width: 900px) {
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* Pricing Section - scrollable with gradient */
.pricing-section {
  position: relative;
  display: flex;
  flex-direction: column;
}

.credits-section {
  display: flex;
  flex-direction: column;
  transition: border-color 250ms ease, box-shadow 250ms ease;
}

/* Highlight credits section when Credit Balance card is hovered */
.credits-section.credits-section-highlighted {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow:
    0 0 32px rgba(139, 92, 246, 0.2),
    0 8px 24px rgba(15, 23, 42, 0.4);
}

.pricing-table-wrapper {
  position: relative;
  flex: 0 0 auto;
  height: 471px;
  max-height: 471px;
  width: 100%;
  overflow-y: scroll !important;
  border-radius: 12px;
  /* Vertical multicolor gradient - fixed to wrapper viewport so it doesn't rescale when rows load */
  background:
    linear-gradient(180deg,
      rgba(59, 130, 246, 0.28) 0%,
      rgba(147, 51, 234, 0.22) 50%,
      rgba(236, 72, 153, 0.20) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.97) 0%, rgba(20, 30, 50, 0.95) 100%);
  border: 1px solid rgba(96, 165, 250, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

/* Custom scrollbar for pricing table - matches extension dropdown style */
.pricing-table-wrapper {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.pricing-table-wrapper::-webkit-scrollbar {
  width: 6px;
}

.pricing-table-wrapper::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

.pricing-table-wrapper::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.pricing-table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.5);
  border-radius: 3px;
  min-height: 30px;
}

.pricing-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}

.pricing-table-wrapper::-webkit-scrollbar-corner {
  background: transparent;
  display: none;
}

/* Pricing Table */
.pricing-table {
  display: table;
  width: 100%;
  min-height: 100%;
  border-collapse: collapse;
  background: transparent;
}

.pricing-row {
  display: table-row;
  width: 100%;
}

.pricing-row > span {
  display: table-cell;
  padding: 13px 20px;
  font-size: 15px;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 150ms ease;
}

.pricing-row:last-child > span {
  border-bottom: none;
}

.pricing-row.pricing-header > span {
  background: rgba(15, 23, 42, 0.95);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
}

.pricing-row.pricing-header > span:last-child {
  color: #94a3b8;
  font-weight: 600;
}

.pricing-row.pricing-header > span:first-child {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  text-align: center;
}

/* Model column - constrain width */
.pricing-row.pricing-header > span:nth-child(2),
.pricing-row > span:nth-child(2) {
  width: 45%;
  max-width: 260px;
}

.pricing-row:not(.pricing-header):hover > span {
  background: rgba(255, 255, 255, 0.08);
}

.model-rank {
  font-weight: 500;
  color: #64748b;
  font-size: 13px;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  text-align: center;
  position: relative;
}

.pricing-row:not(.pricing-header) .model-rank {
  color: #64748b;
}


.model-name {
  font-weight: 500;
  color: #f8fafc;
  position: relative;
  /* Constrain width so Proficiency column can be centered */
  width: 45%;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  vertical-align: middle;
  opacity: 0.8;
  cursor: help;
}

/* #1 Proficiency column - left aligned like other columns */
.model-proficiency {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  width: 28%;
  min-width: 140px;
  padding-left: 20px !important;
  padding-right: 55px !important;
  position: relative;
}

/* Header styling for proficiency column */
.pricing-row.pricing-header .model-proficiency {
  color: #94a3b8;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* Header #1 Proficiency - left aligned like other columns */
.pricing-row.pricing-header > span:nth-child(3) {
  text-align: left;
  width: 28%;
  min-width: 140px;
  padding-left: 20px !important;
  padding-right: 55px !important;
}

/* Subtle category-specific coloring for visual interest */
.model-proficiency:not(:empty) {
  color: #a5b4fc; /* soft indigo for most categories */
}

/* Mobile: Compact table layout */
@media (max-width: 600px) {
  .pricing-header-row {
    flex-direction: column;
    gap: 10px;
  }

  .set-default-container {
    top: 8px;
    right: 12px;
  }

  .set-default-badge {
    padding: 5px 10px;
    font-size: 10px;
  }
  
  .pricing-footer-inline {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .pricing-row > span {
    padding: 10px 8px;
    font-size: 13px;
  }
  
  .pricing-row.pricing-header > span {
    font-size: 10px;
    padding: 10px 6px;
  }
  
  /* Narrower rank column on mobile */
  .pricing-row.pricing-header > span:first-child,
  .model-rank {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    padding-left: 6px;
    padding-right: 4px;
  }
  
  /* Proficiency column on mobile - left aligned, compact */
  .model-proficiency,
  .pricing-row.pricing-header > span:nth-child(3) {
    width: 75px;
    min-width: 65px;
    max-width: 85px;
    font-size: 10px;
    padding: 10px 8px 10px 6px !important;
    text-align: left;
  }
  
  /* Cost column on mobile */
  .your-cost {
    width: auto;
    min-width: 50px;
    font-size: 10px;
    padding-right: 8px;
  }
  
  /* Model name takes remaining space, truncate if needed */
  .model-name {
    font-size: 12px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .model-provider {
    display: none; /* Hide provider on mobile to save space */
  }
  
  .online-badge {
    font-size: 10px;
    margin-left: 3px;
  }
}

/* Very small screens: Further compact */
@media (max-width: 400px) {
  .pricing-header-row {
    gap: 8px;
  }

  .set-default-container {
    top: 6px;
    right: 10px;
  }

  .set-default-badge {
    padding: 4px 8px;
    font-size: 9px;
  }
  
  .pricing-footer-inline .footer-text {
    font-size: 11px;
  }
  
  .pricing-row > span {
    padding: 8px 4px;
    font-size: 12px;
  }
  
  .pricing-row.pricing-header > span {
    font-size: 9px;
  }
  
  /* Proficiency column on very small screens - left aligned */
  .model-proficiency,
  .pricing-row.pricing-header > span:nth-child(3) {
    width: 60px;
    min-width: 55px;
    max-width: 70px;
    font-size: 9px;
    padding: 8px 6px 8px 4px !important;
    text-align: left;
  }
  
  .your-cost {
    min-width: 45px;
    font-size: 9px;
  }
  
  .model-name {
    font-size: 11px;
    max-width: 90px;
  }
}

.your-cost {
  color: #64748b;
  font-weight: 500;
  font-family: 'SF Mono', 'Monaco', 'Consolas', 'Liberation Mono', monospace;
  text-align: left;
  width: auto;
  min-width: 55px;
  position: relative;
  font-size: 12px;
  letter-spacing: 0.5px;
}


/* Credits Stack */
.credits-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.credit-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: center;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: all 250ms ease;
}

.credit-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.35);
}

.credit-card-subscription {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-color: rgba(52, 211, 153, 0.3);
}

.credit-card-subscription:hover {
  border-color: rgba(52, 211, 153, 0.5);
}

.credit-card-subscription.subscription-active {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
  border-color: rgba(52, 211, 153, 0.5);
}

.credit-card-auto {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-color: rgba(26, 115, 232, 0.3);
}

.credit-card-auto:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.credit-card-auto.auto-topup-active {
  background: linear-gradient(135deg, rgba(26, 115, 232, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(26, 115, 232, 0.5);
}

.credit-badge {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 9px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.credit-amount {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}

.credit-price {
  font-size: 24px;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 4px;
}

.credit-desc {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 12px;
}

/* Expanded subscription card */
.credit-card-expanded {
  flex: 1.5;
  padding: 16px 18px;
  justify-content: flex-start;
}

/* Make subscribe button expand vertically and center in remaining space */
.credit-card-subscription #subscribe-btn {
  margin-top: auto;
  margin-bottom: auto;
  min-height: 48px;
  flex-shrink: 0;
}

/* Subscription Benefits List */
.subscription-benefits {
  list-style: none;
  padding: 0;
  margin: 8px 0 10px;
  text-align: left;
}

.subscription-benefits li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #e2e8f0;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.subscription-benefits li:last-child {
  border-bottom: none;
}

.benefit-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.subscription-benefits strong {
  color: #f8fafc;
}

.benefit-highlight {
  color: #34d399;
  font-weight: 600;
  font-size: 12px;
}

.benefit-subtext {
  color: #64748b;
  font-weight: 400;
  font-size: 13px;
}

/* Subscription line preview state */
.subscription-line-preview {
  background: rgba(251, 191, 36, 0.08);
  margin: 0 -12px;
  padding-left: 12px !important;
  padding-right: 12px !important;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.subscription-line-preview .benefit-subtext {
  color: #94a3b8;
}

/* Taller button */
.btn-tall {
  padding-top: 15px;
  padding-bottom: 15px;
  font-size: 16px;
}

.price-period {
  font-size: 13px;
  font-weight: 400;
  color: #94a3b8;
}

/* Subscription Status */
.subscription-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.status-active {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
}

.status-text {
  font-size: 13px;
  color: #94a3b8;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
}

/* Slider Styles - Premium Custom Range Sliders */
.slider-group {
  margin: 10px 0;
}

.slider-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slider-label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.slider-value {
  font-size: 15px;
  font-weight: 700;
  color: #60a5fa;
  min-width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  transition: color 200ms ease, transform 200ms ease;
}

.slider-value.active {
  color: #93c5fd;
  transform: scale(1.05);
}

/* Custom slider container */
.slider-container {
  position: relative;
  width: 100%;
  height: 24px;
  margin-bottom: 8px;
  cursor: pointer;
  touch-action: none;
}

/* Track background */
.slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 6px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Filled portion of track */
.slider-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #1a73e8 0%, #6366f1 100%);
  border-radius: 100px;
  transition: width 50ms ease-out;
  box-shadow: 0 0 8px rgba(26, 115, 232, 0.3);
}

/* Thumb */
.slider-thumb {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  background: linear-gradient(145deg, #3b82f6 0%, #6366f1 100%);
  border-radius: 50%;
  box-shadow: 
    0 2px 8px rgba(26, 115, 232, 0.5),
    0 0 0 3px rgba(26, 115, 232, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: 
    transform 150ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 150ms ease;
  cursor: grab;
  z-index: 2;
}

.slider-thumb::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

.slider-thumb:hover {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 
    0 4px 16px rgba(139, 92, 246, 0.5),
    0 0 0 4px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.slider-thumb.dragging {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 
    0 6px 24px rgba(139, 92, 246, 0.6),
    0 0 0 5px rgba(139, 92, 246, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Hidden native input for accessibility */
.slider-container input[type="range"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
  margin: 0;
}

/* Focus state for accessibility */
.slider-container:focus-within .slider-thumb {
  box-shadow: 
    0 4px 16px rgba(139, 92, 246, 0.5),
    0 0 0 4px rgba(139, 92, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Tick marks (optional subtle guides) */
.slider-ticks {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 6px;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none;
}

.slider-tick {
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
}

/* Glow effect on track when active */
.slider-container:active .slider-track,
.slider-container:focus-within .slider-track {
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.2),
    0 0 12px rgba(26, 115, 232, 0.15);
}

/* Shimmer animation on fill */
.slider-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: shimmer 2s ease-in-out infinite;
  border-radius: inherit;
}

@keyframes shimmer {
  0%, 100% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    transform: translateX(100%);
    opacity: 1;
  }
}

/* Pulse animation on thumb when dragging */
.slider-thumb.dragging::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: thumb-pulse 0.6s ease-out;
  pointer-events: none;
}

@keyframes thumb-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* Mobile optimizations */
@media (hover: none) and (pointer: coarse) {
  .slider-thumb {
    width: 24px;
    height: 24px;
  }
  
  .slider-thumb::before {
    width: 8px;
    height: 8px;
  }
  
  .slider-container {
    height: 32px;
    overflow: visible;
  }
  
  .slider-track {
    height: 8px;
  }
  
  .slider-group {
    width: 100%;
    box-sizing: border-box;
    overflow: visible; /* Allow thumb to be visible at edges */
  }
}

/* Auto Top-Up Actions */
.auto-topup-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto; /* Push to bottom of card to align with pricing disclaimer */
}

/* Payment Method Notice */
.payment-method-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  font-size: 11px;
  color: #fbbf24;
}

.payment-method-notice svg {
  flex-shrink: 0;
}

/* Account Section */
.account-section {
  flex-shrink: 0;
  width: 100%;
}

.account-info {
  display: flex;
  gap: 20px;
}

.account-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-label {
  color: #94a3b8;
  font-size: 12px;
}

.account-value {
  color: #f8fafc;
  font-size: 12px;
  font-weight: 500;
}

/* Email Notification Toggle - Account Section */
.account-toggle-row {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Toggle Switch Base */
.toggle-switch {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  outline: none;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: rgba(203, 213, 225, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(203, 213, 225, 0.3);
  border-radius: 12px;
  transition: background 200ms ease, border-color 200ms ease;
  position: relative;
}

.toggle-thumb {
  position: absolute;
  top: 0px;
  left: 1px;
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 50%;
  transition: transform 200ms ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

/* Enabled state */
.toggle-switch.enabled .toggle-track {
  background: rgba(59, 130, 246, 0.85);
  border-color: rgba(59, 130, 246, 0.4);
}

.toggle-switch.enabled .toggle-thumb {
  transform: translateX(20px);
}

/* Hover states */
.toggle-switch:hover .toggle-track {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-switch.enabled:hover .toggle-track {
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
}

/* Focus state */
.toggle-switch:focus .toggle-track {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

/* Footer */
.dashboard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: #64748b;
  flex-shrink: 0;
}

.dashboard-footer a {
  color: #94a3b8;
  text-decoration: none;
}

.dashboard-footer a:hover {
  color: #f8fafc;
}

/* Button Full Width */
.btn-full {
  width: 100%;
}

/* Loading state */
.btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pricing Loading State */
.pricing-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: #94a3b8;
  font-size: 13px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(96, 165, 250, 0.2);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Live Pricing Indicator */
.pricing-footnote {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  color: #94a3b8;
  font-size: 10px;
  margin: 0;
  margin-top: -2px;
}

.pricing-footnote-models {
  margin-top: 8px;
}

.sparkle-icon {
  font-size: 12px;
}

.footnote-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footnote-separator {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 14px;
}

.live-indicator {
  width: 6px;
  height: 6px;
  background: #34d399;
  border-radius: 50%;
  animation: pulse-live 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
}

.live-indicator-lg {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
}

.footnote-item-main {
  font-weight: 500;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
}

.footnote-item-estimate {
  color: #64748b;
  font-size: 11px;
}

/* Online search indicator in footnote */
.footnote-item-online {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 4px 10px;
  border-radius: 16px;
  font-weight: 500;
  color: #6ee7b7;
  font-size: 11px;
}

.online-icon {
  font-size: 12px;
  margin-right: 2px;
}

/* Pricing footer - inline unified style */
.pricing-footer-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  flex-shrink: 0;
}

.pricing-footer-inline .live-indicator {
  flex-shrink: 0;
}

.pricing-footer-inline .footer-text {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.pricing-footer-inline .footer-online {
  color: #6ee7b7;
}

.pricing-footer-inline .footer-separator {
  color: #475569;
  font-size: 12px;
}

/* Compact badges for online search and estimate */
.footnote-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 14px;
  white-space: nowrap;
}

.footnote-badge svg {
  flex-shrink: 0;
}

.footnote-badge-online {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

.footnote-badge-estimate {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.footnote-badge-estimate svg {
  color: #fbbf24;
}

.footnote-badge-variation {
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: #93c5fd;
  cursor: help;
}

.footnote-badge-variation svg {
  color: #93c5fd;
}

.pricing-footnote-live {
  /* No padding needed - bounding box removed */
}

@keyframes pulse-live {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.5);
  }
  50% { 
    opacity: 0.7; 
    transform: scale(0.9);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.8);
  }
}

/* Error State */
.pricing-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  gap: 8px;
  color: #f87171;
  font-size: 13px;
  text-align: center;
}

.pricing-error-retry {
  color: #60a5fa;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 4px 8px;
}

.pricing-error-retry:hover {
  color: #93c5fd;
}

/* Model provider badge */
.model-provider {
  font-size: 10px;
  color: #64748b;
  font-weight: 400;
  margin-left: 6px;
}

/* Pricing disclaimer - height matches Enable Auto Top-Up button */
.pricing-disclaimer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 12px;
  margin: 0;
  padding: 11px 14px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 10px;
  line-height: 1.3;
  flex-shrink: 0;
  min-height: 20px;
}

.pricing-disclaimer svg {
  flex-shrink: 0;
  color: #fbbf24;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 24px;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: transform 300ms ease, opacity 300ms ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-success {
  border-color: rgba(52, 211, 153, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(6, 78, 59, 0.3) 100%);
}

.toast-info {
  border-color: rgba(96, 165, 250, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 58, 138, 0.3) 100%);
}

.toast-error {
  border-color: rgba(248, 113, 113, 0.4);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(127, 29, 29, 0.3) 100%);
}

/* ===========================================
   Dashboard Button Styles
   =========================================== */

/* Subscribe button - constant animated shimmer like hero CTA */
#subscribe-btn {
  background: 
    linear-gradient(110deg, 
      rgba(26, 115, 232, 1) 0%, 
      rgba(99, 102, 241, 1) 25%,
      rgba(168, 85, 247, 1) 50%,
      rgba(14, 165, 233, 1) 75%,
      rgba(26, 115, 232, 1) 100%
    );
  background-size: 200% 100%;
  animation: btn-shimmer 8s linear infinite;
  border-color: rgba(139, 92, 246, 0.6);
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 
    0 4px 16px rgba(26, 115, 232, 0.4),
    0 0 24px rgba(168, 85, 247, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, filter 220ms ease;
}

#subscribe-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
  filter: brightness(1.12) saturate(1.15);
  box-shadow: 
    0 8px 28px rgba(26, 115, 232, 0.5),
    0 0 40px rgba(168, 85, 247, 0.45),
    0 0 16px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Auto top-up button - shimmer on hover */
#setup-auto-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  border-color: rgba(59, 130, 246, 0.5);
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 
    0 2px 10px rgba(26, 115, 232, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 250ms ease;
}

#setup-auto-btn:hover {
  background: 
    linear-gradient(110deg, 
      rgba(26, 115, 232, 1) 0%, 
      rgba(99, 102, 241, 1) 25%,
      rgba(168, 85, 247, 1) 50%,
      rgba(14, 165, 233, 1) 75%,
      rgba(26, 115, 232, 1) 100%
    );
  background-size: 200% 100%;
  animation: btn-shimmer 8s linear infinite;
  border-color: rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(26, 115, 232, 0.4),
    0 0 24px rgba(168, 85, 247, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Secondary buttons - purple outline on hover */
#logout-btn,
#cancel-subscription-btn,
#disable-auto-btn {
  transition: all 250ms ease;
}

#logout-btn:hover,
#cancel-subscription-btn:hover,
#disable-auto-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 
    0 0 14px rgba(139, 92, 246, 0.2),
    inset 0 0 8px rgba(139, 92, 246, 0.05);
  transform: translateY(-1px);
}

/* Pricing row hover enhancement */
.pricing-row:not(.pricing-header):hover > span {
  background: rgba(139, 92, 246, 0.08);
}

/* Clickable pricing rows */
.pricing-row-clickable {
  cursor: pointer;
  transition: all 150ms ease;
}

.pricing-row-clickable:active > span {
  background: rgba(139, 92, 246, 0.15);
}

/* Default model row - always highlighted */
.pricing-row-default > span {
  background: rgba(96, 165, 250, 0.10) !important;
}

.pricing-row-default .model-name {
  color: #93c5fd;
}

.pricing-row-default .your-cost {
  color: #94a3b8;
}

/* Active/selected pricing row - has the left border */
.pricing-row-active {
  border-left: 3px solid #60a5fa;
}

.pricing-row-active > span {
  background: rgba(96, 165, 250, 0.15) !important;
}

.pricing-row-active .model-name {
  color: #93c5fd;
}

/* Active row price styling */
.pricing-row-active .your-cost {
  color: #94a3b8;
}

/* Preview badge for temporary state */
.preview-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 1px 5px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-left: 6px;
  height: 14px; /* Fixed height to not exceed parent line-height */
  line-height: 1;
  animation: preview-pulse 2s ease-in-out infinite;
}

@keyframes preview-pulse {
  0%, 100% { 
    opacity: 1;
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.2);
  }
  50% { 
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
  }
}

/* Stat card preview state - subtle amber glow */
.stat-card-preview {
  border-color: rgba(251, 191, 36, 0.4) !important;
  box-shadow: 
    0 0 16px rgba(251, 191, 36, 0.15),
    0 4px 16px rgba(15, 23, 42, 0.3);
}

.stat-card-preview:hover {
  border-color: rgba(251, 191, 36, 0.5) !important;
}

/* Footer links */
.dashboard-footer a {
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 200ms ease;
}

.dashboard-footer a:hover {
  color: #f8fafc;
  background: rgba(139, 92, 246, 0.15);
}

/* ===========================================
   Stat Card Tooltip Styles
   =========================================== */

/* Stat cards with tooltips */
.stat-card-has-tooltip {
  cursor: pointer;
  position: relative;
  outline: none;
}

/* The tooltip itself - positioned above the card */
.stat-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 200px;
  max-width: 260px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 400;
  color: #e2e8f0;
  line-height: 1.45;
  text-align: center;
  white-space: normal;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 16px rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
  z-index: 100;
}

/* Arrow pointing down */
.stat-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(15, 23, 42, 0.97);
  filter: drop-shadow(0 1px 1px rgba(139, 92, 246, 0.2));
}

/* Show tooltip on hover or keyboard focus */
.stat-card-has-tooltip:hover .stat-tooltip,
.stat-card-has-tooltip:focus-visible .stat-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Mobile tooltip adjustments */
@media (max-width: 480px) {
  .stat-tooltip {
    min-width: 180px;
    max-width: 220px;
    padding: 8px 12px;
    font-size: 11px;
  }
}

