/* SourceHub — Direction A visual system.
 * Trustworthy SaaS: deep navy + electric blue, Inter UI, JetBrains Mono for numerics,
 * 10px radii, filter sidebar, candidate list rows with tech-icon pills and masked avatars.
 */

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --ink: #0b1e36;
  --ink2: #3a4a5e;
  --ink3: #6b7a8c;
  --line: #e3e8ef;
  --line2: #eef2f6;
  --blue: #0a5cff;
  --blue-weak: #e6efff;
  --blue-ink: #003abf;
  --green: #10793f;
  --green-weak: #e3f3ea;
  --amber: #9b6b00;
  --amber-weak: #fdf1d8;
  --danger: #b42318;
  --danger-weak: #fdecea;
  --pink: #b91458;
  --pink-weak: #fde8f2;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --shadow-sm: 0 0 0 1px rgba(10, 30, 54, 0.04);
  --shadow-md: 0 4px 14px rgba(10, 30, 54, 0.08), 0 0 0 1px rgba(10, 30, 54, 0.04);
  --shadow-lg: 0 20px 60px rgba(10, 30, 54, 0.25);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
p { margin: 0 0 .5rem; }

.hidden { display: none !important; }
.muted  { color: var(--ink3); }
.mono   { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }

.view { min-height: 100vh; }

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: -0.1px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
  font-size: 13px;
  padding: 8px 14px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-ink); }
