/**
 * QPPS Executive Security Theme - CSS Design Tokens & Styles
 * Theme Name: QPPS Executive Security Theme
 * Aesthetic: Command & Control / Deep OLED Executive Security
 */

@font-face {
  font-family: 'Inter';
  font-display: swap;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-display: swap;
}

:root {
  --bg-oled-base: #0d0e12;
  --surface-tier: #121317;
  --card-tier: #17181e;
  --container-high: #1f2027;
  
  --accent-safety-green: #3fe56c;
  --accent-hover-green: #00c853;
  --accent-signal-red: #ff4d4f;
  --accent-error-container: #7a0c10;
  
  --text-primary: #e3e2e8;
  --text-muted: #9ca3af;
  --border-subtle: #2b2d37;
  
  --font-primary: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-telemetry: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg-oled-base);
  color: var(--text-primary);
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.font-telemetry {
  font-family: var(--font-telemetry);
}

.font-sans-header {
  font-family: var(--font-primary);
}

/* Glassmorphism & Atmospheric Surfaces */
.glass-panel {
  background: rgba(18, 19, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
}

.glass-card {
  background: var(--card-tier);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(63, 229, 108, 0.4);
  box-shadow: 0 0 30px -5px rgba(63, 229, 108, 0.15);
  transform: translateY(-2px);
}

/* Glowing Effects */
.glow-green {
  box-shadow: 0 0 50px -10px rgba(63, 229, 108, 0.18);
}

.glow-red {
  box-shadow: 0 0 50px -10px rgba(255, 77, 79, 0.25);
}

.border-glow-green {
  border-color: rgba(63, 229, 108, 0.5);
  box-shadow: 0 0 15px rgba(63, 229, 108, 0.2);
}

/* Live Telemetry Pulsing Indicators */
@keyframes livePulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(63, 229, 108, 0.8);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(63, 229, 108, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(63, 229, 108, 0);
  }
}

.live-pulse-green {
  animation: livePulseGreen 2s infinite ease-in-out;
}

@keyframes livePulseRed {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.8);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(255, 77, 79, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 77, 79, 0);
  }
}

.live-pulse-red {
  animation: livePulseRed 1.8s infinite ease-in-out;
}

/* Infinite Smooth Partner Marquee */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.marquee-container::before,
.marquee-container::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.marquee-container::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-oled-base), transparent);
}

.marquee-container::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-oled-base), transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 35s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Status Badges */
.badge-safety {
  background: rgba(63, 229, 108, 0.12);
  border: 1px solid rgba(63, 229, 108, 0.3);
  color: var(--accent-safety-green);
}

.badge-emergency {
  background: rgba(255, 77, 79, 0.12);
  border: 1px solid rgba(255, 77, 79, 0.3);
  color: var(--accent-signal-red);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-oled-base);
}

::-webkit-scrollbar-thumb {
  background: var(--container-high);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-safety-green);
}

/* Core Web Vitals & CLS Prevention Enhancements */
img:not([height]) {
  height: auto;
}

.glass-panel {
  contain: layout style;
}

.glass-card {
  contain: layout style;
  will-change: transform;
}

/* Force Tabular Numerals across Telemetry Outputs to prevent horizontal text CLS */
.font-telemetry,
.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ==========================================================================
   Native Layout Utility Fallbacks (Guarantees Perfect Grid & Flex Rendering)
   ========================================================================== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.shrink-0 { flex-shrink: 0; }
.grow { flex-grow: 1; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.hidden { display: none !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-y-0 { top: 0; bottom: 0; }
.right-0 { right: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.w-auto { width: auto; }
.max-w-7xl { max-width: 80rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.max-w-sm { max-width: 24rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-12 > * + * { margin-top: 3rem; }

.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; }
.translate-x-full { transform: translateX(100%); }
.translate-x-0 { transform: translateX(0%); }

.overflow-hidden { overflow: hidden; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Responsive Grid & Flex Breakpoints */
@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:items-center { align-items: center; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:inline { display: inline !important; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex !important; }
  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:flex { display: flex !important; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:pb-0 { padding-bottom: 0; }
}

@media (min-width: 1280px) {
  .xl\:flex { display: flex !important; }
  .xl\:hidden { display: none !important; }
}


