/* ═══════════════════════════════════════════════════
   DEVELOPER STUDIOS · PREMIUM STYLING SYSTEM
   Shared CSS Guidelines & Variable Resets
   ═══════════════════════════════════════════════════ */

:root {
  --bg-base:        #f8fafc;
  --bg-surface:     #ffffff;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f8fafc;
  
  --text-primary:   #0f172a;
  --text-secondary: #334155;
  --text-muted:     #64748b;
  --text-white:     #ffffff;
  
  --border:         #e2e8f0;
  --border-hover:   #cbd5e1;
  --border-accent:  rgba(99, 102, 241, 0.25);
  
  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  
  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:      0 4px 6px -1px rgba(99, 102, 241, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg:      0 12px 28px -4px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  
  --transition:     0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  padding-top: 90px !important; /* Offset visual overlay fix for fixed navbar */
  transition: background-color 0.3s ease, color 0.3s ease;
}

.studio-title {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.025em;
  font-weight: 800;
}

/* ── Custom Cards ── */
.studio-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}

.studio-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── Form Inputs ── */
.form-select, .form-input, .form-textarea {
  font-family: 'Inter', sans-serif;
  border: 1px solid var(--border) !important;
  background-color: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.65rem 0.85rem !important;
  transition: all 0.2s ease;
  outline: none !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.01) !important;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
  background-color: var(--bg-surface) !important;
}

.custom-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 5px;
  outline: none;
  background-color: var(--bg-surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  position: relative;
  flex-shrink: 0;
}

