/* ==============================================================================
   TACTICAL MONOLITH CONSOLE (HIGH-TICKET APPLE-GRADE MINIMALISM & FLUIDITY)
   Color Palette:
     E1 (Element 1): #D4FF00 (Neon Lime)
     E2 (Element 2): #00F0FF (Laser Cyan)
     E3 (Element 3): #C084FC (Amethyst Violet)
     E4 (Element 4): #00FF87 (Emerald Wealth)
     Base:           #050505 (Deep OLED Black)
   Main CSS Stylesheet Rule Scope
   Defines global design tokens, animations, layout grids, responsive breakpoints, and component styling.
   ============================================================================== */

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

:root {
  /* Preserved Color Tokens */
  --primary-fixed: #D4FF00;
  --primary-fixed-dim: #b8de00;
  --on-primary-fixed: #171e00;
  --bg-deep: #050505;
  --surface-elevated: rgba(18, 18, 18, 0.72);
  --surface-container: rgba(26, 26, 26, 0.55);
  
  --text-white: #f8fafc;
  --text-secondary: rgba(248, 250, 252, 0.85);
  --text-muted: rgba(248, 250, 252, 0.65);
  --border-ghost: rgba(255, 255, 255, 0.08);
  --border-laser: rgba(212, 255, 0, 0.28);

  /* V4S Vertex Color Identity Matrix */
  --color-vertex-c: #D4FF00;
  --color-vertex-h: #00F0FF;
  --color-vertex-i: #C084FC;
  --color-vertex-r: #00FF87;
  
  /* Apple-Grade Kinetic Easing */
  --apple-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --apple-duration: 0.85s;
  
  /* Fonts */
  --font-mono: 'JetBrains Mono', monospace;
  --font-headline: 'Manrope', sans-serif;
}

/* Tactical Light Mode Palette Abstraction (Optional Theme Fallback) */
html.light,
[data-theme="light"] {
  --primary-fixed: #769900;
  --primary-fixed-dim: #5c7800;
  --on-primary-fixed: #ffffff;
  --bg-deep: #f8fafc;
  --surface-elevated: rgba(255, 255, 255, 0.92);
  --surface-container: rgba(241, 245, 249, 0.85);

  --text-white: #0f172a;
  --text-secondary: rgba(15, 23, 42, 0.85);
  --text-muted: rgba(15, 23, 42, 0.65);
  --border-ghost: rgba(15, 23, 42, 0.12);
  --border-laser: rgba(118, 153, 0, 0.35);

  --color-vertex-c: #769900;
  --color-vertex-h: #0099b8;
  --color-vertex-i: #7e22ce;
  --color-vertex-r: #059669;
}

/* Default Box Sizing & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  background-color: var(--bg-deep);
}

body {
  background-color: var(--bg-deep);
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  selection-background-color: var(--primary-fixed);
  selection-color: #000;
}

/* ==============================================================================
   TYPOGRAPHY SYSTEM & LEGIBILITY FLOORS (WCAG 2.1 AA 1.4.4 TEXT RESIZE FLOOR)
   ============================================================================== */

/* Accessible Minimum Floor: 12px (0.75rem) for micro-text, chips, and metadata */
.v4s-chip,
.backlink-chip,
.ticker-text,
.calendar-ticker-content,
.form-label,
.form-hint,
.v4s-badge,
.status-tag,
small,
caption,
figcaption {
  font-size: max(0.75rem, 12px);
  line-height: 1.45;
}

/* Button & Action Control Hierarchy Floor: 13px - 14px */
.btn,
button,
select,
.input-field,
.select-field,
.textarea-field {
  font-size: max(0.8125rem, 13px);
}

/* ==============================================================================
   DISTILLED LAYOUT UTILITIES (CLEAN COMPONENT ABSTRACTIONS)
   ============================================================================== */
.app-shell-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

.brand-header-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-header-title {
  display: flex;
  flex-direction: column;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-title-h1 {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-fixed);
  letter-spacing: 0.08em;
  margin: 0;
}

.brand-title-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lang-selector-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--border-ghost);
  border-radius: 8px;
}

.lang-selector-select {
  font-family: var(--font-mono);
  font-weight: 800;
  background: transparent;
  border: none;
  color: var(--primary-fixed);
  cursor: pointer;
  text-transform: uppercase;
  outline: none;
}

.dashboard-panel-header-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-fixed);
}

.panel-header-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.dashboard-panel-left {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  border-radius: 8px;
  position: relative;
  z-index: 35;
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-welcome-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-ghost);
  border-left: 3px solid var(--primary-fixed);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}

.summary-card {
  padding: 1.15rem;
  border-radius: 8px;
  border: 1px solid var(--border-ghost);
  background: rgba(18, 18, 22, 0.65);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 145px;
  transition: all 0.3s var(--apple-ease);
}

.summary-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 255, 0, 0.35);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75), 0 0 16px rgba(212, 255, 0, 0.08);
}

.summary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.summary-card-link {
  width: 100%;
  justify-content: center;
  font-size: 0.78rem;
  margin-top: auto;
  padding: 0.45rem 0.75rem;
  border-radius: 4px;
  text-align: center;
  transition: all 0.25s var(--apple-ease);
}

.summary-card-link:hover {
  background: rgba(212, 255, 0, 0.14);
  color: var(--primary-fixed);
  border-color: var(--primary-fixed);
}

