:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --bg-input: #1f2937;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-cyan: #06b6d4;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;

  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(6, 182, 212, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 30px 40px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  padding: 10px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.brand-text h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge,
.header-dropdown-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 0.85rem;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.header-dropdown-badge:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(31, 41, 55, 0.7);
}

.dropdown-badge-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dropdown-badge-icon {
  font-size: 1.05rem;
}

.header-dropdown-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.header-dropdown-select:hover {
  color: #ffffff;
}

.header-dropdown-select:focus {
  background: rgba(255, 255, 255, 0.1);
}

.header-dropdown-select option {
  background-color: #111827;
  color: #f9fafb;
  font-weight: 500;
  padding: 8px;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-success);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Environment Badge Color Variants */
.env-badge.env-prod,
.env-dropdown-badge.env-prod {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.1);
}
.env-badge.env-prod .indicator-dot,
.env-dropdown-badge.env-prod .indicator-dot {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}
.env-dropdown-badge.env-prod .header-dropdown-select {
  color: #34d399;
}

.env-badge.env-qa,
.env-dropdown-badge.env-qa {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.1);
}
.env-badge.env-qa .indicator-dot,
.env-dropdown-badge.env-qa .indicator-dot {
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
}
.env-dropdown-badge.env-qa .header-dropdown-select {
  color: #60a5fa;
}

.env-badge.env-qa2,
.env-dropdown-badge.env-qa2 {
  border-color: rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.1);
}
.env-badge.env-qa2 .indicator-dot,
.env-dropdown-badge.env-qa2 .indicator-dot {
  background: #06b6d4;
  box-shadow: 0 0 10px #06b6d4;
}
.env-dropdown-badge.env-qa2 .header-dropdown-select {
  color: #22d3ee;
}

.env-badge.env-uat,
.env-dropdown-badge.env-uat {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
}
.env-badge.env-uat .indicator-dot,
.env-dropdown-badge.env-uat .indicator-dot {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}
.env-dropdown-badge.env-uat .header-dropdown-select {
  color: #fbbf24;
}

.browser-badge,
.browser-dropdown-badge {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.08);
}
.browser-dropdown-badge .header-dropdown-select {
  color: #a5b4fc;
}

/* Navigation Tabs */
.app-nav {
  display: flex;
  gap: 8px;
  background: rgba(17, 24, 39, 0.6);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
}

.nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Main Content */
.main-content {
  flex: 1;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.tab-panel.active {
  display: block;
}

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

.panel-header-desc {
  margin-bottom: 20px;
}

.panel-header-desc h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.panel-header-desc p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(16px);
  box-shadow: var(--glass-shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-accent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
}

.btn-accent:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.btn-danger {
  background: var(--accent-danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Toolbar */
.panel-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.toolbar-search {
  flex: 1;
  min-width: 250px;
}

.toolbar-search input {
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.toolbar-search input:focus {
  border-color: var(--accent-primary);
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.toolbar-filters select {
  padding: 9px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

/* Tests Grid */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.test-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}

.test-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.test-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.test-file-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 4px 8px;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.25);
  word-break: break-all;
}

.test-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.35;
}

.test-preview-snippet {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  margin-bottom: 14px;
  max-height: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-line;
}

.test-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.tag-chip {
  font-size: 0.75rem;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tag-chip.tag-smoke { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.tag-chip.tag-p1 { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.tag-chip.tag-regression { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; border-color: rgba(99, 102, 241, 0.3); }
.tag-chip.tag-login { background: rgba(6, 182, 212, 0.15); color: #67e8f9; border-color: rgba(6, 182, 212, 0.3); }

.test-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* Tag Mapping Matrix & Layout */
.tags-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.tag-cloud {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
}

.tag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.tag-item:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

.tag-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 9999px;
  color: var(--text-secondary);
}

/* Data Table */
.table-container {
  overflow-x: auto;
}

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

.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Runner & Terminal */
.runner-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
}

.runner-controls-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-primary);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  cursor: pointer;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.runner-action-bar {
  margin-top: 10px;
}

/* Terminal Card */
.terminal-card {
  background: #07090e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d111a;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-body {
  flex: 1;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.6;
  color: #38bdf8;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-y: auto;
  max-height: 600px;
}

/* Reports */
.reports-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 650px;
  overflow-y: auto;
}

.report-item {
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.report-item:hover, .report-item.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

.report-item-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 4px;
  word-break: break-all;
}

.report-item-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.report-iframe-container {
  height: 650px;
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.report-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6b7280;
  gap: 12px;
}

.empty-icon {
  font-size: 3rem;
}

/* JSON Editor */
.json-editor {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: #080c14;
  color: #e2e8f0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  outline: none;
  resize: vertical;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 92%;
  max-width: 650px;
  max-height: 86vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  animation: slideUpModal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  flex: 0 0 auto;
  background: rgba(17, 24, 39, 0.95);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.2);
}

/* Sleek Single-Frame Scrollbar for Modals */
.modal-body::-webkit-scrollbar {
  width: 7px;
}
.modal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.modal-footer {
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  background: rgba(10, 15, 26, 0.95);
  flex: 0 0 auto;
}

/* Dedicated Codegen Single-Frame Frame & Scroller Rules */
#modalCodegen .modal-dialog {
  max-width: 860px;
  width: 94%;
  height: 86vh;
  max-height: 86vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#modalCodegen .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#modalCodegen .codegen-info-banner {
  flex: 0 0 auto;
  margin-bottom: 4px;
}

