/* ==========================================================================
   AetherCI Design System & Stylesheet
   Theme: Obsidian Dark / Glassmorphic Cyberpunk Accents
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  color-scheme: dark;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-brand: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Colors */
  --bg-app: #080b10;
  --bg-sidebar: rgba(13, 18, 30, 0.75);
  --bg-panel: rgba(22, 28, 45, 0.45);
  --bg-panel-hover: rgba(30, 37, 58, 0.55);
  --bg-control: rgba(15, 22, 40, 0.8);
  --border-glow: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(139, 92, 246, 0.4);
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Accents & Statuses */
  --color-success: #10b981;
  --color-success-rgb: 16, 185, 129;
  --color-warning: #f59e0b;
  --color-warning-rgb: 245, 158, 11;
  --color-danger: #f43f5e;
  --color-danger-rgb: 244, 63, 94;
  --color-info: #0ea5e9;
  --color-info-rgb: 14, 165, 233;
  --color-premium: #8b5cf6;
  --color-premium-rgb: 139, 92, 246;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --glass-glow: 0 0 20px rgba(139, 92, 246, 0.05);
  
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 70px;
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* --- Light Mode Design Tokens --- */
[data-theme="light"] {
  color-scheme: light;
  /* Colors */
  --bg-app: #f1f5f9;
  --bg-sidebar: rgba(255, 255, 255, 0.9);
  --bg-panel: rgba(255, 255, 255, 0.9);
  --bg-panel-hover: rgba(248, 250, 252, 0.98);
  --bg-control: rgba(241, 245, 249, 0.95);
  --border-glow: rgba(0, 0, 0, 0.09);
  --border-focus: rgba(124, 58, 237, 0.5);
  
  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  /* Accents & Statuses */
  --color-success: #059669;
  --color-success-rgb: 5, 150, 105;
  --color-warning: #d97706;
  --color-warning-rgb: 217, 119, 6;
  --color-danger: #e11d48;
  --color-danger-rgb: 225, 29, 72;
  --color-info: #0284c7;
  --color-info-rgb: 2, 132, 199;
  --color-premium: #7c3aed;
  --color-premium-rgb: 124, 58, 237;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
  --glass-glow: 0 0 20px rgba(124, 58, 237, 0.06);
}

/* --- Medium Mode Design Tokens (Slate / Dark Balanced) --- */
[data-theme="medium"] {
  color-scheme: dark;
  /* Colors */
  --bg-app: #151d2a;
  --bg-sidebar: rgba(21, 29, 42, 0.88);
  --bg-panel: rgba(30, 41, 59, 0.7);
  --bg-panel-hover: rgba(43, 56, 78, 0.8);
  --bg-control: rgba(30, 41, 59, 0.9);
  --border-glow: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(139, 92, 246, 0.5);
  
  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  /* Accents & Statuses */
  --color-success: #10b981;
  --color-success-rgb: 16, 185, 129;
  --color-warning: #f59e0b;
  --color-warning-rgb: 245, 158, 11;
  --color-danger: #f43f5e;
  --color-danger-rgb: 244, 63, 94;
  --color-info: #38bdf8;
  --color-info-rgb: 56, 189, 248;
  --color-premium: #a855f7;
  --color-premium-rgb: 168, 85, 247;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);
  --glass-glow: 0 0 20px rgba(168, 85, 247, 0.08);
}

[data-theme="medium"] .bg-glow {
  opacity: 0.08;
}

