/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  /* Colors */
  --bg-main: hsl(210, 30%, 98%);
  --bg-card: hsl(0, 0%, 100%);
  --bg-card-hover: hsl(210, 20%, 99%);
  
  --primary: hsl(262, 83%, 58%);
  --primary-light: hsl(262, 85%, 95%);
  --primary-dark: hsl(262, 83%, 45%);
  --primary-glow: hsla(262, 83%, 58%, 0.15);
  
  --secondary: hsl(180, 70%, 42%);
  --secondary-light: hsl(180, 70%, 95%);
  --secondary-glow: hsla(180, 70%, 42%, 0.15);
  
  --text-dark: hsl(220, 40%, 15%);
  --text-medium: hsl(220, 20%, 40%);
  --text-light: hsl(220, 15%, 60%);
  
  --border-color: hsl(210, 20%, 93%);
  --border-focus: hsl(262, 83%, 75%);
  
  /* Status Colors */
  --success: hsl(142, 72%, 40%);
  --success-light: hsl(142, 70%, 95%);
  --warning: hsl(38, 92%, 50%);
  --warning-light: hsl(38, 90%, 95%);
  --danger: hsl(350, 89%, 60%);
  --danger-light: hsl(350, 90%, 96%);
  --info: hsl(200, 90%, 45%);
  --info-light: hsl(200, 90%, 95%);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 16px -8px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 35px -10px rgba(99, 102, 241, 0.08), 0 10px 20px -10px rgba(0, 0, 0, 0.04);
  
  /* Borders */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   BASE STYLES & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-dark);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.app-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-main {
  flex: 1;
  padding: 2.5rem 2rem;
}

.main-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.app-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* ==========================================================================
   HEADER COMPONENTS
   ========================================================================== */
.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, hsl(285, 80%, 55%) 100%);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px hsla(262, 83%, 58%, 0.3);
}

.brand-text h1 {
  font-size: 1.5rem;
  line-height: 1.2;
}

