/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;500;700;900&display=swap');

:root {
  /* Palette */
  --bg-deep: #0f172a;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Accents */
  --amber-primary: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.6);
  --red-alert: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.6);
  --cyan-primary: #06b6d4;
  --green-success: #10b981;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* { box-sizing: border-box; }

.tax-view {
  width: 100%;
  height: 100%;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 0% 100%, rgba(245, 158, 11, 0.15) 0%, transparent 60%),
    linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Ambient Effects */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  z-index: 0;
  animation: float 10s infinite ease-in-out;
}
.glow-amber { width: 400px; height: 400px; background: var(--amber-primary); top: -100px; left: -100px; }
.glow-red { width: 300px; height: 300px; background: var(--red-alert); bottom: -50px; right: -50px; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 30px); }
}

/* Header */
.tax-header { text-align: center; z-index: 2; margin-bottom: 2rem; flex-shrink: 0; }

.header-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 3px;
  font-weight: 700;
  color: var(--amber-primary);
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 0.5rem;
}

.tax-header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(to right, #fff, #fcd34d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

/* Stage */
.tax-stage {
  flex: 1;
  display: flex;
  gap: 1.5rem;
  z-index: 2;
  min-height: 0;
  padding-bottom: 1rem;
}

/* --- Left Panel: Policy (Brackets) --- */
.panel-policy {
  flex: 1;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.panel-header {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 2px; color: var(--text-muted);
  margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.5rem;
}

.brackets-list {
  flex: 1;
  display: flex; flex-direction: column; gap: 10px;
}

.bracket-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.b-info { flex: 1; }
.b-name { font-weight: 700; font-size: 0.9rem; }
.b-range { font-size: 0.7rem; color: var(--text-muted); font-family: monospace; }
.b-rate { font-weight: 900; font-size: 1.1rem; }

/* Visual Tiers */
.bracket-card.low .b-rate { color: var(--green-success); }
.bracket-card.mid .b-rate { color: var(--amber-primary); }
.bracket-card.high .b-rate { color: var(--red-alert); }

/* Active State */
.bracket-card.active {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--amber-primary);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}
.b-indicator {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--amber-primary);
}

/* --- Right Panel: Audit Console --- */
.panel-audit {
  flex: 1;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.audit-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2rem;
}

.auditor-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 10px var(--cyan-primary));
}

.auditor-status {
  font-family: monospace; font-size: 0.8rem; letter-spacing: 2px; font-weight: 700;
  padding: 4px 8px; border-radius: 4px; background: rgba(255,255,255,0.05); color: var(--text-muted);
}
.auditor-status.active { color: var(--amber-primary); border: 1px solid var(--amber-primary); animation: blink 1s infinite; }
.auditor-status.danger { color: var(--red-alert); border: 1px solid var(--red-alert); animation: blink 0.5s infinite; }
.auditor-status.success { color: var(--green-success); border: 1px solid var(--green-success); }

/* Audit Screen Rows */
.audit-screen {
  display: flex; flex-direction: column; gap: 1rem;
}

.audit-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.5s ease;
  position: relative;
}

.audit-row .label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; }
.audit-row .value { font-family: monospace; font-size: 1.1rem; font-weight: 700; color: #fff; }

/* Dimmed / Hidden States */
.audit-row.dimmed {
  opacity: 0.2;
  filter: blur(2px);
  background: transparent;
}
.audit-row.dimmed .value {
  color: transparent !important;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Revealed State */
.audit-row.revealed {
  opacity: 1;
  filter: blur(0);
  background: rgba(255,255,255,0.02);
}

/* Value Colors */
.val-wealth { color: var(--amber-primary) !important; }
.val-bracket { color: var(--cyan-primary) !important; }
.val-rate { color: var(--text-main) !important; }
.val-due { color: var(--red-alert) !important; }
.val-net { color: var(--green-success) !important; }

.audit-row.large .value { font-size: 1.8rem; }
.audit-row.large { border: 1px solid rgba(255,255,255,0.1); margin-top: 0.5rem; }

.divider { height: 1px; background: rgba(255,255,255,0.1); margin: 0.5rem 0; }

/* Animations */
.pop-text { animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

.scanning .value { animation: scan-text 0.2s infinite; }
@keyframes scan-text { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

.flash-red { animation: flash-bg-red 0.5s; }
@keyframes flash-bg-red { 0%, 100% { background: transparent; } 50% { background: rgba(239, 68, 68, 0.2); } }

@keyframes blink { 50% { opacity: 0; } }

/* Footer */
.hud-footer {
  margin-top: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.player-pill {
  display: flex; gap: 10px; background: rgba(0,0,0,0.4); padding: 8px 16px; border-radius: 50px; border: 1px solid var(--glass-border); font-size: 0.8rem;
}
.player-pill .label { color: var(--text-muted); font-weight: 700; font-size: 0.6rem; letter-spacing: 1px; }
.player-pill .value { font-weight: 700; color: #fff; }

.message-glass {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 3rem;
  border-radius: 100px;
  border: 1px solid var(--glass-border);
  text-align: center;
  min-width: 400px;
  font-weight: 500;
  font-family: monospace;
}
.message-glass.warning { border-color: var(--amber-primary); color: var(--amber-primary); }
.message-glass.highlight { border-color: var(--cyan-primary); color: var(--cyan-primary); }
.message-glass.danger { border-color: var(--red-alert); color: var(--red-alert); background: rgba(239, 68, 68, 0.1); }
.message-glass.success { border-color: var(--green-success); color: var(--green-success); }
.message-glass.active { border-color: var(--amber-primary); background: rgba(245, 158, 11, 0.1); }

/* Scrollbar */
.brackets-list::-webkit-scrollbar { width: 4px; }
.brackets-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.brackets-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }