/* ==========================================================================
   SHIFTWHY — NEO-BRUTALIST × GRAFFITI × INDUSTRIAL INTELLIGENCE STYLESHEET
   AMD DEVELOPER HACKATHON: ACT III (INTELLIGENT INDUSTRY TRACK)
   ========================================================================== */

:root {
  /* Dark Cinematic Industrial Foundations */
  --bg-void: #08090d;
  --bg-surface: #10121a;
  --bg-elevated: #161924;
  --bg-card: #12141e;
  --bg-card-hover: #191c2b;
  
  /* Text & Readability */
  --text-pure: #ffffff;
  --text-main: #f0f2f8;
  --text-muted: #8b92a8;
  --text-dim: #5c6278;
  
  /* Neo-Brutalist High-Vis Industrial Accents */
  --accent-lime: #00f59b;
  --accent-lime-dim: rgba(0, 245, 155, 0.12);
  --accent-coral: #ff2a55;
  --accent-coral-dim: rgba(255, 42, 85, 0.14);
  --accent-yellow: #ffea00;
  --accent-yellow-dim: rgba(255, 234, 0, 0.12);
  --accent-cyan: #00e5ff;
  --accent-cyan-dim: rgba(0, 229, 255, 0.12);
  --accent-magenta: #ff4db8;

  /* Brutal Borders & Hard Offset Shadows */
  --border-width: 2px;
  --border-line: #262a3d;
  --border-strong: #3a3f58;
  --border-accent: #00f59b;
  --shadow-hard: 4px 4px 0px #000000;
  --shadow-hard-lg: 6px 6px 0px #000000;
  --shadow-hard-sm: 2px 2px 0px #000000;
  
  /* Typography Tokens */
  --font-mono: 'DM Mono', monospace;
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-heading: 'Syne', 'Space Grotesk', sans-serif;
}

/* BASE RESET */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-void);
}

body {
  margin: 0;
  background-color: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* LAYOUT CONTAINER */
.app-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR COMPONENT
   ========================================================================== */
.sidebar {
  background: var(--bg-surface);
  border-right: var(--border-width) solid var(--border-line);
  padding: 24px 18px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: var(--border-width) solid var(--border-line);
}

.stencil-mark {
  width: 44px;
  height: 44px;
  background: var(--accent-lime);
  color: #000000;
  border: var(--border-width) solid #000000;
  box-shadow: var(--shadow-hard-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1;
}

.mark-symbol { font-size: 18px; letter-spacing: -0.5px; }
.mark-sub { font-size: 7.5px; font-family: var(--font-mono); font-weight: 700; margin-top: 1px; }

.brand-text { display: flex; flex-direction: column; }
.brand-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-pure);
}
.brand-badge {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--accent-lime);
  letter-spacing: 0.8px;
  margin-top: 2px;
}

.sidebar-section {
  margin-top: 22px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.plant-card {
  background: var(--bg-elevated);
  border: var(--border-width) solid var(--border-line);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-hard-sm);
}

.plant-status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-lime);
  flex-shrink: 0;
}

.plant-meta {
  display: flex;
  flex-direction: column;
}
.plant-meta strong {
  font-size: 11px;
  color: var(--text-pure);
  letter-spacing: 0.5px;
}
.plant-meta span {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
}

/* NAVIGATION */
.nav-stack {
  margin-top: 24px;
  display: grid;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  border: var(--border-width) solid transparent;
  color: var(--text-muted);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-line);
  color: var(--text-pure);
}

.nav-btn.active {
  background: var(--bg-elevated);
  border-color: var(--accent-lime);
  color: var(--accent-lime);
  box-shadow: var(--shadow-hard-sm);
}

.nav-ico { font-size: 15px; width: 16px; }
.nav-txt { flex: 1; font-weight: 600; letter-spacing: 0.5px; }
.nav-kbd { font-size: 9px; opacity: 0.6; }

