
/* ===== External recruiter portal ===== */
.ats-portal {
  min-height: 100%;
  background: var(--bg-1);
  display: flex; flex-direction: column;
}
.ats-portal__top {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 32px; border-bottom: 1px solid var(--border-1);
  background: var(--bg-2);
}
.ats-portal__brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 500; font-size: 16px;
  color: var(--nl-ink);
}
.ats-portal__brand small {
  font-family: var(--font-sans); font-weight: 400; font-size: 11.5px;
  color: var(--fg-3); margin-left: 8px; padding-left: 10px;
  border-left: 1px solid var(--border-1);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.ats-portal__crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--fg-3);
  padding: 6px 12px; background: rgba(150,177,173,0.18);
  border: 1px solid rgba(107,142,118,0.25);
  border-radius: 999px;
}
.ats-portal__crumb b { color: var(--nl-ink); font-weight: 500; }
.ats-portal__top-spacer { flex: 1; }
.ats-portal__user {
  display: flex; align-items: center; gap: 10px;
}
.ats-portal__user-meta { line-height: 1.2; }
.ats-portal__user-meta b { display: block; font-size: 12.5px; font-weight: 500; color: var(--nl-ink); }
.ats-portal__user-meta span { font-size: 11px; color: var(--fg-3); }

.ats-portal__hero {
  padding: 36px 60px 24px;
  border-bottom: 1px solid var(--border-1);
  background:
    radial-gradient(circle at 90% 0%, rgba(117,149,213,0.10), transparent 60%),
    var(--bg-1);
}
.ats-portal__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 36px; line-height: 1.1; color: var(--nl-ink);
  margin: 0 0 10px; max-width: 640px;
}
.ats-portal__sub {
  font-size: 13.5px; color: var(--fg-2); line-height: 1.55;
  max-width: 640px; margin: 0 0 22px;
}
.ats-portal__sub em { font-style: italic; color: var(--nl-ink); }
.ats-portal__kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; max-width: 820px;
}
.ats-portal__kpi {
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: 10px; padding: 14px 16px;
}
.ats-portal__kpi-value {
  font-family: var(--font-display); font-weight: 500;
  font-size: 28px; line-height: 1; color: var(--nl-ink);
}
.ats-portal__kpi-label {
  font-size: 12px; font-weight: 500; color: var(--fg-1); margin-top: 6px;
}
.ats-portal__kpi-hint {
  font-size: 10.5px; color: var(--fg-3); margin-top: 2px;
}

.ats-portal__main {
  flex: 1; padding: 28px 60px 60px; max-width: 1280px; width: 100%;
  margin: 0 auto;
}
.ats-portal__cta {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; margin-bottom: 28px;
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: 12px;
}
.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; }

.ats-portal__section-head {
  display: flex; align-items: baseline; gap: 12px;
  margin: 8px 0 14px;
}
.ats-portal__section-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 18px; 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: 26px; }
.ats-portal__role-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 10px 4px 8px;
}
.ats-portal__role-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 16px; color: var(--nl-ink);
}
.ats-portal__role-dept {
  font-size: 11.5px; color: var(--fg-3); margin-top: 2px;
}
.ats-portal__role-count {
  font-size: 11px; color: var(--fg-3);
  font-family: var(--font-mono);
}

/* ===== Permissions screen ===== */
.ats-perms {
  padding: 28px 32px 60px; max-width: 1180px; margin: 0 auto;
}
.ats-perms__head { margin-bottom: 22px; }
.ats-perms__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 28px; line-height: 1.15; color: var(--nl-ink); margin: 0 0 8px;
}
.ats-perms__sub {
  font-size: 13px; color: var(--fg-2); line-height: 1.5; margin: 0;
  max-width: 640px;
}

.ats-perms__section { margin-top: 28px; }
.ats-perms__section-head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px;
}
.ats-perms__section-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 16px; 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, .ats-perms__matrix {
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  overflow: hidden;
}
.ats-perms__people table, .ats-perms__matrix table {
  width: 100%; border-collapse: collapse;
}
.ats-perms__people th, .ats-perms__matrix th {
  text-align: left;
  font-size: 10.5px; font-weight: 500;
  color: var(--fg-3); letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 14px; background: rgba(29,49,64,0.025);
  border-bottom: 1px solid var(--border-1);
}
.ats-perms__people td, .ats-perms__matrix td {
  padding: 12px 14px;
  border-top: 1px solid var(--border-1);
  font-size: 12.5px; color: var(--fg-2); vertical-align: top;
}
.ats-perms__people tbody tr:hover { background: rgba(29,49,64,0.025); }

