/* ───────── theme tokens (dark studio — matches the Personal Website) ───────── */
:root {
  --bg: #07090f;
  --bg-alt: #0d111a;
  --surface: #11151f;
  --surface-2: #161c27;
  --border: #1f2533;
  --text: #e7eaf0;
  --text-muted: #8a93a5;
  --primary: #4d8cff;
  --primary-hover: #3a76f0;
  --primary-soft: rgba(77, 140, 255, 0.12);
  --accent-2: #00d4f5;
  --danger: #ff5f57;
  --danger-soft: rgba(255, 95, 87, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --radius-sm: 10px;

  /* status colors (tuned for the dark surface) */
  --st-Saved: #8a93a5;
  --st-Applied: #4d8cff;
  --st-PhoneScreen: #22d3ee;
  --st-Interview: #a855f7;
  --st-Offer: #34d399;
  --st-Rejected: #ff5f57;
  --st-Accepted: #10b981;
}

/* Optional light theme (toggle in the top bar). */
[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-alt: #e9eef5;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --accent-2: #0891b2;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.18);
}

* { box-sizing: border-box; }

/* ───────── subtle, theme-blended scrollbars ───────── */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
  border: 3px solid transparent;   /* padding so the thumb looks slim */
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.spacer { flex: 1; }
.mono { font-family: "JetBrains Mono", "Fira Code", Consolas, monospace; }

/* ───────── aurora background (fixed, drifting blobs) ───────── */
.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aurora-blob {
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  will-change: transform;
}
.aurora-1 {
  background: radial-gradient(circle at 30% 30%, var(--primary) 0%, transparent 60%);
  top: -15vw; left: -10vw;
  animation: drift1 28s ease-in-out infinite alternate;
}
.aurora-2 {
  background: radial-gradient(circle at 60% 60%, var(--accent-2) 0%, transparent 65%);
  bottom: -20vw; right: -10vw;
  opacity: 0.16;
  animation: drift2 34s ease-in-out infinite alternate;
}
.aurora-3 {
  background: radial-gradient(circle at 50% 50%, #c084fc 0%, transparent 65%);
  top: 40%; left: 35%;
  width: 35vw; height: 35vw;
  opacity: 0.12;
  animation: drift3 24s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate3d(0,0,0); } to { transform: translate3d(8vw,6vw,0); } }
@keyframes drift2 { from { transform: translate3d(0,0,0); } to { transform: translate3d(-10vw,-4vw,0); } }
@keyframes drift3 { from { transform: translate3d(0,0,0); } to { transform: translate3d(-5vw,4vw,0); } }
@media (prefers-reduced-motion: reduce) { .aurora-blob { animation: none; } }

/* Everything above the aurora. */
.topbar, .container, .footer { position: relative; z-index: 1; }

/* ───────── top bar ───────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(7, 9, 15, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.75); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { font-size: 1.5rem; }
.brand h1 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text) 0%, var(--primary) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ───────── buttons ───────── */
button { font: inherit; cursor: pointer; }

.primary-btn {
  background: linear-gradient(135deg, var(--accent-2) 0%, var(--primary) 100%);
  color: #07090f;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: 0 6px 18px -8px var(--primary);
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}
.primary-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 24px -10px var(--primary); }
.primary-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.ghost-btn {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.ghost-btn:hover { background: var(--surface-2); border-color: var(--primary); }

.danger-btn {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.danger-btn:hover { border-color: var(--danger); }

.icon-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--primary); }

.link-btn { background: none; border: none; color: var(--primary); text-decoration: underline; padding: 0; font: inherit; }

/* ───────── layout ───────── */
.container { max-width: 1200px; margin: 0 auto; padding: 28px 22px 90px; }

/* ───────── stats ───────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  position: relative;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent-2));
  opacity: 0.8;
}
.stat-card .num {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text) 0%, var(--accent-2) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .label { color: var(--text-muted); font-size: 0.82rem; margin-top: 7px; }

/* ───────── login screen ───────── */
.login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  position: relative; z-index: 1;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 40px 36px; max-width: 420px; text-align: center;
}
.login-card h1 { margin: 12px 0 8px; font-size: 1.5rem; letter-spacing: -0.02em; }
.login-card p { margin: 0 auto; max-width: 320px; }
.login-mark { font-size: 3rem; }
.login-google { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; text-decoration: none; padding: 11px 20px; }