/* SIDEBAR FOOTER & GRAFFITI */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.graffiti-box {
  background: #141724;
  border: var(--border-width) solid var(--accent-yellow);
  box-shadow: var(--shadow-hard-sm);
  position: relative;
  overflow: hidden;
  padding: 12px;
}

.hazard-stripe {
  height: 4px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: repeating-linear-gradient(
    45deg,
    var(--accent-yellow),
    var(--accent-yellow) 8px,
    #000000 8px,
    #000000 16px
  );
}

.graffiti-text b {
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--accent-yellow);
  display: block;
  letter-spacing: 1px;
}

.graffiti-text p {
  margin: 4px 0 0;
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

.operator-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: var(--border-width) solid var(--border-line);
}

.op-avatar {
  width: 32px;
  height: 32px;
  background: var(--accent-cyan);
  color: #000000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  border: var(--border-width) solid #000000;
  box-shadow: 2px 2px 0px #000;
  display: grid;
  place-items: center;
}

.op-meta b { font-size: 11px; color: var(--text-pure); display: block; }
.op-meta span { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-muted); }

/* ==========================================================================
   MAIN VIEWPORT & TOPBAR
   ========================================================================== */
.main-viewport {
  min-width: 0;
  padding: 0 36px 48px;
  max-width: 1680px;
  margin: 0 auto;
  width: 100%;
}

