:root {
  color-scheme: dark;
  --bg: #16161e;
  --surface: #1f2335;
  --surface-soft: #24283b;
  --surface-raised: #292e42;
  --field: #161a2a;
  --line: #3b4261;
  --text: #c0caf5;
  --muted: #9aa5ce;
  --primary: #7aa2f7;
  --primary-dark: #5f7ecf;
  --danger: #f7768e;
  --danger-soft: #ff9aa8;
  --danger-burgundy: #7f1d2d;
  --danger-burgundy-bg: #2a121b;
  --ok: #9ece6a;
  --applied: #34d399;
  --applied-soft: #86efac;
  --applied-bg: rgba(16, 185, 129, 0.16);
  --applied-line: rgba(52, 211, 153, 0.72);
  --warning: #e0af68;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 16px;
}

h3 {
  font-size: 14px;
}

p {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #111827;
  border-radius: 6px;
  padding: 7px 11px;
  cursor: pointer;
}

button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

button:disabled,
button.is-busy {
  cursor: not-allowed;
  opacity: 0.68;
}

button.is-busy {
  cursor: wait;
}

input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

button.secondary {
  background: var(--surface-soft);
  color: var(--primary);
  border-color: var(--line);
}

button.primary {
  width: 100%;
  margin-top: 12px;
}

button.compact {
  padding: 5px 10px;
  font-size: 12px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
}

.tab {
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--line);
}

.tab.active {
  background: var(--primary);
  color: #111827;
  border-color: var(--primary);
}

.tab {
  padding: 5px 10px;
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 16px;
  padding: 8px 12px 12px;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}

.toast-host {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  gap: 8px;
  align-content: end;
  justify-content: center;
  padding: 14px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: min(360px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--text);
  padding: 10px 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  font-size: 13px;
  line-height: 1.35;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.anchored {
  position: fixed;
  width: max-content;
  transform: translateY(-50%);
}

.toast.below-anchor {
  transform: translateY(0);
}

.toast.success {
  border-left-color: var(--ok);
}

.toast.error {
  border-left-color: var(--danger);
  background: var(--danger-burgundy-bg);
  color: var(--danger-soft);
}

.toast.info {
  border-left-color: var(--primary);
}

.toast.closing {
  opacity: 0;
  transform: translateY(-6px);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.settings .panel-title {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: -14px -14px 12px;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

.settings-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.settings-heading h2 {
  flex: 0 0 auto;
}

.save-config-area {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: 0 0 auto;
}

.config-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#syncSharedRules {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 142px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

#syncSharedRules.sync-rules-clean {
  border-color: rgba(74, 222, 128, 0.3);
  color: #86efac;
  background: rgba(20, 83, 45, 0.16);
}

#syncSharedRules.sync-rules-clean:disabled {
  cursor: default;
  opacity: 0.78;
}

#syncSharedRules.has-differences {
  border-color: rgba(251, 191, 36, 0.72);
  color: #fef3c7;
  background: rgba(146, 64, 14, 0.34);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.08);
}

.sync-rules-icon {
  font-size: 15px;
  line-height: 1;
}

.sync-rules-indicator {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14);
}

.sync-rules-indicator[hidden] {
  display: none;
}

#saveConfig {
  min-width: 132px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

#saveConfig.save-clean {
  background: var(--surface-soft);
  color: var(--muted);
  border-color: var(--line);
}

#saveConfig.save-clean:disabled {
  cursor: default;
  opacity: 0.82;
}

#saveConfig.save-dirty {
  background: var(--warning);
  border-color: var(--warning);
  color: #111827;
}

#saveConfig.save-error {
  background: var(--danger-burgundy);
  border-color: var(--danger);
  color: #fff;
}

#saveConfig.save-saving {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #111827;
}

.save-config-status {
  min-height: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.save-config-status.success {
  color: var(--ok);
}

.save-config-status.error {
  color: var(--danger-soft);
}

.settings {
  align-self: start;
  position: sticky;
  top: 12px;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}

.logic-box,
.concept-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.logic-box h3,
.concept-box h3 {
  margin-bottom: 8px;
}

.collapsible-box summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.collapsible-box:not([open]) {
  display: block;
}

.collapsible-box[open] summary {
  margin-bottom: 8px;
}

.logic-box ul,
.concept-box ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.rules-summary {
  display: grid;
  gap: 6px;
}

.rule-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) 1.2fr;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  color: var(--muted);
}

.rule-row strong {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.concept-box {
  background: var(--surface);
}

.rule-group {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.rule-group h3 {
  margin-bottom: 4px;
  color: var(--text);
}

.rule-group p {
  margin-bottom: 10px;
  font-size: 12px;
}

.rule-group label:last-child {
  margin-bottom: 0;
}

.rule-group.accept {
  border-left-color: var(--ok);
}

.rule-group.accept label + label {
  margin-top: 17px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 16px;
}

.rule-group.warn label + label {
  margin-top: 15px;
  border-top: 1px solid rgba(251, 113, 133, 0.16);
  padding-top: 15px;
}

.rule-group.warn {
  border-left-color: var(--danger-soft);
  background: rgba(247, 118, 142, 0.09);
}

.rule-group.ranking {
  border-left-color: #fb7185;
  background: rgba(190, 24, 93, 0.13);
}

.rule-group.ranking h3 {
  color: #fda4af;
}

.rule-group.reject {
  border-left-color: var(--danger-burgundy);
  background: var(--danger-burgundy-bg);
}

.advanced {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.advanced summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.advanced label {
  margin-top: 10px;
  margin-bottom: 0;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
  padding: 8px;
}

textarea {
  min-height: 72px;
  resize: vertical;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.tag-editor-source {
  display: none;
}

.tag-editor {
  display: grid;
  gap: 9px;
  margin-top: 6px;
  border: 1px solid rgba(122, 162, 247, 0.42);
  border-radius: 9px;
  padding: 10px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.64));
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.tag-editor:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.14);
}

.tag-editor.professional {
  border-color: rgba(74, 222, 128, 0.48);
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.22), rgba(15, 23, 42, 0.82));
}