/* ───────── nav ───────── */
.nav { display: flex; gap: 2px; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav a {
  color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.92rem;
  padding: 7px 13px; border-radius: var(--radius-sm); transition: background 0.12s, color 0.12s;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav-badge { background: var(--danger); color: #fff; border-radius: 99px; font-size: 0.7rem; font-weight: 700; padding: 0 6px; min-width: 16px; text-align: center; }
[data-theme="light"] .nav-badge { color: #fff; }

/* ───────── dashboard / updates blocks ───────── */
.dash-block { margin-bottom: 26px; }
.dash-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(77,140,255,0.12), rgba(0,212,245,0.06));
  border: 1px solid rgba(77,140,255,0.3); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 22px;
}

/* ───────── settings ───────── */
.settings-grid { display: flex; flex-direction: column; gap: 2px; }
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 4px; border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.set-label { font-weight: 600; }
.admin-badge { background: linear-gradient(135deg, var(--accent-2), var(--primary)); color: #07090f; font-size: 0.62rem; font-weight: 800; padding: 1px 6px; border-radius: 4px; letter-spacing: 0.04em; vertical-align: middle; }

/* ───────── pipeline funnel (Teal-style chevrons) ───────── */
.funnel { display: flex; gap: 2px; background: var(--border); border-radius: var(--radius-sm); margin-bottom: 24px; overflow-x: auto; padding-bottom: 4px; }
.funnel-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.funnel-row .funnel { flex: 1; min-width: 0; margin-bottom: 0; }
.funnel-stage {
  flex: 1 0 auto;
  min-width: 116px;
  background: var(--surface);
  padding: 13px 18px 13px 26px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, filter 0.15s;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
}
.funnel-stage:first-child {
  padding-left: 18px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}
.funnel-stage:hover { filter: brightness(1.12); }
.funnel-stage .fs-num { font-size: 1.45rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.funnel-stage .fs-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 5px; white-space: nowrap; }
.funnel-stage.active {
  background: linear-gradient(135deg, rgba(0,212,245,0.18), rgba(77,140,255,0.18));
}
.funnel-stage.active .fs-num {
  background: linear-gradient(120deg, var(--accent-2), var(--primary));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.funnel-stage.active .fs-label { color: var(--primary); }

/* ───────── star ratings ───────── */
.star-input { display: inline-flex; gap: 5px; font-size: 1.55rem; }
.star-input .star { background: none; border: 0; padding: 0; cursor: pointer; color: var(--border); transition: color 0.1s, transform 0.1s; line-height: 1; user-select: none; }
.star-input .star.on { color: #ffbc2e; }
.star-input .star:hover { transform: scale(1.15); }
.stars { color: #ffbc2e; letter-spacing: 1px; white-space: nowrap; font-size: 0.9rem; }
.stars .off { color: var(--border); }

/* inline editable excitement (Jobs table) */
.ex-input { display: inline-flex; gap: 3px; cursor: pointer; font-size: 1.05rem; line-height: 1; }
.ex-input .ex-star { color: var(--border); transition: color 0.1s, transform 0.1s; }
.ex-input .ex-star.on { color: #ffbc2e; }
.ex-input .ex-star:hover { transform: scale(1.18); }

/* ───────── companies view ───────── */
.companies { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.company-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.company-card .cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.company-card .cc-name { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; }
.company-card .cc-sub { color: var(--text-muted); font-size: 0.82rem; margin-top: 3px; }
.company-card .cc-roles { margin-top: 13px; display: flex; flex-direction: column; gap: 7px; }
.cc-role { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 11px; background: var(--surface-2); border-radius: var(--radius-sm); cursor: pointer; border-left: 3px solid var(--accent, var(--border)); transition: background 0.12s; }
.cc-role:hover { background: var(--primary-soft); }
.cc-role-title { font-size: 0.9rem; font-weight: 500; }
.cc-role .pill { font-size: 0.7rem; padding: 1px 8px; }

/* ───────── controls ───────── */
.controls { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.controls input[type="search"] { flex: 1; min-width: 220px; }

input, select, textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button { background: var(--surface); border: none; padding: 9px 16px; color: var(--text-muted); font-weight: 500; }
.view-toggle button.active { background: linear-gradient(135deg, var(--accent-2), var(--primary)); color: #07090f; }

/* ───────── banner ───────── */
.banner { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid var(--border); background: var(--surface); }
.banner.error { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* ───────── board ───────── */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  align-items: start;
}
.column { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px; min-height: 90px; }
.column.drag-over { outline: 2px dashed var(--primary); outline-offset: -4px; background: var(--primary-soft); }
.column-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 600; font-size: 0.9rem; }
.column-head .count { background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 1px 9px; font-size: 0.78rem; color: var(--text-muted); }
.bar-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--border));
  border-radius: var(--radius-sm);
  padding: 13px;
  margin-bottom: 11px;
  box-shadow: var(--shadow);
  cursor: grab;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: rgba(77, 140, 255, 0.45); }
.card:active { cursor: grabbing; }
.card.dragging { opacity: 0.5; }
.card .company { font-weight: 700; letter-spacing: -0.01em; }
.card .role { color: var(--text-muted); font-size: 0.9rem; margin-top: 2px; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 9px; font-size: 0.8rem; color: var(--text-muted); }
.card .meta a { color: var(--primary); text-decoration: none; }
.card .meta a:hover { text-decoration: underline; }

/* ───────── status pill ───────── */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 700; color: #07090f; white-space: nowrap; }

/* ───────── inline status dropdown (Jobs table) ───────── */
.status-cell { overflow: visible; }
.status-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 3px 24px 3px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #07090f;
  cursor: pointer;
  max-width: 160px;
  box-shadow: none;
  transition: filter 0.12s, box-shadow 0.12s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23071018' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.status-select:hover { filter: brightness(1.07); }
.status-select:focus { outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.status-select option { color: var(--text); background: var(--surface); font-weight: 500; }

/* ───────── table ───────── */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.table tbody tr { transition: background 0.1s; cursor: pointer; }
.table tbody tr:hover { background: var(--surface-2); }
.table td a { color: var(--primary); text-decoration: none; }
.table .row-edit { color: var(--text-muted); }

/* ───────── empty state ───────── */
.empty-state { text-align: center; padding: 70px 20px; background: rgba(255, 255, 255, 0.02); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-state .empty-emoji { font-size: 3rem; }
.empty-state h2 { margin: 14px 0 6px; letter-spacing: -0.01em; }
.empty-state p { color: var(--text-muted); max-width: 440px; margin: 6px auto; }
.empty-state .primary-btn { margin-top: 18px; }

/* ───────── modal ───────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.66);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 50;
  overflow-y: auto;
}
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 660px; box-shadow: var(--shadow-lg); animation: pop 0.15s ease-out; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 1.1rem; letter-spacing: -0.01em; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field span { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
.field em { color: var(--danger); font-style: normal; }
.form-actions { display: flex; align-items: center; gap: 8px; }

/* ───────── autofill row ───────── */
.autofill {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(77, 140, 255, 0.08), rgba(0, 212, 245, 0.05));
  border: 1px solid rgba(77, 140, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.autofill .autofill-label { font-size: 0.82rem; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.autofill .autofill-input { display: flex; gap: 8px; }
.autofill .autofill-input input { flex: 1; min-width: 0; }
.autofill .autofill-msg { display: block; margin-top: 8px; font-size: 0.8rem; color: var(--text-muted); min-height: 1em; }
.autofill .autofill-msg.error { color: var(--danger); }
.autofill .autofill-msg.ok { color: var(--accent-2); }

/* ───────── dashboard ───────── */
.dashboard { display: flex; flex-direction: column; gap: 26px; }
.dash-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.dash-section-head h2 { font-size: 1.05rem; margin: 0; letter-spacing: -0.01em; }
.dash-section-head .sub { color: var(--text-muted); font-size: 0.85rem; }
.dash-section-head .count-chip { margin-left: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 1px 10px; font-size: 0.78rem; color: var(--text-muted); }
.dash-empty { color: var(--text-muted); font-size: 0.9rem; padding: 14px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: rgba(255,255,255,0.02); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--border));
  border-radius: var(--radius-sm);
  padding: 13px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.mini-card:hover { transform: translateY(-2px); border-color: rgba(77,140,255,0.45); box-shadow: var(--shadow-lg); }
.mini-card .mc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-card .mc-co { font-weight: 700; letter-spacing: -0.01em; }
.mini-card .mc-role { color: var(--text-muted); font-size: 0.88rem; margin-top: 2px; }
.mini-card .mc-meta { margin-top: 9px; font-size: 0.8rem; color: var(--text-muted); }
.mc-quiet { color: #ffbc2e; font-weight: 600; }

/* ───────── inbox sync strip ───────── */
.inbox-sync {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(77,140,255,0.07), rgba(0,212,245,0.04));
}
.inbox-sync.is-connected {
  background: linear-gradient(135deg, rgba(52,211,153,0.10), rgba(0,212,245,0.04));
  border-color: rgba(52,211,153,0.3);
}
.inbox-sync .is-icon {
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1px solid rgba(77,140,255,0.25);
}
.inbox-sync.is-connected .is-icon { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.3); }
.inbox-sync .is-text { flex: 1; min-width: 200px; }
.inbox-sync .is-title { font-weight: 700; letter-spacing: -0.01em; }
.inbox-sync .is-sub { color: var(--text-muted); font-size: 0.82rem; margin-top: 2px; }
.inbox-sync .is-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ───────── suggestion cards ───────── */
.sug-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.sug-card {
  background: var(--surface);
  border: 1px solid rgba(255,188,46,0.35);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sug-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sug-type { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 9px; border-radius: 99px; color: #07090f; }
.sug-type.sug-rejected { background: var(--st-Rejected); }
.sug-type.sug-interview { background: var(--st-Interview); color: #fff; }
.sug-type.sug-offer { background: var(--st-Offer); }
.sug-type.sug-applied { background: var(--st-Applied); }
.sug-date { color: var(--text-muted); font-size: 0.78rem; }
.sug-subject { font-weight: 600; line-height: 1.35; }
.sug-from { color: var(--text-muted); font-size: 0.8rem; }
.sug-snippet { color: var(--text-muted); font-size: 0.83rem; line-height: 1.45; max-height: 4.4em; overflow: hidden; }
.sug-action { font-size: 0.85rem; padding: 8px 0; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sug-buttons { display: flex; gap: 8px; }
.sug-buttons .primary-btn, .sug-buttons .ghost-btn { padding: 7px 14px; font-size: 0.88rem; }
.sug-buttons .primary-btn { flex: 1; }

#suggest-badge { font-weight: 600; }

/* expand + AI analysis inside a suggestion card */
.sug-toggle { background: none; border: none; color: var(--primary); font: inherit; font-size: 0.82rem; font-weight: 600; padding: 2px 0; cursor: pointer; text-align: left; }
.sug-toggle:hover { text-decoration: underline; }
.sug-details { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sug-full { font-size: 0.8rem; color: var(--text-muted); }
.sug-body { font-size: 0.83rem; line-height: 1.5; color: var(--text-muted); white-space: pre-wrap; max-height: 220px; overflow-y: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.sug-ai-btn { align-self: flex-start; padding: 6px 12px; font-size: 0.83rem; }
.sug-ai-result { font-size: 0.85rem; }
.ai-fields { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.ai-fields > div { background: var(--primary-soft); border: 1px solid var(--border); border-radius: 99px; padding: 2px 10px; font-size: 0.8rem; }
.ai-fields > div span { color: var(--text-muted); font-weight: 600; margin-right: 5px; }

/* email viewer popup */
.email-modal { max-width: 680px; }
.email-meta { padding: 0 20px; color: var(--text-muted); font-size: 0.85rem; display: flex; flex-direction: column; gap: 3px; }
.email-meta strong { color: var(--text); }
.email-text {
  margin: 14px 20px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 46vh;
  overflow-y: auto;
}
.email-text.loading { color: var(--text-muted); font-style: italic; }
#email-ai { padding: 0 20px; display: flex; flex-direction: column; gap: 8px; }
.email-actions { padding: 16px 20px; border-top: 1px solid var(--border); }

/* ───────── duplicate dialog ───────── */
.dup-body { padding: 20px; }
.dup-message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255, 188, 46, 0.12), rgba(255, 95, 87, 0.08));
  border: 1px solid rgba(255, 188, 46, 0.35);
  color: var(--text);
  line-height: 1.5;
}
.dup-message strong { color: var(--accent-2); }
.dup-subhead { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.dup-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; max-height: 320px; overflow-y: auto; }
.dup-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--border));
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.dup-card .dup-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dup-card .dup-card-co { font-weight: 700; }
.dup-card .dup-card-role { color: var(--text-muted); font-size: 0.9rem; margin-top: 2px; }
.dup-card .dup-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 0.8rem; color: var(--text-muted); }
.dup-card .dup-card-meta a { color: var(--primary); text-decoration: none; }
.dup-card .dup-card-meta a:hover { text-decoration: underline; }
.dup-open { background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text); border-radius: 99px; padding: 3px 12px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.dup-open:hover { border-color: var(--primary); color: var(--primary); }

/* ───────── Find Jobs (discover) — Indeed/LinkedIn-style ───────── */
.jc-src { background: var(--surface-2); color: var(--text-muted); border-radius: 99px; padding: 1px 7px; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; }

/* unified What / Where search bar — rounded rectangle like Indeed/LinkedIn */
.searchbar { display: flex; align-items: stretch; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 7px 7px 7px 10px; margin-bottom: 14px; }
.sb-field { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; padding: 0 12px; }
.sb-field .sb-ic { color: var(--text-muted); font-size: 0.95rem; }
.sb-field input { flex: 1; min-width: 0; border: none; background: transparent; padding: 12px 0; font-size: 0.98rem; box-shadow: none !important; outline: none; }
.sb-sep { width: 1px; align-self: center; height: 28px; background: var(--border); }
.sb-btn { align-self: stretch; display: inline-flex; align-items: center; justify-content: center; padding: 0 30px; font-size: 0.95rem; }

/* filter pills */
.job-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.pill, .job-filters select.pill { appearance: none; -webkit-appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px; font-size: 0.84rem; font-weight: 500; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.job-filters select.pill { padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 14px) center, calc(100% - 9px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.pill:hover { border-color: var(--primary); }
.pill-check { display: inline-flex; align-items: center; gap: 7px; }
.pill-clear { color: var(--text-muted); }
.pill-clear:hover { color: var(--danger); border-color: var(--danger); }
.job-count { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }

.discover-split { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 16px; align-items: start; }

/* result list cards */
.job-list { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 250px); overflow-y: auto; padding-right: 4px; }
.job-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: box-shadow 0.12s, border-color 0.12s, transform 0.06s; }
.job-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.job-item.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; background: var(--primary-soft); }
.job-item .ji-title { font-weight: 700; font-size: 1rem; color: var(--primary); letter-spacing: -0.01em; line-height: 1.3; }
.job-item .ji-co { font-size: 0.88rem; margin-top: 3px; color: var(--text); }
.job-item .ji-loc { color: var(--text-muted); font-size: 0.82rem; margin-top: 3px; }
.job-item .ji-salary { color: var(--accent-2); font-size: 0.82rem; font-weight: 600; margin-top: 5px; }
.job-item .ji-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.job-item .ji-when { color: var(--text-muted); font-size: 0.76rem; }

/* detail pane */
.job-detail { position: sticky; top: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); max-height: calc(100vh - 150px); overflow-y: auto; }
.job-detail .jd-close { display: none; background: none; border: none; color: var(--primary); cursor: pointer; font-size: 0.86rem; font-weight: 600; padding: 14px 20px 0; }
.jd-head { padding: 22px 26px 20px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.job-detail .jd-title { font-size: 1.45rem; margin: 0 0 6px; letter-spacing: -0.01em; line-height: 1.25; }
.job-detail .jd-co { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.job-detail .jd-when { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
.jd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.jd-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 0.8rem; color: var(--text); }
.jd-chip-pay { color: var(--accent-2); font-weight: 600; }
.job-detail .jd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.jd-apply { text-decoration: none; padding: 11px 26px; }
.job-detail .jd-actions .ghost-btn { padding: 11px 20px; }
.jd-desc-head { font-weight: 700; font-size: 0.95rem; padding: 18px 26px 0; }
.job-detail .jd-desc { font-size: 0.9rem; line-height: 1.65; color: var(--text); white-space: pre-line; padding: 10px 26px 26px; }
.jd-empty { color: var(--text-muted); font-size: 0.9rem; padding: 30px 26px; text-align: center; }

@media (max-width: 860px) {
  .searchbar { flex-wrap: wrap; border-radius: var(--radius); }
  .sb-sep { display: none; }
  .sb-field { flex-basis: 100%; border-bottom: 1px solid var(--border); }
  .sb-btn { flex-basis: 100%; padding: 12px; margin-top: 6px; border-radius: var(--radius-sm); }
  .discover-split { grid-template-columns: 1fr; }
  .job-list { max-height: none; }
  .job-detail { position: fixed; inset: 0; z-index: 70; max-height: none; height: 100%; border: none; border-radius: 0; transform: translateX(100%); transition: transform 0.2s ease; }
  .job-detail.open { transform: translateX(0); }
  .job-detail .jd-close { display: inline-flex; }
}

/* admin: source management (collapsible) */
.src-details > summary { cursor: pointer; list-style: none; }
.src-details > summary::-webkit-details-marker { display: none; }
.sources-panel .src-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0 4px; }
.sources-panel .src-add input { flex: 1; min-width: 150px; }
.sources-panel .src-hint { margin: 4px 0 12px; }
.sources-panel .src-hint code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 0.78rem; }
.src-list { display: flex; flex-direction: column; gap: 8px; }
.src-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.src-row .src-main { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.src-row .src-err { color: var(--danger); }
.src-row .icon-btn.arm { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); width: auto; padding: 2px 10px; font-size: 0.78rem; font-weight: 600; }

/* feeds + company separator */
.feed-add { margin: 6px 0 4px; }
.feed-add-label { font-weight: 600; margin-bottom: 8px; }
.feed-buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.feed-btn:disabled { opacity: 0.55; cursor: default; }
.us-only-row { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: 0.88rem; cursor: pointer; }
.src-sep { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; color: var(--text-muted); font-size: 0.8rem; }
.src-sep::before, .src-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* pagination */
.job-list-col { display: flex; flex-direction: column; gap: 10px; }
.job-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.job-pager .pg-info { color: var(--text-muted); font-size: 0.82rem; white-space: nowrap; }
.job-pager .ghost-btn { padding: 6px 12px; font-size: 0.82rem; }

/* ───────── footer ───────── */
.footer { text-align: center; color: var(--text-muted); font-size: 0.82rem; padding: 26px 20px 44px; }

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .brand h1 { font-size: 1.05rem; }
}

/* ═════════ timeline + follow-ups + insights + contacts ═════════ */

/* ── timeline panel inside the edit modal ── */
.timeline-block > span { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.tl-add { display: flex; gap: 8px; margin-bottom: 10px; }
.tl-add #tl-text { flex: 1; }
.tl-add input { padding: 9px 11px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font: inherit; }
.tl-add input[type="date"] { flex: 0 0 auto; color-scheme: dark; }
.tl-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.tl-empty { color: var(--text-muted); font-size: 0.85rem; padding: 8px 2px; }
.tl-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tl-row.pending { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); background: var(--primary-soft); }
.tl-row.done { opacity: 0.6; }
.tl-row.done .tl-body { text-decoration: line-through; }
.tl-ic { flex: 0 0 auto; width: 22px; text-align: center; }
.tl-body { flex: 1; font-size: 0.88rem; line-height: 1.35; word-break: break-word; }
.tl-when { flex: 0 0 auto; font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; }
.tl-due { flex: 0 0 auto; font-size: 0.74rem; font-weight: 600; color: var(--primary); white-space: nowrap; }
.tl-due.over { color: var(--danger); }
.tl-check { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--text-muted); background: transparent; color: transparent; cursor: pointer; font-size: 0.7rem; line-height: 1; display: grid; place-items: center; transition: all 0.12s; }
.tl-check:hover { border-color: var(--st-Offer); color: var(--st-Offer); }
.tl-check.on { background: var(--st-Offer); border-color: var(--st-Offer); color: #06281c; }
.tl-del { flex: 0 0 auto; background: transparent; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; opacity: 0.5; padding: 2px 4px; }
.tl-del:hover { opacity: 1; color: var(--danger); }

/* ── dashboard "Next actions" list ── */
.followup-list { display: flex; flex-direction: column; gap: 8px; }
.followup-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); }
.followup-row.overdue { border-left-color: var(--danger); }
.fu-check { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--text-muted); background: transparent; color: transparent; cursor: pointer; display: grid; place-items: center; font-size: 0.8rem; transition: all 0.12s; }
.fu-check:hover { border-color: var(--st-Offer); color: var(--st-Offer); }
.fu-main { flex: 1; cursor: pointer; min-width: 0; }
.fu-task { font-weight: 600; font-size: 0.92rem; }
.fu-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.fu-due { flex: 0 0 auto; font-size: 0.78rem; font-weight: 600; color: var(--primary); white-space: nowrap; }
.fu-due.over { color: var(--danger); }

/* ── due badge on mini cards ── */
.mc-due { color: var(--primary); font-weight: 600; }
.mc-due.over { color: var(--danger); }

/* ── insights: stat cards ── */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-val { font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }
.stat-sub { font-size: 0.72rem; color: var(--text-muted); opacity: 0.8; margin-top: 3px; }

/* ── insights: funnel bars ── */
.funnel-bars { display: flex; flex-direction: column; gap: 10px; }
.fb-row { display: grid; grid-template-columns: 120px 1fr 84px; align-items: center; gap: 12px; }
.fb-stage { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.fb-track { height: 22px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.fb-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent-2)); border-radius: 99px; min-width: 2px; transition: width 0.4s; }
.fb-count { font-size: 0.9rem; font-weight: 700; text-align: right; }
.fb-rate { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }

/* ── insights: pace chart ── */
.pace-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.pace-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.pace-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.pace-bar { width: 100%; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent-2))); border-radius: 6px 6px 0 0; min-height: 2px; transition: height 0.4s; }
.pace-num { font-size: 0.78rem; font-weight: 700; }
.pace-wk { font-size: 0.68rem; color: var(--text-muted); }

