/* Nuance ATS — UI styles */
@import url("./design-system/colors_and_type.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-1); color: var(--fg-1); font-family: var(--font-sans); }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
input, select, textarea { font-family: inherit; color: inherit; }

/* ====== Layout shell ====== */
.ats-shell { display: flex; flex-direction: column; height: 100%; background: var(--bg-1); color: var(--fg-1); }
.ats-shell--frame { width: 100%; height: 100vh; overflow: hidden; }

/* ====== Top nav ====== */
.ats-topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; background: rgba(238, 235, 227, 0.85);
  backdrop-filter: blur(18px); border-bottom: 1px solid var(--border-1);
  height: 52px; flex-shrink: 0;
}
.ats-topnav__left { display: flex; align-items: center; gap: 32px; }
.ats-brand { display: flex; align-items: center; gap: 8px; }
.ats-brand__word { font-family: var(--font-display); font-size: 18px; letter-spacing: -0.01em; color: var(--nl-ink); }
.ats-brand__sep { color: var(--fg-4); font-weight: 400; }
.ats-brand__product { font-family: var(--font-display); font-size: 18px; font-style: italic; color: var(--fg-2); }

.ats-tabs { display: flex; gap: 2px; }
.ats-tab {
  font-size: 13px; font-weight: 500; color: var(--fg-3);
  padding: 6px 12px; border-radius: 999px; letter-spacing: -0.005em;
  transition: color .15s, background .15s;
}
.ats-tab:hover { color: var(--fg-1); background: rgba(29, 49, 64, 0.04); }
.ats-tab.is-active { color: var(--nl-ink); background: rgba(29, 49, 64, 0.07); }

.ats-topnav__right { display: flex; align-items: center; gap: 12px; }
.ats-search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.6); border: 1px solid var(--border-1);
  border-radius: 999px; padding: 6px 12px; width: 320px;
  color: var(--fg-3);
}
.ats-search input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 13px; color: var(--fg-1);
}
.ats-search input::placeholder { color: var(--fg-4); }
.ats-search kbd {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-3);
  background: rgba(29, 49, 64, 0.06); padding: 2px 5px; border-radius: 4px;
}