/* Luxury Subtle Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-fixed);
}

/* Background Ambient Lighting & High-End Minimal Grids */
.data-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: 
    linear-gradient(rgba(212, 255, 0, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 255, 0, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.scan-line {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.15) 51%);
  background-size: 100% 4px;
  opacity: 0.35;
}

/* ==============================================================================
   APPLE-GRADE LUXURY VIEWPORT STAGING SYSTEM (SLOWER, SILKY FLUID TRANSITIONS)
   ============================================================================== */
.top-console-grid,
.tactical-section {
  transition: opacity var(--apple-duration) var(--apple-ease), 
              transform var(--apple-duration) var(--apple-ease),
              box-shadow var(--apple-duration) var(--apple-ease),
              border-color var(--apple-duration) var(--apple-ease);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  scroll-margin-top: 90px;
  transform-origin: center top;
}

/* Section In Focus: High Contrast, Optical Clarity and Subtle Glow */
.section-in-focus {
  opacity: 1 !important;
  transform: translate3d(0, 0px, 0) scale(1) !important;
  pointer-events: auto !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 30px rgba(212, 255, 0, 0.04) !important;
  filter: blur(0px) !important;
}

/* Section Out of Focus: Soft Fade, Subtle Spatial Recede */
.section-out-of-focus {
  opacity: 0.18 !important;
  transform: translate3d(0, 14px, 0) scale(0.99) !important;
  box-shadow: none !important;
  filter: blur(0.6px) !important;
}

.section-out-of-focus:hover {
  opacity: 0.55 !important;
  transform: translate3d(0, 4px, 0) scale(0.996) !important;
  filter: blur(0px) !important;
}

/* WCAG 2.1 AA Reduced Motion Override (Criterion 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  .top-console-grid,
  .tactical-section,
  .section-in-focus,
  .section-out-of-focus,
  .section-out-of-focus:hover {
    transition: border-color 0.15s ease, background-color 0.15s ease !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    will-change: auto !important;
  }
}

/* Frosted Glass Cards (Apple Aesthetic Layering) */
.glass-panel {
  background: var(--surface-elevated);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-ghost);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), 0 16px 36px rgba(0, 0, 0, 0.65);
  position: relative;
  transition: transform 0.35s var(--apple-ease), box-shadow 0.35s var(--apple-ease), border-color 0.35s var(--apple-ease);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.16), 0 20px 48px rgba(0, 0, 0, 0.85), 0 0 20px rgba(212, 255, 0, 0.04);
}

.glow-light-green {
  border-top: 1px solid rgba(212, 255, 0, 0.45) !important;
  position: relative;
}

.glow-light-green::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-fixed), transparent);
  box-shadow: 0 2px 14px rgba(212, 255, 0, 0.15);
  pointer-events: none;
}

/* Micro-Motion Pulse & Hover */
.micro-motion {
  transition: transform 0.35s var(--apple-ease), box-shadow 0.35s var(--apple-ease), border-color 0.35s var(--apple-ease);
}

.micro-motion:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75), 0 0 18px rgba(212, 255, 0, 0.05);
}

.pulsing-dot {
  width: 5px;
  height: 5px;
  background-color: var(--primary-fixed);
  display: inline-block;
  animation: pulseNeon 2.5s infinite ease-in-out;
}

@keyframes pulseNeon {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px var(--primary-fixed); }
  50% { opacity: 0.3; transform: scale(0.8); box-shadow: none; }
}

/* Vertex Identity Classes & Traces */
.vertex-c { color: var(--color-vertex-c) !important; border-color: var(--color-vertex-c) !important; }
.vertex-h { color: var(--color-vertex-h) !important; border-color: var(--color-vertex-h) !important; }
.vertex-i { color: var(--color-vertex-i) !important; border-color: var(--color-vertex-i) !important; }
.vertex-r { color: var(--color-vertex-r) !important; border-color: var(--color-vertex-r) !important; }

.badge-vertex-c { background: rgba(212, 255, 0, 0.08); color: var(--color-vertex-c); border: 1px solid rgba(212, 255, 0, 0.35); }
.badge-vertex-h { background: rgba(0, 240, 255, 0.08); color: var(--color-vertex-h); border: 1px solid rgba(0, 240, 255, 0.35); }
.badge-vertex-i { background: rgba(192, 132, 252, 0.08); color: var(--color-vertex-i); border: 1px solid rgba(192, 132, 252, 0.35); }
.badge-vertex-r { background: rgba(0, 255, 135, 0.08); color: var(--color-vertex-r); border: 1px solid rgba(0, 255, 135, 0.35); }

.trace-vertex-c { border-left: 2px solid var(--color-vertex-c) !important; }
.trace-vertex-h { border-left: 2px solid var(--color-vertex-h) !important; }
.trace-vertex-i { border-left: 2px solid var(--color-vertex-i) !important; }
.trace-vertex-r { border-left: 2px solid var(--color-vertex-r) !important; }

/* VU-METER FREQUENCY EQUALIZER BY STRUCTURAL ELEMENT */
.vu-meter-rack {
  background: rgba(8, 8, 8, 0.75);
  border: 1px solid var(--border-ghost);
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  backdrop-filter: blur(16px);
}

