#hr-workspace,
#hr-workspace * {
  box-sizing: border-box;
  min-width: 0;
  letter-spacing: 0;
}

#hr-workspace {
  width: 100%;
  color: #172033;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#hr-workspace button,
#hr-workspace input,
#hr-workspace textarea,
#hr-workspace select {
  font: inherit;
}

#hr-workspace button,
#hr-workspace a,
#hr-workspace select,
#hr-workspace input[type="checkbox"] {
  cursor: pointer;
}

#hr-workspace button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.hr-page {
  display: grid;
  grid-template-columns: minmax(228px, 268px) minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}

.hr-sidebar {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 32, 51, .06);
}

.hr-department-select {
  display: grid;
  gap: 7px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e7ebf0;
}

.hr-department-select > span,
.hr-sidebar-title > span,
.hr-role-nav > span,
.hr-section-heading > div > span {
  color: #68758a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.hr-department-select select,
.hr-connect-card select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid #cdd6e2;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  outline: none;
}

.hr-department-select select:focus,
.hr-connect-card select:focus,
.hr-profile-grid textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.hr-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 2px 10px;
}

.hr-sidebar-title b {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #edf2f7;
  color: #536174;
  font-size: 12px;
}

.hr-role-list {
  display: grid;
  gap: 7px;
}

.hr-role-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f6f8fb;
  color: #253148;
  text-align: left;
}

.hr-role-button:hover {
  border-color: #b9c8db;
  background: #eef4fb;
}

.hr-role-button.active {
  border-color: #2563eb;
  background: #eaf2ff;
  color: #174caf;
}

.hr-role-button > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #dce7f5;
  font-size: 11px;
  font-weight: 800;
}

.hr-role-button.active > span {
  background: #2563eb;
  color: #fff;
}

.hr-role-button b {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.3;
}

.hr-role-button em {
  color: #8390a3;
  font-size: 19px;
  font-style: normal;
}

.hr-role-nav {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e7ebf0;
}

.hr-role-nav > span:not(:first-child) {
  margin-top: 11px;
}

.hr-role-nav button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #56647a;
  font-size: 13px;
  text-align: left;
}

.hr-role-nav button:hover,
.hr-role-nav button.active {
  background: #edf3fb;
  color: #194fae;
}

.hr-role-nav button.active {
  font-weight: 700;
}

.hr-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.hr-notice {
  padding: 11px 14px;
  border: 1px solid #b8c7da;
  border-radius: 6px;
  background: #f2f6fb;
  color: #30415a;
  font-size: 13px;
}

.hr-notice.success {
  border-color: #9dd8b5;
  background: #ecf9f1;
  color: #14633a;
}

.hr-notice.error {
  border-color: #efb0b0;
  background: #fff0f0;
  color: #9b2424;
}

.hr-role-header {
  display: grid;
  grid-template-columns: minmax(210px, .9fr) minmax(450px, 1.7fr);
  gap: 20px;
  align-items: stretch;
  padding: 20px;
  border-radius: 8px;
  background: #111b31;
  color: #fff;
}

.hr-role-identity {
  display: flex;
  gap: 13px;
  align-items: center;
}

.hr-role-identity > span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  border-radius: 7px;
  background: #2563eb;
  font-size: 16px;
  font-weight: 800;
}

.hr-role-identity h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 21px;
  line-height: 1.2;
}

.hr-role-identity p {
  margin: 6px 0 0;
  color: #aebbd0;
  font-size: 12px;
  line-height: 1.4;
}

.hr-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(68px, 1fr));
  border: 1px solid #31405d;
  border-radius: 6px;
  overflow: hidden;
}

.hr-kpi-strip > div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 66px;
  padding: 10px;
  border-left: 1px solid #31405d;
  text-align: center;
}

.hr-kpi-strip > div:first-child {
  border-left: 0;
}

.hr-kpi-strip b {
  font-size: 20px;
  line-height: 1;
}

