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

:root {
  --color-bg-darkest: #0b0c0d;
  --color-bg-dark: #121417;
  --color-bg-panel: rgba(20, 22, 26, 0.85);
  --color-border-tactical: rgba(210, 20, 58, 0.25);
  --color-border-active: rgba(210, 20, 58, 0.8);
  --color-accent-red: #c01332;
  --color-accent-dull-red: #7a151b;
  --color-accent-bright-red: #ff2a4b;
  --color-text-grey: #9a9fa7;
  --color-text-light: #e6ebf0;
  --color-text-glowing: #ff4a5a;
  --color-alert-green: #00ff66;
  --color-alert-amber: #ffaa00;
  
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-sans: 'Inter', sans-serif;
  
  --tactical-glow: 0 0 15px rgba(210, 20, 58, 0.3);
  --tactical-glow-bright: 0 0 25px rgba(210, 20, 58, 0.65);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & scrollbars */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-bg-darkest);
  color: var(--color-text-light);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
  background-image: 
    linear-gradient(rgba(11, 12, 13, 0.96), rgba(11, 12, 13, 0.98)),
    radial-gradient(circle at 50% 50%, rgba(122, 21, 27, 0.2) 0%, transparent 80%),
    linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-position: center;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-darkest);
}
::-webkit-scrollbar-thumb {
  background: var(--color-accent-dull-red);
  border-radius: 4px;
  border: 2px solid var(--color-bg-darkest);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-red);
}

/* Theme Gradients */
.gradient-bg {
  background: linear-gradient(135deg, #3a3f44 0%, #212529 50%, #500f13 100%);
}

.gradient-header {
  background: linear-gradient(90deg, #30353b 0%, #7a151b 100%);
  border-bottom: 2px solid var(--color-accent-red);
}

/* Global Header Branding Banner */
.global-branding-banner {
  background: rgba(11, 12, 13, 0.95);
  border-bottom: 2px solid var(--color-accent-bright-red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 900;
  text-align: center;
  padding: 1.25rem 1rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(255, 42, 75, 0.85), 0 0 5px rgba(255, 255, 255, 0.6);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 99;
}

/* Layout Framework */
.dashboard-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  position: relative;
}

/* Tactical HUD overlays */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%);
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.4;
}

.hud-warning-strip {
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    #ffaa00,
    #ffaa00 10px,
    #000000 10px,
    #000000 20px
  );
  width: 100%;
}

.hazard-bar {
  background: repeating-linear-gradient(
    -45deg,
    var(--color-accent-dull-red),
    var(--color-accent-dull-red) 15px,
    var(--color-bg-dark) 15px,
    var(--color-bg-dark) 30px
  );
  border: 1px solid var(--color-border-tactical);
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-light);
  letter-spacing: 2px;
  text-shadow: 0 0 5px rgba(255,255,255,0.5);
  font-weight: bold;
}

/* Command Sidebar */
.command-sidebar {
  background-color: var(--color-bg-dark);
  border-right: 1px solid var(--color-border-tactical);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  z-index: 10;
  box-shadow: 5px 0 25px rgba(0,0,0,0.5);
}

.sidebar-brand {
  text-align: center;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-tactical);
  padding-bottom: 0.5rem;
}

.sidebar-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-sub {
  font-size: 0.6rem;
  color: var(--color-accent-bright-red);
  letter-spacing: 4px;
  margin-top: 0.15rem;
  text-transform: uppercase;
  text-shadow: var(--tactical-glow-bright);
  animation: pulse 2s infinite alternate;
}

.tactical-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.menu-item {
  width: 100%;
}

.menu-btn {
  width: 100%;
  background: rgba(30, 34, 40, 0.5);
  border: 1px solid var(--color-border-tactical);
  color: var(--color-text-grey);
  font-family: var(--font-mono);
  text-transform: uppercase;
  text-align: left;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.menu-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: var(--color-accent-red);
  transform: scaleY(0);
  transition: var(--transition-fast);
}

.menu-btn:hover {
  background: rgba(122, 21, 27, 0.15);
  border-color: rgba(210, 20, 58, 0.5);
  color: #fff;
  box-shadow: 0 0 10px rgba(210, 20, 58, 0.15);
}