/* ── insights: status breakdown ── */
.status-break { display: flex; flex-wrap: wrap; gap: 10px; }
.sb-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 0.85rem; padding: 5px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; }

/* ── insights: filter bar ── */
.insights-filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.if-select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 0.85rem; padding: 7px 10px; cursor: pointer; }

/* ── insights: AI narrative ── */
.ai-narrative { background: linear-gradient(135deg, rgba(77,140,255,0.10), rgba(0,212,245,0.04)); border: 1px solid rgba(77,140,255,0.28); border-radius: var(--radius); padding: 14px 16px; }
.ain-head { display: flex; align-items: center; gap: 10px; }
.ain-badge { font-size: 0.78rem; font-weight: 700; color: var(--primary); letter-spacing: 0.01em; }
.ain-head .ghost-btn { margin-left: auto; }
.ain-text { margin: 10px 0 0; font-size: 0.92rem; line-height: 1.5; color: var(--text); white-space: pre-wrap; }
.ain-hint { margin: 8px 0 0; font-size: 0.85rem; color: var(--text-muted); }

/* ── insights: two-column block layout ── */
.ins-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.ins-two-col .dash-block { margin-bottom: 12px; }
.fb-stage .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.exc-stars { color: #f4b942; letter-spacing: 1px; }

/* ── insights: outcomes-by-source table ── */
.src-table { display: flex; flex-direction: column; gap: 2px; }
.src-row { display: grid; grid-template-columns: 1.4fr 0.6fr 1.4fr 0.8fr 0.6fr; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); font-size: 0.88rem; }
.src-row:not(.src-head):hover { background: var(--surface-2); }
.src-head { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; }
.src-name { font-weight: 600; }
.src-bartrack { display: inline-block; width: 70px; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.src-barfill { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent-2)); border-radius: 99px; }
.src-pct { margin-left: 8px; font-size: 0.82rem; color: var(--text-muted); }