.topbar {
  height: 64px;
  border-bottom: var(--border-width) solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-crumb {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.terminal-prompt { color: var(--accent-lime); font-weight: 700; margin-right: 4px; }
.topbar-crumb .divider { color: var(--text-dim); padding: 0 6px; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border: var(--border-width) solid var(--border-line);
  background: var(--bg-surface);
  box-shadow: var(--shadow-hard-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mode-pill.live {
  border-color: var(--accent-lime);
  color: var(--accent-lime);
}
.mode-pill.live .status-indicator {
  background: var(--accent-lime);
  box-shadow: 0 0 8px var(--accent-lime);
}

.mode-pill.demo {
  border-color: var(--accent-yellow);
  color: var(--accent-yellow);
}
.mode-pill.demo .status-indicator {
  background: var(--accent-yellow);
  box-shadow: 0 0 8px var(--accent-yellow);
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.digital-clock {
  background: #000000;
  border: var(--border-width) solid var(--border-line);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-hard-sm);
}

.clock-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
}

.clock-digits {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 700;
  letter-spacing: 1px;
}

/* ==========================================================================
   HERO BANNER (NEO-BRUTALIST CINEMATIC)
   ========================================================================== */
.hero-block {
  margin-top: 24px;
  background: linear-gradient(135deg, #111420 0%, #0d0e17 100%);
  border: var(--border-width) solid var(--border-strong);
  box-shadow: var(--shadow-hard-lg);
  padding: 36px 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Background diagonal grid accent */
.hero-block::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content {
  width: 58%;
  z-index: 2;
  position: relative;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.caution-block {
  background: var(--accent-yellow);
  color: #000000;
  font-weight: 800;
  padding: 2px 7px;
  font-size: 8.5px;
  box-shadow: 2px 2px 0px #000;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -1.5px;
  font-weight: 800;
  margin: 16px 0 14px;
  color: var(--text-pure);
}

.highlight-lime {
  color: var(--accent-lime);
  text-shadow: 0 0 20px rgba(0, 245, 155, 0.25);
}

.hero-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: #b5bbcf;
  max-width: 520px;
  margin: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

/* BRUTAL BUTTONS */
.btn-brutal {
  border: var(--border-width) solid #000000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.8px;
  padding: 13px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: var(--shadow-hard);
}

.btn-primary {
  background: var(--accent-lime);
  color: #000000;
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px #000000;
}
.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #000000;
}

.arrow-icon { font-size: 15px; font-weight: 800; }

.hero-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}
.hazard-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-yellow);
  border-radius: 50%;
}

/* HERO DECOR & HUD */
.hero-decor {
  width: 36%;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.hud-box {
  background: #0b0c13;
  border: var(--border-width) solid var(--border-line);
  box-shadow: var(--shadow-hard);
  padding: 14px 16px;
  width: 280px;
}

.hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

.hud-code { color: var(--accent-coral); font-weight: 700; }

.hud-meter {
  height: 6px;
  background: #1e2233;
  border: 1px solid var(--border-line);
  margin: 10px 0 12px;
  overflow: hidden;
}
.hud-bar.red {
  background: var(--accent-coral);
  height: 100%;
}

.hud-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.hud-readout span { font-family: var(--font-mono); font-size: 8px; color: var(--text-dim); display: block; }
.hud-readout b { font-family: var(--font-mono); font-size: 11px; color: var(--text-pure); display: block; margin-top: 2px; }
.text-coral { color: var(--accent-coral) !important; }

/* STENCIL STICKERS */
.stencil-sticker {
  position: absolute;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-weight: 800;
  border: var(--border-width) solid #000000;
  box-shadow: 3px 3px 0px #000000;
  display: flex;
  flex-direction: column;
}
.stencil-sticker span { font-size: 10px; line-height: 1; }
.stencil-sticker small { font-size: 7.5px; opacity: 0.8; margin-top: 2px; }

.sticker-one {
  background: var(--accent-yellow);
  color: #000000;
  bottom: -14px;
  right: 180px;
  transform: rotate(-4deg);
}

.sticker-two {
  background: var(--accent-magenta);
  color: #ffffff;
  top: -12px;
  right: 10px;
  transform: rotate(3deg);
}

/* ==========================================================================
   STATS ROW (4 CARDS)
   ========================================================================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.stat-card {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-line);
  box-shadow: var(--shadow-hard);
  padding: 18px 20px;
  min-height: 134px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.stat-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-dim);
}
.stat-badge.alert { color: var(--accent-coral); font-weight: 700; }

.stat-figure {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0;
}

.stat-figure > span {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--text-pure);
}

.stat-figure small {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.stat-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.spark-bars {
  height: 18px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.spark-bars i {
  width: 4px;
  background: var(--accent-cyan);
}

.stat-alert {
  border-color: rgba(255, 42, 85, 0.4);
  background: #140d12;
}

.tag-alert {
  background: var(--accent-coral);
  color: #000000;
  font-weight: 800;
  padding: 2px 6px;
  font-size: 8px;
  box-shadow: 2px 2px 0px #000;
}

.tag-info {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  padding: 2px 6px;
  font-size: 8px;
  font-weight: 700;
}

.tag-dim {
  background: #1f2333;
  color: var(--text-dim);
  padding: 2px 6px;
  font-size: 8px;
}

/* ==========================================================================
   FLEET SECTION & FILTER CONTROLS
   ========================================================================== */
.section-container {
  margin-top: 44px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: var(--border-width) solid var(--border-line);
}

.section-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--accent-lime);
  display: block;
  margin-bottom: 4px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  color: var(--text-pure);
}

.filter-controls {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-line);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
  transition: all 0.12s ease;
}

.filter-btn:hover {
  color: var(--text-pure);
  border-color: var(--border-strong);
}

.filter-btn.active {
  background: var(--text-pure);
  color: #000000;
  border-color: #000000;
}