#modalCodegen .codegen-status-card {
  flex: 0 0 auto;
  margin: 6px 0;
}

#modalCodegen .codegen-save-section {
  flex: 0 0 auto;
}

#codegenSaveSteps {
  min-height: 120px;
  max-height: 220px;
  resize: vertical;
  overflow-y: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(0, 0, 0, 0.3);
}

#codegenSaveSteps::-webkit-scrollbar {
  width: 6px;
}
#codegenSaveSteps::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
#codegenSaveSteps::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Test Card Environment Match Badges */
.test-env-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tag-env-match {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.tag-env-compat {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.tag-env-other {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.25);
}

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

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  animation: slideUp 0.25s ease;
}

.toast.success { border-left: 4px solid var(--accent-success); }
.toast.error { border-left: 4px solid var(--accent-danger); }
.toast.info { border-left: 4px solid var(--accent-primary); }

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

/* Environments & Endpoints Grid */
.env-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.env-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.env-card.active-env {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.env-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.env-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.env-endpoints-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.env-endpoint-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
}

.env-endpoint-key {
  color: #38bdf8;
  font-weight: 600;
}

.env-endpoint-val {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* Codegen Callout in E2E Modal */
.codegen-callout-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 18px;
}

.codegen-callout-box .callout-icon {
  font-size: 1.5rem;
}

.codegen-callout-box .callout-content {
  flex: 1;
}

.codegen-callout-box .callout-content strong {
  color: #fbbf24;
  font-size: 0.88rem;
  display: block;
}

.codegen-callout-box .callout-content p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 2px;
}

/* Codegen Modal Info Banner */
.codegen-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.codegen-info-banner .info-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.codegen-info-banner .info-text {
  color: #e0e7ff;
}

.codegen-info-banner .info-text strong {
  color: #a5b4fc;
}

/* Codegen Status & Launch Card */
.codegen-status-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 18px 0;
  transition: all 0.25s ease;
}

.codegen-status-card.active-recording {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

.codegen-status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.25s ease;
}

.status-indicator-dot.idle {
  background: var(--text-muted);
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.status-indicator-dot.recording {
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
  animation: pulseRecording 1.4s infinite ease-in-out;
}

@keyframes pulseRecording {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.codegen-status-actions {
  display: flex;
  gap: 8px;
}

/* Save Recorded Test Section */
.codegen-save-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 16px;
}