.btn-dark    { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #152b47; }
.btn-ghost   { background: transparent; color: var(--ink2); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink3); color: var(--ink); }
.btn-subtle  { background: var(--line2); color: var(--ink); }
.btn-danger  { background: #fff; color: var(--danger); border-color: var(--line); }

/* ─────────── Forms ─────────── */
input[type="text"], input[type="email"], input[type="number"], input[type="search"],
select, textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%236b7a8c' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak); }

label { font-size: 13px; color: var(--ink2); font-weight: 500; display: block; margin-bottom: 6px; }

/* ─────────── Login ─────────── */
#login {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  min-height: 100vh;
  background: linear-gradient(180deg, #edf2f8 0%, var(--bg) 100%);
}
/* Lang-toggle pinned to the top-right of the login viewport. Same
   button markup as the topbar copy; styles inherited from .lang-toggle. */
.login-lang-toggle {
  position: absolute;
  top: 20px; right: 20px;
}
.login-card {
  background: var(--panel);
  padding: 2.25rem 2rem 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 420px;
}
.login-brand {
  display: flex; flex-direction: column; align-items: flex-start;
  margin-bottom: 1.5rem;
}
/* Full SourceHub wordmark (network-S + "SourceHub by Sysarmy"). The
   SVG is ~3:1 wide; sizing by height keeps the aspect ratio. */
.brand-logo {
  height: 56px;
  width: auto;
  display: block;
}
.brand-logo-sm {
  height: 50px;
}
.divider {
  position: relative; text-align: center;
  margin: 1rem 0;
  color: var(--ink3);
  font-size: 11px;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.divider::before, .divider::after { content: ""; position: absolute; top: 50%; width: calc(50% - 1.25rem); height: 1px; background: var(--line); }
.divider::before { left: 0; }
.divider::after  { right: 0; }
.divider span { background: var(--panel); padding: 0 8px; position: relative; z-index: 1; }
.status { margin-top: .75rem; font-size: 13px; color: var(--ink3); min-height: 1.2em; }
.status.error   { color: var(--danger); }
.status.success { color: var(--green); }

/* ─────────── Top bar ─────────── */
.topbar {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 20px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.topnav { display: flex; gap: 4px; margin-left: 12px; }
.topnav-item {
  padding: 0 12px; font-size: 13px; font-weight: 500;
  color: var(--ink3);
  height: 71px;
  display: flex; align-items: center;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.topnav-item.active { color: var(--ink); border-bottom-color: var(--blue); }

.topbar-spacer { flex: 1; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  height: 28px;
}
.lang-toggle button {
  padding: 0 10px;
  border: none;
  font-family: var(--mono);
  font-size: 11px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--ink2);
  background: #fff;
  cursor: pointer;
}
.lang-toggle button.active { background: var(--ink); color: #fff; }

.credits-widget {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.credits-chip {
  width: 18px; height: 18px;
  background: var(--blue-weak); color: var(--blue-ink);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.credits-widget .count {
  font-family: var(--mono);
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.credits-widget .label { font-size: 12px; color: var(--ink3); }
.credits-widget.low .count { color: var(--danger); }

.topbar-avatar {
  width: 32px; height: 32px;
  border-radius: 16px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.topbar-logout {
  background: none; border: none; color: var(--ink3);
  font-size: 12px; cursor: pointer; padding: 4px 8px;
}
.topbar-logout:hover { color: var(--ink); }

/* ─────────── Layout ─────────── */
.layout {
  display: flex;
  min-height: calc(100vh - 56px);
}
.sidebar {
  width: 264px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 20px 20px 40px;
  overflow-y: auto;
  flex-shrink: 0;
  position: sticky; top: 56px;
  align-self: flex-start;
  max-height: calc(100vh - 56px);
}
.sidebar-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.sidebar-head h3 { font-size: 14px; font-weight: 700; letter-spacing: -0.2px; margin: 0; }
.sidebar-clear {
  background: none; border: none; color: var(--blue);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: var(--font);
}

.facet-group { margin-bottom: 18px; }
.facet-group-title {
  font-size: 11px; font-weight: 600;
  color: var(--ink2);
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.facet-group-title .total {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink3);
}
.facet-hint { font-size: 11px; color: var(--ink3); margin: -4px 0 8px; line-height: 1.35; }
.facet-empty { padding: 4px 0; }

/* ── "Thinking…" banner ───────────────────────────────────────────────── */
#thinking-banner:not([hidden]) {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 300;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: white;
  font-size: 13px; font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  animation: thinking-fade-in 180ms ease-out;
}
@keyframes thinking-fade-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.thinking-spinner {
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: thinking-spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes thinking-spin { to { transform: rotate(360deg); } }

/* ── Avatar w/ pending-onboarding badge ───────────────────────────────── */
.topbar-avatar-btn {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.topbar-avatar-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 50%; }
.avatar-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 11px; font-weight: 700; line-height: 16px;
  text-align: center;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  pointer-events: none;
}
.topbar-avatar-btn[aria-haspopup-message]:hover::after {
  content: attr(aria-haspopup-message);
  position: absolute;
  top: calc(100% + 6px); right: 0;
  background: var(--ink);
  color: white;
  font-size: 12px; font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  box-shadow: var(--shadow-md);
}

/* ── Onboarding wizard ────────────────────────────────────────────────── */

/* `:not([hidden])` matters: without it, `display: grid` would beat the
   user-agent's `[hidden] { display: none }` on equal specificity, and
   the modal would never hide when we set `root.hidden = true`. */
.wizard-overlay:not([hidden]) {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: start center;
  background: rgba(20, 24, 33, 0.55);
  padding: 5vh 4vw;
  overflow-y: auto;
}
.wizard-card {
  background: white;
  border-radius: 14px;
  width: 100%;
  max-width: 720px;
  padding: 28px 32px 24px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
}
.wizard-card h2 { margin: 0 0 6px; font-size: 22px; }
.wizard-card > p.muted { margin: 0 0 22px; }
.wizard-card fieldset {
  border: none; padding: 0; margin: 0 0 22px;
}
.wizard-card legend {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink2); margin-bottom: 10px;
  padding: 0;
}
.wizard-hint { font-size: 12px; color: var(--ink3); margin: -4px 0 10px; }
.wizard-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
.wizard-full { display: block; margin-bottom: 12px; }
.wizard-card label > span { display: block; font-size: 12px; color: var(--ink2); margin-bottom: 4px; }
.wizard-card input[type="text"] {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: white; color: var(--ink);
  font: inherit;
}
.wizard-card input[type="text"]:hover { border-color: #c2cad6; }
.wizard-card input[type="text"]:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.wizard-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.wizard-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  background: white;
}
.wizard-pill:hover { background: var(--line2); }
.wizard-pill input { margin: 0; cursor: pointer; }
.wizard-pill .pill-count { color: var(--ink3); margin-left: auto; font-size: 12px; }
.wizard-pill.checked { border-color: var(--blue); background: var(--blue-weak); }
.wizard-actions {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 18px;
}
.wizard-actions .link {
  background: transparent; border: none; color: var(--ink2);
  font-size: 13px; cursor: pointer; padding: 6px 8px;
}
.wizard-actions .link:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 600px) {
  .wizard-card { padding: 18px 16px 16px; }
  .wizard-row { grid-template-columns: 1fr; }
  .wizard-grid { grid-template-columns: 1fr 1fr; }
}
.facet-clear {
  background: none;
  border: none;
  padding: 0;
  color: var(--blue);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: 0;
  text-transform: none;
}
.facet-clear:hover { text-decoration: underline; }

.sort-toggle {
  display: inline-flex;
  gap: 2px;
  letter-spacing: 0;
  text-transform: none;
}
.sort-toggle button {
  background: transparent;
  border: none;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink3);
  cursor: pointer;
  border-radius: 4px;
  letter-spacing: .3px;
  line-height: 1.2;
}
.sort-toggle button:hover:not(.active) {
  color: var(--ink);
  background: var(--line2);
}
.sort-toggle button.active {
  background: var(--ink);
  color: #fff;
}

.facet {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink2);
}
.facet input { display: none; }
.facet-box {
  width: 14px; height: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  position: relative;
  transition: all .12s;
}
.facet-box::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><path d='M3 7l3 3 5-6' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/10px no-repeat;
  opacity: 0;
}
.facet input:checked + .facet-box { background: var(--blue); border-color: var(--blue); }
.facet input:checked + .facet-box::after { opacity: 1; }
.facet-label { flex: 1; color: var(--ink2); font-weight: 400; }
.facet input:checked ~ .facet-label { color: var(--ink); font-weight: 500; }
.facet-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
}
.facet-more {
  font-size: 12px; color: var(--blue);
  font-weight: 500; cursor: pointer;
  margin-top: 4px;
}

.facet-inline-input {
  margin-top: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.facet-inline-input label {
  font-size: 12px;
  color: var(--ink3);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.facet-inline-input input {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

/* Nested province sub-list under a country facet */
.facet-subgroup {
  margin: 2px 0 6px 22px;
  padding-left: 10px;
  border-left: 2px solid var(--line2);
  display: none;
}
.facet-subgroup.expanded { display: block; }
.facet-subgroup.dimmed {
  opacity: .5;
}
.facet-subgroup.dimmed .facet-sub { cursor: not-allowed; }
.facet.facet-sub {
  padding: 3px 0;
  font-size: 12px;
  color: var(--ink2);
}
.facet.facet-sub .facet-box { width: 12px; height: 12px; }
.facet.facet-sub .facet-label { font-weight: 400; color: var(--ink2); }
.facet.facet-sub input:checked ~ .facet-label { color: var(--ink); }

.facet-chevron {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  margin-right: 2px;
  background: transparent; border: none; padding: 0;
  color: var(--ink3);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .12s ease, color .12s ease;
}
.facet-chevron:hover { color: var(--ink); }
.facet-chevron.expanded { transform: rotate(90deg); }

.sidebar-actions {
  margin-top: 16px;
  display: flex; flex-direction: column; gap: 8px;
}

/* ─────────── Main content ─────────── */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  min-width: 0;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.dashboard-title h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.dashboard-title p { margin: 0; font-size: 13px; }

.dashboard-metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.metric-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: #fff;
  cursor: pointer;
  min-width: 170px;
  text-align: left;
  font-family: var(--font);
  transition: transform .1s ease, box-shadow .1s ease, border-color .1s ease;
}
.metric-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.metric-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.metric-body { display: flex; flex-direction: column; gap: 2px; }
.metric-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.metric-count {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}

.metric-pink {
  background: var(--pink-weak);
  border-color: #fad2e0;
}
.metric-pink .metric-icon { background: #fccad9; color: var(--pink); }
.metric-pink .metric-label, .metric-pink .metric-count { color: var(--pink); }

.metric-amber {
  background: var(--amber-weak);
  border-color: #f5e1ad;
}
.metric-amber .metric-icon { background: #f6d68a; color: var(--amber); }
.metric-amber .metric-label, .metric-amber .metric-count { color: var(--amber); }

.metric-green {
  background: var(--green-weak);
  border-color: #bfe5cc;
}
.metric-green .metric-icon { background: #b6e3c4; color: var(--green); }
.metric-green .metric-label, .metric-green .metric-count { color: var(--green); }

.searchbar {
  display: flex; gap: 12px; margin-bottom: 20px; align-items: center;
}
.searchbar .search-wrap {
  flex: 1; position: relative;
}
.searchbar .search-wrap svg {
  position: absolute; top: 13px; left: 12px;
}
.searchbar input { padding-left: 34px; }

.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 30;
  padding: 4px 0;
  max-height: 340px;
  overflow-y: auto;
}
.suggestion {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 14px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink);
}
.suggestion:hover, .suggestion:focus { background: var(--line2); outline: none; }
.suggestion .sug-kind {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 600;
  width: 72px;
  flex-shrink: 0;
}
.suggestion .sug-label { flex: 1; font-weight: 500; }
.suggestion .sug-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink3);
  font-variant-numeric: tabular-nums;
}

.bulk-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background .15s ease, border-color .15s ease;
}
.bulk-bar.active { background: var(--blue-weak); border-color: var(--blue); }
.bulk-left { display: flex; align-items: center; gap: 12px; }
.bulk-right { display: flex; align-items: center; gap: 8px; }
.bulk-divider { width: 1px; height: 16px; background: var(--line); }
.bulk-count { font-size: 13px; color: var(--ink); font-weight: 600; }
.bulk-count .n { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.bulk-clear {
  background: transparent; border: none; padding: 0;
  font-size: 12px; color: var(--ink3); cursor: pointer;
  font-family: var(--font); text-decoration: underline;
}
/* Gmail-style "select all N matching" link inside the bulk bar.
   Appears only when every loaded row is selected AND more rows exist
   beyond what's loaded. Click expands selection to the full result
   set via fetchAllMatchingIds. */
.bulk-link {
  background: transparent; border: none; padding: 0;
  font-size: 12px; color: var(--blue); cursor: pointer;
  font-family: var(--font); font-weight: 600;
  text-decoration: underline;
}
.bulk-link:hover { color: var(--ink); }
.bulk-link[disabled] { opacity: .6; cursor: progress; }
.bulk-hint { font-size: 12px; color: var(--ink3); }
.bulk-preview { font-size: 12px; color: var(--ink3); }
.bulk-preview .new { color: var(--ink); font-weight: 600; font-family: var(--mono); }

.results-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap; gap: 12px;
}
.results-summary .count {
  font-family: var(--mono);
  font-size: 22px; font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.results-summary .label { font-size: 14px; color: var(--ink3); margin-left: 8px; }
.results-summary .chips {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-left: 12px; vertical-align: middle;
}
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 4px 3px 10px;
  background: var(--blue-weak);
  color: var(--blue-ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
.filter-chip .chip-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--blue-ink);
  border-radius: 50%;
  cursor: pointer;
}
.filter-chip .chip-close:hover { background: rgba(0, 58, 191, 0.15); }

.chip-connector {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--ink3);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .6px;
  cursor: pointer;
  line-height: 1.2;
}
.chip-connector:hover { color: var(--ink); border-color: var(--ink3); }
.chip-connector[data-op="and"] {
  background: var(--ink);
  color: #fff;
  border-style: solid;
  border-color: var(--ink);
}