/* ── updates: group mass-link row ── */
.sug-group-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; }
.sug-group-link .muted { font-size: 0.85rem; }
.sug-group-link select { flex: 1; min-width: 180px; }

/* ── contacts ── */
.contacts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.contact-form-wrap { margin-bottom: 18px; }
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.cf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.cf-grid .full { grid-column: 1 / -1; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 5px; }
.pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pc-name { font-size: 1.02rem; font-weight: 700; }
.pc-actions { display: flex; gap: 2px; flex: 0 0 auto; }
.pc-actions .icon-btn { font-size: 0.85rem; padding: 3px 6px; }
.pc-role { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.pc-app { font-size: 0.8rem; color: var(--primary); cursor: pointer; }
.pc-app:hover { text-decoration: underline; }
.pc-contact { font-size: 0.82rem; word-break: break-word; }
.pc-contact a { color: var(--accent-2); text-decoration: none; }
.pc-contact a:hover { text-decoration: underline; }
.pc-last { font-size: 0.74rem; color: var(--text-muted); }
.pc-notes { font-size: 0.82rem; color: var(--text); opacity: 0.85; margin-top: 4px; white-space: pre-wrap; }

@media (max-width: 560px) {
  .cf-grid { grid-template-columns: 1fr; }
  .fb-row { grid-template-columns: 90px 1fr 64px; }
}

/* ═════════ sidebar layout ═════════ */
.app-layout { display: flex; align-items: flex-start; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  position: sticky; top: 0; align-self: stretch;
  height: 100vh; width: 244px; flex: 0 0 244px;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 12px; z-index: 30;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; }
.sidebar-brand .brand-mark { font-size: 1.4rem; }
.sidebar-brand h1 {
  font-size: 1.02rem; margin: 0; font-weight: 700; letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--text) 0%, var(--primary) 130%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.side-nav { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; flex: 1; padding-bottom: 8px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-muted); font-weight: 700; padding: 4px 10px 2px; opacity: 0.75;
}
.side-nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.91rem;
  transition: background 0.12s, color 0.12s;
}
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.side-nav .ni { flex: 0 0 auto; width: 20px; text-align: center; font-size: 0.95rem; }
.ni { display: inline-flex; align-items: center; justify-content: center; }
.ni svg { width: 18px; height: 18px; display: block; }
.side-nav .nav-badge { margin-left: auto; }