.ats-perms__person { display: flex; align-items: center; gap: 10px; }
.ats-perms__person-name { font-size: 13px; font-weight: 500; color: var(--nl-ink); }
.ats-perms__person-email { font-size: 11px; color: var(--fg-3); margin-top: 1px; }

.ats-perms__matrix th.is-role,
.ats-perms__matrix td.is-role { text-align: center; width: 130px; }
.ats-perms__matrix td.is-cap-name {
  font-size: 13px; color: var(--nl-ink); font-weight: 500;
  width: 280px;
}
.ats-perms__cap-hint {
  font-size: 11px; color: var(--fg-3); font-weight: 400; margin-top: 2px;
}
.ats-perm-cell {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
}
.ats-perm-cell--yes { background: rgba(107,142,118,0.18); color: #3F5E45; }
.ats-perm-cell--no  { background: rgba(29,49,64,0.04); color: var(--fg-4); }
.ats-perm-cell--partial { background: rgba(227,165,78,0.18); color: #8C5C20; }
.ats-perm-cell__hint {
  font-size: 10px; color: var(--fg-3); margin-top: 4px;
  font-family: var(--font-sans);
}

.ats-role-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
  background: rgba(29,49,64,0.05); color: var(--fg-1);
  border: 1px solid var(--border-1);
}
.ats-role-pill__dot { width: 7px; height: 7px; border-radius: 50%; }
.ats-role-pill[data-role="admin"]    { background: rgba(180,85,61,0.10); border-color: rgba(180,85,61,0.25); }
.ats-role-pill[data-role="external"] { background: rgba(227,165,78,0.12); border-color: rgba(227,165,78,0.30); }

.ats-portal__date-cell { line-height: 1.2; }
.ats-portal__date { display: block; font-size: 12.5px; color: var(--nl-ink); font-weight: 500; }
.ats-portal__date-sub { display: block; font-size: 10.5px; color: var(--fg-3); font-family: var(--font-mono); margin-top: 2px; }

/* ===== Submit candidate modal ===== */
.ats-submit-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 30, 40, 0.40);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  animation: ats-scrim-in 160ms ease;
}
.ats-submit {
  width: 100%; max-width: 720px; max-height: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(15,25,35,0.30);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: ats-submit-in 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes ats-submit-in {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.ats-submit__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 20px 24px 14px;
  border-bottom: 1px solid var(--border-1);
}
.ats-submit__eyebrow {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3); font-weight: 500; margin-bottom: 4px;
}
.ats-submit__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; color: var(--nl-ink); margin: 0;
}

.ats-submit__body {
  flex: 1; min-height: 0; overflow: auto;
  padding: 22px 24px 8px;
}

/* Resume drop zone */
.ats-submit__drop {
  border: 2px dashed rgba(29,49,64,0.18);
  border-radius: 12px;
  padding: 28px 20px;
  background:
    radial-gradient(circle at 80% 20%, rgba(117,149,213,0.06), transparent 60%),
    rgba(29,49,64,0.015);
  text-align: center; cursor: pointer;
  transition: all 140ms ease;
}
.ats-submit__drop:hover {
  border-color: var(--nl-blue);
  background: rgba(117,149,213,0.06);
}
.ats-submit__drop.is-filled {
  border-style: solid; border-color: rgba(107,142,118,0.5);
  background: rgba(107,142,118,0.08); cursor: default;
}
.ats-submit__drop-icon {
  width: 56px; height: 56px; margin: 0 auto 10px;
  border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--border-1);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-2);
}
.ats-submit__drop-icon--ok {
  background: rgba(107,142,118,0.18);
  border-color: rgba(107,142,118,0.5);
  color: #3F5E45; font-size: 24px;
}
.ats-submit__drop-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 17px; color: var(--nl-ink); margin-bottom: 4px;
}
.ats-submit__drop-sub { font-size: 12px; color: var(--fg-3); }
.ats-submit__drop-hint {
  font-size: 11.5px; color: var(--fg-3);
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed rgba(29,49,64,0.10);
  max-width: 380px; margin-left: auto; margin-right: auto;
  font-style: italic;
}
.ats-submit__drop.is-filled .ats-btn { margin-top: 10px; }

