/* public/dashboard/css/neo-pulp.css */

/* ─────────────────────────────────────────────────────────────
   TOKENS & THEMING
   ───────────────────────────────────────────────────────────── */
:root {
  color-scheme: light; /* Pulp is light paper by default */

  /* ── Core Palette (Retro Sci-Fi Pulp) ── */
  --np-bg: #0b0f14; /* Void */
  --np-text: #0c0e12; /* Ink */
  --np-muted: rgba(12, 14, 18, 0.65);

  /* Brand Accents */
  --np-amber: #f5c400; /* Pulp Yellow */
  --np-amber-2: #ff6a2a; /* Pulp Orange */
  --np-green: #25c7c7; /* Sci-Fi Teal */

  /* Surfaces */
  --np-surface: #f5ebd6; /* Paper */
  --np-surface-2: #e8dbbe; /* Darker Paper */

  /* Borders / Depth */
  --np-border: #0c0e12; /* Ink */
  --np-border-2: #0c0e12;
  --np-shadow: #0c0e12;

  /* Radii + Spacing */
  --np-r-lg: 0px; /* Hard angles for comic style */
  --np-r-md: 0px;
  --np-pad: 20px;
  --np-gap: 20px;

  /* ── pc-* Control Surface Primitives ── */
  --pc-bg: #0b0f14; /* Outer void */
  --pc-panel: #f5ebd6; /* Paper cards */
  /* pc-text defaults to INK for panels, but we need VOID variants */
  --pc-text: #0c0e12; /* Ink text (on paper) */
  --pc-text-void: #f5ebd6; /* Paper text (on void) */
  --pc-muted: rgba(12, 14, 18, 0.65);
  --pc-muted-void: rgba(245, 235, 214, 0.5);

  --pc-accent: #25c7c7; /* Teal */
  --pc-accent-2: #f5c400; /* Yellow */
  --pc-warn: #ff6a2a; /* Orange */
  --pc-err: #e03131; /* Red */

  /* Spacing */
  --pc-gap: 20px;
  --pc-pad: 20px;
  --pc-hd-h: 54px;

  /* Radii */
  --pc-r-md: 0px;
  --pc-r-sm: 0px;

  /* Borders & Effects */
  --pc-border-w: 3px; /* Thick comic ink */
  --pc-shadow-hard: 6px 6px 0px 0px #0c0e12; /* Brutalist shadow */

  /* OLED Specifics */
  --oled-bg: #030303;
  --oled-accent: #25c7c7;
  --oled-grid: rgba(37, 199, 199, 0.08);
  --oled-glass: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);

  /* Range Slider / Analog Knobs */
  --pc-slider-track: #0c0e12;
  --pc-slider-thumb: #f5c400;
  --pc-slider-glow: rgba(245, 196, 0, 0.3);
}

/* ─────────────────────────────────────────────────────────────
   GLOBAL TAILWIND RESETS (Aggressive Overrides)
   ───────────────────────────────────────────────────────────── */
body.np { color: var(--pc-text-void); }

/* Typography */
body.np h1, body.np h2, body.np h3, body.np .text-white { color: var(--pc-text-void) !important; }
body.np .text-gray-100, body.np .text-gray-200, body.np .text-gray-300 { color: var(--pc-text-void) !important; }
body.np .text-gray-400, body.np .text-gray-500, body.np .text-gray-600 { color: var(--pc-muted-void) !important; }

/* Status Colors */
body.np .text-green-400, body.np .text-emerald-400, body.np .text-green-500 { color: var(--pc-accent) !important; }
body.np .text-red-400, body.np .text-red-500, body.np .text-rose-500 { color: var(--pc-err) !important; }
body.np .text-amber-400, body.np .text-yellow-400, body.np .text-orange-400 { color: var(--pc-accent-2) !important; }

/* Backgrounds */
body.np .bg-gray-800, body.np .bg-gray-900, body.np .bg-gray-950 { background-color: var(--pc-bg) !important; }
body.np .bg-white\/5, body.np .bg-white\/10 { background-color: rgba(245, 235, 214, 0.05) !important; }

/* Borders */
body.np .border-gray-800, body.np .border-white\/5, body.np .border-white\/10 { border-color: rgba(12, 14, 18, 0.4) !important; }

/* REVERSE: Reset for anything inside a pc-panel (Paper) */
/* We MUST exclude OLED/PIP/Log-Feed from this black-text rule */
body.np .pc-panel h1:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *), 
body.np .pc-panel h2:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *), 
body.np .pc-panel h3:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *),
body.np .pc-panel h4:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *),
body.np .pc-panel p:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *),
body.np .pc-panel div:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *),
body.np .pc-panel span:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *),
body.np .pc-panel label:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *),
body.np .pc-panel .text-white:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *),
body.np .pc-panel .text-gray-100:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *),
body.np .pc-panel .text-gray-200:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *),
body.np .pc-panel .text-gray-300:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *):not(.pc-dymo):not(.m-stamp):not(.m-stamp *) { 
  color: var(--pc-text) !important; 
}

body.np .pc-panel .pc-text-muted:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *),
body.np .pc-panel .text-white\/40:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *),
body.np .pc-panel .text-white\/50:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *),
body.np .pc-panel .text-gray-400:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *), 
body.np .pc-panel .text-gray-500:not(.pc-oled *):not(.pc-pip *):not(.pc-log-feed *) { 
  color: var(--pc-muted) !important; 
}

/* OLED & PIP Specificity Override */
body.np .pc-oled, body.np .pc-pip,
body.np .pc-oled *, body.np .pc-pip * {
  color: var(--oled-accent) !important;
  border-color: rgba(37, 199, 199, 0.2) !important;
}

body.np .pc-oled [class*="text-gray-"],
body.np .pc-pip [class*="text-gray-"] {
  color: var(--oled-accent) !important;
  opacity: 0.6 !important;
}

/* ─────────────────────────────────────────────────────────────
   GLOBAL & LAYOUT
   ───────────────────────────────────────────────────────────── */

body.np {
  background-color: var(--pc-bg);
  background-image: radial-gradient(rgba(37, 199, 199, 0.15) 1.5px, transparent 0);
  background-size: 24px 24px;
  background-attachment: fixed;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* Paper Texture Overlay */
body.np::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("https://www.transparenttextures.com/patterns/cardboard-flat.png");
  opacity: 0.05;
  z-index: 100;
  mix-blend-mode: multiply;
}

.pc-page {
  max-width: 1400px;
  margin: 0 auto;
}