.chip-separator {
  color: var(--ink3);
  font-weight: 700;
  font-size: 14px;
  padding: 0 2px;
  user-select: none;
}
.results-extra {
  font-size: 12px; color: var(--ink3);
  margin: 0 0 16px;
}

.sort-wrap { display: flex; align-items: center; gap: 10px; }
.sort-wrap label { margin: 0; font-size: 12px; color: var(--ink3); }
.sort-wrap select { width: auto; height: 32px; padding: 0 30px 0 10px; font-size: 12px; }

/* ─────────── Check primitive ─────────── */
.check {
  width: 16px; height: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: var(--radius-xs);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all .12s;
  position: relative;
}
.check.checked {
  background: var(--blue);
  border-color: var(--blue);
}
.check.checked::after {
  content: "";
  width: 10px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M2 5.2l2 2L8 3' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}

/* ─────────── Candidate cards (list rows) ─────────── */
.cards { display: flex; flex-direction: column; gap: 10px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color .12s, box-shadow .12s;
}
.card:hover { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak); }
.card.selected { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak); }
.card.revealed-mark {
  background: #fefce8;               /* amarillo patito claro */
  border-color: #facc15;
}
.card.revealed-mark:hover {
  border-color: #ca8a04;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, .25);
}
.card.revealed-mark.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-weak);
}
.card.revealed-mark .tech-pill { background: #fff; }

.card-contact {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  margin-top: 2px;
  font-size: 12px;
}
.card-contact a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 500;
}
.card-contact a:hover { color: var(--blue); text-decoration: underline; }
.card-contact .ci {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border-radius: 4px;
  background: #fff;
  color: var(--ink2);
  font-size: 10px; font-weight: 700;
  border: 1px solid var(--line);
}