.hr-kpi-strip span {
  color: #98a7be;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.hr-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  padding: 0 4px;
  border-bottom: 1px solid #d8e0e9;
  overflow-x: auto;
  scrollbar-width: thin;
}

.hr-tabs button,
.hr-tabs a {
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #657287;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.hr-tabs button:hover,
.hr-tabs button.active {
  color: #1d55b3;
}

.hr-tabs button.active {
  border-bottom-color: #2563eb;
}

.hr-tabs a {
  margin-left: auto;
}

.hr-content-card {
  width: 100%;
  padding: 20px;
  border: 1px solid #d9e1eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(23, 32, 51, .04);
}

.hr-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.hr-section-heading h2 {
  margin: 5px 0 0;
  color: #172033;
  font-size: 19px;
  line-height: 1.25;
}

.hr-section-heading p {
  max-width: 720px;
  margin: 7px 0 0;
  color: #68758a;
  font-size: 13px;
  line-height: 1.5;
}

.hr-primary,
.hr-secondary {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.hr-primary {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
}

.hr-primary:hover:not(:disabled) {
  border-color: #1d4fc1;
  background: #1d4fc1;
}

.hr-secondary {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
}

.hr-secondary:hover:not(:disabled) {
  border-color: #9aabc0;
  background: #f6f8fb;
}

.hr-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.hr-profile-grid label {
  display: grid;
  align-content: start;
  gap: 7px;
}

.hr-profile-grid label > span {
  color: #324057;
  font-size: 12px;
  font-weight: 700;
}

.hr-profile-grid textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid #ccd6e2;
  border-radius: 6px;
  background: #fbfcfe;
  color: #172033;
  line-height: 1.5;
  outline: none;
}

.hr-funnel-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px dashed #b5c2d1;
  border-radius: 6px;
  background: #f8fafc;
}

.hr-funnel-status.connected {
  border-style: solid;
  border-color: #96d4b0;
  background: #f0faf4;
}

.hr-funnel-status > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hr-funnel-status i {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 6px;
  background: #e3eaf3;
  color: #43536b;
  font-style: normal;
}

.hr-funnel-status.connected i {
  background: #ccefd9;
  color: #167044;
}

.hr-funnel-status span {
  display: grid;
  gap: 3px;
}

.hr-funnel-status small,
.hr-course-option small,
.hr-candidate-row small {
  color: #738097;
  font-size: 12px;
  line-height: 1.4;
}

.hr-funnel-status em {
  flex: 0 0 auto;
  color: #187448;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.hr-connect-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #e4e9ef;
  border-bottom: 1px solid #e4e9ef;
}

.hr-connect-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px;
  border-left: 1px solid #e4e9ef;
}

.hr-connect-card:first-child {
  border-left: 0;
}

.hr-connect-card > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #bfcadc;
  border-radius: 50%;
  color: #31517d;
  font-size: 12px;
  font-weight: 800;
}

.hr-connect-card h3,
.hr-connect-card p {
  margin: 0;
}

.hr-connect-card h3 {
  font-size: 15px;
}

.hr-connect-card p {
  flex: 1;
  color: #6b788d;
  font-size: 12px;
  line-height: 1.5;
}

.hr-connect-card a {
  color: #1e5bc3;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.hr-training-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid #dce3eb;
  border-radius: 6px;
  overflow: hidden;
}

.hr-training-summary > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-left: 1px solid #dce3eb;
}

.hr-training-summary > div:first-child {
  border-left: 0;
}

.hr-training-summary b {
  font-size: 22px;
}

.hr-training-summary span {
  color: #6d7a8d;
  font-size: 12px;
}

.hr-course-list,
.hr-candidate-list {
  display: grid;
  gap: 8px;
}

.hr-course-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid #dce3eb;
  border-radius: 6px;
  background: #fbfcfe;
}

.hr-course-option:has(input:checked) {
  border-color: #75a6f6;
  background: #eff6ff;
}

.hr-course-option input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #2563eb;
}