/* Search dropdown */
.ats-search-dropdown {
  z-index: 999999;
  background: rgba(245, 241, 234, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(29, 49, 64, 0.14), 0 2px 6px rgba(29, 49, 64, 0.08);
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}
.ats-search-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--fg-3);
}
.ats-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.ats-search-result:hover,
.ats-search-result.is-selected {
  background: rgba(29, 49, 64, 0.06);
}
.ats-search-result__info {
  flex: 1;
  min-width: 0;
}
.ats-search-result__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--nl-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ats-search-result__meta {
  font-size: 11px;
  color: var(--fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ats-search-result__stage {
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-3);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.ats-search-result__fit {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-3);
  min-width: 22px;
  text-align: right;
}
.ats-search-result__fit.is-high { color: var(--nl-sage-dark, #3F5E45); }
.ats-search-result__fit.is-mid { color: var(--nl-blue); }
.ats-icon-btn {
  position: relative; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-2); border-radius: 8px; transition: background .15s, color .15s;
}
.ats-icon-btn:hover { background: rgba(29, 49, 64, 0.06); color: var(--fg-1); }
.ats-icon-btn__dot {
  position: absolute; top: 6px; right: 6px; width: 6px; height: 6px;
  border-radius: 999px; background: var(--nl-amber);
}

/* ====== Body layout ====== */
.ats-body { display: flex; flex: 1; min-height: 0; }
.ats-sidebar {
  width: 252px; flex-shrink: 0;
  border-right: 1px solid var(--border-1);
  background: rgba(213, 216, 214, 0.18);
  padding: 18px 12px 12px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
}
.ats-sidebar__section { display: flex; flex-direction: column; gap: 2px; }
.ats-sidebar__rule {
  display: block;
  height: 1px; width: auto;
  background: rgba(29, 49, 64, 0.14);
  margin: 8px 8px 6px;
  border: 0;
  padding: 0;
  flex-shrink: 0;
}
.ats-sidebar__heading {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px 6px;
}
.ats-mini-btn {
  width: 18px; height: 18px; border-radius: 6px;
  font-size: 13px; line-height: 1; color: var(--fg-3);
  display: flex; align-items: center; justify-content: center;
}
.ats-mini-btn:hover { background: rgba(29, 49, 64, 0.06); color: var(--fg-1); }
.ats-side-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 7px; width: 100%; text-align: left;
  color: var(--fg-2); font-size: 13px; transition: background .12s, color .12s;
}
.ats-side-item:hover { background: rgba(29, 49, 64, 0.05); color: var(--fg-1); }
.ats-side-item.is-active { background: rgba(112, 135, 183, 0.15); color: var(--nl-ink); font-weight: 500; }
.ats-side-item__dot {
  width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0;
}
.ats-side-item__icon {
  width: 14px; height: 14px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-3);
}
.ats-side-item__icon svg { width: 14px; height: 14px; display: block; }
.ats-side-item:hover .ats-side-item__icon,
.ats-side-item.is-active .ats-side-item__icon { color: var(--nl-ink); }
.ats-side-item__label {
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.005em;
}
.ats-side-item__count {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-4);
}
.ats-sidebar__footer {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-1);
  display: flex; flex-direction: column; gap: 6px;
}
.ats-integration-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--fg-3); padding: 0 8px;
}
.ats-integration-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--fg-4);
}
.ats-integration-dot--ok { background: var(--success); }
.ats-integration-dot--off { background: var(--nl-red, #B4553D); }
.ats-integration-icon { width: 14px; font-size: 11px; text-align: center; font-weight: 600; flex-shrink: 0; }
.ats-integration-icon--ok { color: #2D7A4F; }
.ats-integration-icon--off { color: #B4553D; }
.ats-integration-meta { margin-left: auto; color: var(--fg-4); font-family: var(--font-mono); font-size: 10px; }
.ats-integration-badge {
  background: #B4553D; color: #fff; font-size: 9px; font-weight: 700;
  min-width: 14px; height: 14px; border-radius: 7px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 4px; margin-left: 4px;
  border: none; cursor: pointer;
}
.ats-integration-badge:hover { background: #8B3A26; }
@keyframes badge-spin { to { transform: rotate(360deg); } }
.ats-integration-badge.is-spinning { animation: badge-spin 0.8s linear infinite; }

/* ====== Main area ====== */
.ats-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; }
.ats-page-head {
  padding: 22px 28px 16px; display: flex; align-items: flex-end; justify-content: space-between;
  border-bottom: 1px solid var(--border-1); background: var(--bg-1);
}
.ats-page-title {
  font-family: var(--font-display); font-size: 32px; font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.05; color: var(--nl-ink); margin: 0;
}
.ats-page-title em { font-style: italic; color: var(--fg-2); font-weight: 400; }
.ats-page-sub {
  font-size: 13px; color: var(--fg-3); margin-top: 4px;
}
.ats-page-actions { display: flex; align-items: center; gap: 8px; }

/* Toolbar (filters) */
.ats-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 28px; background: var(--bg-1);
  border-bottom: 1px solid var(--border-1);
  font-size: 12px; flex-shrink: 0;
}
.ats-toolbar__group { display: flex; align-items: center; gap: 4px; }
.ats-toolbar__divider { width: 1px; height: 16px; background: var(--border-1); margin: 0 4px; }
.ats-toolbar__spacer { flex: 1; }

/* Buttons */
.ats-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 500; color: var(--fg-2);
  border: 1px solid transparent; transition: all .15s; letter-spacing: -0.005em;
}
.ats-btn:hover { background: rgba(29, 49, 64, 0.05); color: var(--fg-1); }
.ats-btn--ghost-bordered { border-color: var(--border-1); }
.ats-btn--ghost-bordered:hover { border-color: var(--border-2); }
.ats-btn--primary { background: var(--nl-ink); color: var(--fg-on-dark); padding: 8px 16px; border-radius: 999px; }
.ats-btn--primary:hover { background: var(--nl-ink-soft); color: var(--fg-on-dark); }
.ats-btn--accent { background: var(--nl-blue); color: #fff; padding: 8px 14px; border-radius: 999px; }
.ats-btn--accent:hover { background: var(--accent-hover); color: #fff; }
.ats-btn .ats-btn__caret { color: var(--fg-4); font-size: 9px; margin-left: 2px; }
.ats-btn.is-active { background: rgba(112, 135, 183, 0.16); color: var(--nl-ink); }
.ats-btn--danger { background: #c0392b; color: #fff; padding: 8px 16px; border-radius: 999px; }
.ats-btn--danger:hover { background: #a93226; color: #fff; }
.ats-btn--danger:disabled { opacity: 0.6; cursor: not-allowed; }
.ats-btn.ats-btn--danger-ghost { color: #c0392b; border-color: rgba(192, 57, 43, 0.25); }
.ats-btn.ats-btn--danger-ghost:hover { background: rgba(192, 57, 43, 0.08); color: #a93226; border-color: rgba(192, 57, 43, 0.4); }

/* Filter chip */
.ats-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
  background: rgba(112, 135, 183, 0.14); color: var(--nl-ink);
  border: 1px solid rgba(112, 135, 183, 0.25);
}
.ats-filter-chip__x { color: var(--fg-3); font-size: 12px; line-height: 1; cursor: pointer; }
.ats-filter-chip__x:hover { color: var(--nl-ink); }

/* ====== Avatar ====== */
.ats-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; overflow: hidden; flex-shrink: 0;
  background: var(--nl-paper); color: var(--fg-2);
  font-family: var(--font-sans); font-weight: 500;
}
.ats-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ats-avatar--ring { box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 3px var(--border-2); }
.ats-avatar--fallback { background: var(--nl-sage); color: #fff; }
.ats-disc {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; flex-shrink: 0; font-weight: 500; letter-spacing: 0;
}

/* ====== Stage chip ====== */
.ats-stage-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 6px; border-radius: 999px;
  font-size: 11px; font-weight: 500; letter-spacing: -0.005em;
  white-space: nowrap;
}
.ats-stage-chip.is-dense { font-size: 10px; padding: 1px 7px 1px 5px; }
.ats-stage-dot { width: 5px; height: 5px; border-radius: 999px; flex-shrink: 0; }

/* ====== Source pill ====== */
.ats-source-pill {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: rgba(29, 49, 64, 0.06); color: var(--fg-3);
  font-weight: 500; letter-spacing: 0;
}
.ats-source-pill[data-src="referral"] { background: rgba(150, 177, 173, 0.25); color: #3F5E45; }
.ats-source-pill[data-src="inbound"]  { background: rgba(227, 165, 78, 0.18); color: #7A5A24; }
.ats-source-pill[data-src="agency"]   { background: rgba(169, 130, 76, 0.18); color: #6E4F26; }
.ats-source-pill[data-src="jon"]      { background: rgba(117, 149, 213, 0.18); color: #3E4E72; }
.ats-source-pill[data-src="nick"]     { background: rgba(99, 125, 167, 0.18); color: #324769; }
.ats-source-pill[data-src="techire"]  { background: rgba(180, 85, 61, 0.16); color: #7A4030; }
.ats-source-pill[data-src="duplicate"] { background: rgba(180, 85, 61, 0.14); color: #8B3A26; font-weight: 600; }

/* ====== Fit score ====== */
.ats-fit { display: inline-flex; align-items: center; gap: 5px; }
.ats-fit__bar {
  width: 28px; height: 4px; background: rgba(29, 49, 64, 0.10);
  border-radius: 999px; overflow: hidden;
}
.ats-fit__bar > span { display: block; height: 100%; border-radius: 999px; }
.ats-fit__num { font-family: var(--font-mono); font-size: 10px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.ats-fit--high .ats-fit__bar > span { background: var(--success); }
.ats-fit--mid  .ats-fit__bar > span { background: var(--nl-blue); }
.ats-fit--low  .ats-fit__bar > span { background: var(--nl-clay); }
.ats-fit--high .ats-fit__num { color: var(--success); }

/* ====== KANBAN ====== */
.ats-kanban {
  flex: 1; min-height: 0; overflow-x: auto; overflow-y: hidden;
  padding: 14px 28px 28px;
  display: flex; gap: 12px; align-items: stretch;
  scrollbar-width: thin;
}
.ats-kanban::-webkit-scrollbar { height: 10px; }
.ats-kanban::-webkit-scrollbar-thumb { background: rgba(29, 49, 64, 0.18); border-radius: 999px; }
.ats-kanban::-webkit-scrollbar-track { background: transparent; }

.ats-col {
  width: 268px; flex-shrink: 0; display: flex; flex-direction: column;
  background: rgba(247, 244, 236, 0.7);
  border: 1px solid var(--border-1); border-radius: 12px;
  overflow: hidden;
}
.ats-col--terminal { background: rgba(213, 216, 214, 0.35); }
.ats-col__head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border-1);
  background: var(--bg-3);
  position: sticky; top: 0; z-index: 1;
}
.ats-col__title-line { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.ats-col__dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; }
.ats-col__title {
  font-family: var(--font-sans); font-weight: 500; font-size: 12px;
  letter-spacing: -0.005em; color: var(--nl-ink);
}
.ats-col__count {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  background: rgba(29, 49, 64, 0.06); padding: 1px 6px; border-radius: 4px;
}
.ats-col__menu {
  width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3);
}
.ats-col__menu:hover { background: rgba(29, 49, 64, 0.06); color: var(--fg-1); }

.ats-col__body {
  flex: 1; overflow-y: auto;
  padding: 6px 6px 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.ats-col__body::-webkit-scrollbar { width: 6px; }
.ats-col__body::-webkit-scrollbar-thumb { background: rgba(29, 49, 64, 0.12); border-radius: 999px; }

.ats-col__add {
  margin: 4px 6px; padding: 6px;
  border: 1px dashed var(--border-1); border-radius: 8px;
  font-size: 11px; color: var(--fg-3);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.ats-col__add:hover { border-color: var(--border-2); color: var(--fg-1); }

/* Compact sub-columns (sourced splits) */
.ats-col--compact { width: 220px; border-radius: 8px; min-height: 0; }
.ats-col--compact .ats-col__head { padding: 7px 10px 5px; }
.ats-col--compact .ats-col__title { font-size: 11px; color: var(--fg-2); }
.ats-col--compact .ats-col__body { padding: 4px 4px 6px; }

/* Sourced group wrapper */
.ats-sourced-group {
  flex-shrink: 0; display: flex; flex-direction: column;
  min-height: 0;
}
.ats-sourced-group__head {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 0 4px 6px; font-size: 12px;
}
.ats-sourced-group__head .ats-col__title { font-weight: 600; }
.ats-sourced-group__cols {
  display: flex; gap: 8px;
  flex: 1; min-height: 0; align-items: stretch;
}

/* ====== Candidate card (dense) ====== */
.ats-card {
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: 8px; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s;
}
.ats-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
}
.ats-card.is-flagged { border-left: 2px solid var(--danger); }
.ats-card.is-starred { background: linear-gradient(180deg, rgba(227, 165, 78, 0.06), var(--bg-3)); }

.ats-card__row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ats-card__name {
  font-size: 12.5px; font-weight: 500; color: var(--nl-ink);
  letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.ats-card__star { font-size: 11px; color: var(--nl-amber); flex-shrink: 0; }
.ats-card__dup {
  flex-shrink: 0; color: #B4553D; display: flex; align-items: center;
  animation: ats-dup-pulse 2s ease-in-out infinite;
}
@keyframes ats-dup-pulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
.ats-card__title {
  font-size: 11px; color: var(--fg-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.ats-card__title b { font-weight: 500; color: var(--fg-2); }
.ats-card__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: var(--fg-3);
}
.ats-card__days {
  font-family: var(--font-mono); font-size: 10px;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(29, 49, 64, 0.05); color: var(--fg-3);
}
.ats-card__days.is-stale { background: rgba(180, 85, 61, 0.12); color: #8B3A26; }
.ats-card__loc { color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.ats-card__activity {
  font-size: 10px; color: var(--fg-4); font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ====== Density variants ====== */
.ats-card--xdense {
  padding: 5px 8px; gap: 2px;
}
.ats-card--xdense .ats-card__name { font-size: 12px; }
.ats-card--xdense .ats-card__title { font-size: 10.5px; }
.ats-card--xdense .ats-card__meta { font-size: 9.5px; }

/* ====== Spreadsheet variant ====== */
.ats-sheet {
  flex: 1; overflow: auto; padding: 0;
}
.ats-sheet table {
  width: 100%; border-collapse: collapse; font-size: 12px;
  background: var(--bg-3);
}
.ats-sheet thead th {
  position: sticky; top: 0; z-index: 1;
  background: rgba(238, 235, 227, 0.96);
  backdrop-filter: blur(8px);
  font-weight: 500; font-size: 10.5px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-3);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-1);
  white-space: nowrap;
}
.ats-sheet thead th:first-child { padding-left: 28px; }
.ats-sheet__sort-th { transition: background .1s, color .1s; }
.ats-sheet__sort-th:hover { background: rgba(29, 49, 64, 0.05); color: var(--nl-ink); }
.ats-sheet__sort-th:hover .ats-sheet__sort-ind { opacity: 1 !important; color: var(--fg-2) !important; }
.ats-sheet__sort-th.is-active { color: var(--nl-ink); background: rgba(29, 49, 64, 0.04); }
.ats-sheet-filterbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 28px; background: var(--bg-1);
  border-bottom: 1px solid var(--border-1);
  font-size: 11.5px;
}
.ats-sheet-filterbar__count {
  margin-left: auto; color: var(--fg-3); font-family: var(--font-mono); font-size: 11px;
}
.ats-sheet-filterbar__sort {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px 2px 6px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--fg-2);
}
.ats-sheet-filterbar__sort-prio {
  font-size: 9.5px; font-family: var(--font-mono); font-weight: 600;
  background: var(--nl-ink); color: var(--bg-1);
  padding: 1px 5px; border-radius: 999px; line-height: 1.2;
}
.ats-sheet-filterbar__sort-label {
  color: var(--fg-3); font-size: 11px;
}
.ats-sheet-filterbar__sort-value {
  font-weight: 500; color: var(--fg-1);
  border: none; background: transparent; cursor: pointer;
  padding: 0 2px; font: inherit;
}
.ats-sheet-filterbar__sort-value:hover { color: var(--nl-ink); text-decoration: underline; }
.ats-sheet-filterbar__sort-move {
  border: none; background: transparent; cursor: pointer;
  padding: 0 3px; color: var(--fg-3); font-size: 13px; line-height: 1;
}
.ats-sheet-filterbar__sort-move:hover { color: var(--nl-ink); }
.ats-sheet-filterbar__sort-clear {
  border: none; background: transparent; cursor: pointer;
  padding: 0 2px; margin-left: 2px;
  color: var(--fg-3); font-size: 13px; line-height: 1;
}
.ats-sheet-filterbar__sort-clear:hover { color: var(--fg-1); }
.ats-sheet-filterbar__divider {
  width: 1px; height: 18px; background: var(--border-1); margin: 0 4px;
}
.ats-quick-filter {
  border-radius: 999px !important;
  gap: 5px;
}
.ats-quick-filter__icon { display: inline-flex; color: var(--fg-3); }
.ats-quick-filter:hover .ats-quick-filter__icon { color: var(--fg-2); }
.ats-quick-filter.is-active {
  background: var(--nl-ink) !important;
  border-color: var(--nl-ink) !important;
  color: var(--bg-1) !important;
}
.ats-quick-filter.is-active .ats-quick-filter__icon { color: var(--bg-1); }
.ats-quick-filter__x {
  font-size: 12px; line-height: 1; opacity: 0.8;
  margin-left: 2px;
}
.ats-filter-chip--interactive {
  display: inline-flex; align-items: center; padding: 3px 8px;
  background: rgba(29, 49, 64, 0.05); border-radius: 4px;
  border: 1px solid transparent;
}
.ats-filter-chip--interactive:hover { border-color: var(--border-1); }
.ats-filter-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 100;
  background: var(--bg-1); border: 1px solid var(--border-1);
  border-radius: 6px; box-shadow: 0 8px 24px rgba(29, 49, 64, 0.12);
  padding: 8px; min-width: 220px;
}
.ats-filter-pop--menu { padding: 4px; min-width: 180px; }
.ats-filter-pop__head {
  font-size: 10.5px; color: var(--fg-3); padding: 2px 4px 6px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.ats-filter-pop__list { max-height: 260px; overflow: auto; }
.ats-filter-pop__row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 4px; cursor: pointer; font-size: 12px;
  border-radius: 4px;
}
.ats-filter-pop__row:hover { background: rgba(29, 49, 64, 0.05); }
.ats-filter-pop__menu-row {
  display: block; width: 100%; text-align: left;
  padding: 6px 8px; background: none; border: 0;
  font: inherit; color: var(--nl-ink); font-size: 12px;
  cursor: pointer; border-radius: 4px;
}
.ats-filter-pop__menu-row:hover { background: rgba(29, 49, 64, 0.05); }
.ats-filter-pop__input {
  width: 100%; padding: 6px 8px; font: inherit; font-size: 12px;
  border: 1px solid var(--border-1); border-radius: 4px;
  background: var(--bg-3); color: var(--nl-ink); box-sizing: border-box;
}
.ats-filter-pop__range {
  display: flex; align-items: center; gap: 6px;
}
.ats-filter-pop__range input {
  width: 70px; padding: 5px 6px; font: inherit; font-size: 12px;
  border: 1px solid var(--border-1); border-radius: 4px;
  background: var(--bg-3); color: var(--nl-ink);
  font-family: var(--font-mono);
}
.ats-filter-pop__hint {
  font-size: 10.5px; color: var(--fg-4); margin-top: 6px;
  font-family: var(--font-mono);
}
.ats-sheet tbody td {
  padding: 7px 12px; border-bottom: 1px solid rgba(29, 49, 64, 0.06);
  white-space: nowrap;
  color: var(--fg-2);
  vertical-align: middle;
}
.ats-sheet tbody td:first-child { padding-left: 28px; }
.ats-sheet tbody tr { transition: background .1s; }
.ats-sheet tbody tr:hover { background: rgba(112, 135, 183, 0.06); }
.ats-sheet tbody tr.is-group td {
  background: rgba(29, 49, 64, 0.04); padding: 4px 12px 4px 28px;
  font-weight: 500; color: var(--fg-2); font-size: 11px;
  letter-spacing: -0.005em;
  border-bottom: 1px solid var(--border-1);
}
.ats-sheet__name { display: flex; align-items: center; gap: 8px; }
.ats-sheet__name b { color: var(--nl-ink); font-weight: 500; }
.ats-sheet__company { color: var(--fg-3); font-size: 11px; }
.ats-sheet__group-toggle {
  margin-right: 8px; color: var(--fg-3); font-size: 10px;
  display: inline-flex; align-items: center; gap: 6px;
}
.ats-sheet__group-count {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-4);
  background: rgba(29, 49, 64, 0.06); padding: 1px 5px; border-radius: 4px;
}

/* ====== Funnel / metric cards ====== */
.ats-metric-row { display: flex; gap: 12px; padding: 10px 28px; border-bottom: 1px solid var(--border-1); }
.ats-metric {
  flex: 1; padding: 10px 14px; border-radius: 10px;
  background: var(--bg-3); border: 1px solid var(--border-1);
}
.ats-metric__label { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px; }
.ats-metric__value {
  font-family: var(--font-display); font-size: 26px; font-weight: 400;
  color: var(--nl-ink); line-height: 1;
}
.ats-metric__delta { font-size: 11px; color: var(--fg-3); margin-top: 4px; }
.ats-metric__delta.is-up { color: var(--success); }
.ats-metric__delta.is-down { color: var(--danger); }

/* ====== Candidate detail page ====== */
.ats-detail { display: flex; flex: 1; min-height: 0; }
.ats-detail__main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.ats-detail__rail { width: 320px; flex-shrink: 0; border-left: 1px solid var(--border-1); background: var(--bg-2); overflow-y: auto; padding: 18px 20px; }
.ats-detail__head {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border-1);
  display: flex; align-items: flex-start; gap: 18px;
  background: var(--bg-1);
}
.ats-detail__name {
  font-family: var(--font-display); font-size: 30px; font-weight: 400;
  letter-spacing: -0.02em; color: var(--nl-ink); line-height: 1.05; margin: 0;
}
.ats-detail__name--editable { cursor: text; border-radius: 4px; padding: 1px 4px; margin: -1px -4px; }
.ats-detail__name--editable:hover { background: rgba(29, 49, 64, 0.05); }
.ats-detail__name--input {
  border: 1px solid var(--border-2); border-radius: 4px; padding: 1px 4px; margin: -2px -5px;
  background: var(--bg-1); outline: none; width: 100%;
}
.ats-detail__name--input:focus { border-color: rgba(112, 135, 183, 0.55); box-shadow: 0 0 0 3px rgba(112, 135, 183, 0.12); }
.ats-detail__role--editable { cursor: text; border-radius: 3px; padding: 0 3px; margin: 0 -3px; }
.ats-detail__role--editable:hover { background: rgba(29, 49, 64, 0.05); }
.ats-detail__role-input {
  display: block; width: 100%;
  font-size: inherit; font-family: inherit; font-weight: 600; color: var(--nl-ink);
  border: 1px solid var(--border-2); border-radius: 4px; padding: 2px 6px; margin: 0;
  background: var(--bg-1); outline: none;
}
.ats-detail__role-input:focus { border-color: rgba(112, 135, 183, 0.55); box-shadow: 0 0 0 3px rgba(112, 135, 183, 0.12); }
.ats-job-picker {
  position: absolute; top: calc(100% + 4px); left: 0;
  background: #fff; border: 1px solid var(--border-1); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 4px 0;
  min-width: 220px; max-height: 260px; overflow-y: auto;
}
.ats-job-picker__item {
  display: block; width: 100%; text-align: left;
  padding: 7px 14px; font-size: 13px; color: var(--fg-1);
  background: none; border: 0; cursor: pointer;
}
.ats-job-picker__item:hover { background: rgba(29, 49, 64, 0.06); }
.ats-detail__sub { color: var(--fg-2); font-size: 14px; margin-top: 6px; line-height: 1.4; }
.ats-detail__sub b { color: var(--nl-ink); font-weight: 500; }
.ats-detail__links {
  display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
  align-items: center;
}
a.ats-detail__link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--border-1);
  border-radius: 999px;
  background: var(--bg-1);
  color: var(--fg-2);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 400;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
a.ats-detail__link:hover {
  background: var(--bg-2);
  color: var(--nl-ink);
  text-decoration: none;
}
.ats-detail__link-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 12px; height: 12px; color: var(--fg-3);
  flex-shrink: 0;
}
a.ats-detail__link:hover .ats-detail__link-icon { color: var(--nl-ink); }
.ats-detail__link-label { color: var(--fg-2); font-size: 11px; }
a.ats-detail__link:hover .ats-detail__link-label { color: var(--nl-ink); }
.ats-detail__meta-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 10px;
  color: var(--fg-3);
  font-size: 12px;
}
.ats-detail__meta-item { font-size: 12px; color: var(--fg-3); display: flex; align-items: center; gap: 4px; }
.ats-detail__meta-row > .ats-detail__meta-item + .ats-detail__meta-item::before,
.ats-detail__meta-row > .ats-detail__meta-item + .ats-edit-chip-wrap::before,
.ats-detail__meta-row > .ats-edit-chip-wrap + .ats-detail__meta-item::before,
.ats-detail__meta-row > .ats-edit-chip-wrap + .ats-edit-chip-wrap::before {
  content: "·";
  color: var(--fg-4);
  margin-right: 6px;
  font-weight: 500;
}
.ats-detail__meta-item b { color: var(--fg-2); font-weight: 500; }

.ats-stage-flow {
  display: flex; align-items: center; gap: 0;
  padding: 0 28px; height: 36px;
  border-bottom: 1px solid var(--border-1);
  font-size: 11px; overflow-x: auto; white-space: nowrap;
}
.ats-stage-flow__step {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 10px; height: 100%;
  color: var(--fg-3); position: relative;
}
.ats-stage-flow__step.is-done { color: var(--fg-2); }
.ats-stage-flow__step.is-current { color: var(--nl-ink); font-weight: 500; }
.ats-stage-flow__step.is-current::after {
  content: ""; position: absolute; bottom: -1px; left: 8px; right: 8px;
  height: 2px; background: var(--nl-blue); border-radius: 2px;
}
.ats-stage-flow__sep { color: var(--fg-4); font-size: 10px; padding: 0 2px; }

/* Duplicate candidate warning banner */
.ats-dup-banner {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 28px; padding: 10px 14px;
  background: rgba(180, 85, 61, 0.08); border: 1px solid rgba(180, 85, 61, 0.22);
  border-radius: 8px; font-size: 12.5px; color: #6B3A2A; line-height: 1.5;
}
.ats-dup-banner__icon { flex-shrink: 0; color: #B4553D; margin-top: 1px; }
.ats-dup-banner__text { flex: 1; }
.ats-dup-banner__text b { font-weight: 600; }
.ats-dup-banner__link {
  color: #8B3A26; text-decoration: underline; text-underline-offset: 2px;
  font-weight: 500; cursor: pointer;
}
.ats-dup-banner__link:hover { color: #B4553D; }

.ats-detail__tabs {
  display: flex; gap: 4px; padding: 8px 28px 0;
  border-bottom: 1px solid var(--border-1);
}
.ats-detail__tab {
  padding: 8px 12px; font-size: 12.5px; font-weight: 500;
  color: var(--fg-3); border-bottom: 2px solid transparent;
  letter-spacing: -0.005em;
}
.ats-detail__tab.is-active { color: var(--nl-ink); border-bottom-color: var(--nl-ink); }
.ats-detail__tab:hover { color: var(--fg-1); }

.ats-detail__content {
  flex: 1; overflow-y: auto;
  padding: 24px 28px 32px;
  display: grid; grid-template-columns: 1fr; gap: 24px;
}

.ats-section-block { display: flex; flex-direction: column; gap: 10px; }
.ats-section-block h3 {
  font-family: var(--font-sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3); margin: 0;
}
.ats-section-block .nl-italic-serif { font-family: var(--font-display); font-style: italic; }

/* AI summary card */
.ats-ai-card {
  background: linear-gradient(180deg, rgba(112, 135, 183, 0.10), rgba(150, 177, 173, 0.06));
  border: 1px solid rgba(112, 135, 183, 0.25);
  border-radius: 14px; padding: 20px 22px;
  position: relative;
}
.ats-ai-card__head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.ats-ai-card__sparkle {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--nl-ink); color: var(--bg-1);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.ats-ai-card__title {
  font-size: 12px; font-weight: 500; color: var(--nl-ink);
  letter-spacing: -0.005em; flex: 1;
}
.ats-ai-card__score {
  font-family: var(--font-display); font-size: 22px; color: var(--nl-ink);
  letter-spacing: -0.02em; line-height: 1;
}
.ats-ai-card__score em { font-style: italic; color: var(--fg-3); font-size: 13px; }
.ats-ai-card__regen {
  margin-left: auto; background: none; border: 1px solid var(--border-1);
  border-radius: 6px; padding: 3px 10px; font-size: 11px; color: var(--fg-3);
  cursor: pointer; transition: all 100ms;
}
.ats-ai-card__regen:hover { color: var(--nl-ink); border-color: var(--fg-3); }
.ats-ai-card__regen:disabled { opacity: 0.5; cursor: default; }
.ats-ai-card__body p {
  font-size: 13.5px; line-height: 1.75; color: var(--fg-1); margin: 0;
}
.ats-ai-card__body p + p { margin-top: 10px; }
.ats-ai-card__body em { font-style: italic; color: var(--fg-2); }
.ats-ai-card__body h1, .ats-ai-card__body h2, .ats-ai-card__body h3,
.ats-ai-card__body h4, .ats-ai-card__body h5, .ats-ai-card__body h6 {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--fg-3); margin: 12px 0 4px; line-height: 1.4;
  font-family: var(--font-sans);
}
.ats-ai-card__body h1:first-child, .ats-ai-card__body h2:first-child { margin-top: 0; }
.ats-ai-card__body ul, .ats-ai-card__body ol {
  margin: 4px 0 8px; padding-left: 18px; font-size: 13px; line-height: 1.5;
}
.ats-ai-card__body li { margin: 0 0 3px; }
.ats-ai-card__body strong { font-weight: 600; }
.ats-ai-card__rubric {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(29, 49, 64, 0.08);
}
.ats-rubric-item__label { font-size: 10px; color: var(--fg-3); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; }
.ats-rubric-item__bar { height: 4px; background: rgba(29, 49, 64, 0.10); border-radius: 999px; overflow: hidden; }
.ats-rubric-item__bar > span { display: block; height: 100%; background: var(--nl-blue); border-radius: 999px; }
.ats-rubric-item__value { font-family: var(--font-mono); font-size: 11px; color: var(--fg-2); margin-top: 4px; }

/* Timeline */
.ats-timeline { display: flex; flex-direction: column; }
.ats-timeline__item {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px;
  padding: 8px 0;
  position: relative;
}
.ats-timeline__item::before {
  content: ""; position: absolute;
  left: 11px; top: 28px; bottom: -8px;
  width: 1px; background: var(--border-1);
}
.ats-timeline__item:last-child::before { display: none; }
.ats-timeline__dot {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--border-1);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3); font-size: 10px;
  z-index: 1;
}
.ats-timeline__dot.is-stage { background: var(--nl-blue); border-color: var(--nl-blue); color: #fff; }
.ats-timeline__body { padding-top: 1px; }
.ats-timeline__title { font-size: 13px; color: var(--nl-ink); font-weight: 500; }
.ats-timeline__title b { font-weight: 500; }
.ats-timeline__meta { font-size: 11px; color: var(--fg-3); margin-top: 2px; }
.ats-timeline__quote {
  margin-top: 6px; padding: 8px 10px;
  background: var(--bg-2); border-radius: 8px;
  font-size: 12.5px; color: var(--fg-2); line-height: 1.5;
  border-left: 2px solid var(--border-2);
}

/* Right rail */
.ats-rail-block { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border-1); }
.ats-rail-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.ats-rail-label {
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 8px; display: flex; justify-content: space-between;
}
.ats-rail-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0; font-size: 12.5px; color: var(--fg-2);
}
.ats-rail-row b { color: var(--nl-ink); font-weight: 500; }
.ats-rail-row .ats-rail-key { color: var(--fg-3); }

/* Job page */
.ats-job-meta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--fg-2); margin-top: 8px;
}
.ats-job-meta-row > span { display: inline-flex; align-items: center; gap: 5px; }
.ats-job-meta-row b { color: var(--nl-ink); font-weight: 500; }

.ats-funnel { display: flex; align-items: stretch; gap: 4px; padding: 18px 28px; border-bottom: 1px solid var(--border-1); }
.ats-funnel__step {
  flex: 1; min-width: 0;
  background: var(--bg-3); border: 1px solid var(--border-1);
  border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px; position: relative;
  cursor: pointer; transition: border-color .15s, transform .15s;
}
.ats-funnel__step:hover { border-color: var(--border-2); }
.ats-funnel__step__top { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--fg-3); letter-spacing: -0.005em; }
.ats-funnel__step__count { font-family: var(--font-display); font-size: 22px; color: var(--nl-ink); line-height: 1; }
.ats-funnel__step__bar {
  height: 4px; border-radius: 999px; margin-top: 4px;
  background: rgba(29, 49, 64, 0.06);
  position: relative;
}
.ats-funnel__step__bar > span { display: block; height: 100%; border-radius: 999px; }
.ats-funnel__step__conv { font-size: 10px; color: var(--fg-3); font-family: var(--font-mono); }

/* Job tabs / sub */
.ats-subtabs {
  display: flex; gap: 0; padding: 0 28px;
  border-bottom: 1px solid var(--border-1);
  background: var(--bg-1);
}
.ats-subtab {
  padding: 10px 14px; font-size: 12.5px; font-weight: 500;
  color: var(--fg-3); border-bottom: 2px solid transparent;
}
.ats-subtab:hover { color: var(--fg-1); }
.ats-subtab.is-active { color: var(--nl-ink); border-bottom-color: var(--nl-ink); }

/* Bulk select */
.ats-bulk-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 28px;
  background: var(--nl-ink); color: var(--fg-on-dark);
  font-size: 12.5px;
}
.ats-bulk-bar__count { font-family: var(--font-mono); }

/* Slack note inline */
.ats-slack-note {
  display: flex; gap: 8px; padding: 10px 12px;
  background: rgba(150, 177, 173, 0.18);
  border: 1px solid rgba(150, 177, 173, 0.35);
  border-radius: 10px; font-size: 12.5px; color: var(--fg-1); line-height: 1.5;
}
.ats-slack-note__avatar { width: 24px; height: 24px; flex-shrink: 0; }
.ats-slack-note__head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--fg-3); margin-bottom: 2px; }
.ats-slack-note__head b { color: var(--nl-ink); font-weight: 500; }