/* ─────────────────────────────────────────────────────────────
   LEGACY COMPATIBILITY (np-*)
   Removed during Control Room refactor.
   ───────────────────────────────────────────────────────────── */


/* ─────────────────────────────────────────────────────────────
   CORE COMPONENTS (pc-*)
   Canonical definitions.
   ───────────────────────────────────────────────────────────── */

/* -- Panel (Premium Refinement) -- */
.pc-panel {
  position: relative;
  background: var(--pc-panel);
  border: var(--pc-border-w) solid var(--np-border);
  box-shadow: var(--pc-shadow-hard);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease;
}

/* Premium Detail: Rivets in the corners */
.pc-panel::before, .pc-panel::after {
  content: "•";
  position: absolute;
  font-size: 14px;
  color: var(--np-border);
  opacity: 0.2;
  line-height: 1;
  z-index: 5;
}
.pc-panel::before { top: 6px; left: 8px; }
.pc-panel::after { top: 6px; right: 8px; }

.pc-panel-hd {
  padding: 12px 20px;
  background: var(--pc-surface-2); /* Muted paper instead of loud yellow */
  border-bottom: var(--pc-border-w) solid var(--np-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  min-height: 54px;
}

/* Strategic yellow accent stripe */
.pc-panel-hd::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 6px;
  background: var(--pc-accent-2);
}

.pc-panel-bd {
  padding: var(--pc-pad);
  flex: 1;
  position: relative;
}

/* -- Typography -- */
.pc-panel-title {
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pc-text);
}

.pc-panel-sub {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--pc-muted);
}

.pc-muted {
  color: var(--pc-muted);
}

.pc-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.34);
  border-radius: var(--pc-r-sm);
  color: rgba(255, 255, 255, 0.86);
}


/* -- Buttons (Neo-Pulp) -- */
.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: var(--pc-border-w) solid var(--np-border);
  background: var(--pc-panel);
  color: var(--pc-text) !important; /* Default to dark text for buttons */
  border-radius: var(--pc-r-sm);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  box-shadow: 4px 4px 0px 0px var(--np-border);
  transition: transform 0.1s, box-shadow 0.1s;
  white-space: nowrap;
}

/* GHOST BUTTONS on Dark Background */
body.np .pc-btn--ghost {
  background: transparent;
  color: var(--pc-text-void) !important;
  border-color: var(--pc-text-void);
  box-shadow: none;
}

body.np .pc-btn--ghost:hover {
  background: var(--pc-panel);
  color: var(--pc-text) !important;
  border-style: solid;
  border-color: var(--np-border);
  box-shadow: 4px 4px 0px 0px var(--np-border);
}

/* REVERSE: Ghost buttons inside panels should be dark */
body.np .pc-panel .pc-btn--ghost {
  color: var(--pc-text) !important;
  border-color: var(--np-border);
}

.pc-btn:hover {
  background: var(--pc-accent-2);
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0px 0px var(--np-border);
}

.pc-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px 0px var(--np-border);
}

/* Primary */
.pc-btn-primary,
.pc-btn--primary {
  background: var(--pc-accent);
  color: var(--pc-text);
}

.pc-btn-primary:hover,
.pc-btn--primary:hover {
  background: #3cf3f3; /* Brighter teal on hover */
}

/* Ghost */
.pc-btn-ghost,
.pc-btn--ghost {
  background: transparent;
  box-shadow: none;
  border: var(--pc-border-w) dashed var(--np-border);
}

.pc-btn-ghost:hover,
.pc-btn--ghost:hover {
  background: var(--pc-panel);
  border-style: solid;
  box-shadow: 4px 4px 0px 0px var(--np-border);
}

/* Danger */
.pc-btn-danger,
.pc-btn--danger {
  background: var(--pc-err);
  color: white;
}


/* -- Inputs -- */
.pc-input {
  width: 100%;
  background: #ffffff;
  border: var(--pc-border-w) solid var(--np-border);
  border-radius: var(--pc-r-sm);
  color: var(--pc-text);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  box-shadow: inset 2px 2px 0px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}

.pc-input:focus {
  background: #ffffff;
  box-shadow: 4px 4px 0px 0px var(--pc-accent);
  transform: translate(-2px, -2px);
}


/* -- Chips / Badges -- */
.pc-chip,
.pc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 0px;
  border: 2px solid var(--np-border);
  background: var(--pc-accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pc-text);
  box-shadow: 2px 2px 0px 0px var(--np-border);
}

.pc-chip.is-active,
.pc-badge.is-online {
  background: var(--pc-accent);
  color: white;
}


/* ─────────────────────────────────────────────────────────────
   OLED & CHARTS
   ───────────────────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────────────────
   OLED / READOUTS (Comic Book Radar/Terminal)
   ───────────────────────────────────────────────────────────── */
.pc-oled {
  position: relative;
  background: #020603 !important;
  border: 6px solid #1c2e1f;
  border-radius: var(--pc-r-md);
  box-shadow: 
    0 12px 28px rgba(0,0,0,0.6),
    inset 0 0 45px rgba(0,0,0,0.95),
    inset 0 0 15px rgba(37,255,117,0.15);
  overflow: hidden;
  color: #25ff75 !important;
  font-family: 'Share Tech Mono', monospace;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}

/* Glass Vignette & Lens Flare Reflection */
.pc-oled::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at center, rgba(37, 255, 117, 0.05) 0%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 20%, transparent 45%);
  z-index: 10;
  opacity: 0.9;
}

/* Moving Raster Scanlines & Flicker */
.pc-oled::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    repeating-linear-gradient(0deg, rgba(37, 255, 117, 0.06) 0px, rgba(37, 255, 117, 0.06) 1px, transparent 1px, transparent 4px),
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px, 100% 8px;
  z-index: 9;
  opacity: 0.85;
  animation: pc-raster-scroll 18s linear infinite, pc-flicker 0.2s infinite;
}

@keyframes pc-raster-scroll {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 -100px, 0 100%; }
}

@keyframes pc-flicker {
  0% { opacity: 0.83; }
  5% { opacity: 0.80; }
  10% { opacity: 0.84; }
  15% { opacity: 0.81; }
  20% { opacity: 0.83; }
  25% { opacity: 0.85; }
  30% { opacity: 0.82; }
  100% { opacity: 0.84; }
}