.tag-editor.professional:focus-within {
  border-color: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.13);
}

.tag-editor.preference {
  border-color: rgba(167, 139, 250, 0.5);
  background: linear-gradient(145deg, rgba(76, 29, 149, 0.19), rgba(15, 23, 42, 0.82));
}

.tag-editor.preference:focus-within {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.14);
}

.tag-editor.local-location {
  border-color: rgba(52, 211, 153, 0.48);
  background: linear-gradient(145deg, rgba(6, 95, 70, 0.2), rgba(15, 23, 42, 0.82));
}

.tag-editor.commute-location {
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.18), rgba(15, 23, 42, 0.82));
}

.tag-editor.remote-location {
  border-color: rgba(129, 140, 248, 0.5);
  background: linear-gradient(145deg, rgba(49, 46, 129, 0.2), rgba(15, 23, 42, 0.82));
}

.tag-editor.mode-signal {
  border-color: rgba(34, 211, 238, 0.45);
  background: linear-gradient(145deg, rgba(14, 116, 144, 0.17), rgba(15, 23, 42, 0.82));
}

.tag-editor.ranking-penalty {
  border-color: rgba(251, 113, 133, 0.52);
  background: linear-gradient(145deg, rgba(159, 18, 57, 0.2), rgba(15, 23, 42, 0.82));
}

.tag-editor.strong-reject {
  border-color: rgba(239, 68, 68, 0.56);
  background: linear-gradient(145deg, rgba(127, 29, 29, 0.24), rgba(15, 23, 42, 0.84));
}

.tag-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.tag-editor-count {
  color: #cbd5e1;
  font-weight: 900;
}

.tag-editor-values {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 7px;
  padding: 2px 3px 2px 1px;
}

.tag-editor-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  border: 1px solid rgba(96, 165, 250, 0.48);
  border-radius: 999px;
  padding: 4px 5px 4px 9px;
  color: #dbeafe;
  background: rgba(30, 64, 175, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.tag-editor.professional .tag-editor-chip {
  border-color: rgba(74, 222, 128, 0.48);
  color: #dcfce7;
  background: rgba(21, 128, 61, 0.25);
}

.tag-editor.professional .tag-editor-chip.professional-weight {
  --professional-chip-color: #86efac;
  --professional-chip-bg: rgba(22, 101, 52, 0.14);
  --professional-chip-line: rgba(74, 222, 128, 0.3);
  border-color: var(--professional-chip-line);
  color: var(--professional-chip-color);
  background: var(--professional-chip-bg);
}

.tag-editor.professional .tag-editor-chip.professional-weight.score-zero {
  --professional-chip-color: #86a995;
  --professional-chip-bg: rgba(20, 83, 45, 0.08);
  --professional-chip-line: rgba(74, 222, 128, 0.16);
}

.tag-editor.professional .tag-editor-chip.professional-weight.score-low {
  --professional-chip-color: #86efac;
  --professional-chip-bg: rgba(22, 101, 52, 0.14);
  --professional-chip-line: rgba(74, 222, 128, 0.3);
}

.tag-editor.professional .tag-editor-chip.professional-weight.score-medium {
  --professional-chip-color: #6ee7a0;
  --professional-chip-bg: rgba(21, 128, 61, 0.22);
  --professional-chip-line: rgba(74, 222, 128, 0.44);
}

.tag-editor.professional .tag-editor-chip.professional-weight.score-high {
  --professional-chip-color: #bbf7d0;
  --professional-chip-bg: rgba(22, 163, 74, 0.3);
  --professional-chip-line: rgba(74, 222, 128, 0.62);
}

.tag-editor.professional .tag-editor-chip.professional-weight.score-max {
  --professional-chip-color: #f0fdf4;
  --professional-chip-bg: rgba(34, 197, 94, 0.42);
  --professional-chip-line: rgba(134, 239, 172, 0.82);
  box-shadow: inset 0 1px 0 rgba(240, 253, 244, 0.12), 0 0 8px rgba(34, 197, 94, 0.12);
}

.tag-editor.professional .professional-weight .tag-editor-weight {
  border-color: var(--professional-chip-line);
  color: #f0fdf4;
  background: rgba(2, 44, 24, 0.5);
}

.tag-editor.preference .tag-editor-chip {
  border-color: rgba(167, 139, 250, 0.52);
  color: #ede9fe;
  background: rgba(109, 40, 217, 0.25);
}

.tag-editor.local-location .tag-editor-chip {
  border-color: rgba(52, 211, 153, 0.5);
  color: #d1fae5;
  background: rgba(5, 150, 105, 0.24);
}

.tag-editor.commute-location .tag-editor-chip {
  border-color: rgba(251, 191, 36, 0.52);
  color: #fef3c7;
  background: rgba(180, 83, 9, 0.26);
}

.tag-editor.remote-location .tag-editor-chip {
  border-color: rgba(129, 140, 248, 0.54);
  color: #e0e7ff;
  background: rgba(79, 70, 229, 0.25);
}

.tag-editor.mode-signal .tag-editor-chip {
  border-color: rgba(34, 211, 238, 0.48);
  color: #cffafe;
  background: rgba(8, 145, 178, 0.24);
}

.tag-editor.ranking-penalty .tag-editor-chip {
  border-color: rgba(251, 113, 133, 0.55);
  color: #ffe4e6;
  background: rgba(190, 24, 93, 0.26);
}

.tag-editor.strong-reject .tag-editor-chip {
  border-color: rgba(248, 113, 113, 0.58);
  color: #fee2e2;
  background: rgba(185, 28, 28, 0.28);
}

.tag-editor-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 0;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: currentColor;
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.tag-editor-remove:hover,
.tag-editor-remove:focus-visible {
  border: 0;
  color: #ffffff;
  background: rgba(251, 113, 133, 0.62);
}

.tag-editor .tag-editor-input {
  width: 100%;
  min-height: 36px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.52);
  font-family: system-ui, sans-serif;
  font-size: 11px;
}