.ats-submit__divider {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 0 12px;
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3); font-weight: 500;
}
.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;
  font-size: 12px;
}
.ats-submit__field.is-full { grid-column: 1 / -1; }
.ats-submit__field-label {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--nl-ink);
}
.ats-submit__req { color: var(--nl-rust); font-weight: 500; }
.ats-submit__opt { color: var(--fg-4); font-size: 10.5px; font-weight: 400; }
.ats-submit__field-hint {
  font-size: 11px; color: var(--fg-3); margin-top: 2px;
  font-style: italic;
}
.ats-submit__field.is-missing .ats-submit__input,
.ats-submit__field.is-missing .ats-submit__textarea,
.ats-submit__field.is-missing .ats-submit__seg {
  border-color: rgba(180,85,61,0.5);
  background: rgba(180,85,61,0.04);
}

.ats-submit__input,
.ats-submit__textarea {
  width: 100%; padding: 9px 12px;
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: 8px; font: inherit; font-size: 13px;
  color: var(--nl-ink);
  outline: none; transition: border-color 100ms ease;
}
.ats-submit__textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.ats-submit__input:focus,
.ats-submit__textarea:focus {
  border-color: var(--nl-blue);
  box-shadow: 0 0 0 3px rgba(117,149,213,0.16);
}

.ats-submit__seg {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 4px; background: rgba(29,49,64,0.04);
  border: 1px solid var(--border-1); border-radius: 10px;
}
.ats-submit__seg-btn {
  flex: 1; min-width: max-content;
  padding: 7px 12px;
  background: transparent; border: 1px solid transparent;
  border-radius: 7px; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--fg-2);
  transition: all 120ms ease;
}
.ats-submit__seg-btn:hover { background: rgba(255,255,255,0.5); color: var(--nl-ink); }
.ats-submit__seg-btn.is-active {
  background: var(--bg-1); border-color: var(--nl-ink);
  color: var(--nl-ink); font-weight: 500;
  box-shadow: 0 1px 2px rgba(15,25,35,0.06);
}

.ats-submit__foot {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--border-1);
  background: var(--bg-2);
}
.ats-submit__foot-meta {
  flex: 1; display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--fg-3);
}
.ats-submit__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(107,142,118,0.14); color: #3F5E45;
  font-family: var(--font-mono); font-size: 10.5px;
}
.ats-submit__chip--empty { background: rgba(29,49,64,0.05); color: var(--fg-4); }
.ats-submit__warn {
  font-size: 11.5px; color: var(--nl-rust);
}

/* ===== Send reminder button (in the row) ===== */
.ats-ping-btn {
  background: rgba(29,49,64,0.04);
  border: 1px solid rgba(29,49,64,0.18);
  color: var(--nl-ink);
}
.ats-ping-btn:hover {
  background: rgba(29,49,64,0.10);
  border-color: rgba(29,49,64,0.38);
}

/* ===== Ping DRI modal ===== */
.ats-ping {
  width: 100%; max-width: 600px; max-height: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(15,25,35,0.30);
  display: flex; flex-direction: column; overflow: hidden;
  animation: ats-submit-in 200ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ats-ping__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-1);
  background:
    radial-gradient(circle at 0% 0%, rgba(74,21,75,0.05), transparent 60%),
    var(--bg-2);
}
.ats-ping__head-left { display: flex; align-items: center; gap: 12px; }
.ats-ping__slack-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--nl-ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.ats-ping__eyebrow {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3); font-weight: 500; margin-bottom: 2px;
}
.ats-ping__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: 18px; color: var(--nl-ink); margin: 0;
}

.ats-ping__body {
  padding: 18px 22px 8px;
  overflow: auto;
}

.ats-ping__field { margin-bottom: 14px; }
.ats-ping__field > label {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 11px; font-weight: 500; color: var(--nl-ink);
  margin-bottom: 6px;
}
.ats-ping__optional {
  font-size: 10.5px; color: var(--fg-4); font-weight: 400;
}