.card-check { padding-top: 4px; }

.avatar {
  flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  letter-spacing: -0.5px;
  font-family: var(--font);
}
.avatar.masked {
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.avatar.revealed {
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  color: #fff;
}

.card-body { flex: 1; min-width: 0; }
.card-headline {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 6px;
}
.card-headline-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.2px;
  text-transform: capitalize;
}
.redact {
  display: inline-block; vertical-align: middle;
  background: linear-gradient(90deg, var(--ink) 0%, #1b2f4a 100%);
  border-radius: var(--radius-sm);
  opacity: .88;
}
.card-id {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink3);
  letter-spacing: 0;
}
.card-role {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: capitalize;
}
.card-company {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--ink2);
  font-weight: 500;
}
.card-company.clickable { cursor: pointer; border-radius: 6px; padding: 2px 6px; margin-left: -6px; transition: background .1s, color .1s; }
.card-company.clickable:hover { background: var(--blue-weak); color: var(--blue-ink); }
.card-company.clickable:hover .company-name { color: var(--blue-ink); }
.company-logo {
  width: 18px; height: 18px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--line);
  object-fit: contain;
  flex-shrink: 0;
}
.company-name { color: var(--ink); }
.card-meta {
  font-size: 12px; color: var(--ink3);
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.card-meta .sep { color: var(--line); }
.card-meta .eng-label {
  font-size: 10px; color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 600;
  margin-right: 4px;
}
.card-meta .edition {
  font-family: var(--mono); font-size: 10px; color: var(--ink3);
}

.tech-row { display: flex; gap: 5px; flex-wrap: wrap; }

.tech-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 4px;
  font-size: 12px; font-weight: 500;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.2;
  white-space: nowrap;
}
.tech-pill.xs { font-size: 11px; padding: 2px 7px 2px 3px; }
.tech-pill.clickable { cursor: pointer; transition: border-color .1s, background .1s, color .1s; }
.tech-pill.clickable:hover {
  border-color: var(--blue);
  background: var(--blue-weak);
  color: var(--blue-ink);
}