.tag-editor .tag-editor-input:focus {
  border-color: rgba(147, 197, 253, 0.7);
  outline: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 8px;
  row-gap: 3px;
  font-weight: 400;
  margin-bottom: 0;
}

.checkbox input {
  width: auto;
  margin-top: 1px;
}

.checkbox .hint {
  grid-column: 2;
  display: block;
}

.run-box {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 8px;
}

.run-box label {
  margin-bottom: 0;
}

.run-box .grid-2 {
  row-gap: 14px;
}

.run-box button.primary {
  margin-top: 0;
  min-height: 40px;
}

.run-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 0 -2px;
  padding: 10px 2px 2px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.run-actions .primary {
  width: auto;
  flex: 1 1 auto;
  margin: 0;
}

.run-actions .secondary {
  flex: 0 1 auto;
}

.run-output,
.report-content {
  white-space: pre-wrap;
  overflow: auto;
  color: var(--text);
  border-radius: 6px;
  padding: 12px;
  min-height: 120px;
  max-height: 420px;
  font-size: 12px;
}

.run-output {
  background: #11131f;
  margin-top: 12px;
}

.content {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.history-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.history-context {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.history-context h2 {
  line-height: 1.2;
}

.history-context p {
  max-width: 680px;
  overflow-wrap: anywhere;
}

.filters {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) 120px minmax(220px, 1.4fr) auto;
  align-items: end;
  gap: 8px;
}

.control-field {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.control-field select,
.control-field input {
  min-height: 36px;
}

.search-field {
  min-width: 180px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar-actions button {
  min-height: 36px;
}

.hidden {
  display: none !important;
}

.site-bumeran .linkedin-only,
.site-computrabajo .linkedin-only,
.site-getonboard .linkedin-only,
.site-indeed .linkedin-only,
.site-empleosit .linkedin-only,
.site-zonajobs .linkedin-only {
  display: none !important;
}

.internal-setting,
.site-linkedin .hide-on-linkedin,
.site-linkedin:not(.linkedin-manual-mode) .linkedin-manual-url {
  display: none !important;
}

.run-advanced {
  margin-top: 10px;
}

.toggle-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(247, 118, 142, 0.18);
  color: var(--danger);
  border-color: rgba(247, 118, 142, 0.55);
  white-space: nowrap;
}

.toggle-filter.active {
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--line);
}

.toggle-filter.muted {
  background: rgba(247, 118, 142, 0.18);
  color: var(--danger);
  border-color: rgba(247, 118, 142, 0.55);
}

.toggle-filter.active:hover,
.toggle-filter.muted:hover {
  color: var(--text);
}

.jobs-list {
  display: grid;
  gap: 10px;
}

.load-more-jobs {
  width: 100%;
  min-height: 36px;
}

.history-help {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.help-details > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  cursor: pointer;
  color: var(--text);
  font-weight: 850;
  list-style: none;
}

.tag-editor-label {
  min-width: 0;
}

.tag-editor .tag-editor-weight {
  width: 38px;
  min-width: 38px;
  height: 22px;
  min-height: 0;
  border: 1px solid rgba(134, 239, 172, 0.48);
  border-radius: 999px;
  padding: 1px 3px;
  color: #f0fdf4;
  background: rgba(6, 78, 59, 0.72);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.tag-editor .tag-editor-weight::-webkit-inner-spin-button,
.tag-editor .tag-editor-weight::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.tag-editor .tag-editor-weight:focus {
  border-color: #86efac;
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.18);
}

.help-details > summary::-webkit-details-marker {
  display: none;
}

.help-details > summary::before {
  content: "▸";
  color: #93c5fd;
  transition: transform 140ms ease;
}

.help-details[open] > summary::before {
  transform: rotate(90deg);
}

.help-details > summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.help-details:not([open]) {
  display: block;
}

.help-details:not([open]) summary {
  margin: 0;
}

.help-details[open] summary {
  margin-bottom: 12px;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.help-section {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-left: 3px solid #60a5fa;
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(15, 23, 42, 0.24);
}

.help-section-status { border-left-color: #34d399; }
.help-section-order { border-left-color: #fbbf24; }
.help-section-tools { border-left-color: #a78bfa; }

.help-section h3 {
  margin: 0 0 8px;
  color: #dbeafe;
  font-size: 12px;
  line-height: 1.25;
}

.help-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.help-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.36fr) minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.help-list > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.help-list > div:last-child {
  padding-bottom: 0;
}

.help-list dt {
  color: #bfdbfe;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.35;
}

.help-list dd {
  margin: 0;
  color: #aeb9d7;
  font-size: 10.5px;
  line-height: 1.4;
}

.help-list dd strong {
  color: #dbeafe;
}

.history-help strong {
  color: var(--text);
}

.history-summary {
  margin: -4px 0 12px;
  color: var(--warning);
  font-size: 12px;
  line-height: 1.35;
}

.job-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.job-item:hover {
  border-color: rgba(122, 162, 247, 0.72);
  box-shadow: 0 7px 22px rgba(2, 6, 23, 0.18);
}

.job-item.is-applied {
  background: var(--applied-bg);
  border-color: var(--applied-line);
  box-shadow: inset 4px 0 0 var(--applied);
}

.job-item.is-repeat {
  background: rgba(224, 175, 104, 0.13);
  border-color: rgba(224, 175, 104, 0.7);
}

.job-item.is-repeat-high {
  background: var(--danger-burgundy-bg);
  border-color: var(--danger);
}

.job-item.is-applied.is-repeat {
  background: var(--applied-bg);
  border-color: rgba(224, 175, 104, 0.8);
  box-shadow:
    inset 4px 0 0 rgba(224, 175, 104, 0.9),
    0 0 0 1px rgba(52, 211, 153, 0.28);
}

.job-item.is-applied.is-repeat-high {
  background: var(--applied-bg);
  border-color: var(--danger);
  box-shadow:
    inset 4px 0 0 var(--danger),
    0 0 0 1px rgba(52, 211, 153, 0.28);
}

.job-item.is-seen:not(.is-applied):not(.is-manually-discarded):not(.is-closed-interest) {
  border-color: rgba(129, 230, 255, 0.98);
  box-shadow:
    inset 8px 0 0 rgba(56, 189, 248, 0.98),
    0 0 0 1px rgba(129, 230, 255, 0.26),
    0 5px 18px rgba(14, 165, 233, 0.16);
  background-color: rgba(19, 39, 68, 0.96);
  background-image:
    repeating-linear-gradient(135deg, rgba(125, 211, 252, 0.085) 0 2px, transparent 2px 13px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.25), rgba(30, 41, 75, 0.14) 52%, transparent 100%);
}

.live-run-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid #3b82f6;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(30, 64, 175, 0.24), rgba(15, 23, 42, 0.34));
  color: #dbeafe;
}

.live-run-banner > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}

.live-run-banner strong {
  color: #93c5fd;
}

.live-run-banner .control-field {
  min-width: 180px;
  margin: 0;
}

.job-item.is-seen:not(.is-applied):not(.is-manually-discarded):not(.is-closed-interest) .seen-marker {
  border-color: #7dd3fc;
  color: #e0f2fe;
  background: rgba(2, 132, 199, 0.42);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.28);
}

