/* ==========================================
   🎨 DESIGN SYSTEM: ORCHESTRA SYSTEM
   Aesthetics: Deep Dark Mode, Glassmorphism, Neon Glows, Micro-animations
   ========================================== */

:root {
  --bg-main: #0a0a0f;
  --bg-card: rgba(18, 18, 29, 0.65);
  --bg-modal: rgba(13, 13, 22, 0.95);
  --border-light: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(99, 102, 241, 0.4);
  
  /* Harmonious Palette (HSL Tailored) */
  --primary: #6366f1; /* Deep Indigo */
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  
  --secondary: #3b82f6; /* Ocean Blue */
  --accent: #06b6d4; /* Neon Cyan */
  
  --color-pending: #f59e0b; /* Vibrant Amber */
  --color-processing: #06b6d4; /* Cyan */
  --color-feedback: #ec4899; /* Hot Pink */
  --color-completed: #10b981; /* Emerald */
  
  --text-main: #f3f4f6;
  --text-sec: #9ca3af;
  --text-muted: #6b7280;
  
  --font-family: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-neon: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Background Glowing Orbs */
.glow-bg {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}

.glow-1 {
  background: var(--primary);
  top: -10%;
  left: -10%;
}

.glow-2 {
  background: var(--accent);
  bottom: -10%;
  right: -10%;
}

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

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Header Component */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.4));
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(100deg, #fff, #a5b4fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo p {
  font-size: 0.7rem;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer Component & Active Agents section */
.system-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-light);
  padding: 0.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.agents-status-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
}

.section-title-sm {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.agents-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.agent-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.agent-badge:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.agent-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.indicator-ready {
  background: var(--color-completed);
  box-shadow: 0 0 8px var(--color-completed);
}

.indicator-working {
  background: var(--color-processing);
  box-shadow: 0 0 8px var(--color-processing);
  animation: pulse-glow 1.5s infinite;
}

.indicator-offline {
  background: var(--text-muted);
}

.agent-name {
  font-weight: 500;
  color: var(--text-main);
}

.agent-type {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border-radius: 6px;
}

/* Card Action Buttons */
.card-btn-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-sec);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.card-btn-action:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-card-cancel {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.btn-card-cancel:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.btn-card-delete {
  color: #9ca3af;
}

.btn-card-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-clear-done {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-clear-done:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* Kanban Board Container */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 1.25rem 2rem;
  height: calc(100vh - 135px);
  align-items: stretch;
}

.kanban-column {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-neon);
}

.column-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.column-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-pending { background: var(--color-pending); box-shadow: 0 0 8px var(--color-pending); }
.dot-processing { background: var(--color-processing); box-shadow: 0 0 8px var(--color-processing); }
.dot-feedback { background: var(--color-feedback); box-shadow: 0 0 8px var(--color-feedback); }
.dot-completed { background: var(--color-completed); box-shadow: 0 0 8px var(--color-completed); }

.column-count {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-sec);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.card-list {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  flex-grow: 1;
}

/* Kanban Cards */
.kanban-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.kanban-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
}

.card-pending::before { background: var(--color-pending); }
.card-processing::before { background: var(--color-processing); }
.card-feedback::before { background: var(--color-feedback); }
.card-completed::before { background: var(--color-completed); }

