.digital-work-records {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.digital-work-records .work-records-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.digital-work-records .work-records-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.digital-work-records .work-records-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.digital-work-records .work-records-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #64748b;
  font-size: 13px;
}

.digital-work-records .work-records-table-wrap.is-empty {
  display: grid;
  align-items: center;
  justify-content: center;
}

.digital-work-records .work-records-table-wrap {
  min-height: 0;
}

.digital-work-records .filter-set {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.digital-work-records .list-search {
  position: relative;
  width: 280px;
}

.digital-work-records .list-search .mdi {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 15px;
}

.digital-work-records .list-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid #d7e0ea;
  border-radius: 4px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.digital-work-records .list-search input::placeholder {
  color: #8da0b4;
}

.digital-work-records .list-search input:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(58, 124, 165, 0.14);
  outline: none;
}

.digital-work-records .filter-btn {
  min-height: 38px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #d7e0ea;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.digital-work-records .filter-btn:hover {
  border-color: rgba(58, 124, 165, .32);
  color: var(--theme-primary-active);
}

.digital-work-records .work-records-filter {
  position: relative;
}

.digital-work-records .work-records-filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 150px;
  max-height: 280px;
  padding: 6px;
  z-index: 40;
  border: 1px solid #d7e0ea;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  overflow-y: auto;
}

.digital-work-records .work-records-filter-menu button {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.digital-work-records .work-records-filter-menu button:hover,
.digital-work-records .work-records-filter-menu button.active {
  background: rgba(58, 124, 165, 0.1);
  color: var(--theme-primary-active);
}

.digital-work-records .refresh-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid #d8e1eb;
  border-radius: 4px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.digital-work-records .refresh-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.digital-work-records .list-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 12px;
}

.digital-work-records .page-summary {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

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

.digital-work-records .digital-work-records-table .col-time { width: 14%; }

.digital-work-records .digital-work-records-table .col-module { width: 12%; }

.digital-work-records .digital-work-records-table .col-source { width: 10%; }

.digital-work-records .digital-work-records-table .col-status { width: 17%; }

.digital-work-records .digital-work-records-table .col-summary { width: 31%; }

.digital-work-records .digital-work-records-table .col-trace { width: 16%; }

.digital-work-records .digital-work-records-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 13px 12px;
  border-bottom: 1px solid #edf2f7;
  background: #f7fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}

.digital-work-records .digital-work-records-table tbody td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf2f7;
  color: #24324a;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
}

.digital-work-records .digital-work-records-table tbody tr {
  cursor: pointer;
  outline: none;
}

.digital-work-records .digital-work-records-table tbody tr:hover,
.digital-work-records .digital-work-records-table tbody tr:focus-visible {
  background: linear-gradient(90deg, rgba(58, 124, 165, .08), rgba(58, 124, 165, .03));
}

.digital-work-records .digital-work-records-table tbody tr:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(58, 124, 165, .28);
}

.digital-work-records .digital-work-records-table tbody tr:last-child td {
  border-bottom: 0;
}

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

.digital-work-records .work-records-table .col-time { width: 14%; }

.digital-work-records .work-records-table .col-module { width: 13%; }

.digital-work-records .work-records-table .col-source { width: 10%; }

.digital-work-records .work-records-table .col-status { width: 16%; }

.digital-work-records .work-records-table .col-summary { width: 31%; }

.digital-work-records .work-records-table .col-trace { width: 16%; }

.digital-work-records .work-record-status-stack {
  display: grid;
  gap: 5px;
  justify-items: center;
}

.digital-work-records .work-record-status-stack > span:last-child {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

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

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

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

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

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

.digital-work-records .work-record-trace-cell {
  color: #2563eb !important;
  word-break: break-all;
}

.digital-work-records .status-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.digital-work-records .status-pill.success {
  border-color: var(--success-line);
  background: var(--success-soft);
  color: var(--success-active);
}

.digital-work-records .status-pill.warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #f97316;
}

.digital-work-records .status-pill.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.digital-work-records .status-pill.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
}

.digital-work-records .status-pill.muted {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.digital-work-records .table-state,
.digital-work-records .work-records-empty {
  width: 100%;
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 28px 20px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.digital-work-records .table-state.error {
  background: linear-gradient(180deg, #fffdfd 0%, #fff6f6 100%);
}

.digital-work-records .table-state.error .mdi {
  color: #ef4444;
  font-size: 28px;
}

.digital-work-records .table-state.error strong {
  color: #0f172a;
  font-size: 15px;
}

.digital-work-records .table-state.error p {
  margin: 0;
}

.digital-work-records.is-detail {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
}

.digital-work-records .work-record-detail-page {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.digital-work-records .work-record-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 44px;
  padding: 0 2px;
}

.digital-work-records .work-record-detail-toolbar .back-action,
.digital-work-records .work-record-detail-toolbar .refresh-btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #d8e1eb;
  border-radius: 4px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 750;
}

.digital-work-records .work-record-detail-toolbar button:hover:not(:disabled) {
  border-color: rgba(var(--theme-primary-rgb, 58, 124, 165), .34);
  background: #f5fbff;
  color: var(--theme-primary-active);
}

.digital-work-records .work-record-detail-shell {
  min-height: 0;
}

.digital-work-records .work-record-detail-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px 18px 22px;
  overflow-y: auto;
  background: #f8fafc;
}

.digital-work-records .work-record-detail-body.inline-detail {
  padding: 0;
  overflow: visible;
  background: transparent;
}

.digital-work-records .work-record-detail-section,
.digital-work-records .work-record-detail-state {
  border: 1px solid #e5edf5;
  border-radius: 6px;
  background: #fff;
}

.digital-work-records .work-record-detail-section {
  padding: 14px;
}

.digital-work-records .work-record-detail-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 30px 18px;
  color: #64748b;
  text-align: center;
}

.digital-work-records .work-record-detail-state.error .mdi {
  color: #dc2626;
  font-size: 30px;
}

.digital-work-records .work-record-detail-state.error strong {
  color: #0f172a;
}

.digital-work-records .work-record-detail-state.error p {
  margin: 0;
}

.digital-work-records .work-record-detail-state.error button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fff;
  color: #dc2626;
  font-weight: 750;
}

.digital-work-records .work-record-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.digital-work-records .work-record-section-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
}

.digital-work-records .work-record-section-head > span:not(.status-pill) {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 750;
}

.digital-work-records .work-record-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.digital-work-records .work-record-info-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf2f7;
  border-radius: 4px;
  background: #f8fafc;
}

.digital-work-records .work-record-info-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.digital-work-records .work-record-info-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 13px;
}

.digital-work-records .work-record-result-text,
.digital-work-records .work-record-error-text,
.digital-work-records .work-record-inline-empty {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.65;
}

.digital-work-records .work-record-error-text {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fef2f2;
  color: #b91c1c;
}

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

.digital-work-records .work-record-tool-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #edf2f7;
  border-radius: 4px;
  background: #f8fafc;
}

.digital-work-records .work-record-tool-list strong {
  color: #0f172a;
  font-size: 13px;
}

.digital-work-records .work-record-tool-list span {
  color: #64748b;
  font-size: 12px;
}

.digital-work-records .work-record-code-block {
  max-height: 320px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .digital-work-records .work-records-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .digital-work-records .work-record-info-grid {
    grid-template-columns: 1fr;
  }
}