.tech-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font);
  font-weight: 700;
  font-size: 8px;
  letter-spacing: -0.3px;
  line-height: 1;
}
.tech-icon.lg { width: 20px; height: 20px; font-size: 10px; border-radius: 5px; }

.tech-icon-img {
  width: 16px; height: 16px;
  flex-shrink: 0;
  display: inline-block;
  object-fit: contain;
}
.tech-icon-img.lg { width: 20px; height: 20px; }

.card-right {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 8px; flex-shrink: 0;
}

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  font-size: 12px; font-weight: 500;
  border-radius: var(--radius);
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill.xs { padding: 2px 7px; font-size: 11px; }
.pill.neutral { background: #f1f5f9; color: var(--ink2); }
.pill.blue    { background: var(--blue-weak); color: var(--blue-ink); }
.pill.green   { background: var(--green-weak); color: var(--green); }
.pill.amber   { background: var(--amber-weak); color: var(--amber); }
.pill.danger  { background: var(--danger-weak); color: var(--danger); }
.pill.pink    { background: var(--pink-weak);   color: var(--pink); }

.english-pill strong { font-weight: 700; }
.english-pill { padding: 3px 10px; gap: 5px; }
.pill.outline { background: transparent; color: var(--ink2); border-color: var(--line); }

.card-actions {
  display: flex; gap: 6px; margin-top: 2px;
}

/* ─────────── Pagination ─────────── */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
}
.pagination button {
  padding: 6px 10px; min-width: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink2);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--mono);
}
.pagination button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .ellipsis { color: var(--ink3); padding: 0 4px; }

/* ─────────── Profile detail view ─────────── */
#profile-view { display: none; }
#profile-view.active { display: block; }
#list-view.hidden-by-profile { display: none; }

.breadcrumb {
  padding: 14px 32px;
  font-size: 12px;
  color: var(--ink3);
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb .back { cursor: pointer; color: var(--ink3); }
.breadcrumb .back:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb .current { color: var(--ink); font-family: var(--mono); }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 0 32px 40px;
  max-width: 1360px;
  margin: 0 auto;
}