/* Misc */
.ats-divider { height: 1px; background: var(--border-1); }
.ats-empty-hint { color: var(--fg-4); font-size: 11px; padding: 10px; text-align: center; font-style: italic; }
.ats-empty-hint.is-drop-hint { color: var(--nl-blue); border: 1px dashed var(--nl-blue); border-radius: 8px; background: rgba(112,135,183,0.08); }

/* ====== Notion-style view tabs ====== */
.ats-view-tabs {
  display: flex; align-items: stretch; gap: 0;
  padding: 0 28px; background: var(--bg-1);
  border-bottom: 1px solid var(--border-1);
  height: 38px;
  flex-shrink: 0;
  white-space: nowrap;
}
.ats-view-tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 100%; padding: 0 12px;
  font-size: 12.5px; font-weight: 500; color: var(--fg-3);
  border: 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  letter-spacing: -0.005em;
  background: transparent;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}
.ats-view-tab:hover { color: var(--fg-1); }
.ats-view-tab.is-active { color: var(--nl-ink); border-bottom-color: var(--nl-ink); }
.ats-view-tab__icon { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--fg-3); }
.ats-view-tab.is-active .ats-view-tab__icon { color: var(--nl-ink); }
.ats-view-tab__count {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-4);
  background: rgba(29, 49, 64, 0.06); padding: 1px 5px; border-radius: 4px;
}
.ats-view-tab__star { color: var(--nl-amber); margin-left: 2px; font-size: 10px; }
.ats-view-tab__rename {
  width: 14px; height: 14px; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-4); font-size: 10px;
}
.ats-view-tab__rename:hover { background: rgba(29,49,64,0.08); color: var(--fg-1); }
.ats-view-tabs__add {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 10px; height: 100%;
  font-size: 12px; color: var(--fg-3);
  background: transparent; border: 0;
  flex-shrink: 0; white-space: nowrap; line-height: 1;
}
.ats-view-tabs__add:hover { color: var(--fg-1); }
.ats-view-tabs__spacer { flex: 1; }
.ats-view-tabs__menu {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 10px; height: 100%;
  font-size: 11.5px; color: var(--fg-3);
  background: transparent; border: 0;
  flex-shrink: 0; white-space: nowrap; line-height: 1;
}
.ats-view-tabs__menu:hover { color: var(--fg-1); }

/* Calendar (light placeholder) */
.ats-cal { flex: 1; min-height: 0; overflow: auto; padding: 14px 28px 28px; background: var(--bg-1); }
.ats-cal__head {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3); padding: 6px 0 8px;
  border-bottom: 1px solid var(--border-1);
}
.ats-cal__grid {
  display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 1fr;
  gap: 1px; background: var(--border-1);
  border: 1px solid var(--border-1); border-top: 0;
}
.ats-cal__day {
  background: var(--bg-3); padding: 6px 8px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 110px;
}
.ats-cal__day--off { background: rgba(213,216,214,0.35); }
.ats-cal__date { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.ats-cal__date.is-today { color: var(--nl-blue); font-weight: 700; }
.ats-cal__event {
  font-size: 11px; padding: 2px 6px; border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}

/* Sidebar inactive-role styling */
.ats-sidebar__heading--toggle {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: flex-start; width: 100%;
  text-align: left;
}
.ats-sidebar__heading--toggle:hover .nl-eyebrow { color: var(--fg-1); }
.ats-sidebar__caret {
  display: inline-block; width: 10px; margin-right: 4px;
  font-size: 9px; color: var(--fg-4);
}
.ats-side-item--muted .ats-side-item__label { color: var(--fg-3); }
.ats-side-item--muted .ats-side-item__dot { opacity: 0.7; }
.ats-side-item__inactive-tag {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 4px;
  font-size: 10px; font-family: var(--font-mono);
  color: var(--fg-3);
}
.ats-side-item__inactive-tag[data-status="filled"] { background: rgba(150,177,173,0.25); color: #3F5E45; }
.ats-side-item__inactive-tag[data-status="paused"] { background: rgba(213,216,214,0.6); color: var(--fg-3); }
.ats-card.is-dragging { opacity: 0.4; box-shadow: var(--shadow-md); }
.ats-card__grip {
  margin-left: auto; color: var(--fg-4); font-size: 10px; cursor: grab;
  letter-spacing: -2px; opacity: 0; transition: opacity .15s;
}
.ats-card:hover .ats-card__grip { opacity: 1; }
.ats-card__bell {
  background: transparent;
  border: 0;
  padding: 2px;
  border-radius: 4px;
  color: var(--fg-4);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .12s, color .12s;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ats-card:hover .ats-card__bell { opacity: 1; }
.ats-card__bell:hover {
  background: rgba(29,49,64,0.08);
  color: var(--nl-ink);
}
.ats-col.is-drop-target {
  background: rgba(112, 135, 183, 0.12);
  border-color: var(--nl-blue);
  box-shadow: inset 0 0 0 1px var(--nl-blue);
}
.ats-col.is-drop-target .ats-col__head { background: rgba(112, 135, 183, 0.18); }
.ats-col__drop-line {
  height: 2px; background: var(--nl-blue); border-radius: 999px;
  margin: 2px 4px;
}

/* Toast */
.ats-toast {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  background: var(--nl-ink); color: var(--fg-on-dark);
  padding: 10px 14px 10px 14px; border-radius: 999px;
  font-size: 12.5px; box-shadow: var(--shadow-lg);
  animation: atsToastIn 240ms cubic-bezier(0.22,1,0.36,1);
  z-index: 50;
}
.ats-toast__dot { width: 6px; height: 6px; border-radius: 999px; background: var(--nl-sage); }
.ats-toast__undo {
  background: rgba(244, 241, 232, 0.12); color: var(--fg-on-dark);
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  margin-left: 6px;
}
.ats-toast__undo:hover { background: rgba(244, 241, 232, 0.22); }
@keyframes atsToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.ats-main { position: relative; }

/* ====== Discussion / Notes ====== */
.ats-presence {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(150, 177, 173, 0.18);
  border: 1px solid rgba(150, 177, 173, 0.35);
  font-size: 11.5px; color: var(--fg-1);
}
.ats-presence__pulse {
  width: 8px; height: 8px; border-radius: 999px; background: var(--success);
  box-shadow: 0 0 0 0 rgba(107, 142, 118, 0.6);
  animation: atsPulse 2s ease-out infinite;
}
@keyframes atsPulse {
  0%   { box-shadow: 0 0 0 0 rgba(107, 142, 118, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(107, 142, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(107, 142, 118, 0); }
}
.ats-presence__avatars { display: flex; }
.ats-presence__avatars > * + * { margin-left: -6px; }

.ats-discussion { display: flex; flex-direction: column; gap: 14px; }

.ats-thread {
  display: flex; flex-direction: column; gap: 10px;
}
.ats-comment {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: 12px;
}
.ats-comment.is-live {
  border-color: rgba(107, 142, 118, 0.45);
  background: linear-gradient(180deg, rgba(150, 177, 173, 0.12), var(--bg-3));
}
.ats-comment.is-pinned {
  border-color: rgba(227, 165, 78, 0.45);
  background: linear-gradient(180deg, rgba(227, 165, 78, 0.08), var(--bg-3));
}
.ats-comment__head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px; margin-bottom: 4px;
}
.ats-comment__author { color: var(--nl-ink); font-weight: 500; }
.ats-comment__role { color: var(--fg-3); font-size: 11px; }
.ats-comment__time { color: var(--fg-4); font-size: 11px; margin-left: auto; font-family: var(--font-mono); }
.ats-comment__live-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: var(--success); color: #fff;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.ats-comment__pin-tag {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: rgba(227, 165, 78, 0.22); color: #7A5A24;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.ats-comment__body {
  font-size: 13.5px; color: var(--fg-1); line-height: 1.55;
}
.ats-comment__body em { font-family: var(--font-display); font-style: italic; color: var(--fg-2); }
.ats-comment__body .ats-mention { color: var(--nl-blue); font-weight: 500; }
.ats-comment__body .ats-rubric-inline {
  display: inline-block; background: rgba(29,49,64,0.05);
  padding: 1px 7px; border-radius: 4px; font-family: var(--font-mono);
  font-size: 11.5px; color: var(--fg-2); margin-right: 4px;
}
.ats-comment__attached {
  margin-top: 8px; padding: 8px 10px;
  border: 1px solid var(--border-1); border-radius: 8px;
  font-size: 12px; color: var(--fg-2); background: var(--bg-2);
  display: flex; align-items: center; gap: 8px;
}
.ats-comment__reactions {
  display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap;
}
.ats-reaction {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(29, 49, 64, 0.05); border: 1px solid var(--border-1);
  font-size: 11.5px; color: var(--fg-2);
}
.ats-reaction.is-mine { background: rgba(112, 135, 183, 0.18); border-color: rgba(112, 135, 183, 0.35); color: var(--nl-ink); }
.ats-reaction:hover { background: rgba(29, 49, 64, 0.08); }
.ats-comment__replies-toggle {
  font-size: 11.5px; color: var(--fg-3); margin-top: 6px;
}
.ats-comment__replies {
  margin-top: 8px; margin-left: 0;
  padding-left: 10px; border-left: 2px solid var(--border-1);
  display: flex; flex-direction: column; gap: 8px;
}
.ats-reply {
  display: grid; grid-template-columns: 22px 1fr; gap: 8px;
  font-size: 12.5px;
}
.ats-reply__head { font-size: 11.5px; }
.ats-reply__head b { color: var(--nl-ink); font-weight: 500; }
.ats-reply__body { color: var(--fg-1); line-height: 1.5; margin-top: 1px; }

.ats-typing {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0 0 38px;
  font-size: 11.5px; color: var(--fg-3); font-style: italic;
}
.ats-typing__dots { display: inline-flex; gap: 2px; }
.ats-typing__dots span {
  width: 4px; height: 4px; border-radius: 999px; background: var(--fg-3);
  animation: atsTypingDot 1.2s infinite ease-in-out;
}
.ats-typing__dots span:nth-child(2) { animation-delay: 0.15s; }
.ats-typing__dots span:nth-child(3) { animation-delay: 0.30s; }
@keyframes atsTypingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* Composer */
.ats-composer {
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: var(--bg-3);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.ats-composer__live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--success);
  padding: 6px 14px; border-bottom: 1px solid rgba(107, 142, 118, 0.18);
  background: rgba(150, 177, 173, 0.12);
  border-radius: 12px 12px 0 0;
}
.ats-composer__tabs {
  display: flex; gap: 0; padding: 4px 6px 0;
  border-bottom: 1px solid var(--border-1);
}
.ats-composer__tab {
  padding: 8px 12px; font-size: 12px; font-weight: 500;
  color: var(--fg-3); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ats-composer__tab.is-active { color: var(--nl-ink); border-bottom-color: var(--nl-ink); }
.ats-composer__tab:hover { color: var(--fg-1); }
.ats-composer__editor {
  padding: 12px 14px; min-height: 80px;
  font-size: 13.5px; line-height: 1.55; color: var(--fg-1);
  outline: none;
}
.ats-composer__editor:empty::before {
  content: attr(data-placeholder); color: var(--fg-4);
  pointer-events: none;
}
.ats-composer__editor .ats-mention {
  color: var(--nl-blue); font-weight: 500;
  background: rgba(112,135,183,0.10); padding: 0 4px; border-radius: 4px;
}
.ats-composer__toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-top: 1px solid var(--border-1);
  background: rgba(213, 216, 214, 0.18); border-radius: 0 0 12px 12px;
}
.ats-composer__tool {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3); font-size: 13px;
}
.ats-composer__tool:hover { background: rgba(29,49,64,0.06); color: var(--fg-1); }
.ats-composer__rubric {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--fg-3); margin-left: 8px; padding-left: 8px;
  border-left: 1px solid var(--border-1);
}
.ats-rubric-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500;
  background: rgba(29,49,64,0.05); color: var(--fg-2);
  border: 1px solid var(--border-1);
}
.ats-rubric-pill.is-active { background: rgba(150,177,173,0.30); color: #3F5E45; border-color: rgba(107,142,118,0.4); }

.ats-composer__shortcut { font-family: var(--font-mono); font-size: 10px; color: var(--fg-4); margin-right: 6px; }

/* Discussion subtab badge */
.ats-tab__badge {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px; min-width: 16px; height: 16px;
  padding: 0 5px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px;
  background: var(--nl-blue); color: #fff;
}

/* Mention popover */
.ats-mention-popover {
  position: absolute; left: 14px; top: 60px;
  width: 240px; background: var(--bg-3);
  border: 1px solid var(--border-2); border-radius: 10px;
  box-shadow: var(--shadow-md); padding: 4px;
  z-index: 5;
}
.ats-mention-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px;
  font-size: 12.5px; color: var(--fg-1); cursor: pointer;
}
.ats-mention-row.is-focused { background: rgba(112,135,183,0.14); }
.ats-mention-row__role { color: var(--fg-3); font-size: 11px; margin-left: auto; }

