/* ==========================================================================
   Autonomous AutoPilot Application Queue & Pipeline Design System
   Modern dark mode aesthetics with rich telemetry cues and micro-interactions
   ========================================================================== */

:root {
  --ap-bg-card: rgba(15, 23, 42, 0.78);
  --ap-border-subtle: rgba(255, 255, 255, 0.08);
  --ap-border-hover: rgba(255, 122, 0, 0.4);
  --ap-emerald: #10b981;
  --ap-emerald-glow: rgba(16, 185, 129, 0.25);
  --ap-indigo: #6366f1;
  --ap-accent-orange: #ff7a00;
  --ap-amber: #f59e0b;
}

/* Container */
.autopilot-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-bottom: 32px;
  font-family: inherit;
}

/* ==========================================================================
   Autonomous Command Station Hero Banner
   ========================================================================== */
.autopilot-hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 41, 59, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.autopilot-hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff7a00, #10b981, #6366f1);
}

.autopilot-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.autopilot-beacon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.autopilot-beacon-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 12px #10b981;
  animation: beaconPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes beaconPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.75; }
}

.autopilot-hero-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.autopilot-hero-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.autopilot-hero-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.autopilot-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  backdrop-filter: blur(8px);
}

.autopilot-hero-pill.emerald {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

/* ==========================================================================
   Section 1: Top Job Matches Carousel / Grid
   ========================================================================== */
.autopilot-matches-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.autopilot-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.autopilot-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.autopilot-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.queue-match-card {
  background: linear-gradient(145deg, rgba(20, 27, 45, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.queue-match-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 0, 0.4);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 122, 0, 0.15);
}

.queue-match-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 8px;
}

.queue-company-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.queue-logo-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.queue-comp-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.queue-job-title {
  font-size: 12px;
  color: #94a3b8;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 10px;
  margin-top: 8px;
}

.queue-match-meta {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.queue-meta-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  color: #94a3b8;
  font-weight: 600;
}

/* ==========================================================================
   Circular Progress Score Meter (SVG)
   ========================================================================== */
.queue-circle-score {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.queue-circle-score svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.queue-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 3.5;
}

.queue-circle-progress {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.queue-circle-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

/* ==========================================================================
   Section 2: All Applications Queue Pipeline Card & Table
   ========================================================================== */
.autopilot-queue-card {
  background: var(--ap-bg-card);
  border: 1px solid var(--ap-border-subtle);
  border-radius: 16px;
  box-shadow: 0 12px 36px -12px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.autopilot-queue-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.autopilot-tabs-bar {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  gap: 2px;
}

.autopilot-filter-tab {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.autopilot-filter-tab:hover {
  color: #ffffff;
}

.autopilot-filter-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.autopilot-pill-count {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.autopilot-queue-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.autopilot-table-wrapper {
  overflow-x: auto;
}

.autopilot-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.autopilot-table thead th {
  background: rgba(15, 23, 42, 0.4);
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.autopilot-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

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

.autopilot-table tbody td {
  padding: 14px 18px;
  vertical-align: middle;
  color: #cbd5e1;
}

.queue-pos-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Status Badges */
.queue-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
}

.queue-status-badge.status-submitted {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.queue-status-badge.status-tailoring {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.queue-status-badge.status-needs-you {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.queue-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  animation: beaconPulse 1.8s infinite;
}

/* ==========================================================================
   Side-by-Side Resume Diff Modal
   ========================================================================== */
.autopilot-diff-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.autopilot-diff-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.autopilot-diff-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.autopilot-diff-body {
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.autopilot-diff-footer {
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
}

.queue-diff-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.5;
}

.queue-diff-del {
  background: rgba(239, 68, 68, 0.08);
  border-bottom: 1px solid rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
}

.queue-diff-add {
  background: rgba(16, 185, 129, 0.08);
  color: #86efac;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   Inspect Receipt Modal
   ========================================================================== */
.receipt-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
}

.receipt-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.receipt-item:last-child {
  border-bottom: none;
}

.receipt-check-icon {
  color: #10b981;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.receipt-screenshot-window {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 12px;
  background: #020617;
}

.receipt-window-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.receipt-window-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