.vu-channel-row {
  display: grid;
  grid-template-columns: 140px 1fr 110px;
  align-items: center;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .vu-channel-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}

.vu-led-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  overflow-x: hidden;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.vu-led-block {
  flex: 1;
  height: 10px;
  min-width: 6px;
  transition: all 0.4s var(--apple-ease);
}

.vu-led-block.off {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.vu-led-block.on-c {
  background: var(--color-vertex-c);
  box-shadow: 0 0 8px rgba(212, 255, 0, 0.7), 0 0 14px rgba(212, 255, 0, 0.3);
}

.vu-led-block.on-h {
  background: var(--color-vertex-h);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.7), 0 0 14px rgba(0, 240, 255, 0.3);
}

.vu-led-block.on-i {
  background: var(--color-vertex-i);
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.7), 0 0 14px rgba(192, 132, 252, 0.3);
}

.vu-led-block.on-r {
  background: var(--color-vertex-r);
  box-shadow: 0 0 8px rgba(0, 255, 135, 0.7), 0 0 14px rgba(0, 255, 135, 0.3);
}

/* Ambient Background Layer: Deep OLED Black with a Distant Point of Pale Light */
.ambient-light-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background-color: #030304;
}

.distant-pale-light {
  position: absolute;
  top: 12%;
  right: 15%;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 235, 255, 0.045) 0%, rgba(212, 255, 0, 0.015) 25%, rgba(0, 0, 0, 0) 70%);
  filter: blur(65px);
  pointer-events: none;
  animation: paleLightPulse 12s ease-in-out infinite alternate;
}

@keyframes paleLightPulse {
  0% { opacity: 0.65; transform: scale(1) translateY(0); }
  50% { opacity: 1; transform: scale(1.08) translateY(-18px); }
  100% { opacity: 0.65; transform: scale(1) translateY(0); }
}

/* Typography Classes */
h1, h2, h3, h4, .font-headline {
  font-family: var(--font-headline);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

/* Header */
.tactical-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 2.25rem;
  border-bottom: 1px solid var(--border-ghost);
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 500;
}

/* Header Touch Adaptation (WCAG 2.1 AA 44x44px Target Size) */
.tactical-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tactical-header .btn,
.tactical-header .backlink-chip,
.tactical-header .lang-selector-wrapper {
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.85rem;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.tactical-header #select-language {
  min-height: 40px;
  font-size: 0.75rem;
  padding: 0.4rem 0.5rem;
}

@media (pointer: coarse) {
  .tactical-header .btn,
  .tactical-header .backlink-chip,
  .tactical-header .lang-selector-wrapper {
    min-height: 48px;
    min-width: 48px;
    padding: 0.6rem 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--apple-ease);
  user-select: none;
}

.btn:active {
  transform: scale(0.96) translateY(0) !important;
  box-shadow: none !important;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-fixed);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary-fixed);
  color: var(--on-primary-fixed);
  box-shadow: 0 4px 14px rgba(212, 255, 0, 0.2);
}
.btn-primary:hover {
  background-color: var(--primary-fixed-dim);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(212, 255, 0, 0.25);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
  border: 1px solid var(--border-ghost);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--primary-fixed);
  background: rgba(212, 255, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(212, 255, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(255, 77, 77, 0.08);
  color: #ff5c5c;
  border: 1px solid rgba(255, 77, 77, 0.25);
}
.btn-danger:hover {
  background: #ff5c5c;
  color: #000;
  box-shadow: 0 4px 16px rgba(255, 77, 77, 0.35);
  transform: translateY(-1px);
}

/* Universal Section Navigation Bar Cluster */
.section-nav-cluster {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--border-ghost);
}

.backlink-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  border: 1px solid var(--border-ghost);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: max(0.75rem, 12px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--apple-ease);
}

.backlink-chip:hover {
  background: rgba(212, 255, 0, 0.1);
  color: var(--primary-fixed);
  border-color: var(--border-laser);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), 0 0 12px rgba(212, 255, 0, 0.15);
}

.backlink-chip:active {
  transform: scale(0.97) translateY(0);
}

.backlink-chip.nav-active {
  background: var(--primary-fixed);
  color: var(--on-primary-fixed);
  border-color: var(--primary-fixed);
  box-shadow: 0 0 14px rgba(212, 255, 0, 0.35);
}

/* Top Console Grid Split */
.top-console-grid {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  position: relative;
  z-index: 30;
}

@media (max-width: 1024px) {
  .top-console-grid {
    grid-template-columns: 1fr;
  }
  .core-container {
    display: none;
  }
}

/* Section Containers */
.tactical-section {
  background: var(--surface-elevated);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-ghost);
  border-radius: 14px;
  padding: 2.25rem;
  margin-bottom: 3.5rem;
  position: relative;
  z-index: 10;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.75);
}

.tactical-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.65rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border-ghost);
  gap: 1rem;
  flex-wrap: wrap;
}

/* Form Controls */
.input-field, .select-field, .textarea-field {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text-white);
  border: 1px solid var(--border-ghost);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.3s var(--apple-ease);
}

.input-field:hover, .select-field:hover, .textarea-field:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
}

.input-field:focus, .select-field:focus, .textarea-field:focus {
  border-color: var(--primary-fixed);
  background: rgba(212, 255, 0, 0.035);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 16px rgba(212, 255, 0, 0.15);
}

