/**
 * POLITICADE FEDERAL BUDGET BALANCER STYLES
 * High-performance, responsive dark-mode styling
 */

/* ==========================================================================
   Base Layout & Theme Variables
   ========================================================================== */
.budget-page-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 6rem;
  box-sizing: border-box;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.budget-hero {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.budget-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--accent-amber);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.budget-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.budget-title-gradient {
  background: linear-gradient(135deg, #00f0ff 0%, #3b82f6 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.budget-desc {
  max-width: 820px;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ==========================================================================
   Sticky KPI Dashboard Bar
   ========================================================================== */
.sticky-kpi-bar {
  position: sticky;
  top: 64px; /* below header */
  z-index: 90;
  background: rgba(11, 17, 33, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  transition: all 0.3s ease;
}

.kpi-metrics-group {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.kpi-box {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.kpi-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
}

/* Big Deficit / Surplus Gauge */
.kpi-deficit-gauge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  transition: all 0.3s ease;
}

.kpi-deficit-gauge.balanced {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}

.kpi-deficit-gauge.surplus {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
}

.gauge-icon {
  font-size: 1.75rem;
}

.gauge-text-group {
  display: flex;
  flex-direction: column;
}

.gauge-headline {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-rose);
}

.kpi-deficit-gauge.balanced .gauge-headline {
  color: var(--accent-emerald);
}

.kpi-deficit-gauge.surplus .gauge-headline {
  color: var(--accent-cyan);
}

.gauge-amount {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--accent-rose);
}

.kpi-deficit-gauge.balanced .gauge-amount {
  color: var(--accent-emerald);
}

.kpi-deficit-gauge.surplus .gauge-amount {
  color: var(--accent-cyan);
}

/* Actions right */
.kpi-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-lock-budget {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-lock-budget:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-reset-budget {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-budget:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* ==========================================================================
   Presets Bar
   ========================================================================== */
.presets-section {
  margin-bottom: 2rem;
}

.presets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.presets-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.preset-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.preset-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.preset-chip.active {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.preset-chip-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.preset-chip-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-amber);
}

.preset-chip.active .preset-chip-badge {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Main Tab Navigation
   ========================================================================== */
.budget-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.budget-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.budget-tab-btn:hover {
  color: var(--text-main);
}

.budget-tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.05);
}

.tab-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* ==========================================================================
   Tab 1: Spending Line Items
   ========================================================================== */
.spending-category-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.spending-category-header {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.spending-category-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

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

.cat-icon {
  font-size: 1.5rem;
}

.cat-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.cat-summary-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cat-total-cost {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.cat-delta-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.cat-delta-badge.cut {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.cat-delta-badge.increased {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.cat-collapse-arrow {
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.spending-category-block.collapsed .cat-collapse-arrow {
  transform: rotate(-90deg);
}

.spending-category-block.collapsed .spending-items-list {
  display: none;
}

.spending-items-list {
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Individual Line Item Row */
.line-item-row {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease;
}

.line-item-row:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.line-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.item-agency-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-blue);
}

.item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.item-desc-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 0.2rem;
}

.item-values-box {
  text-align: right;
  min-width: 140px;
}

.item-current-cost {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.item-base-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.item-delta-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.item-delta-text.negative {
  color: var(--accent-emerald);
}

.item-delta-text.positive {
  color: var(--accent-rose);
}

/* Sliders & Step Buttons */
.item-controls-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.slider-container {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spending-slider {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.spending-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.spending-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-pct-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 55px;
  text-align: right;
  color: var(--text-main);
}

.item-btn-presets {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-step-pct {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-step-pct:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.btn-step-pct.active {
  background: var(--accent-cyan);
  color: #000000;
  border-color: var(--accent-cyan);
  font-weight: 800;
}

.btn-step-pct.danger:hover {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border-color: var(--accent-rose);
}

/* ==========================================================================
   Tab 2: Individual Deductions & Tax Expenditures
   ========================================================================== */
.deductions-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.deduction-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.deduction-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.deduction-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
}

.deduction-cost-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.deduction-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.deduction-option-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

.deduction-option-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--border-highlight);
}

.deduction-option-btn.active {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.option-btn-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.option-btn-revenue {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.option-btn-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==========================================================================
   Tab 3: New & Alternative Taxes
   ========================================================================== */
.alt-taxes-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.alt-tax-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  transition: all 0.25s ease;
}

.alt-tax-card.active-tax {
  border-color: var(--accent-cyan);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.15);
}

.alt-tax-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.alt-tax-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.alt-tax-icon {
  font-size: 2rem;
}

.alt-tax-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Custom Toggle Switch */
.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.switch-toggle {
  position: relative;
  width: 50px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  transition: background 0.3s ease;
}

.switch-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input[type="checkbox"]:checked + .switch-toggle {
  background: var(--accent-emerald);
}

input[type="checkbox"]:checked + .switch-toggle::after {
  transform: translateX(22px);
}

.switch-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

/* FairTax Feature Callout */
.fairtax-repeal-box {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fairtax-repeal-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-rose);
  letter-spacing: 0.05em;
}

.fairtax-repeal-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.repeal-badge {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: line-through;
  text-decoration-color: var(--accent-rose);
}

.fairtax-yield-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.yield-stat-box {
  display: flex;
  flex-direction: column;
}

.yield-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.yield-stat-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

/* ==========================================================================
   Tab 4: Traditional Rates & Levers
   ========================================================================== */
.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.rate-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rate-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.rate-card-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.rate-big-val {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--accent-cyan);
}

.rate-yield-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* ==========================================================================
   Tab 5: 10-Year Projections & Coalitions
   ========================================================================== */
.analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

.analysis-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
}

.coalition-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.coalition-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.coalition-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.coalition-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.coalition-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ==========================================================================
   Results Page ("Lock In Solution" View)
   ========================================================================== */
#budgetResultsSection {
  display: none;
  animation: fadeIn 0.4s ease;
}

#budgetResultsSection.active-view {
  display: block;
}