[data-theme="medium"] .top-bar {
  background: rgba(21, 29, 42, 0.85);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

[data-theme="medium"] .sidebar {
  background: rgba(21, 29, 42, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .top-bar {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .header-select-capsule {
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .capsule-select option {
  background: #ffffff;
  color: #0f172a;
}

[data-theme="light"] .modal-box {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-secondary {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #334155;
}

[data-theme="light"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.07);
  color: #0f172a;
}

[data-theme="light"] .pipeline-node-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .pipeline-node-card:hover {
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
}

[data-theme="light"] .stat-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .history-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .history-item:hover {
  background: #f8fafc;
}

[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .custom-select,
[data-theme="light"] .custom-input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

[data-theme="light"] .custom-select option {
  background: #ffffff;
  color: #0f172a;
}

[data-theme="light"] .runner-card,
[data-theme="light"] .analytics-card,
[data-theme="light"] .card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .pipeline-node {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .node-duration-pill {
  background: #f1f5f9;
  color: #64748b;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .history-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .history-card:hover {
  background: #f8fafc;
  border-color: rgba(124, 58, 237, 0.3);
}

[data-theme="light"] .history-search-wrapper {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .history-search-wrapper input {
  color: #0f172a;
}

[data-theme="light"] .chip-filter {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
  color: #64748b;
}

[data-theme="light"] .chip-filter.active {
  background: rgba(124, 58, 237, 0.12);
  border-color: var(--color-premium);
  color: var(--color-premium);
}

[data-theme="light"] .terminal-tab-btn.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--color-premium);
}

[data-theme="light"] .terminal-search-box input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

[data-theme="light"] .diagnostics-view,
[data-theme="light"] .quality-matrix-grid,
[data-theme="light"] .env-table-wrapper {
  background: #0f172a;
}

[data-theme="light"] .matrix-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .nav-item {
  color: var(--text-secondary);
}

[data-theme="light"] .nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

[data-theme="light"] .nav-item.active {
  background: rgba(124, 58, 237, 0.1);
  color: var(--color-premium);
}

/* Light Theme Code Editor & Inspector Overrides */
[data-theme="light"] .yaml-editor-wrapper {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}
[data-theme="light"] .line-numbers {
  color: #94a3b8;
  border-right: 1px solid #e2e8f0;
}
[data-theme="light"] #yaml-textarea {
  color: #0f172a;
}
[data-theme="light"] .preview-inspector-card {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
}
[data-theme="light"] .inspector-step-line {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
}
[data-theme="light"] .inspector-step-line code {
  color: #0f172a;
}
[data-theme="light"] .preview-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* --- Reset & Core Setup --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background Ambient Glow elements */
.bg-glow {
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
}
.bg-glow-1 {
  background: radial-gradient(circle, var(--color-premium) 0%, transparent 70%);
  top: -10%;
  right: -5%;
}
.bg-glow-2 {
  background: radial-gradient(circle, var(--color-info) 0%, transparent 70%);
  bottom: -10%;
  left: -5%;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-sm);
  border: 2px solid transparent;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --- Typography Helpers --- */
h1, h2, h3, h4 {
  font-family: var(--font-brand);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* --- Layout Structure --- */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-glow);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-brand {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-glow);
  background: rgba(0, 0, 0, 0.18);
}
.brand-logo-img {
  height: 58px;
  max-height: 66px;
  width: 100%;
  max-width: 232px;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0, 180, 255, 0.45)) brightness(1.15) contrast(1.05);
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}
.brand-logo-img:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 4px 22px rgba(0, 180, 255, 0.8)) brightness(1.25) contrast(1.1);
}
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius-md);
  background: linear-gradient(135deg, var(--color-premium), var(--color-info));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}
.brand-name {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-nav {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}
.nav-icon {
  width: 18px;
  height: 18px;
  transition: var(--transition-fast);
}
.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}
.nav-item.active {
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15) 0%, rgba(14, 165, 233, 0.05) 100%);
  border-left: 3px solid var(--color-premium);
  padding-left: 13px; /* accounts for border */
  box-shadow: var(--shadow-sm);
}
.nav-item.active .nav-icon {
  color: var(--color-premium);
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.5));
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-glow);
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.user-profile-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, var(--color-premium));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
  margin-top: 2px;
}
.role-admin {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.role-devops {
  background: rgba(14, 165, 233, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(14, 165, 233, 0.4);
}
.role-developer {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.role-viewer {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.btn-icon-logout {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glow);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.btn-icon-logout:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-danger);
  border-color: rgba(244, 63, 94, 0.3);
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  min-width: 0; /* Prevents flex items from overflowing */
  padding: 24px 36px 40px 36px;
  display: flex;
  flex-direction: column;
}

/* Top bar navigation items (Spacious Glass Capsule Bar) */
.top-bar {
  min-height: 68px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(18, 24, 38, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  margin-bottom: 24px;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.header-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 1 auto;
  justify-content: flex-end;
}

.header-select-capsule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 14, 24, 0.75);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-md);
  padding: 4px 10px;
  height: 42px;
  transition: var(--transition-fast);
}

.header-select-capsule:hover {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(14, 20, 36, 0.85);
}

.capsule-icon {
  color: var(--color-premium);
  display: flex;
  align-items: center;
  opacity: 0.85;
}

.capsule-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
}

.capsule-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  padding-right: 6px;
}

.capsule-select,
.custom-select,
#theme-dropdown-select,
select {
  color-scheme: dark;
}

[data-theme="light"] .capsule-select,
[data-theme="light"] .custom-select,
[data-theme="light"] #theme-dropdown-select,
[data-theme="light"] select {
  color-scheme: light;
}

[data-theme="medium"] .capsule-select,
[data-theme="medium"] .custom-select,
[data-theme="medium"] #theme-dropdown-select,
[data-theme="medium"] select {
  color-scheme: dark;
}

.capsule-select option,
.custom-select option,
#theme-dropdown-select option,
select option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  padding: 6px 10px;
}

[data-theme="light"] .capsule-select option,
[data-theme="light"] .custom-select option,
[data-theme="light"] #theme-dropdown-select option,
[data-theme="light"] select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="medium"] .capsule-select option,
[data-theme="medium"] .custom-select option,
[data-theme="medium"] #theme-dropdown-select option,
[data-theme="medium"] select option {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

.btn-capsule-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-capsule-add:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #ffffff;
  border-color: var(--color-premium);
}

.header-btn {
  height: 42px;
  padding: 0 16px;
  font-size: 0.86rem;
}
.custom-select:hover, .custom-select:focus {
  border-color: var(--color-premium);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.custom-select-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: var(--border-radius-sm);
}

.custom-input {
  background: var(--bg-control);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  width: 100%;
  transition: var(--transition-fast);
}
.custom-input:focus {
  border-color: var(--color-premium);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  outline: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-premium), var(--color-info));
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45), 0 0 10px rgba(14, 165, 233, 0.3);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glow);
  color: var(--text-secondary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-secondary.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.35);
  color: var(--color-premium);
}
.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--border-radius-sm);
}