.textarea-field {
  resize: vertical;
  min-height: 80px;
}

/* Compact HUD Layout for Section 04 */
.action-hud-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .action-hud-grid {
    grid-template-columns: 1fr;
  }
}

.hud-panel {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-ghost);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* Performance Rating Tier System (1 to 5) */
.tier-selector {
  display: flex;
  gap: 0.35rem;
}

.tier-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-ghost);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s var(--apple-ease);
}

.tier-btn:hover {
  border-color: var(--primary-fixed);
  color: var(--primary-fixed);
  transform: translateY(-1px);
}

.tier-btn.active {
  background: var(--primary-fixed);
  color: var(--on-primary-fixed);
  border-color: var(--primary-fixed);
  box-shadow: 0 0 10px rgba(212, 255, 0, 0.35);
}

.score-badge-otimo { background: rgba(212, 255, 0, 0.12); color: #D4FF00; border: 1px solid rgba(212, 255, 0, 0.4); }
.score-badge-bom { background: rgba(0, 255, 135, 0.12); color: #00FF87; border: 1px solid rgba(0, 255, 135, 0.4); }
.score-badge-regular { background: rgba(255, 183, 3, 0.12); color: #FFB703; border: 1px solid rgba(255, 183, 3, 0.4); }
.score-badge-ruim { background: rgba(255, 123, 0, 0.12); color: #FF7B00; border: 1px solid rgba(255, 123, 0, 0.4); }
.score-badge-pessimo { background: rgba(255, 77, 77, 0.12); color: #FF4D4D; border: 1px solid rgba(255, 77, 77, 0.4); }

/* Kanban Board Styling */
.kanban-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

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

.kanban-column {
  background: rgba(14, 14, 14, 0.55);
  border: 1px solid var(--border-ghost);
  border-radius: 12px;
  padding: 1.25rem;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-ghost);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-fixed);
}

.kanban-card {
  background: rgba(22, 22, 22, 0.75);
  border: 1px solid var(--border-ghost);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.35s var(--apple-ease), border-color 0.35s var(--apple-ease), box-shadow 0.35s var(--apple-ease);
}

.kanban-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

/* Proposal Action Table Styling */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-toolbar-group {
  display: flex;
  gap: 1rem;
  flex: 1;
}

.table-disclaimer-text {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border-ghost);
}

.tactical-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

.tactical-table th {
  background: rgba(16, 16, 16, 0.85);
  color: var(--primary-fixed);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border-ghost);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tactical-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-ghost);
  vertical-align: middle;
}

.tactical-table tr {
  transition: background 0.45s var(--apple-ease), transform 0.35s var(--apple-ease);
  cursor: pointer;
}

.tactical-table tr:hover {
  background: rgba(212, 255, 0, 0.045);
}

.tactical-table tr.selected-row {
  background: rgba(212, 255, 0, 0.07) !important;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-pending { background: rgba(255, 170, 0, 0.1); color: #ffaa00; border: 1px solid rgba(255, 170, 0, 0.3); }
.badge-progress { background: rgba(0, 170, 255, 0.1); color: #00aaff; border: 1px solid rgba(0, 170, 255, 0.3); }
.badge-done { background: rgba(212, 255, 0, 0.1); color: var(--primary-fixed); border: 1px solid var(--border-laser); }
.badge-urgent { background: rgba(255, 77, 77, 0.1); color: #ff4d4d; border: 1px solid rgba(255, 77, 77, 0.3); }

/* Progress Bar Components */
.progress-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-fixed);
  transition: width 0.6s var(--apple-ease);
  box-shadow: 0 0 10px rgba(212, 255, 0, 0.4);
}

/* Log Stream */
.log-stream {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 140px;
  overflow-y: auto;
}

.log-stream p {
  line-height: 1.4;
}

.log-stream .highlight {
  color: var(--primary-fixed);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 3, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--apple-ease);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: rgba(12, 12, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  width: 100%;
  max-width: 540px;
  padding: 2.25rem;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 40px rgba(212, 255, 0, 0.06);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.45s var(--apple-ease), opacity 0.45s var(--apple-ease);
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

/* Action Technical Notes Live Markdown Editor */
.action-notes-editor-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.action-notes-editor-container {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-ghost);
  padding: 0.85rem 1rem;
  min-height: 140px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-white);
  outline: none;
  border-radius: 8px;
  transition: border-color 0.3s var(--apple-ease), box-shadow 0.3s var(--apple-ease);
}

.action-notes-view-mode {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow-y: auto;
}

.action-notes-edit-mode {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  resize: none;
}

.action-notes-editor-container:focus,
.action-notes-edit-mode:focus {
  border-color: var(--primary-fixed);
  box-shadow: 0 0 15px rgba(212, 255, 0, 0.08);
  background: rgba(212, 255, 0, 0.02);
}

.action-notes-line {
  min-height: 1.35rem;
  word-break: break-word;
}

.action-notes-editor-container a {
  color: var(--primary-fixed);
  text-decoration: underline;
  cursor: pointer;
}

.action-notes-editor-container a:hover {
  text-shadow: 0 0 8px rgba(212, 255, 0, 0.6);
}

.action-notes-editor-container code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  color: var(--primary-fixed);
  font-family: monospace;
}

