/* Current DigitalEmployeeWorkRecords scoped styles. Kept last to override retired rules above. */
.digital-work-records {
  height: 100%;
}

.digital-employee-list-panel,
.digital-work-records-list-stage {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.digital-work-records-table {
  min-width: 1180px;
  table-layout: fixed;
}

.digital-work-records-table .col-time { width: 14%; }
.digital-work-records-table .col-module { width: 13%; }
.digital-work-records-table .col-source { width: 10%; }
.digital-work-records-table .col-status { width: 16%; }
.digital-work-records-table .col-summary { width: 31%; }
.digital-work-records-table .col-trace { width: 16%; }

.work-record-row {
  outline: none;
}

.work-record-row:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(58, 124, 165, 0.28);
}

.work-record-summary-cell {
  text-align: left !important;
}

.work-record-summary-cell strong,
.work-record-summary-cell span,
.work-record-summary-cell em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-record-summary-cell strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.work-record-summary-cell span {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.work-record-summary-cell em {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.work-record-trace-cell {
  color: #2563eb !important;
}

:deep(.work-record-detail-page) {
  flex: 1 1 0;
  min-height: 0;
  padding: 16px 18px 0;
  background: transparent;
}

:deep(.work-record-detail-page .detail-scroll) {
  min-height: 0;
  display: block;
  padding-right: 4px;
  overflow: auto;
}

:deep(.work-record-detail-page .detail-scroll) > * + * {
  margin-top: 14px;
}

:deep(.work-record-detail-page .detail-grid) {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  width: min(100%, 1160px);
  margin: 0 auto;
}

:deep(.work-record-detail-page .detail-main),
:deep(.work-record-detail-page .detail-side) {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  min-width: 0;
}

:deep(.work-record-detail-page .detail-actions) {
  margin-top: 10px;
  padding: 10px 0 0;
}

:deep(.work-record-detail-page .enterprise-detail-card) {
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid #dbe4ee;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

:deep(.work-record-detail-page .enterprise-detail-card .card-head) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

:deep(.work-record-detail-page .enterprise-detail-card .card-head h3) {
  margin: 0;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 850;
}

:deep(.work-record-detail-page .enterprise-detail-card .card-head p) {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

:deep(.work-record-detail-page .edit-badge) {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(var(--theme-primary-rgb, 58, 124, 165), 0.22);
  border-radius: 4px;
  background: var(--theme-primary-soft);
  color: var(--theme-primary-active);
  font-size: 12px;
  font-weight: 800;
}

:deep(.work-record-summary-card .json-risk-meta-grid) {
  padding: 0;
}

:deep(.work-record-detail-page .json-risk-meta-item),
:deep(.work-record-detail-page .json-risk-description-text) {
  border-radius: 4px;
}

.work-record-summary-text {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
}

.work-record-error-text {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.6;
}

.work-record-tool-list {
  display: grid;
  gap: 8px;
}

.work-record-tool-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4ee;
  border-radius: 4px;
  background: #f8fafc;
  transition: border-color 160ms ease, background 160ms ease;
}

.work-record-tool-item:hover {
  border-color: rgba(var(--theme-primary-rgb, 58, 124, 165), 0.26);
  background: #f9fbff;
}

.work-record-tool-item strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-record-tool-item span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.work-record-inline-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.work-record-code-block {
  max-height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #dbe4ee;
  border-radius: 4px;
  background: #111827;
  color: #e5e7eb;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.digital-work-records :deep(.toolbar-actions .picker-filter),
.digital-work-records :deep(.toolbar-actions .picker-trigger) {
  min-width: 148px;
}

.digital-refresh-now {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.digital-refresh-now .mdi {
  font-size: 18px;
}

@media (max-width: 1180px) {
  .work-record-tool-item {
    grid-template-columns: 1fr;
  }
}