.sidebar-foot { border-top: 1px solid var(--border); padding-top: 8px; }
.side-user {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: transparent; border: none; color: var(--text);
  padding: 9px 11px; border-radius: var(--radius-sm); text-align: left;
}
.side-user:hover { background: var(--surface-2); }
.su-email { font-size: 0.84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-main .container { width: 100%; max-width: 1180px; }

/* slim content header (inside app-main) */
.topbar .spacer { flex: 1; }
.nav-toggle, .mobile-brand { display: none; }

.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
  z-index: 25; backdrop-filter: blur(2px);
}

/* ── mobile: sidebar becomes an off-canvas drawer ── */
@media (max-width: 900px) {
  .app-layout { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 270px; flex: none;
    transform: translateX(-100%); transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .nav-toggle, .mobile-brand { display: inline-flex; }
  .mobile-brand h1 { font-size: 1.05rem; }
}
@media (min-width: 901px) {
  .sidebar-backdrop { display: none; }
}

/* ═════════ sidebar — Teal-style refinements ═════════ */
.side-nav { gap: 3px; }
.side-nav a { justify-content: flex-start; position: relative; }
.nl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.side-nav a .nl { flex: 1; }

.collapse-btn {
  margin-left: auto; background: transparent; border: none; color: var(--text-muted);
  width: 26px; height: 26px; border-radius: 7px; font-size: 0.82rem; line-height: 1;
  display: grid; place-items: center; transition: background 0.12s, color 0.12s; flex: 0 0 auto;
}
.collapse-btn:hover { background: var(--surface-2); color: var(--text); }

.sidebar-foot { display: flex; flex-direction: column; gap: 3px; }
.side-foot-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.91rem;
  transition: background 0.12s, color 0.12s;
}
.side-foot-link:hover { background: var(--surface-2); color: var(--text); }
.side-foot-link.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.side-foot-link .ni { flex: 0 0 auto; width: 20px; text-align: center; }