.action-notes-editor-container strong {
  color: var(--text-white);
  font-weight: 700;
}

.action-notes-editor-container em {
  color: var(--text-secondary);
  font-style: italic;
}

.action-notes-editor-container h3, 
.action-notes-editor-container h4 {
  color: var(--primary-fixed);
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
  font-size: 0.88rem;
}

.action-notes-task-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.25rem 0;
}

.action-notes-task-line.checked {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ==============================================================================
   BYOK STATUS BADGE
   ============================================================================== */
#byok-status-badge {
  background: rgba(255, 255, 255, 0.14) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
  letter-spacing: 0.06em !important;
  transition: all 0.3s var(--apple-ease) !important;
}

#byok-status-badge:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border-ghost);
  transition: all 0.25s var(--apple-ease);
}

.checklist-item.completed span {
  text-decoration: line-through;
  color: var(--text-muted);
}

.v4s-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-ghost);
  color: var(--primary-fixed);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.v4s-chip-dot {
  width: 5px;
  height: 5px;
  background-color: var(--primary-fixed);
  box-shadow: 0 0 6px var(--primary-fixed);
  animation: pulseNeon 2.5s infinite ease-in-out;
}

/* ==============================================================================
   INTERACTIVE AI MENTORSHIP CHAT
   ============================================================================== */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.chat-bubble {
  position: relative;
  max-width: 88%;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  line-height: 1.6;
  border-radius: 4px;
  animation: fadeInChatBubble 0.3s var(--apple-ease);
  word-break: break-word;
}

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

/* User Message Bubble (Right aligned, subtle neon highlight) */
.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(212, 255, 0, 0.1) 0%, rgba(212, 255, 0, 0.02) 100%);
  border: 1px solid rgba(212, 255, 0, 0.35);
  border-right: 4px solid var(--primary-fixed);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 15px rgba(212, 255, 0, 0.05);
  color: #FFFFFF;
}

.chat-bubble-sender-tag {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-bubble.user .chat-bubble-sender-tag {
  color: var(--primary-fixed);
  border-bottom-color: rgba(212, 255, 0, 0.2);
  justify-content: flex-end;
}

/* AI Message Bubble (Left aligned, frosted glass, emerald highlight) */
.chat-bubble.ai {
  align-self: flex-start;
  background: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid #00FF87;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.95);
}

.chat-bubble.ai .chat-bubble-sender-tag {
  color: #00FF87;
  border-bottom-color: rgba(0, 255, 135, 0.25);
  justify-content: flex-start;
}

.chat-bubble.ai strong {
  color: var(--primary-fixed);
  font-weight: 700;
}

.chat-bubble.ai code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  font-family: var(--font-mono);
  color: var(--primary-fixed);
  border-radius: 3px;
  font-size: 0.8rem;
}

.chat-bubble.ai pre {
  background: rgba(0, 0, 0, 0.75);
  padding: 0.85rem;
  border: 1px solid var(--border-ghost);
  overflow-x: auto;
  margin: 0.6rem 0;
  border-left: 2px solid var(--primary-fixed);
}

.chat-bubble-time {
  font-size: 0.58rem;
  color: var(--text-muted);
  margin-top: 0.45rem;
  text-align: right;
  display: block;
}

/* AI Action Proposal Card */
.ai-action-proposal-card {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  background: rgba(212, 255, 0, 0.06);
  border: 1px solid rgba(212, 255, 0, 0.35);
  border-left: 3px solid var(--primary-fixed);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ai-action-proposal-card h5 {
  font-size: 0.75rem;
  color: var(--primary-fixed);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
}

/* ==============================================================================
   TACTICAL LIVE FEED TICKER & LOOP (GOOGLE DOCS STREAM)
   ============================================================================== */
.tactical-feed-bar {
  border-radius: 4px;
  position: relative;
  transition: all 0.35s var(--apple-ease);
}

.tactical-feed-bar:hover {
  border-color: rgba(212, 255, 0, 0.4);
  box-shadow: 0 0 20px rgba(212, 255, 0, 0.08);
}

.feed-ticker-viewport {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.feed-ticker-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-white);
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--apple-ease), transform 0.5s var(--apple-ease);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.feed-ticker-item.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.feed-badge-rule {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  background: rgba(212, 255, 0, 0.12);
  color: var(--primary-fixed);
  border: 1px solid rgba(212, 255, 0, 0.3);
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

#core-feed-loop-container {
  transition: all 0.35s var(--apple-ease);
}

#core-feed-loop-container:hover {
  border-color: rgba(212, 255, 0, 0.35);
  box-shadow: 0 0 15px rgba(212, 255, 0, 0.06);
}

.feed-live-link {
  color: var(--primary-fixed);
  text-decoration: underline;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s var(--apple-ease);
}

.feed-live-link:hover {
  color: #ffffff;
  text-shadow: 0 0 10px var(--primary-fixed);
}

/* ==============================================================================
   GENERATE PROTOCOL BUTTON & DYNAMIC STATES
   ============================================================================== */