/* Recipient picker */
.ats-ping__recipient-row { position: relative; }
.ats-ping__recipient {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: 10px; cursor: pointer;
  font: inherit; text-align: left;
}
.ats-ping__recipient:hover { background: var(--bg-3); }
.ats-ping__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10.5px; font-weight: 500;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.ats-ping__recipient-name {
  font-size: 13.5px; font-weight: 500; color: var(--nl-ink);
}
.ats-ping__recipient-role {
  font-size: 11px; color: var(--fg-3); margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
}
.ats-ping__dri-badge {
  display: inline-flex; padding: 2px 7px;
  background: rgba(107,142,118,0.18); color: #3F5E45;
  border-radius: 999px; font-size: 9.5px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.ats-ping__caret {
  margin-left: auto; color: var(--fg-3); font-size: 11px;
}

.ats-ping__picker {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: 10px; box-shadow: var(--shadow-md);
  padding: 6px; z-index: 10;
}
.ats-ping__picker-head {
  font-size: 10.5px; color: var(--fg-3);
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 6px 8px 4px;
}
.ats-ping__picker-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 6px 8px; border-radius: 7px;
  background: transparent; border: 0; cursor: pointer;
  font: inherit; text-align: left;
}
.ats-ping__picker-row:hover { background: rgba(29,49,64,0.04); }
.ats-ping__picker-row.is-active { background: rgba(117,149,213,0.10); }
.ats-ping__picker-name { font-size: 12.5px; color: var(--nl-ink); font-weight: 500; }
.ats-ping__picker-role { font-size: 11px; color: var(--fg-3); margin-left: auto; }
.ats-ping__dri-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6B8E76; margin-left: 6px;
}

/* Context card */
.ats-ping__context-card {
  border: 1px solid var(--border-1);
  border-radius: 10px;
  background: var(--bg-2);
}
.ats-ping__context-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-1);
}
.ats-ping__context-name {
  font-size: 13px; font-weight: 500; color: var(--nl-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ats-ping__context-sub {
  font-size: 11px; color: var(--fg-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ats-ping__context-sub b { color: var(--fg-2); font-weight: 500; }
.ats-ping__context-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px;
  font-size: 11px; color: var(--fg-3);
}
.ats-ping__context-toggle {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none;
  font-size: 11px; color: var(--fg-2);
}
.ats-ping__context-toggle input { margin: 0; cursor: pointer; }

/* Templates */
.ats-ping__templates {
  display: flex; flex-direction: column; gap: 6px;
}
.ats-ping__template {
  text-align: left;
  padding: 9px 12px;
  background: rgba(117,149,213,0.06);
  border: 1px solid rgba(117,149,213,0.20);
  border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--fg-2);
  line-height: 1.45;
  transition: all 100ms ease;
}
.ats-ping__template:hover {
  background: rgba(117,149,213,0.14);
  border-color: rgba(117,149,213,0.45);
  color: var(--nl-ink);
}

/* Composer */
.ats-ping__composer {
  width: 100%; padding: 12px 14px;
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: 10px 10px 0 0;
  border-bottom: 0;
  font: inherit; font-size: 13.5px; color: var(--nl-ink);
  outline: none; resize: vertical;
  line-height: 1.5;
  display: block;
}
.ats-ping__composer:focus {
  border-color: var(--nl-blue);
  box-shadow: 0 0 0 3px rgba(117,149,213,0.16);
}
.ats-ping__composer-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px;
  background: var(--bg-2);
  border: 1px solid var(--border-1);
  border-top: 0;
  border-radius: 0 0 10px 10px;
}
.ats-ping__composer-toolbar { display: flex; gap: 2px; }
.ats-ping__tool-btn {
  width: 24px; height: 24px;
  background: transparent; border: 0; border-radius: 5px;
  cursor: pointer; color: var(--fg-3);
  font: inherit; font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
}
.ats-ping__tool-btn:hover { background: rgba(29,49,64,0.06); color: var(--nl-ink); }
.ats-ping__char-count {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--fg-4);
}

/* Footer */
.ats-ping__foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border-top: 1px solid var(--border-1);
  background: var(--bg-2);
}
.ats-ping__foot-meta {
  flex: 1; font-size: 11px; color: var(--fg-3);
}
.ats-ping__foot-meta b { color: var(--fg-2); font-weight: 500; }
.ats-btn.is-disabled { opacity: 0.5; pointer-events: none; }

/* Sent confirmation */
.ats-ping__sent {
  padding: 50px 22px 60px; text-align: center;
}
.ats-ping__sent-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(107,142,118,0.20); color: #3F5E45;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.ats-ping__sent h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 20px; color: var(--nl-ink); margin: 0 0 8px;
}
.ats-ping__sent p {
  font-size: 13px; color: var(--fg-2); margin: 0 auto;
  max-width: 380px; line-height: 1.5;
}
.ats-ping__sent p b { color: var(--nl-ink); font-weight: 500; }