.hr-course-option > span {
  display: grid;
  gap: 4px;
}

.hr-course-option em {
  color: #3264aa;
  font-size: 11px;
  font-style: normal;
}

.hr-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e4e9ef;
}

.hr-candidate-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dce3eb;
  border-radius: 6px;
}

.hr-candidate-row > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e4ecf7;
  color: #245193;
  font-size: 11px;
  font-weight: 800;
}

.hr-candidate-row > div {
  display: grid;
  gap: 3px;
}

.hr-candidate-row > em {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #526075;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.hr-candidate-row > em.info { background: #eaf2ff; color: #1855b9; }
.hr-candidate-row > em.success { background: #e8f8ee; color: #166b3d; }
.hr-candidate-row > em.danger { background: #fff0f0; color: #a12b2b; }
.hr-candidate-row > em.warning { background: #fff7df; color: #8a5a09; }
.hr-candidate-row > em.muted { background: #f1f3f6; color: #748093; }

.hr-candidate-row > a {
  color: #1f5fc8;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.hr-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hr-analytics-grid > div {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dce3eb;
  border-radius: 6px;
  background: #fbfcfe;
}

.hr-analytics-grid span,
.hr-analytics-grid small {
  color: #6f7c90;
  font-size: 11px;
}

.hr-analytics-grid b {
  font-size: 24px;
}

.hr-analytics-grid i {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e1e7ef;
}

.hr-analytics-grid i em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.hr-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 170px;
  color: #6a778b;
  text-align: center;
}

.hr-empty b {
  color: #28364d;
  font-size: 16px;
}

.hr-empty span,
.hr-empty a {
  font-size: 13px;
}

.hr-empty a {
  color: #1f5fc8;
}

.hr-loading {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 420px;
  color: #627087;
}

.hr-loading i {
  width: 36px;
  height: 36px;
  border: 3px solid #dce5f1;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: hr-spin .8s linear infinite;
}

@keyframes hr-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .hr-page { grid-template-columns: minmax(210px, 235px) minmax(0, 1fr); gap: 13px; }
  .hr-role-header { grid-template-columns: 1fr; }
  .hr-kpi-strip { grid-template-columns: repeat(6, minmax(60px, 1fr)); }
  .hr-connect-grid { grid-template-columns: 1fr; }
  .hr-connect-card { border-left: 0; border-top: 1px solid #e4e9ef; }
  .hr-connect-card:first-child { border-top: 0; }
}

@media (max-width: 900px) {
  .hr-page { display: block; }
  .hr-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 13px;
  }
  .hr-role-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hr-role-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hr-role-nav > span { grid-column: 1 / -1; }
  .hr-profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .hr-sidebar,
  .hr-content-card,
  .hr-role-header { padding: 14px; }
  .hr-role-list,
  .hr-role-nav { grid-template-columns: 1fr; }
  .hr-section-heading { flex-direction: column; }
  .hr-section-heading .hr-primary,
  .hr-section-heading .hr-secondary { width: 100%; }
  .hr-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hr-kpi-strip > div { border-top: 1px solid #31405d; }
  .hr-kpi-strip > div:nth-child(-n + 2) { border-top: 0; }
  .hr-kpi-strip > div:nth-child(odd) { border-left: 0; }
  .hr-tabs a { margin-left: 0; }
  .hr-funnel-status { align-items: flex-start; flex-direction: column; }
  .hr-training-summary { grid-template-columns: 1fr; }
  .hr-training-summary > div { border-top: 1px solid #dce3eb; border-left: 0; }
  .hr-training-summary > div:first-child { border-top: 0; }
  .hr-action-row { flex-direction: column-reverse; }
  .hr-action-row button { width: 100%; }
  .hr-candidate-row { grid-template-columns: 40px minmax(0, 1fr); }
  .hr-candidate-row > em,
  .hr-candidate-row > a { grid-column: 2; justify-self: start; }
  .hr-analytics-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hr-loading i { animation: none; }
}
