.hr-workspace {
  --hr-line: #dce4e9;
  --hr-navy: #102942;
  --hr-gold: #efd4a4;
  --hr-soft: #f1f5f8;
  --hr-muted: #536477;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.hr-workspace .workspace-head,
.hr-workspace .toolbar,
.hr-workspace h1 {
  margin-block: 0;
}

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

.hr-metrics > .surface {
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 16px;
  color: var(--hr-muted);
}

.hr-metrics > .surface + .surface,
.hr-panel-stack > .surface + .surface,
.hr-workspace > .surface + .surface {
  margin-top: 0;
}

.hr-metrics strong {
  color: var(--hr-navy);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1;
}

.hr-tree ul,
.hr-list,
.hr-upload-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.hr-tree header {
  margin-bottom: 16px;
}

.hr-organization > li {
  display: grid;
  justify-items: center;
}

.hr-company {
  display: grid;
  justify-items: center;
  min-width: min(100%, 320px);
  max-width: 100%;
  padding: 16px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #10243a, #213e59);
  box-shadow: 0 7px 14px #10243a18;
  color: #fff;
  text-align: center;
  overflow-wrap: anywhere;
}

.hr-company span {
  color: var(--hr-gold);
  font-size: .83rem;
  margin-bottom: 3px;
}

.hr-company strong {
  font-size: 1.25rem;
}

.hr-tree .hr-heads {
  position: relative;
  width: min(100%, 400px);
  padding-block: 20px;
  display: grid;
  gap: 8px;
}

.hr-heads::before,
.hr-heads::after {
  content: "";
  position: absolute;
  left: calc(50% - .5px);
  width: 1px;
  height: 20px;
  background: var(--hr-line);
}

.hr-heads::before { top: 0; }
.hr-heads::after { bottom: 0; }

.hr-role {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px;
  text-align: left;
  background: #fff;
  color: var(--hr-navy);
  border: 1px solid var(--hr-line);
  border-radius: 11px;
  transition: background .18s ease, border-color .18s ease;
}

.hr-role:hover,
.hr-role:focus-visible {
  border-color: #94a8ba;
  background: #f9fbfc;
}

.hr-role-director {
  background: #f8f4eb;
  border-color: #ddcaac;
}

.hr-role-vacant {
  border-style: dashed;
}

.hr-avatar {
  border-radius: 10px;
  background: #eaf0f6;
  color: #24435f;
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  overflow: hidden;
  font-size: .85rem;
  font-weight: 700;
}

.hr-role-vacant .hr-avatar {
  background: #f7efe0;
  color: #6d4b24;
  font-size: 1.12rem;
}

.hr-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hr-avatar-large {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  font-size: 1.45rem;
}

.hr-role-body {
  display: grid;
  gap: 2px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.hr-role-body span,
.hr-role-body small {
  color: var(--hr-muted);
  font-size: .83rem;
}

.hr-chevron {
  font-size: 1.35rem;
  color: var(--hr-muted);
}

.hr-tree .hr-departments {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  align-items: start;
  gap: 12px;
  border-top: 1px solid var(--hr-line);
  padding-top: 12px;
}

.hr-department {
  min-width: 0;
  border: 1px solid var(--hr-line);
  background: var(--hr-soft);
  border-radius: 12px;
  padding: 0 10px 8px;
}

.hr-department summary {
  display: list-item;
  cursor: pointer;
  min-height: 54px;
  padding: 10px 4px 7px;
  color: var(--hr-navy);
}

.hr-department summary h3,
.hr-form-section summary h3,
.hr-private-section summary h2 {
  display: inline;
  font-size: 1rem;
}

.hr-department summary small {
  display: block;
  margin-left: 1em;
  color: var(--hr-muted);
}

.hr-tree .hr-department-roles,
.hr-tree .hr-reports,
.hr-list,
.hr-upload-list {
  display: grid;
  gap: 7px;
}

.hr-tree .hr-reports {
  margin: 7px 0 0 10px;
  padding-left: 8px;
  border-left: 1px solid #b7c7d3;
}

.hr-back {
  display: flex;
  min-height: 26px;
}

.hr-form,
.hr-panel-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.hr-form-grid,
.hr-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-block: 10px;
}

.hr-form-grid .field {
  min-width: 0;
  margin: 0;
}

.hr-form-grid input,
.hr-form-grid select,
.hr-form-grid textarea,
.hr-private-section input[type="file"] {
  min-width: 0;
  width: 100%;
}

.hr-form-grid .hr-field-wide {
  grid-column: 1 / -1;
}

.hr-form-section {
  border: 1px solid var(--hr-line);
  border-radius: 11px;
  padding: 12px;
}

.hr-form-section summary,
.hr-private-section summary {
  cursor: pointer;
  color: var(--hr-navy);
}

.hr-form-section[open] summary,
.hr-private-section[open] summary {
  margin-bottom: 14px;
}

.hr-form-message:empty {
  display: none;
}

.hr-form-message {
  color: #774523;
  margin: 6px 0 0;
}

.hr-employee-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px;
}

.hr-employee-title {
  flex: 1 1 210px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.hr-employee-title h1 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.hr-employee-title p {
  margin: 0 0 3px;
  color: var(--hr-muted);
}

.hr-profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.hr-data > div {
  border-bottom: 1px solid var(--hr-line);
  padding-bottom: 8px;
  min-width: 0;
}

.hr-data dt {
  color: var(--hr-muted);
  font-size: .82rem;
}

.hr-data dd,
.hr-notes {
  margin: 3px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hr-upload-list {
  margin-block: 10px;
}

.hr-upload-list li,
.hr-registry-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hr-upload-list li {
  justify-content: space-between;
  padding-block: 9px;
  border-bottom: 1px solid var(--hr-line);
}

.hr-upload-list li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hr-upload-list small {
  display: block;
  color: var(--hr-muted);
}

.hr-registry-filter {
  margin: 10px 0 14px;
  align-items: end;
}

.hr-registry-filter .field {
  min-width: 0;
  flex: 1 1 210px;
}

@media (max-width: 720px) {
  .hr-profile-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hr-metrics {
    gap: 6px;
  }

  .hr-metrics > .surface {
    padding: 9px 7px;
    font-size: .77rem;
  }

  .hr-form-grid,
  .hr-data {
    grid-template-columns: 1fr;
  }

  .hr-role {
    grid-template-columns: 29px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .hr-role .hr-avatar {
    width: 29px;
    height: 29px;
  }
}