.filter-btn.critical.active { background: var(--accent-coral); color: #000000; border-color: #000000; }
.filter-btn.warning.active { background: var(--accent-yellow); color: #000000; border-color: #000000; }
.filter-btn.healthy.active { background: var(--accent-lime); color: #000000; border-color: #000000; }

/* MACHINE CARDS GRID */
.machine-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.m-card {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-line);
  box-shadow: var(--shadow-hard);
  padding: 18px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.m-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--border-strong);
  box-shadow: 6px 6px 0px #000000;
}

.m-card.active-selected {
  border-color: var(--accent-lime);
  background: #111520;
  box-shadow: 6px 6px 0px var(--accent-lime);
}

.m-card.active-selected::before {
  content: "SELECTED ASSET";
  position: absolute;
  top: -11px;
  right: 14px;
  background: var(--accent-lime);
  color: #000000;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  padding: 2px 7px;
  border: var(--border-width) solid #000000;
  box-shadow: 2px 2px 0px #000000;
}

.m-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.m-icon {
  width: 38px;
  height: 38px;
  border: var(--border-width) solid #000000;
  box-shadow: 2px 2px 0px #000000;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.m-icon.critical { background: var(--accent-coral); color: #000000; }
.m-icon.warning { background: var(--accent-yellow); color: #000000; }
.m-icon.healthy { background: var(--accent-lime); color: #000000; }

.status-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 4px 8px;
  border: var(--border-width) solid #000000;
  box-shadow: 2px 2px 0px #000000;
}
.status-badge.Critical { background: var(--accent-coral); color: #000000; }
.status-badge.Warning { background: var(--accent-yellow); color: #000000; }
.status-badge.Healthy { background: var(--accent-lime); color: #000000; }

.m-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-pure);
  margin: 14px 0 4px;
}

.m-subline {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.m-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: var(--border-width) solid var(--border-line);
}

.t-col span {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  display: block;
}

.t-col b {
  font-family: var(--font-mono);
  font-size: 12.5px;
  display: block;
  margin-top: 3px;
  color: var(--text-main);
}

.t-col b.hot {
  color: var(--accent-coral);
  font-weight: 800;
}

.m-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-dim);
}

.m-inspect-cta {
  color: var(--accent-lime);
  font-weight: 700;
}

/* ==========================================================================
   INVESTIGATION WORKSPACE (2 PANELS)
   ========================================================================== */
.investigation-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
  align-items: stretch;
}

.panel-brutal {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-line);
  box-shadow: var(--shadow-hard-lg);
  padding: 24px 26px;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: var(--border-width) solid var(--border-line);
  margin-bottom: 18px;
}

.panel-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0;
  color: var(--text-pure);
}

.panel-tag {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 1px;
  background: #1d2133;
  color: var(--accent-cyan);
  padding: 4px 8px;
  border: 1px solid var(--accent-cyan);
}

.panel-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}

