/* PERSON MASTER V2.6 HR HISTORY */
.person-hr-history-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin: 0 0 16px;
  border: 1px solid rgba(54, 92, 71, 0.26);
  background:
    linear-gradient(120deg, rgba(239, 247, 241, 0.96), rgba(250, 252, 250, 0.96)),
    linear-gradient(90deg, rgba(58, 105, 78, 0.08), transparent);
  box-shadow: 0 10px 26px rgba(31, 61, 44, 0.08);
}

.person-hr-history-summary > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.person-hr-history-summary strong {
  font-size: 17px;
}

.person-hr-history-summary small {
  line-height: 1.45;
}

.person-hr-history-summary-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.person-hr-history-summary-metrics span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(54, 92, 71, 0.22);
  background: rgba(255, 255, 255, 0.84);
}

.person-hr-history-center,
.person-hr-history-person {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.person-hr-history-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.person-hr-history-dashboard > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(53, 78, 63, 0.2);
  background: linear-gradient(180deg, #ffffff, #f5f8f5);
}

.person-hr-history-dashboard span {
  font-size: 12px;
  color: #5d6962;
}

.person-hr-history-dashboard b {
  font-size: 22px;
  color: #26352d;
}

.person-hr-history-dashboard .is-warning {
  border-color: rgba(151, 113, 32, 0.45);
  background: linear-gradient(180deg, #fffdf7, #faf4e7);
}

.person-hr-history-note {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-left: 3px solid #4f735d;
  background: #f3f7f4;
  line-height: 1.45;
}

.person-hr-timeline {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.person-hr-event {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(53, 78, 63, 0.2);
  background: #fff;
}

.person-hr-event.is-ready {
  border-left: 4px solid #4d785d;
}

.person-hr-event.is-warning {
  border-left: 4px solid #9a742b;
}

.person-hr-event.is-error {
  border-left: 4px solid #9e4949;
}

.person-hr-event > header,
.person-hr-event > footer,
.person-hr-person-head,
.person-hr-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.person-hr-event > header > div,
.person-hr-person-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.person-hr-event > header strong,
.person-hr-event > header small,
.person-hr-event-grid b,
.person-hr-event-basis,
.person-hr-person-head * {
  overflow-wrap: anywhere;
}

.person-hr-event > header > span,
.person-hr-person-head > div > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(53, 78, 63, 0.22);
  background: #f5f8f5;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

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

.person-hr-event-grid p {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(53, 78, 63, 0.14);
  background: #fafcfb;
}

.person-hr-event-grid span,
.person-hr-event > footer,
.person-hr-event-basis span,
.person-hr-person-head small {
  color: #67736c;
  font-size: 12px;
}

.person-hr-event-basis {
  margin: 0;
  padding: 9px 10px;
  background: #f6f8f6;
  line-height: 1.4;
}

.person-hr-event > footer {
  padding-top: 6px;
  border-top: 1px solid rgba(53, 78, 63, 0.12);
}

.person-hr-person-head {
  padding: 13px;
  border: 1px solid rgba(53, 78, 63, 0.2);
  background: linear-gradient(180deg, #fff, #f5f8f5);
}

.person-hr-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.person-hr-form {
  min-width: 0;
}

.person-hr-form textarea {
  resize: vertical;
}

@media (max-width: 780px) {
  .person-hr-history-summary {
    grid-template-columns: 1fr;
  }

  .person-hr-history-summary-metrics {
    justify-content: flex-start;
  }

  .person-hr-history-dashboard,
  .person-hr-event-grid {
    grid-template-columns: 1fr;
  }

  .person-hr-event > header,
  .person-hr-event > footer,
  .person-hr-person-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
