/* UA-ERP V2.8 HR OPERATIONS */
.hr-ops-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid rgba(49, 86, 65, 0.28);
  background:
    linear-gradient(120deg, rgba(238, 247, 241, 0.98), rgba(252, 253, 252, 0.98)),
    linear-gradient(90deg, rgba(55, 104, 76, 0.08), transparent);
  box-shadow: 0 10px 28px rgba(31, 61, 44, 0.08);
}

.hr-ops-summary > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

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

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

.hr-ops-center,
.hr-ops-tasks,
.hr-ops-journal,
.hr-ops-attachments {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

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

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

.hr-ops-dashboard span {
  font-size: 12px;
  color: #5f6a63;
}

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

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

.hr-ops-dashboard .is-error {
  border-color: rgba(158, 73, 73, 0.45);
  background: linear-gradient(180deg, #fffafa, #faeeee);
}

.hr-ops-dashboard .is-ready {
  border-color: rgba(59, 112, 78, 0.42);
  background: linear-gradient(180deg, #f8fcf9, #edf7ef);
}

.hr-ops-worker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-left: 4px solid #4f735d;
  background: #f3f7f4;
}

.hr-ops-worker.is-error {
  border-left-color: #9e4949;
  background: #fff4f4;
}

.hr-ops-worker > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hr-ops-worker small {
  overflow-wrap: anywhere;
}

.hr-ops-filters {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.4fr)
    minmax(150px, 0.8fr)
    minmax(170px, 0.9fr)
    minmax(170px, 0.9fr);
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(53, 78, 63, 0.2);
  background: #fafcfb;
}

.hr-ops-filters > * {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.hr-ops-tasks > header,
.hr-ops-journal > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(53, 78, 63, 0.16);
}

.hr-ops-tasks > header span,
.hr-ops-journal > header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(53, 78, 63, 0.22);
  background: #f5f8f5;
  font-weight: 700;
}

.hr-ops-tasks > div,
.hr-ops-journal > div,
.hr-ops-attachment-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.hr-ops-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(53, 78, 63, 0.2);
  border-left: 4px solid #6e7c73;
  background: #fff;
}

.hr-ops-task-card.is-error {
  border-left-color: #9e4949;
}

.hr-ops-task-card.is-high {
  border-left-color: #9a742b;
}

.hr-ops-task-card > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hr-ops-task-card > div:last-of-type {
  justify-items: end;
}

.hr-ops-task-card strong,
.hr-ops-task-card small,
.hr-ops-task-card p {
  overflow-wrap: anywhere;
}

.hr-ops-task-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: #8a3f3f;
}

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

.hr-ops-order-card.is-error {
  border-left: 4px solid #9e4949;
}

.hr-ops-order-card > header,
.hr-ops-order-card > footer,
.hr-ops-badges,
.hr-ops-actions,
.hr-ops-order-counters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.hr-ops-order-card > header > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hr-ops-order-card strong,
.hr-ops-order-card small,
.hr-ops-order-card footer span,
.hr-ops-order-grid b {
  overflow-wrap: anywhere;
}

.hr-ops-badges,
.hr-ops-actions,
.hr-ops-order-counters {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hr-ops-badges span,
.hr-ops-order-counters 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: normal;
  text-align: center;
}

.hr-ops-badges .is-task {
  border-color: rgba(151, 113, 32, 0.42);
  background: #fff8e8;
}

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

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

.hr-ops-order-grid span,
.hr-ops-order-card > footer {
  color: #67736c;
  font-size: 12px;
}

.hr-ops-order-card > footer {
  padding-top: 7px;
  border-top: 1px solid rgba(53, 78, 63, 0.12);
}

.hr-ops-attachment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(53, 78, 63, 0.2);
  background: #fff;
}

.hr-ops-attachment.is-revoked {
  opacity: 0.68;
  background: #f5f5f5;
}

.hr-ops-attachment > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hr-ops-attachment strong,
.hr-ops-attachment small,
.hr-ops-attachment p {
  overflow-wrap: anywhere;
}

.hr-ops-attachment p {
  margin: 0;
}

.hr-ops-upload {
  padding-top: 12px;
  border-top: 1px solid rgba(53, 78, 63, 0.16);
}

.modal-body:has(.hr-ops-center),
.modal-body:has(.hr-ops-attachments) {
  overflow-x: hidden;
}

.hr-ops-center *,
.hr-ops-attachments * {
  box-sizing: border-box;
}

@media (max-width: 980px) {
  .hr-ops-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hr-ops-summary,
  .hr-ops-worker,
  .hr-ops-task-card,
  .hr-ops-attachment {
    grid-template-columns: 1fr;
  }

  .hr-ops-dashboard,
  .hr-ops-order-grid,
  .hr-ops-filters {
    grid-template-columns: 1fr;
  }

  .hr-ops-order-card > header,
  .hr-ops-order-card > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hr-ops-badges,
  .hr-ops-actions,
  .hr-ops-order-counters,
  .hr-ops-task-card > div:last-of-type {
    justify-content: flex-start;
    justify-items: start;
  }

  .hr-ops-summary > button,
  .hr-ops-worker > button {
    width: 100%;
  }
}