/* Glassmorphic Panels */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg), var(--glass-glow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}
.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg), 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(139, 92, 246, 0.08);
}
.panel-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.panel-header.border-bottom {
  border-bottom: 1px solid var(--border-glow);
}
.panel-header h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
}

/* --- Global Metrics Strip with Micro Sparklines --- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.stat-icon.success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.stat-icon.info {
  background: rgba(14, 165, 233, 0.12);
  color: var(--color-info);
  border: 1px solid rgba(14, 165, 233, 0.25);
}
.stat-icon.warning {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.stat-icon.premium {
  background: rgba(139, 92, 246, 0.12);
  color: var(--color-premium);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.stat-growth-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.stat-growth-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.stat-growth-badge.info {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.stat-growth-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.stat-growth-badge.premium {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.stat-details {
  display: flex;
  flex-direction: column;
  z-index: 2;
}
.stat-value {
  font-family: var(--font-brand);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

.stat-sparkline {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 120px;
  height: 38px;
  opacity: 0.85;
  pointer-events: none;
  z-index: 1;
}
.sparkline-svg {
  width: 100%;
  height: 100%;
}

/* Pulsing radar dot for active state */
.pulse-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background-color: var(--color-warning);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulse 1.6s infinite;
}

.pulsing-radar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-premium);
  box-shadow: 0 0 10px var(--color-premium);
  animation: pulseRadar 2s infinite ease-in-out;
}

@keyframes pulseRadar {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.6); }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Primary Trigger Button Enhancements */
.main-trigger-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #0ea5e9 100%) !important;
  box-shadow: 0 4px 18px rgba(139, 92, 246, 0.4) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  padding: 0 18px !important;
}
.main-trigger-btn:hover {
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.6), 0 0 12px rgba(14, 165, 233, 0.4) !important;
  transform: translateY(-2px);
}
.kbd-shortcut {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-left: 6px;
}

/* Timer Badge in Header */
.timer-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
}

/* --- Tabs Styling --- */
.tab-content-container {
  flex-grow: 1;
  display: flex;
}
.tab-pane {
  display: none;
  width: 100%;
  animation: fadeIn 0.4s ease;
}
.tab-pane.active {
  display: block;
}

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

/* --- DASHBOARD TAB LAYOUT --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}
.span-two-thirds {
  grid-column: span 2;
}
.span-full {
  grid-column: span 3;
}

.visualizer-panel {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.panel-title-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pipeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}
.commit-hash {
  font-family: var(--font-mono);
  color: var(--color-info);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}
.branch-tag {
  color: var(--color-premium);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.author {
  color: var(--text-muted);
}

.badge {
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-idle {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.badge-running {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
  animation: pulse-border 1.5s infinite;
}
.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}
.badge-failed {
  background: rgba(244, 63, 94, 0.15);
  color: #f87171;
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}

@keyframes pulse-border {
  0% { border-color: rgba(245, 158, 11, 0.3); }
  50% { border-color: rgba(245, 158, 11, 0.9); }
  100% { border-color: rgba(245, 158, 11, 0.3); }
}

/* Interactive Pipeline Graph Container */
.pipeline-graph-container {
  flex-grow: 1;
  position: relative;
  overflow: auto;
  padding: 36px 24px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  min-height: 270px;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.04) 0%, transparent 80%);
}
.pipeline-svg-connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.pipeline-nodes-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
  gap: 28px;
}

/* Next-Gen Graph Stage/Node Card */
.pipeline-node {
  background: rgba(16, 23, 40, 0.85);
  border: 1px solid var(--border-glow);
  padding: 16px 14px;
  border-radius: var(--border-radius-lg);
  width: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.pipeline-node:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.2);
}

.node-step-index {
  position: absolute;
  top: 8px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
}

.node-duration-pill {
  position: absolute;
  top: 8px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-glow);
}

.pipeline-node.active-stage {
  border-color: var(--color-warning) !important;
  background: rgba(245, 158, 11, 0.08) !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.3), 0 8px 24px rgba(0, 0, 0, 0.5);
}
.pipeline-node.active-stage .node-duration-pill {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.pipeline-node.success-stage {
  border-color: rgba(16, 185, 129, 0.5) !important;
  background: rgba(16, 185, 129, 0.06) !important;
}
.pipeline-node.success-stage .node-duration-pill {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.pipeline-node.failed-stage {
  border-color: rgba(244, 63, 94, 0.6) !important;
  background: rgba(244, 63, 94, 0.08) !important;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.3);
}
.pipeline-node.failed-stage .node-duration-pill {
  color: #f87171;
  border-color: rgba(244, 63, 94, 0.4);
}

.node-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}
.pipeline-node.active-stage .node-icon-wrapper {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
  animation: pulseIcon 1.2s infinite alternate;
}
.pipeline-node.success-stage .node-icon-wrapper {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}
.pipeline-node.failed-stage .node-icon-wrapper {
  background: rgba(244, 63, 94, 0.15);
  color: #f87171;
  border-color: rgba(244, 63, 94, 0.4);
}

@keyframes pulseIcon {
  0% { transform: scale(0.96); }
  100% { transform: scale(1.08); }
}