#budgetSimulationSection.hidden-view {
  display: none;
}

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

.results-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.results-grade-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  font-size: 2.5rem;
  font-weight: 900;
  font-family: var(--font-mono);
  margin-bottom: 1rem;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.4);
}

.results-grade-circle.grade-aplus,
.results-grade-circle.grade-a {
  background: var(--accent-emerald);
  color: #000000;
}

.results-grade-circle.grade-bplus,
.results-grade-circle.grade-b {
  background: var(--accent-cyan);
  color: #000000;
}

.results-grade-circle.grade-c {
  background: var(--accent-amber);
  color: #000000;
}

.results-grade-circle.grade-f {
  background: var(--accent-rose);
  color: #ffffff;
}

.results-persona-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.results-verdict-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 1.5rem;
}

.results-top-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-unlock-budget {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-highlight);
  color: var(--text-main);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-unlock-budget:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

/* Master Stats Cards */
.results-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.res-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.res-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.res-stat-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-main);
}

.res-stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Social Share Block */
.social-share-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.social-share-heading {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.social-share-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.social-buttons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-social.twitter {
  background: #000000;
  border-color: #333333;
  color: #ffffff;
}

.btn-social.twitter:hover {
  background: #111111;
  border-color: #555555;
  transform: translateY(-2px);
}

.btn-social.facebook {
  background: #1877f2;
  color: #ffffff;
}

.btn-social.facebook:hover {
  background: #166fe5;
  transform: translateY(-2px);
}

.btn-social.linkedin {
  background: #0a66c2;
  color: #ffffff;
}

.btn-social.linkedin:hover {
  background: #095196;
  transform: translateY(-2px);
}

.btn-social.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #ffffff;
}

.btn-social.instagram:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

/* Permalink Row */
.permalink-box {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
}

.permalink-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.btn-copy-permalink {
  background: var(--accent-cyan);
  color: #000000;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.25rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-copy-permalink:hover {
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

/* Itemized Receipt Table */
.receipt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.receipt-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
}

.receipt-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.receipt-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Toast Message */
.budget-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #10b981;
  color: #000000;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
  animation: slideUp 0.3s ease;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .sticky-kpi-bar {
    top: 56px;
    padding: 0.75rem 1rem;
  }
  .kpi-metrics-group {
    gap: 1rem;
  }
  .kpi-deficit-gauge {
    width: 100%;
    justify-content: space-between;
  }
  .kpi-actions {
    width: 100%;
    justify-content: stretch;
  }
  .btn-lock-budget {
    flex: 1;
    justify-content: center;
  }
}