.custom-checkbox:checked {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.custom-checkbox:checked::after {
  content: '✓';
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  position: absolute;
}

/* ── IDE Panel & Terminals ── */
.ide-container {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.ide-header {
  background-color: #0c111d;
  border-bottom: 1px solid #1e293b;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ide-dots {
  display: flex;
  gap: 6px;
}

.ide-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.ide-dot-red { background-color: #ef4444; }
.ide-dot-yellow { background-color: #f59e0b; }
.ide-dot-green { background-color: #10b981; }

.ide-viewport {
  background-color: #05080f !important;
  color: #f1f5f9 !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.8rem !important;
  line-height: 1.6 !important;
  overflow: auto;
  padding: 1.5rem !important;
  min-height: 480px;
  max-height: 720px;
  white-space: pre;
  word-break: break-all;
}

/* ── Custom IDE Tabs ── */
.tab-btn {
  padding: 0.625rem 1.15rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: #94a3b8;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab-btn:hover {
  color: #e2e8f0;
  background-color: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--accent-primary) !important;
  border-bottom-color: var(--accent-primary) !important;
  font-weight: 600;
  background-color: rgba(99, 102, 241, 0.05);
}

/* ── Navigation bar override ── */
.navbar {
  height: 80px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* ── Diagrams ── */
.diagram-container {
  background: linear-gradient(135deg, #090d16 0%, #05080f 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  color: #e2e8f0;
  font-family: 'Space Grotesk', sans-serif;
}

.diagram-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.diagram-step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.95rem;
  font-size: 0.72rem;
  text-align: center;
  min-width: 110px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.diagram-step.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
  transform: translateY(-1px);
}

.diagram-arrow {
  color: #475569;
  font-weight: 900;
  font-family: monospace;
}

.tabs-scrollable::-webkit-scrollbar {
  height: 4px;
}
.tabs-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
}

/* ── SRE Custom Component Class Declarations ── */

/* Floating status metric badge */
.sre-network-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
  border: 1px solid transparent;
}
.sre-network-badge.online {
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
  color: #10b981 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.05);
}
.sre-network-badge.offline {
  background: rgba(249, 115, 22, 0.08) !important;
  border-color: rgba(249, 115, 22, 0.2) !important;
  color: #f97316 !important;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.05);
}

/* GitOps commit status notification overlay */
.gitops-sync-panel {
  position: fixed;
  top: 90px;
  right: 24px;
  width: 320px;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  font-family: 'Space Grotesk', sans-serif;
  color: #f8fafc;
  transform: translateY(-10px);
  opacity: 0;
  animation: gitopsSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes gitopsSlideIn {
  to { transform: translateY(0); opacity: 1; }
}

/* Incident Emergency Alert Panel */
.fire-drill-alert {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 340px;
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid #ef4444;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(239, 68, 68, 0.15);
  z-index: 10000;
  color: #f8fafc;
  font-family: 'Space Grotesk', sans-serif;
  animation: fireDrillSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fireDrillSlideIn {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* SRE Viewports: System Flow & REST Sandboxes */
.sre-panel-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  background: #090d16;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Inter', sans-serif;
  color: #cbd5e1;
}

.sre-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.sre-panel-title {
  font-size: 0.92rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sre-button-pill {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  padding: 4px 12px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}
.sre-button-pill:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
}

.sre-terminal-logs {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.875rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #cbd5e1;
  text-align: left;
  white-space: pre-wrap;
  overflow-y: auto;
}

.sre-panel-code-box {
  background: #020617;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #cbd5e1;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
}

/* Side-by-side comparative diff auditor boxes */
.visual-diff-box {
  margin-top: 0.5rem;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}

/* Telemetry Stats Grid */
.live-sre-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.live-sre-stat-card {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  text-align: center;
}
.live-sre-stat-label {
  display: block;
  font-size: 8px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.live-sre-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
}

/* Dark Mode Variables Overlay */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-base:        #090d16 !important;
    --bg-surface:     #0f172a !important;
    --bg-card:        #0f172a !important;
    --bg-card-hover:  #1e293b !important;
    --text-primary:   #f8fafc !important;
    --text-secondary: #cbd5e1 !important;
    --text-muted:     #94a3b8 !important;
    --border:         #1e293b !important;
    --border-hover:   #334155 !important;
  }

  body {
    background-color: var(--bg-base) !important;
    color: var(--text-primary) !important;
  }

  .studio-card {
    background-color: var(--bg-surface) !important;
    border-color: var(--border) !important;
  }
  .studio-card:hover {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
  }

  .form-select, .form-input, .form-textarea {
    background-color: var(--bg-base) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
  }

  .custom-checkbox {
    background-color: var(--bg-base) !important;
    border-color: var(--border) !important;
  }

  .navbar {
    background: rgba(9, 13, 22, 0.8) !important;
    border-bottom-color: var(--border) !important;
  }
  
  .navbar a {
    color: #f8fafc !important;
  }
  
  .navbar div {
    color: #cbd5e1 !important;
  }

  footer {
    background-color: var(--bg-base) !important;
    border-top-color: var(--border) !important;
    color: #cbd5e1 !important;
  }

  .tab-btn {
    color: #94a3b8 !important;
  }

  .tab-btn:hover {
    color: #f1f5f9 !important;
  }

  .tab-btn.active {
    color: #a5b4fc !important;
    border-bottom-color: #a5b4fc !important;
    background-color: rgba(165, 180, 252, 0.05) !important;
  }

  .diagram-step {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
  }
  .diagram-step.active {
    background: rgba(165, 180, 252, 0.12) !important;
    border-color: #a5b4fc !important;
    box-shadow: 0 0 16px rgba(165, 180, 252, 0.25) !important;
  }

  /* Tailwind CSS override fallbacks */
  .bg-white {
    background-color: var(--bg-surface) !important;
  }
  
  .bg-gray-50 {
    background-color: var(--bg-base) !important;
  }
  
  .text-gray-900 {
    color: var(--text-primary) !important;
  }

  .text-gray-500 {
    color: var(--text-muted) !important;
  }

  .text-gray-400 {
    color: #64748b !important;
  }
  
  .border-gray-100 {
    border-color: var(--border) !important;
  }

  .border-slate-100 {
    border-color: var(--border) !important;
  }
}