.node-title {
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-primary);
}
.node-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.node-status {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glow);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pipeline-node.active-stage .node-status {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
}
.pipeline-node.success-stage .node-status {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.12);
}
.pipeline-node.failed-stage .node-status {
  color: #f87171;
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.12);
}

.node-progress-line {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #ec4899);
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  transition: width 0.3s ease;
}
.pipeline-node.active-stage .node-progress-line {
  animation: progressBarAnim 2s infinite linear;
  background: linear-gradient(90deg, #f59e0b, #8b5cf6, #3b82f6);
}
@keyframes progressBarAnim {
  0% { width: 10%; }
  50% { width: 75%; }
  100% { width: 95%; }
}
.pipeline-node.success-stage .node-progress-line {
  width: 100%;
  background: #10b981;
}
.pipeline-node.failed-stage .node-progress-line {
  width: 100%;
  background: #f43f5e;
}

/* Connection Paths SVG styles */
.connection-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3;
  transition: var(--transition-smooth);
}
.connection-path.completed {
  stroke: var(--color-success);
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.5));
}
.connection-path.running {
  stroke: var(--color-warning);
  stroke-dasharray: 8 6;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.6));
  animation: dash 0.8s linear infinite;
}
.connection-path.failed {
  stroke: var(--color-danger);
  filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.5));
}

@keyframes dash {
  to {
    stroke-dashoffset: -14;
  }
}

/* --- View Toggle Button Group --- */
.view-toggle-group {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glow);
  padding: 3px;
  border-radius: 30px;
}
.btn-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-toggle:hover {
  color: var(--text-primary);
}
.btn-toggle.active {
  background: linear-gradient(135deg, var(--color-premium), #6366f1);
  color: white;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.4);
}

/* --- CI/CD Concept Workflow Panel --- */
.concept-card {
  box-shadow: var(--shadow-sm);
  background: var(--bg-panel);
}
.concept-card.active-concept {
  border-color: var(--color-premium) !important;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
  animation: concept-glow 1.5s infinite alternate;
}
.concept-card.active-concept-warning {
  border-color: var(--color-warning) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  animation: concept-glow-warning 1.5s infinite alternate;
}
.concept-card.status-success-card {
  background: var(--color-success) !important;
  border-color: var(--color-success) !important;
  opacity: 0.35;
}
.concept-card.status-success-card.active-concept {
  opacity: 1;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}
.concept-card.status-success-border-card {
  border: 2px solid var(--color-success) !important;
  opacity: 0.35;
}
.concept-card.status-success-border-card.active-concept {
  opacity: 1;
  background: rgba(16, 185, 129, 0.1) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}
.concept-card.status-fail-card {
  background: var(--color-danger) !important;
  border-color: var(--color-danger) !important;
  opacity: 0.35;
}
.concept-card.status-fail-card.active-concept {
  opacity: 1;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.6);
}

@keyframes concept-glow {
  from { box-shadow: 0 0 10px rgba(139, 92, 246, 0.1); }
  to { box-shadow: 0 0 20px rgba(139, 92, 246, 0.35); }
}
@keyframes concept-glow-warning {
  from { box-shadow: 0 0 10px rgba(245, 158, 11, 0.1); }
  to { box-shadow: 0 0 20px rgba(245, 158, 11, 0.35); }
}

/* --- Filterable Build History Panel Styling --- */
.history-panel {
  display: flex;
  flex-direction: column;
  max-height: 400px;
}

.history-count-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glow);
  padding: 2px 8px;
  border-radius: 12px;
}

.history-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.history-search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-sm);
  padding: 6px 10px;
  width: 100%;
}
.history-search-wrapper input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.8rem;
  color: var(--text-primary);
  width: 100%;
}

.history-chip-filters {
  display: flex;
  gap: 6px;
}
.chip-filter {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glow);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.chip-filter:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
.chip-filter.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--color-premium);
  color: #c4b5fd;
}

/* --- Build History Unified Table --- */
.build-history-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0 14px 14px 14px;
  max-height: 270px;
}

.build-history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.76rem;
  text-align: left;
}

.build-history-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(10px);
}

.build-history-table th {
  padding: 8px 10px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-glow);
  white-space: nowrap;
}