/* Phosphor Glow Text Styling */
.pc-oled .pc-text-main,
.pc-oled h1,
.pc-oled h2,
.pc-oled h3,
.pc-oled .text-2xl,
.pc-oled .text-xl {
  color: #25ff75 !important;
  text-shadow: 
    0 0 4px rgba(37, 255, 117, 0.7),
    0 0 12px rgba(37, 255, 117, 0.35);
  filter: brightness(1.2);
}

.pc-oled .pc-text-muted,
.pc-oled .text-gray-500,
.pc-oled .text-gray-400 {
  color: rgba(37, 255, 117, 0.65) !important;
  text-shadow: 0 0 2px rgba(37, 255, 117, 0.3);
  opacity: 0.75;
}

/* Custom blip cursor */
.pc-terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: #25ff75;
  box-shadow: 0 0 6px #25ff75;
  margin-left: 2px;
  animation: pc-cursor-blink 1s step-end infinite;
  vertical-align: middle;
}

@keyframes pc-cursor-blink {
  from, to { background-color: transparent; box-shadow: none; }
  50% { background-color: #25ff75; box-shadow: 0 0 6px #25ff75; }
}

.pc-chart-viewport {
  position: relative;
  border-radius: var(--pc-r-md);
  border: 1px solid rgba(37, 199, 199, 0.15);
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.pc-chart-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, var(--pc-grid-a)) 0, rgba(255, 255, 255, var(--pc-grid-a)) 1px, transparent 1px, transparent 42px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, var(--pc-grid-a)) 0, rgba(255, 255, 255, var(--pc-grid-a)) 1px, transparent 1px, transparent 28px);
  mix-blend-mode: overlay;
}


/* ─────────────────────────────────────────────────────────────
   INTEGRATIONS BAY
   ───────────────────────────────────────────────────────────── */
/* Integration Cards (Modules) */
.pc-int {
  background: var(--pc-surface-2);
  border: var(--pc-border-w) solid var(--np-border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pc-int:hover {
  transform: translateY(-4px);
  box-shadow: 4px 4px 0px 0px var(--np-border);
}

.pc-int--ok { border-color: var(--pc-accent); }
.pc-int--warn { border-color: var(--pc-warn); }
.pc-int--bad { border-color: var(--pc-err); }

.pc-int .pc-int-status {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pc-int:hover {
  background: rgba(255, 255, 255, 0.04);
}

.pc-int--ok {
  border-color: rgba(57, 255, 182, 0.3);
}

.pc-int--warn {
  border-color: rgba(255, 201, 64, 0.5);
}

.pc-int--bad {
  border-color: rgba(255, 90, 90, 0.5);
}

.pc-int--link {
  border-style: dashed;
  opacity: 0.6;
}

.pc-int-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
}

.pc-int-ico {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: bold;
}


.pc-bay-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─────────────────────────────────────────────────────────────
   ROCKER SWITCHES: Integration Cards (base — all themes)
   ───────────────────────────────────────────────────────────── */
.pc-rocker-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}

.pc-rocker-form {
  display: contents;
}

.pc-rocker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 36px;
  height: 64px;
  background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 100%);
  border: 2px solid #111;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 3px 0 #0a0a0a,
    0 4px 8px rgba(0,0,0,0.5);
  transition: box-shadow 0.1s ease, transform 0.1s ease;
  overflow: hidden;
  flex-shrink: 0;
}

.pc-rocker--disabled {
  cursor: default;
  opacity: 0.4;
  pointer-events: none;
}

.pc-rocker-paddle {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 50%;
  border-radius: 3px;
  transition:
    top 0.15s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.15s ease,
    box-shadow 0.15s ease;
}

/* ON state — paddle at top, green glow */
.pc-rocker--on {
  border-color: #005a30;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 3px 0 #0a0a0a,
    0 4px 8px rgba(0,0,0,0.5),
    0 0 10px rgba(0, 255, 159, 0.4);
}

.pc-rocker--on .pc-rocker-paddle {
  top: 3px;
  background: linear-gradient(180deg, #00ff9f 0%, #00cc7a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 0 8px rgba(0, 255, 159, 0.6),
    0 0 16px rgba(0, 255, 159, 0.3);
}

/* OFF state — paddle at bottom, red glow */
.pc-rocker--off {
  border-color: #5a0000;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 3px 0 #0a0a0a,
    0 4px 8px rgba(0,0,0,0.5),
    0 0 8px rgba(255, 40, 40, 0.3);
}

.pc-rocker--off .pc-rocker-paddle {
  top: 50%;
  background: linear-gradient(180deg, #c8c0b0 0%, #a09888 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.2),
    0 1px 3px rgba(0,0,0,0.4);
}

/* Press effect */
.pc-rocker:not(.pc-rocker--disabled):active {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 1px 0 #0a0a0a,
    0 2px 4px rgba(0,0,0,0.5);
  transform: translateY(2px);
}

/* ─────────────────────────────────────────────────────────────
   PREMIUM PANELS (Studio / Scrapbot)
   ───────────────────────────────────────────────────────────── */
.pc-panel--premium {
  border-color: rgba(85, 214, 255, 0.35);
  background:
    radial-gradient(circle at 90% 10%, rgba(85, 214, 255, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(85, 214, 255, 0.05), transparent 40%),
    rgba(10, 14, 20, 0.95);
}

.pc-panel--premium-studio {
  background:
    radial-gradient(circle at 80% 0%, rgba(139, 92, 246, 0.15), transparent 50%),
    rgba(20, 15, 30, 0.95);
  border-color: rgba(139, 92, 246, 0.35);
}

/* Premium Mini OLED */
.pc-mini-oled {
  position: relative;
  background: #020603 !important;
  border: 3px solid #1c2e1f;
  border-radius: var(--pc-r-sm);
  padding: 12px;
  overflow: hidden;
  color: #25ff75 !important;
  font-family: 'Share Tech Mono', monospace;
  box-shadow: 
    0 4px 10px rgba(0,0,0,0.4),
    inset 0 0 25px rgba(0,0,0,0.9),
    inset 0 0 8px rgba(37,255,117,0.1);
}

.pc-mini-oled::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(37, 255, 117, 0.03) 0%, rgba(0, 0, 0, 0.45) 100%);
  z-index: 10;
  opacity: 0.9;
}

.pc-mini-oled::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(37, 255, 117, 0.04) 0px, rgba(37, 255, 117, 0.04) 1px, transparent 1px, transparent 4px);
  background-size: 100% 4px;
  z-index: 9;
  opacity: 0.85;
}