.menu-btn.active {
  background: linear-gradient(90deg, rgba(122, 21, 27, 0.3) 0%, rgba(30, 34, 40, 0.5) 100%);
  border-color: var(--color-border-active);
  color: var(--color-text-glowing);
  box-shadow: var(--tactical-glow);
  font-weight: bold;
}

.menu-btn.active::before {
  transform: scaleY(1);
}

.btn-indicator {
  width: 6px;
  height: 6px;
  background-color: var(--color-text-grey);
  border-radius: 50%;
  margin-left: auto;
  transition: var(--transition-fast);
}

.menu-btn.active .btn-indicator {
  background-color: var(--color-accent-bright-red);
  box-shadow: var(--tactical-glow-bright);
}

/* System Stats in Sidebar */
.system-status-panel {
  border: 1px solid var(--color-border-tactical);
  background: rgba(15, 17, 20, 0.8);
  padding: 0.6rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
}

.status-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.status-row:last-child {
  margin-bottom: 0;
}

.status-label {
  color: var(--color-text-grey);
}

.status-value {
  font-weight: bold;
}
.status-value.critical {
  color: var(--color-accent-bright-red);
  text-shadow: var(--tactical-glow);
  animation: blink 1s infinite alternate;
}
.status-value.active {
  color: var(--color-alert-green);
}

/* Main Content Area */
.main-console {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.console-header {
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 9;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.console-title-group {
  display: flex;
  flex-direction: column;
}

.console-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.title-icon {
  color: var(--color-accent-bright-red);
  animation: pulse 1.5s infinite alternate;
}

.console-subtitle {
  font-size: 0.75rem;
  color: var(--color-text-grey);
  letter-spacing: 1px;
}

.telemetry-feed {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-accent-bright-red);
  background: rgba(122, 21, 27, 0.15);
  border: 1px solid rgba(210, 20, 58, 0.4);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--tactical-glow);
}

.telemetry-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent-bright-red);
  border-radius: 50%;
  animation: blink 0.6s infinite alternate;
}

/* Dashboard Views */
.dossier-view {
  padding: 2.5rem;
  display: none;
  animation: slideIn var(--transition-normal);
}

.dossier-view.active {
  display: block;
}

/* Home / Center Command view */
.tactical-overview {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Tactical Cards */
.tactical-card {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border-tactical);
  border-radius: 6px;
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tactical-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, transparent 49%, var(--color-border-tactical) 50%, transparent 52%);
  pointer-events: none;
}

.tactical-card:hover {
  border-color: var(--color-border-active);
  box-shadow: 0 10px 35px rgba(210, 20, 58, 0.15);
}

.card-header {
  border-bottom: 1px solid var(--color-border-tactical);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title.accented {
  color: var(--color-text-glowing);
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-grey);
}

/* Paragraphs & Dossier typography */
h1.dossier-heading {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
  border-bottom: 2px solid var(--color-accent-red);
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-shadow: 0 0 10px rgba(210, 20, 58, 0.2);
}

h2.section-subheading {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  text-transform: uppercase;
  color: var(--color-text-glowing);
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--color-accent-red);
  padding-left: 0.75rem;
  letter-spacing: 1px;
}

p.dossier-intro {
  font-size: 1.1rem;
  color: #cdd3dc;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.dossier-body {
  color: #b0b7c1;
  font-size: 0.95rem;
}

.dossier-body p {
  margin-bottom: 1.25rem;
  text-align: justify;
}

/* Alert Boxes within Dossiers */
.tactical-alert {
  background: rgba(122, 21, 27, 0.12);
  border: 1px dashed var(--color-accent-red);
  border-radius: 4px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
}

.alert-icon {
  font-size: 1.5rem;
  color: var(--color-accent-bright-red);
  animation: pulse 1s infinite alternate;
}

.alert-content h4 {
  font-family: var(--font-mono);
  color: #fff;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  letter-spacing: 1px;
}

.alert-content p {
  font-size: 0.85rem;
  color: #cbd2db;
  margin-bottom: 0 !important;
}

/* Interactive Timeline component */
.timeline-container {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border-tactical);
}