.build-history-table tbody tr.history-table-row {
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.build-history-table tbody tr.history-table-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.build-history-table tbody tr.history-table-row.selected {
  background: rgba(139, 92, 246, 0.12) !important;
  box-shadow: inset 3px 0 0 var(--color-premium);
}

.build-history-table td {
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table-build-status {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.table-build-id {
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.history-status-badge {
  font-size: 0.63rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  display: inline-block;
}

.history-status-badge.badge-success {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.history-status-badge.badge-failed {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.history-status-badge.badge-running {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.table-commit-info {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.table-branch-name {
  color: #c4b5fd;
  font-weight: 600;
  font-size: 0.74rem;
}

.table-commit-hash {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glow);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.table-duration-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.table-time-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.build-history-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glow);
  padding: 12px 14px;
  border-radius: var(--border-radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.history-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}
.history-card.selected {
  border-color: var(--color-premium);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}
.history-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.history-title {
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-indicator.success { background: var(--color-success); box-shadow: 0 0 8px var(--color-success); }
.status-indicator.failed { background: var(--color-danger); box-shadow: 0 0 8px var(--color-danger); }
.status-indicator.running { background: var(--color-warning); box-shadow: 0 0 8px var(--color-warning); }

.history-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.72rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.history-duration {
  font-family: var(--font-mono);
  font-weight: 600;
}

/* --- Smart Multi-Tab Terminal & Telemetry Suite --- */
.terminal-panel {
  display: flex;
  flex-direction: column;
}
.terminal-header-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.terminal-tabs-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background: #fc5c57; }
.dot-yellow { background: #fdbd2e; }
.dot-green { background: #35cd4b; }

.terminal-tab-buttons {
  display: flex;
  gap: 6px;
}
.terminal-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}
.terminal-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.terminal-tab-btn.active {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.35);
}
.tab-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 6px;
  border-radius: 10px;
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.terminal-search-box input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-sm);
  padding: 5px 10px;
  font-size: 0.78rem;
  color: var(--text-primary);
  outline: none;
  width: 140px;
  transition: var(--transition-fast);
}
.terminal-search-box input:focus {
  border-color: var(--color-premium);
  width: 180px;
}

.terminal-tab-content {
  width: 100%;
}

.terminal-console {
  background: #04060b;
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  height: 280px;
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  color: #abb2bf;
}
.terminal-line {
  margin-bottom: 4px;
  white-space: pre-wrap;
  animation: terminalFadeIn 0.15s ease-out;
}
@keyframes terminalFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.terminal-line.cmd { color: #61afef; }
.terminal-line.info { color: var(--color-info); }
.terminal-line.success { color: var(--color-success); }
.terminal-line.warning { color: var(--color-warning); }
.terminal-line.error { color: var(--color-danger); font-weight: 600; }
.terminal-line.system { color: var(--text-muted); font-style: italic; }

/* Diagnostics & AI Fix Inspector */
.diagnostics-view {
  background: #04060b;
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  min-height: 280px;
  padding: 24px;
}
.diagnostics-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  max-width: 520px;
  margin: 0 auto;
}
.icon-pulse-box {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.diagnostics-empty-state h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.diagnostics-empty-state p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Quality Matrix Grid */
.quality-matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: #04060b;
  padding: 24px;
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  min-height: 280px;
}
.matrix-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.matrix-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.matrix-val {
  font-size: 1.1rem;
  font-weight: 700;
}
.matrix-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.matrix-fill {
  height: 100%;
  border-radius: 4px;
}
.matrix-fill.success { background: var(--color-success); }
.matrix-fill.info { background: var(--color-info); }
.matrix-fill.warning { background: var(--color-warning); }
.matrix-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.env-table-wrapper {
  background: #04060b;
  padding: 18px 24px;
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  min-height: 280px;
}

/* --- PIPELINES EDITOR TAB LAYOUT --- */
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  min-width: 0;
  min-height: 600px;
}

.grid-item {
  min-width: 0;
  max-width: 100%;
}

.editor-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.editor-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
#editor-project-badge {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  vertical-align: middle;
}
.dirty-marker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-warning);
  display: none;
}
.dirty-marker.visible {
  display: inline-block;
}

.panel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.template-selector-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.template-selector-box select {
  max-width: 240px;
  min-width: 140px;
}

.yaml-editor-wrapper {
  flex-grow: 1;
  display: flex;
  background: #090d16;
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  padding: 16px;
  font-family: var(--font-mono);
}
.line-numbers {
  width: 35px;
  color: var(--text-muted);
  text-align: right;
  padding-right: 12px;
  user-select: none;
  font-size: 0.85rem;
  line-height: 1.5;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.line-number {
  height: 21px;
}
#yaml-textarea {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: #e2e8f0;
  resize: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  padding-left: 12px;
  overflow: auto;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
}
.preview-mode {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 280px;
  max-height: 320px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.06) 0%, transparent 75%);
}
#preview-nodes {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: max-content;
  margin: auto;
  position: relative;
  z-index: 2;
  padding: 0 16px;
}
.preview-inspector-card {
  border-top: 1px solid var(--border-glow);
  background: rgba(8, 12, 20, 0.7);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.inspector-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.inspector-stage-title {
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}
.inspector-steps-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 130px;
  overflow-y: auto;
}
.inspector-step-line {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius-sm);
  color: #a5b4fc;
  display: flex;
  align-items: center;
  gap: 8px;
}
.inspector-step-icon {
  color: var(--color-info);
  font-weight: bold;
}
.preview-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.validation-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
}
.validation-msg.success { color: var(--color-success); }
.validation-msg.error { color: var(--color-danger); }

