/* P023: Human Resources is the single employee/account/permission portal. */
.hr-page {
  display: grid;
  gap: 16px;
}

.hr-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #f2fbf7 0%, #fff 58%, #eef7ff 100%);
}

.hr-eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
}

.hr-hero h2,
.hr-module-card h3 {
  margin: 0;
  color: var(--text-strong);
}

.hr-hero p,
.hr-module-card p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.hr-stats > div {
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: center;
  background: rgba(255, 255, 255, .88);
}

.hr-stats b,
.hr-stats span {
  display: block;
}

.hr-stats b {
  color: var(--green-700);
  font-size: 24px;
}

.hr-stats span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

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

.hr-module-card {
  min-height: 204px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 20px;
}

.hr-module-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: var(--mint-50);
  font-size: 28px;
}

.hr-module-card .btn {
  width: fit-content;
  grid-column: 2;
}

.hr-module-card.is-disabled {
  background: #f8faf9;
}

.hr-disabled-action {
  cursor: not-allowed;
  opacity: .68;
}

.hr-directory {
  padding: 20px;
}

.hr-user-management {
  display: grid;
  gap: 18px;
  padding: 22px;
  scroll-margin-top: 20px;
  border-color: #b9dfd2;
  background: linear-gradient(180deg, #f8fffc 0%, #fff 220px);
}

.hr-user-management > .section-title {
  margin: 0;
}

.hr-user-capability-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hr-user-capability-strip > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
}

.hr-user-capability-strip b,
.hr-user-capability-strip span {
  display: block;
}

.hr-user-capability-strip b {
  color: var(--text-strong);
  font-size: 14px;
}

.hr-user-capability-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.hr-user-create,
.hr-user-management .user-permission-stage {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: none;
}

.hr-user-management .user-permission-stage .mini-list {
  gap: 10px;
}

.hr-user-management .edit-details {
  background: #fbfdfc;
}

.hr-user-management .perm-group-card {
  background: #fff;
}

.hr-user-locked {
  padding: 22px;
  border-style: dashed;
}

.hr-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.hr-status.active {
  color: #08725a;
  background: #e4f7ef;
}

.hr-status.disabled {
  color: #8a5a12;
  background: #fff3da;
}

@media (max-width: 720px) {
  .hr-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .hr-module-grid {
    grid-template-columns: 1fr;
  }

  .hr-user-capability-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hr-module-card {
    min-height: 0;
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 16px;
  }

  .hr-module-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 23px;
  }
}

@media (max-width: 430px) {
  .hr-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hr-stats > div {
    min-width: 0;
    padding: 10px 6px;
  }

  .hr-stats b {
    font-size: 20px;
  }

  .hr-module-card .btn {
    width: 100%;
    grid-column: 1 / -1;
  }

  .hr-user-management {
    padding: 14px;
  }

  .hr-user-capability-strip {
    grid-template-columns: 1fr;
  }
}