.timeline-node {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-node::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--color-bg-darkest);
  border: 2px solid var(--color-accent-red);
  border-radius: 50%;
  box-shadow: var(--tactical-glow);
  transition: background var(--transition-fast);
}

.timeline-node:hover::before {
  background: var(--color-accent-bright-red);
  box-shadow: var(--tactical-glow-bright);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-accent-bright-red);
  font-weight: bold;
  margin-bottom: 0.25rem;
  letter-spacing: 1px;
}

.timeline-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--color-text-grey);
}

/* Subsidiary Grid */
.subsidiary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.sub-card {
  background: rgba(30, 34, 40, 0.4);
  border: 1px solid var(--color-border-tactical);
  border-radius: 4px;
  padding: 1.5rem;
  position: relative;
}

.sub-logo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border-tactical);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.sub-name {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 1px;
}

.sub-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.sub-status.dead {
  background: rgba(122, 21, 27, 0.3);
  color: var(--color-accent-bright-red);
  border: 1px solid var(--color-accent-red);
}

.sub-status.diluted {
  background: rgba(255, 170, 0, 0.15);
  color: var(--color-alert-amber);
  border: 1px solid var(--color-alert-amber);
}

/* Custom Charts */
.chart-container {
  width: 100%;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
}

.bar-chart-row {
  margin-bottom: 0.8rem;
}

.bar-label-group {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.bar-outer {
  background: rgba(30, 34, 40, 0.8);
  border: 1px solid rgba(255,255,255,0.08);
  height: 20px;
  border-radius: 2px;
  overflow: visible;
  position: relative;
}

/* Overflow bars that break out of their containers */
.bar-outer.bar-overflow {
  overflow: visible;
  z-index: 100;
  position: relative;
}

.bar-outer.bar-overflow .bar-inner {
  position: relative;
  z-index: 100;
  border-radius: 2px 0 0 2px;
  height: 100%;
}

.bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent-dull-red) 0%, var(--color-accent-bright-red) 100%);
  width: 0%;
  transition: width 2.5s cubic-bezier(0.1, 0.8, 0.2, 1);
  box-shadow: 0 0 8px rgba(210, 20, 58, 0.4);
}

/* OFF-CHART badge for overflow bars */
.bar-offchart-badge {
  position: absolute;
  top: -20px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #ffea00;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 234, 0, 0.6);
  z-index: 101;
  white-space: nowrap;
  padding: 1px 6px;
  background: rgba(255, 234, 0, 0.08);
  border: 1px solid rgba(255, 234, 0, 0.3);
  border-radius: 2px;
}

.bar-value {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #fff;
  font-weight: bold;
  z-index: 2;
  text-shadow: 0 0 3px #000;
}

/* Custom SVG Cost Curve Chart Styling */
.chart-svg-panel {
  background: rgba(12, 14, 16, 0.9);
  border: 1px solid var(--color-border-tactical);
  border-radius: 4px;
  padding: 1rem;
  margin-top: 1rem;
}

.svg-grid-line {
  stroke: rgba(255,255,255,0.05);
  stroke-dasharray: 4;
}

.svg-axis {
  stroke: var(--color-border-tactical);
  stroke-width: 1.5;
}

.svg-line-repair {
  stroke: var(--color-accent-bright-red);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawLine 2s forwards;
  filter: drop-shadow(0 0 4px var(--color-accent-bright-red));
}

.svg-line-value {
  stroke: var(--color-alert-amber);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawLine 2.2s forwards;
  filter: drop-shadow(0 0 4px var(--color-alert-amber));
}

.svg-label-text {
  font-family: var(--font-mono);
  fill: var(--color-text-grey);
  font-size: 10px;
}

/* Interactive Brainwash Quiz */
.quiz-widget {
  background: rgba(15, 17, 20, 0.95);
  border: 1px solid var(--color-border-tactical);
  border-radius: 6px;
  padding: 2rem;
  margin-top: 1.5rem;
  position: relative;
}

.quiz-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--color-accent-bright-red);
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: var(--tactical-glow);
}

.quiz-question-card {
  display: none;
}