/* ===== Notion-style notes page ===== */
.ats-detail__content--notion {
  width: 780px;
  max-width: 100%;
  margin: 0 auto;
  padding-top: 8px;
}
.ats-notion-page { padding: 16px 0 40px; }
.ats-notion-page__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.015em;
  color: var(--nl-ink);
  margin: 16px 0 6px;
}
.ats-notion-page__hint {
  font-size: 13px; color: var(--fg-3); line-height: 1.55;
  margin: 0 0 22px; max-width: 60ch;
}

/* Slot (collapsed) */
.ats-notes-slot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  cursor: text;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 18px;
}
.ats-notes-slot__placeholder {
  font-size: 14px; color: var(--fg-3);
  font-family: var(--font-sans);
}
.ats-notes-slot:hover .ats-notes-slot__placeholder { color: var(--fg-2); }

/* Prominent "Write a note" CTA — replaces subtle slot */
.ats-notes-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 20px;
  margin: 6px 0 22px;
  background: var(--nl-blue);
  color: #fff;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 8px 24px rgba(58, 88, 138, 0.25);
  transition: transform 100ms ease, box-shadow 120ms ease, filter 120ms ease;
}
.ats-notes-cta:hover {
  filter: brightness(1.04);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 12px 28px rgba(58, 88, 138, 0.32);
}
.ats-notes-cta:active { transform: translateY(1px); }
.ats-notes-cta__icon {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 10px;
}
.ats-notes-cta__icon > svg { width: 18px; height: 18px; }
.ats-notes-cta__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.3;
}
.ats-notes-cta__text b {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.005em;
}
.ats-notes-cta__text span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
}
.ats-notes-cta__kbd {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}
.ats-notes-cta__kbd kbd {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: inherit;
}

/* Structured composer */
.ats-notes-compose--structured {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 4px 0 18px;
}
.ats-notes-compose__head-spacer { flex: 1; }
.ats-notes-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 32px;
}
.ats-notes-field { display: flex; flex-direction: column; gap: 4px; }
.ats-notes-field__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--nl-ink);
}
.ats-notes-field__label > svg {
  flex: 0 0 auto;
  width: 14px; height: 14px;
  color: var(--nl-blue);
  opacity: 0.85;
}
.ats-notes-field__title { font-weight: 600; color: var(--nl-ink); }
.ats-notes-field__hint {
  font-weight: 400;
  font-size: 11.5px;
  color: var(--fg-3);
}
.ats-notes-field__input {
  width: 100%;
  resize: vertical;
  padding: 8px 10px;
  border: 1px solid var(--border-1);
  border-radius: 7px;
  background: var(--bg-1);
  color: var(--nl-ink);
  font: inherit;
  font-size: 13px;
  outline: 0;
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.ats-notes-field__input::placeholder { color: var(--fg-4); }
.ats-notes-field__input:hover { border-color: var(--border-2); }
.ats-notes-field__input:focus {
  border-color: var(--nl-blue);
  box-shadow: 0 0 0 3px rgba(117, 149, 213, 0.15);
}

/* Scoring inside composer */
.ats-notes-scores {
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 8px;
}
.ats-notes-scores__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-1);
}
.ats-notes-scores__head b { font-size: 12.5px; color: var(--nl-ink); font-weight: 600; }
.ats-notes-scores__head span { font-size: 11.5px; color: var(--fg-3); }
.ats-notes-score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-1);
}
.ats-notes-score-row:last-child { border-bottom: 0; }
.ats-notes-score-row__label { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ats-notes-score-row__label b { font-size: 12.5px; color: var(--nl-ink); font-weight: 600; }
.ats-notes-score-row__label span { font-size: 11px; color: var(--fg-3); }

.ats-score-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ats-score-picker__dot {
  appearance: none;
  width: 18px; height: 18px;
  border: 1px solid var(--border-2);
  background: var(--bg-1);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background 80ms ease, border-color 80ms ease, transform 80ms ease;
}
.ats-score-picker__dot:hover { transform: scale(1.08); }
.ats-score-picker__dot.is-active {
  background: var(--nl-blue);
  border-color: var(--nl-blue);
}
.ats-score-picker__val {
  margin-left: 6px;
  min-width: 32px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.ats-score-picker__empty { color: var(--fg-4); }

/* Inline toast (e.g. "Note posted") */
.ats-toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 0 0 14px;
  background: var(--nl-blue);
  color: #fff;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(15, 25, 35, 0.18);
  animation: ats-toast-in 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes ats-toast-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Expanded composer */
.ats-notes-compose {
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 18px;
}
.ats-notes-compose__head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.ats-notes-compose__editor {
  width: 100%; min-height: 96px; resize: vertical;
  border: 0; outline: 0; padding: 0 0 0 32px;
  font-family: var(--font-sans); font-size: 14px; line-height: 1.6;
  color: var(--nl-ink); background: transparent;
}
.ats-notes-compose__footer {
  display: flex; align-items: center; gap: 8px; padding-left: 32px; margin-top: 10px;
}
.ats-notes-compose__tools { display: flex; gap: 2px; }
.ats-notes-compose__hint {
  flex: 1; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4);
}

/* Individual notes — Notion block style */
.ats-notes-stream { display: flex; flex-direction: column; gap: 16px; }
.ats-note { padding: 0; }
.ats-note__head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.ats-note__author { font-size: 13.5px; font-weight: 500; color: var(--nl-ink); }
.ats-note__role { font-size: 12px; color: var(--fg-3); }
.ats-note__time { font-size: 11.5px; color: var(--fg-4); font-family: var(--font-mono); margin-left: auto; }
.ats-note__pin { color: var(--nl-amber); font-size: 12px; }
.ats-note__body {
  padding-left: 32px;
  font-size: 13px; line-height: 1.5; color: var(--fg-1);
}
.ats-note__body p { font-size: 13px; line-height: 1.5; margin: 0 0 6px; }
.ats-note__body p:last-child { margin-bottom: 0; }
.ats-note__body ul, .ats-note__body ol { margin: 0 0 6px; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.ats-note__body li { margin: 0 0 3px; }
.ats-note__body li:last-child { margin-bottom: 0; }
.ats-note__body strong { font-weight: 600; }
.ats-note__body em { font-style: italic; color: var(--fg-2); }
.ats-note__body h1, .ats-note__body h2, .ats-note__body h3,
.ats-note__body h4, .ats-note__body h5, .ats-note__body h6 {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-3); margin: 14px 0 4px; line-height: 1.4;
  font-family: var(--font-sans);
}
.ats-note__body h1:first-child, .ats-note__body h2:first-child, .ats-note__body h3:first-child { margin-top: 0; }
.ats-note__delete {
  opacity: 0; transition: opacity 0.15s;
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  color: var(--fg-4); font-size: 13px; margin-left: 8px;
}
.ats-note__delete:hover { color: #B4553D; }
.ats-note:hover .ats-note__delete { opacity: 1; }
.ats-note__section { margin: 0 0 14px; }
.ats-note__section:last-child { margin-bottom: 0; }
.ats-note__section-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-3); margin: 0 0 4px;
}
.ats-note__section-label svg { color: var(--fg-3); }
.ats-note__quote {
  margin: 8px 0 10px;
  padding: 4px 12px; border-left: 2px solid var(--nl-sage);
  color: var(--fg-2); font-style: italic;
}
.ats-note__attach {
  margin-left: 32px; margin-top: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg-2);
  background: rgba(29,49,64,0.04); padding: 5px 10px; border-radius: 6px;
}
.ats-note__reactions {
  margin-left: 32px; margin-top: 10px;
  display: flex; align-items: center; gap: 4px;
}
.ats-reaction--add { color: var(--fg-4); }
.ats-note__reply {
  margin-left: 6px; padding: 3px 8px;
  font-size: 11.5px; color: var(--fg-3);
  background: transparent; border: 0; cursor: pointer;
  border-radius: 5px;
}
.ats-note__reply:hover { background: rgba(29,49,64,0.06); color: var(--fg-1); }

/* ===== Side-drawer pop-up from kanban (Notion-style) ===== */
.ats-modal-scrim {
  position: fixed; inset: 0;
  background: rgba(20, 30, 40, 0.28);
  display: flex; align-items: stretch; justify-content: flex-end;
  z-index: 200;
  animation: ats-scrim-in 180ms ease-out;
  overflow: hidden;
}
@keyframes ats-scrim-in { from { opacity: 0; } to { opacity: 1; } }
.ats-modal {
  background: var(--bg-1);
  box-shadow: -16px 0 60px rgba(15, 25, 35, 0.18);
  width: 64%; max-width: 920px; min-width: 560px;
  height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: ats-drawer-in 260ms cubic-bezier(0.2, 0.9, 0.3, 1);
  border-left: 1px solid var(--border-1);
}
.ats-modal--embedded {
  width: 100%; max-width: none; min-width: 0; height: 100%;
  border-left: 0; box-shadow: none;
  animation: none;
}
@keyframes ats-drawer-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.ats-modal__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-1);
  background: var(--bg-2);
  flex-shrink: 0;
}
.ats-modal__bar-left { display: flex; align-items: center; gap: 12px; }
.ats-modal__bar-right { display: flex; align-items: center; gap: 6px; }
.ats-modal__close {
  width: 26px; height: 26px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--fg-2); cursor: pointer;
}
.ats-modal__close:hover { background: rgba(29,49,64,0.08); color: var(--nl-ink); }
.ats-modal__breadcrumb {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg-3);
}
.ats-modal__breadcrumb b { color: var(--nl-ink); font-weight: 500; }
.ats-modal__crumb-sep { color: var(--fg-4); }
.ats-modal__nav {
  width: 26px; height: 26px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--fg-2); cursor: pointer;
  font-size: 13px;
}
.ats-modal__nav:hover { background: rgba(29,49,64,0.08); color: var(--nl-ink); }
.ats-modal__divider { width: 1px; height: 16px; background: var(--border-1); margin: 0 4px; }
.ats-modal__body {
  flex: 1; min-height: 0; overflow: auto;
  padding: 18px 28px 32px;
  display: flex; flex-direction: column;
}
/* Make the detail body more compact inside the drawer */
.ats-modal__body .ats-detail__head { padding: 8px 0 14px; gap: 14px; }
.ats-modal__body .ats-detail__name { font-size: 22px; }
.ats-modal__body .ats-detail__sub { font-size: 12.5px; }
.ats-modal__body .ats-detail__links { margin-top: 6px; }
.ats-modal__body .ats-detail__link { padding: 3px 8px; font-size: 11px; }
.ats-modal__body .ats-detail__meta-row { font-size: 11.5px; gap: 10px; flex-wrap: wrap; }
.ats-modal__body .ats-stage-flow { padding: 8px 0; font-size: 11px; flex-wrap: wrap; }
.ats-modal__body .ats-detail { display: block; padding: 0; }
.ats-modal__body .ats-detail__rail { display: none; }
.ats-modal__body .ats-detail__main { padding: 0; }
.ats-modal__body .ats-detail__content--notion { max-width: 100%; padding: 0; }
.ats-modal__body .ats-notion-page { padding-bottom: 16px; }
.ats-modal__body .ats-notion-page__title { font-size: 22px; margin-top: 8px; }

/* ===== Overview row: brief + scores side-by-side ===== */
.ats-overview-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-top: 10px; margin-bottom: 6px;
}
.ats-overview-row > .ats-ai-card { margin: 0; }
.ats-overview-row > .ats-scores-dash { margin: 0; }
.ats-overview-row .ats-scores-radar-wrap { grid-template-columns: 1fr; }
.ats-overview-row .ats-scores-radar__big { font-size: 28px; }
.ats-overview-row .ats-radar-svg { max-width: 220px; }
.ats-overview-row .ats-scores-legend { display: none; }
.ats-overview-row .ats-panel-consensus { margin: 0; }