.profile-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.profile-section h2 {
  font-size: 13px; font-weight: 700;
  color: var(--ink2);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.profile-section-side {
  padding: 20px;
  margin-bottom: 12px;
}
.profile-section-side h3 {
  font-size: 11px; font-weight: 700;
  color: var(--ink2);
  letter-spacing: .6px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hero-head {
  display: flex; gap: 20px; align-items: flex-start;
}
.hero-body { flex: 1; min-width: 0; }
.hero-name-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.hero-name {
  font-size: 22px; font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.4px;
  margin: 0;
}
.hero-role {
  font-size: 15px; color: var(--ink);
  margin-bottom: 10px;
  font-weight: 500;
  text-transform: capitalize;
}
.hero-meta {
  display: flex; gap: 12px;
  font-size: 13px; color: var(--ink2);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.hero-meta .sep { color: var(--line); }
.hero-meta .edition { font-family: var(--mono); font-size: 11px; }

.hero-right {
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end;
}
.reveal-cost-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink3);
  margin-top: 2px;
}

.contact-grid {
  font-size: 13px; color: var(--ink); line-height: 1.7;
}
.contact-grid a { color: var(--blue); text-decoration: none; word-break: break-all; }
.contact-grid a:hover { text-decoration: underline; }
.contact-row { margin-bottom: 4px; }
.contact-row .k { color: var(--ink3); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; font-weight: 600; display: block; }

.contact-masked {
  display: flex; flex-direction: column; gap: 6px;
}

.attended-block {
  background: var(--blue-weak);
  border: 1px solid var(--blue-weak);
  padding: 16px;
  border-radius: var(--radius);
}
.attended-block .attended-title {
  font-size: 11px; font-weight: 700;
  color: var(--blue-ink);
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.attended-pills { display: flex; gap: 6px; flex-wrap: wrap; }

/* ─── CTA stack (revealed profile side column) ─── */
.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.cta-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .1s ease, box-shadow .1s ease, filter .1s ease;
}
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(10, 30, 54, 0.12); }
.cta-btn:active { transform: translateY(0); }
.cta-btn svg { flex-shrink: 0; }

