.digital-employees-view {
  height: 100%;
  min-height: 0;
}

.digital-employees-list {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  overflow: hidden;
}

.digital-employees-list > .status-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 28px;
  margin-top: 14px;
  padding-bottom: 0;
  border-bottom: 1px solid #dbe4ee;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.digital-employees-list > .status-tabs::-webkit-scrollbar {
  display: none;
}

.digital-employees-list > .status-tabs button {
  position: relative;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.digital-employees-list > .status-tabs button.active {
  color: var(--theme-primary-active);
}

.digital-employees-list > .status-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--theme-primary);
}

.digital-employees-table {
  min-width: 1060px;
}

/* Default first column left alignment */
.digital-employees-table th:first-child,
.digital-employees-table td:first-child {
  text-align: left;
}

.digital-skill-cell {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  justify-items: start;
  text-align: left;
}

.digital-skill-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.digital-skill-avatar.primary { background: var(--theme-gradient-primary); }
.digital-skill-avatar.rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.digital-skill-avatar.violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.digital-skill-avatar.blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.digital-skill-avatar.amber { background: linear-gradient(135deg, #f59e0b, #ea580c); }

.digital-skill-cell .doc-id {
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
}

.digital-employees-table .col-skill { width: 22%; }
.digital-employees-table .col-skill-type { width: 11%; }
.digital-employees-table .col-owner { width: 11%; }
.digital-employees-table .col-schedule { width: 16%; }
.digital-employees-table .col-mode { width: 10%; }
.digital-employees-table .col-status { width: 10%; }
.digital-employees-table .col-enabled { width: 10%; }
.digital-employees-table .col-updated { width: 10%; }

.digital-refresh-action i {
  font-size: 16px;
}

.digital-employee-detail {
  height: 100%;
}

.digital-employee-detail .detail-scroll {
  min-height: 0;
  overflow: auto;
}

.digital-employee-detail-actions .detail-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.digital-employee-detail-actions .success-action {
  border-color: var(--success-line);
  background: var(--success-soft);
  color: var(--success-hover);
}

.digital-employee-detail-actions .enable-action.is-on {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #ea580c;
}

.digital-work-records-section {
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 980px) {
  .digital-employees-table {
    min-width: 1040px;
  }

  .digital-employee-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .digital-employee-detail-actions .detail-action-group {
    justify-content: stretch;
  }

  .digital-employee-detail-actions .detail-action-group button {
    flex: 1 1 0;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .digital-employees-list {
    padding: 12px 0;
    overflow: auto;
  }

  .digital-employees-list > .status-tabs {
    gap: 18px;
    margin-top: 10px;
    padding: 0 12px 1px;
  }

  .digital-employee-list-panel .table-wrap {
    flex: 0 0 auto;
    min-height: 0;
    margin-top: 12px;
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .digital-employee-list-panel .list-foot {
    flex: 0 0 auto;
    padding: 0 12px;
  }

  .digital-employees-table,
  .digital-employees-table tbody,
  .digital-employees-table tr,
  .digital-employees-table td {
    display: block;
  }

  .digital-employees-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .digital-employees-table colgroup,
  .digital-employees-table thead {
    display: none;
  }

  .digital-employees-table tbody {
    display: grid;
    gap: 10px;
  }

  .digital-employees-table tr {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  }

  .digital-employees-table td {
    min-height: 34px;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 7px 0;
    border: 0;
    border-bottom: 1px dashed #e2e8f0;
    color: #334155;
    text-align: left;
    white-space: normal;
  }

  .digital-employees-table td:last-child {
    border-bottom: 0;
  }

  .digital-employees-table td::before {
    color: #64748b;
    font-size: 12px;
    font-weight: 760;
    line-height: 1.4;
  }

  .digital-employees-table td[data-label]::before {
    content: attr(data-label);
  }

  .digital-employees-table td:first-child {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .digital-employees-table td:first-child::before {
    display: none;
  }

  .digital-employees-table .doc-kind-tag,
  .digital-employees-table .type-tag,
  .digital-employees-table .status-tag {
    width: fit-content;
    max-width: 100%;
    justify-self: start;
    white-space: normal;
  }

  .digital-skill-cell {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .digital-skill-cell .doc-id {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .digital-employees-table td {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
  }

  .digital-skill-cell {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .digital-skill-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
}
