/* Job Application OS — pastel minimal theme */
:root {
  --bg: #faf7f1;
  --bg-soft: #f4efe7;
  --card: #ffffff;
  --ink: #2e2a26;
  --ink-soft: #57504a;
  --muted: #9a9188;
  --line: #ece4d8;
  --accent: #7c6fd0;
  --accent-hover: #6a5dc2;
  --accent-soft: #efeafd;
  --peach: #ffe8d3;
  --mint: #dcf2e4;
  --sky: #dfeafb;
  --blush: #fbdee6;
  --lilac: #e9e2f8;
  --good: #2f7d4f;
  --good-soft: #dcf2e4;
  --warn: #9a6b1e;
  --warn-soft: #fdf3d7;
  --bad: #b04444;
  --bad-soft: #fbdee6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(46, 42, 38, .04), 0 8px 22px rgba(46, 42, 38, .05);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.error { color: var(--bad); }

.view { display: block; }

/* ---------- login ---------- */
#login-view { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 36px 32px; width: 100%; max-width: 380px; box-shadow: var(--shadow); text-align: center;
}
.login-logo { margin-bottom: 14px; }
.login-card h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.01em; }
.login-card .muted { font-size: 14px; margin: 0 0 4px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; text-align: left; }
#login-error { margin: 10px 0 0; font-size: 13px; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 20px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.profile-switcher { display: flex; gap: 8px; align-items: center; }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.banner {
  padding: 8px 20px; font-size: 13px; text-align: center;
  border-bottom: 1px solid var(--line);
}
.banner.warn { color: var(--warn); background: var(--warn-soft); }