.pc-mini-oled .pc-text-main,
.pc-mini-oled .font-mono,
.pc-mini-oled .text-sm,
.pc-mini-oled .text-purple-200,
.pc-mini-oled .text-cyan-200 {
  color: #25ff75 !important;
  text-shadow: 0 0 3px rgba(37, 255, 117, 0.6);
}

.pc-mini-oled .pc-text-muted,
.pc-mini-oled .text-gray-400,
.pc-mini-oled .text-gray-500 {
  color: rgba(37, 255, 117, 0.6) !important;
  text-shadow: none;
  opacity: 0.7;
}

/* Scrapbot Visuals */
.pc-bot-outline {
  color: #333;
  transition: all 0.3s;
}

.pc-bot--red {
  color: var(--pc-err);
  filter: drop-shadow(0 0 5px rgba(255, 50, 50, 0.3));
}

.pc-bot--green {
  color: var(--pc-accent-2);
  filter: drop-shadow(0 0 5px rgba(57, 255, 182, 0.3));
}

.pc-bot--amber {
  color: var(--pc-warn);
  filter: drop-shadow(0 0 5px rgba(255, 200, 50, 0.3));
}

.pc-bot--blue {
  color: var(--pc-accent);
  filter: drop-shadow(0 0 5px rgba(85, 214, 255, 0.3));
}

.pc-bot--purple {
  color: #a855f7;
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.3));
}

.pc-bot--cyan {
  color: #06b6d4;
  filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.3));
}


.pc-bot-pulse {
  animation: pc-pulse 2s infinite;
}

@keyframes pc-pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
  }
}

/* Armed Pips (Grid) */
.pc-armed-pips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.pc-pip {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px 8px;
  border-radius: 4px;
}

.pc-pip .k {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--pc-muted);
  margin-bottom: 2px;
}

.pc-pip .v {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-family: monospace;
  color: var(--pc-text);
}

.pc-pip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Profile URL Input */
.pc-profile-url-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--pc-accent);
  font-family: monospace;
  font-size: 13px;
  padding: 8px 12px;
  cursor: pointer;
}

.pc-profile-url-input:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}


/* ─────────────────────────────────────────────────────────────
   UTILITIES
   ───────────────────────────────────────────────────────────── */
.pc-rowlist {
  display: grid;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--pc-r-md);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}

.pc-rowitem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pc-rowitem:last-child {
  border-bottom: none;
}

.pc-rowitem:hover {
  background: rgba(85, 214, 255, 0.06);
}

.pc-loader {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.70);
  font-size: 12px;
}

.pc-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--pc-accent);
  animation: pcspin 0.9s linear infinite;
}

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

/* Text Utilities */
.pc-text-main {
  color: var(--pc-text);
}

.pc-text-muted {
  color: var(--pc-muted);
}

.pc-text-dim {
  color: rgba(255, 255, 255, 0.35);
}

.pc-text-accent {
  color: var(--pc-accent);
}

.pc-text-warn {
  color: var(--pc-warn);
}

.pc-text-err {
  color: var(--pc-err);
}

/* Icon Box (Hardware Style) */
.pc-icon-box {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--pc-r-md);
  color: var(--pc-muted);
  font-size: 24px;
  transition: all 0.2s;
}

.group:hover .pc-icon-box {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--pc-text);
  transform: scale(1.05);
}

/* Scrollbars */
.pc-panel *::-webkit-scrollbar,
.pc-oled::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.pc-panel *::-webkit-scrollbar-track,
.pc-oled::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.34);
  border-radius: 999px;
}

.pc-panel *::-webkit-scrollbar-thumb,
.pc-oled::-webkit-scrollbar-thumb {
  background: rgba(85, 214, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
}

/* ─────────────────────────────────────────────────────────────
   READOUT TUNING (Quick Status, OLED blocks)
   CSS-only, no markup changes required
   ───────────────────────────────────────────────────────────── */

.pc-readout {
  padding: 14px 16px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

/* Kill “muddy Tailwind gray” inside readouts only */
.pc-readout .text-gray-500,
.pc-readout .text-gray-400,
.pc-readout .text-gray-400\/80,
.pc-readout .text-gray-500\/80,
.pc-readout .text-gray-300 {
  color: var(--pc-muted) !important;
}

/* The top label line (“WIDGETS / OVERLAYS / PROFILE”) */
.pc-readout > .text-xs {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--pc-muted);
  opacity: 0.95;
}

/* Make the primary value actually read like a primary value */
.pc-readout .text-2xl {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.02em;
}

/* Your little secondary note lines */
.pc-readout .text-xs {
  line-height: 1.2;
}

/* Chips in readouts: reduce “puffy pill” effect slightly */
.pc-readout .pc-chip {
  padding: 4px 9px;
  font-size: 10px;
  letter-spacing: 0.14em;
  align-self: flex-end;
}

/* Don’t let the internal flex row squash text */
.pc-readout .flex.items-end.justify-between {
  align-items: flex-start;
  gap: 14px;
}


/* ─────────────────────────────────────────────────────────────
   CONTROL ROOM — SINGLE SOURCE OF TRUTH
   (All Control Room overrides live here. No duplicates elsewhere.)
   ───────────────────────────────────────────────────────────── */
html[data-theme="control-room"] {
  /* Tokens: Readable light text, neutral black chassis */
  --pc-text: rgba(255, 255, 255, 0.92);
  --pc-muted: rgba(255, 255, 255, 0.60);
  --pc-panel: #161b24;
  /* Lighter chassis for pop */
  --pc-bg: #030303;
  /* Deep black bg */

  --cr-chassis: #161920;
  --cr-bolt-inset: 12px;
  --cr-bolt-head: rgba(255, 255, 255, 0.35);
  --cr-bolt-shadow: rgba(0, 0, 0, 0.8);

  /* Neon Accents (Cyan/Green) */
  --pc-accent: #00f3ff;
  --pc-accent-2: #0aff60;
  --pc-warn: #ffcc00;
  --pc-err: #ff3333;

  /* Geometry Overrides */
  --pc-r-md: 6px;
  /* Tighter radius for hardware feel */
  --pc-r-sm: 4px;
  --pc-border-a: 0.25;
}

/* Background Override (Flat for now) */
html[data-theme="control-room"] body.np {
  background: var(--pc-bg);
  color: var(--pc-text);
}

/* ── PANEL CHASSIS (CONTROL ROOM) ───────────────────────────────
   IMPORTANT RULE:
   - DO NOT set box-shadow on html[data-theme="control-room"] .pc-panel
     (let the base .pc-panel hardware shadow win)
----------------------------------------------------------------- */
html[data-theme="control-room"] .pc-panel {
  /* Keep base geometry + depth */
  border-radius: var(--pc-r-md);

  /* Keep the base "panel sheen" instead of flat fill */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 26%),
    var(--pc-panel);

  /* Keep a real border so the chassis reads as hardware */
  border: 1px solid rgba(255, 255, 255, var(--pc-border-a));
  border-top-color: rgba(255, 255, 255, 0.18); /* stronger highlight */
  border-bottom-color: rgba(0, 0, 0, 0.85);    /* bottom seam */

  position: relative;
  overflow: hidden;

  /* Layout */
  margin-bottom: 20px;

  /* CRITICAL: no box-shadow here */
}

