/* ---- Cards ---- */
.card {
  background: white;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---- Form Fields ---- */
.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.field-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.2s;
  outline: none;
}
.field-input:focus {
  border-color: #6366f1;
  background: white;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.field-input::placeholder {
  color: #94a3b8;
}

/* ---- Drop Zone ---- */
.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s;
}
.drop-zone:hover,
.drop-zone.active {
  border-color: #6366f1;
  background: #eef2ff;
}

/* ---- Action Buttons ---- */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border-radius: 0.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  outline: none;
}
.action-btn:active {
  transform: scale(0.97);
}

.action-btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.action-btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}

.action-btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}
.action-btn-danger:hover {
  background: #fee2e2;
}

.action-btn-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1.5px solid #bbf7d0;
}
.action-btn-success:hover {
  background: #dcfce7;
}

.action-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #e2e8f0;
}
.action-btn-secondary:hover {
  background: #e2e8f0;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Progress Bar ---- */
.progress-track {
  width: 100%;
  height: 0.5rem;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 999px;
  transition: width 0.4s ease;
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---- Results Table ---- */
.results-table-wrap {
  max-height: 24rem;
  overflow: auto;
  border: 1px solid #f1f5f9;
  border-radius: 0.75rem;
}
.results-table-wrap thead {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
}
.results-table-wrap tbody tr {
  transition: background 0.1s;
}
.results-table-wrap tbody tr:hover {
  background: #f8fafc;
}
.results-table-wrap td {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: #334155;
}

/* ---- Status Badges ---- */
.status-valid {
  color: #16a34a;
  font-weight: 600;
}
.status-inoperative {
  color: #d97706;
  font-weight: 600;
}
.status-invalid {
  color: #dc2626;
  font-weight: 600;
}
.status-pending {
  color: #6366f1;
  font-weight: 600;
}
.status-notfound {
  color: #6b7280;
  font-weight: 600;
}

/* ---- Logs Panel ---- */
.logs-panel {
  height: 10rem;
  overflow: auto;
  border-radius: 0.75rem;
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.6875rem;
  padding: 0.75rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  line-height: 1.6;
}
.logs-panel::-webkit-scrollbar {
  width: 6px;
}
.logs-panel::-webkit-scrollbar-track {
  background: transparent;
}
.logs-panel::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

/* ---- Status Badge in Header ---- */
.badge-idle { background: #f1f5f9; color: #64748b; }
.badge-running { background: #eef2ff; color: #4f46e5; animation: pulse-badge 2s infinite; }
.badge-completed { background: #f0fdf4; color: #16a34a; }
.badge-error { background: #fef2f2; color: #dc2626; }
.badge-stopped { background: #fff7ed; color: #ea580c; }
.badge-batch { background: #fefce8; color: #ca8a04; }
.badge-captcha { background: #fffbeb; color: #b45309; animation: pulse-badge 1.5s infinite; }

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ---- Scrollbar for results ---- */
.results-table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.results-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.results-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .card { padding: 1rem; }
}