/* --- BUILD RUNNERS TAB LAYOUT --- */
.runners-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.runners-header {
  margin-bottom: 24px;
}
.runners-header h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- BUILD RUNNERS / AGENTS TAB STYLING --- */
.runners-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.runners-header-left h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.runners-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.runners-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-control);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-md);
  padding: 6px 12px;
  min-width: 220px;
  height: 38px;
}
.runners-search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  outline: none;
  width: 100%;
}
.runner-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Dynamic Fleet Overview KPIs Strip */
.runners-fleet-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.fleet-kpi-card {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-glow);
  background: var(--bg-panel);
  transition: var(--transition-smooth);
}
.fleet-kpi-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}
.fleet-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fleet-kpi-icon.status-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.fleet-kpi-icon.status-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.fleet-kpi-icon.status-blue { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
.fleet-kpi-icon.status-purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.fleet-kpi-info { flex: 1; min-width: 0; }
.fleet-kpi-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 2px; }
.fleet-kpi-val { font-size: 1.15rem; font-weight: 700; font-family: var(--font-brand); color: var(--text-primary); }
.fleet-mini-bar { width: 48px; height: 5px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.fleet-mini-fill { height: 100%; background: linear-gradient(90deg, var(--color-info), var(--color-premium)); transition: width 0.6s ease; }
.fleet-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px #10b981; animation: pulse-dot-anim 1.8s infinite; margin-left: auto; }

.runners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.runner-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}
.runner-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.runner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--color-success);
}
.runner-card.offline::before {
  background: var(--text-muted);
}
.runner-card.busy::before {
  background: var(--color-warning);
}

.runner-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.runner-name {
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--font-brand);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.runner-ping-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.runner-info-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
}
.runner-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.runner-meta-label {
  color: var(--text-muted);
}
.runner-meta-val {
  font-weight: 500;
  color: var(--text-secondary);
}

.usage-meters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meter-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meter-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.meter-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}
.meter-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-info), var(--color-premium));
  border-radius: 10px;
  width: 0%;
  transition: width 0.6s cubic-bezier(0.1, 0.8, 0.2, 1), background 0.4s ease;
}

.runner-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-glow);
}
.runner-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-glow);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}
.runner-action-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--color-premium);
  color: var(--text-primary);
}
.runner-action-btn.active-load {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--color-danger);
  color: #fca5a5;
  animation: pulse-warn 1.5s infinite ease-in-out;
}

/* Light Mode Styling for New Runner Elements */
[data-theme="light"] .runners-search-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .fleet-kpi-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .runner-action-btn {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.1);
  color: #334155;
}
[data-theme="light"] .runner-action-btn:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: var(--color-premium);
  color: var(--color-premium);
}

/* --- ANALYTICS HEADER & TOOLBAR --- */
.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.analytics-header-left h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.analytics-header-left p.subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.analytics-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.analytics-range-chips {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-sm);
  padding: 3px;
  gap: 2px;
}
.range-chip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.range-chip:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.range-chip.active {
  background: var(--color-premium);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}
.analytics-select {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.78rem;
  padding: 6px 10px;
  outline: none;
  cursor: pointer;
}

/* Floating Chart Tooltip Popup */
.chart-tooltip-popup {
  position: absolute;
  pointer-events: none;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: opacity 0.15s ease;
  min-width: 175px;
}
.chart-tooltip-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chart-tooltip-row {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
}
.chart-tooltip-label {
  color: var(--text-muted);
}
.chart-tooltip-val {
  font-weight: 600;
  color: var(--text-primary);
}

/* Breakdown layout */
.breakdown-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 14px;
  gap: 16px;
  flex-wrap: wrap;
}
.breakdown-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  flex: 1;
}
.breakdown-stat-item {
  display: flex;
  flex-direction: column;
}
.breakdown-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.breakdown-stat-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-brand);
}

/* Stage trend bar */
.stage-trend-bar {
  width: 60px;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}
.stage-trend-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--color-success);
}

/* --- ANALYTICS TAB LAYOUT --- */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  width: 100%;
}
.card-half { grid-column: span 3; }
.card-third { grid-column: span 2; }
.card-two-thirds { grid-column: span 4; }

.chart-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.chart-container {
  flex-grow: 1;
  padding: 10px 20px 20px 20px;
  position: relative;
  min-height: 200px;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dynamic SVG chart aesthetics */
.chart-line {
  fill: none;
  stroke: var(--color-premium);
  stroke-width: 3px;
  stroke-linecap: round;
  filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3));
}
.chart-line-glow {
  fill: none;
  stroke: var(--color-premium);
  stroke-width: 8px;
  opacity: 0.15;
}
.chart-area {
  fill: url(#chart-gradient);
  opacity: 0.1;
}
.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1;
}
.chart-axis-text {
  fill: var(--text-muted);
  font-size: 10px;
  font-family: var(--font-sans);
}
.chart-dot {
  fill: var(--bg-app);
  stroke: var(--color-info);
  stroke-width: 2px;
  cursor: pointer;
  transition: r 0.2s ease;
}
.chart-dot:hover {
  r: 6px;
}

.chart-bar {
  fill: url(#bar-gradient);
  rx: 4;
  ry: 4;
  transition: transform 0.3s ease;
}
.chart-bar:hover {
  filter: brightness(1.2);
}

/* Circle Gauge */
.gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 12;
}
.gauge-fill {
  fill: none;
  stroke: url(#gauge-gradient);
  stroke-width: 12;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1s ease-out;
}
.gauge-center-text {
  font-family: var(--font-brand);
  fill: var(--text-primary);
  font-size: 26px;
  font-weight: 700;
  text-anchor: middle;
}
.gauge-label {
  fill: var(--text-secondary);
  font-size: 11px;
  text-anchor: middle;
}

/* Analytics Table styling */
.table-card {
  min-height: 280px;
}
.table-wrapper {
  overflow-x: auto;
  padding: 0 24px 20px 24px;
}
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
.analytics-table th {
  padding: 12px 16px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-glow);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
.analytics-table td {
  padding: 14px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-glow);
}
.analytics-table tr:last-child td {
  border-bottom: none;
}
.bold-text {
  font-weight: 600;
  color: var(--text-primary) !important;
}
.text-success { color: var(--color-success); font-weight: 600; }
.text-warning { color: var(--color-warning); font-weight: 600; }
.text-rose { color: var(--color-danger); font-weight: 600; }