/* ===== Panel consensus ===== */
.ats-panel-consensus {
  border: 1px solid var(--border-1);
  border-radius: 12px;
  background: var(--bg-1);
  margin: 8px 0 22px;
  overflow: hidden;
}
.ats-panel-consensus__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-1);
}
.ats-panel-consensus__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 16px; color: var(--nl-ink); letter-spacing: -0.005em;
}
.ats-panel-consensus__sub {
  font-size: 11.5px; color: var(--fg-3); margin-top: 2px;
}
.ats-panel-table {
  width: 100%; border-collapse: collapse;
}
.ats-panel-table th, .ats-panel-table td {
  text-align: left; padding: 8px 12px;
  font-size: 12px; border-bottom: 1px solid var(--border-1);
  vertical-align: middle;
}
.ats-panel-table th {
  font-weight: 500; color: var(--fg-3);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--bg-2);
}
.ats-panel-table th:first-child { width: 220px; }
.ats-panel-table td:first-child { width: 220px; }
.ats-panel-table tbody tr:last-child td { border-bottom: 0; }
.ats-panel-table__rater {
  display: flex; align-items: center; gap: 8px;
}
.ats-panel-table__rater-name { font-size: 12.5px; color: var(--nl-ink); font-weight: 500; }
.ats-panel-table__rater-role { font-size: 10.5px; color: var(--fg-3); margin-top: 1px; }
.ats-panel-table__num {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  margin-left: 6px;
}
.ats-panel-table__avg td { background: rgba(150, 177, 173, 0.10); }
.ats-panel-table__avg-cell { display: table-cell; }
.ats-panel-table__avg-num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--nl-ink);
  margin-left: 6px;
}
.ats-panel-table__spread {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-4);
  margin-left: 6px;
}

/* Score dots */
.ats-score-dots {
  display: inline-flex; align-items: center; gap: 3px;
  vertical-align: middle;
}
.ats-score-dots--empty {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-4); padding: 0 4px;
}
.ats-score-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(29, 49, 64, 0.10);
  position: relative;
}
.ats-score-dots--md .ats-score-dot { width: 9px; height: 9px; }
.ats-score-dot.is-full { background: var(--nl-blue); }
.ats-score-dot.is-half {
  background: linear-gradient(90deg, var(--nl-blue) 0%, var(--nl-blue) 50%, rgba(29,49,64,0.10) 50%, rgba(29,49,64,0.10) 100%);
}

/* ===== Scores radar dashboard ===== */
.ats-scores-dash {
  border: 1px solid var(--border-1);
  border-radius: 12px;
  background: var(--bg-3);
  overflow: hidden;
}
.ats-scores-dash__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-1);
  background: var(--bg-2);
}
.ats-scores-dash__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 16px; color: var(--nl-ink); letter-spacing: -0.005em;
}
.ats-scores-dash__headmeta {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; color: var(--fg-3);
}
.ats-scores-dash__headmeta b {
  font-family: var(--font-mono); font-weight: 500; color: var(--nl-ink);
}
.ats-scores-dash__sep {
  width: 1px; height: 10px; background: var(--border-1); display: inline-block;
}

/* Consensus chips */
.ats-scores-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 2px 7px; border-radius: 999px; letter-spacing: 0;
}
.ats-scores-chip em { font-style: normal; color: var(--fg-3); font-size: 10px; }
.ats-scores-chip--good { background: rgba(150,177,173,0.22); color: #2F5C53; }
.ats-scores-chip--good em { color: rgba(47,92,83,0.65); }
.ats-scores-chip--warn { background: rgba(227,165,78,0.20); color: #8A5A1A; }
.ats-scores-chip--warn em { color: rgba(138,90,26,0.65); }
.ats-scores-chip--bad  { background: rgba(180,85,61,0.18);  color: #8B3A26; }
.ats-scores-chip--bad em { color: rgba(139,58,38,0.65); }
.ats-scores-chip--neutral { background: rgba(29,49,64,0.06); color: var(--fg-3); }

/* Layout: radar + legend */
.ats-scores-radar-wrap {
  display: grid; grid-template-columns: 1fr 240px;
  gap: 0;
}
.ats-scores-radar {
  padding: 16px 16px 18px;
  border-right: 1px solid var(--border-1);
  display: flex; flex-direction: column; align-items: stretch;
  min-width: 0;
}
.ats-scores-radar__hero {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 4px;
}
.ats-scores-radar__num {
  display: flex; align-items: baseline; gap: 3px;
}
.ats-scores-radar__big {
  font-family: var(--font-display);
  font-size: 44px; font-weight: 400; line-height: 1;
  letter-spacing: -0.03em; color: var(--nl-ink);
  font-variant-numeric: tabular-nums;
}
.ats-scores-radar__den {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-4);
}
.ats-scores-radar__label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--fg-3); margin-bottom: 4px;
}

/* The SVG */
.ats-radar-svg {
  width: 100%; max-width: 380px;
  height: auto; display: block;
  margin: -4px auto 0;
  overflow: visible;
}
.ats-radar__ring {
  fill: rgba(29,49,64,0.025);
  stroke: rgba(29,49,64,0.08);
  stroke-width: 1;
}
.ats-radar__ring.is-edge {
  stroke: rgba(29,49,64,0.15);
  fill: rgba(29,49,64,0.015);
}
.ats-radar__spoke {
  stroke: rgba(29,49,64,0.10);
  stroke-width: 1;
}
.ats-radar__spoke.is-heated {
  stroke: rgba(180,85,61,0.40);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}
.ats-radar__ringnum {
  font-family: var(--font-mono); font-size: 9px;
  fill: var(--fg-3); opacity: 0.85;
  paint-order: stroke;
  stroke: var(--bg-3); stroke-width: 3px;
  stroke-linejoin: round;
}
.ats-radar__ringnum.is-zero { fill: var(--fg-4); }
.ats-radar__axis-denom { fill: var(--fg-4); font-size: 9px; }
/* Spread envelope — disagreement made loud */
.ats-radar__spread {
  fill: rgba(180,85,61,0.10);
  stroke: rgba(180,85,61,0.25);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.ats-radar__spread-inner {
  fill: var(--bg-3);
  stroke: rgba(180,85,61,0.20);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
/* Average polygon */
.ats-radar__avg {
  fill: rgba(117,149,213,0.22);
  stroke: var(--nl-blue);
  stroke-width: 2;
  stroke-linejoin: round;
}
/* Per-rater overlays */
.ats-radar__rater polygon {
  fill: none;
  stroke-width: 1.25;
  stroke-linejoin: round;
  opacity: 0.55;
  transition: opacity .15s, stroke-width .15s;
}
.ats-radar__rater circle {
  opacity: 0.7;
  transition: r .15s, opacity .15s;
}
.ats-radar__rater.is-hover polygon { opacity: 1; stroke-width: 2.25; }
.ats-radar__rater.is-hover circle { opacity: 1; }
.ats-radar__rater.is-dim polygon { opacity: 0.12; }
.ats-radar__rater.is-dim circle { opacity: 0.18; }

/* Axis labels */
.ats-radar__axis-name {
  font-family: var(--font-sans);
  font-size: 11.5px; font-weight: 500;
  fill: var(--nl-ink); letter-spacing: -0.005em;
}
.ats-radar__axis-val {
  font-family: var(--font-mono); font-size: 10.5px;
  fill: var(--fg-3);
}
.ats-radar__axis-val--good { fill: #2F5C53; }
.ats-radar__axis-val--warn { fill: #8A5A1A; }
.ats-radar__axis-val--bad  { fill: #8B3A26; font-weight: 600; }
.ats-radar__axis-spread { fill: var(--fg-4); }

/* Right column: legend */
.ats-scores-legend {
  padding: 16px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.ats-scores-legend__head {
  font-size: 10.5px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.ats-scores-legend__row {
  display: grid; grid-template-columns: 8px 1fr auto;
  align-items: center; gap: 10px;
  padding: 6px 8px; margin: 0 -8px;
  border-radius: 6px;
  cursor: default;
  transition: background .12s;
}
.ats-scores-legend__row:hover,
.ats-scores-legend__row.is-hover {
  background: rgba(29,49,64,0.04);
}
.ats-scores-legend__swatch {
  width: 8px; height: 8px; border-radius: 50%;
}
.ats-scores-legend__name {
  font-size: 12px; color: var(--nl-ink); font-weight: 500;
  letter-spacing: -0.005em;
}
.ats-scores-legend__role {
  font-size: 10.5px; color: var(--fg-3); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 160px;
}
.ats-scores-legend__avg {
  font-family: var(--font-mono); font-size: 13px;
  font-weight: 500; color: var(--nl-ink);
  font-variant-numeric: tabular-nums;
}
.ats-scores-legend__row.is-pending .ats-scores-legend__name { color: var(--fg-3); }
.ats-scores-legend__row.is-pending .ats-scores-legend__avg { color: var(--fg-4); }

/* Disagreement callout */
.ats-scores-callout {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(180,85,61,0.06);
  border: 1px dashed rgba(180,85,61,0.30);
  border-radius: 8px;
}
.ats-scores-callout__hdr {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #8B3A26;
  font-weight: 500;
}
.ats-scores-callout__hdr b { color: #6E2D1E; }
.ats-scores-callout__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #B4553D;
}
.ats-scores-callout__body {
  font-size: 11px; color: var(--fg-2);
  margin-top: 4px; line-height: 1.4;
}

/* Per-note score block */
.ats-note-scores {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 4px 0 12px 32px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 8px;
}
.ats-note-score__label {
  font-size: 10.5px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.ats-note-score__row {
  display: flex; align-items: center; gap: 6px;
}
.ats-note-score__num {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--nl-ink); font-weight: 500;
}

/* Ghost-bordered button used in panel consensus header */
.ats-btn--ghost-bordered {
  background: transparent;
  border: 1px solid var(--border-1);
  color: var(--fg-1);
  padding: 0 10px;
}
/* In the pipeline filter bar, give all buttons a roomier height so chips read clearly */
.ats-sheet-filterbar .ats-btn { padding: 5px 11px; }
.ats-btn--ghost-bordered:hover { background: rgba(29,49,64,0.05); }

/* Move-stage dropdown menu */
.ats-stage-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  z-index: 30;
  min-width: 240px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 25, 35, 0.10);
  padding: 6px;
  display: flex; flex-direction: column;
}
.ats-stage-menu__head {
  font-size: 10.5px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 6px 10px 4px;
}
.ats-stage-menu__item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 12.5px; color: var(--nl-ink);
  border-radius: 6px;
  text-align: left;
}
.ats-stage-menu__item:hover { background: rgba(29,49,64,0.06); }
.ats-stage-menu__item:disabled { opacity: 0.5; cursor: not-allowed; }
.ats-stage-menu__item--danger { color: var(--fg-2); }
.ats-stage-menu__dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.ats-stage-menu__owner {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  color: var(--fg-3);
  background: var(--bg-2); padding: 1px 6px; border-radius: 999px;
}
.ats-stage-menu__divider { height: 1px; background: var(--border-1); margin: 4px 8px; }

/* Advance hint — shows next owner under the Advance button */
.ats-detail__advance-hint {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--fg-3);
  font-family: var(--font-sans);
}
.ats-detail__advance-hint b { color: var(--nl-ink); font-weight: 500; }

/* === Owner / next-interviewer picker === */
.ats-picker-scrim {
  position: fixed; inset: 0;
  background: rgba(20, 30, 40, 0.18);
  z-index: 300;
  animation: ats-scrim-in 140ms ease-out;
}
.ats-owner-picker {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  z-index: 310;
  width: 380px;
  max-height: min(560px, 75vh);
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 25, 35, 0.18);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: ats-picker-in 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
  text-align: left;
}
@keyframes ats-picker-in {
  from { transform: translateY(-4px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.ats-owner-picker__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-1);
}
.ats-owner-picker__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 14.5px; color: var(--nl-ink); letter-spacing: -0.005em;
  line-height: 1.35;
}
.ats-owner-picker__title b { color: var(--nl-blue); font-weight: 500; }
.ats-owner-picker__sub {
  font-size: 11.5px; color: var(--fg-3);
  margin-top: 4px; line-height: 1.4;
}
.ats-owner-picker__close {
  width: 22px; height: 22px; border-radius: 5px;
  background: transparent; border: 0; color: var(--fg-3); cursor: pointer;
  font-size: 12px;
  flex-shrink: 0;
}
.ats-owner-picker__close:hover { background: rgba(29,49,64,0.08); color: var(--nl-ink); }

.ats-owner-picker__search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-1);
  color: var(--fg-3);
}
.ats-owner-picker__search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 12.5px; color: var(--nl-ink);
  font-family: var(--font-sans);
}
.ats-owner-picker__search input::placeholder { color: var(--fg-4); }

.ats-owner-picker__body {
  flex: 1; min-height: 0;
  max-height: 340px; overflow-y: auto;
  padding: 4px 0;
  scrollbar-gutter: stable;
}
.ats-owner-picker__body::-webkit-scrollbar { width: 8px; }
.ats-owner-picker__body::-webkit-scrollbar-thumb {
  background: rgba(29,49,64,0.18); border-radius: 4px;
}
.ats-owner-picker__body::-webkit-scrollbar-thumb:hover {
  background: rgba(29,49,64,0.30);
}
.ats-owner-picker__section {
  font-size: 10px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 8px 16px 4px;
  font-weight: 500;
}
.ats-owner-picker__empty {
  padding: 24px 16px; text-align: center;
  font-size: 12px; color: var(--fg-3); font-style: italic;
}

.ats-owner-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 14px;
  background: transparent; border: 0; cursor: pointer;
  text-align: left;
  border-radius: 0;
}
.ats-owner-row:hover { background: rgba(112, 135, 183, 0.10); }
.ats-owner-row.is-current { background: rgba(150, 177, 173, 0.12); }
.ats-owner-row__main { flex: 1; min-width: 0; }
.ats-owner-row__name {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--nl-ink); font-weight: 500;
}
.ats-owner-row__role {
  font-size: 11px; color: var(--fg-3); margin-top: 1px;
}
.ats-owner-row__tag {
  font-size: 9.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(150, 177, 173, 0.22); color: #4A6660;
}
.ats-owner-row__tag--suggested {
  background: rgba(112, 135, 183, 0.18); color: var(--nl-blue);
}
.ats-owner-row__chev {
  color: var(--fg-4); font-size: 13px;
  opacity: 0;
  transition: opacity 120ms;
}
.ats-owner-row:hover .ats-owner-row__chev { opacity: 1; }

.ats-owner-picker__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border-1);
  background: var(--bg-2);
}
.ats-owner-picker__skip {
  font-size: 11.5px; color: var(--fg-2);
  background: transparent; border: 0; cursor: pointer;
  padding: 4px 8px; border-radius: 5px;
}
.ats-owner-picker__skip:hover { background: rgba(29,49,64,0.06); color: var(--nl-ink); }
.ats-owner-picker__hint {
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-4);
}

/* ====== Job page — segmented control, subtab counts, mini-kanban, placeholders ====== */
.ats-segmented {
  display: inline-flex; align-items: stretch;
  background: rgba(29,49,64,0.05);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  padding: 2px;
  gap: 0;
}
.ats-segmented__btn {
  font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px; height: 24px;
  font-size: 12px; font-weight: 500; color: var(--fg-3);
  border: 0; border-radius: 6px;
  background: transparent; cursor: pointer;
  letter-spacing: -0.005em;
  transition: background 120ms, color 120ms;
}
.ats-segmented__btn:hover { color: var(--nl-ink); }
.ats-segmented__btn.is-active {
  background: var(--bg-1);
  color: var(--nl-ink);
  box-shadow: 0 1px 2px rgba(29,49,64,0.06);
}

.ats-subtab__count {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px; min-width: 18px; height: 16px;
  padding: 0 5px; border-radius: 999px;
  background: rgba(29,49,64,0.07); color: var(--fg-3);
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0;
}
.ats-subtab.is-active .ats-subtab__count {
  background: rgba(112,135,183,0.18);
  color: var(--nl-blue);
}