.quiz-question-card.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.quiz-question-num {
  font-family: var(--font-mono);
  color: var(--color-accent-bright-red);
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.quiz-question-text {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 1.5rem;
}

.quiz-answers-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-answer-btn {
  background: rgba(30, 34, 40, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--color-text-light);
  padding: 1rem 1.25rem;
  text-align: left;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.quiz-answer-btn:hover {
  background: rgba(122, 21, 27, 0.2);
  border-color: rgba(210, 20, 58, 0.4);
  transform: translateX(5px);
}

/* Quiz Result UI */
.quiz-result-card {
  display: none;
  text-align: center;
  padding: 1rem;
}

.quiz-result-card.active {
  display: block;
  animation: scaleUp 0.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.quiz-score-gauge {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 6px solid var(--color-accent-dull-red);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  position: relative;
  background: rgba(0, 0, 0, 0.4);
}

.quiz-score-num {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: bold;
  color: var(--color-accent-bright-red);
  text-shadow: var(--tactical-glow);
}

.quiz-score-pct {
  font-size: 0.8rem;
  color: var(--color-text-grey);
  margin-top: -5px;
}

.quiz-diagnosis-title {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.quiz-diagnosis-desc {
  font-size: 0.92rem;
  color: var(--color-text-grey);
  max-width: 480px;
  margin: 0 auto 2rem auto;
}

/* Rage Wall Interface */
.rage-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.rage-post {
  background: rgba(30, 34, 40, 0.5);
  border: 1px solid var(--color-border-tactical);
  border-radius: 4px;
  padding: 1.25rem;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.rage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.rage-username {
  color: var(--color-text-glowing);
  font-weight: bold;
}

.rage-vehicle {
  color: var(--color-alert-amber);
}

.rage-text {
  font-size: 0.88rem;
  color: #d1d5db;
  font-style: italic;
  line-height: 1.5;
  white-space: pre-line;
}

.rage-footer {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
}

.rage-caps-indicator {
  color: var(--color-accent-bright-red);
  text-transform: uppercase;
}

/* Rage Generator Widget */
.rage-generator-widget {
  background: rgba(12, 14, 16, 0.95);
  border: 1px solid var(--color-border-active);
  border-radius: 6px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: var(--tactical-glow);
}

.rage-screen {
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem;
  min-height: 150px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--color-accent-bright-red);
  border-radius: 4px;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.9);
}

.rage-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 70%, rgba(0,0,0,0.65) 100%);
  pointer-events: none;
}

.rage-console-text {
  text-shadow: 0 0 5px rgba(255, 42, 75, 0.65);
}

.rage-actions {
  display: flex;
  gap: 1rem;
}

/* Premium Buttons */
.tactical-btn {
  background: linear-gradient(180deg, var(--color-accent-red) 0%, var(--color-accent-dull-red) 100%);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-family: var(--font-mono);
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--tactical-glow);
  transition: all var(--transition-fast);
}

.tactical-btn:hover {
  background: linear-gradient(180deg, var(--color-accent-bright-red) 0%, var(--color-accent-red) 100%);
  box-shadow: var(--tactical-glow-bright);
  transform: translateY(-2px);
}

.tactical-btn:active {
  transform: translateY(1px);
}

.tactical-btn.secondary {
  background: rgba(30, 34, 40, 0.7);
  border: 1px solid var(--color-border-tactical);
  color: var(--color-text-grey);
  box-shadow: none;
}

.tactical-btn.secondary:hover {
  background: rgba(122, 21, 27, 0.15);
  border-color: var(--color-border-active);
  color: #fff;
}

/* Utility Animations */
@keyframes blink {
  0% { opacity: 0.15; }
  100% { opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(0.98); opacity: 0.85; filter: brightness(0.9); }
  100% { transform: scale(1.02); opacity: 1; filter: brightness(1.1); }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

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

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-pulse {
  animation: pulse 1.5s infinite alternate;
}

.animate-blink {
  animation: blink 0.8s infinite alternate;
}

.animate-blink-slow {
  animation: blink 1.6s infinite alternate ease-in-out;
}

/* Dossier Grid layout for standard cards */
.dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Quick specs lists inside technical dossiers */
.spec-list {
  list-style: none;
  font-size: 0.88rem;
  margin: 1rem 0;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.spec-list li:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--color-text-grey);
  font-family: var(--font-mono);
}