.btn-mcp-glowing {
  background: linear-gradient(135deg, var(--primary-fixed) 0%, #b8e600 100%) !important;
  color: #000000 !important;
  font-weight: 800 !important;
  border-color: var(--primary-fixed) !important;
  cursor: pointer !important;
  animation: mcpGlowPulse 1.6s infinite ease-in-out !important;
  transition: all 0.3s var(--apple-ease) !important;
}

@keyframes mcpGlowPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(212, 255, 0, 0.4), inset 0 0 6px rgba(255, 255, 255, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 24px rgba(212, 255, 0, 0.85), inset 0 0 12px rgba(255, 255, 255, 0.7);
    transform: scale(1.02);
  }
}

.btn-mcp-generated {
  background: rgba(0, 255, 135, 0.15) !important;
  color: #00FF87 !important;
  border: 1px solid #00FF87 !important;
  box-shadow: 0 0 16px rgba(0, 255, 135, 0.35) !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: all 0.35s var(--apple-ease) !important;
}

.btn-mcp-generated:hover {
  background: rgba(0, 255, 135, 0.25) !important;
  box-shadow: 0 0 22px rgba(0, 255, 135, 0.55) !important;
}

.btn-mcp-loading,
.btn-protocol-loading {
  background: rgba(212, 255, 0, 0.2) !important;
  color: var(--primary-fixed) !important;
  border-color: var(--primary-fixed) !important;
  cursor: wait !important;
  animation: mcpLoadingPulse 0.8s infinite alternate !important;
}

@keyframes mcpLoadingPulse {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Autonomous Agent Protocol Info Button (Neon Green) */
.btn-agent-info-neon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #00FF87 !important;
  color: #00FF87 !important;
  background: rgba(0, 255, 135, 0.12) !important;
  box-shadow: 0 0 12px rgba(0, 255, 135, 0.35) !important;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s var(--apple-ease);
}

.btn-agent-info-neon:hover,
.btn-agent-info-neon[aria-expanded="true"] {
  background: rgba(0, 255, 135, 0.28) !important;
  border-color: #00FF87 !important;
  box-shadow: 0 0 20px rgba(0, 255, 135, 0.7), inset 0 0 8px rgba(0, 255, 135, 0.25) !important;
  transform: scale(1.08);
}

/* Autonomous Agent Protocol Popover */
.agent-protocol-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  max-width: 85vw;
  padding: 0.95rem 1.15rem;
  background: rgba(8, 12, 10, 0.97) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 135, 0.45) !important;
  border-radius: 10px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.95), 0 0 24px rgba(0, 255, 135, 0.25) !important;
  z-index: 99999 !important;
  font-size: 0.73rem;
  line-height: 1.5;
  color: var(--text-white);
  text-align: left;
}

/* ==============================================================================
   HUMAN-IN-THE-LOOP (HITL) THRESHOLD & SENSITIVE DECISION MODAL
   ============================================================================== */
.hitl-alert-box {
  background: rgba(255, 183, 3, 0.08);
  border-left: 3px solid #FFB703;
  padding: 0.85rem 1rem;
  border-radius: 2px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.5;
}

/* Tactical Notification Toast */
.v4s-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(12, 12, 12, 0.95);
  border: 1px solid var(--primary-fixed);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), 0 0 20px rgba(212, 255, 0, 0.2);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.35s var(--apple-ease);
  pointer-events: none;
}

.v4s-toast.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ==============================================================================
   TUTORIAL TOUR SPOTLIGHT & BACKDROP SHADING
   ============================================================================== */
.tutorial-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  z-index: 99990;
  pointer-events: auto;
}

.tutorial-spotlight {
  position: fixed;
  background: transparent;
  border: 2px solid var(--primary-fixed);
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 20px rgba(212, 255, 0, 0.35);
  z-index: 99991;
  pointer-events: none;
  transition: all 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutorial-card {
  position: fixed;
  width: 360px;
  max-width: 90vw;
  background: rgba(12, 12, 12, 0.98);
  border: 1px solid var(--primary-fixed);
  border-radius: 6px;
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), 0 0 24px rgba(212, 255, 0, 0.25);
  z-index: 99995;
  transition: top 0.75s cubic-bezier(0.16, 1, 0.3, 1), left 0.75s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  backdrop-filter: blur(16px);
}

/* ==============================================================================
   ACTION CLASSIFICATION: MAIN ACTION VS STANDARD ACTION
   ============================================================================== */
.badge-principal {
  background: rgba(0, 240, 255, 0.15) !important;
  color: #00F0FF !important;
  border: 1px solid rgba(0, 240, 255, 0.5) !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.badge-ordinaria {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-muted) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  font-weight: 600 !important;
}

/* ==============================================================================
   ACTION TABLE BLOCK CAROUSEL
   ============================================================================== */
.action-block-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.action-block-header {
  transition: all 0.5s var(--apple-ease);
}

.action-block-header:hover {
  border-color: rgba(212, 255, 0, 0.3) !important;
  background: rgba(20, 20, 20, 0.7) !important;
}

.action-block-slide {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.action-block-nav-btn {
  transition: all 0.45s var(--apple-ease) !important;
}

.action-block-nav-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 255, 0, 0.25);
  border-color: var(--primary-fixed) !important;
  color: var(--primary-fixed) !important;
  background: rgba(212, 255, 0, 0.1) !important;
}

/* ==============================================================================
   CONTINUOUS CALENDAR MINI-FEED TICKER (CONSOLE HEADER)
   ============================================================================== */