.side-user { gap: 11px; margin-top: 2px; }
.su-avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent-2), var(--primary)); color: #07090f;
}

/* neutral active pill (Teal-like) */
.side-nav a.active { background: var(--surface-2); color: var(--text); }

/* ── collapsed: icon-only rail (desktop) ── */
.app-layout.collapsed .sidebar { width: 68px; flex-basis: 68px; }
.app-layout.collapsed .sidebar-brand h1,
.app-layout.collapsed .nl { display: none; }
.app-layout.collapsed .sidebar-brand { justify-content: center; gap: 4px; padding: 6px 0 12px; }
.app-layout.collapsed .collapse-btn { margin: 0; transform: rotate(180deg); }
.app-layout.collapsed .side-nav a,
.app-layout.collapsed .side-foot-link,
.app-layout.collapsed .side-user { justify-content: center; padding: 10px 0; gap: 0; }
.app-layout.collapsed .side-nav a .ni,
.app-layout.collapsed .side-foot-link .ni { width: auto; }
.app-layout.collapsed .nav-badge { position: absolute; top: 4px; right: 10px; }

@media (max-width: 900px) {
  /* mobile uses the off-canvas drawer, never the collapsed rail */
  .collapse-btn { display: none; }
  .app-layout.collapsed .sidebar { width: 270px; flex-basis: auto; }
  .app-layout.collapsed .sidebar-brand h1,
  .app-layout.collapsed .nl { display: revert; }
  .app-layout.collapsed .side-nav a,
  .app-layout.collapsed .side-foot-link,
  .app-layout.collapsed .side-user { justify-content: flex-start; padding: 9px 11px; gap: 11px; }
}

/* ═════════ flatter, hand-built look — solid surfaces ═════════ */
body { background: var(--bg); }

/* solid header + sidebar (no glass/blur) */
.topbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-theme="light"] .topbar { background: var(--bg); }
.sidebar { background: var(--surface); }

/* plain text wordmark (no gradient fill) */
.brand h1, .sidebar-brand h1, .login-card h1 {
  background: none; -webkit-text-fill-color: currentColor; color: var(--text);
}

/* solid buttons, no neon glow */
.primary-btn {
  background: var(--primary); color: #fff; box-shadow: none;
}
.primary-btn:hover { background: var(--primary-hover); filter: none; transform: none; box-shadow: none; }

/* solid accents instead of gradients */
.su-avatar { background: var(--primary); color: #fff; }
.fb-fill, .pace-bar { background: var(--primary); }

/* calmer cards */
.stat-card, .pc-card, .contact-form { box-shadow: none; }

/* ── inline SVG icon sizing ── */
.ni { display: inline-flex; align-items: center; justify-content: center; }
.ni svg { display: block; width: 18px; height: 18px; }
.side-nav a.active .ni { color: var(--primary); }

/* ═════════ Tom Select — themed to match ═════════ */
.ts-wrapper { width: 100%; }
.ts-control {
  /* !important beats Tom Select's `.full .ts-control { background:#fff }` (higher base specificity) */
  background: var(--surface-2) !important; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); box-shadow: none !important; padding: 8px 11px; min-height: 0; font: inherit;
}
.ts-control:hover { border-color: var(--primary); }
.ts-wrapper.focus .ts-control { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft) !important; }
.ts-control, .ts-control input { color: var(--text) !important; }
.ts-control .item { color: var(--text); }
.ts-wrapper.single .ts-control:after { border-color: var(--text-muted) transparent transparent !important; }
.ts-dropdown {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); color: var(--text); margin-top: 4px;
}
.ts-dropdown .option { padding: 8px 11px; color: var(--text); }
.ts-dropdown .option.active { background: var(--primary-soft); color: var(--text); }
.ts-dropdown .ts-dropdown-content { padding: 4px; }
.ts-dropdown-content::-webkit-scrollbar-thumb { background: var(--border); }
.controls .ts-wrapper { min-width: 160px; }

