:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --border: #e4e2dd;
  --text: #1c1b19;
  --text-muted: #6b6862;
  --accent: #b5482a;
  --accent-soft: #f3e2db;
  --chip-bg: #efeee9;
  --chip-active-bg: #1c1b19;
  --chip-active-text: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(28, 27, 25, 0.06), 0 8px 24px rgba(28, 27, 25, 0.04);
}

/* Forced to light mode -- intentionally not following prefers-color-scheme. */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand h1 { font-size: 17px; margin: 0; }
.subtitle { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-primary:hover:not(:disabled) { opacity: 0.88; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }

.btn-secondary {
  background: var(--accent-soft);
  border: 1px solid transparent;
  color: var(--accent);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.btn-secondary:hover { opacity: 0.85; }
.btn-secondary:disabled { opacity: 0.6; cursor: progress; }

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.filter-group h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 8px;
  font-weight: 600;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  background: var(--chip-bg);
  border: 1px solid transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.chip:hover { border-color: var(--border); }
.chip.is-active {
  background: var(--chip-active-bg);
  color: var(--chip-active-text);
}

.salary-inputs { display: flex; align-items: center; gap: 8px; }
.salary-inputs input[type="number"] {
  width: 100%;
  min-width: 0;
}

input[type="number"], input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 10px;
  cursor: pointer;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--text);
}

.job-list { display: flex; flex-direction: column; gap: 10px; }

.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.job-logo {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--chip-bg);
}

.job-logo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.job-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  background: var(--surface);
  box-sizing: border-box;
}

.job-card-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.job-main { min-width: 0; flex: 1; }

.job-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}

.job-company {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.job-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--text-muted);
}
.tag.tag-salary { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tag.tag-source { text-transform: capitalize; }
.tag.tag-direct { background: #dcefe1; color: #1c6b3a; }
.tag.tag-aggregator { background: #f0e4d0; color: #8a5a1f; }

.job-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.job-location { font-size: 12.5px; color: var(--text-muted); text-align: right; }

.apply-link {
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 7px;
  white-space: nowrap;
}
.apply-link:hover { opacity: 0.88; }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 60px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .job-card { flex-direction: column; }
  .job-side { align-items: flex-start; width: 100%; }
}