.calendar-ticker-container {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-ghost);
  padding: 0.28rem 0.6rem;
  border-radius: 3px;
  width: 220px;
  min-width: 200px;
  max-width: 225px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6);
  transition: all 0.3s var(--apple-ease);
}

.calendar-ticker-container:hover {
  border-color: rgba(212, 255, 0, 0.35);
  background: rgba(15, 15, 15, 0.75);
}

.calendar-ticker-icon {
  color: var(--primary-fixed);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.calendar-ticker-content {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s var(--apple-ease), transform 0.3s var(--apple-ease);
}

.calendar-ticker-content .ticker-text {
  letter-spacing: 0.02em;
}

@media (max-width: 1024px) {
  .calendar-ticker-container {
    max-width: 280px;
  }
}

@media (max-width: 768px) {
  .calendar-ticker-container {
    display: none;
  }
}

/* ==============================================================================
   WALL CALENDAR MODAL & XY PROGRESSION CHART (READ-ONLY)
   ============================================================================== */
.calendar-modal-card {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.95), 0 0 45px rgba(212, 255, 0, 0.06) !important;
}

/* Wall Calendar Container */
.wall-calendar-container {
  background: rgba(8, 8, 8, 0.85);
  border: 1px solid var(--border-ghost);
  padding: 0.85rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.wall-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wall-cal-nav-btn {
  font-weight: 800 !important;
}

.wall-calendar-legend {
  display: flex;
  gap: 0.75rem;
  font-size: 0.62rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  display: inline-block;
}

/* Days of the Week */
.wall-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.25rem;
}

.wall-cal-weekday-label {
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Month Grid */
.wall-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.wall-cal-cell {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  min-height: 48px;
  padding: 0.25rem 0.35rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all 0.25s var(--apple-ease);
}

.wall-cal-cell:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.wall-cal-pad {
  opacity: 0.25;
  background: rgba(0, 0, 0, 0.2);
}

.wall-cal-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.wall-cal-day-num {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.wall-cal-day-num.active-day-num {
  color: var(--text-white);
  font-weight: 800;
}

.wall-cal-star {
  color: var(--primary-fixed);
  font-size: 0.65rem;
  font-weight: 800;
}

/* Action Cells */
.cell-has-completed {
  border-color: rgba(0, 255, 135, 0.35) !important;
  background: rgba(0, 255, 135, 0.04) !important;
}

.cell-has-planned {
  border-color: rgba(212, 255, 0, 0.35) !important;
  background: rgba(212, 255, 0, 0.03) !important;
}

.cell-has-urgent {
  border-color: rgba(255, 158, 0, 0.45) !important;
  background: rgba(255, 158, 0, 0.05) !important;
}

.wall-cal-badges {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 1px;
}

.wall-cal-badge-pill {
  font-size: 0.55rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 0.05rem 0.25rem;
  border-radius: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* ==============================================================================
   XY PROGRESSION S-CURVE TRACKING CHART
   ============================================================================== */
.xy-tracking-rack {
  background: rgba(8, 8, 8, 0.85);
  border: 1px solid var(--border-ghost);
  padding: 0.85rem 1rem;
  border-radius: 4px;
}

.xy-tracking-rack svg {
  user-select: none;
}

/* ==============================================================================
   COMPREHENSIVE RESPONSIVE DESIGN (DESKTOP, TABLETS & SMARTPHONES)
   ============================================================================== */

/* Table Responsiveness Wrapper */
.table-responsive,
.actions-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tablets (iPad, Android Tablets, Foldables: <= 1024px) */
@media (max-width: 1024px) {
  .tactical-header {
    padding: 0.75rem 1.25rem;
  }

  .tactical-section {
    padding: 1.5rem;
    margin-bottom: 2.25rem;
  }

  .top-console-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .action-hud-grid {
    grid-template-columns: 1fr !important;
  }

  .kanban-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }

  .modal-card {
    max-width: 88vw;
    width: 100%;
  }
}

/* Smartphones & Small Tablets (<= 768px) */
@media (max-width: 768px) {
  main {
    padding: 0.85rem 0.5rem !important;
  }

  .tactical-header {
    padding: 0.65rem 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .tactical-header > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .tactical-header > div:last-child {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.3rem;
    gap: 0.45rem;
  }

  .tactical-section {
    padding: 1.15rem 0.75rem;
    margin-bottom: 1.85rem;
  }

  .tactical-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
  }

  .tactical-section-header h2 {
    font-size: 1.1rem !important;
  }

  .top-console-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  /* Section 01 AI Chat grid layout */
  #sec-ai-chat > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Section 04 Action Details 2-column grid */
  #action-detail-container > div[style*="grid-template-columns"],
  .action-detail-main-grid {
    grid-template-columns: 1fr !important;
    gap: 1.15rem !important;
  }

  /* Kanban Columns */
  .kanban-grid {
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
  }

  .kanban-column {
    padding: 0.85rem;
  }

  /* Actions Table */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Wall Calendar */
  .wall-cal-cell {
    min-height: 38px;
    padding: 0.2rem 0.25rem;
  }

  .wall-cal-weekday-label {
    font-size: 0.55rem;
  }

  .wall-cal-badge-pill {
    font-size: 0.48rem;
  }

  /* AI Chat Drawer & Modals */
  #ai-chat-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
    right: 0 !important;
  }

  .modal-card {
    max-width: 95vw !important;
    width: 95vw !important;
    padding: 1.25rem 0.85rem !important;
    max-height: 88vh;
    overflow-y: auto;
  }
}

/* Compact Smartphones (<= 480px) */
@media (max-width: 480px) {
  .btn {
    padding: 0.32rem 0.55rem;
    font-size: 0.62rem;
  }

  .v4s-chip {
    font-size: 0.58rem;
  }

  .tactical-section-header h2 {
    font-size: 0.98rem !important;
  }

  #console-proposal-name {
    font-size: 0.82rem;
  }

  .input-field, .select-field, .textarea-field {
    font-size: 0.78rem;
    padding: 0.5rem 0.65rem;
  }

  .tier-selector {
    gap: 0.2rem;
  }

  .tier-btn {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }
}