.job-item.is-seen.is-repeat {
  border-color: rgba(224, 175, 104, 0.7);
}

.job-item.is-seen.is-repeat-high {
  border-color: var(--danger);
}

.job-item.is-applied.is-seen {
  border-color: var(--applied-line);
  box-shadow:
    inset 8px 0 0 var(--applied),
    0 0 0 1px rgba(52, 211, 153, 0.24);
  background-image: linear-gradient(90deg, rgba(52, 211, 153, 0.22), rgba(52, 211, 153, 0.05) 50%, transparent 82%);
}

.job-item.is-applied.is-seen.is-repeat {
  border-color: rgba(224, 175, 104, 0.82);
}

.job-item.is-applied.is-seen.is-repeat-high {
  border-color: var(--danger);
}

.job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.job-head-main {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  min-width: 0;
}

.job-head-side {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.job-head-ranking,
.job-state {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  height: 24px;
  line-height: 1;
}

.job-head-ranking {
  margin-top: 0;
  padding: 4px 7px;
  border: 1px solid rgba(122, 162, 247, 0.28);
  border-radius: 6px;
  background: rgba(15, 20, 36, 0.55);
  color: var(--text);
  white-space: nowrap;
  min-height: 0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.job-head-ranking:hover,
.job-head-ranking:focus-visible {
  border-color: var(--primary);
  background: rgba(122, 162, 247, 0.16);
  color: var(--primary);
}

.review-card-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-height: 0;
  border: 1px solid rgba(52, 211, 153, 0.46);
  border-radius: 6px;
  padding: 4px 7px;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.28);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.review-card-toggle:hover,
.review-card-toggle:focus-visible {
  border-color: #6ee7b7;
  color: #ecfdf5;
  background: rgba(5, 150, 105, 0.3);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.14);
}

.job-item.is-review-collapsible.is-review-collapsed {
  cursor: pointer;
}

.job-item.is-applied.is-review-collapsed:hover {
  border-color: #6ee7b7;
  box-shadow: inset 4px 0 0 var(--applied), 0 7px 22px rgba(6, 78, 59, 0.24);
}

.job-item.is-closed-interest.is-review-collapsed:hover {
  border-color: #facc15;
  box-shadow: inset 5px 0 0 rgba(234, 179, 8, 0.9), 0 7px 22px rgba(113, 63, 18, 0.24);
}

.job-item.is-closed-interest .review-card-toggle {
  border-color: rgba(250, 204, 21, 0.48);
  color: #fef08a;
  background: rgba(133, 77, 14, 0.28);
}

.job-review-content[hidden] {
  display: none;
}

.job-title {
  display: inline;
  color: var(--primary);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.job-title:hover {
  text-decoration: underline;
}

.job-title.seen {
  color: #8b95bd;
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  text-decoration-color: rgba(247, 118, 142, 0.95);
  opacity: 0.72;
}

.job-item.is-applied .job-title.seen {
  color: var(--applied-soft);
  text-decoration-color: rgba(52, 211, 153, 0.9);
  opacity: 0.82;
}

.job-company {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.job-company::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0.85;
}

.seen-marker {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  border: 1px solid rgba(122, 162, 247, 0.95);
  border-radius: 999px;
  padding: 3px 8px;
  color: #dce7ff;
  background: rgba(122, 162, 247, 0.24);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.seen-marker::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 999px;
  background: var(--primary);
}

.job-meta,
.job-reasons,
.job-rank {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 6px;
  line-height: 1.4;
}

.job-decision {
  display: grid;
  gap: 9px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.job-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.56fr);
  gap: 14px;
  align-items: start;
}

.live-run-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
}

.search-activity-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 3px 9px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.36);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.search-activity-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.13);
}

.search-activity-indicator.running {
  border-color: rgba(74, 222, 128, 0.54);
  color: #bbf7d0;
  background: rgba(21, 128, 61, 0.18);
}

.search-activity-indicator.running .search-activity-dot {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.16), 0 0 10px rgba(74, 222, 128, 0.7);
  animation: search-activity-pulse 1.35s ease-in-out infinite;
}