/* ── monogram logo sizing ── */
.brand-mark { display: inline-flex; align-items: center; }

/* ═════════ application detail page ═════════ */
.detail { max-width: 1100px; margin: 0 auto; }
.detail-top { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.btn.small, .ghost-btn.small, .danger-btn.small, .primary-btn.small {
  padding: 6px 11px; font-size: 0.82rem;
}
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.detail-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.detail-sub { color: var(--text-muted); font-size: 0.95rem; }
.detail-sub strong { color: var(--text); }
.detail-link { margin-left: 8px; color: var(--primary); text-decoration: none; font-size: 0.85rem; }
.detail-link:hover { text-decoration: underline; }
.detail-salary { font-size: 1.25rem; font-weight: 800; white-space: nowrap; }

/* ── status pipeline ── */
.pipeline { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.pipe-stage, .pipe-close {
  position: relative; flex: 1; min-width: 92px; padding: 11px 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-weight: 700; font-size: 0.82rem;
  cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.pipe-stage:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.pipe-stage:hover, .pipe-close:hover { color: var(--text); border-color: var(--primary); }
.pipe-stage.reached { background: var(--primary-soft); color: var(--text); }
.pipe-stage.current { background: var(--primary); color: #07090f; border-color: var(--primary); }
.pipe-close { flex: 0 0 auto; min-width: auto; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.pipe-close.current { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ── guidance ── */
.guidance {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 18px;
}
.guidance-head { font-size: 0.95rem; margin-bottom: 6px; }
.guidance ul, .chk-builtin { margin: 0; padding-left: 20px; color: var(--text-muted); }
.guidance li, .chk-builtin li { margin: 4px 0; }

/* ── detail tabs ── */
.detail-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.dtab {
  background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text-muted);
  padding: 10px 14px; font-weight: 600; font-size: 0.9rem; margin-bottom: -1px; cursor: pointer;
}
.dtab:hover { color: var(--text); }
.dtab.active { color: var(--text); border-bottom-color: var(--primary); }
.detail-body .form-grid { padding: 0; }

/* ── checklist ── */
.chk-h { font-size: 1rem; font-weight: 700; margin: 18px 0 10px; }
.chk-add { display: flex; gap: 8px; margin-bottom: 12px; }
.chk-add input { flex: 1; }
.chk-list { display: flex; flex-direction: column; gap: 6px; }
.chk-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.chk-row.done .chk-label { text-decoration: line-through; color: var(--text-muted); }
.chk-label { flex: 1; }
.chk-suggest { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.chk-reorder { display: inline-flex; flex-direction: column; gap: 1px; }
.chk-move { background: none; border: none; color: var(--text-muted); cursor: pointer; line-height: 0.8; font-size: 0.7rem; padding: 1px 4px; }
.chk-move:hover:not(:disabled) { color: var(--primary); }
.chk-move:disabled { opacity: 0.3; cursor: default; }

/* ═════════ cover-letter studio ═════════ */
.cl-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: 20px; align-items: start; }
.cl-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.cl-tab {
  background: var(--surface); border: 1px solid var(--border); border-radius: 99px; color: var(--text-muted);
  padding: 6px 14px; font-weight: 600; font-size: 0.84rem; cursor: pointer;
}
.cl-tab:hover { color: var(--text); border-color: var(--primary); }
.cl-tab.active { background: var(--primary); color: #07090f; border-color: var(--primary); }
.cl-tab-add { border-style: dashed; }
.cl-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }
.cl-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cl-section-head h3 { margin: 0 0 2px; font-size: 1rem; font-weight: 700; }
.cl-section-head p { margin: 0; }
.cl-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cl-field-empty input, .field.cl-empty input { border-color: var(--primary); }
.cl-tname { display: flex; gap: 6px; align-items: center; }
.cl-tname input { width: 160px; }
.cl-template {
  width: 100%; font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.85rem; line-height: 1.5;
  resize: vertical; margin-bottom: 10px;
}
.cl-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.cl-filename { flex: 1; min-width: 120px; }
.cl-dl { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-warn { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 0.82rem; margin: 8px 0; }
.cl-ok { color: var(--accent-2); font-size: 0.82rem; margin: 8px 0; }
.cl-sticky { position: sticky; top: 16px; }
.cl-paper {
  background: #ffffff; color: #1a1a1a; border-radius: 6px; padding: 28px 30px; margin-top: 12px;
  font-family: Georgia, "Times New Roman", serif; font-size: 0.92rem; line-height: 1.5;
  white-space: normal; box-shadow: var(--shadow); min-height: 200px; max-height: 60vh; overflow-y: auto;
}
.cl-paper .cl-name { font-size: 1.25rem; font-weight: bold; margin: 0 0 2px; }
.cl-paper .cl-contact { font-size: 0.82rem; color: #555; margin: 0 0 1.2em; }
.cl-paper p { margin: 0 0 0.8em; }
.cl-paper ul { margin: 0 0 0.8em; padding-left: 1.2em; }
.cl-paper li { margin: 0 0 0.3em; }
.cl-paper strong { font-weight: 700; }
.cl-paper em { font-style: italic; }
.cl-token { background: #fff3bf; color: #92690c; border-radius: 3px; padding: 0 3px; }
.cl-ai-edit { width: 100%; font-size: 0.88rem; line-height: 1.5; resize: vertical; margin-bottom: 10px; }
.cl-suggestion { margin-top: 12px; padding: 12px; border: 1px solid var(--primary); border-radius: var(--radius-sm); background: var(--primary-soft); }
.cl-suggestion-head { font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }

/* ── application cover-letter record (tie / upload) ── */
.acl { max-width: 760px; }
.acl-pick { display: flex; flex-direction: column; gap: 4px; }
.acl-file { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.acl-file-name { font-weight: 600; }
.acl-upload { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px dashed var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.acl-upload:hover { border-color: var(--primary); }

@media (max-width: 900px) {
  .cl-grid { grid-template-columns: 1fr; }
  .cl-fields { grid-template-columns: 1fr; }
  .cl-sticky { position: static; }
}

/* ── follow-up email studio ── */
.fu-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.fu-controls .field.full, .fu-controls .form-actions.full { grid-column: 1 / -1; }
.fu-output textarea { width: 100%; font-size: 0.9rem; line-height: 1.5; resize: vertical; }
.fu-output { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
@media (max-width: 700px) { .fu-controls { grid-template-columns: 1fr; } }
.brand-mark svg { display: block; width: 26px; height: 26px; }
.login-mark { width: auto; height: auto; }
.login-mark svg { width: 46px; height: 46px; }

/* ═════════ AI draft modal ═════════ */
.ai-modal { max-width: 640px; width: 100%; }
.ai-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 14px; }
.ai-tab { background: transparent; border: none; color: var(--text-muted); padding: 7px 16px; border-radius: 8px; font-weight: 600; font-size: 0.88rem; }
.ai-tab:hover { color: var(--text); }
.ai-tab.active { background: var(--primary); color: #fff; }
.ai-output-wrap textarea { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.85rem; line-height: 1.5; }

/* ── toggle switch (settings) ── */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-track { position: absolute; inset: 0; cursor: pointer; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; transition: background 0.15s, border-color 0.15s; }
.switch-track::before { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: var(--text-muted); transition: transform 0.15s, background 0.15s; }
.switch input:checked + .switch-track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .switch-track::before { transform: translateX(20px); background: #fff; }

/* ── extension token output (settings) ── */
.ext-token-out { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 4px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.token-field { display: flex; flex-direction: column; gap: 3px; }
.token-row { display: flex; align-items: center; gap: 8px; }
.token-row code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-family: "JetBrains Mono", monospace; font-size: 0.8rem; }
.token-row .ghost-btn { padding: 6px 12px; flex: 0 0 auto; }

/* ═════════ edit modal: capped height, scrolling body, sticky footer, tabs ═════════ */
.modal-overlay { align-items: flex-start; padding: 28px 16px; }
.modal { display: flex; flex-direction: column; max-height: calc(100vh - 56px); }
.modal-head { flex: 0 0 auto; }
.modal-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; }
.modal-body > .tab-panel { animation: none; }
#tab-timeline { padding: 18px 20px; }

.modal-tabs { display: flex; gap: 2px; padding: 10px 18px 0; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.modal-tab { background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); padding: 9px 14px; font-weight: 600; font-size: 0.9rem; margin-bottom: -1px; }
.modal-tab:hover { color: var(--text); }
.modal-tab.active { color: var(--text); border-bottom-color: var(--primary); }

.modal-foot { flex: 0 0 auto; border-top: 1px solid var(--border); padding: 14px 20px; background: var(--surface); flex-wrap: wrap; border-radius: 0 0 var(--radius) var(--radius); }

/* timeline list can grow tall — let the modal body scroll instead of the inner list */
#tab-timeline .tl-list { max-height: none; }

/* ── Blazor WASM host (loading + error UI) ── */
.visually-hidden, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loading-progress { position: fixed; inset: 0; margin: auto; width: 6rem; height: 6rem; }
.loading-progress circle { fill: none; stroke: var(--border); stroke-width: 0.4rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: var(--primary); stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.55), 500%; transition: stroke-dasharray 0.1s ease-in-out; }
.loading-progress-text { position: fixed; inset: 0; display: grid; place-content: center; color: var(--text-muted); font-size: 0.85rem; }
.loading-progress-text::after { content: var(--blazor-load-percentage-text, "Loading…"); }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 18px; background: var(--danger-soft); color: var(--danger); border-top: 1px solid var(--danger); z-index: 1000; }
#blazor-error-ui .reload { color: var(--primary); margin-left: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* ── Find Jobs / Updates (Blazor) ── */
.sources-panel .src-feeds, .sources-panel .src-add, .sources-panel .src-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.sources-panel .src-add input { flex: 1; min-width: 200px; }
.src-list { display: flex; flex-direction: column; gap: 4px; }
.src-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.searchbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.searchbar input { flex: 1; min-width: 180px; }
.job-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.job-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.job-card .job-co { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.job-card .job-title { font-weight: 700; }
.job-card .job-meta { font-size: 0.8rem; color: var(--text-muted); }
.job-card .job-actions { display: flex; gap: 8px; margin-top: 8px; }
.sug-list { display: flex; flex-direction: column; gap: 12px; }
.sug-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.sug-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.sug-subject { font-weight: 600; font-size: 0.9rem; }
.sug-snippet { font-size: 0.85rem; color: var(--text-muted); margin: 4px 0 10px; }
.sug-buttons { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }

/* ── updates: one thread per company/application ── */
.sug-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; }
.sug-group-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sug-stages { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sug-thread { display: flex; flex-direction: column; gap: 10px; }
.sug-group .sug-card { background: var(--surface-2); }
.sug-link-row { display: flex; gap: 8px; margin-top: 10px; }
.sug-link-row select { flex: 1; min-width: 0; }

/* ── email scanning (lives on the Updates page) ── */
.scan-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.scan-stat { flex: 1; min-width: 130px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; }
.scan-stat .v { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.scan-stat .k { color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.scan-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.scan-controls label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem; }
.scan-controls .grow { flex: 1; }

/* ── label filing panel ── */
.label-panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.label-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.label-panel-title { font-weight: 700; font-size: 0.92rem; }
.label-scope-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--text-muted); font-size: 0.85rem; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.label-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.label-chip { padding: 3px 10px; border-radius: 99px; font-size: 0.78rem; font-weight: 600; background: var(--primary-soft); color: var(--primary); border: 1px solid rgba(77,140,255,0.3); }
.label-create { display: flex; gap: 8px; margin-bottom: 4px; }
.label-create-input { flex: 1; min-width: 0; padding: 7px 10px; font-size: 0.88rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); }
.label-create-input:focus { outline: none; border-color: var(--primary); }
.label-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sug-label-select { padding: 5px 8px; font-size: 0.82rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); cursor: pointer; max-width: 180px; }
.sug-label-select:disabled { opacity: 0.6; cursor: default; }