.cta-reveal    { background: var(--blue); color: #fff; }
.cta-reveal:hover { background: var(--blue-ink); }
.cta-reveal:disabled { opacity: .6; cursor: not-allowed; }

.cta-report {
  background: transparent;
  border: none;
  color: var(--ink3);
  font-size: 12px;
  padding: 8px 0 0;
  cursor: pointer;
  text-decoration: underline;
  text-align: center;
  font-family: var(--font);
}
.cta-report:hover { color: var(--danger); }

.cta-linkedin  { background: #0a66c2; color: #fff; }
.cta-github    { background: #24292e; color: #fff; }
.cta-twitter   { background: #000;     color: #fff; }
.cta-instagram { background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); color: #fff; }
.cta-tiktok    { background: #000;     color: #fff; }
.cta-email     { background: #fff; color: var(--ink); border-color: var(--ink); }
.cta-project   { background: #fff; color: var(--ink); border-color: var(--line); }

.cta-email:hover   { background: var(--ink); color: #fff; }
.cta-project:hover { background: var(--line2); }

.reveal-cost-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink3);
  text-align: center;
  margin-top: 4px;
  letter-spacing: .3px;
}

/* Collapsible <details> section in the profile main column */
.profile-section .collapsible-section {
  margin: 0;
}
.profile-section .collapsible-section summary {
  font-size: 13px; font-weight: 700;
  color: var(--ink2);
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0;
}
.profile-section .collapsible-section summary::-webkit-details-marker { display: none; }
.profile-section .collapsible-section summary::after {
  content: "";
  width: 10px; height: 10px;
  flex-shrink: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M3.5 2l3 3-3 3' stroke='%236b7a8c' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center;
  transition: transform .12s ease;
}
.profile-section .collapsible-section[open] summary::after {
  transform: rotate(90deg);
}
.profile-section .collapsible-section[open] summary {
  margin-bottom: 12px;
}

.highlight-list {
  list-style: none; padding: 0; margin: 0;
}
.highlight-list li {
  display: flex; gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line2);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}
.highlight-list li:first-child { border-top: none; }
.highlight-list li .bullet {
  color: var(--blue); font-weight: 700; flex-shrink: 0;
}

.tech-all, .tracks-all, .vibing-all {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tech-all.tech-all-wide {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line2);
}

.social-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.social-row.hero { margin-top: 12px; }
.social-row.compact { gap: 4px; margin-left: 4px; }

.social-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--line2);
  color: var(--ink3);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1;
  cursor: default;
}
.social-chip .social-label { font-size: 11px; }
.social-chip.revealed {
  background: #fff;
  border-color: var(--line);
  cursor: pointer;
}
.social-chip.revealed:hover { box-shadow: 0 0 0 3px rgba(10, 92, 255, 0.08); }

.social-chip.compact {
  width: 22px; height: 22px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  gap: 0;
}
.social-chip.compact svg { width: 12px; height: 12px; }

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
}
.profile-info-grid .k {
  font-size: 11px; color: var(--ink3);
  text-transform: uppercase; letter-spacing: .4px; font-weight: 600;
  margin-bottom: 2px;
}
.profile-info-grid .info-clickable {
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 6px;
  margin: -2px -6px;
  transition: background .12s ease, color .12s ease;
}
.profile-info-grid .info-clickable:hover { background: var(--blue-weak); }
.profile-info-grid .info-clickable:hover .v { color: var(--blue-ink); }
.profile-info-grid .v {
  font-size: 14px; color: var(--ink); font-weight: 500;
  text-transform: capitalize;
}

/* ─────────── Modal ─────────── */
.modal-root {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(11, 30, 54, .5);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.modal {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-close {
  position: absolute;
  top: 8px; right: 12px;
  background: transparent; border: none;
  font-size: 22px; color: var(--ink3);
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--ink); }
.modal-head { padding: 24px 24px 0; display: flex; gap: 16px; align-items: flex-start; }
.modal-head-body { flex: 1; }
.modal-head h2 {
  font-size: 18px; font-weight: 700; letter-spacing: -0.3px; margin: 0;
}
.modal-head p { font-size: 13px; color: var(--ink3); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.modal-body p { font-size: 13px; line-height: 1.6; color: var(--ink2); padding: 16px 24px 0; margin: 0; }
.modal-foot {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 20px 24px; margin-top: 8px;
  background: var(--line2);
  border-top: 1px solid var(--line);
}
.modal-balance { font-size: 12px; color: var(--ink2); }
.modal-balance .label { color: var(--ink3); }
.modal-balance .num { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--ink); }
.modal-balance .arrow { color: var(--ink3); margin: 0 4px; }

/* Flag form modal (wider) */
.modal.wide { max-width: 520px; }

/* Candidate profile modal */
.modal.xl {
  max-width: 1040px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  padding: 0;
}
.modal.xl .modal-close { top: 12px; right: 16px; z-index: 2; }
.modal.xl .modal-share {
  position: absolute;
  top: 16px; right: 48px;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 10px;
  font-family: var(--font); font-size: 11px; font-weight: 600;
  color: var(--ink2);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.modal.xl .modal-share:hover { border-color: var(--ink3); color: var(--ink); }
.modal.xl .profile-grid {
  padding: 28px;
  grid-template-columns: 1fr 300px;
  max-width: none;
}
.modal.xl .profile-section { padding: 20px; margin-bottom: 12px; }
.modal.xl .profile-section-side { padding: 16px; margin-bottom: 10px; }
.modal.xl .hero-name { font-size: 20px; }
@media (max-width: 960px) {
  .modal.xl { max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .modal.xl .profile-grid { grid-template-columns: 1fr; padding: 16px; }
}
.flag-form { padding: 24px; }
.flag-form h2 { margin-top: 0; margin-bottom: 18px; font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.flag-form label { margin-top: 12px; font-weight: 500; color: var(--ink); font-size: 13px; }
.flag-form label select, .flag-form label textarea { margin-top: 6px; }
.flag-form .flag-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.empty, .loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink3);
  font-size: 14px;
}
.load-more-sentinel {
  text-align: center;
  padding: 24px 0;
  color: var(--ink3);
  font-size: 13px;
  font-family: var(--mono);
}
.load-more-end {
  text-align: center;
  padding: 24px 0 12px;
  color: var(--ink3);
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ─── Admin onboarding form ─── */
.admin-form { margin-top: 16px; display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.admin-row { display: flex; flex-direction: column; gap: 4px; }
.admin-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-row label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.admin-row label > span {
  font-size: 12px; font-weight: 600; color: var(--ink2);
  letter-spacing: .3px; text-transform: none;
}
.admin-row input, .admin-row select { height: 38px; }
.admin-row input[type="file"] {
  height: auto; padding: 8px;
  font-size: 13px;
}
.admin-actions { margin-top: 6px; }
.admin-hint {
  margin: 0;
  padding: 8px 12px;
  background: var(--blue-weak);
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  color: var(--ink);
}
.admin-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: #fff;
}
.admin-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.admin-card-title {
  font-size: 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.admin-card-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink3);
  display: flex; flex-wrap: wrap;
}
.admin-card-actions {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}

/* Padded wrap for admin modals (Crear team, Invitar reclutador, etc.).
   The candidate-detail modal handles its own paddings; admin modals are
   short forms that drop directly into #modal-body, so they need a
   container that pushes content off the rounded corners. */
.modal-admin {
  padding: 24px 28px 22px;
}
.modal-admin h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 0 0 6px;
}
.modal-admin > p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 12px;
  color: var(--ink2);
}
.modal-admin .admin-form { margin-top: 14px; }
.modal-admin .admin-result { margin-top: 14px; }

/* Skeleton placeholders shown while teams / users panels are first
   loading. Cached re-entries skip these. */
.admin-card-skeleton {
  pointer-events: none;
}
.admin-card-skeleton .skel-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--line2) 0%, var(--line) 50%, var(--line2) 100%);
  background-size: 200% 100%;
  animation: admin-skel 1.4s ease-in-out infinite;
  margin-bottom: 6px;
}
.admin-card-skeleton .skel-line:last-child { margin-bottom: 0; }
.admin-card-skeleton .skel-line.small { height: 10px; }
.admin-card-skeleton .skel-line.w-30 { width: 30%; }
.admin-card-skeleton .skel-line.w-60 { width: 60%; }
@keyframes admin-skel {
  0%   { background-position: 0% 0%; }
  100% { background-position: -200% 0%; }
}
.admin-result {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.admin-result.ok   { background: var(--green-weak); color: var(--green); border: 1px solid var(--green-weak); }
.admin-result.err  { background: var(--danger-weak); color: var(--danger); border: 1px solid var(--danger-weak); }

/* ─────────── Projects view ─────────── */
.projects-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}
.projects-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px;
}
.projects-header h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.4px; margin: 0 0 4px; }
.projects-header p { margin: 0; font-size: 14px; }
.projects-section { margin-bottom: 36px; }
.projects-section h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; margin: 0 0 2px; }
.projects-section p.small { margin: 0 0 16px; font-size: 13px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.project-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s, transform .12s;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 140px;
}
.project-card:hover { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-weak); transform: translateY(-1px); }
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-card-name { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.2px; line-height: 1.3; }
.project-card-flag {
  flex-shrink: 0; font-size: 22px; line-height: 1;
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--line2);
}
.project-card-desc { font-size: 13px; color: var(--ink2); line-height: 1.4; flex: 1;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.project-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid var(--line2);
  font-size: 12px; color: var(--ink3);
}
.project-card-foot .count { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; font-size: 13px; }

