/* ===========================
   BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background-color: #06060f;
  background-image:
    radial-gradient(ellipse at 12% 45%, rgba(99,102,241,0.14) 0%, transparent 52%),
    radial-gradient(ellipse at 88% 12%, rgba(34,211,238,0.09) 0%, transparent 52%),
    radial-gradient(ellipse at 55% 92%, rgba(139,92,246,0.08) 0%, transparent 52%);
  min-height: 100vh;
  color: #e2e8f0;
}

/* ===========================
   AMBIENT BLOBS
=========================== */
.ambient-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}
.blob-1 { width: 600px; height: 600px; background: radial-gradient(circle, #6366f1, transparent 70%); top: -150px; left: -150px; }
.blob-2 { width: 450px; height: 450px; background: radial-gradient(circle, #22d3ee, transparent 70%); bottom: 80px; right: -100px; }
.blob-3 { width: 300px; height: 300px; background: radial-gradient(circle, #8b5cf6, transparent 70%); top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.06; }

/* ===========================
   GLASS CARD
=========================== */
.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 28px;
  position: relative;
  z-index: 1;
}
.glass-card.no-pad { padding: 0; overflow: hidden; }

/* ===========================
   HEADER
=========================== */
.glass-header {
  background: rgba(6,6,15,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
}
.header-logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: white;
  box-shadow: 0 0 24px rgba(99,102,241,0.5), 0 2px 8px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.logo-title { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.2; }
.logo-accent {
  background: linear-gradient(135deg, #818cf8, #22d3ee);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-sub { font-size: 11px; color: #475569; margin-top: 2px; }
.header-badge {
  margin-left: auto;
  font-size: 11px; color: #64748b;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 5px 13px;
  border-radius: 20px;
}

/* ===========================
   MAIN
=========================== */
.main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 1;
}

/* ===========================
   SECTION HEADER
=========================== */
.section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.section-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.icon-blue { background: rgba(99,102,241,0.2); color: #a5b4fc; }
.icon-cyan { background: rgba(34,211,238,0.15); color: #67e8f9; }
.section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: #475569;
}

/* ===========================
   FORM
=========================== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.span-2 { grid-column: span 2; }

.form-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: #475569;
}
.form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px; color: #e2e8f0;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  width: 100%;
  -webkit-appearance: none;
}
.form-input::placeholder { color: #1e293b; }
.form-input:focus {
  border-color: rgba(99,102,241,0.6);
  background: rgba(99,102,241,0.07);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15), 0 0 20px rgba(99,102,241,0.1);
}
select.form-input option { background: #1a1a2e; }

/* ===========================
   PLATFORM BUTTONS
=========================== */
.platform-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.platform-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  color: #334155;
}
.platform-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #64748b;
}
.platform-btn.active {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.45);
  color: #a5b4fc;
  box-shadow: 0 0 14px rgba(99,102,241,0.18), inset 0 1px 0 rgba(255,255,255,0.07);
}
.platform-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #1e293b;
  flex-shrink: 0;
  transition: all 0.2s;
}
.platform-btn.active .platform-dot {
  background: #818cf8;
  box-shadow: 0 0 7px rgba(129,140,248,0.9);
}

/* ===========================
   ACTION BUTTONS
=========================== */
.actions-row {
  display: flex; gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.btn-start {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 26px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border: none; border-radius: 11px;
  color: white; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 26px rgba(99,102,241,0.45), 0 4px 14px rgba(0,0,0,0.3);
}
.btn-start:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  box-shadow: 0 0 36px rgba(99,102,241,0.65), 0 4px 18px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}
.btn-start:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-stop {
  padding: 11px 22px;
  border-radius: 11px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-stop--off {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  color: #1e293b;
  cursor: not-allowed;
}
.btn-stop--on {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  color: #f87171;
  box-shadow: 0 0 18px rgba(239,68,68,0.2);
}
.btn-stop--on:hover {
  background: rgba(239,68,68,0.22);
  box-shadow: 0 0 28px rgba(239,68,68,0.32);
}

/* ===========================
   PROGRESS
=========================== */
.progress-grid { display: flex; flex-direction: column; gap: 10px; }
.progress-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color 0.3s;
}
.progress-item:has(.status-dot.running) {
  border-color: rgba(99,102,241,0.2);
  box-shadow: 0 0 20px rgba(99,102,241,0.06);
}
.progress-item:has(.status-dot.done) {
  border-color: rgba(16,185,129,0.2);
}
.progress-header { display: flex; align-items: center; justify-content: space-between; }
.progress-platform {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 500; color: #94a3b8;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #1e293b;
  flex-shrink: 0;
  transition: all 0.3s;
}
.status-dot.running {
  background: #6366f1;
  box-shadow: 0 0 10px rgba(99,102,241,0.9);
  animation: dot-pulse 1.2s ease-in-out infinite;
}
.status-dot.done { background: #10b981; box-shadow: 0 0 8px rgba(16,185,129,0.7); }
.status-dot.error { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,0.7); }
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}
.progress-label { font-size: 12px; color: #334155; }
.progress-track {
  height: 5px;
  background: rgba(255,255,255,0.05);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 9999px;
  width: 0%;
  transition: width 0.4s ease;
  background: rgba(255,255,255,0.08);
}
.progress-bar.running {
  background: linear-gradient(90deg, #6366f1, #22d3ee);
  box-shadow: 0 0 10px rgba(34,211,238,0.6);
}
.progress-bar.done {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 10px rgba(16,185,129,0.5);
}
.progress-bar.error { background: linear-gradient(90deg, #ef4444, #f97316); }

/* ===========================
   RESULTS TOOLBAR + TABS
=========================== */
.results-toolbar {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 6px 0 6px;
}
.tabs-row {
  display: flex;
  flex: 1;
  overflow-x: auto;
}
.tab-btn {
  padding: 15px 20px;
  font-size: 13px; font-weight: 500;
  color: #334155;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  line-height: 1;
}
.tab-btn:hover { color: #64748b; }
.tab-btn.active { color: #a5b4fc; border-bottom-color: #6366f1; }
.tab-count { font-size: 11px; margin-left: 5px; color: #1e293b; transition: color 0.2s; }
.tab-btn.active .tab-count { color: #6366f1; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===========================
   FILTER BUTTON
=========================== */
.filter-btn {
  display: flex; align-items: center; gap: 7px;
  margin: 10px 8px 10px 12px;
  padding: 0 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  color: #334155; font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap; flex-shrink: 0;
}
.filter-btn:hover { border-color: rgba(255,255,255,0.12); color: #475569; }
.filter-btn.active {
  background: rgba(16,185,129,0.08);
  border-color: rgba(16,185,129,0.35);
  color: #34d399;
  box-shadow: 0 0 14px rgba(16,185,129,0.12);
}
.filter-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #1e293b;
  flex-shrink: 0;
  transition: all 0.2s;
}
.filter-btn.active .filter-dot {
  background: #10b981;
  box-shadow: 0 0 7px rgba(16,185,129,0.9);
}

/* ===========================
   TABLE
=========================== */
.table-wrap { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; }
.results-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}
.results-table td {
  padding: 11px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
.results-table tr:hover td { background: rgba(255,255,255,0.015); }

.col-title  { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #cbd5e1; font-weight: 500; }
.col-company{ max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #64748b; }
.col-loc    { white-space: nowrap; color: #475569; font-size: 12px; }
.col-type   { white-space: nowrap; }
.col-salary { white-space: nowrap; color: #475569; font-size: 12px; }
.col-date   { white-space: nowrap; color: #334155; font-size: 12px; }
.col-link   { white-space: nowrap; }

.badge-remote { font-size: 11px; font-weight: 600; color: #34d399; background: rgba(16,185,129,0.1); padding: 2px 8px; border-radius: 5px; }
.badge-onsite { font-size: 11px; color: #475569; }

.link-direct {
  font-size: 11px; font-weight: 600;
  color: #34d399;
  text-decoration: none;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  padding: 3px 10px; border-radius: 6px;
  transition: all 0.15s;
  display: inline-block;
}
.link-direct:hover {
  background: rgba(16,185,129,0.18);
  border-color: rgba(16,185,129,0.4);
  box-shadow: 0 0 10px rgba(16,185,129,0.2);
}
.link-view {
  font-size: 11px; font-weight: 500;
  color: #475569;
  text-decoration: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 3px 10px; border-radius: 6px;
  transition: all 0.15s;
  display: inline-block;
}
.link-view:hover { background: rgba(255,255,255,0.07); color: #64748b; }

/* ===========================
   SKELETON LOADING
=========================== */
@keyframes shimmer {
  0%   { background-position: -400% 0; }
  100% { background-position:  400% 0; }
}
.skeleton-row td {
  border-bottom: 1px solid rgba(255,255,255,0.025);
  padding: 13px 14px;
}
.skeleton-cell {
  height: 12px; border-radius: 6px; display: block;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.08) 40%,
    rgba(255,255,255,0.03) 80%
  );
  background-size: 400% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

/* ===========================
   EMPTY STATE
=========================== */
.empty-msg {
  text-align: center;
  padding: 52px 0;
  color: #1e293b;
  font-size: 13px;
}

/* ===========================
   EXPORT BAR
=========================== */
.export-bar {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.export-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: #1e293b;
}
.export-buttons-row { display: flex; gap: 7px; flex-wrap: wrap; }
.btn-export {
  padding: 5px 13px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 8px;
  color: #818cf8;
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-export:hover {
  background: rgba(99,102,241,0.18);
  border-color: rgba(99,102,241,0.45);
  box-shadow: 0 0 12px rgba(99,102,241,0.2);
}
.btn-export-all {
  margin-left: auto;
  padding: 7px 18px;
  background: linear-gradient(135deg, #059669, #10b981);
  border: none; border-radius: 9px;
  color: white; font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 18px rgba(16,185,129,0.3);
}
.btn-export-all:hover {
  box-shadow: 0 0 28px rgba(16,185,129,0.5);
  transform: translateY(-1px);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }
  .glass-card { padding: 20px 16px; }
  .main-container { padding: 16px 12px 48px; }
}