.kanban-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.card-id {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.priority-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-1 { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.priority-2 { background: rgba(245, 158, 11, 0.15); color: #fde047; }
.priority-3 { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

.card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

.card-body-text {
  font-size: 0.78rem;
  color: var(--text-sec);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-agent-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-sec);
}

.card-agent-tag i {
  font-size: 0.7rem;
  color: var(--primary);
}

.card-time {
  font-size: 0.7rem;
}

/* Card current step progress indicator (for In Progress) */
.card-progress-bar-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.progress-text {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.progress-text i {
  animation: spin 2s linear infinite;
}

/* Modals Overlay & Structure */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 8, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  width: 100%;
  max-width: 550px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--shadow-neon);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-large {
  max-width: 900px;
  width: 90%;
  height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-blue {
  color: var(--secondary);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem 1.75rem;
}

.modal-scrollable {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
}

.modal-footer {
  padding: 1rem 1.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.col-6 { width: 50%; }
.col-4 { width: 33.33%; }
.col-8 { width: 66.66%; }

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

input[type="text"],
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
  font-family: var(--font-family);
  font-size: 0.88rem;
  transition: var(--transition-smooth);
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea {
  resize: vertical;
}

.code-font {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  line-height: 1.4;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-group label {
  margin-bottom: 0;
  text-transform: none;
  cursor: pointer;
}

/* Task Detail Title Area */
.modal-title-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.task-badge-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-light);
  color: var(--text-sec);
  text-transform: uppercase;
}

.badge-status {
  text-transform: uppercase;
}

.badge-status-pending { background: rgba(245, 158, 11, 0.1); color: var(--color-pending); border-color: rgba(245, 158, 11, 0.2); }
.badge-status-processing { background: rgba(6, 182, 212, 0.1); color: var(--color-processing); border-color: rgba(6, 182, 212, 0.2); }
.badge-status-feedback { background: rgba(236, 72, 153, 0.1); color: var(--color-feedback); border-color: rgba(236, 72, 153, 0.2); }
.badge-status-completed { background: rgba(16, 185, 129, 0.1); color: var(--color-completed); border-color: rgba(16, 185, 129, 0.2); }
.badge-status-failed { background: rgba(239, 68, 68, 0.1); color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }

.request-desc {
  font-size: 0.85rem;
  color: var(--text-sec);
  background: rgba(0, 0, 0, 0.15);
  border-left: 2px solid var(--primary);
  padding: 6px 12px;
  border-radius: 4px;
}

/* Modal Tabs Header */
.modal-tabs {
  display: flex;
  padding: 0 1.75rem;
  border-bottom: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.15);
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-sec);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* Tab Contents */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

.tab-desc-alert {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-desc-alert i {
  color: var(--primary);
}

/* TAB 1: TIMELINE DESIGN */
.timeline-meta-box {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-sec);
}

.timeline-meta-box span {
  color: var(--text-main);
  font-weight: 500;
}

.timeline-meta-box i {
  color: var(--accent);
  margin-right: 4px;
}

/* Tree-structured Timeline layout */
.timeline-tree {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

.timeline-tree::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 5px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-node {
  position: relative;
  margin-bottom: 1.5rem;
}

.node-marker {
  position: absolute;
  left: -29px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-modal);
  border: 2px solid var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.6rem;
  z-index: 2;
  transition: var(--transition-smooth);
}

.node-marker-success { border-color: var(--color-completed); color: var(--color-completed); }
.node-marker-success i { filter: drop-shadow(0 0 4px var(--color-completed)); }

.node-marker-error { border-color: #ef4444; color: #ef4444; }
.node-marker-feedback { border-color: var(--color-feedback); color: var(--color-feedback); }
.node-marker-pending { border-color: var(--color-pending); color: var(--color-pending); }

.node-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1rem;
  transition: var(--transition-smooth);
}

.node-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.node-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.node-badge-action {
  font-size: 0.65rem;
  background: rgba(99, 102, 241, 0.1);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
}

.node-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.node-output {
  font-size: 0.8rem;
  color: var(--text-sec);
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-top: 0.5rem;
  white-space: pre-wrap;
  max-height: 250px;
  overflow-y: auto;
}

.node-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.node-feedback-badge {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-node-feedback {
  background: none;
  border: none;
  color: var(--color-feedback);
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  transition: var(--transition-smooth);
}

.btn-node-feedback:hover {
  text-decoration: underline;
  filter: brightness(1.2);
}

/* Feedback panel inside TIMELINE tab */
.feedback-panel {
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.5rem;
  animation: slideUp 0.3s ease;
}

.feedback-panel h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fbbf24;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

/* TAB 3: SCENARIO STEPS CONFIG */
.steps-config-container {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.scenario-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.step-config-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px;
}

.step-number-tag {
  background: var(--primary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.step-config-item input[type="text"] {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.btn-remove-step {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.btn-remove-step:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.scen-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(23, 23, 35, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-focus);
  color: var(--text-main);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.2);
  font-size: 0.85rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

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

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

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 12px 6px rgba(6, 182, 212, 0); }
  100% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

/* ==========================================
   ⚙️ SYSTEM CONFIGURATION TAB STYLING
   ========================================== */
.sys-tab-btn {
  background: none;
  border: none;
  color: var(--text-sec);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sys-tab-btn:hover {
  color: var(--text-main);
}

.sys-tab-btn.active {
  color: var(--primary);
  font-weight: 600;
}

.sys-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.sys-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.sys-tab-content.active {
  display: block;
}

/* ==========================================
   🌐 MAIN NAVIGATION & VIEWS
   ========================================== */
.main-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 2rem;
  background: rgba(13, 13, 22, 0.4);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.main-tab-btn {
  background: none;
  border: none;
  color: var(--text-sec);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
}

.main-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.main-tab-btn.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.views-container {
  padding-bottom: 70px; /* Spacer for bottom footer */
}

.main-view {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-view.active {
  display: block;
}

/* ==========================================
   ⚙️ SYSTEM CONFIGURATION TAB STYLING (FULL SCREEN VIEW)
   ========================================== */
.config-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 15px;
}

.config-title-group h2 {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-title-group p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.config-node-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-node-selector label {
  margin-bottom: 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.config-node-selector select {
  width: 320px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .config-grid {
    grid-template-columns: 1fr;
  }
}

.config-column-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-neon);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.card-section-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.select-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.select-row label {
  margin-bottom: 0;
  font-size: 0.8rem;
  white-space: nowrap;
}

.form-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

/* ==========================================
   📖 DEVELOPER GUIDE VIEW STYLING
   ========================================== */
.guide-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guide-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
}

.guide-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-header p {
  color: var(--text-sec);
  font-size: 0.85rem;
  margin-top: 4px;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 850px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

.guide-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-neon);
}

.guide-panel h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guide-panel p {
  font-size: 0.85rem;
  color: var(--text-sec);
  line-height: 1.5;
}

.api-table-wrapper {
  margin-top: 1rem;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

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

.api-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  color: var(--text-main);
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
}

.api-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-sec);
}

.api-table tr:last-child td {
  border-bottom: none;
}

.api-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  display: inline-block;
}

.api-badge.post { background: #10b981; } /* Emerald */
.api-badge.get { background: #3b82f6; } /* Blue */
.api-badge.put { background: #f59e0b; } /* Amber */
.api-badge.delete { background: #ef4444; } /* Red */

.code-example-section h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.code-block {
  background: #07070a;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  color: #a5b4fc;
}