/* ---------- automation control center ---------- */
.automation-view {
  max-width: 1100px; margin: 0 auto; padding: 18px 20px 30px;
}
.automation-view .view-head .stage-head { margin-top: 0; }
.automation-view .view-head .muted { margin: 2px 0 14px; font-size: 13.5px; }
.master-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px;
}
.master-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.master-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.master-sub { font-size: 13px; color: var(--muted); margin: 6px 0 0; max-width: 620px; }
.master-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.master-actions button.active { box-shadow: inset 0 0 0 2px rgba(124, 111, 208, .45); }
.master-count { margin-left: auto; font-size: 12.5px; }
.auto-state {
  font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted);
  flex: 0 0 auto;
}
.auto-state.is-on { color: var(--good); border-color: #bfe6cf; background: var(--good-soft); }
.auto-state.is-paused { color: var(--warn); border-color: #f0dfae; background: var(--warn-soft); }
.auto-state.is-off { color: var(--muted); }
.auto-status-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; margin-bottom: 12px;
}
.auto-status-head {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px;
}
.auto-status-title { font-size: 14px; font-weight: 700; }
.auto-status-list { list-style: none; margin: 0; padding: 0; }
.auto-status-row { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.auto-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; background: #d6d2c8; }
.auto-dot.is-ok { background: var(--good); }
.auto-dot.is-error { background: #d64545; }
.auto-dot.is-idle { background: #d6d2c8; }
.auto-status-text { display: flex; flex-direction: column; gap: 1px; }
.auto-status-name { font-size: 13px; font-weight: 600; }
.auto-status-detail { font-size: 12px; }
.steps-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px;
}
.step-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.auto-step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auto-step-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.auto-step-desc { font-size: 12.5px; color: var(--muted); }

/* standard toggle switch */
.switch {
  position: relative; flex: 0 0 auto; width: 44px; height: 24px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg-soft);
  cursor: pointer; padding: 0; transition: background .15s ease, border-color .15s ease;
}
.switch:hover { border-color: #d5c9f5; }
.switch .switch-knob {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .15s ease;
}
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(20px); }
.switch:disabled { opacity: .5; cursor: default; }

/* toggle chips (freshness filter) */
.chip-toggle {
  background: var(--card); color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; width: auto;
}
.chip-toggle:hover { background: var(--accent-soft); border-color: #d5c9f5; color: var(--ink); }
.chip-toggle.active { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.chip-toggle:disabled { opacity: .5; cursor: default; }

/* ---------- hiring posts ---------- */
.job.hiring .job-head { cursor: default; }

/* ---------- tailor flow note ---------- */
.tailor-note { flex: 1 1 100%; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.tailor-note.is-working { color: var(--warn); }
.tailor-note.is-ready { color: var(--good); font-weight: 600; }
.tailor-note.is-error { color: var(--bad); }
.pill-tailoring_queued, .pill-tailoring { color: var(--warn); border-color: #f0dfae; background: var(--warn-soft); }
.pill-tailor_error { color: var(--bad); border-color: #f3c1c7; background: var(--bad-soft); }
.badge.status-tailoring_queued, .badge.status-tailoring { color: var(--warn); border-color: #f0dfae; background: var(--warn-soft); }
.badge.status-tailor_error { color: var(--bad); border-color: #f3c1c7; background: var(--bad-soft); }

/* ---------- outcomes funnels (stats) ---------- */
.funnel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
}
.funnel-key { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; }
.funnel-row { display: flex; align-items: center; gap: 10px; margin: 5px 0; }
.funnel-lab { flex: 0 0 86px; font-size: 12.5px; color: var(--muted); }
.funnel-track { flex: 1 1 auto; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.funnel-fill { height: 100%; background: var(--accent); border-radius: 4px; min-width: 0; transition: width .3s; }
.funnel-val { flex: 0 0 34px; text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .automation-view { padding: 10px 14px 24px; }
}

/* ---------- metrics ---------- */
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px; padding: 18px 20px 4px; max-width: 1100px; margin: 0 auto;
}
.metric {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px;
}
.metric:nth-child(4n+1) { background: #fff9f3; }
.metric:nth-child(4n+2) { background: #f7f4fd; }
.metric:nth-child(4n+3) { background: #f3faf5; }
.metric:nth-child(4n+4) { background: #f4f7fd; }
.metric .v { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.metric .k { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 0; overflow-x: auto; padding: 14px 20px 0;
  max-width: 1100px; margin: 0 auto;
  scrollbar-width: thin;
}
.main-tabs { padding-bottom: 0; border-bottom: 1px solid var(--line); }
.tab {
  white-space: nowrap; border: 1px solid var(--line); border-bottom: none;
  background: var(--bg-soft); color: var(--ink-soft); border-radius: 0;
  padding: 8px 18px; cursor: pointer; margin-right: -1px;
  font-size: 13.5px; font-weight: 600; transition: background .15s, color .15s;
  font-family: inherit;
}
.tab:hover { background: var(--accent-soft); color: var(--ink); }
.tab.main-tab { font-size: 14.5px; padding: 10px 26px; }
.tab.main-tab.active {
  background: var(--card); color: var(--ink); border-color: var(--line);
  border-bottom: 1px solid var(--card); margin-bottom: -1px; position: relative;
}
.tab.sub-tab { font-size: 12.5px; padding: 6px 14px; }
.tab.sub-tab.active {
  background: var(--card); color: var(--ink); border-color: var(--line);
  border-bottom: 1px solid var(--card); margin-bottom: -1px; position: relative;
  box-shadow: inset 0 2px 0 var(--accent);
}
.subtabs { padding-top: 10px; padding-bottom: 0; border-bottom: 1px solid var(--line); }

/* ---------- job list ---------- */
#jobs { padding: 8px 20px 48px; max-width: 960px; margin: 0 auto; }
.job {
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  border-radius: 0; margin-bottom: 0; overflow: hidden;
  transition: background .15s;
}
.job:hover { box-shadow: none; transform: none; background: rgba(255, 255, 255, .65); }
.job-head { padding: 18px 8px; cursor: pointer; }
.job-head .co { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.job-head .ti { color: var(--ink-soft); font-size: 14px; margin-top: 3px; }
.job-loc { color: var(--muted); font-size: 13px; margin-top: 3px; }
.job-foot { padding: 0 8px 18px; display: flex; gap: 8px; }

/* ---------- pipeline progress stepper ---------- */
.progress { margin-top: 12px; max-width: 440px; }
.progress-track { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: 2px; background: var(--accent); transition: width .3s; }
.progress-fill.is-rejected { background: var(--bad); }
.progress-label { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.progress-label.is-muted { margin-top: 0; }
.progress-label.is-rejected { color: var(--bad); font-weight: 600; }
.badge {
  font-size: 11.5px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 10px; color: var(--muted); background: var(--bg-soft); line-height: 1.4;
}
.badge.sponsor-yes { color: var(--good); border-color: #bfe6cf; background: var(--good-soft); }
.badge.sponsor-no { color: var(--bad); border-color: #f3c1c7; background: var(--bad-soft); }
.badge.status-draft { color: var(--warn); border-color: #f0dfae; background: var(--warn-soft); }
.badge.status-ready { color: var(--good); border-color: #bfe6cf; background: var(--good-soft); }
.badge.status-approved, .badge.status-applied, .badge.status-sent { color: var(--accent); border-color: #d5c9f5; background: var(--accent-soft); }
.badge.status-submitted { color: var(--good); border-color: #bfe6cf; background: var(--good-soft); }
.badge.stage-found { color: var(--muted); }
.badge.stage-filtered_in { color: var(--good); border-color: #bfe6cf; background: var(--good-soft); }
.badge.stage-filtered_out { color: var(--bad); border-color: #f3c1c7; background: var(--bad-soft); }
.badge.reason { color: var(--warn); border-color: #f0dfae; background: var(--warn-soft); }

/* ---------- pipeline filters (removed; navigation is tabs only) ---------- */
.stage-head {
  font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  margin: 20px 0 10px; font-weight: 700;
}

/* ---------- packet viewer ---------- */
.packet-pdf { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); }
.section-title { font-weight: 700; margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 7px 0 7px 20px; border-left: 2px solid var(--line); position: relative; font-size: 13.5px; }
.timeline li::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  position: absolute; left: -5.5px; top: 12px;
}
.timeline .t { font-weight: 600; }
.timeline .d { color: var(--muted); font-size: 12.5px; }

/* ---------- job detail modal ---------- */
.detail-head { padding-right: 36px; }
.detail-company { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.detail-title { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px;
  margin: 18px 0; padding: 16px 18px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
}
.dg-k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.dg-v { font-size: 14px; font-weight: 500; color: var(--ink); margin-top: 2px; word-break: break-word; }
.detail-section { margin-top: 22px; }
.detail-section > h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.detail-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--card);
}
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 12px; text-transform: capitalize;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-soft);
}
.pill-draft { color: var(--warn); border-color: #f0dfae; background: var(--warn-soft); }
.pill-approved { color: var(--accent); border-color: #d5c9f5; background: var(--accent-soft); }
.pill-submitted, .pill-sent { color: var(--good); border-color: #bfe6cf; background: var(--good-soft); }
.pill-hm { color: #2f6db3; border-color: #c3d9f2; background: var(--sky); }
.outreach-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; background: var(--card);
}
.outreach-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.outreach-name { font-weight: 600; font-size: 14px; }
.outreach-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
pre.json {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; font-size: 12px; overflow-x: auto; max-height: 240px; overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap;
}

/* ---------- buttons & inputs ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background .15s, transform .05s, border-color .15s;
  font-family: inherit;
}
button:hover, .btn:hover { background: var(--accent-hover); color: #fff; }
button:active, .btn:active { transform: translateY(1px); }
button.ghost, .btn.ghost { background: var(--card); color: var(--ink-soft); border: 1px solid var(--line); }
button.ghost:hover, .btn.ghost:hover { background: var(--accent-soft); border-color: #d5c9f5; color: var(--ink); }
button.small, .btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea {
  font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); font-family: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #d5c9f5; border-color: var(--accent); }
.profile-switcher select { width: auto; }
#add-profile { white-space: nowrap; }

/* ---------- referrals view ---------- */
.ref-add { margin: 4px 0 18px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--card); }
.ref-add summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.ref-lab { display: block; font-size: 13px; color: var(--ink-soft); margin: 10px 0 2px; }
.ref-inp { margin-top: 4px; }
.ref-add .btn { margin-top: 12px; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(46, 42, 38, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 14px; z-index: 50; overflow-y: auto; backdrop-filter: blur(2px);
}
.modal-card {
  background: var(--card); border-radius: 18px; padding: 26px;
  width: 100%; max-width: 680px; position: relative; box-shadow: 0 24px 60px rgba(46, 42, 38, .22);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; background: var(--bg-soft); color: var(--muted);
  font-size: 20px; line-height: 1; padding: 0; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line);
}
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal-card h2 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .metrics { grid-template-columns: repeat(3, 1fr); padding: 12px 14px 2px; }
  .metric { padding: 10px; }
  .metric .v { font-size: 19px; }
  .tabs { padding: 10px 14px 0; }
  #jobs { padding: 12px 14px 40px; }
  .topbar { padding: 10px 14px; }
  .brand span { font-size: 14.5px; }
  .modal { padding: 12px 8px; }
  .modal-card { padding: 20px 16px; border-radius: 14px; }
  .detail-grid { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .detail-row { align-items: flex-start; flex-direction: column; }
}
.job-why { color: var(--muted); font-size: 12px; margin-top: 3px; font-style: italic; }
.job-date { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* ---------- stats view ---------- */
#stats-view { padding: 18px 20px 48px; max-width: 960px; margin: 0 auto; }
.stats-title { margin: 6px 0 4px; font-size: 21px; letter-spacing: -0.01em; }
.stats-sub { margin: 0 0 16px; font-size: 13.5px; }
.stats-foot { margin: 18px 0 0; font-size: 12.5px; }
.board-acc {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
}
.board-acc-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; cursor: pointer; list-style: none;
}
.board-acc-head::-webkit-details-marker { display: none; }
.board-acc-head::before {
  content: "▸"; color: var(--muted); font-size: 13px;
  transition: transform .15s;
}
.board-acc[open] .board-acc-head::before { transform: rotate(90deg); }
.board-acc-head:hover { background: var(--bg-soft); }
.board-acc-name { font-weight: 700; font-size: 15.5px; }
.board-acc-meta { font-size: 12.5px; }
.board-acc-chips { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.chip {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft); border: 1px solid var(--line);
}
.chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.board-acc-body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.board-acc-note { font-size: 12.5px; margin: 12px 0 8px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stats-table th, .stats-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.stats-table th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stats-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table th:nth-child(n+2) { text-align: right; }
.stats-table td.good { color: var(--good); font-weight: 600; }
.stats-table td.warn { color: var(--warn); font-weight: 600; }
.stats-table td.bad { color: var(--bad); font-weight: 600; }
.stats-table tr.totals td { font-weight: 700; border-bottom: none; border-top: 2px solid var(--line); }
button.ghost.small.active, .btn.ghost.small.active {
  background: var(--accent-soft); border-color: #d5c9f5; color: var(--ink);
}
@media (max-width: 640px) {
  #stats-view { padding: 12px 14px 40px; }
  .board-acc-chips { margin-left: 0; }
}

/* ---------- filter rail (left sidebar) ---------- */
.layout {
  display: flex; gap: 24px; align-items: flex-start;
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
#filters {
  flex: 0 0 248px; position: sticky; top: 66px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-top: 18px;
}
.content { flex: 1 1 auto; min-width: 0; }
.content #jobs { max-width: none; margin: 0; padding: 8px 0 48px; }
.content #stats-view { max-width: none; margin: 0; padding: 18px 0 48px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filters-head h2 { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.filters-count { font-size: 12.5px; margin: 6px 0 0; }
.filter-group { margin-top: 14px; }
.filter-group label {
  display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 6px;
}
.filter-group input, .filter-group select { width: 100%; }
#f-pay:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 860px) {
  .layout { flex-direction: column; padding: 0 14px; }
  #filters { position: static; flex: none; width: 100%; margin-top: 12px; }
}
/* ---------- sweep progress (stats) ---------- */
.sweep-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 20px; }
.sweep-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 10px; }
.sweep-title { font-weight: 700; font-size: 14px; }
.sweep-sub { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sweep-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.sweep-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; }
.sweep-note { margin: 10px 0 0; font-size: 12px; }
.sweep-empty { margin: 0; }
/* Live panels: green pulse dot on the title, subtle dismiss button. */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #34a853; margin-right: 8px; vertical-align: 1px;
  animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.panel-dismiss { background: none; border: none; color: var(--muted);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 6px;
  border-radius: 6px; }
.panel-dismiss:hover { color: inherit; background: var(--line); }

/* ---------- clickable brand logo ---------- */
button.brand { background: none; border: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
button.brand:hover span { text-decoration: underline; }
button.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* Server-side pagination controls */
.tab-body {
  max-width: 1100px; margin: 0 auto; padding: 18px 20px 48px;
}
.section-head {
  margin: 0 0 14px; font-size: 18px; letter-spacing: -0.01em;
}

/* ---------- command bar (overview) ---------- */
.cmd-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 4px;
}
.cmd-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.cmd-v { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.cmd-k { font-size: 12px; color: var(--muted); }
.cmd-pill-row { margin: 4px 0 2px; }
.updated { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.cmd-errors { font-size: 12.5px; margin: 8px 0 0; }
.acc-peach { background: #fff9f3; }
.acc-lilac { background: #f7f4fd; }
.acc-mint { background: #f3faf5; }
.acc-sky { background: #f4f7fd; }
.acc-blush { background: #fdf4f6; }
.acc-gold { background: #fdfaf2; }
.refresh-btn {
  border: 1px dashed var(--line); background: var(--card);
  border-radius: var(--radius); color: var(--ink-soft);
  font-size: 13.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; padding: 12px 14px;
}
.refresh-btn:hover { background: var(--accent-soft); border-color: #d5c9f5; color: var(--ink); }
.refresh-btn:disabled { opacity: .6; cursor: wait; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #d5c9f5; border-top-color: var(--accent);
  animation: spin .7s linear infinite; flex: 0 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- live feed ---------- */
.feed-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-top: 16px;
}
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item {
  padding: 9px 0 9px 20px; border-left: 2px solid var(--line);
  position: relative; font-size: 13.5px;
}
.feed-item::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: #c9c2b6; position: absolute; left: -5.5px; top: 14px;
}
.feed-item.is-now::before { background: #34a853; }
.feed-top { display: flex; align-items: center; gap: 8px; margin-bottom: 1px; }
.feed-when { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.feed-text { font-weight: 600; }
.feed-sub { font-size: 12.5px; }
.feed-more { margin-top: 10px; text-align: center; }

/* ---------- applications ---------- */
.app-cards { display: flex; flex-direction: column; gap: 12px; }
.app-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
}
.app-co { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.app-ti { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.app-loc { font-size: 13px; margin-top: 2px; }
.app-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge.status-term { color: var(--warn); border-color: #f0dfae; background: var(--warn-soft); }
.badge.post { color: var(--accent); border-color: #d5c9f5; background: var(--accent-soft); }
.app-post { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
/* horizontal stage stepper */
.stages { display: flex; align-items: flex-start; margin-top: 14px; }
.stage-node { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; }
.stage-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #d6d2c8; background: var(--card);
}
.stage-node.is-done .stage-dot { border-color: var(--accent); background: var(--accent); }
.stage-lab { font-size: 11px; color: var(--muted); text-align: center; }
.stage-node.is-done .stage-lab { color: var(--ink); font-weight: 600; }
.stage-link { flex: 1; height: 2px; background: var(--line); margin-top: 6px; min-width: 12px; }
.stage-link.is-done { background: var(--accent); }

/* ---------- referrals ---------- */
.ref-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px;
}
.ref-name { font-weight: 700; font-size: 15px; }
.ref-sub { font-size: 13px; margin-top: 2px; }
.ref-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; }
.ref-meta a { color: var(--accent); font-weight: 600; }
.ref-notes { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- poc ---------- */
.poc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px;
}
.poc-name { font-weight: 700; font-size: 15px; }
.poc-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; font-size: 13px; }
.poc-meta a { color: var(--accent); font-weight: 600; }

/* ---------- fresh alerts ---------- */
.fresh-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.fresh-title { font-weight: 700; font-size: 16px; }
.fresh-detail { font-size: 14px; margin-top: 8px; white-space: pre-wrap; }
.fresh-foot { font-size: 12.5px; margin-top: 12px; }

/* ---------- open source ---------- */
.oss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.oss-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px;
}
.oss-repo { font-size: 12px; margin-bottom: 4px; }
.oss-title { font-weight: 700; font-size: 14.5px; }
.oss-title a, a.oss-title { color: var(--ink); text-decoration: none; }
.oss-title a:hover { color: var(--accent); text-decoration: underline; }
.oss-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.oss-reasons { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); }
.tackle-row { display: flex; gap: 8px; margin-top: 12px; }
.tackle-token { flex: 1 1 auto; min-width: 0; }
.tackle-msg { font-size: 12.5px; margin-top: 8px; display: block; }
.tackle-msg.ok { color: var(--good); font-weight: 600; }
.tackle-msg.error { color: var(--bad); }

/* ---------- inbox ---------- */
.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 10px;
}
.inbox-item .badge { flex: 0 0 auto; margin-top: 1px; }
.inbox-mid { flex: 1 1 auto; min-width: 0; }
.inbox-ww { font-weight: 600; font-size: 14px; }
.inbox-detail { font-size: 12.5px; margin-top: 2px; }
.inbox-when { flex: 0 0 auto; font-size: 12.5px; }

/* ---------- shared states ---------- */
.empty-state {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; margin-top: 8px;
}
.empty-state p { margin: 0; }
.error-box {
  background: var(--bad-soft); border: 1px solid #f3c1c7; border-radius: var(--radius);
  padding: 16px 18px; margin-top: 8px;
}
.error-box .error { margin: 0 0 10px; }

/* ---------- collapsible live feed ---------- */
.feed-acc > .feed-sum {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
}
.feed-acc > .feed-sum::-webkit-details-marker { display: none; }
.feed-acc > .feed-sum::before {
  content: "▸"; color: var(--muted); font-size: 13px;
  transition: transform .15s;
}
.feed-acc[open] > .feed-sum::before { transform: rotate(90deg); }
.feed-acc > .feed-sum:hover .feed-sum-head { color: var(--accent); }
.feed-sum-head { margin: 0; }
.feed-acc > .feed-sum .updated { margin-top: 0; }
.feed-content { margin-top: 10px; }

/* ---------- applied-row actions ---------- */
.app-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.app-actions a.ghost { display: inline-block; padding: 9px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; font-family: inherit;
  background: var(--card); color: var(--ink-soft); border: 1px solid var(--line); border-radius: 10px; }
.app-actions a.ghost:hover { background: var(--accent-soft); border-color: #d5c9f5; color: var(--ink); }
.app-actions a.ghost.small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.blocker-detail { margin: 10px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.app-status { font-size: 12.5px; margin-top: 8px; }
.app-status.error { color: var(--bad); }

/* ---------- modal extras ---------- */
.modal-body { margin-top: 10px; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.modal-status { font-size: 13px; margin-top: 10px; }
.modal-status.error { color: var(--bad); }
.outreach-recipient { font-weight: 700; font-size: 15px; margin-top: 6px; }
.draft-msg {
  white-space: pre-wrap; font-size: 14px; margin-top: 10px;
  padding: 12px 14px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; max-height: 320px; overflow-y: auto;
}
.poc-url-line { margin: 8px 0; word-break: break-all; font-size: 14px; }
.poc-url-line a { color: var(--accent); font-weight: 600; }

/* ---------- hiring-manager draft cards ---------- */
.hm-card { cursor: pointer; }
.hm-card:hover { border-color: #d5c9f5; background: #fdfbff; }
.hm-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hm-title { font-size: 13px; }
.hm-preview { font-size: 13px; margin-top: 8px; }

@media (max-width: 640px) {
  .tab-body { padding: 12px 14px 40px; }
  .stages { overflow-x: auto; }
  .inbox-item { flex-wrap: wrap; }
}