/* --- MODAL DIALOGS --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 6, 11, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  width: 460px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-glow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: var(--transition-fast);
}
.btn-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.variables-area {
  background: var(--bg-control);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-md);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: var(--transition-fast);
}
.variables-area:focus {
  border-color: var(--color-premium);
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  user-select: none;
}
.checkbox-label input {
  accent-color: var(--color-premium);
  width: 16px;
  height: 16px;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-glow);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   Mobile Navigation Elements & Responsive Infrastructure
   ========================================================================== */
.mobile-header-brand {
  display: none;
  align-items: center;
  gap: 12px;
}

.btn-mobile-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg-control);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-mobile-menu:hover, .btn-mobile-menu:active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--color-premium);
}

.mobile-brand-title {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* Mobile Sticky Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(13, 18, 30, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glow);
  z-index: 990;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  flex: 1;
}

.mobile-nav-item svg {
  transition: var(--transition-fast);
}

.mobile-nav-item.active {
  color: var(--color-premium);
}

.mobile-nav-item.active svg {
  color: var(--color-premium);
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.6));
  transform: translateY(-1px);
}

/* Ensure horizontal scroll on the pipeline graph on mobile */
.pipeline-graph-container {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: 8px;
}

.pipeline-nodes-wrapper {
  min-width: max-content;
  padding-right: 20px;
}

/* ==========================================================================
   Comprehensive Responsive Breakpoints (All Sections)
   ========================================================================== */

/* --- Breakpoint: Extra Large / Large Laptops (<= 1200px) --- */
@media (max-width: 1200px) {
  .editor-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .span-two-thirds, .span-full {
    grid-column: span 1;
  }
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  .card-half, .card-third, .card-two-thirds {
    grid-column: span 1;
  }
  .main-content {
    padding: 0 24px 32px 24px;
  }
  .capsule-select {
    max-width: 180px;
  }
}

/* --- Breakpoint: Tablets & Small Laptops (<= 1024px) --- */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    width: 280px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 0 16px 85px 16px;
    width: 100%;
  }

  .mobile-header-brand {
    display: flex;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .top-bar {
    height: auto;
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 12px;
  }

  .header-left-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-select-capsule {
    width: 100%;
    justify-content: space-between;
    height: auto;
    min-height: 42px;
    padding: 6px 12px;
  }

  .capsule-select {
    flex: 1;
    min-width: 0;
    max-width: none;
  }

  .header-right-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
  }

  .header-right-group .header-btn, 
  .header-right-group .ws-badge {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    min-width: 130px;
  }

  .header-right-group #trigger-build-btn {
    flex: 1 1 100%;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .runners-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .modal-box {
    max-width: 94vw;
    margin: 16px auto;
    padding: 18px;
  }

  /* Responsive Concept Flow View */
  #pipeline-concept-container {
    min-height: auto !important;
    overflow-x: auto !important;
    padding-bottom: 16px !important;
  }

  #concept-connections {
    display: none !important;
  }

  .concept-nodes-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 14px !important;
    min-width: max-content !important;
    position: static !important;
    padding: 8px 4px !important;
  }

  .concept-card {
    position: static !important;
    width: 210px !important;
    flex-shrink: 0 !important;
    left: auto !important;
    top: auto !important;
  }
}

