:root {
  --teal: hsl(187, 74%, 32%);
  --teal-light: hsl(187, 74%, 92%);
  --purple: hsl(270, 70%, 45%);
  --purple-light: hsl(270, 70%, 95%);
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
}

.header {
  background: linear-gradient(135deg, var(--teal), var(--purple));
  color: white;
  padding: 2rem 1.5rem;
}

.header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
}

.header .subtitle {
  opacity: 0.85;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.stat {
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.stat strong {
  display: block;
  font-size: 1.25rem;
}

.filters {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.filters label {
  font-size: 0.85rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.filters select, .filters input[type="range"] {
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  background: white;
}

.filters input[type="range"] {
  width: 100px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.date-group {
  margin-bottom: 2rem;
}

.date-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--teal-light);
}

.country-group {
  margin-bottom: 1.25rem;
  margin-left: 0.5rem;
}

.country-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.state-group {
  margin-bottom: 0.75rem;
  margin-left: 1rem;
}

.state-heading {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 0.35rem;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.75rem;
}

.job-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 1rem;
  transition: box-shadow 0.15s;
}

.job-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.job-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.job-card .role {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-900);
}

.job-card .company {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-top: 0.15rem;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.score-high { background: var(--green); }
.score-mid { background: var(--yellow); color: var(--gray-900); }
.score-low { background: var(--red); }

.job-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--gray-600);
}

.tag.remote {
  background: var(--purple-light);
  color: var(--purple);
}

.tag.ai {
  background: hsl(187, 74%, 90%);
  color: var(--teal);
}

.tag.salary {
  background: #ecfdf5;
  color: #059669;
}

.rec-apply { border-left: 3px solid var(--green); }
.rec-caution { border-left: 3px solid var(--yellow); }
.rec-skip { border-left: 3px solid var(--red); }

.job-card .notes {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray-100);
  white-space: pre-wrap;
  max-height: 80px;
  overflow: hidden;
}

.job-card .actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
}

.btn-primary {
  background: var(--teal);
  color: white;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-800);
}

.btn:hover { opacity: 0.85; }

.empty {
  text-align: center;
  padding: 3rem;
  color: var(--gray-400);
  font-size: 1.1rem;
}

.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--gray-400);
  font-size: 0.8rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .header { padding: 1.25rem 1rem; }
  .header h1 { font-size: 1.3rem; }
  .stats { gap: 0.75rem; }
  .container { padding: 1rem; }
  .jobs-grid { grid-template-columns: 1fr; }
  .filters { flex-direction: column; align-items: flex-start; }
}