.ats-job-kanban {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 0 0 12px;
}
.ats-job-col {
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  padding: 8px;
  min-width: 0;
}
.ats-job-col__head {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--nl-ink);
  padding: 2px 4px 8px;
}
.ats-job-col__head b { font-weight: 500; }
.ats-job-col__count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px; color: var(--fg-3);
}
.ats-job-col__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ats-job-card {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 6px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 6px;
  min-width: 0;
}
.ats-job-col__more {
  font-size: 10.5px; color: var(--fg-4);
  text-align: center; padding: 4px 0;
  font-style: italic;
}
.ats-job-col__empty {
  font-size: 10.5px; color: var(--fg-4);
  text-align: center; padding: 8px 0;
  letter-spacing: 0.1em;
}

.ats-subtab-placeholder {
  margin-top: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  padding: 28px 28px 24px;
}
.ats-subtab-placeholder__head h2 {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 400;
  color: var(--nl-ink);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.ats-subtab-placeholder__head p {
  font-size: 13px; color: var(--fg-2); line-height: 1.55;
  margin: 0 0 20px;
  max-width: 640px;
}
.ats-subtab-placeholder__stats {
  display: flex; gap: 32px;
  padding: 16px 0;
  border-top: 1px solid var(--border-1);
  border-bottom: 1px solid var(--border-1);
  margin-bottom: 16px;
}
.ats-subtab-placeholder__stat { display: flex; flex-direction: column; gap: 4px; }
.ats-subtab-placeholder__k {
  font-size: 10.5px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ats-subtab-placeholder__v {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 400;
  color: var(--nl-ink);
}
.ats-subtab-placeholder__hint {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--fg-3);
  font-style: italic;
}
.ats-subtab-placeholder__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nl-blue);
}

/* ====== Reject dialog ====== */
.ats-reject-dialog {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 310;
  width: 560px;
  max-width: calc(100vw - 48px);
  max-height: min(720px, 90vh);
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(15, 25, 35, 0.22);
  display: flex; flex-direction: column;
  overflow: hidden;
  text-align: left;
  opacity: 1;
}
.ats-reject-dialog__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border-1);
  flex-shrink: 0;
}
.ats-reject-dialog__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 15px; color: var(--nl-ink); letter-spacing: -0.005em;
  line-height: 1.35;
}
.ats-reject-dialog__title b { font-weight: 500; color: var(--nl-blue); }
.ats-reject-dialog__sub {
  font-size: 11.5px; color: var(--fg-3);
  margin-top: 4px;
}
.ats-reject-dialog__body {
  padding: 16px 20px 12px;
  overflow-y: auto;
  flex: 1; min-height: 0;
}
.ats-reject-dialog__label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 500;
  margin: 14px 0 6px;
}
.ats-reject-dialog__label:first-child { margin-top: 0; }
.ats-reject-dialog__label-hint {
  font-size: 10.5px; color: var(--fg-4);
  text-transform: none; letter-spacing: 0;
  font-style: italic;
  font-weight: 400;
}
.ats-reject-reasons {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ats-reject-reason {
  font-family: inherit;
  padding: 5px 12px; border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-1);
  color: var(--fg-2);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all 120ms;
}
.ats-reject-reason:hover {
  background: rgba(29,49,64,0.05);
  color: var(--nl-ink);
}
.ats-reject-reason.is-active {
  background: rgba(112,135,183,0.14);
  border-color: rgba(112,135,183,0.4);
  color: var(--nl-blue);
}
.ats-reject-dialog__to {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: 6px;
  font-size: 12.5px; color: var(--fg-2);
}
.ats-reject-dialog__to b { color: var(--nl-ink); font-weight: 500; margin-right: 4px; }

.ats-reject-dialog__input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 13px; color: var(--nl-ink);
  outline: 0;
}
.ats-reject-dialog__input:focus { border-color: rgba(112,135,183,0.55); box-shadow: 0 0 0 3px rgba(112,135,183,0.12); }

.ats-reject-dialog__textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border-1);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12.5px; line-height: 1.55;
  color: var(--nl-ink);
  resize: vertical;
  outline: 0;
  min-height: 200px;
}
.ats-reject-dialog__textarea:focus { border-color: rgba(112,135,183,0.55); box-shadow: 0 0 0 3px rgba(112,135,183,0.12); background: var(--bg-1); }

.ats-reject-dialog__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-2);
  border-top: 1px solid var(--border-1);
  flex-shrink: 0;
}
.ats-reject-dialog__send {
  display: inline-flex; align-items: center; gap: 6px;
}

/* ====== Resume PDF viewer ====== */
.ats-notion-page__sectionhead {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 6px;
}
.ats-notion-page__sectionhead .ats-notion-page__title { margin: 0; }
.ats-notion-page__sectionhead .ats-notion-page__hint { margin: 0; font-size: 12.5px; color: var(--fg-3); }

/* Collapsible Resume — keeps the big section title and tucks the PDF
   behind a labelled toggle, so Notes / feedback sit above the fold. */
.ats-resume-section .ats-resume-section__head {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
}
.ats-resume-section__toggle {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border-1);
  border-radius: 999px;
  cursor: pointer;
  color: var(--fg-2);
  font: inherit;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.ats-resume-section__toggle:hover {
  background: rgba(29, 49, 64, 0.04);
  border-color: var(--border-2);
  color: var(--fg-1);
}
.ats-resume-section__file-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(112, 135, 183, 0.14);
  color: var(--nl-blue, #4a6bb0);
  flex: none;
}
.ats-resume-section__label {
  font-size: 12.5px; font-weight: 500;
  color: var(--fg-1);
  letter-spacing: -0.005em;
}
.ats-resume-section__chev {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  color: var(--fg-3);
  flex: none;
}
.ats-resume-section__toggle:hover .ats-resume-section__chev { color: var(--fg-1); }
.ats-resume-section__body {
  margin-top: 14px;
}

.ats-resume {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 600px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  overflow: hidden;
  margin: 8px 0 24px;
}

.ats-resume__toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  background: var(--nl-ink);
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.ats-resume__file { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.ats-resume__file-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  border-radius: 6px;
  flex: 0 0 auto;
}
.ats-resume__file-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.25; }
.ats-resume__file-meta b { font-size: 12.5px; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ats-resume__file-meta span { font-size: 11px; color: rgba(255,255,255,0.55); font-family: var(--font-mono); }

.ats-resume__pager,
.ats-resume__zoom,
.ats-resume__actions { display: flex; align-items: center; gap: 4px; }

.ats-resume__icon-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 5px;
  color: rgba(255,255,255,0.75);
  transition: background 100ms ease, color 100ms ease;
}
.ats-resume__icon-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.ats-resume__icon-btn:disabled { opacity: 0.35; cursor: default; }
.ats-resume__icon-btn:disabled:hover { background: transparent; color: rgba(255,255,255,0.75); }

.ats-resume__pageinput {
  display: inline-flex; align-items: center; gap: 0;
  padding: 0 6px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: rgba(255,255,255,0.85);
}
.ats-resume__pageinput input {
  width: 28px; padding: 3px 5px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
  color: #fff;
  text-align: center;
  font-family: inherit; font-size: inherit;
  outline: 0;
}
.ats-resume__pageinput input:focus { border-color: var(--nl-blue); }
.ats-resume__pageinput span { padding-left: 6px; color: rgba(255,255,255,0.55); }

.ats-resume__zoom-val {
  min-width: 46px; padding: 4px 8px;
  border-radius: 5px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: rgba(255,255,255,0.85);
  text-align: center;
}
.ats-resume__zoom-val:hover { background: rgba(255,255,255,0.1); color: #fff; }

.ats-resume__action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  transition: background 100ms ease, color 100ms ease;
}
.ats-resume__action:hover { background: rgba(255,255,255,0.1); color: #fff; }
.ats-resume__action--primary {
  background: var(--nl-blue);
  color: #fff;
}
.ats-resume__action--primary:hover { background: var(--nl-blue); filter: brightness(1.1); }

.ats-resume__viewport {
  flex: 1;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02) 24px),
    var(--bg-2);
  padding: 24px 0;
}
.ats-resume__pages {
  display: flex; flex-direction: column; align-items: center;
  gap: 18px;
  --rz: 1;
}

.ats-resume-page {
  width: calc(720px * var(--rz));
  min-height: calc(932px * var(--rz));
  padding: calc(56px * var(--rz)) calc(64px * var(--rz));
  background: #ffffff;
  color: #1a1f25;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.06),
    0 16px 32px -16px rgba(29, 49, 64, 0.18),
    0 4px 12px rgba(29, 49, 64, 0.10);
  font-family: "Times New Roman", Georgia, serif;
  font-size: calc(13px * var(--rz));
  line-height: 1.45;
  position: relative;
}
.ats-resume-page::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: rgba(0,0,0,0.04);
}

.ats-resume-page__head { text-align: center; margin-bottom: calc(20px * var(--rz)); }
.ats-resume-page__head h1 {
  margin: 0 0 calc(6px * var(--rz));
  font-family: "Times New Roman", Georgia, serif;
  font-size: calc(26px * var(--rz));
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0e1218;
}
.ats-resume-page__contact {
  display: inline-flex; flex-wrap: wrap; gap: 6px;
  justify-content: center;
  font-size: calc(11.5px * var(--rz));
  color: #4a5360;
  font-family: Georgia, "Times New Roman", serif;
}

.ats-resume-page__section { margin-top: calc(18px * var(--rz)); }
.ats-resume-page__section h2 {
  margin: 0 0 calc(8px * var(--rz));
  padding-bottom: calc(3px * var(--rz));
  border-bottom: 1px solid #1a1f25;
  font-family: "Times New Roman", Georgia, serif;
  font-size: calc(13px * var(--rz));
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0e1218;
}
.ats-resume-page__section p { margin: 0 0 calc(8px * var(--rz)); }
.ats-resume-page__section ul {
  margin: calc(4px * var(--rz)) 0 calc(10px * var(--rz));
  padding-left: calc(20px * var(--rz));
}
.ats-resume-page__section li { margin-bottom: calc(3px * var(--rz)); }
.ats-resume-page__skills { color: #1a1f25; }

.ats-resume-job { margin-bottom: calc(12px * var(--rz)); }
.ats-resume-job__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px;
  font-size: calc(12.5px * var(--rz));
  margin-bottom: calc(2px * var(--rz));
}
.ats-resume-job__head b { font-weight: 700; color: #0e1218; }
.ats-resume-job__head > span {
  flex: 0 0 auto;
  font-style: italic;
  color: #4a5360;
  font-size: calc(11.5px * var(--rz));
}

/* ====== My candidates screen ====== */
.ats-myc-rail {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-1);
  background: var(--bg-1);
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
}
.ats-myc-rail__head {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid var(--border-1);
}
.ats-myc-rail__name { font-size: 13.5px; font-weight: 500; color: var(--nl-ink); line-height: 1.2; }
.ats-myc-rail__role { font-size: 11.5px; color: var(--fg-3); margin-top: 1px; }

.ats-myc-rail__nav { display: flex; flex-direction: column; gap: 2px; }
.ats-myc-rail__item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 7px;
  text-align: left;
  background: transparent;
  transition: background 100ms ease, color 100ms ease;
}
.ats-myc-rail__item:hover { background: rgba(29,49,64,0.04); }
.ats-myc-rail__item.is-active { background: rgba(117,149,213,0.14); }
.ats-myc-rail__item.is-active .ats-myc-rail__label { color: var(--nl-blue); }
.ats-myc-rail__label { font-size: 13px; font-weight: 500; color: var(--nl-ink); }
.ats-myc-rail__count {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3);
  background: rgba(29,49,64,0.06);
  padding: 1px 6px; border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.ats-myc-rail__item.is-active .ats-myc-rail__count { background: rgba(117,149,213,0.22); color: var(--nl-blue); }
.ats-myc-rail__hint { grid-column: 1 / -1; font-size: 11px; color: var(--fg-4); margin-top: 1px; }

.ats-myc-rail__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-1);
  display: flex; flex-direction: column; gap: 4px;
}
.ats-myc-rail__footer .nl-eyebrow { padding: 4px 10px 4px; }
.ats-myc-rail__saved {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--fg-2);
  text-align: left;
}
.ats-myc-rail__saved:hover { background: rgba(29,49,64,0.04); color: var(--nl-ink); }
.ats-myc-rail__saved span {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-4);
}

/* Main content */
.ats-myc-main { padding: 24px 28px 64px; overflow-y: auto; }
.ats-myc-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.ats-myc-sub {
  margin: 8px 0 0;
  max-width: 640px;
  font-size: 13px;
  color: var(--fg-3);
  line-height: 1.5;
}
.ats-myc-controls { display: flex; gap: 8px; flex-shrink: 0; }

/* "My week" KPI strip */
.ats-myc-week {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 26px;
}
.ats-myc-week__cell {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.ats-myc-week__value {
  font-family: var(--font-display);
  font-size: 28px; line-height: 1;
  color: var(--nl-ink);
}
.ats-myc-week__label {
  font-size: 12px; font-weight: 500; color: var(--nl-ink);
}
.ats-myc-week__hint {
  font-size: 11.5px; color: var(--fg-3);
}

/* Bucket header */
.ats-myc-bucket {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 4px 10px;
  margin-top: 6px;
}
.ats-myc-bucket__icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: rgba(117,149,213,0.14);
  color: var(--nl-blue);
  border-radius: 7px;
  flex: 0 0 auto;
}
.ats-myc-bucket__title {
  font-family: var(--font-display);
  font-size: 17px; color: var(--nl-ink);
  letter-spacing: -0.005em;
}
.ats-myc-bucket__hint { font-size: 12px; color: var(--fg-3); margin-top: 1px; }
.ats-myc-bucket__count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3);
  background: rgba(29,49,64,0.06);
  padding: 2px 8px; border-radius: 999px;
}

/* Why-pill */
.ats-myc-why {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  font-size: 11.5px; font-weight: 500;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.ats-myc-why__dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: currentColor;
}
.ats-myc-why__detail { font-weight: 400; opacity: 0.78; }
.ats-myc-why.is-owner    { color: #3F5E45; background: rgba(150,177,173,0.20); border-color: rgba(107,142,118,0.35); }
.ats-myc-why.is-referred { color: #8A5418; background: rgba(227,165,78,0.18);  border-color: rgba(227,165,78,0.40); }
.ats-myc-why.is-panel    { color: #3A588A; background: rgba(117,149,213,0.18); border-color: rgba(117,149,213,0.40); }

/* Table */
.ats-myc-table {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  overflow: hidden;
}
.ats-myc-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ats-myc-table thead th {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3); font-weight: 500;
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border-1);
}
.ats-myc-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-1);
  vertical-align: middle;
}
.ats-myc-table tbody tr:last-child td { border-bottom: 0; }
.ats-myc-table tbody tr:hover { background: rgba(29,49,64,0.025); }

.ats-myc-row__name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ats-myc-row__title { font-size: 13px; color: var(--nl-ink); line-height: 1.2; }
.ats-myc-row__title b { font-weight: 500; }
.ats-myc-row__sub { font-size: 11.5px; color: var(--fg-3); margin-top: 2px; }

.ats-myc-row__open {
  font-size: 11.5px; color: var(--nl-blue);
  padding: 4px 8px; border-radius: 5px;
  font-weight: 500;
}
.ats-myc-row__open:hover { background: rgba(117,149,213,0.10); }

/* Empty state */
.ats-myc-empty {
  margin-top: 18px;
  padding: 24px 18px;
  border: 1px dashed var(--border-2);
  border-radius: 10px;
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: 4px;
  color: var(--fg-2);
}
.ats-myc-empty b { color: var(--nl-ink); font-size: 14px; font-weight: 500; }
.ats-myc-empty span { font-size: 12.5px; color: var(--fg-3); }

