.recruit-actions,
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.recruitment-page-tabs { display: flex; gap: 4px; margin: 16px 0; border-bottom: 1px solid var(--border); }
.recruitment-page-tabs a { padding: 10px 16px; color: var(--text-muted); font-weight: 800; text-decoration: none; border-bottom: 3px solid transparent; }
.recruitment-page-tabs a:hover { color: var(--navy); background: #f5f9fb; }
.recruitment-page-tabs a.active { color: #087da8; border-bottom-color: #0b8fbe; }
.recruitment-page-tabs span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 4px; border-radius: 10px; background: #f28a2b; color: #fff; font-size: 11px; }
.followup-cell { min-width: 138px; }
.followup-cell strong, .followup-cell small { display: block; }
.followup-cell small { margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.followup-cell .badge { margin-top: 6px; }
.followup-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.filter-row input,
.filter-row select { min-width: 190px; }

.recruitment-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat-note { margin-top: 5px; color: var(--text-muted); font-size: 11px; }
.stat-card.closed { border-top-color: #d64b4b; }

.recruitment-funnel-card { margin-top: 18px; }
.pipeline-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pipeline-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-top: 4px solid #9aabb6;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.pipeline-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10, 31, 61, .08); }
.pipeline-card.active { outline: 2px solid #0b8fbe; outline-offset: 1px; }
.pipeline-card strong { display: block; font-size: 25px; line-height: 1; }
.pipeline-card span { display: block; margin-top: 7px; font-weight: 800; }
.pipeline-card small { display: block; margin-top: 5px; color: var(--text-muted); line-height: 1.35; }
.pipeline-card.cyan,
.pipeline-card.blue { border-top-color: #0b8fbe; }
.pipeline-card.orange { border-top-color: #f28a2b; }
.pipeline-card.purple { border-top-color: #815ac0; }
.pipeline-card.green { border-top-color: #18a957; }
.pipeline-card.red { border-top-color: #d64b4b; }
.eligibility-breakdown { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.eligibility-breakdown > span { color: var(--text-muted); font-weight: 700; }
.eligibility-breakdown a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 7px; background: #f7f9fa; color: var(--navy); text-decoration: none; }
.eligibility-breakdown a:hover { background: #eef4f7; }
.eligibility-breakdown .dot { width: 8px; height: 8px; border-radius: 50%; }
.eligibility-breakdown .dot.green { background: #18a957; }
.eligibility-breakdown .dot.orange { background: #f28a2b; }
.eligibility-breakdown .dot.red { background: #d64b4b; }

.recruit-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.recruit-form-grid label,
.stack-form label,
.recruitment-upload label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--navy);
  font-weight: 700;
}

.recruit-form-grid input,
.recruit-form-grid select,
.recruit-form-grid textarea,
.stack-form input,
.stack-form textarea,
.recruitment-upload input,
.automation-step textarea,
.data-table input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  box-sizing: border-box;
}

.recruit-form-grid small,
.automation-step small { color: var(--text-muted); font-weight: 500; }
.span-2 { grid-column: span 2; }
.recruit-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.recruitment-candidate-head { margin-bottom: 10px; }
.candidate-title-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.candidate-title-line h2 { margin: 0; }
.candidate-section { margin-top: 18px; scroll-margin-top: 18px; }
.candidate-section-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.candidate-section-nav a {
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}
.candidate-section-nav a:hover { background: #eef7fb; color: #087da8; }
.section-heading { align-items: center; gap: 14px; }
.section-heading h2 { margin-bottom: 2px; }
.candidate-profile-grid { gap: 14px 18px; }
.profile-notes { grid-column: span 2; }
.profile-save { grid-column: span 2; display: flex; justify-content: flex-start; }
.automation-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #157347;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.automation-live span { width: 8px; height: 8px; border-radius: 50%; background: #18a957; box-shadow: 0 0 0 4px rgba(24, 169, 87, .12); }
.workflow-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.workflow-strip > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe8ef;
  border-radius: 10px;
  background: #f8fbfd;
}
.workflow-strip strong { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 7px; border-radius: 50%; background: #0b8fbe; color: #fff; }
.workflow-strip span { color: var(--navy); font-weight: 800; font-size: 12px; }
.workflow-strip small { display: block; margin: 7px 0 0 31px; color: var(--text-muted); }
.workflow-strip > b { color: #87a4b5; font-size: 20px; }
.automation-note { padding: 10px 12px; border-left: 3px solid #0b8fbe; background: #f1f8fb; color: #36566b; }
.manual-message-panel { margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.manual-message-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--navy);
  font-weight: 800;
  background: #fbfcfd;
}
.manual-message-panel > summary span { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.manual-message-panel[open] > summary { border-bottom: 1px solid var(--border); }
.manual-message-panel .automation-flow { padding: 14px; }
.manual-message-help { margin: 0 0 2px; color: var(--text-muted); }

.automation-flow { display: grid; gap: 10px; }
.automation-step {
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(280px, 1.6fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.automation-template-name { display: grid; gap: 7px; justify-items: start; }
.automation-values textarea { min-height: 76px; resize: vertical; line-height: 1.45; }
.automation-step textarea:empty { display: none; }
.campaign-card { border-left: 4px solid var(--orange); }
.stack-form { display: grid; gap: 14px; }
.questionnaire-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.summary-metric { padding: 15px 16px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfd; }
.summary-metric strong { display: block; margin-bottom: 4px; color: var(--navy); font-size: 23px; }
.summary-metric span { color: var(--text-muted); font-size: 12px; }
.summary-metric.yes { border-left: 4px solid #18a957; }
.summary-metric.no { border-left: 4px solid #d64b4b; }
.summary-metric.date { border-left: 4px solid #0b8fbe; }
.questionnaire-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.questionnaire-section { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.questionnaire-section h3 { margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--border); background: #f5f9fb; color: var(--navy); font-size: 14px; }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin-bottom: 18px; }
.questionnaire-section .answer-grid { grid-template-columns: 1fr; gap: 0; margin: 0; padding: 4px 14px; }
.answer-grid > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.answer-grid > div:last-child { border-bottom: 0; }
.answer-pill { min-width: 38px; padding: 3px 7px; border-radius: 999px; text-align: center; font-size: 11px; }
.answer-pill.answer-yes { background: #e8f8ef; }
.answer-pill.answer-no { background: #fdecec; }
.answer-yes { color: #15803d; }
.answer-no { color: #b91c1c; }
.timeline { display: grid; gap: 12px; }
.timeline > div { border-left: 3px solid var(--cyan); padding-left: 12px; }
.timeline span { margin-left: 10px; color: var(--text-muted); }
.recruitment-upload { display: grid; gap: 16px; max-width: 760px; }

.public-recruitment {
  min-height: 100vh;
  padding: 34px 16px;
  background: linear-gradient(150deg, #eef7fb 0%, #f8fafc 42%, #fff3e8 100%);
  box-sizing: border-box;
}
.hr-employee-content .public-recruitment { min-height: auto; margin: -24px; }
.public-card {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 30px;
  background: #fff;
  border: 1px solid #dce7ee;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(10, 31, 61, .10);
  box-sizing: border-box;
}
.compact-card { width: min(540px, 100%); text-align: center; }
.public-logo { width: 76px; height: 76px; object-fit: cover; border-radius: 14px; }
.public-card h1 { margin: 14px 0 4px; color: #0a1f3d; }
.public-card .lead { margin-top: 0; color: #1f6f8b; font-weight: 700; }
.public-questionnaire section { margin: 24px 0; padding: 20px; border: 1px solid #dce7ee; border-radius: 12px; }
.public-questionnaire section h2 { margin-top: 0; color: #0a1f3d; }
.yes-no-row { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 12px 0; border: 0; border-bottom: 1px solid #edf2f5; }
.yes-no-row legend { display: contents; color: #243b53; }
.yes-no-row label { font-weight: 700; white-space: nowrap; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; }
.btn-large { width: 100%; padding: 14px 20px; font-size: 16px; }
.success-card { padding: 46px 30px; }
.success-check { width: 68px; height: 68px; margin: 12px auto; display: grid; place-items: center; border-radius: 50%; background: #dcfce7; color: #15803d; font-size: 36px; font-weight: 800; }
.jd-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.jd-meta span { padding: 7px 10px; border-radius: 20px; background: #eef7fb; color: #0a1f3d; font-weight: 700; }
.jd-text { white-space: pre-wrap; font: inherit; line-height: 1.65; color: #334e68; }
.text-danger { color: #b91c1c; }
.provider-response { display: block; max-width: 340px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }

.message-history-body { padding-top: 0; }
.recruitment-message-table { table-layout: fixed; min-width: 760px; }
.recruitment-message-table th:nth-child(1) { width: 105px; }
.recruitment-message-table th:nth-child(2) { width: 90px; }
.recruitment-message-table th:nth-child(4) { width: 105px; }
.recruitment-message-table th:nth-child(5) { width: 130px; }
.recruitment-message-table td { vertical-align: top; }
.message-time { white-space: nowrap; }
.message-time small { display: block; margin-top: 3px; color: var(--text-muted); }
.direction-pill,
.delivery-pill { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.direction-pill.outbound { background: #eaf5fb; color: #087da8; }
.direction-pill.inbound { background: #eef7ee; color: #157347; }
.delivery-pill { background: #eef1f4; color: #526575; }
.delivery-pill.received,
.delivery-pill.delivered { background: #e8f8ef; color: #157347; }
.delivery-pill.failed { background: #fdecec; color: #b42323; }
.message-content details,
.technical-details details { max-width: 100%; }
.message-content summary,
.technical-details summary { cursor: pointer; color: #087da8; font-weight: 700; }
.message-content pre {
  max-height: 260px;
  margin: 9px 0 0;
  padding: 11px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafb;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.5;
}
.technical-details code { display: block; margin-top: 8px; overflow-wrap: anywhere; color: #526575; }
.technical-details .provider-response { max-height: 220px; overflow: auto; }
.message-error { margin-top: 6px; color: #b42323; font-size: 11px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .recruitment-stats { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .pipeline-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recruit-detail-grid { grid-template-columns: 1fr; }
  .workflow-strip { grid-template-columns: 1fr; }
  .workflow-strip > b { display: none; }
  .workflow-strip small { display: inline; margin-left: 8px; }
  .automation-step { grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.3fr) auto; }
}

@media (max-width: 620px) {
  .pipeline-grid { grid-template-columns: 1fr; }
  .recruit-form-grid, .answer-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .profile-notes, .profile-save { grid-column: span 1; }
  .questionnaire-summary, .questionnaire-sections { grid-template-columns: 1fr; }
  .automation-step { grid-template-columns: 1fr; }
  .manual-message-panel > summary { align-items: flex-start; flex-direction: column; }
  .candidate-section-nav { overflow-x: auto; flex-wrap: nowrap; }
  .candidate-section-nav a { white-space: nowrap; }
  .yes-no-row { grid-template-columns: 1fr 1fr; }
  .yes-no-row legend { display: block; grid-column: span 2; }
  .public-card { padding: 20px 16px; }
  .public-questionnaire section { padding: 16px 12px; }
}