.case-status-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  padding: 4px 10px;
  border: var(--border-width) solid #000000;
  box-shadow: 2px 2px 0px #000000;
  background: #24293e;
  color: var(--text-muted);
}
.case-status-badge.CRITICAL { background: var(--accent-coral); color: #000000; }
.case-status-badge.HIGH { background: var(--accent-magenta); color: #ffffff; }
.case-status-badge.MODERATE { background: var(--accent-yellow); color: #000000; }
.case-status-badge.LOW { background: var(--accent-lime); color: #000000; }

/* FORMS & INPUTS */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}
.form-group label span { color: var(--text-dim); font-weight: 400; margin-left: 6px; }

.input-brutal {
  width: 100%;
  background: #0b0d14;
  border: var(--border-width) solid var(--border-line);
  color: var(--text-main);
  padding: 12px 14px;
  font-family: var(--font-display);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 2px 2px 0px #000000;
}

.input-brutal:focus {
  border-color: var(--accent-lime);
  box-shadow: inset 2px 2px 0px #000000, 0 0 10px rgba(0, 245, 155, 0.2);
}

.textarea-brutal {
  resize: vertical;
  line-height: 1.6;
}

/* PRESETS */
.preset-group {
  margin-bottom: 22px;
}

.preset-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-dim);
  letter-spacing: 0.8px;
  display: block;
  margin-bottom: 8px;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-preset {
  background: #141724;
  border: 1px solid var(--border-line);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.chip-preset:hover {
  background: #1f2336;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-full {
  width: 100%;
  justify-content: space-between;
  padding: 15px 20px;
  font-size: 13px;
}

.safety-advisory {
  display: flex;
  gap: 10px;
  background: #141117;
  border: var(--border-width) solid rgba(255, 234, 0, 0.3);
  padding: 12px 14px;
  margin-top: 18px;
}

.advisory-icon {
  color: var(--accent-yellow);
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.advisory-text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}
.advisory-text b { color: var(--accent-yellow); font-family: var(--font-mono); font-size: 10px; }

/* ==========================================================================
   REPORT & EMPTY STATE
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 44px 20px;
}

.reticle-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-lime);
  font-family: var(--font-mono);
  font-size: 18px;
  margin-bottom: 16px;
}

.reticle-center {
  width: 54px;
  height: 54px;
  border: var(--border-width) dashed var(--accent-lime);
  display: grid;
  place-items: center;
  font-size: 24px;
}

.empty-state h4 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-pure);
  margin: 0 0 8px;
}

.empty-state p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.empty-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pipe-step {
  background: #0c0d14;
  border: 1px solid var(--border-line);
  padding: 6px 10px;
  text-align: center;
}
.pipe-step span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-lime);
  display: block;
}
.pipe-step small {
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.pipe-arrow { color: var(--text-dim); font-size: 12px; }

/* REPORT CONTENT BLOCKS */
.dossier-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.dossier-header-meta .dossier-target {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent-cyan);
}

.risk-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 4px;
}

.risk-val {
  font-family: var(--font-heading);
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
}

.risk-denom {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.risk-meter-container {
  height: 8px;
  background: #000000;
  border: var(--border-width) solid var(--border-line);
  margin: 10px 0 18px;
}

.risk-meter-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.dossier-section {
  padding: 18px 0;
  border-top: var(--border-width) solid var(--border-line);
}

.dossier-section h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--accent-lime);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assessment-text {
  font-size: 12.5px;
  line-height: 1.8;
  color: #cfd4e6;
  background: #0c0d15;
  border: 1px solid var(--border-line);
  padding: 16px;
  border-left: 4px solid var(--accent-lime);
}

.assessment-text h3 {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--accent-lime);
  margin: 16px 0 6px;
}
.assessment-text h3:first-child { margin-top: 0; }
.assessment-text strong { color: var(--text-pure); }

/* HYPOTHESES CARDS */
.hypo-grid {
  display: grid;
  gap: 8px;
}

.hypo-card {
  background: #0d0f17;
  border: 1px solid var(--border-line);
  padding: 12px 14px;
  box-shadow: 2px 2px 0px #000000;
}

.hypo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.hypo-head b { font-size: 12.5px; color: var(--text-pure); }

.match-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  background: var(--accent-lime-dim);
  color: var(--accent-lime);
  border: 1px solid var(--accent-lime);
  padding: 2px 6px;
}

.hypo-card p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* FINDINGS & EVIDENCE */
.finding-item {
  font-size: 11.5px;
  line-height: 1.6;
  padding: 10px 14px;
  background: #0d0f17;
  border: 1px solid var(--border-line);
  border-left: 4px solid var(--accent-coral);
  margin-bottom: 8px;
}

.finding-item.history { border-left-color: var(--accent-cyan); }
.finding-item.symptom { border-left-color: var(--accent-yellow); }

/* TECHNICIAN ACTION CHECKLIST */
.checklist-wrapper {
  display: grid;
  gap: 8px;
}

.chk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #0d0f17;
  border: var(--border-width) solid var(--border-line);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chk-item:hover {
  background: #141724;
  border-color: var(--border-strong);
}

.chk-item.checked {
  background: #0f1d17;
  border-color: var(--accent-lime);
}

.chk-item.checked .action-title {
  text-decoration: line-through;
  color: var(--text-dim);
}

.chk-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-lime);
  cursor: pointer;
}

.action-title {
  font-size: 12px;
  flex: 1;
  color: var(--text-main);
}

.loto-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  background: var(--accent-coral);
  color: #000000;
  padding: 3px 6px;
  box-shadow: 2px 2px 0px #000000;
  letter-spacing: 0.5px;
}

/* ACTION TOOLBAR */
.dossier-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: var(--border-width) solid var(--border-line);
}