/* My-candidates board card extras */
.ats-myc-kanban-card {
  border-left: 3px solid transparent;
  padding-left: 9px;
}
.ats-myc-card-why {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; line-height: 1;
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}
.ats-myc-card-why__stripe { display: none; }
.ats-myc-card-why__label { font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 9.5px; }
.ats-myc-card-why__detail { color: var(--fg-3); font-size: 10.5px; }


/* =====================================================================
   Access control — "Viewing as..." banner, role pills, lock indicators
   ===================================================================== */
.ats-role-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 28px;
  font-size: 12px; color: #fff;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}
.ats-role-banner__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}
.ats-role-banner__role { font-weight: 600; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.08em; }
.ats-role-banner__sep { color: rgba(255,255,255,0.5); }
.ats-role-banner__name { font-weight: 500; }
.ats-role-banner__title { color: rgba(255,255,255,0.78); }
.ats-role-banner__spacer { flex: 1; }
.ats-role-banner__visibility { color: rgba(255,255,255,0.85); font-size: 11.5px; }
.ats-role-banner__visibility b { color: #fff; font-weight: 600; }

.ats-role-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  font-size: 11px; font-weight: 500;
  border-radius: 4px;
  background: rgba(29,49,64,0.06);
  border: 1px solid var(--border-1);
  color: var(--fg-2);
}
.ats-role-pill__dot { width: 6px; height: 6px; border-radius: 50%; }
.ats-role-pill[data-role="admin"]       { color: #1D3140; background: rgba(29,49,64,0.07); }
.ats-role-pill[data-role="recruiter"]   { color: #3A588A; background: rgba(117,149,213,0.15); border-color: rgba(117,149,213,0.30); }
.ats-role-pill[data-role="hm"]          { color: #7A5A24; background: rgba(227,165,78,0.15); border-color: rgba(227,165,78,0.34); }
.ats-role-pill[data-role="interviewer"] { color: #3F5E45; background: rgba(107,142,118,0.16); border-color: rgba(107,142,118,0.32); }
.ats-role-pill[data-role="external"]    { color: #6E4521; background: rgba(156,107,79,0.16); border-color: rgba(156,107,79,0.36); }

.ats-access-lock {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  font-size: 10.5px; color: var(--fg-4);
  background: rgba(29,49,64,0.04);
  border: 1px dashed var(--border-1);
  border-radius: 3px;
  letter-spacing: 0.02em;
  font-style: italic;
}

/* =====================================================================
   Editable meta-row chips (Source, Owner, Start date)
   ===================================================================== */
.ats-edit-chip__label {
  color: var(--fg-3);
  font-size: 12px;
}

.ats-edit-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 6px 2px 6px;
  border-radius: 5px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  color: inherit;
  font: inherit;
  font-size: 12px;
  transition: background 120ms ease, border-color 120ms ease;
}
.ats-edit-chip:hover {
  background: rgba(29,49,64,0.05);
  border-color: rgba(29,49,64,0.10);
}
.ats-edit-chip:focus-within {
  background: rgba(117,149,213,0.10);
  border-color: rgba(117,149,213,0.45);
  outline: 0;
}
.ats-edit-chip b { color: var(--fg-2); font-weight: 500; }
.ats-edit-chip__chev {
  color: var(--fg-4);
  flex-shrink: 0;
  transition: color 120ms ease;
}
.ats-edit-chip:hover .ats-edit-chip__chev,
.ats-edit-chip:focus-within .ats-edit-chip__chev { color: var(--fg-2); }

.ats-edit-chip-wrap { position: relative; display: inline-flex; align-items: center; gap: 4px; }

/* Inline text-input variant of an edit chip — used for typed values like Comp ask. */
.ats-edit-chip--input {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  background: rgba(117,149,213,0.08);
  border: 1px solid rgba(117,149,213,0.45);
  border-radius: 5px;
  padding: 2px 8px;
  min-width: 110px;
  outline: 0;
  transition: border-color 120ms ease, background 120ms ease;
}
.ats-edit-chip--input:focus {
  background: #fff;
  border-color: var(--nl-blue);
  box-shadow: 0 0 0 3px rgba(117,149,213,0.18);
}

/* =====================================================================
   Owner block — pulled out of the meta row so the assigned person
   reads as a primary fact, and the "Remind" action sits next to the
   name it targets (no ambiguity about who gets pinged).
   ===================================================================== */
.ats-owner-block {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 4px;
  padding: 4px 4px 4px 12px;
  border: 1px solid rgba(112, 135, 183, 0.28);
  background: rgba(112, 135, 183, 0.08);
  border-radius: 999px;
  width: fit-content;
}
.ats-owner-block__label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-3);
  font-weight: 500;
}
.ats-owner-block__chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--nl-ink);
  cursor: pointer;
  transition: background 120ms ease;
}
.ats-owner-block__chip:hover { background: rgba(255,255,255,0.7); }
.ats-owner-block__chip b { color: var(--nl-ink); font-weight: 500; }
.ats-owner-block__chip .ats-edit-chip__chev { color: var(--fg-3); }
.ats-owner-block__chip:hover .ats-edit-chip__chev { color: var(--nl-ink); }

.ats-owner-block__remind {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: var(--nl-blue);
  border: 0;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease;
}
.ats-owner-block__remind:hover { background: var(--accent-hover, #5a78b8); }
.ats-owner-block__remind:active { transform: translateY(1px); }
.ats-owner-block__remind svg { color: rgba(255,255,255,0.9); }
.ats-edit-chip.is-open {
  background: rgba(117,149,213,0.12);
  border-color: rgba(117,149,213,0.45);
}

/* Hidden native date input — anchored under chip, only opens via showPicker() */
.ats-edit-chip__hidden-date {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
  border: 0;
  padding: 0;
  margin: 0;
  left: 0;
  top: 100%;
}

/* Date dropdown menu */
.ats-edit-menu--date {
  min-width: 240px;
  padding: 10px;
}
.ats-edit-menu__date-input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--border-1);
  border-radius: 6px;
  background: var(--bg-2);
  font: inherit; font-size: 13px; color: var(--nl-ink);
  font-family: var(--font-sans);
  margin-bottom: 8px;
}
.ats-edit-menu__date-input:focus {
  outline: 0;
  border-color: var(--nl-blue);
  background: var(--bg-1);
}
.ats-edit-menu__chips {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 8px;
}
.ats-edit-menu__chip {
  font: inherit; font-size: 11.5px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-1);
  background: var(--bg-2);
  color: var(--fg-2);
  cursor: pointer;
  font-family: var(--font-sans);
}
.ats-edit-menu__chip:hover {
  background: rgba(117,149,213,0.10);
  border-color: rgba(117,149,213,0.45);
  color: var(--nl-ink);
}
.ats-edit-menu__foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 6px;
  border-top: 1px solid var(--border-1);
}
.ats-edit-menu__clear, .ats-edit-menu__done {
  font: inherit; font-size: 12px;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-sans);
}
.ats-edit-menu__clear {
  background: transparent;
  border: 0;
  color: var(--fg-3);
}
.ats-edit-menu__clear:hover { color: var(--fg-1); }
.ats-edit-menu__done {
  background: var(--nl-ink);
  border: 1px solid var(--nl-ink);
  color: #fff;
}
.ats-edit-menu__done:hover { background: #2a4a64; }

/* Anchored dropdown menu (Source) */
.ats-edit-menu {
  position: absolute;
  top: calc(100% + 4px); left: 0;
  z-index: 60;
  display: block;
  min-width: 160px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(29,49,64,0.12), 0 1px 4px rgba(29,49,64,0.06);
  padding: 4px;
  font-family: var(--font-sans);
  animation: ats-edit-pop-in 90ms ease-out;
}
@keyframes ats-edit-pop-in {
  from { transform: translateY(-3px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.ats-edit-menu__item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 6px 8px;
  background: transparent; border: 0; border-radius: 4px;
  cursor: pointer; text-align: left;
  font-size: 12.5px; color: var(--fg-2);
  font-family: var(--font-sans);
}
.ats-edit-menu__item:hover { background: rgba(29,49,64,0.05); }
.ats-edit-menu__item.is-current { color: var(--nl-ink); }
.ats-edit-menu__name { flex: 1; }
.ats-edit-menu__check { color: var(--nl-blue); flex-shrink: 0; }

.ats-edit-chip__sub {
  font-size: 10.5px; color: var(--fg-2);
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ats-edit-menu__referral {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 8px 8px 6px;
  margin-top: 4px;
  border-top: 1px solid var(--border-1);
}
.ats-edit-menu__referral-label {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-3); font-weight: 500;
}
.ats-edit-menu__referral-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border-1);
  border-radius: 5px;
  background: var(--bg-2);
  font: inherit; font-size: 12.5px; color: var(--nl-ink);
  font-family: var(--font-sans);
}
.ats-edit-menu__referral-input:focus {
  outline: 0;
  border-color: var(--nl-blue);
  background: var(--bg-1);
}

/* Locked compensation block in right rail */
.ats-rail-locked {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px;
  font-size: 11.5px; color: var(--fg-3);
  line-height: 1.45;
  background: rgba(29,49,64,0.03);
  border: 1px dashed var(--border-1);
  border-radius: 6px;
}

/* =====================================================================
   External Recruiter portal — simpler chrome
   ===================================================================== */
.ats-portal {
  display: flex; flex-direction: column;
  height: 100%; background: var(--bg-1); color: var(--fg-1);
  font-family: var(--font-sans);
}
.ats-portal__top {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 32px;
  background: var(--nl-paper);
  border-bottom: 1px solid var(--border-1);
}
.ats-portal__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 18px;
  color: var(--nl-ink); letter-spacing: -0.01em;
}
.ats-portal__brand small {
  font-family: var(--font-sans); font-size: 10.5px;
  color: var(--fg-3); letter-spacing: 0.06em; text-transform: uppercase;
  margin-left: 8px;
}
.ats-portal__crumb {
  font-size: 11.5px; color: var(--fg-3);
  display: flex; align-items: center; gap: 8px;
}
.ats-portal__crumb b { color: var(--fg-2); font-weight: 500; }
.ats-portal__top-spacer { flex: 1; }
.ats-portal__user {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--fg-2);
}
.ats-portal__user-meta { line-height: 1.25; }
.ats-portal__user-meta b { color: var(--nl-ink); font-weight: 500; }
.ats-portal__user-meta span { color: var(--fg-3); font-size: 10.5px; display: block; }

.ats-portal__hero {
  padding: 32px 32px 24px;
  background: linear-gradient(180deg, var(--nl-paper) 0%, var(--bg-1) 100%);
  border-bottom: 1px solid var(--border-1);
}
.ats-portal__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: 30px; line-height: 1.1; letter-spacing: -0.015em;
  color: var(--nl-ink); margin: 0 0 6px;
}
.ats-portal__title em { font-style: italic; color: var(--fg-3); font-weight: 400; }
.ats-portal__sub {
  font-size: 13px; color: var(--fg-3); max-width: 720px; line-height: 1.55;
}
.ats-portal__kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 22px;
}
.ats-portal__kpi {
  background: var(--bg-1); border: 1px solid var(--border-1);
  border-radius: 6px; padding: 14px 16px;
}
.ats-portal__kpi-value {
  font-family: var(--font-display); font-size: 26px; line-height: 1;
  color: var(--nl-ink); margin-bottom: 6px;
}
.ats-portal__kpi-label {
  font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 2px;
}
.ats-portal__kpi-hint { font-size: 11px; color: var(--fg-4); }

.ats-portal__main { padding: 28px 32px 60px; }
.ats-portal__section-head {
  display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px;
}
.ats-portal__section-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 400;
  color: var(--nl-ink); margin: 0;
}
.ats-portal__section-sub {
  font-size: 11.5px; color: var(--fg-3);
}
.ats-portal__section-spacer { flex: 1; }

.ats-portal__role-group {
  margin-bottom: 28px;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  overflow: hidden;
}
.ats-portal__role-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(29,49,64,0.025);
  border-bottom: 1px solid var(--border-1);
}
.ats-portal__role-title { font-size: 13px; font-weight: 500; color: var(--nl-ink); }
.ats-portal__role-dept  { font-size: 11.5px; color: var(--fg-3); }
.ats-portal__role-count {
  margin-left: auto; font-size: 11px; color: var(--fg-3);
  background: var(--bg-2); padding: 2px 8px; border-radius: 999px;
}

.ats-portal__cta {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px; border-radius: 8px;
  background: var(--nl-paper);
  border: 1px solid var(--border-1);
  margin-bottom: 22px;
}
.ats-portal__cta-text { flex: 1; font-size: 12.5px; color: var(--fg-2); line-height: 1.5; }
.ats-portal__cta-text b { color: var(--nl-ink); font-weight: 500; }

/* =====================================================================
   People & permissions screen
   ===================================================================== */
.ats-perms { padding: 28px 32px 60px; }
.ats-perms__head { margin-bottom: 24px; }
.ats-perms__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: 28px; line-height: 1.1; letter-spacing: -0.015em;
  color: var(--nl-ink); margin: 0 0 6px;
}
.ats-perms__sub {
  font-size: 13px; color: var(--fg-3); max-width: 700px; line-height: 1.55;
}

.ats-perms__section { margin-bottom: 32px; }
.ats-perms__section-head {
  display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px;
}
.ats-perms__section-title {
  font-family: var(--font-display); font-size: 17px; font-weight: 400;
  color: var(--nl-ink); margin: 0;
}
.ats-perms__section-sub { font-size: 11.5px; color: var(--fg-3); }
.ats-perms__section-spacer { flex: 1; }

.ats-perms__people {
  background: var(--bg-1);
  border: 1px solid var(--border-1); border-radius: 8px;
  overflow: hidden;
}
.ats-perms__people table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ats-perms__people thead th {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3); font-weight: 500;
  text-align: left; padding: 10px 16px;
  border-bottom: 1px solid var(--border-1);
  background: rgba(29,49,64,0.025);
}
.ats-perms__people tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-1);
  vertical-align: middle;
}
.ats-perms__people tbody tr:last-child td { border-bottom: 0; }
.ats-perms__person {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.ats-perms__person-name { font-weight: 500; color: var(--nl-ink); }
.ats-perms__person-email { font-size: 11px; color: var(--fg-3); margin-top: 1px; }

/* Permissions matrix */
.ats-perms__matrix {
  background: var(--bg-1);
  border: 1px solid var(--border-1); border-radius: 8px;
  overflow: hidden;
}
.ats-perms__matrix table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ats-perms__matrix thead th {
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--fg-3); font-weight: 500;
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--border-1);
  background: rgba(29,49,64,0.025);
}
.ats-perms__matrix thead th.is-role { text-align: center; min-width: 110px; }
.ats-perms__matrix tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-1);
  vertical-align: middle;
}
.ats-perms__matrix tbody td.is-role { text-align: center; }
.ats-perms__matrix tbody tr:last-child td { border-bottom: 0; }
.ats-perms__matrix tbody td.is-cap-name { font-weight: 500; color: var(--nl-ink); }
.ats-perms__cap-hint { font-size: 11px; color: var(--fg-4); margin-top: 2px; font-weight: 400; }