/* Project banner (shown above the card list in project detail) */
.project-banner {
  background: var(--blue-weak);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
}
.project-banner-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.project-banner .trail {
  font-size: 12px; color: var(--blue-ink); font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px; cursor: pointer;
  display: inline-block; margin-bottom: 4px;
}
.project-banner .trail:hover { text-decoration: underline; }
.project-banner h2 {
  margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.2px; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.project-banner .type-pill {
  font-size: 11px; font-family: var(--mono); font-weight: 600;
  background: #fff; color: var(--blue-ink); border: 1px solid var(--blue); border-radius: 999px;
  padding: 2px 9px; text-transform: uppercase; letter-spacing: .3px;
}

/* Save-to-project dropdown (inside modal / bulk bar) */
.save-to-project {
  position: relative; display: inline-block;
}
.save-menu {
  position: absolute; bottom: calc(100% + 4px); right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 240px; padding: 6px 0;
  z-index: 30;
}
.save-menu button {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none;
  padding: 8px 14px; font-family: var(--font); font-size: 13px; color: var(--ink);
  cursor: pointer;
}
.save-menu button:hover { background: var(--line2); }
.save-menu .empty-note { padding: 10px 14px; font-size: 12px; color: var(--ink3); }
.save-menu .new { color: var(--blue); border-top: 1px solid var(--line); }

/* Toast */
.toast {
  position: fixed; top: 80px; right: 24px;
  background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: slideIn .2s ease;
}
.toast.success { background: var(--green); }
.toast.error   { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Responsive */
@media (max-width: 960px) {
  .sidebar { width: 100%; position: static; border-right: none; border-bottom: 1px solid var(--line); max-height: none; }
  .layout { flex-direction: column; }
  .topbar { padding: 0 12px; gap: 10px; flex-wrap: wrap; height: auto; min-height: 56px; }
  .topnav { order: 10; width: 100%; margin: 0; border-top: 1px solid var(--line); }
  .topnav-item { height: 44px; }
  .profile-grid { grid-template-columns: 1fr; padding: 0 16px 40px; }
  .main { padding: 16px; }
}
