body {
  background: var(--bg-light);
}

.page-title {
  text-align: center;
  margin-bottom: 32px;
  padding-top: 20px;
}

.page-title h1 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.jobs-grid {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding: 10px 2rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  justify-content: center;

  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.jobs-grid::-webkit-scrollbar {
  height: 8px;
}

.jobs-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.jobs-grid::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.jobs-grid::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.job-card {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  min-width: 380px;
  max-width: 480px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

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

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.job-number {
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

.job-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.detail-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
}

.detail-btn:hover {
  background: var(--primary-dark);
}

.remove-btn {
  background: var(--danger);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
}

.remove-btn:hover {
  background: #dc2626;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.875rem;
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0;
  flex-wrap: wrap;
}

.action-buttons .btn {
  padding: 12px 32px;
  font-size: 0.875rem;
  font-weight: 500;
}

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.loading-overlay.show {
  display: flex;
}

.loading-content {
  background: white;
  padding: 32px;
  border-radius: 8px;
  text-align: center;
  min-width: 200px;
  box-shadow: var(--shadow-xl);
}

.loading-content h3 {
  color: var(--primary);
  margin: 10px 0 5px;
  font-size: 1.125rem;
  font-weight: 600;
}

.loading-content p {
  color: var(--text-gray);
  margin: 0;
  font-size: 0.875rem;
}

.error-message {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin: 16px 0;
  font-weight: 500;
  font-size: 0.875rem;
  display: none;
  animation: fadeIn 0.2s ease;
}

.error-message.show {
  display: block;
}

.results {
  display: none;
  margin-top: 24px;
  animation: fadeIn 0.3s ease;
}

.results.show {
  display: block;
}

.result-header {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border);
}

.result-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.result-header p {
  color: var(--text-gray);
  font-size: 0.875rem;
  margin: 0;
}

.comparison-table-container {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 700px;
}

.comparison-table th {
  background: var(--bg-gray);
  color: var(--text-dark);
  padding: 14px 12px;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

.comparison-table th:first-child {
  text-align: left;
  border-radius: 8px 0 0 0;
  min-width: 180px;
  background: #e0f2fe;
}

.comparison-table td:first-child {
  background: #f0f9ff;
}

.comparison-table th:last-child {
  border-radius: 0 8px 0 0;
}

.comparison-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  text-align: right;
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text-dark);
}

.comparison-table tbody tr:hover {
  background: var(--bg-light);
}

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

.best-job {
  background: #d1fae5 !important;
}

.best-badge {
  background: var(--secondary);
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 8px;
  display: inline-block;
}

.currency {
  color: var(--secondary);
  font-weight: 500;
}

.negative {
  color: var(--danger);
  font-weight: 500;
}

.chart-container {
  background: var(--bg-white);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.chart-container h3 {
  color: var(--text-dark);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 1.125rem;
}

.chart-container canvas {
  max-height: 350px;
}

#detailChart {
  display: none;
}

.chart-container:has(#detailChart) {
  display: none;
}
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.5rem;
  }

  .header p {
    font-size: 0.8125rem;
  }

  .jobs-grid {
    padding: 10px 1rem;
  }

  .job-card {
    min-width: 300px;
    max-width: 360px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
  }

  .comparison-table-container {
    padding: 16px;
  }

  .chart-container {
    padding: 16px;
  }

  .chart-container h3 {
    font-size: 1rem;
  }
}

.separator-row {
  height: 8px;
  background: transparent;
  border: none;
}

.indent-1 {
  padding-left: 16px;
}

.indent-2 {
  padding-left: 32px;
}

.city-search-wrapper {
  position: relative;
  width: 100%;
}

.city-search-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.2s;
}

.city-search-input:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.city-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.city-result-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
  border-bottom: 1px solid #f5f5f5;
}

.city-result-item:hover {
  background: #f8f9fa;
}

.city-result-item:active {
  background: #e9ecef;
}

.city-result-name {
  font-weight: 500;
  color: #212529;
  font-size: 14px;
}

.city-result-state {
  font-size: 13px;
  color: #6c757d;
  margin-left: 8px;
}

.city-result-tax {
  font-size: 12px;
  color: #6c757d;
  background: #f8f9fa;
  padding: 3px 8px;
  border-radius: 4px;
}

.city-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #e7f3ff;
  border: 2px solid #0d6efd;
  border-radius: 6px;
}

.city-selected span {
  font-weight: 500;
  color: #0d6efd;
  font-size: 15px;
}

.city-change-btn {
  padding: 4px 12px;
  background: white;
  border: 1px solid #0d6efd;
  border-radius: 4px;
  color: #0d6efd;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.city-change-btn:hover {
  background: #0d6efd;
  color: white;
}

.city-loading {
  padding: 12px 16px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

.city-no-results {
  padding: 12px 16px;
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}

.city-disambiguation {
  padding: 12px 16px;
  background: #fff3cd;
  border-bottom: 2px solid #ffc107;
  font-size: 13px;
  color: #856404;
}