:root {
  --brand-green: #2df300;
  --brand-mint: #54edcf;
  --brand-mint-dark: #0aa889;
  --brand-slate: #24343d;
  --brand-muted: #667085;
  --surface: #ffffff;
  --soft-bg: #f5f8f7;
  --line: #e2e8f0;
  --shadow: 0 12px 30px rgba(15, 23, 42, .07);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(84, 237, 207, .16), transparent 34rem),
    linear-gradient(180deg, #fbfefd 0%, var(--soft-bg) 100%);
  color: var(--brand-slate);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: .95rem;
}
a { color: var(--brand-mint-dark); }

/* Minimal local Bootstrap fallback so the app remains usable without the CDN. */
.container-fluid { width: 100%; margin-left: auto; margin-right: auto; }
.row { display: flex; flex-wrap: wrap; margin-left: -.5rem; margin-right: -.5rem; }
.row > * { width: 100%; padding-left: .5rem; padding-right: .5rem; }
.g-2 { gap: .5rem 0; }
.g-3 { gap: 1rem 0; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-12 { flex: 0 0 auto; width: 100%; }
@media (min-width: 576px) {
  .col-sm-6 { flex: 0 0 auto; width: 50%; }
}
@media (min-width: 768px) {
  .col-md-1 { flex: 0 0 auto; width: 8.333333%; }
  .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
}
@media (min-width: 992px) {
  .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
  .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
}
@media (min-width: 1200px) {
  .col-xl-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
}
.d-flex { display: flex !important; }
.grid { display: grid !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end, .justify-content-lg-end { justify-content: flex-end !important; }
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.pt-0 { padding-top: 0 !important; }
.pt-2 { padding-top: .5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.text-muted { color: var(--brand-muted) !important; }
.text-break { overflow-wrap: anywhere !important; word-break: break-word !important; }
.fw-semibold { font-weight: 750 !important; }
.form-label { display: inline-block; margin-bottom: .35rem; font-weight: 700; color: #344054; }
.form-control, .form-select {
  display: block;
  width: 100%;
  min-height: 2.55rem;
  padding: .5rem .75rem;
  border: 1px solid #d9e2ec;
  border-radius: .65rem;
  background-color: #fff;
  color: #17212b;
  font: inherit;
}
.form-control:focus, .form-select:focus {
  outline: 0;
  border-color: #62d9c4;
  box-shadow: 0 0 0 .18rem rgba(17, 191, 134, .12);
}
.form-control-sm, .form-select-sm {
  min-height: 2.25rem;
  padding: .34rem .6rem;
  font-size: .86rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 2.35rem;
  padding: .45rem .85rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  background: #fff;
  color: #24343d;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.btn-sm { min-height: 2rem; padding: .3rem .65rem; font-size: .86rem; }
.btn-primary {
  background: linear-gradient(135deg, #11bf86, #12a5e8);
  border-color: transparent;
  color: #fff;
  font-weight: 800;
}
.btn-primary:hover { filter: brightness(.96); color: #fff; }
.btn-secondary, .btn-outline-secondary { border-color: #cbd5e1; color: #475467; }
.btn-outline-primary { color: var(--brand-mint-dark); border-color: #91e8d8; font-weight: 750; }
.btn-outline-primary:hover { background: var(--brand-mint-dark); border-color: var(--brand-mint-dark); color: #fff; }
.btn-outline-success { border-color: #86efac; color: #166534; }
.btn-outline-warning { border-color: #fbbf24; color: #a16207; }
.btn-outline-danger { border-color: #fecaca; color: #991b1b; }
.btn-outline-dark { border-color: #475467; color: #17212b; }
.alert { padding: .75rem 1rem; border-radius: .75rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-sm th, .table-sm td { padding: .45rem; }
.table-responsive { width: 100%; overflow-x: auto; }
.collapse:not(.show) { display: none; }

.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(45, 243, 0, .16), transparent 30rem),
    radial-gradient(circle at bottom right, rgba(84, 237, 207, .18), transparent 34rem),
    linear-gradient(180deg, #fbfefd, #eef8f5);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.login-card {
  width: min(440px, 100%);
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 2rem;
}
.login-brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.login-brand img {
  width: 150px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
}
.login-brand h1 { margin: 0; font-size: 1.25rem; font-weight: 850; }

.app-shell {
  max-width: none;
  width: 100%;
  padding-left: clamp(.75rem, 1.1vw, 1.5rem);
  padding-right: clamp(.75rem, 1.1vw, 1.5rem);
}
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  backdrop-filter: blur(14px);
}
.navbar { display: flex; align-items: center; min-height: 64px; }
.navbar .app-shell { display: flex; align-items: center; gap: 1rem; }
.navbar-collapse { flex: 1; display: flex; justify-content: flex-end; }
.navbar-nav { display: flex; align-items: center; gap: .2rem; }
.navbar-toggler { display: none; }
.app-brand { display: flex; align-items: center; gap: .75rem; font-weight: 850; color: var(--brand-slate); text-decoration: none; }
.app-brand img { width: 128px; height: 36px; object-fit: contain; object-position: left center; mix-blend-mode: multiply; }
.navbar-nav .nav-link {
  border-radius: 999px;
  padding: .45rem .8rem;
  color: #475467;
  font-weight: 650;
  text-decoration: none;
}
.navbar-nav .nav-link:hover { background: #effaf7; color: var(--brand-mint-dark); }
.navbar-nav .nav-link.active { background: #e9fff7; color: #087963; }
.navbar-nav button.nav-link { border: 0; background: transparent; font: inherit; }
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  z-index: 1000;
  min-width: 220px;
  padding: .45rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: block;
  border-radius: .55rem;
  color: #344054;
  font-weight: 700;
  padding: .55rem .7rem;
  text-decoration: none;
}
.dropdown-item:hover { background: #effaf7; color: var(--brand-mint-dark); }
.dropdown-divider { height: 1px; margin: .4rem 0; background: var(--line); }
.dropdown-header { padding: .55rem .7rem .65rem; color: var(--brand-muted); }
.dropdown-footer {
  padding: .45rem .7rem;
  color: #667085;
  font-size: .74rem;
  font-weight: 750;
}
.dropdown-footer span { display: block; font-weight: 650; }

.user-menu { display: flex; align-items: center; margin-left: .45rem; }
.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid #b7efe4;
  border-radius: 999px;
  background: #f0fdfa;
  color: #075f52;
  font-weight: 800;
  padding: .28rem .72rem .28rem .34rem;
}
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-green), var(--brand-mint));
  color: #17323a;
  font-size: .82rem;
  font-weight: 900;
}
.user-menu-name { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-item { color: #9f1239; }
.analysis-job-indicator {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.25rem;
  margin-left: .25rem;
  padding: .35rem .7rem;
  border: 1px solid #d6f5ee;
  border-radius: 999px;
  background: #f8fffc;
  color: #087963;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
}
.analysis-job-indicator:hover { background: #ecfdf5; color: #075f52; }
.analysis-job-indicator.completed {
  border-color: #86efac;
  background: #ecfdf5;
  color: #166534;
}
.analysis-job-indicator.failed {
  border-color: #fecaca;
  background: #fff7f7;
  color: #991b1b;
}
.analysis-job-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: #12a5e8;
  box-shadow: 0 0 0 4px rgba(18, 165, 232, .12);
}
.analysis-job-indicator.completed .analysis-job-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .14); }
.analysis-job-indicator.failed .analysis-job-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .12); }

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.page-kicker { color: var(--brand-mint-dark); font-weight: 850; text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; }
.page-title { margin: .1rem 0; font-size: 1.55rem; font-weight: 850; }
.page-subtitle { color: var(--brand-muted); margin: 0; max-width: 760px; }
.small-muted, .text-muted-small { color: #6c757d; font-size: .85rem; }

.card, .modern-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 1rem; }
.metric, .metric-card { border: 0; position: relative; overflow: hidden; }
.metric::before, .metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--brand-green), var(--brand-mint));
}
.metric-label { color: var(--brand-muted); font-weight: 800; font-size: .78rem; text-transform: uppercase; }
.metric-value { font-size: 1.85rem; font-weight: 900; }
.metric-card .card-body { min-height: 112px; display: flex; flex-direction: column; justify-content: center; }

.workflow-steps {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: -.35rem 0 1rem;
  padding: .65rem;
  border: 1px solid #dfe9f1;
  border-radius: 1rem;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
  overflow-x: auto;
}
.workflow-step {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 180px;
  min-height: 52px;
  padding: .55rem .65rem;
  border-radius: .8rem;
  color: #475467;
  text-decoration: none;
  white-space: nowrap;
}
.workflow-step:hover { background: #f3fbf8; color: var(--brand-mint-dark); }
.workflow-step.active { background: #ecfdf5; color: #075f52; }
.workflow-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: #eef4f7;
  color: #344054;
  font-size: .78rem;
  font-weight: 900;
}
.workflow-step.active .workflow-step-index {
  background: linear-gradient(135deg, var(--brand-green), var(--brand-mint));
  color: #17323a;
}
.workflow-step strong { display: block; line-height: 1.05; font-size: .88rem; }
.workflow-step small { display: block; margin-top: .12rem; color: #667085; font-size: .74rem; }
.workflow-step-line { flex: 0 0 28px; height: 1px; background: #dbe5ee; }
.recruitment-workflow-steps .workflow-step { cursor: default; }
.workflow-action-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid #dfe9f1;
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fcfb);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
}
.workflow-action-panel strong { display: block; color: #17212b; font-size: .94rem; }
.workflow-action-panel span { display: block; color: #667085; font-size: .84rem; }
.workflow-action-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.workflow-action-buttons form { margin: 0; }

.filter-card {
  background: rgba(255, 255, 255, .94);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.filter-card label { color: #475467; font-weight: 750; font-size: .8rem; margin-bottom: .25rem; }
.candidate-filter-form { border-top: 1px solid #edf2f7; }
.candidate-filter-grid {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  width: 100%;
  gap: .65rem .75rem;
}
.candidate-filter-grid .filter-field { flex: 0 0 168px; min-width: 0; }
.candidate-filter-grid .filter-field-search,
.candidate-filter-grid .filter-field-score,
.candidate-filter-grid .filter-field-top,
.candidate-filter-grid .filter-field-date { flex-basis: 168px; }
.candidate-filter-grid .filter-field-custom { flex-basis: 118px; }
.candidate-filter-grid .filter-actions { flex: 0 0 auto; margin-left: auto; align-items: end; }
.recruitment-filter-grid .filter-field { flex-basis: 176px; }
.recruitment-filter-grid .filter-field-page { flex-basis: 96px; }
.recruitment-filter-grid .filter-field small {
  display: block;
  margin-top: .2rem;
  color: #667085;
  font-size: .7rem;
}
.recruitment-table .table-row-muted { opacity: .68; }
.recruitment-vacancy-card-compact {
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .035);
}
.recruitment-vacancy-card-compact .h5 { font-size: 1rem; }
.recruitment-preview-minimized {
  background: rgba(255,255,255,.78);
}
.recruitment-preview-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem .75rem;
  border: 1px solid #e5edf4;
  border-radius: 10px;
  background: #fbfdfe;
}
.status-muted { background: #eef2f6; color: #536170; border-color: #d8e0ea; }
.recruitment-preview-summary .metric-card {
  border: 1px solid #dfe7ef;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
  background: #fff;
}
.recruitment-preview-summary .metric-card::before { display: none; }
.recruitment-preview-summary .metric-card {
  padding: 1rem;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.recruitment-preview-summary .metric-label { font-size: .72rem; letter-spacing: .02em; }
.recruitment-preview-summary .metric-value { font-size: 1.75rem; line-height: 1.1; }
.recruitment-status-card {
  background: rgba(255,255,255,.9);
  border: 1px solid #dfe7ef;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.recruitment-status-help {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.recruitment-status-help div {
  border: 1px solid #e5edf4;
  border-radius: 10px;
  background: #fbfdfe;
  padding: .75rem;
}
.recruitment-status-help strong { display: block; font-size: .82rem; color: #17212b; margin-bottom: .2rem; }
.recruitment-status-help span { display: block; font-size: .76rem; color: #667085; line-height: 1.35; }
.combo-select { position: relative; }
.combo-select-input { padding-right: 2rem; }
.combo-select::after {
  content: "";
  position: absolute;
  top: 1rem;
  right: .85rem;
  width: .55rem;
  height: .55rem;
  border-right: 1.5px solid #667085;
  border-bottom: 1.5px solid #667085;
  transform: rotate(45deg);
  pointer-events: none;
}
.combo-select-menu {
  display: none;
  position: absolute;
  z-index: 1050;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  padding: .35rem;
  background: #fff;
  border: 1px solid #d9e4ee;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
}
.combo-select.open .combo-select-menu { display: block; }
.combo-select-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: #1f2937;
  text-align: left;
  border-radius: 8px;
  padding: .55rem .65rem;
  font-weight: 650;
}
.combo-select-option:hover,
.combo-select-option:focus { background: #eefcf7; color: #057967; outline: 0; }
.summary-chip-group { display: flex; flex-wrap: wrap; gap: .45rem; }
.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .55rem;
  border: 1px solid #dfe7ef;
  border-radius: 999px;
  background: #fff;
  font-size: .78rem;
  font-weight: 750;
}
.summary-chip span { color: #667085; font-weight: 700; }
.summary-chip strong {
  color: #0f766e;
  font-weight: 900;
}
.version-current-card {
  min-width: 190px;
  border: 1px solid #dfe7ef;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
  padding: .85rem 1rem;
}
.version-current-card span,
.version-current-card small {
  display: block;
  color: #667085;
  font-size: .76rem;
  font-weight: 750;
}
.version-current-card strong {
  display: block;
  color: #10202b;
  font-size: 1.55rem;
  line-height: 1.1;
}
.release-timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  max-width: 980px;
}
.release-card {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: .9rem;
}
.release-card::before {
  content: "";
  position: absolute;
  top: 1.65rem;
  bottom: -1rem;
  left: 8px;
  width: 1px;
  background: #dbe5ee;
}
.release-card:last-child::before { display: none; }
.release-marker {
  width: 17px;
  height: 17px;
  margin-top: 1.25rem;
  border-radius: 999px;
  border: 4px solid #dff7ef;
  background: #12b886;
  box-shadow: 0 0 0 1px #9eead2;
  z-index: 1;
}
.release-card-body {
  border: 1px solid #dfe7ef;
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .055);
  padding: 1.1rem 1.2rem;
}
.release-card.latest .release-card-body { border-color: #a7f3d0; }
.release-version {
  color: #0f766e;
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
}
.release-version span {
  color: #667085;
  font-weight: 750;
  text-transform: none;
}
.release-card h2 {
  margin: .18rem 0 .75rem;
  color: #10202b;
  font-size: 1.15rem;
  font-weight: 900;
}
.release-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #344054;
}
.release-list li { margin: .32rem 0; }
.recruitment-breakdown-card {
  padding-top: .9rem !important;
  padding-bottom: .9rem !important;
}
.recruitment-breakdown-groups {
  flex: 1 1 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem 1rem;
}
.recruitment-breakdown-group {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.recruitment-breakdown-group > .text-muted-small {
  flex: 0 0 auto;
  min-width: 64px;
}
.filter-field label {
  display: block;
  margin-bottom: .3rem;
  color: #344054;
  font-size: .76rem;
  font-weight: 750;
  white-space: nowrap;
}
.filter-field-custom[hidden] { display: none !important; }
.filter-actions { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }

.advanced-filter-panel {
  flex: 1 1 100%;
  margin-top: .15rem;
  padding: .85rem;
  border: 1px solid #e4edf4;
  border-radius: .85rem;
  background: linear-gradient(180deg, #fbfefd, #f7fbfa);
}
.advanced-filter-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.advanced-filter-header strong { display: block; color: #1f2937; font-size: .9rem; }
.advanced-filter-header span { color: #667085; font-size: .8rem; }
.advanced-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .7rem; }
.advanced-filter-field { min-width: 0; }
.advanced-filter-field.wide { grid-column: span 2; }
.advanced-filter-field label { display: block; margin-bottom: .28rem; color: #344054; font-size: .76rem; font-weight: 750; }

.status-badge, .compact-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border-radius: 999px;
  padding: .28rem .58rem;
  font-size: .78rem;
  font-weight: 850;
  border: 1px solid transparent;
}
.status-success, .status-uploaded { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.status-pending, .status-processing { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.status-empty_text, .status-duplicate { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-failed { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.status-configured { background: #dcfce7; color: #166534; }
.status-not-configured { background: #fee2e2; color: #991b1b; }
.recommendation-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .78rem;
  font-weight: 850;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
}
.recommendation-strongly-recommended { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.recommendation-recommended { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.recommendation-consider { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.recommendation-not-recommended { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.score-pill, .score-chip {
  display: inline-flex;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  padding: .18rem .48rem;
  color: #475467;
  background: #fff;
  font-size: .78rem;
  font-weight: 750;
}

.line-clamp-1, .line-clamp-2, .line-clamp-3, .line-clamp-4 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-1 { -webkit-line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }
.line-clamp-4 { -webkit-line-clamp: 4; }
.text-preview { color: #344054; line-height: 1.45; }

.table-modern {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.table-modern thead th {
  background: #f8fafc;
  color: #344054;
  border-bottom: 1px solid #d9dee7;
  font-size: .76rem;
  text-transform: uppercase;
  vertical-align: middle;
}
.table-modern tbody td { border-color: #eef2f6; border-top: 1px solid #eef2f6; }
.table-modern tbody tr:hover { background: #f6fffb; }
.table-no {
  width: 56px;
  min-width: 48px;
  max-width: 64px;
  text-align: center !important;
  white-space: nowrap;
  font-weight: 850;
  color: #344054;
}
.table-no-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.8rem;
  padding: 0 .6rem;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.candidate-table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: .65rem;
  background: #fff;
  overflow-x: auto;
}
.candidate-table {
  margin-bottom: 0;
  table-layout: fixed;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
}
.candidate-table thead th {
  background: #f8fafc;
  border-bottom: 1px solid #d9dee7;
  color: #344054;
  font-size: .76rem;
  line-height: 1.2;
  padding: .68rem .5rem;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: normal;
}
.candidate-table tbody td {
  padding: .68rem .5rem;
  border-top: 1px solid #eef2f6;
  vertical-align: middle;
}
.candidate-table tbody tr:nth-child(even) { background: #fbfcfe; }
.candidate-table tbody tr:hover { background: #f3f7ff; }
.candidate-table th:nth-child(1), .candidate-table td:nth-child(1) { width: 40px; }
.candidate-table th:nth-child(2), .candidate-table td:nth-child(2) { width: 175px; }
.candidate-table th:nth-child(3), .candidate-table td:nth-child(3) { width: 125px; }
.candidate-table th:nth-child(4), .candidate-table td:nth-child(4) { width: 116px; }
.candidate-table th:nth-child(5), .candidate-table td:nth-child(5) { width: 165px; }
.candidate-table th:nth-child(6), .candidate-table td:nth-child(6) { width: 220px; }
.candidate-table th:nth-child(7), .candidate-table td:nth-child(7) { width: 98px; }
.candidate-table th:nth-child(8), .candidate-table td:nth-child(8) { width: 125px; }
.candidate-table th:nth-child(9), .candidate-table td:nth-child(9) { width: 215px; }
.candidate-table th:nth-child(10), .candidate-table td:nth-child(10) { width: 72px; }
.rank-cell, .score-cell, .recommendation-cell, .action-cell { text-align: center; }
.candidate-cell, .education-cell, .evidence-cell, .reason-cell, .risk-cell, .process-time-cell {
  white-space: normal;
  line-height: 1.35;
}
.process-time-cell { white-space: nowrap; }
.candidate-contact { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .4rem; }
.candidate-contact span {
  display: inline-block;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  padding: .14rem .38rem;
  color: #475467;
  font-size: .75rem;
}
.evidence-preview {
  display: grid;
  gap: .45rem;
}
.candidate-evidence-card {
  border: 1px solid #e2e8f0;
  border-radius: .7rem;
  background: #fbfefd;
  padding: .55rem;
}
.candidate-evidence-card span, .evidence-preview span {
  display: block;
  color: var(--brand-mint-dark);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
  margin-bottom: .18rem;
}
.candidate-evidence-card.risk span { color: #b45309; }
.score-card {
  border: 1px solid #e2e8f0;
  border-radius: .8rem;
  background: #fff;
  padding: .65rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}
.score-number {
  color: #17212b;
  font-size: 1.12rem;
  font-weight: 900;
  line-height: 1.1;
}
.score-recommendation-text { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.score-bar .progress, .progress {
  height: .55rem;
  overflow: hidden;
  background: #e5e7eb;
  border-radius: 999px;
}
.progress-bar { height: 100%; background: linear-gradient(135deg, #11bf86, #12a5e8); }

.upload-zone {
  border: 2px dashed #98e7d8;
  background: linear-gradient(180deg, #ffffff, #f0fdfa);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}
.upload-zone.drag-over { border-color: var(--brand-mint-dark); background: #ecfdf5; }
.file-list { text-align: left; max-height: 180px; overflow: auto; }

.action-bar { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.action-bar form { display: inline-block; margin: 0; }
.sticky-actions { position: sticky; top: 72px; z-index: 3; }

.definition-list, .settings-definition-list {
  display: grid;
  grid-template-columns: minmax(180px, max-content) 1fr;
  gap: .65rem 1rem;
}
.settings-definition-list { grid-template-columns: minmax(240px, max-content) 1fr; }
.definition-list dt, .settings-definition-list dt { color: #667085; font-weight: 850; }
.settings-definition-list dt { white-space: nowrap; min-width: 220px; }
.definition-list dd, .settings-definition-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.pre-box, .raw-block {
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #e5e7eb;
  padding: 1rem;
  border-radius: .75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .86rem;
}
.raw-block-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .86rem;
}

.detail-hero { overflow: hidden; }
.detail-tabs {
  position: sticky;
  top: 74px;
  z-index: 5;
  background: rgba(245, 248, 247, .92);
  backdrop-filter: blur(10px);
  padding: .35rem 0;
}
.nav { display: flex; flex-wrap: wrap; gap: .35rem; padding-left: 0; margin: 0; list-style: none; }
.nav-link {
  border: 0;
  border-radius: .7rem;
  background: transparent;
  padding: .45rem .75rem;
  color: #475467;
  font: inherit;
  font-weight: 750;
}
.nav-link.active { background: #e9fff7; color: #087963; }
.tab-pane { display: none; }
.tab-pane.show.active { display: block; }

.modal { display: none; position: fixed; inset: 0; z-index: 1050; background: rgba(15, 23, 42, .32); }
.modal.show { display: block; }
.modal-dialog { width: min(900px, calc(100% - 2rem)); margin: 3rem auto; }
.modal-content { background: #fff; border-radius: 1rem; box-shadow: var(--shadow); overflow: hidden; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--line); }
.modal-body { padding: 1rem; }
.btn-close { border: 0; background: transparent; width: 2rem; height: 2rem; cursor: pointer; }
.btn-close::before { content: "x"; font-size: 1.25rem; }

.offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1045;
  width: min(720px, 100%);
  background: #fff;
  transform: translateX(100%);
  transition: transform .2s ease;
  box-shadow: -18px 0 32px rgba(15, 23, 42, .12);
}
.offcanvas.show { transform: translateX(0); }
.offcanvas-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.offcanvas-body { padding: 1rem; overflow: auto; height: calc(100% - 72px); }
.evidence-section {
  border: 1px solid #e2e8f0;
  border-radius: .85rem;
  padding: .8rem;
  margin-bottom: .75rem;
  background: #fbfefd;
}
.evidence-section h3 { margin: 0 0 .35rem; font-size: .88rem; color: #344054; }
.evidence-section p { margin: 0; color: #344054; }
.empty-evidence { color: #98a2b3 !important; font-style: italic; }
.score-reasoning-list dt { font-weight: 850; color: #344054; }
.score-reasoning-list dd { margin: .15rem 0 .65rem; color: #475467; }

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: .65rem .75rem;
  margin: .75rem 0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .04);
}
.pagination-count { color: #475467; font-weight: 750; font-size: .86rem; }
.pagination-size { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; }
.pagination { display: flex; padding-left: 0; list-style: none; margin: 0; }
.page-link {
  display: block;
  padding: .45rem .65rem;
  border: 1px solid #dbe5ee;
  background: #fff;
  color: var(--brand-mint-dark);
  text-decoration: none;
  font-weight: 750;
}
.page-item.active .page-link { background: var(--brand-mint-dark); border-color: var(--brand-mint-dark); color: #fff; }
.page-item.disabled .page-link { color: #98a2b3; background: #f8fafc; }

.duration-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .24rem .52rem;
  background: #eef6ff;
  color: #075985;
  font-weight: 850;
  font-size: .78rem;
  white-space: nowrap;
}
.duration-badge.duration-slow { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.audit-url-cell, .audit-model-cell { max-width: 220px; word-break: break-word; }

.operation-result { width: 100%; }
.operation-result .workflow-steps { margin: 0 0 1rem; }
.operation-hero, .result-panel {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}
.operation-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.operation-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border-radius: 999px;
  padding: .34rem .7rem;
  font-size: .78rem;
  font-weight: 850;
  white-space: nowrap;
}
.result-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.result-panel { padding: 1rem; }
.result-panel-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.result-panel-header h2 { margin: 0; font-size: 1rem; font-weight: 850; }
.result-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: .75rem; }
.result-metric {
  border: 1px solid #e8eef5;
  border-radius: .8rem;
  padding: .85rem;
  background: #fbfefd;
}
.result-metric span { display: block; margin-bottom: .3rem; color: #667085; font-size: .76rem; font-weight: 850; text-transform: uppercase; }
.result-metric strong { color: #17212b; font-size: 1.65rem; line-height: 1; font-weight: 900; }
.result-detail {
  border-top: 1px solid #edf2f7;
  padding-top: .9rem;
}
.result-detail-table { margin-bottom: 0; }
.result-detail-table th,
.result-detail-table td {
  vertical-align: middle;
}
.result-file-cell {
  max-width: 320px;
  overflow-wrap: anywhere;
  font-weight: 750;
  color: #243442;
}
.result-errors { margin-top: 1rem; border-top: 1px solid #edf2f7; padding-top: .85rem; }
.result-errors h3 { margin: 0 0 .55rem; color: #344054; font-size: .9rem; font-weight: 850; }
.result-error-row {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr);
  gap: .75rem;
  padding: .65rem .7rem;
  border: 1px solid #fee2e2;
  border-radius: .7rem;
  background: #fffafa;
  color: #7f1d1d;
  font-size: .86rem;
}
.result-error-row + .result-error-row { margin-top: .5rem; }
.operation-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }

.action-choice-modal { border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 20px 50px rgba(15, 23, 42, .16); }
.analysis-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.analysis-mode-card {
  width: 100%;
  min-height: 132px;
  padding: 1rem;
  border: 1px solid #dfe9f1;
  border-radius: .95rem;
  background: #fff;
  color: #243442;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.analysis-mode-card:hover {
  border-color: #91e8d8;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.analysis-mode-card.recommended { background: linear-gradient(180deg, #fbfffd, #f0fdfa); }
.analysis-mode-card strong { display: block; margin-bottom: .45rem; font-size: .98rem; }
.analysis-mode-card span { display: block; color: #667085; font-size: .86rem; line-height: 1.45; }
.privilege-table th,
.privilege-table td { text-align: center; }
.privilege-table .privilege-module {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 220px;
  text-align: left;
  background: #fff;
}

.role-metric-card, .master-data-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: 118px;
  padding: 1rem;
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--brand-slate);
}
.role-metric-card span, .master-data-card span { color: var(--brand-muted); font-size: .76rem; font-weight: 850; text-transform: uppercase; }
.role-metric-card strong, .master-data-card strong { font-size: 1.8rem; line-height: 1.1; }
.role-metric-card small, .master-data-card small { color: #667085; }

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(5px);
}
.loading-overlay.show { display: grid; }
.loading-panel {
  width: min(420px, calc(100% - 2rem));
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
}
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: .25rem solid #d1fae5;
  border-right-color: var(--brand-mint-dark);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1280px) {
  .candidate-filter-grid .filter-field,
  .candidate-filter-grid .filter-field-search,
  .candidate-filter-grid .filter-field-score,
  .candidate-filter-grid .filter-field-top,
  .candidate-filter-grid .filter-field-date { flex-basis: 160px; }
  .candidate-filter-grid .filter-field-custom { flex-basis: 112px; }
  .candidate-filter-grid .filter-actions { margin-left: 0; }
  .advanced-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .navbar .app-shell { flex-wrap: wrap; }
  .navbar-toggler { display: inline-flex; margin-left: auto; }
  .navbar-collapse { flex-basis: 100%; justify-content: flex-start; }
  .navbar-nav { align-items: stretch; flex-direction: column; width: 100%; padding: .5rem 0; }
  .dropdown-menu { position: static; box-shadow: none; margin-top: .25rem; }
  .user-menu { align-items: stretch; margin: .45rem 0 0; }
  .user-menu-toggle { width: 100%; justify-content: flex-start; }
  .analysis-job-indicator { justify-content: flex-start; margin: .45rem 0 0; }
  .candidate-filter-grid .filter-field,
  .candidate-filter-grid .filter-field-search,
  .candidate-filter-grid .filter-field-score,
  .candidate-filter-grid .filter-field-top,
  .candidate-filter-grid .filter-field-date,
  .candidate-filter-grid .filter-field-custom { flex: 1 1 180px; }
  .candidate-filter-grid .filter-actions { flex: 1 1 100%; }
  .advanced-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advanced-filter-field.wide { grid-column: span 2; }
}
@media (max-width: 900px) {
  .page-header { flex-direction: column; }
  .app-brand img { width: 104px; }
  .definition-list, .settings-definition-list { grid-template-columns: 1fr; }
  .settings-definition-list dt { white-space: normal; min-width: 0; }
  .workflow-action-panel, .operation-hero { align-items: flex-start; flex-direction: column; }
  .workflow-action-buttons { justify-content: flex-start; }
  .recruitment-status-help { grid-template-columns: 1fr; }
  .recruitment-breakdown-groups { grid-template-columns: 1fr; }
  .recruitment-breakdown-group { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .result-section-grid { grid-template-columns: 1fr; }
  .result-error-row { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
  .candidate-table { min-width: 980px; }
  .workflow-step { min-width: 154px; }
  .workflow-step-line { flex-basis: 18px; }
  .candidate-filter-grid .filter-field,
  .candidate-filter-grid .filter-field-search,
  .candidate-filter-grid .filter-field-score,
  .candidate-filter-grid .filter-field-top,
  .candidate-filter-grid .filter-field-date,
  .candidate-filter-grid .filter-field-custom { flex-basis: 100%; }
  .candidate-filter-grid .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-basis: 100%;
  }
  .advanced-filter-grid { grid-template-columns: 1fr; }
  .advanced-filter-field.wide { grid-column: span 1; }
  .analysis-mode-grid { grid-template-columns: 1fr; }
  .score-card { padding: .5rem; }
  .score-number { font-size: 1rem; }
}