/* Inner Lip (cavity frame) */
html[data-theme="control-room"] .pc-panel::before {
  content: "";
  position: absolute;
  inset: 6px;                 /* cavity inset */
  border-radius: calc(var(--pc-r-md) - 4px);

  /* hard mechanical frame */
  border: 1px solid rgba(0, 0, 0, 0.65);

  /* cavity depth */
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 8px 18px rgba(0, 0, 0, 0.70);

  pointer-events: none;
  z-index: 1;
}

/* Bolts on the outer rim (top layer) */
html[data-theme="control-room"] .pc-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;

  background-image:
    radial-gradient(circle at 12px 12px,
      rgba(255,255,255,0.85) 1px,
      #bdc3c7 2px,
      #7f8c8d 3.5px,
      #000 4.6px,
      rgba(0,0,0,0.35) 6px,
      transparent 7px),
    radial-gradient(circle at calc(100% - 12px) 12px,
      rgba(255,255,255,0.85) 1px,
      #bdc3c7 2px,
      #7f8c8d 3.5px,
      #000 4.6px,
      rgba(0,0,0,0.35) 6px,
      transparent 7px),
    radial-gradient(circle at 12px calc(100% - 12px),
      rgba(255,255,255,0.85) 1px,
      #bdc3c7 2px,
      #7f8c8d 3.5px,
      #000 4.6px,
      rgba(0,0,0,0.35) 6px,
      transparent 7px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px),
      rgba(255,255,255,0.85) 1px,
      #bdc3c7 2px,
      #7f8c8d 3.5px,
      #000 4.6px,
      rgba(0,0,0,0.35) 6px,
      transparent 7px);
  background-repeat: no-repeat;
}

/* Panel Header (mounted inside the cavity) */
html[data-theme="control-room"] .pc-panel-hd {
  position: relative;
  z-index: 2;

  margin: 6px 6px 0 6px;
  padding: 12px 16px;

  border-radius: calc(var(--pc-r-md) - 4px) calc(var(--pc-r-md) - 4px) 0 0;

  background: #22262e;
  border-bottom: 1px solid #0f1116;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 1px 2px rgba(0, 0, 0, 0.55);

  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  letter-spacing: 1px;
  color: #efefef;
  text-transform: uppercase;
}

/* Panel Body (mounted inside the cavity) */
html[data-theme="control-room"] .pc-panel-bd {
  position: relative;
  z-index: 2;

  margin: 0 6px 6px 6px;
  padding: 16px;

  border-radius: 0 0 calc(var(--pc-r-md) - 4px) calc(var(--pc-r-md) - 4px);
}


/* ─────────────────────────────────────────────────────────────
   CR COMPONENT 03: CONTROLS (Inputs, Buttons, Toggles)
   ───────────────────────────────────────────────────────────── */

/* Inputs & Selects: Deep Inset Cavity */
/* Inputs & Selects: Recessed Control Wells */
html[data-theme="control-room"] .pc-input,
html[data-theme="control-room"] .pc-select,
html[data-theme="control-room"] input[type="text"],
html[data-theme="control-room"] input[type="number"],
html[data-theme="control-room"] select,
html[data-theme="control-room"] textarea {
  box-sizing: border-box;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  outline: none;

  /* 1. Strong Inset Cavity */
  background: #030303;
  /* Deepest well */
  color: #a0a0a0;
  /* Standard state: dimmed */
  caret-color: var(--pc-accent);

  /* 2. Sharper Border Geometry */
  border: 1px solid #1a1a1a;
  border-top-color: #000;
  /* Shadow from top overhang */
  border-bottom-color: #2a2a2a;
  /* Light hitting bottom edge */
  border-radius: 2px;
  /* Tight radius, no soft curves */

  /* Depth Shadows */
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.9),
    /* Deep top shadow */
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    /* Inner definition */
    0 1px 0 rgba(255, 255, 255, 0.05);
  /* Subtle bottom rim highlight (external) */

  /* 4. Typography */
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.1s ease-out;
}

html[data-theme="control-room"] textarea {
  height: auto;
  padding: 8px 12px;
}

/* 3. Focus State = Instrument Activation (Channel Armed) */
html[data-theme="control-room"] .pc-input:focus,
html[data-theme="control-room"] .pc-select:focus,
html[data-theme="control-room"] input:focus,
html[data-theme="control-room"] select:focus,
html[data-theme="control-room"] textarea:focus {
  background: #050505;
  /* Slightly lighter inner */
  color: #fff;
  /* Readable bright text */

  /* Precision Rim */
  border-color: var(--pc-accent);
  border-top-color: var(--pc-accent);
  border-bottom-color: var(--pc-accent);

  /* "Armed" Glow - Subtle, internal */
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.8),
    0 0 0 1px var(--pc-accent),
    /* Sharp outer ring */
    inset 0 0 6px rgba(0, 243, 255, 0.1);
  /* Very faint inner glow */
}

/* Placeholder styling */
html[data-theme="control-room"] .pc-input::placeholder,
html[data-theme="control-room"] input::placeholder,
html[data-theme="control-room"] textarea::placeholder {
  color: #333;
  font-style: italic;
  font-family: sans-serif;
  /* Contrast to value */
}

/* -- Selects -- */
.pc-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--pc-r-sm);
  color: rgba(255, 255, 255, 0.90);
  padding: 10px 12px;
  font-size: 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 -1px 0 rgba(0, 0, 0, 0.70);
}

.pc-select:focus {
  border-color: rgba(85, 214, 255, 0.40);
  box-shadow: 0 0 0 2px rgba(85, 214, 255, 0.12);
}