.btn-secondary {
  background: #151826;
  border: var(--border-width) solid var(--border-line);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
  transition: all 0.12s ease;
}

.btn-secondary:hover {
  background: #1e2236;
  border-color: var(--border-strong);
  color: var(--text-pure);
}

.btn-signoff {
  background: var(--accent-lime);
  color: #000000;
  border: var(--border-width) solid #000000;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  margin-left: auto;
  box-shadow: var(--shadow-hard-sm);
}

.btn-signoff:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px #000000;
}

/* PROVENANCE NOTICE */
.provenance-card {
  margin-top: 16px;
  padding: 12px 14px;
  border: var(--border-width) solid var(--accent-yellow);
  background: #141117;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--accent-yellow);
}

.provenance-card.live {
  border-color: var(--accent-lime);
  background: #0d1612;
  color: var(--accent-lime);
}

.provenance-disclaimer {
  display: block;
  font-size: 8.5px;
  opacity: 0.75;
  margin-top: 6px;
  color: var(--text-muted);
}

/* ==========================================================================
   AUDIT TRAIL PIPELINE
   ========================================================================== */
.audit-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--accent-yellow);
  border: 1px solid var(--accent-yellow);
  padding: 4px 8px;
}

.audit-grid {
  display: grid;
  grid-template-columns: 1fr 24px 1fr 24px 1fr 24px 1fr;
  align-items: center;
  gap: 8px;
}

.audit-step {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-line);
  box-shadow: var(--shadow-hard);
  padding: 20px 18px;
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

.step-num {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
}

.step-icon {
  width: 36px;
  height: 36px;
  border: var(--border-width) solid #000000;
  box-shadow: 2px 2px 0px #000;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
}

.bg-cyan { background: var(--accent-cyan); color: #000; }
.bg-pink { background: var(--accent-magenta); color: #fff; }
.bg-yellow { background: var(--accent-yellow); color: #000; }
.bg-mint { background: var(--accent-lime); color: #000; }
.bg-coral { background: var(--accent-coral); color: #000; }

.audit-step h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 14px 0 6px;
  color: var(--text-pure);
}

.audit-step p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.step-meta {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-top: 12px;
}

.step-connector {
  text-align: center;
  color: var(--text-dim);
  font-size: 18px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: var(--border-width) solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  flex-direction: column;
}
.footer-logo {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-pure);
}
.footer-track {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-dim);
  margin-top: 2px;
}

.footer-barcode {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--border-strong);
}

.footer-right {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

/* ==========================================================================
   TOAST COMPONENT
   ========================================================================== */
.toast-brutal {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  background: #000000;
  color: #ffffff;
  border: var(--border-width) solid var(--accent-lime);
  box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.8);
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  display: none;
  z-index: 1000;
}
.toast-brutal.show { display: block; animation: brutalSlideIn 0.15s ease-out; }

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

.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ==========================================================================
   ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
  .app-layout { grid-template-columns: 230px 1fr; }
  .main-viewport { padding: 0 24px 36px; }
  .machine-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-grid { grid-template-columns: 1fr 16px 1fr; }
  .audit-step:nth-of-type(3) { grid-column: 1; }
  .audit-step:nth-of-type(4) { grid-column: 3; }
  .step-connector:nth-of-type(4) { display: none; }
}

@media (max-width: 860px) {
  .app-layout { display: block; }
  .sidebar { position: relative; height: auto; padding: 16px; }
  .sidebar-section, .nav-stack, .sidebar-footer { display: none; }
  .main-viewport { padding: 0 16px 30px; }
  .hero-block { flex-direction: column; padding: 24px 20px; }
  .hero-content { width: 100%; }
  .hero-decor { display: none; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .investigation-layout { grid-template-columns: 1fr; }
  .machine-cards-grid { grid-template-columns: 1fr; }
  .audit-grid { grid-template-columns: 1fr; gap: 8px; }
  .step-connector { display: none !important; }
  .app-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-barcode { display: none; }
}