/* ==============================================================================
   ACCESSIBILITY HARDENING & KEYBOARD FOCUS RESILIENCE
   ============================================================================== */

/* High-Contrast Neon Keyboard Focus Rings */
button:focus-visible,
.btn:focus-visible,
.backlink-chip:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-fixed) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 12px rgba(212, 255, 0, 0.5) !important;
}

/* WCAG 2.1 AA Motion Sensitivity Protection */
@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;
  }
  .top-console-grid,
  .tactical-section,
  .section-out-of-focus,
  .section-in-focus {
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
    will-change: auto !important;
  }
  .scan-line {
    display: none !important;
  }
}

/* Mobile GPU Composite Optimization (Reduced Backdrop Blur Repaint Overhead) */
@media (max-width: 768px) {
  .glass-panel,
  .tactical-header,
  .tactical-section,
  .modal-overlay,
  .chat-bubble.ai {
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
  }
}

/* ==============================================================================
   TUTORIAL WORKFLOW MODAL ENHANCEMENTS
   ============================================================================== */
.tutorial-modal-card {
  max-width: 640px;
  width: 92vw;
  padding: 1.85rem;
  border-radius: 18px;
  background: rgba(14, 15, 20, 0.97);
  border: 1px solid var(--border-ghost);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.95), 0 0 50px rgba(212, 255, 0, 0.06);
  margin: auto;
}

.tutorial-step-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutorial-step-card:hover {
  background: rgba(212, 255, 0, 0.035);
  border-color: rgba(212, 255, 0, 0.25);
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.tutorial-step-num {
  background: linear-gradient(135deg, rgba(212, 255, 0, 0.2), rgba(0, 240, 255, 0.12));
  color: var(--primary-fixed);
  font-weight: 800;
  font-size: 0.78rem;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 255, 0, 0.4);
  box-shadow: 0 0 10px rgba(212, 255, 0, 0.15);
  flex-shrink: 0;
}

.tutorial-step-text {
  font-size: 0.81rem;
  color: #E2E8F0;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.tut-highlight-key {
  color: var(--primary-fixed);
  font-weight: 700;
}

.tut-highlight-accent {
  color: #00FF87;
  font-weight: 700;
}

.tut-highlight-purple {
  color: #C084FC;
  font-weight: 700;
}

.tut-highlight-cyan {
  color: #00F0FF;
  font-weight: 700;
}

/* ==============================================================================
   CROSS-PLATFORM NATIVE APPLICATION ENGINE (macOS, Windows, iOS/iPadOS, Android)
   ============================================================================== */

/* Native Window Dragging & Titlebar Ergonomics */
.is-desktop .tactical-header {
  -webkit-app-region: drag;
  user-select: none;
  -webkit-user-select: none;
}

.is-desktop .tactical-header button,
.is-desktop .tactical-header a,
.is-desktop .tactical-header select,
.is-desktop .tactical-header input,
.is-desktop .tactical-header .tactical-header-actions,
.is-desktop .modal-overlay,
.is-desktop .modal-card,
.is-desktop textarea,
.is-desktop input {
  -webkit-app-region: no-drag;
}

/* macOS: Traffic Lights Button Gutter Offset */
.is-mac .tactical-header {
  padding-left: 5.5rem !important;
}

/* Windows: Titlebar Controls Overlay Offset */
.is-win .tactical-header {
  padding-right: 9rem !important;
}

/* System Safe Area Insets (iPhone Dynamic Island / Notches / Android System Bars) */
.tactical-header {
  padding-top: max(0.9rem, env(safe-area-inset-top));
  padding-left: max(2.25rem, env(safe-area-inset-left));
  padding-right: max(2.25rem, env(safe-area-inset-right));
}

footer {
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

/* Native Touch Ergonomics */
* {
  -webkit-tap-highlight-color: transparent;
}

body {
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Native Dark OLED Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 255, 0, 0.45);
}

/* Mobile Responsive Optimization (< 768px) */
@media (max-width: 768px) {
  .tactical-header {
    padding: max(0.6rem, env(safe-area-inset-top)) 0.85rem 0.6rem 0.85rem;
    flex-direction: column;
    gap: 0.65rem;
    align-items: stretch;
  }

  .tactical-header-actions {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tactical-header-actions::-webkit-scrollbar {
    display: none;
  }

  .tactical-header .brand-header-group {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .brand-logo-img {
    max-height: 28px;
    width: auto;
  }
}

/* Tablet Adaptive Layout (768px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .tactical-header {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }
}