/* -- Toggle (checkbox input variant) -- */
input.pc-toggle[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.35);
  display: inline-grid;
  place-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  cursor: pointer;
}

input.pc-toggle[type="checkbox"]::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  transform: scale(0);
  transition: transform 0.08s ease;
  background: var(--pc-accent-2);
  box-shadow: 0 0 10px rgba(57,255,182,0.18);
}

html[data-theme="control-room"] input.pc-toggle[type="checkbox"] {
  border-radius: 2px;
  border: 1px solid #2a2a2a;
  border-top-color: #000;
  border-bottom-color: #3a3a3a;
  background: #050505;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.85);
}

html[data-theme="control-room"] input.pc-toggle[type="checkbox"]::after {
  background: var(--pc-accent);
  box-shadow: 0 0 10px rgba(0,243,255,0.18);
}

html[data-theme="control-room"] input.pc-toggle[type="checkbox"]:focus {
  border-color: var(--pc-accent);
  box-shadow: 0 0 0 1px var(--pc-accent), inset 0 2px 4px rgba(0,0,0,0.85);
}


input.pc-toggle[type="checkbox"]:checked::after {
  transform: scale(1);
}

input.pc-toggle[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(85,214,255,0.12);
  border-color: rgba(85,214,255,0.40);
}


/* Buttons: Seated Keycap (Mechanical) */
html[data-theme="control-room"] .pc-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a0a0a0;

  /* Molded Plastic Body */
  background: linear-gradient(180deg, #2b303b, #1a1e26);
  border: 1px solid #111;
  /* Dark definition */

  /* 2. Stronger top highlight edge (Crisp, no blur) */
  border-top: 1px solid rgba(255, 255, 255, 0.4);

  /* 3. Harder bottom lip (Clearly darker) */
  border-bottom: 4px solid #000000;

  /* 1. Remove floaty shadow, add inset mounted look */
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.5),
    /* Minimal drop shadow */
    inset 0 0 0 1px rgba(0, 0, 0, 0.3),
    /* Dark rim inside */
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  /* Inner bevel */

  border-radius: 3px;
  transition: all 0.05s linear;
  /* Snap transition */
  cursor: pointer;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 1;
}

