.workbench-dialog { border: 1px solid var(--line); border-radius: 8px; width: min(680px, calc(100vw - 32px)); max-height: 90vh; padding: 24px; color: var(--ink); overflow: auto; }
.workbench-dialog::backdrop { background: rgb(0 0 0 / 35%); }
.workbench-dialog form, .workbench-fields { display: grid; gap: 16px; }
.workbench-dialog label { display: grid; gap: 6px; font-size: 13px; }
.workbench-dialog input, .workbench-dialog select, .workbench-dialog textarea { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px; border: 1px solid var(--line); border-radius: 4px; background: white; color: inherit; font: inherit; }
.workbench-dialog select,
.scoring-dialog select,
.job-select,
.filter,
.form-row select,
.skill-policy select,
.user-role-select,
.drawer-actions select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667485' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  color: var(--ink);
  outline: none;
  padding-right: 38px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.workbench-dialog select:hover,
.scoring-dialog select:hover,
.job-select:hover,
.filter:hover,
.form-row select:hover,
.skill-policy select:hover,
.user-role-select:hover,
.drawer-actions select:hover {
  border-color: #b7c7dc;
  background-color: #fcfdff;
}
.workbench-dialog select:focus,
.scoring-dialog select:focus,
.job-select:focus,
.filter:focus,
.form-row select:focus,
.skill-policy select:focus,
.user-role-select:focus,
.drawer-actions select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232f6fed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  border-color: #8bb5ff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.workbench-dialog select:disabled,
.scoring-dialog select:disabled,
.job-select:disabled,
.filter:disabled,
.form-row select:disabled,
.skill-policy select:disabled,
.user-role-select:disabled,
.drawer-actions select:disabled {
  cursor: not-allowed;
  opacity: .6;
}
.workbench-dialog select::-ms-expand,
.scoring-dialog select::-ms-expand,
.job-select::-ms-expand,
.filter::-ms-expand,
.form-row select::-ms-expand,
.skill-policy select::-ms-expand,
.user-role-select::-ms-expand,
.drawer-actions select::-ms-expand {
  display: none;
}
.smart-select {
  position: relative;
  display: inline-block;
  min-width: 0;
  vertical-align: middle;
}
.smart-select:has(> select.job-select) {
  min-width: 205px;
}
.workbench-dialog .smart-select,
.scoring-dialog .smart-select,
.form-row .smart-select {
  width: 100%;
}
.drawer-actions .smart-select {
  flex: 1 0 70px;
}
.smart-select > select {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
}
.smart-select > select:disabled {
  opacity: 0;
}
.smart-select-trigger {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 9px 38px 9px 10px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667485' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.smart-select-trigger:hover {
  border-color: #b7c7dc;
  background-color: #fcfdff;
}
.smart-select-trigger:focus-visible,
.smart-select.is-open .smart-select-trigger {
  border-color: #8bb5ff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
  outline: none;
}
.smart-select-trigger:disabled,
.smart-select.is-disabled .smart-select-trigger {
  cursor: not-allowed;
  opacity: .6;
}
.smart-select-panel {
  position: fixed;
  z-index: 2000;
  max-height: 280px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(16, 24, 40, .16), 0 2px 7px rgba(16, 24, 40, .08);
  overscroll-behavior: contain;
}
.smart-select-option {
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 34px 8px 11px;
  border-radius: 7px;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  transition: background-color .12s ease, color .12s ease;
}
.smart-select-option::after {
  position: absolute;
  right: 12px;
  color: #2f6fed;
  content: "✓";
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
}
.smart-select-option:hover,
.smart-select-option.is-active {
  background: #f2f7ff;
  color: #1d4ed8;
}
.smart-select-option.is-selected {
  background: #eaf2ff;
  color: #1d4ed8;
  font-weight: 650;
}
.smart-select-option.is-selected::after {
  opacity: 1;
}
.smart-select-option.is-disabled {
  color: #98a2b3;
  cursor: not-allowed;
  opacity: .6;
}
.smart-select-panel[hidden] {
  display: none;
}
@media (max-width: 650px) {
  .smart-select:has(> select.job-select) {
    width: 100%;
  }
}
.workbench-dialog h2 { font-size: 18px; }
.workbench-fields { min-width: 0; overflow-wrap: anywhere; }
.workbench-dialog .dialog-head, .workbench-dialog .dialog-foot { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.workbench-dialog .dialog-foot { margin-top: 12px; flex-wrap: wrap; }
.workbench-dialog [role="status"] { color: #b42318; overflow-wrap: anywhere; }
.workbench-dialog .task-item, .workbench-dialog .history-item { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.workbench-dialog small { display: block; color: var(--muted); margin-top: 5px; }
.workbench-dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.job-card-foot { flex-wrap: wrap; gap: 8px; }
.drawer-actions { flex-wrap: wrap; }
.drawer-actions .button { flex: 1 0 78px; white-space: nowrap; }
.drawer-actions select { flex: 1 0 70px; }
.profile-top .avatar { flex-shrink: 0; }
.profile-top .profile-score { flex: 0 0 88px; }
.profile-score small { white-space: nowrap; }
.profile-top h2 { overflow-wrap: anywhere; }
.drawer-profile, .profile-top > div { min-width: 0; }
.profile-top p, #drawerNote, .task-table td { overflow-wrap: anywhere; }
.task-table td { max-width: 300px; }
#candidateRows td small { display: block; font-size: 11px; color: var(--muted); }
.export-item a { flex-shrink: 0; text-decoration: none; }
.export-item > div { min-width: 0; overflow-wrap: anywhere; }
.check-list input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 16px; padding: 0; }
.check-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check-list label { white-space: nowrap; }
.jobs-toolbar, .heading-actions, .job-meta { flex-wrap: wrap; }
.job-card { min-width: 0; }
.job-card h3 { overflow-wrap: anywhere; }
.scoring-dialog-scrim {
  position: fixed;
  inset: 0 0 0 188px;
  z-index: 4;
  background: rgba(15, 23, 42, .18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.scoring-dialog-scrim.is-visible { opacity: 1; pointer-events: auto; }
.scoring-dialog {
  width: min(1240px, calc(100vw - 188px - 48px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: 16px 24px 16px 212px;
  padding: 28px 32px 24px;
  overflow: auto;
  color: var(--ink);
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(16, 24, 40, .18), 0 4px 14px rgba(16, 24, 40, .08);
  outline: none;
}
.scoring-dialog::backdrop { background: transparent; }
.scoring-dialog fieldset { border: 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.scoring-dialog [hidden] { display: none !important; }
.scoring-dialog label { display: grid; gap: 6px; font-size: 13px; }
.scoring-dialog label, .scoring-fields > *, .scoring-criterion-header > *, .rule-threshold-fields > * { min-width: 0; }
.scoring-dialog input, .scoring-dialog select, .scoring-dialog textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  background: white;
}
.scoring-dialog textarea { min-height: 104px; resize: vertical; }
.scoring-dialog output { padding: 8px 0; overflow-wrap: anywhere; }
.scoring-dialog h2 { font-size: 24px; }
.rule-editor-header {
  position: sticky;
  top: -28px;
  z-index: 3;
  margin: -28px -32px 4px;
  padding: 24px 32px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.rule-editor-header .icon-button { flex: 0 0 44px; width: 44px; height: 44px; font-size: 20px; }
.scoring-fields, .rule-threshold-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 2px 0;
}
.rule-threshold-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rule-editor-inline-actions { display: flex; align-items: center; gap: 10px; }
.rule-template-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, .65fr) minmax(220px, .85fr);
  gap: 12px;
  align-items: end;
}
.rule-template-grid > * { min-width: 0; }
.rule-template-grid > .button {
  min-height: 52px;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.35;
}
.rule-template-picker { position: relative; display: grid; gap: 6px; min-width: 0; }
.rule-template-label { font-size: 13px; }
.rule-template-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.rule-template-trigger:hover,
.rule-template-trigger[aria-expanded="true"] { border-color: #8bb5ff; box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); }
.rule-template-trigger:disabled { cursor: not-allowed; opacity: .6; }
.rule-template-chevron { color: #667085; font-size: 20px; line-height: 1; }
.rule-template-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 2100;
  padding: 8px;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(16, 24, 40, .16), 0 2px 7px rgba(16, 24, 40, .08);
}
.rule-template-search input { min-height: 40px; }
#ruleTemplateOptions { display: grid; gap: 4px; max-height: 280px; overflow-y: auto; margin-top: 8px; }
.rule-template-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.rule-template-option:hover, .rule-template-option.is-selected { background: #eaf2ff; color: #1d4ed8; }
.rule-template-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rule-template-option small { color: var(--muted); font-size: 11px; }
.rule-template-option.is-selected small { color: #4f78c8; }
.rule-template-option em { color: var(--muted); font-size: 11px; font-style: normal; line-height: 1.45; }
.rule-template-option.is-selected em { color: #4f78c8; }
.rule-template-empty { margin: 8px 4px; color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.scoring-criterion { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.rule-editor-summary, .rule-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rule-editor-footer { border-top: 1px solid var(--line); padding-top: 16px; }
.rule-editor-footer [role="status"] { flex: 1 1 200px; overflow-wrap: anywhere; color: #b42318; }
.scoring-criterion-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 120px 44px;
  gap: 12px;
  margin-bottom: 12px;
  align-items: end;
}
.special-channel-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfe;
  display: grid;
  gap: 14px;
}
.special-channel-row + .special-channel-row { margin-top: 12px; }
.special-channel-row .scoring-criterion-header { grid-template-columns: minmax(0, 1fr) 220px 110px 76px 44px; }
.channel-enabled { align-items: center; grid-template-columns: auto 1fr; gap: 6px !important; white-space: nowrap; }
.channel-enabled input { width: 16px !important; }
.channel-field-grid { display: grid; grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr); gap: 12px; }
#rubricWeightTotal { color: #067647; font-size: 13px; }
#rubricWeightTotal.invalid { color: #b42318; }
#ruleCreateJob { justify-self: start; }
.rule-discard { padding: 16px 0; border-bottom: 1px solid var(--line); }
.rule-discard p { margin-bottom: 12px; color: #b42318; font-size: 14px; }
.rule-toolbar select { max-width: 100%; }
#rulesView .page-heading, #rulesView .workspace-title { flex-wrap: wrap; gap: 12px; }
#rulesView .rule-copy { min-width: 0; overflow-wrap: anywhere; }
.nav button { position: relative; }
.readiness-band { padding: 12px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.readiness-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.readiness-heading h2 { font-size: 16px; }
.readiness-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.readiness-step { min-width: 0; display: grid; gap: 8px; align-content: start; }
.readiness-step strong { font-size: 13px; }
.readiness-step small { color: var(--muted); overflow-wrap: anywhere; }
.readiness-step .button { justify-self: start; }
.resume-preview { width: min(960px, calc(100vw - 32px)); }
.resume-page-controls { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.resume-page-image { height: 60vh; overflow: auto; border: 1px solid var(--line); background: #eef1f4; }
.resume-page-image img { display: block; width: 100%; height: auto; }
.resume-preview pre { min-height: 30vh; max-height: 60vh; overflow: auto; font-size: 14px; }
#scoringBatchForm { display: grid; gap: 16px; }
.scoring-dialog .batch-rescore { display: flex; align-items: center; gap: 8px; }
.scoring-dialog .batch-rescore input { width: 16px; height: 16px; flex: none; }
@media(max-width:650px) { .readiness-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media(max-width:900px) { .nav button:hover::after { content: attr(data-nav); position: absolute; left: 56px; top: 6px; padding: 7px 10px; background: #17202f; color: white; border-radius: 4px; white-space: nowrap; z-index: 30; } }
@media(max-width:650px) {
  .job-grid, .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .jobs-toolbar .search { flex-basis: 100%; min-width: 0; }
  .export-grid, .rule-layout { min-width: 0; }
  .check-list { gap: 12px 8px; }
}
@media(max-width:900px) {
  .scoring-dialog-scrim { inset: 0 0 0 72px; }
  .scoring-dialog { width: calc(100vw - 72px - 32px); margin: 12px 16px 12px 88px; padding: 22px 24px 20px; }
  .rule-editor-header { top: -22px; margin: -22px -24px 4px; padding: 20px 24px 16px; }
  .rule-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-template-picker { grid-column: 1 / -1; }
  .rule-template-grid > .button { min-height: 48px; }
  .rule-template-trigger { min-height: 48px; }
}
@media(max-width:600px) {
  .scoring-dialog { width: calc(100vw - 72px - 16px); max-height: calc(100vh - 16px); margin: 8px 8px 8px 80px; padding: 18px 16px 16px; }
  .rule-editor-header { top: -18px; margin: -18px -16px 4px; padding: 16px 16px 12px; }
  .rule-editor-header.workspace-title { flex-direction: row; align-items: center; }
  .rule-editor-header h2 { min-width: 0; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rule-editor-header .icon-button { flex-basis: 40px; width: 40px; height: 40px; }
  .scoring-fields, .rule-threshold-fields, .rule-template-grid { grid-template-columns: minmax(0, 1fr); }
  .rule-template-picker { grid-column: auto; }
  .scoring-criterion-header, .special-channel-row .scoring-criterion-header { grid-template-columns: minmax(0, 1fr) 44px; }
  .scoring-criterion-header > label:nth-child(2), .scoring-criterion-header > label:nth-child(3),
  .special-channel-row .scoring-criterion-header > label:nth-child(2),
  .special-channel-row .scoring-criterion-header > label:nth-child(3),
  .special-channel-row .scoring-criterion-header > label:nth-child(4) { grid-column: 1; }
  .scoring-criterion-header > button, .special-channel-row .scoring-criterion-header > button { grid-column: 2; grid-row: 1; }
  .channel-field-grid { grid-template-columns: minmax(0, 1fr); }
}
