/* ═══════════════════════════════════════════════════════════════════
   Job Applicant module — top-level list, detail, GD scheduling
   Namespaced .ja-* ; reuses rq-page / rq-topbar / fui-badge patterns
   ═══════════════════════════════════════════════════════════════════ */

/* ── Stage badge (custom hues beyond the 5 subtle badge colors) ── */
.ja-stage {
  display: inline-flex; align-items: center; gap: 6px;
  height: 20px; padding: 0 8px; border-radius: 5px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.ja-stage .ja-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.ja-stage.hue-slate   { background: var(--surface-gray-2);   color: var(--ink-gray-6); }
.ja-stage.hue-slate   .ja-dot { background: #7C7C7C; }
.ja-stage.hue-blue    { background: var(--surface-blue-2);   color: var(--ink-blue-3); }
.ja-stage.hue-blue    .ja-dot { background: #0289F7; }
.ja-stage.hue-violet  { background: var(--surface-violet-1); color: #5A38D6; }
.ja-stage.hue-violet  .ja-dot { background: #6846E3; }
.ja-stage.hue-cyan    { background: var(--surface-cyan-1);   color: #0C7A99; }
.ja-stage.hue-cyan    .ja-dot { background: #0E99C2; }
.ja-stage.hue-amber   { background: var(--surface-amber-2);  color: var(--ink-amber-3); }
.ja-stage.hue-amber   .ja-dot { background: #DB7706; }
.ja-stage.hue-green   { background: var(--surface-green-2);  color: var(--ink-green-3); }
.ja-stage.hue-green   .ja-dot { background: #46B37E; }
.ja-stage.hue-emerald { background: var(--surface-green-2);  color: #16794C; }
.ja-stage.hue-emerald .ja-dot { background: #278F5E; }
.ja-stage.hue-red     { background: var(--surface-red-2);    color: var(--ink-red-4); }
.ja-stage.hue-red     .ja-dot { background: #CC2929; }
.ja-stage.sm { height: 18px; padding: 0 6px; font-size: 11px; }

/* ── Summary stat band ── */
.ja-stat-band {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
  background: var(--outline-gray-2, #E2E2E2);
  border: 1px solid var(--outline-gray-2, #E2E2E2); border-radius: 10px;
  overflow: hidden; margin-bottom: 16px;
}
.ja-stat {
  background: var(--surface-white); padding: 11px 12px; min-height: 62px;
  display: flex; flex-direction: column; gap: 5px; cursor: pointer;
  align-items: flex-start; text-align: left;
  transition: background .12s ease;
}
.ja-stat:hover { background: var(--surface-gray-1); }
.ja-stat.is-active { background: var(--surface-gray-1); box-shadow: inset 0 -2px 0 var(--ink-gray-9); }
.ja-stat-n { font-size: 20px; font-weight: 600; color: var(--ink-gray-9); line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ja-stat-l { font-size: 11px; color: var(--ink-gray-5); display: flex; align-items: center; gap: 5px; line-height: 1.25; }
.ja-stat-l .ja-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
@media (max-width: 900px) {
  .ja-stat-band { grid-template-columns: repeat(4, 1fr); }
}

/* ── Filter row ── */
/* Top-right selection chrome (replaces floating bulk bar) */
.ja-selcount { font-size: 12.5px; font-weight: 600; color: var(--ink-gray-8); margin-right: 2px; }
.ja-topact {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--outline-gray-2, #E2E2E2);
  background: var(--surface-white); color: var(--ink-gray-6); cursor: pointer;
}
.ja-topact:hover { background: var(--surface-gray-2); color: var(--ink-gray-9); }
.ja-topact-div { width: 1px; height: 22px; background: var(--outline-gray-2, #E2E2E2); margin: 0 2px; }

.ja-filters { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ja-filters .rq-search { min-width: 240px; }
.ja-filter-spacer { flex: 1; }

/* ── Applicant table ── */
.ja-list {
  border: 1px solid var(--outline-gray-2, #E2E2E2); border-radius: 10px;
  overflow: hidden; background: var(--surface-white);
}
.ja-grid {
  display: grid;
  grid-template-columns: 34px minmax(200px,2.2fr) minmax(150px,1.4fr) 150px 110px 96px 96px 120px 72px;
  align-items: center;
}
.ja-head {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-gray-5); background: var(--surface-gray-1);
  border-bottom: 1px solid var(--outline-gray-2, #E2E2E2);
}
.ja-head > span { padding: 9px 10px; }
.ja-row {
  border-bottom: 1px solid var(--surface-gray-2); cursor: pointer;
  transition: background .1s ease;
}
.ja-row:last-child { border-bottom: none; }
.ja-row:hover { background: var(--surface-blue-1); }
.ja-row.is-selected { background: var(--surface-blue-2); }
.ja-row > span { padding: 10px; min-width: 0; }
.ja-cb { display: flex; align-items: center; justify-content: center; }

.ja-cand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ja-cand-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ja-cand-name { font-size: 13.5px; font-weight: 500; color: var(--ink-gray-9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-cand-sub  { font-size: 11.5px; color: var(--ink-gray-5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-cand-kind {
  font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 4px; margin-left: 2px;
}
.ja-cand-kind.is-campus  { background: var(--surface-violet-1); color: #5A38D6; }
.ja-cand-kind.is-lateral { background: var(--surface-gray-2); color: var(--ink-gray-6); }

.ja-open { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ja-open-title { font-size: 12.5px; color: var(--ink-gray-8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-open-id { font-size: 11px; color: var(--ink-gray-4); font-variant-numeric: tabular-nums; }

.ja-src { font-size: 12.5px; color: var(--ink-gray-6); }
.ja-applied { font-size: 12px; color: var(--ink-gray-5); font-variant-numeric: tabular-nums; }
.ja-owner { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-gray-6); }

/* rating stars */
.ja-rating { display: inline-flex; align-items: center; gap: 1px; color: var(--ink-amber-2); }
.ja-rating .ja-star { width: 12px; height: 12px; }
.ja-rating .ja-star.is-empty { color: var(--ink-gray-2); }

.ja-rowactions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.ja-sched-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
  border: 1px solid var(--outline-gray-2, #E2E2E2); border-radius: 6px;
  background: var(--surface-white); color: var(--ink-gray-8);
  font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: all .12s ease;
}
.ja-sched-btn:hover { background: var(--ink-gray-9); color: var(--ink-white); border-color: var(--ink-gray-9); }
.ja-sched-btn.is-gd:hover { background: #0C7A99; border-color: #0C7A99; }

.ja-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 48px; color: var(--ink-gray-4); text-align: center;
}

/* ── Bulk action bar ── */
.ja-bulkbar {
  position: sticky; bottom: 16px; z-index: 5; margin: 14px auto 0; width: fit-content;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px;
  background: var(--ink-gray-9); color: var(--ink-white); border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.28);
}
.ja-bulkbar-count { font-size: 13px; font-weight: 600; margin-right: 4px; }
.ja-bulkbar-count span { font-weight: 420; color: var(--ink-gray-3); }
.ja-bulkbar-div { width: 1px; height: 20px; background: rgba(255,255,255,.16); }
.ja-bulk-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 7px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06);
  color: var(--ink-white); font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .12s ease;
}
.ja-bulk-btn:hover { background: rgba(255,255,255,.16); }
.ja-bulk-btn.is-primary { background: var(--surface-white); color: var(--ink-gray-9); border-color: var(--surface-white); }
.ja-bulk-btn.is-gd { background: #0E99C2; border-color: #0E99C2; }
.ja-bulk-btn.is-gd:hover { background: #0C86AB; }
.ja-bulk-x { background: none; border: none; color: var(--ink-gray-3); cursor: pointer; display: flex; padding: 4px; }
.ja-bulk-x:hover { color: var(--ink-white); }

/* ═══════════ APPLICANT DETAIL ═══════════ */
.ja-detail { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .ja-detail { grid-template-columns: 1fr; } }

.ja-hero {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; border: 1px solid var(--outline-gray-2, #E2E2E2);
  border-radius: 12px; background: var(--surface-white); margin-bottom: 16px;
}
.ja-hero-id { font-size: 12px; color: var(--ink-gray-4); font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.ja-hero-name { font-size: 22px; font-weight: 600; color: var(--ink-gray-9); letter-spacing: -0.01em; line-height: 1.1; }
.ja-hero-sub { font-size: 13px; color: var(--ink-gray-6); margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ja-hero-sep { color: var(--ink-gray-3); }
.ja-hero-tags { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ja-hero-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

.ja-card {
  border: 1px solid var(--outline-gray-2, #E2E2E2); border-radius: 12px;
  background: var(--surface-white); margin-bottom: 16px; overflow: hidden;
}
.ja-card-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--surface-gray-2); font-size: 13px; font-weight: 600; color: var(--ink-gray-8);
}
.ja-card-head .ja-card-count { margin-left: auto; font-size: 12px; font-weight: 420; color: var(--ink-gray-5); }
.ja-card-body { padding: 16px; }

/* stage progress rail */
.ja-progress { display: flex; align-items: center; gap: 0; padding: 4px 0; }
.ja-progress-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative; }
.ja-progress-step:not(:last-child)::after {
  content: ''; position: absolute; top: 11px; left: 50%; width: 100%; height: 2px;
  background: var(--surface-gray-3); z-index: 0;
}
.ja-progress-step.is-done:not(:last-child)::after { background: var(--ink-green-2); }
.ja-progress-dot {
  width: 24px; height: 24px; border-radius: 50%; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-gray-2); color: var(--ink-gray-4);
  border: 2px solid var(--surface-white); box-shadow: 0 0 0 1px var(--surface-gray-3);
}
.ja-progress-step.is-done .ja-progress-dot { background: var(--ink-green-2); color: #fff; box-shadow: 0 0 0 1px var(--ink-green-2); }
.ja-progress-step.is-current .ja-progress-dot { background: var(--ink-gray-9); color: #fff; box-shadow: 0 0 0 1px var(--ink-gray-9); }
.ja-progress-step.is-rejected .ja-progress-dot { background: var(--ink-red-4); color: #fff; box-shadow: 0 0 0 1px var(--ink-red-4); }
.ja-progress-lbl { font-size: 10.5px; color: var(--ink-gray-5); text-align: center; max-width: 72px; }
.ja-progress-step.is-current .ja-progress-lbl { color: var(--ink-gray-9); font-weight: 600; }

/* facts grid */
.ja-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.ja-fact { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ja-fact-k { font-size: 11px; color: var(--ink-gray-5); text-transform: uppercase; letter-spacing: 0.03em; }
.ja-fact-v { font-size: 13.5px; color: var(--ink-gray-8); }
.ja-fact-v.is-link { color: var(--ink-blue-3); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }

/* timeline */
.ja-timeline { display: flex; flex-direction: column; }
.ja-tl-row { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.ja-tl-row:not(:last-child)::before {
  content: ''; position: absolute; left: 12px; top: 26px; bottom: 0; width: 1.5px; background: var(--surface-gray-3);
}
.ja-tl-icon {
  width: 24px; height: 24px; border-radius: 50%; flex: none; z-index: 1;
  display: flex; align-items: center; justify-content: center;
}
.ja-tl-icon.tone-gray  { background: var(--surface-gray-2);  color: var(--ink-gray-6); }
.ja-tl-icon.tone-blue  { background: var(--surface-blue-2);  color: var(--ink-blue-3); }
.ja-tl-icon.tone-green { background: var(--surface-green-2); color: var(--ink-green-3); }
.ja-tl-icon.tone-red   { background: var(--surface-red-2);   color: var(--ink-red-4); }
.ja-tl-icon.tone-amber { background: var(--surface-amber-2); color: var(--ink-amber-3); }
.ja-tl-meta { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.ja-tl-label { font-size: 13px; color: var(--ink-gray-8); line-height: 1.35; }
.ja-tl-sub { font-size: 11.5px; color: var(--ink-gray-5); }

/* side rail */
.ja-side-card {
  border: 1px solid var(--outline-gray-2, #E2E2E2); border-radius: 12px;
  background: var(--surface-white); padding: 16px; margin-bottom: 16px;
}
.ja-side-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-gray-5); margin-bottom: 12px; }
.ja-side-fact { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--surface-gray-2); font-size: 12.5px; }
.ja-side-fact:last-child { border-bottom: none; }
.ja-side-fact span { color: var(--ink-gray-5); }
.ja-side-fact strong { color: var(--ink-gray-8); font-weight: 500; text-align: right; }
.ja-resume {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 8px;
  border: 1px solid var(--outline-gray-2, #E2E2E2); background: var(--surface-gray-1); cursor: pointer;
}
.ja-resume:hover { background: var(--surface-gray-2); }
.ja-resume-ic { width: 32px; height: 40px; border-radius: 4px; background: var(--surface-red-2); color: var(--ink-red-4); display: flex; align-items: center; justify-content: center; flex: none; }
.ja-resume-meta { min-width: 0; }
.ja-resume-name { font-size: 12.5px; font-weight: 500; color: var(--ink-gray-8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ja-resume-sub { font-size: 11px; color: var(--ink-gray-5); }

/* ═══════════ GD SCHEDULE DIALOG ═══════════ */
.gds-shell { max-width: 920px; width: 92vw; }
.gds-body { padding: 0; max-height: 68vh; overflow: auto; }
.gds-split { display: grid; grid-template-columns: 1.15fr 1fr; }
@media (max-width: 800px) { .gds-split { grid-template-columns: 1fr; } }
.gds-left { padding: 18px 20px; border-right: 1px solid var(--surface-gray-2); }
.gds-right { padding: 18px 20px; background: var(--surface-gray-1); }
.gds-section-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-gray-5); margin: 4px 0 10px;
}
.gds-section-label:not(:first-child) { margin-top: 20px; }

/* mode segmented */
.gds-modeseg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gds-mode {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 11px 12px;
  border: 1.5px solid var(--outline-gray-2, #E2E2E2); border-radius: 9px; background: var(--surface-white);
  cursor: pointer; text-align: left; transition: all .12s ease;
}
.gds-mode:hover { border-color: var(--ink-gray-4); }
.gds-mode.is-on { border-color: var(--ink-gray-9); background: var(--surface-gray-1); }
.gds-mode-top { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-gray-9); }
.gds-mode-sub { font-size: 11px; color: var(--ink-gray-5); }
.gds-mode.is-on .gds-mode-check { color: var(--ink-gray-9); }

.gds-grouping-summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 8px; background: var(--surface-blue-1);
  border: 1px solid var(--surface-blue-2); font-size: 12.5px; color: var(--ink-gray-7); margin-bottom: 12px;
}
.gds-grouping-summary strong { color: var(--ink-gray-9); }
.gds-sep { color: var(--ink-gray-3); }

/* group preview cards */
.gds-groups { display: flex; flex-direction: column; gap: 10px; }
.gds-group {
  border: 1px solid var(--outline-gray-2, #E2E2E2); border-radius: 9px; overflow: hidden; background: var(--surface-white);
}
.gds-group-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 11px;
  background: var(--surface-gray-1); border-bottom: 1px solid var(--surface-gray-2); font-size: 12.5px;
}
.gds-group-no { font-weight: 600; color: var(--ink-gray-9); }
.gds-group-tag { font-size: 11px; color: var(--ink-gray-5); }
.gds-group-count { margin-left: auto; font-size: 11px; color: var(--ink-gray-5); }
.gds-group-body { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 11px; }
.gds-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px;
  border-radius: 20px; background: var(--surface-gray-1); border: 1px solid var(--surface-gray-3);
  font-size: 11.5px; color: var(--ink-gray-7);
}
.gds-chip-meta { color: var(--ink-gray-4); font-size: 10.5px; }

.gds-review { display: flex; flex-direction: column; gap: 0; }
.gds-review-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--surface-gray-2); font-size: 12.5px; }
.gds-review-row:last-child { border-bottom: none; }
.gds-review-k { color: var(--ink-gray-5); }
.gds-review-v { color: var(--ink-gray-9); font-weight: 500; text-align: right; }