/* Scope cell */
.ats-perms__scope { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ats-perms__scope-all {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 500; color: var(--nl-ink);
}
.ats-perms__scope-all-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nl-sage, #96B1AD);
  box-shadow: 0 0 0 3px rgba(150,177,173,0.2);
}
.ats-perms__scope-agency {
  display: inline-block;
  font-size: 11.5px; font-weight: 500; color: var(--nl-ink);
  padding: 1px 7px; border-radius: 4px;
  background: rgba(180,85,61,0.08); border: 1px solid rgba(180,85,61,0.25);
}
.ats-perms__scope-note {
  font-size: 10.5px; color: var(--fg-4);
  margin-left: 6px; font-style: italic;
}
.ats-perms__scope-chips {
  display: flex; flex-wrap: wrap; gap: 3px; align-items: center;
}
.ats-perms__scope-chip {
  font-size: 10.5px; font-weight: 500;
  padding: 1px 6px; border-radius: 3px;
  background: rgba(29,49,64,0.05);
  border: 1px solid rgba(29,49,64,0.10);
  color: var(--fg-2);
  white-space: nowrap;
}
.ats-perms__scope-flags {
  display: flex; gap: 4px; margin-top: 1px;
}
.ats-perms__scope-flag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.01em;
  padding: 1px 6px 1px 5px; border-radius: 3px;
  line-height: 1.5;
}
.ats-perms__scope-flag.is-on {
  background: rgba(107,142,118,0.14);
  color: #3F5E45;
}
.ats-perms__scope-flag.is-off {
  background: rgba(29,49,64,0.04);
  color: var(--fg-4);
  border: 1px dashed rgba(29,49,64,0.18);
  padding: 0 5px 0 4px;
}

.ats-perm-cell {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
  width: 22px; height: 22px;
}
.ats-perm-cell--yes { color: #6B8E76; }
.ats-perm-cell--no  { color: #C0BFB9; }
.ats-perm-cell--partial { color: #C9923D; }
.ats-perm-cell__hint {
  font-size: 10px; color: var(--fg-4);
  margin-top: 2px; line-height: 1;
}

/* Tweaks panel — viewer chooser custom layout */
.ats-tweak-viewer-list {
  display: flex; flex-direction: column; gap: 6px;
}
.ats-tweak-viewer {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  background: rgba(29,49,64,0.03);
  border: 1px solid var(--border-1);
  cursor: pointer; text-align: left;
  transition: background 120ms ease, border-color 120ms ease;
}
.ats-tweak-viewer:hover { background: rgba(29,49,64,0.06); }
.ats-tweak-viewer.is-active {
  background: var(--nl-paper);
  border-color: var(--nl-ink);
  box-shadow: 0 0 0 1px var(--nl-ink) inset;
}
.ats-tweak-viewer__meta { flex: 1; min-width: 0; line-height: 1.25; }
.ats-tweak-viewer__name { font-size: 12.5px; font-weight: 500; color: var(--nl-ink); }
.ats-tweak-viewer__role { font-size: 10.5px; color: var(--fg-3); margin-top: 2px; }

/* ====== Share-view popover ====== */
.ats-share-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  background: var(--bg-3, #fff);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  box-shadow: 0 16px 48px -12px rgba(29, 49, 64, 0.22), 0 4px 12px -4px rgba(29, 49, 64, 0.1);
  padding: 16px;
  z-index: 50;
  animation: ats-share-pop-in 140ms ease-out;
}
@keyframes ats-share-pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ats-share-pop__head { margin-bottom: 12px; }
.ats-share-pop__title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--nl-ink);
  line-height: 1.2;
}
.ats-share-pop__sub {
  font-size: 11.5px;
  color: var(--fg-3);
  margin-top: 2px;
}
.ats-share-pop__row {
  display: flex; align-items: stretch; gap: 6px;
  margin-bottom: 14px;
}
.ats-share-pop__url {
  flex: 1; min-width: 0;
  border: 1px solid var(--border-1);
  background: rgba(29, 49, 64, 0.03);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-2);
  outline: none;
  transition: border-color .12s, background .12s;
}
.ats-share-pop__url:focus {
  border-color: var(--nl-ink);
  background: var(--bg-3, #fff);
  color: var(--fg-1);
}
.ats-share-pop__copy {
  flex-shrink: 0;
  padding: 7px 14px !important;
  font-size: 12px !important;
  transition: background .15s, color .15s;
}
.ats-share-pop__copy.is-copied {
  background: var(--success, #2D7A4F) !important;
}
.ats-share-pop__manual-hint {
  margin: -8px 0 14px;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--fg-2);
  background: rgba(180, 138, 61, 0.10);
  border: 1px solid rgba(180, 138, 61, 0.28);
  border-radius: 7px;
}
/* Match heights of Share/Save/Add candidate buttons in page header */
.ats-btn--page-action {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.ats-btn--ghost-bordered.ats-btn--page-action {
  background: var(--bg-3, #fff);
}
.ats-btn--primary.ats-btn--page-action {
  padding: 0 16px;
}

/* Save view popover — narrower than Share */
.ats-save-pop { width: 320px; }
.ats-save-pop__name {
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  color: var(--fg-1) !important;
}
.ats-save-pop__name:focus { color: var(--fg-1); }

/* Saved-view rows in sidebar */
.ats-saved-views { margin-top: 4px; }
.ats-saved-views__heading {
  padding: 8px 8px 4px;
}
.ats-saved-view-row {
  position: relative;
  padding-right: 4px;
}
.ats-saved-view-row__label {
  flex: 1; min-width: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ats-saved-view-row__input {
  flex: 1; min-width: 0;
  border: 1px solid var(--nl-ink);
  background: var(--bg-3, #fff);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 13px;
  color: var(--fg-1);
  outline: none;
}
.ats-saved-view-row__menu-wrap {
  position: relative;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .12s;
}
.ats-saved-view-row:hover .ats-saved-view-row__menu-wrap,
.ats-saved-view-row.is-active .ats-saved-view-row__menu-wrap {
  opacity: 1;
}
.ats-saved-view-row__menu-btn {
  font-size: 14px;
  line-height: 1;
}
.ats-saved-view-row__menu {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 4px;
  min-width: 180px;
  background: var(--bg-3, #fff);
  border: 1px solid var(--border-1);
  border-radius: 8px;
  box-shadow: 0 12px 32px -8px rgba(29,49,64,0.18);
  padding: 4px;
  z-index: 60;
}
.ats-saved-view-row__menu-item {
  display: block; width: 100%;
  text-align: left;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--fg-1);
  border-radius: 5px;
  transition: background .1s, color .1s;
}
.ats-saved-view-row__menu-item:hover { background: rgba(29,49,64,0.06); }
.ats-saved-view-row__menu-item--danger { color: #8B3A26; }
.ats-saved-view-row__menu-item--danger:hover { background: rgba(180, 85, 61, 0.12); }

.ats-share-pop__manual-hint kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 5px;
  margin: 0 1px;
  border-radius: 4px;
  background: var(--bg-3, #fff);
  border: 1px solid var(--border-1);
  color: var(--fg-1);
}
.ats-share-pop__section-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 6px;
}
.ats-share-pop__opts {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 14px;
}
.ats-share-pop__opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.ats-share-pop__opt:hover { background: rgba(29, 49, 64, 0.04); }
.ats-share-pop__opt.is-active {
  background: rgba(112, 135, 183, 0.10);
  border-color: rgba(112, 135, 183, 0.28);
}
.ats-share-pop__opt input[type="radio"] {
  margin: 3px 0 0 0;
  accent-color: var(--nl-ink);
  flex-shrink: 0;
}
.ats-share-pop__opt-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ats-share-pop__opt-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--nl-ink);
  letter-spacing: -0.005em;
}
.ats-share-pop__opt-sub {
  font-size: 11px;
  color: var(--fg-3);
}
.ats-share-pop__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-1);
}
.ats-share-pop__perm-label {
  font-size: 11.5px; color: var(--fg-3);
}
.ats-share-pop__perm {
  display: inline-flex;
  background: rgba(29, 49, 64, 0.05);
  border-radius: 7px;
  padding: 2px;
}
.ats-share-pop__perm-btn {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg-2);
  padding: 4px 10px;
  border-radius: 5px;
  transition: background .12s, color .12s;
}
.ats-share-pop__perm-btn:hover { color: var(--nl-ink); }
.ats-share-pop__perm-btn.is-active {
  background: var(--bg-3, #fff);
  color: var(--nl-ink);
  box-shadow: 0 1px 2px rgba(29, 49, 64, 0.08);
}

/* Candidate detail tabs */
.ats-ctab-bar {
  display: flex; gap: 0; align-items: stretch;
  padding: 0 28px; background: var(--bg-1, var(--nl-paper));
  border-bottom: 1px solid var(--border-1, rgba(29,49,64,0.1));
  flex-shrink: 0;
}
.ats-ctab {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px 11px;
  border: 0; background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg-3); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 100ms ease, border-color 100ms ease;
}
.ats-ctab:hover { color: var(--fg-1, var(--nl-ink)); }
.ats-ctab.is-active { color: var(--nl-ink); border-bottom-color: var(--nl-ink); }
.ats-ctab__count {
  font-family: var(--font-mono); font-size: 10px;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(29,49,64,0.06); color: var(--fg-3); line-height: 1.4;
}
.ats-ctab.is-active .ats-ctab__count { background: rgba(29,49,64,0.12); color: var(--nl-ink); }

/* Email tab */
.ats-email-tab { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 40px; }
.ats-email-tab__title {
  font-size: 15px; font-weight: 600; color: var(--nl-ink);
  letter-spacing: -0.01em; margin: 0;
}
.ats-email-tab__head {
  display: flex; align-items: baseline; gap: 14px;
  padding-bottom: 4px; border-bottom: 1px solid var(--border-1, rgba(29,49,64,0.1));
}
.ats-email-tab__head-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; color: var(--fg-3); font-family: var(--font-mono);
}
.ats-email-thread {
  display: flex; flex-direction: column; gap: 4px;
  border-top: 1px solid var(--border-1, rgba(29,49,64,0.1));
  border-bottom: 1px solid var(--border-1, rgba(29,49,64,0.1));
  padding: 4px 0;
}
.ats-email-msg { border-radius: 8px; transition: background 100ms ease; }
.ats-email-msg:hover { background: rgba(29,49,64,0.025); }
.ats-email-msg.is-open { background: var(--bg-2, rgba(29,49,64,0.03)); padding-bottom: 4px; }
.ats-email-msg__head {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  padding: 10px 12px; background: transparent; border: 0;
  cursor: pointer; text-align: left; font: inherit;
}
.ats-email-msg__who { flex: 1; min-width: 0; }
.ats-email-msg__line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ats-email-msg__name { font-size: 12.5px; color: var(--nl-ink); font-weight: 500; letter-spacing: -0.005em; }
.ats-email-msg__addr { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-4, #999); }
.ats-email-msg__date { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); white-space: nowrap; }
.ats-email-msg__preview { font-size: 12.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ats-email-msg__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--fg-3); margin-top: 4px; }
.ats-email-msg__meta b { color: var(--fg-2, #555); font-weight: 500; }
.ats-email-msg__body { padding: 4px 16px 12px 50px; font-size: 12.5px !important; line-height: 1.5; color: var(--fg-1, var(--nl-ink)); }
.ats-email-msg__body p { margin: 0 0 6px; white-space: pre-wrap; font-size: 12.5px !important; }
.ats-email-msg__body p:last-child { margin-bottom: 0; }

/* Activity tab */
.ats-activity-tab { display: flex; flex-direction: column; padding: 8px 0 40px; }
.ats-activity-feed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border-1, rgba(29,49,64,0.1)); }
.ats-activity-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--border-1, rgba(29,49,64,0.1));
  font-size: 13px; line-height: 1.45;
}
.ats-activity-row__actor { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-width: 140px; }
.ats-activity-row__actor b { color: var(--nl-ink); font-weight: 500; font-size: 12.5px; }
.ats-activity-row__text { flex: 1; color: var(--fg-1, var(--nl-ink)); min-width: 0; }
.ats-activity-row__text b { color: var(--nl-ink); font-weight: 500; }
.ats-activity-row__text em { font-style: italic; color: var(--fg-2, #555); }
.ats-activity-row__t { flex: 0 0 auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); white-space: nowrap; }

/* ===== External portal: Submit candidate modal ===== */
.ats-submit-scrim { position: fixed; inset: 0; background: rgba(20,30,40,0.35); display: flex; align-items: center; justify-content: center; z-index: 300; }
.ats-submit { background: var(--bg-1); border-radius: 14px; width: 680px; max-width: 95vw; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.18); display: flex; flex-direction: column; }
.ats-submit__head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 24px 12px; border-bottom: 1px solid var(--border-1); }
.ats-submit__eyebrow { font-size: 11px; color: var(--fg-3); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 4px; }
.ats-submit__title { font-size: 18px; font-weight: 600; color: var(--nl-ink); margin: 0; }
.ats-submit__body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.ats-submit__drop { border: 2px dashed var(--border-1); border-radius: 12px; padding: 28px; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.ats-submit__drop:hover { border-color: var(--fg-3); background: rgba(29,49,64,0.02); }
.ats-submit__drop.is-filled { border-style: solid; border-color: var(--nl-sage-dark, #3F5E45); background: rgba(63,94,69,0.04); }
.ats-submit__drop-icon { margin-bottom: 8px; color: var(--fg-3); }
.ats-submit__drop-icon--ok { color: var(--nl-sage-dark, #3F5E45); font-size: 28px; }
.ats-submit__drop-title { font-size: 14px; font-weight: 500; color: var(--nl-ink); }
.ats-submit__drop-sub { font-size: 12px; color: var(--fg-3); margin-top: 4px; }
.ats-submit__drop-hint { font-size: 11px; color: var(--fg-4); margin-top: 8px; font-style: italic; }
.ats-submit__divider { display: flex; align-items: center; gap: 12px; color: var(--fg-4); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.ats-submit__divider::before, .ats-submit__divider::after { content: ""; flex: 1; height: 1px; background: var(--border-1); }
.ats-submit__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ats-submit__field { display: flex; flex-direction: column; gap: 4px; }
.ats-submit__field.is-full { grid-column: 1 / -1; }
.ats-submit__field.is-missing .ats-submit__input,
.ats-submit__field.is-missing .ats-submit__textarea { border-color: #B4553D; }
.ats-submit__field-label { font-size: 12px; font-weight: 500; color: var(--fg-2); display: flex; align-items: baseline; gap: 4px; }
.ats-submit__req { color: #B4553D; }
.ats-submit__opt { font-size: 10px; color: var(--fg-4); font-weight: 400; }
.ats-submit__field-hint { font-size: 11px; color: var(--fg-4); font-style: italic; }
.ats-submit__input, .ats-submit__textarea {
  border: 1px solid var(--border-1); border-radius: 6px; padding: 8px 10px;
  font-size: 13px; background: #fff; outline: none; transition: border-color 0.15s;
}
.ats-submit__input:focus, .ats-submit__textarea:focus { border-color: var(--nl-ink); }
.ats-submit__textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.ats-submit__seg { display: flex; border: 1px solid var(--border-1); border-radius: 6px; overflow: hidden; background: #fff; }
.ats-submit__seg-btn { flex: 1; text-align: center; padding: 9px 4px; font-size: 12px; cursor: pointer; border-right: 1px solid var(--border-1); transition: background 0.1s; color: var(--fg-2); background: #fff; }
.ats-submit__seg-btn:last-child { border-right: none; }
.ats-submit__seg-btn:hover { background: rgba(29,49,64,0.04); }
.ats-submit__seg-btn.is-active { background: var(--nl-ink); color: #fff; font-weight: 500; }
.ats-submit__foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border-1); }
.ats-submit__foot-meta { flex: 1; display: flex; align-items: center; gap: 10px; }
.ats-submit__chip { font-size: 12px; color: var(--fg-2); background: rgba(29,49,64,0.06); padding: 4px 10px; border-radius: 4px; }
.ats-submit__chip--empty { color: var(--fg-4); }
.ats-submit__warn { font-size: 11px; color: #B4553D; }