html[data-theme="control-room"] .pc-btn:hover {
  background: linear-gradient(180deg, #353b47, #222730);
  color: #fff;
  /* Hover doesn't move, just lights up slightly */
}

/* 4. Press state = mechanical compression */
html[data-theme="control-room"] .pc-btn:active {
  border-bottom-width: 1px;
  /* Collapse foot */
  border-top-color: rgba(255, 255, 255, 0.1);
  /* Dim highlight */
  transform: translateY(3px);
  /* 4px -> 1px = 3px travel */

  background: #15181f;
  /* Slight darkening */

  /* Collapse outer shadow, keep inner rim */
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 0 4px rgba(0, 0, 0, 0.8);
}

/* Primary Button: Illuminated Broadcast Key (Seated) */
html[data-theme="control-room"] .pc-btn-primary,
html[data-theme="control-room"] .pc-btn--primary {
  color: #e0ffff;
  background: linear-gradient(180deg, #162426, #0b1214);

  border-color: #000;
  border-top-color: rgba(0, 243, 255, 0.6);
  /* Sharper rim */
  border-bottom-color: #001a1c;
  /* Deep Cyan/Black Foot */

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(0, 40, 40, 0.5),
    /* Darker inner rim */
    inset 0 0 15px rgba(0, 243, 255, 0.05);
  /* Faint idle glow */

  text-shadow: 0 0 5px rgba(0, 243, 255, 0.4);
}

html[data-theme="control-room"] .pc-btn-primary:hover {
  background: linear-gradient(180deg, #1c2e33, #0e161a);
  border-top-color: rgba(0, 243, 255, 0.9);
  /* Hot rim */
  box-shadow:
    0 1px 4px rgba(0, 243, 255, 0.1),
    /* Slight glow spill */
    inset 0 0 0 1px rgba(0, 60, 60, 0.5),
    inset 0 0 20px rgba(0, 243, 255, 0.2);
  color: #fff;
}

html[data-theme="control-room"] .pc-btn-primary:active {
  border-bottom-width: 1px;
  transform: translateY(3px);
  background: #0e161a;
  box-shadow:
    inset 0 0 30px rgba(0, 243, 255, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.8);
}

/* Danger Button: Red Alert Console Key (Seated) */
html[data-theme="control-room"] .pc-btn-danger,
html[data-theme="control-room"] .pc-btn--danger {
  color: #ffe0e0;
  background: linear-gradient(180deg, #2e1a1a, #1a0d0d);

  border-color: #000;
  border-top-color: rgba(255, 70, 70, 0.6);
  border-bottom-color: #1a0505;

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(60, 0, 0, 0.5),
    inset 0 0 15px rgba(255, 50, 50, 0.05);

  text-shadow: 0 0 5px rgba(255, 50, 50, 0.4);
}

html[data-theme="control-room"] .pc-btn-danger:hover {
  background: linear-gradient(180deg, #3d2222, #211111);
  border-top-color: rgba(255, 100, 100, 0.9);
  box-shadow:
    0 1px 4px rgba(255, 50, 50, 0.1),
    inset 0 0 0 1px rgba(80, 0, 0, 0.5),
    inset 0 0 20px rgba(255, 50, 50, 0.15);
  color: #fff;
}

html[data-theme="control-room"] .pc-btn-danger:active {
  border-bottom-width: 1px;
  transform: translateY(3px);
  background: #1a0d0d;
  box-shadow:
    inset 0 0 30px rgba(255, 50, 50, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.8);
}

/* CSS Clean up */

/* Toggles (Checkbox) */
html[data-theme="control-room"] .pc-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

html[data-theme="control-room"] .pc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

html[data-theme="control-room"] .pc-toggle .slider {
  width: 36px;
  height: 20px;
  background: #111;
  border: 1px solid #444;
  border-radius: 99px;
  position: relative;
  transition: all 0.2s;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

html[data-theme="control-room"] .pc-toggle .slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #666;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

html[data-theme="control-room"] .pc-toggle input:checked+.slider {
  border-color: var(--pc-accent);
  box-shadow: 0 0 5px var(--pc-accent), inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

html[data-theme="control-room"] .pc-toggle input:checked+.slider::after {
  transform: translateX(16px);
  background: #fff;
  box-shadow: 0 0 8px #fff;
}

/* ─────────────────────────────────────────────────────────────
   CR COMPONENT 03: INTEGRATIONS / LISTS (Slots)
   ───────────────────────────────────────────────────────────── */

html[data-theme="control-room"] .pc-int {
  background: linear-gradient(90deg, #11141a, #0b0d10);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid #000;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 2px 4px rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  /* Slot spacing handled by .pc-bay-grid gap */
  margin-top: 0;
}

html[data-theme="control-room"] .pc-int:first-child {
  margin-top: 0;
}

html[data-theme="control-room"] .pc-int:hover {
  background: linear-gradient(90deg, #1a1e26, #111418);
  border-color: rgba(255, 255, 255, 0.15);
  border-left-color: var(--pc-accent);
  transform: translateX(2px);
  /* Mechanical engagement feel */
}

html[data-theme="control-room"] .pc-int-inner {
  padding: 12px;
}

/* ─────────────────────────────────────────────────────────────
   CR COMPONENT 06: MACHINED SLIDER RAIL
   ───────────────────────────────────────────────────────────── */

html[data-theme="control-room"] input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  margin: 10px 0;
}

html[data-theme="control-room"] input[type=range]:focus {
  outline: none;
}

/* TRACK */
html[data-theme="control-room"] input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #000000;
  border: 1px solid #222;
  border-bottom-color: #333;
  border-radius: 2px;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.05);
  /* External bottom highlight */
}

html[data-theme="control-room"] input[type=range]::-moz-range-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #000000;
  border: 1px solid #222;
  border-bottom-color: #333;
  border-radius: 2px;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.05);
}

/* THUMB */
html[data-theme="control-room"] input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 10px;
  margin-top: -7px;
  /* Center on 8px track */
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 1px;
  /* Machined corners */
  cursor: grab;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 0.1s;
}

html[data-theme="control-room"] input[type=range]::-moz-range-thumb {
  height: 20px;
  width: 10px;
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 1px;
  cursor: grab;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 0.1s;
}

/* ACTIVE / FOCUS */
html[data-theme="control-room"] input[type=range]:focus::-webkit-slider-thumb {
  border-color: var(--pc-accent);
  background: #333;
}

html[data-theme="control-room"] input[type=range]:focus::-moz-range-thumb {
  border-color: var(--pc-accent);
  background: #333;
}

/* Control Room: make readouts more “instrument panel” */
html[data-theme="control-room"] .pc-oled.pc-readout {
  border-color: rgba(0, 243, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(0,0,0,0.62), rgba(0,0,0,0.82));
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.75),
    inset 0 0 0 1px rgba(0,0,0,0.85),
    inset 0 10px 18px rgba(0,0,0,0.72),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* -- Log Feed (Teletext / Telex Style) -- */
.pc-log-feed {
  background: var(--oled-bg);
  color: var(--oled-accent);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  padding: 10px;
  border: 2px solid var(--np-border);
  position: relative;
  overflow: hidden;
}

.pc-log-feed::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.2) 0px,
    rgba(0, 0, 0, 0.2) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 2;
}

.pc-log-item {
  display: flex;
  gap: 12px;
  padding: 4px 8px;
  border-bottom: 1px dashed rgba(37, 199, 199, 0.1);
  font-size: 11px;
  line-height: 1.4;
  position: relative;
  z-index: 3;
}

.pc-log-item:last-child { border-bottom: none; }

.pc-log-time { opacity: 0.6; font-size: 10px; color: var(--oled-accent) !important; }
.pc-log-tag { 
  font-weight: 900; 
  text-transform: uppercase; 
  background: var(--oled-accent); 
  color: #000 !important;
  padding: 0 4px;
  border-radius: 2px;
}
.pc-log-item div { color: var(--oled-accent) !important; }

/* ─────────────────────────────────────────────────────────────
   DOSSIER TABS
   ───────────────────────────────────────────────────────────── */

/* -- Dossier Tabs (Folder Style) -- */
.pc-dossier-tabs {
  display: flex;
  gap: 0px; 
  position: relative;
  z-index: 20; /* High priority to overlap panels */
  margin-bottom: -6px; /* Deep overlap to mask border */
  padding-left: 15px;
}

.pc-dossier-tab {
  background: #d1cbc1 !important; 
  color: rgba(0,0,0,0.6) !important;
  padding: 10px 30px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid var(--np-border) !important;
  border-bottom: none !important;
  cursor: pointer;
  position: relative;
  /* Asymmetrical Slant: Straight left (0%), Slanted right (85%-100%) */
  clip-path: polygon(0% 0%, 85% 0%, 100% 100%, 0% 100%);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 140px;
  text-align: center;
  margin-right: -12px; /* Overlap for continuous folder feel */
}

.pc-dossier-tab:hover {
  background: #e3ddd3 !important;
  color: #000 !important;
  z-index: 12;
}

.pc-dossier-tab[data-active="true"] {
  background: var(--pc-panel) !important;
  color: var(--pc-text) !important;
  transform: translateY(6px); /* Perfect flush join with panel */
  z-index: 25;
  padding-bottom: 16px;
  clip-path: polygon(0% 0%, 92% 0%, 100% 100%, 0% 100%); 
}

/* Dymo Labels inside Dossier Tabs (Stamped Tape look) */
.pc-dossier-tab .pc-dymo {
  transform: rotate(-0.5deg);
  box-shadow: 2px 2px 0px rgba(0,0,0,0.4);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 11px;
  padding: 4px 12px;
  letter-spacing: 2px;
}

.pc-dossier-tab[data-active="true"] .pc-dymo {
  background: #111;
  color: #fff !important;
  transform: scale(1.1) rotate(0.8deg) translateY(-2px);
  box-shadow: 3px 3px 0px rgba(0,0,0,0.5);
  z-index: 30;
}

.pc-dossier-tab:not([data-active="true"]) .pc-dymo {
  background: #333;
  opacity: 0.7;
  filter: contrast(0.8) brightness(0.8);
  transform: scale(0.95) rotate(-0.5deg);
}

/* -- Dossier Content Wrapper -- */
.pc-dossier-content {
  border-top-left-radius: 0 !important;
  border-radius: 0;
  box-shadow: var(--pc-shadow-hard);
}

/* ─────────────────────────────────────────────────────────────
   DYMO LABELS
   ───────────────────────────────────────────────────────────── */
.pc-dymo {
  display: inline-block;
  background: #111;
  color: #ffffff !important;
  padding: 2px 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 1px;
  box-shadow: 1px 1px 0px rgba(255,255,255,0.15);
  position: relative;
  border: 1px solid #000;
  transform: rotate(-1deg);
  cursor: help;
  user-select: none;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pc-dymo--red { 
  background: #a51d1d; 
  transform: rotate(1.2deg);
}

.pc-dymo--active {
  box-shadow: 0 0 15px rgba(255,255,255,0.1), 3px 3px 0px #000;
  transform: scale(1.15) rotate(0.5deg);
  z-index: 10;
  filter: brightness(1.2);
}

.pc-dymo:hover {
  filter: brightness(1.3);
}

/* -- Range Input (Analog Slider) -- */
input[type="range"].pc-range {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  cursor: pointer;
}

input[type="range"].pc-range:focus { outline: none; }

/* Track */
input[type="range"].pc-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: var(--pc-slider-track);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0;
}

input[type="range"].pc-range::-moz-range-track {
  width: 100%;
  height: 8px;
  background: var(--pc-slider-track);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0;
}

/* Thumb */
input[type="range"].pc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 28px;
  width: 14px;
  background: var(--pc-slider-thumb);
  border: 2px solid var(--np-border);
  margin-top: -11px;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.4);
  transition: transform 0.1s;
}