.search-activity-indicator.error {
  border-color: rgba(251, 113, 133, 0.58);
  color: #fecdd3;
  background: rgba(159, 18, 57, 0.2);
}

.search-activity-indicator.error .search-activity-dot {
  background: #fb7185;
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.16);
}

@keyframes search-activity-pulse {
  0%, 100% { transform: scale(0.88); opacity: 0.72; }
  50% { transform: scale(1.18); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .search-activity-indicator.running .search-activity-dot {
    animation: none;
  }
}

.job-review-tools {
  display: grid;
  gap: 9px;
  align-content: start;
  margin-top: 7px;
  min-width: 0;
  padding-left: 12px;
  border-left: 2px solid rgba(122, 162, 247, 0.32);
}

.job-review-notes {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(122, 162, 247, 0.22);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.18);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.job-review-notes > summary,
.decision-trace > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 800;
}

.job-review-notes > summary {
  color: var(--text);
}

.job-review-notes > summary::-webkit-details-marker,
.decision-trace > summary::-webkit-details-marker {
  display: none;
}

.job-review-notes > summary::before,
.decision-trace > summary::before {
  content: "▸";
  flex: 0 0 12px;
  color: #93c5fd;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  transition: transform 140ms ease;
}

.job-review-notes[open] > summary::before,
.decision-trace[open] > summary::before {
  transform: rotate(90deg);
}

.review-tool-summary {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.review-tool-label {
  flex: 0 0 auto;
  color: #dbeafe;
  font-weight: 850;
  line-height: 1.2;
}

.review-tool-count {
  margin-left: auto;
  border-radius: 999px;
  padding: 2px 7px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.notes-preview {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-content-indicator {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(251, 191, 36, 0.66);
  border-radius: 999px;
  color: #fef3c7 !important;
  background: rgba(217, 119, 6, 0.38);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.09);
  font-size: 12px;
  line-height: 1;
}

.notes-content-indicator[hidden] {
  display: none;
}

.job-review-notes.has-notes {
  border-color: rgba(251, 191, 36, 0.48);
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.2), rgba(15, 23, 42, 0.22));
}

.job-review-notes[open] summary {
  color: #bfdbfe;
}

.job-review-notes[open] .notes-preview {
  display: none;
}

.notes-editor {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  contain: layout paint;
  isolation: isolate;
}

.job-review-notes textarea {
  width: 100%;
  min-height: 96px;
  transition: none;
}

.job-decision > div {
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.job-decision > div > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 13px;
}

.job-decision > div:not(.decision-summary) {
  padding-top: 2px;
  padding-bottom: 2px;
}

.job-decision .badges {
  gap: 7px;
}

.job-description {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.job-user-fields {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.job-user-field {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.job-user-field span {
  color: var(--text);
}

.job-user-field textarea,
.job-user-field input,
.job-user-field select {
  min-height: 0;
  border-radius: 6px;
  padding: 7px 8px;
  color: var(--text);
  background: rgba(15, 20, 36, 0.72);
  border-color: rgba(122, 162, 247, 0.28);
  font-size: 12px;
}

.job-item.is-applied .salary-field {
  border: 1px solid rgba(52, 211, 153, 0.42);
  border-radius: 6px;
  padding: 8px;
  background: rgba(16, 185, 129, 0.12);
}

.job-item.is-applied .salary-field span {
  color: var(--applied-soft);
}

.job-item.is-applied .salary-field select {
  border-color: var(--applied-line);
  background: rgba(6, 78, 59, 0.28);
}

.job-decision .decision-summary {
  padding: 9px 10px;
  border-left-color: #60a5fa;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.14), rgba(15, 23, 42, 0.18));
}

.job-decision .decision-summary.discarded {
  border-left-color: #fb7185;
  background: rgba(159, 18, 57, 0.11);
}

.decision-summary-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  color: #cbd5e1;
}

.decision-summary-primary > strong {
  display: block;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.trace-summary-entry {
  color: #86efac !important;
}

.trace-summary-discard {
  color: #fda4af !important;
}

.decision-ranking {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 1px 6px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 7px;
  padding: 4px 7px;
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.34);
  white-space: nowrap;
}

.decision-ranking > span {
  color: #93c5fd;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.decision-ranking > b {
  color: #f8fafc;
  font-size: 13px;
}

.decision-ranking > small {
  grid-column: 1 / -1;
  color: #a5b4fc;
  font-size: 9px;
  text-align: right;
}

.decision-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(96, 165, 250, 0.16);
}

.decision-context-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-radius: 5px;
  padding: 5px 7px;
  background: rgba(15, 23, 42, 0.24);
}

.decision-context-item.wide {
  grid-column: 1 / -1;
}

.decision-context-item small {
  color: #8795c5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.decision-context-item b {
  color: #c7d2fe;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.decision-trace {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(122, 162, 247, 0.22);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.18);
}

.decision-trace > summary {
  color: #93c5fd;
}

.decision-trace[open] {
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(30, 64, 175, 0.1);
}

.trace-group {
  margin-top: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.2);
}

.trace-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 8px;
}

.trace-group summary span {
  min-width: 20px;
  border-radius: 999px;
  padding: 1px 6px;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.24);
  text-align: center;
}

.trace-group-rules {
  display: grid;
  gap: 5px;
  max-height: 260px;
  overflow-y: auto;
  padding: 0 7px 7px;
  scrollbar-width: thin;
}

.trace-rule {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 7px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  padding: 5px 7px;
  background: rgba(15, 23, 42, 0.32);
}

.trace-rule.positive { border-color: rgba(74, 222, 128, 0.35); }
.trace-rule.negative { border-color: rgba(251, 146, 60, 0.42); }
.trace-rule.discard { border-color: rgba(251, 113, 133, 0.48); }

