/* V13.4: enterprise Debug Case identity, engineering record and project-asset closure. */

.engineering-bug-case-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: -5px;
}

.engineering-bug-case-profile > span,
.engineering-bug-case-profile > em {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.engineering-bug-case-profile > span {
  color: #3457d5;
  background: rgba(72, 107, 232, 0.11);
  border: 1px solid rgba(72, 107, 232, 0.22);
}

.engineering-bug-case-profile > em {
  color: #a36300;
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(245, 158, 11, 0.22);
  letter-spacing: 0.04em;
}

.engineering-bug-case-profile > strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 5px 10px;
  color: var(--bug-text);
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 9px;
  font-size: 12px;
}

.engineering-bug-case-profile > strong b {
  color: #17824b;
  font-size: 10px;
}

.debug-case-hero-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 7px !important;
  margin-top: 6px !important;
}

.debug-case-hero-tags > span {
  color: #93a9c6 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.debug-case-hero-tags > em {
  padding: 5px 9px !important;
  color: #dbeafe !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 750 !important;
}

.debug-case-hero-tags > b {
  padding: 6px 10px !important;
  color: #bbf7d0 !important;
  background: rgba(34, 197, 94, 0.11) !important;
  border: 1px solid rgba(74, 222, 128, 0.2) !important;
  border-radius: 9px !important;
  font-size: 11px !important;
}

.debug-workflow-hero > aside .debug-case-difficulty {
  color: #fde68a !important;
  background: rgba(245, 158, 11, 0.13) !important;
  border-color: rgba(251, 191, 36, 0.24) !important;
  letter-spacing: 0.03em !important;
}

.debug-workflow-report > header > div > p {
  margin: 5px 0 0;
  color: var(--debug-muted);
  font-size: 13px;
  font-weight: 700;
}

.debug-engineering-record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.debug-engineering-record-grid > article {
  min-height: 112px;
  padding: 15px;
  background: var(--debug-surface-soft);
  border: 1px solid var(--debug-border);
  border-radius: 13px;
}

.debug-engineering-record-grid span {
  display: block;
  margin-bottom: 9px;
  color: #4f46e5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.debug-engineering-record-grid strong {
  color: var(--debug-text);
  font-size: 13px;
  line-height: 1.55;
}

.debug-engineering-record-proof {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid rgba(79, 70, 229, 0.14);
  border-radius: 13px;
}

.debug-engineering-record-proof > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.debug-engineering-record-proof > div > span {
  color: var(--debug-muted);
  font-size: 10px;
  font-weight: 800;
}

.debug-engineering-record-proof em {
  padding: 4px 7px;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.09);
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.debug-engineering-record-proof p {
  margin: 0;
  color: var(--debug-muted);
  font-size: 12px;
  line-height: 1.55;
}

.debug-engineering-record-proof > strong {
  white-space: nowrap;
  color: #4f46e5;
  font-size: 13px;
}

.debug-workflow-report-actions {
  grid-template-columns: auto auto minmax(180px, 1fr) !important;
}

.debug-project-asset-shelf {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--v51-card, #fff);
  border: 1px solid var(--v51-border, #dbe4f0);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.debug-project-asset-shelf > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.debug-project-asset-shelf > header span {
  color: #4f46e5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.debug-project-asset-shelf > header h3 {
  margin: 5px 0 4px;
  color: var(--v51-text, #0f172a);
  font-size: 22px;
}

.debug-project-asset-shelf > header p {
  margin: 0;
  color: var(--v51-muted, #64748b);
  font-size: 12px;
}

.debug-project-asset-shelf > header > strong {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #4f46e5;
  font-size: 30px;
}

.debug-project-asset-shelf > header > strong small {
  color: var(--v51-muted, #64748b);
  font-size: 11px;
}

.debug-project-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.debug-project-asset-card,
.debug-project-asset-empty {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--v51-card-soft, #f7f9fc);
  border: 1px solid var(--v51-border, #dbe4f0);
  border-radius: 16px;
}

.debug-project-asset-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.debug-project-asset-card > header span,
.debug-project-asset-empty > span {
  color: #4f46e5;
  font: 850 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.debug-project-asset-card > header em {
  padding: 5px 8px;
  color: #1d6d42;
  background: rgba(34, 197, 94, 0.09);
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.debug-project-asset-card h4 {
  margin: 0;
  color: var(--v51-text, #0f172a);
  font-size: 17px;
}

.debug-project-asset-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.debug-project-asset-card dl > div {
  padding: 9px 10px;
  background: var(--v51-card, #fff);
  border: 1px solid var(--v51-border, #dbe4f0);
  border-radius: 10px;
}

.debug-project-asset-card dt {
  margin-bottom: 5px;
  color: var(--v51-muted, #64748b);
  font-size: 9px;
  font-weight: 800;
}

.debug-project-asset-card dd {
  margin: 0;
  color: var(--v51-text, #0f172a);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.debug-project-asset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.debug-project-asset-tags span {
  padding: 4px 7px;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.debug-project-asset-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--v51-border, #dbe4f0);
}

.debug-project-asset-card > footer p {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--v51-text, #0f172a);
  font-size: 11px;
}

.debug-project-asset-card > footer span {
  color: var(--v51-muted, #64748b);
  font-size: 10px;
}

.debug-project-asset-card button,
.debug-project-asset-empty button {
  min-height: 36px;
  padding: 0 13px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #6d4aff);
  border: 0;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.debug-project-asset-empty {
  grid-column: 1 / -1;
  justify-items: start;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(109, 74, 255, 0.05));
}

.debug-project-asset-empty strong {
  color: var(--v51-text, #0f172a);
  font-size: 17px;
}

.debug-project-asset-empty p {
  margin: 0;
  color: var(--v51-muted, #64748b);
  font-size: 12px;
}

html[data-theme="dark"] .engineering-bug-case-profile > span,
html[data-theme="dark"] .debug-project-asset-shelf > header span,
html[data-theme="dark"] .debug-project-asset-card > header span,
html[data-theme="dark"] .debug-project-asset-empty > span,
html[data-theme="dark"] .debug-engineering-record-grid span,
html[data-theme="dark"] .debug-engineering-record-proof em {
  color: #a5b4fc;
}

html[data-theme="dark"] .engineering-bug-case-profile > strong b {
  color: #86efac;
}

html[data-theme="dark"] .debug-project-asset-shelf,
html[data-theme="dark"] .debug-project-asset-card dl > div {
  background: #111827;
}

html[data-theme="dark"] .debug-project-asset-card,
html[data-theme="dark"] .debug-project-asset-empty {
  background: #0d1728;
}

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

  .debug-engineering-record-proof {
    grid-template-columns: 1fr;
  }

  .debug-project-asset-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .debug-engineering-record-grid,
  .debug-project-asset-card dl {
    grid-template-columns: 1fr;
  }

  .debug-workflow-report-actions {
    grid-template-columns: 1fr !important;
  }

  .debug-project-asset-shelf > header,
  .debug-project-asset-card > footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