/* --- Breakpoint: Small Mobile Phones & Tablets Portrait (<= 768px) --- */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .main-content {
    padding: 0 10px 85px 10px;
  }

  .panel-header {
    padding: 14px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .panel-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .view-toggle-group {
    width: 100%;
    display: flex;
  }

  .btn-toggle {
    flex: 1;
    text-align: center;
  }

  .editor-meta {
    width: 100%;
  }

  .template-selector-box {
    width: 100%;
    justify-content: space-between;
  }

  .template-selector-box select {
    flex: 1;
  }

  .yaml-editor-wrapper {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  #yaml-textarea {
    font-size: 0.8rem;
  }

  .pipeline-graph-container {
    padding: 12px 14px 18px 14px;
  }

  .preview-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .table-wrapper, .env-table-wrapper {
    padding: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .form-row {
    flex-direction: column;
    gap: 8px;
  }

  .approval-card {
    max-width: 95vw !important;
    padding: 18px 14px !important;
  }

  .approval-actions {
    flex-direction: column;
    width: 100%;
  }

  .approval-actions button {
    width: 100%;
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer button {
    width: 100%;
  }

  .toast-container {
    left: 10px;
    right: 10px;
    top: 10px;
  }

  .webhook-toast {
    min-width: unset;
    max-width: 100%;
  }
}

/* --- Breakpoint: Ultra-Small Phones (<= 480px) --- */
@media (max-width: 480px) {
  .stats-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 12px 14px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .header-right-group .header-btn, 
  .header-right-group .ws-badge {
    flex: 1 1 100%;
  }

  .auth-card {
    padding: 22px 16px;
  }

  .demo-roles-grid {
    grid-template-columns: 1fr;
  }

  .custom-select, .btn {
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   Manual Release Approval Overlay
   ========================================================================== */
.manual-approval-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 11, 16, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  animation: fadeIn 0.25s ease-out;
}

.approval-card {
  max-width: 440px;
  background: rgba(20, 26, 42, 0.9) !important;
  border: 1px solid var(--border-focus) !important;
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.3) !important;
  padding: 28px !important;
  border-radius: var(--border-radius-lg) !important;
  text-align: left;
  animation: scaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.approval-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.approval-header h4 {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.approval-warning-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(245, 158, 11, 0.25);
  animation: pulse-warn 2s infinite ease-in-out;
}

.approval-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.approval-desc strong {
  color: var(--text-primary);
}

.approval-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
}

@keyframes scaleUp {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse-warn {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* ==========================================================================
   WebSocket Status Badge & Live GitHub Webhook UI
   ========================================================================== */
.ws-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-glow);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.ws-badge.connected {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.ws-badge.connected .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot-anim 1.8s infinite;
}

.ws-badge.standalone {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.ws-badge.standalone .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* --- Toast Notifications System --- */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.webhook-toast {
  pointer-events: auto;
  min-width: 360px;
  max-width: 440px;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.2);
  border-radius: var(--border-radius-md);
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.webhook-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.toast-body {
  flex: 1;
}

.toast-title {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.toast-time {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}

.toast-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.toast-meta {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-premium);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
}
.toast-close:hover {
  color: var(--text-primary);
}

/* Webhook Test Modal Extra Styles */
.webhook-code-box {
  background: rgba(8, 12, 20, 0.8);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #93c5fd;
  overflow-x: auto;
  user-select: all;
  margin-bottom: 12px;
}

.error-preset-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  border: 1px solid var(--border-glow);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.error-preset-badge:hover, .error-preset-badge.selected {
  border-color: var(--color-danger);
  background: rgba(244, 63, 94, 0.15);
  color: #fca5a5;
}

/* ==========================================================================
   Authentication & Role-Based Access Control (RBAC) Styles
   ========================================================================== */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 9, 16, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.auth-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

.auth-card {
  background: rgba(16, 22, 38, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(139, 92, 246, 0.1);
  max-width: 480px;
  width: 100%;
  padding: 32px 28px;
  animation: authCardPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authCardPop {
  0% { transform: scale(0.95) translateY(10px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px auto;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-premium), var(--color-info));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-role-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-role-divider::before, .auth-role-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-glow);
}
.auth-role-divider::before { margin-right: 12px; }
.auth-role-divider::after { margin-left: 12px; }

.demo-roles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.demo-role-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glow);
  border-radius: var(--border-radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.demo-role-card:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--color-premium);
  transform: translateY(-2px);
}

.demo-role-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.demo-role-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.demo-role-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Permission Locked Elements */
.permission-locked {
  position: relative;
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  pointer-events: auto !important;
}

.permission-locked::after {
  content: '🔒';
  font-size: 0.75rem;
  margin-left: 6px;
}

.permission-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.78rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Light Mode Overrides for Auth */
[data-theme="light"] .auth-overlay {
  background: rgba(241, 245, 249, 0.94);
}

[data-theme="light"] .auth-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .demo-role-card {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .demo-role-card:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: var(--color-premium);
}

/* Light Mode Overrides for Analytics */
[data-theme="light"] .analytics-range-chips {
  background: #e2e8f0;
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .range-chip {
  color: #64748b;
}
[data-theme="light"] .range-chip:hover {
  color: #0f172a;
  background: #cbd5e1;
}
[data-theme="light"] .range-chip.active {
  background: var(--color-premium);
  color: #ffffff;
}
[data-theme="light"] .analytics-select {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.14);
  color: #0f172a;
}
[data-theme="light"] .chart-tooltip-popup {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(0, 0, 0, 0.12);
  color: #334155;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.15);
}
[data-theme="light"] .chart-tooltip-title {
  color: #0f172a;
}
[data-theme="light"] .chart-tooltip-val {
  color: #0f172a;
}
[data-theme="light"] .stage-trend-bar {
  background: rgba(0, 0, 0, 0.06);
}

/* Users & Access Module Styles */
.user-row-item {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.user-row-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  box-shadow: inset 2px 0 0 var(--color-premium);
}
[data-theme="light"] .user-row-item:hover {
  background: rgba(0, 0, 0, 0.03) !important;
  box-shadow: inset 2px 0 0 var(--color-premium);
}
#users-details-table th {
  user-select: none;
}
.btn-user-action-details:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}
.btn-user-action-switch:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
}

/* Hide Pipeline Top Bar and Global Pipeline Metrics Strip when on Users & Access Module */
[data-active-tab="users"] #main-top-bar,
[data-active-tab="users"] #global-stats-strip,
body.tab-active-users #main-top-bar,
body.tab-active-users #global-stats-strip {
  display: none !important;
}