.spec-val {
  font-weight: 500;
  color: #fff;
}
.spec-val.failure {
  color: var(--color-accent-bright-red);
}

/* Search HUD Glowing Overrides */
#hud-search:focus {
  border-color: var(--color-accent-bright-red) !important;
  box-shadow: var(--tactical-glow-bright), inset 0 0 5px rgba(0,0,0,0.8) !important;
}

#hud-sector-filter:focus {
  border-color: var(--color-accent-bright-red) !important;
  color: #fff;
  box-shadow: var(--tactical-glow);
}

mark {
  background: rgba(210, 20, 58, 0.35);
  color: #fff;
  padding: 2px 4px;
  border-radius: 2px;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

/* Sweep effect keyframes */
@keyframes sweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* Responsive Overrides */
@media (max-width: 992px) {
  .dashboard-container {
    grid-template-columns: 1fr;
  }
  .command-sidebar {
    height: auto;
    position: relative;
    box-shadow: none;
    border-right: none;
    border-bottom: 1px solid var(--color-border-tactical);
    padding: 1rem;
  }
  .main-console {
    height: auto;
    overflow-y: visible;
  }
  .tactical-overview {
    grid-template-columns: 1fr;
  }
}

/* ============================================== */
/* PAGINATION HUD STYLING */
/* ============================================== */
.pagination-hud {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.5rem;
  font-family: var(--font-mono);
}

.pagination-btn {
  background: rgba(30, 34, 40, 0.6);
  border: 1px solid var(--color-border-tactical);
  color: var(--color-text-grey);
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
}

.pagination-btn:hover:not(.disabled) {
  background: rgba(122, 21, 27, 0.25);
  border-color: rgba(210, 20, 58, 0.6);
  color: #fff;
  box-shadow: 0 0 12px rgba(210, 20, 58, 0.35);
}

.pagination-btn.active {
  background: linear-gradient(90deg, rgba(122, 21, 27, 0.4) 0%, rgba(30, 34, 40, 0.6) 100%);
  border-color: var(--color-border-active);
  color: var(--color-text-glowing);
  box-shadow: var(--tactical-glow-bright);
  font-weight: bold;
}

.pagination-btn.disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.pagination-info {
  color: var(--color-text-grey);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  margin: 0 1.2rem;
  text-transform: uppercase;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.15);
}

/* ============================================== */
/* WARNING SPLASH SCREEN OVERLAY STYLING */
/* ============================================== */
.splash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 9, 10, 0.94);
  backdrop-filter: blur(12px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
  cursor: pointer;
}

.splash-overlay.fade-out {
  opacity: 0;
  backdrop-filter: blur(0px);
  pointer-events: none;
}

.splash-content {
  background: var(--color-bg-panel);
  border: 2px solid var(--color-accent-bright-red);
  box-shadow: var(--tactical-glow-bright), inset 0 0 25px rgba(210, 20, 58, 0.2);
  padding: 3rem 2rem;
  border-radius: 8px;
  text-align: center;
  max-width: 580px;
  width: 90%;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: scalePulse 3s infinite alternate;
}

.splash-warning-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-accent-bright-red);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 1.2rem;
  text-shadow: var(--tactical-glow-bright);
}

.splash-message {
  font-size: 1.9rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 1.8rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  letter-spacing: 0.5px;
}

.splash-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-text-grey);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: pulse 1.5s infinite alternate;
}

@keyframes scalePulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.02); }
}

/* Premium Rotating Border Wrapper styling */
@keyframes rotate-gradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.rotating-border-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 3px; /* thicker border */
  background: transparent;
  z-index: 1;
  box-shadow: 0 0 25px rgba(255, 170, 0, 0.5), 0 0 10px rgba(255, 0, 85, 0.3);
  animation: scalePulse 1.5s infinite alternate;
}

.rotating-border-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(#ff0055, #ffaa00, #ffea00, #ff0055);
  animation: rotate-gradient 4s linear infinite;
  z-index: -2;
}

.rotating-border-wrapper::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  background: #0d0f11;
  border-radius: 6px;
  z-index: -1;
}

/* ============================================== */
/* MOBILE RESPONSIVE HUD & NAVIGATION OVERRIDES */
/* ============================================== */