.trace-rule.professional-score.score-low {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(22, 101, 52, 0.1);
}

.trace-rule.professional-score.score-medium {
  border-color: rgba(74, 222, 128, 0.44);
  background: rgba(21, 128, 61, 0.16);
}

.trace-rule.professional-score.score-high {
  border-color: rgba(74, 222, 128, 0.62);
  background: rgba(22, 163, 74, 0.21);
}

.trace-rule.professional-score.score-max {
  border-color: rgba(134, 239, 172, 0.82);
  background: rgba(34, 197, 94, 0.28);
}

.trace-rule.professional-score .trace-points {
  align-self: start;
  border-radius: 999px;
  padding: 2px 6px;
  color: #f0fdf4;
  background: rgba(2, 44, 24, 0.52);
  text-align: center;
}

.trace-points {
  color: #cbd5e1;
  font-weight: 900;
}

.trace-rule > div {
  display: grid;
  gap: 2px;
}

.trace-rule strong {
  display: block;
  margin: 0;
  color: var(--text);
}

.trace-rule span:not(.trace-points),
.trace-rule small {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.trace-rule small {
  color: #a5b4fc;
  font-style: italic;
}

.trace-partial {
  margin: 7px 0;
  color: #fcd34d;
  font-size: 11px;
}

/* The Windows native select popup may use a light menu even in dark mode. */
.salary-field select option {
  color: #111827;
  background: #f8fafc;
}

.salary-field select option:checked {
  color: #ffffff;
  background: #0f766e;
}

.job-user-field textarea {
  resize: vertical;
  line-height: 1.35;
}

.metadata-status {
  min-height: 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.metadata-status.saving {
  color: var(--warning);
}

.metadata-status.success {
  color: var(--ok);
}

.metadata-status.error {
  color: var(--danger-soft);
}

.job-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.job-quick-actions {
  width: 100%;
  margin-top: 6px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 7px;
}

.applied-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.applied-check input {
  width: auto;
  accent-color: var(--ok);
}

.job-item.is-applied .applied-check {
  color: var(--applied-soft);
}

.job-item.is-applied .applied-check input {
  accent-color: var(--applied);
}

.discarded-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.discarded-check input {
  width: auto;
  accent-color: #f97316;
}

.job-item.is-manually-discarded {
  border-color: rgba(249, 115, 22, 0.72);
  background: rgba(154, 52, 18, 0.14);
}

.job-item.is-manually-discarded .discarded-check {
  color: #fdba74;
}

.discarded-only-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.discarded-only-check input {
  width: auto;
  accent-color: #fb7185;
}

.job-item.is-manually-discarded .discarded-only-check {
  color: #fda4af;
}

.closed-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.closed-check input {
  width: auto;
  accent-color: #eab308;
}

.job-quick-actions > label {
  --action-color: #94a3b8;
  --action-bg: rgba(148, 163, 184, 0.11);
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  gap: 7px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 4px 9px 4px 7px;
  background: rgba(15, 23, 42, 0.22);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
  user-select: none;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.job-quick-actions > label:hover {
  border-color: var(--action-color);
  color: #f8fafc;
  background: var(--action-bg);
  transform: translateY(-1px);
}

.job-quick-actions > label:focus-within {
  outline: 2px solid var(--action-color);
  outline-offset: 2px;
}

.job-quick-actions > label:has(input:checked) {
  border-color: var(--action-color);
  color: var(--action-color);
  background: var(--action-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--action-color) 24%, transparent);
}

.job-quick-actions input[type="checkbox"] {
  display: grid;
  place-content: center;
  appearance: none;
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex: 0 0 16px;
  margin: 0;
  border: 1.5px solid rgba(203, 213, 225, 0.58);
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.job-quick-actions input[type="checkbox"]::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #0f172a;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: translateY(-1px) rotate(45deg) scale(0.7);
  transition: opacity 100ms ease, transform 100ms ease;
}

.job-quick-actions input[type="checkbox"]:checked {
  border-color: var(--action-color);
  background: var(--action-color);
}

.job-quick-actions input[type="checkbox"]:checked::after {
  opacity: 1;
  transform: translateY(-1px) rotate(45deg) scale(1);
}

.job-quick-actions input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.applied-check {
  --action-color: #6ee7b7 !important;
  --action-bg: rgba(16, 185, 129, 0.14) !important;
}

.discarded-check {
  --action-color: #fdba74 !important;
  --action-bg: rgba(249, 115, 22, 0.13) !important;
}

.discarded-only-check {
  --action-color: #fda4af !important;
  --action-bg: rgba(244, 63, 94, 0.13) !important;
}

.closed-check {
  --action-color: #fde047 !important;
  --action-bg: rgba(234, 179, 8, 0.13) !important;
}

.job-item.is-closed-interest {
  border-color: rgba(234, 179, 8, 0.82);
  background: rgba(133, 77, 14, 0.16);
  box-shadow: inset 5px 0 0 rgba(234, 179, 8, 0.85);
}

.job-item.is-closed-interest .closed-check {
  color: #fde047;
}

.job-item.is-closed-returned {
  border-color: #facc15;
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.24), rgba(133, 77, 14, 0.1) 55%, transparent 100%);
  box-shadow:
    inset 8px 0 0 #facc15,
    0 0 0 1px rgba(250, 204, 21, 0.28);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.flag-icon {
  width: 18px;
  height: 12px;
  image-rendering: crisp-edges;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.badge.key {
  background: rgba(122, 162, 247, 0.14);
  color: var(--primary);
}

/* Escala exclusiva de Keys detectadas en la relevancia profesional de las cards. */
.job-decision .badge.professional-key {
  --professional-key-color: #86efac;
  --professional-key-bg: rgba(22, 101, 52, 0.12);
  --professional-key-line: rgba(74, 222, 128, 0.24);
  gap: 7px;
  border: 1px solid var(--professional-key-line);
  color: var(--professional-key-color);
  background: var(--professional-key-bg);
}

.job-decision .badge.professional-key.score-zero {
  --professional-key-color: #86a995;
  --professional-key-bg: rgba(20, 83, 45, 0.08);
  --professional-key-line: rgba(74, 222, 128, 0.16);
}

.job-decision .badge.professional-key.score-low {
  --professional-key-color: #86efac;
  --professional-key-bg: rgba(22, 101, 52, 0.14);
  --professional-key-line: rgba(74, 222, 128, 0.3);
}

.job-decision .badge.professional-key.score-medium {
  --professional-key-color: #6ee7a0;
  --professional-key-bg: rgba(21, 128, 61, 0.22);
  --professional-key-line: rgba(74, 222, 128, 0.44);
}

.job-decision .badge.professional-key.score-high {
  --professional-key-color: #bbf7d0;
  --professional-key-bg: rgba(22, 163, 74, 0.3);
  --professional-key-line: rgba(74, 222, 128, 0.62);
}

.job-decision .badge.professional-key.score-max {
  --professional-key-color: #f0fdf4;
  --professional-key-bg: rgba(34, 197, 94, 0.42);
  --professional-key-line: rgba(134, 239, 172, 0.82);
  box-shadow: inset 0 0 0 1px rgba(220, 252, 231, 0.08), 0 0 8px rgba(34, 197, 94, 0.12);
}

.job-decision .badge.professional-key b {
  min-width: 19px;
  border-radius: 999px;
  padding: 1px 5px;
  color: #f0fdf4;
  background: rgba(2, 44, 24, 0.5);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.badge.location {
  background: rgba(158, 206, 106, 0.26);
  color: #d7ffb8;
  border: 1px solid rgba(158, 206, 106, 0.72);
  box-shadow: inset 0 0 0 1px rgba(158, 206, 106, 0.16);
  font-weight: 800;
}

.badge.location::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(158, 206, 106, 0.8);
}

.badge.bad-location {
  background: rgba(255, 154, 168, 0.16);
  color: var(--danger-soft);
  border: 1px solid rgba(255, 154, 168, 0.45);
}

.badge.reject {
  background: var(--danger-burgundy-bg);
  color: var(--danger-soft);
  border: 1px solid var(--danger-burgundy);
}

.badge.negative {
  background: rgba(255, 154, 168, 0.16);
  color: var(--danger-soft);
  border: 1px solid rgba(255, 154, 168, 0.45);
}

.badge.repeat {
  margin-left: 6px;
  background: rgba(224, 175, 104, 0.16);
  color: var(--warning);
  border: 1px solid rgba(224, 175, 104, 0.52);
}

.badge.repeat-high {
  margin-left: 6px;
  background: var(--danger-burgundy-bg);
  color: var(--danger-soft);
  border: 1px solid var(--danger);
}

.badge.remote-location {
  background: rgba(122, 162, 247, 0.16);
  color: #a5b4fc;
  border: 1px solid rgba(122, 162, 247, 0.5);
}

.badge.unknown-location {
  background: rgba(224, 175, 104, 0.16);
  color: var(--warning);
  border: 1px dashed rgba(224, 175, 104, 0.65);
}

button.badge.repeat-history-trigger {
  padding: 4px 8px;
  font: inherit;
  cursor: pointer;
}

button.badge.repeat-history-trigger:hover,
button.badge.repeat-history-trigger:focus-visible {
  filter: brightness(1.2);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.repeat-history {
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(224, 175, 104, 0.52);
  border-radius: 7px;
  background: rgba(36, 40, 59, 0.94);
  color: var(--text);
  font-size: 12px;
}

.repeat-history strong {
  color: var(--warning);
}

.repeat-history ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 4px 12px;
  margin: 7px 0;
  padding-left: 18px;
}

.repeat-history p {
  margin-top: 6px;
  font-size: 11px;
}

.repeat-history-note {
  color: var(--warning);
}

.badge.novelty-repeat {
  margin-left: 6px;
  background: rgba(224, 175, 104, 0.16);
  color: var(--warning);
  border: 1px solid rgba(224, 175, 104, 0.52);
}

.badge.novelty-high {
  margin-left: 6px;
  background: var(--danger-burgundy-bg);
  color: var(--danger-soft);
  border: 1px solid var(--danger);
}

.badge.partial-description {
  margin-left: 6px;
  background: rgba(187, 154, 247, 0.14);
  color: #bb9af7;
  border: 1px solid rgba(187, 154, 247, 0.45);
}

.job-state {
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.job-state:hover,
.job-state:focus-visible {
  filter: brightness(1.2);
  box-shadow: 0 0 0 2px rgba(122, 162, 247, 0.2);
}

.job-state.accepted {
  background: rgba(158, 206, 106, 0.14);
  color: var(--ok);
}

.job-state.applied {
  background: rgba(16, 185, 129, 0.18);
  color: var(--applied-soft);
  border: 1px solid var(--applied-line);
}

.job-state.discarded {
  background: var(--danger-burgundy-bg);
  color: var(--danger-soft);
  border: 1px solid var(--danger-burgundy);
}

.job-state.closed {
  background: rgba(133, 77, 14, 0.28);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.78);
}

.job-state.closed-returned {
  background: rgba(234, 179, 8, 0.24);
  color: #fef08a;
  border: 1px solid #facc15;
}

.ranking-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(122, 162, 247, 0.5);
  border-radius: 12px;
  background: #1b2035;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.ranking-dialog::backdrop {
  background: rgba(5, 8, 18, 0.76);
  backdrop-filter: blur(3px);
}

.ranking-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(122, 162, 247, 0.08);
}