input[type="range"].pc-range::-moz-range-thumb {
  height: 28px;
  width: 14px;
  background: var(--pc-slider-thumb);
  border: 2px solid var(--np-border);
}

/* Range Interaction Fix */
input[type="range"].pc-range:active::-webkit-slider-thumb {
  transform: scaleY(1.1);
  background: var(--pc-accent);
}

/* ─────────────────────────────────────────────────────────────
   PULP LEDGER TABLE REFINEMENT
   ───────────────────────────────────────────────────────────── */
body.np .pc-panel table {
  border-collapse: separate;
  border-spacing: 0;
}

body.np .pc-panel table thead {
  background: rgba(0, 0, 0, 0.04) !important;
  border-bottom: 2px solid var(--np-border) !important;
}

body.np .pc-panel table thead th {
  color: #000 !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  padding: 14px 15px !important;
  border-bottom: 2px solid var(--np-border) !important;
}

body.np .pc-panel table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
  transition: background 0.15s;
}

body.np .pc-panel table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

body.np .pc-panel table tbody tr:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.np .pc-panel table tbody td {
  padding: 14px 15px !important;
  color: #1a1a1a !important;
  vertical-align: top;
}

/* Action Badges in Pulp Theme */
body.np .m-badge {
  background: rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(0, 0, 0, 0.25) !important;
  color: #000 !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  box-shadow: none !important;
  padding: 1px 10px;
}

body.np .m-badge--ignore {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.5) !important;
  color: #064e3b !important;
  border-style: solid !important;
}

body.np .m-badge--timeout {
  background: rgba(59, 130, 246, 0.12) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  color: #1e3a8a !important;
}

body.np .m-badge--ban {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #7f1d1d !important;
}

body.np .m-badge--delete {
  background: rgba(234, 179, 8, 0.12) !important;
  border-color: rgba(234, 179, 8, 0.5) !important;
  color: #854d0e !important;
}

/* Table Input Focus Refinement */
body.np .pc-panel table .pc-input:focus,
body.np .pc-panel table .pc-select:focus {
  background: #fff !important;
  color: #000 !important;
  border-color: #000 !important;
  box-shadow: 2px 2px 0px #000 !important;
}

/* ─────────────────────────────────────────────────────────────
   MODERATION TEST VERDICT — STAMP ON DOCUMENT
   ───────────────────────────────────────────────────────────── */

/* Document wrapper */
body.np .m-verdict-doc {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3rem;
  background: var(--np-paper);
  border: 2px solid var(--np-border);
  font-family: var(--np-font-mono, 'Courier Prime', 'Courier New', monospace);
  overflow: visible; /* Prevents rotated stamp outlines/borders from clipping */
  padding: 1.5rem 2rem;
  min-height: 180px;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.03);
}

/* Left: detail rows */
body.np .m-verdict-details {
  flex: 0 1 55%;
  padding: 0.5rem 0;
}

body.np .m-verdict-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}

body.np .m-verdict-row:last-child {
  border-bottom: none;
}

body.np .m-verdict-key {
  flex: 0 0 5.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--np-ink);
  opacity: 0.45;
}

body.np .m-verdict-val {
  font-size: 0.8rem;
  color: var(--np-ink);
  line-height: 1.5;
}

/* Right: stamp column */
body.np .m-verdict-stamp-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 0.6rem;
  z-index: 10;
}

/* The rubber stamp itself */
body.np .m-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3em 0.85em;
  border: 5px solid currentColor;
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
  font-family: 'Oswald', 'Impact', 'Arial Black', sans-serif;
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transform: rotate(-10deg);
  opacity: 0.92;
  color: #c62828 !important; /* Rich madder red stamp ink */
  user-select: none;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px var(--np-paper), 0 0 0 1px currentColor;
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.1);
  background: var(--np-paper);
}

/* Gritty rubber ink splatter texture */
body.np .m-stamp::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 0px, rgba(255, 255, 255, 0.15) 2px, transparent 2px, transparent 4px),
                    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.08) 0px, rgba(0, 0, 0, 0.08) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
}

body.np .m-stamp--clear {
  color: #2e7d32 !important; /* Rich emerald green stamp ink */
}

body.np .m-stamp--flagged {
  color: #c62828 !important; /* Rich madder red stamp ink */
}

body.np .m-stamp--error {
  color: #1565c0 !important; /* Rich cobalt blue stamp ink */
}

/* Sub-label below the stamp (action type) */
body.np .m-stamp-sub {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
  color: var(--np-ink);
  text-align: center;
  transform: rotate(-10deg);
  margin-top: 0.3rem;
}

/* Clear state: no details, centre the stamp */
body.np .m-verdict-doc.m-verdict-doc--clear {
  justify-content: flex-start;
  gap: 3rem;
}

body.np .m-verdict-doc.m-verdict-doc--clear .m-verdict-details {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.7;
  flex: 0 1 50%;
}

body.np .m-verdict-doc.m-verdict-doc--clear .m-verdict-stamp-wrap {
  flex: 0 0 auto;
}

body.np .m-verdict-doc.m-verdict-doc--clear .m-stamp {
  font-size: 3.8rem;
}
body.np .m-verdict-msg { font-size: 0.8rem; color: var(--np-ink); opacity: 0.65; line-height: 1.5; display: block; }