/* Mobile Hamburger Menu Toggle Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  transition: var(--transition-fast);
}

.mobile-menu-btn .bar {
  height: 2.5px;
  width: 100%;
  background-color: var(--color-text-light);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 4px rgba(255, 42, 75, 0.4);
}

/* Morphing hamburger to tactical X when menu is active */
.sidebar-active .mobile-menu-btn .bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
  background-color: var(--color-accent-bright-red);
  box-shadow: var(--tactical-glow-bright);
}

.sidebar-active .mobile-menu-btn .bar:nth-child(2) {
  opacity: 0;
}

.sidebar-active .mobile-menu-btn .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  background-color: var(--color-accent-bright-red);
  box-shadow: var(--tactical-glow-bright);
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.sidebar-active .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Media query for tablets and laptops (max-width: 1023px) */
@media (max-width: 1023px) {
  .global-branding-banner {
    font-size: 1.5rem;
    padding: 0.8rem 0.5rem;
    letter-spacing: 2px;
  }

  .dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  /* Transform Sidebar into responsive drawer */
  .command-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    z-index: 1001;
    background: rgba(15, 17, 20, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 2px solid var(--color-border-active);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 1.5rem 1.2rem;
  }

  .sidebar-active .command-sidebar {
    transform: translateX(280px);
  }

  /* Let main console expand naturally */
  .main-console {
    height: auto;
    min-height: calc(100vh - 6px);
    overflow-y: visible;
  }

  /* Console Header Adaptation */
  .console-header {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.2rem;
    position: sticky;
    top: 0;
    background: linear-gradient(90deg, rgba(48, 53, 59, 0.95) 0%, rgba(122, 21, 27, 0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .mobile-menu-btn {
    display: flex;
  }

  .console-title-group {
    flex-grow: 1;
  }

  .console-title {
    font-size: 1.15rem;
    letter-spacing: 1px;
  }

  .console-subtitle {
    font-size: 0.65rem;
    margin-top: 0.15rem;
  }

  .telemetry-feed {
    font-size: 0.68rem;
    padding: 0.35rem 0.65rem;
    width: 100%;
    margin-top: 0.4rem;
    justify-content: center;
    box-sizing: border-box;
  }

  /* Adjust Dossier container spacing */
  .dossier-view {
    padding: 1.5rem 1rem;
  }

  h1.dossier-heading {
    font-size: 1.6rem;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  p.dossier-intro {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }

  /* Layout grids become stacks */
  .tactical-overview {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .sourcing-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Stockholm Syndrome quiz mobile styling */
  .quiz-widget {
    padding: 1.25rem;
  }

  .quiz-question-text {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
  }

  .quiz-answer-btn {
    padding: 0.85rem 1.1rem;
    font-size: 0.86rem;
  }

  /* Slide-out deep dive modal becomes full-bleed overlay drawer on mobile */
  #deep-overlay-card {
    width: 100% !important;
    border-left: none !important;
    border-top: 3px solid var(--color-accent-bright-red) !important;
    padding: 1.5rem 1.25rem !important;
  }

  #deep-overlay-card h2 {
    font-size: 1.35rem;
  }
}

/* Media query for tiny mobile displays (max-width: 480px) */
@media (max-width: 480px) {
  .global-branding-banner {
    font-size: 1.15rem;
    padding: 0.6rem 0.5rem;
    letter-spacing: 1px;
  }

  .console-title {
    font-size: 1.0rem;
  }

  .console-subtitle {
    display: none; /* Hide long slogan on very small screens to keep layout clean */
  }

  .splash-message {
    font-size: 1.45rem;
    line-height: 1.4;
  }

  .splash-content {
    padding: 2.2rem 1.2rem;
  }

  .rotating-border-wrapper {
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
  }

  .tactical-card {
    padding: 1.25rem 1rem;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .card-meta {
    font-size: 0.65rem;
  }

  /* Horizontal swipe support for matrices */
  .scrollable-report-box {
    max-height: 380px;
    padding: 1rem !important;
    font-size: 0.76rem;
  }

  .sourcing-terminal-inner {
    font-size: 0.72rem;
  }
}