.ranking-dialog-head h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 17px;
}

.ranking-dialog-eyebrow {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ranking-dialog-close {
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-color: var(--line);
  background: rgba(15, 20, 36, 0.72);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.ranking-dialog-content {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 120px);
  padding: 16px 18px 18px;
  overflow-y: auto;
}

.ranking-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(122, 162, 247, 0.34);
  border-radius: 9px;
  background: rgba(15, 20, 36, 0.6);
}

.ranking-total > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ranking-total span {
  color: var(--muted);
  font-size: 12px;
}

.ranking-total strong {
  color: var(--primary);
  font-size: 26px;
}

.ranking-total-breakdown {
  display: flex;
  gap: 8px;
}

.ranking-reasons {
  display: grid;
  gap: 7px;
}

.ranking-reason {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 20, 36, 0.46);
}

.ranking-reason.positive {
  border-left: 3px solid var(--ok);
}

.ranking-reason.negative {
  border-left: 3px solid var(--danger-soft);
}

.ranking-reason.neutral {
  border-left: 3px solid var(--warning);
}

.ranking-reason > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ranking-reason strong {
  color: var(--text);
  font-size: 12px;
}

.ranking-reason span:not(.ranking-points) {
  color: var(--muted);
  font-size: 12px;
}

.ranking-reason small {
  color: #727da7;
  overflow-wrap: anywhere;
}