.brand-text h1 span {
  background: linear-gradient(135deg, var(--primary) 0%, hsl(285, 80%, 55%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.8rem;
  color: var(--text-medium);
  font-weight: 500;
}

/* ==========================================================================
   CARDS & CONTAINERS
   ========================================================================== */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.card-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.card-body {
  padding: 2rem;
}

/* Setup Grid */
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

/* ==========================================================================
   FORM CONTROLS
   ========================================================================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: var(--bg-card);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrapper input {
  padding-right: 3rem;
}

.btn-toggle-input {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 3.5rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

.btn-toggle-input:hover {
  color: var(--text-dark);
}

.form-help {
  display: block;
  font-size: 0.8rem;
  color: var(--text-medium);
  margin-top: 0.35rem;
}

.text-warning {
  color: var(--warning) !important;
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  margin: 1rem 0 0.5rem 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.numeric-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Tooltips */
.tooltip-wrapper {
  position: relative;
  cursor: help;
  display: inline-flex;
}

.tooltip-icon {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

.tooltip-icon:hover {
  color: var(--primary);
}

.tooltip-text {
  visibility: hidden;
  width: 220px;
  background-color: var(--text-dark);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 0.5rem;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  margin-left: -110px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  font-size: 0.75rem;
  font-weight: 400;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  line-height: 1.3;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--text-dark) transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip-text {
  visibility: visible;
  opacity: 0.95;
}

/* ==========================================================================
   FILE UPLOAD AREA
   ========================================================================== */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  background-color: var(--bg-main);
  position: relative;
  transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.dropzone-icon {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
  transition: transform var(--transition-normal);
}

.dropzone:hover .dropzone-icon {
  transform: translateY(-5px);
}

.dropzone h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.dropzone p {
  color: var(--text-medium);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.dropzone-limits {
  font-size: 0.75rem;
  color: var(--text-light);
}

.upload-status-box {
  margin-top: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background-color: var(--bg-card);
}

.file-details {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.file-details i {
  font-size: 1.8rem;
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* allows text truncation */
}

.file-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-light);
}

.uploading-spinner {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-medium);
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.btn-large {
  padding: 0.9rem 2.2rem;
  font-size: 1.05rem;
  border-radius: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, hsl(285, 80%, 55%) 100%);
  color: white;
  box-shadow: 0 4px 15px hsla(262, 83%, 58%, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px hsla(262, 83%, 58%, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-primary-outline:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-main);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: hsl(210, 20%, 94%);
  transform: translateY(-1px);
}

.btn-secondary-outline {
  background-color: transparent;
  color: var(--text-medium);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

.btn-secondary-outline:hover {
  background-color: var(--bg-main);
  color: var(--text-dark);
  border-color: var(--text-light);
}

.btn-teal {
  background: linear-gradient(135deg, var(--secondary) 0%, hsl(195, 85%, 45%) 100%);
  color: white;
  box-shadow: 0 4px 15px hsla(180, 70%, 42%, 0.25);
}

.btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px hsla(180, 70%, 42%, 0.35);
}

.btn-danger-outline {
  background-color: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger-outline:hover {
  background-color: var(--danger-light);
  transform: translateY(-1px);
}

.btn-glow {
  position: relative;
}

.btn-glow::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: inherit;
  box-shadow: inherit;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-glow:hover::after {
  opacity: 1;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-danger-soft {
  background-color: var(--danger-light);
  color: var(--danger);
}

.btn-danger-soft:hover {
  background-color: hsl(350, 90%, 90%);
}

.btn-text-only {
  background: none;
  border: none;
  color: var(--text-light);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-text-only:hover {
  color: var(--text-dark);
  text-decoration: underline;
}

/* Disabled link state */
.disabled-link {
  pointer-events: none;
  opacity: 0.5;
  box-shadow: none !important;
}

/* ==========================================================================
   PROMPT BUILDER & COLUMN TAGS
   ========================================================================== */
.prompt-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.columns-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.col-tag {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-medium);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.col-tag:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

.col-tag i {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Prompts List & Subcards */
.prompts-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.prompt-subcard {
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  position: relative;
  transition: border-color var(--transition-normal);
}

.prompt-subcard:hover {
  border-color: var(--border-focus);
}

.prompt-subcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.prompt-number {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.prompt-row-fields {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 600px) {
  .prompt-row-fields {
    grid-template-columns: 1fr;
  }
}

.system-prompt-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-medium);
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.system-prompt-toggle input {
  cursor: pointer;
}

/* ==========================================================================
   PROGRESS & DASHBOARD LAYOUT
   ========================================================================== */
.job-dashboard {
  animation: fadeIn 0.4s ease-out;
}

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

.justify-between {
  justify-content: space-between;
}

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

/* Status Badges */
.status-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.badge-pending { background-color: var(--border-color); color: var(--text-medium); }
.badge-running { background-color: var(--primary-light); color: var(--primary); }
.badge-paused { background-color: var(--warning-light); color: var(--warning); }
.badge-cancelled { background-color: var(--danger-light); color: var(--danger); }
.badge-completed { background-color: var(--success-light); color: var(--success); }
.badge-failed { background-color: var(--danger-light); color: var(--danger); }

/* Badges for header */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-light-indigo {
  background-color: var(--primary-light);
  color: var(--primary);
}

.badge-light-teal {
  background-color: var(--secondary-light);
  color: var(--secondary);
}

/* Progress bar styling */
.progress-container {
  margin-top: 1rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.progress-percent {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
}

.progress-bar-track {
  width: 100%;
  height: 12px;
  background-color: var(--bg-main);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 6px;
  transition: width var(--transition-normal);
  box-shadow: 0 0 10px hsla(262, 83%, 58%, 0.3);
}

/* Stats box grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.stat-box {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-medium);
  font-weight: 500;
}

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Color-coded stat boxes */
.stat-box.success {
  border-color: hsla(142, 72%, 40%, 0.2);
  background-color: var(--success-light);
  color: var(--success);
}
.stat-box.warning {
  border-color: hsla(38, 92%, 50%, 0.2);
  background-color: var(--warning-light);
  color: var(--warning);
}
.stat-box.danger {
  border-color: hsla(350, 89%, 60%, 0.2);
  background-color: var(--danger-light);
  color: var(--danger);
}
.stat-box.info {
  border-color: hsla(200, 90%, 45%, 0.2);
  background-color: var(--info-light);
  color: var(--info);
}
.stat-box.time {
  border-color: hsla(262, 83%, 58%, 0.15);
  background-color: var(--primary-light);
  color: var(--primary);
}

.control-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.download-note {
  font-size: 0.8rem;
  color: var(--text-medium);
}

/* ==========================================================================
   CONSOLE LOGS & LIVE ROW PREVIEW
   ========================================================================== */
.dashboard-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .dashboard-split {
    grid-template-columns: 1fr;
  }
}

/* Console Box */
.console-box, .preview-box {
  background-color: hsl(220, 25%, 12%);
  border-radius: var(--radius-sm);
  color: hsl(220, 15%, 85%);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid hsl(220, 20%, 20%);
  display: flex;
  flex-direction: column;
  height: 320px;
}

.console-header, .preview-header {
  background-color: hsl(220, 25%, 8%);
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid hsl(220, 20%, 18%);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: hsl(220, 15%, 75%);
}

.console-content {
  padding: 1rem 1.25rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.console-line {
  white-space: pre-wrap;
  word-break: break-all;
}

.console-line.text-muted { color: hsl(220, 10%, 50%); }

/* Live Preview Feed */
.preview-content {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  font-size: 0.85rem;
}

.preview-placeholder {
  color: hsl(220, 10%, 55%);
  text-align: center;
  padding-top: 5rem;
  font-style: italic;
}

.feed-row-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: slideIn 0.3s ease-out;
}

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

.feed-row-title {
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--secondary);
  border-bottom: 1px dashed hsl(220, 20%, 20%);
  padding-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
}

.feed-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.feed-item {
  background-color: hsl(220, 20%, 15%);
  border-left: 3px solid var(--primary);
  padding: 0.6rem 0.85rem;
  border-radius: 4px;
}

.feed-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: hsl(220, 15%, 65%);
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.feed-val {
  color: hsl(0, 0%, 95%);
  word-break: break-word;
}

/* ==========================================================================
   UTIL CLASSES
   ========================================================================== */
.hidden { display: none !important; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }
.text-center { text-align: center; }
.text-indigo { color: var(--primary) !important; }
.text-muted { color: var(--text-light) !important; }

/* Loader glowing animation */
.loader-glow {
  text-shadow: 0 0 8px hsla(262, 83%, 58%, 0.4);
}

/* ==========================================================================
   JOB HISTORY TABLE
   ========================================================================== */
.history-card {
  margin-top: 2rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
  background-color: var(--bg-card);
}

.history-table th {
  background-color: var(--bg-main);
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--text-medium);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-color);
}

.history-table td {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  vertical-align: middle;
}

.history-table tbody tr {
  transition: background-color var(--transition-fast);
}

.history-table tbody tr:hover {
  background-color: var(--bg-main);
}

.history-table td .file-name-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.history-table td .file-icon {
  font-size: 1.25rem;
  color: var(--primary);
}

.history-table td .file-name {
  font-weight: 600;
  color: var(--text-dark);
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-table td .config-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.history-table td .config-provider {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-medium);
}

.history-table td .config-model {
  font-size: 0.85rem;
  color: var(--text-light);
}

.history-table td .date-info {
  font-size: 0.85rem;
  color: var(--text-medium);
}

.history-table td .progress-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 140px;
}

.history-table td .progress-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-medium);
}

.history-table td .progress-bar-mini {
  width: 100%;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.history-table td .progress-bar-mini-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 3px;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-xs {
  padding: 0.4rem 0.75rem !important;
  font-size: 0.8rem !important;
  border-radius: var(--radius-sm) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  line-height: 1 !important;
}

.btn-xs i {
  font-size: 0.75rem;
}

.disabled-link {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}
