/* ═══════════════════════════════════════════════════════════════════
   FLOW AI 🌊 - Dark City Theme v226.69
   Modern dark theme with cityscape vibes
   ═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   ANTI-FLICKER CSS v2 - Comprehensive flickering prevention
   ═══════════════════════════════════════════════════════════════════ */

/* GPU acceleration for smooth rendering */
*, *::before, *::after {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Stabilize layout - prevent reflows */
html, body {
  transform: translateZ(0);
  contain: layout style;
}

/* AGGRESSIVE FLICKER FIX: Disable all animations and transitions by default */
*, *::before, *::after {
  animation: none !important;
  transition: none !important;
}

/* Re-enable only essential subtle transitions for interactive feedback */
button:hover, .btn:hover,
input:focus, select:focus, textarea:focus {
  transition: box-shadow 0.15s ease !important;
}

/* Completely disable backdrop-filter (major flicker cause) */
* {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Disable will-change (causes compositing flicker) */
* {
  will-change: auto !important;
}

/* Stabilize all elements with containment */
.card, .section, .panel, .tab-content, .tab-pane,
.header, .tab-nav, .status-bar, .container {
  contain: content;
  isolation: isolate;
}

/* Kill pulse animations specifically */
.pulse, .status-dot, .status-active,
[style*="pulse"], [class*="pulse"] {
  animation: none !important;
}

/* Reduce animation intensity */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.85);
  --bg-hover: rgba(51, 65, 85, 0.6);
  
  --border-color: rgba(71, 85, 105, 0.4);
  --border-light: rgba(71, 85, 105, 0.2);
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --radius: 8px;
  --radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  /* v270.8: Transparent body to show particle canvas behind */
  background: transparent;
}

/* v270.8: Add dark background to html for particle canvas backdrop */
html {
  background: #0a1628;
}

/* Cards */
.card, .section, .panel {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

button:active {
  transform: translateY(0);
}

/* Form Elements */
input, textarea, select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
  transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status Colors */
.success { color: var(--success); }
.warning { color: var(--warning); }
.danger { color: var(--danger); }
.info { color: var(--accent); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* List Items */
.list-item, .carrier-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(51, 65, 85, 0.4);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.list-item:hover, .carrier-item:hover {
  background: var(--bg-hover);
  transform: translateX(3px);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.6);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(71, 85, 105, 0.8);
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

.pulse { animation: none !important; }
.fade-in { animation: none !important; }

/* ═══════════════════════════════════════════════════════════════════
   FINAL ANTI-FLICKER OVERRIDE - MUST BE LAST IN FILE
   ═══════════════════════════════════════════════════════════════════ */

/* Kill ALL animations */
*, *::before, *::after {
  animation: none !important;
  animation-delay: 0s !important;
  animation-duration: 0s !important;
  transition: none !important;
  transition-delay: 0s !important;
  transition-duration: 0s !important;
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
}

/* Stable hover states */
.card:hover, button:hover, .btn:hover {
  transform: none !important;
}