.ranking-points {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
}

.ranking-points.positive {
  background: rgba(158, 206, 106, 0.15);
  color: var(--ok);
}

.ranking-points.negative {
  background: rgba(247, 118, 142, 0.15);
  color: var(--danger-soft);
}

.ranking-points.neutral {
  background: rgba(224, 175, 104, 0.15);
  color: var(--warning);
}

.ranking-forced-zero {
  padding: 9px 11px;
  border: 1px solid rgba(247, 118, 142, 0.45);
  border-radius: 7px;
  background: var(--danger-burgundy-bg);
  color: var(--danger-soft);
  font-size: 12px;
}

.ranking-history-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.decision-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(158, 206, 106, 0.4);
  border-radius: 9px;
  background: rgba(158, 206, 106, 0.09);
}

.decision-result span {
  color: var(--muted);
  font-size: 12px;
}

.decision-result strong {
  color: var(--ok);
  font-size: 16px;
}

.decision-explanation {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.decision-detail-group {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: rgba(122, 162, 247, 0.07);
}

.decision-detail-group > strong {
  color: var(--text);
  font-size: 12px;
}

.reports-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 12px;
}

.reports-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.load-more-reports {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  border-style: dashed;
  color: #bfdbfe;
}

.load-more-reports span {
  border-radius: 999px;
  padding: 2px 7px;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.2);
  font-size: 10px;
  font-weight: 850;
}

.report-row {
  display: grid;
  grid-template-columns: 1fr 74px;
  gap: 6px;
  align-items: stretch;
}

.report-button {
  display: grid;
  gap: 4px;
  text-align: left;
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--line);
  min-width: 0;
}

.report-button.selected {
  border-color: var(--primary);
  background: rgba(122, 162, 247, 0.14);
}

.delete-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 0 8px;
  background: rgba(247, 118, 142, 0.12);
  color: var(--danger);
  border-color: rgba(247, 118, 142, 0.5);
  font-size: 12px;
  font-weight: 700;
}

.delete-report:hover {
  background: var(--danger-burgundy-bg);
  border-color: var(--danger);
  color: var(--danger-soft);
}

.report-button strong {
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.report-button span {
  color: var(--muted);
  font-size: 11px;
}

.report-summary {
  display: grid;
  gap: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  white-space: normal;
}

.report-header h3 {
  margin-bottom: 4px;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.metric strong {
  font-size: 14px;
}

.report-section {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.report-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.report-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.raw-report {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.raw-report summary {
  cursor: pointer;
  color: var(--primary);
}

.raw-report pre {
  overflow: auto;
  max-height: 320px;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 6px;
  background: #11131f;
  color: var(--text);
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .layout,
  .reports-layout {
    grid-template-columns: 1fr;
  }

  .layout {
    height: auto;
    overflow: visible;
  }

  .settings {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .content {
    overflow: visible;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-field,
  .toolbar-actions {
    grid-column: 1 / -1;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .layout {
    padding: 8px;
    gap: 10px;
  }

  .panel {
    padding: 12px;
  }

  .settings .panel-title {
    margin: -12px -12px 12px;
    padding: 10px 12px;
  }

  .panel-title,
  .settings-heading,
  .history-context,
  .job-head,
  .job-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-heading {
    gap: 8px;
  }

  .save-config-area {
    justify-items: start;
    width: 100%;
  }

  .config-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  #saveConfig,
  #syncSharedRules {
    flex: 1 1 150px;
  }

  .grid-2,
  .filters,
  .reports-layout {
    grid-template-columns: 1fr;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .search-field,
  .toolbar-actions {
    grid-column: auto;
  }

  .toolbar-actions,
  .run-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .toolbar-actions button,
  .run-actions button {
    width: 100%;
  }

  .job-state {
    align-self: flex-start;
  }

  .report-row {
    grid-template-columns: 1fr;
  }

  .delete-report {
    min-height: 34px;
  }
}

@media (max-width: 520px) {
  .job-review-grid {
    grid-template-columns: 1fr;
  }

  .job-review-tools {
    padding-top: 10px;
    padding-left: 0;
    border-top: 2px solid rgba(122, 162, 247, 0.32);
    border-left: 0;
  }

  .help-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.login-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.16), transparent 35%),
    var(--bg);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  display: grid;
  width: min(420px, 100%);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.login-card h1,
.login-card p {
  margin: 0;
}

.login-card p {
  margin-top: 5px;
  color: var(--muted);
}

.login-brand {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 12px;
  color: #07111f;
  font-weight: 900;
  background: var(--primary);
}

.login-card button {
  min-height: 44px;
}

.login-status {
  min-height: 20px;
  color: var(--danger) !important;
}
