/* Diagnose / Dev view - all developer info, separated from the Scan workspace. */
.diagnose-view {
  display: grid;
  gap: 14px;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  width: 100%;
}

.diagnose-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.diagnose-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.diagnose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.diagnose-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(18, 12, 35, 0.7);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px);
  padding: 16px;
}

.diagnose-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.diagnose-card-heading h3 {
  margin: 2px 0 0;
  font-size: 17px;
}

.app-diagnosis-card {
  gap: 12px;
}

.diagnosis-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--text-soft);
  font-size: 12px;
  white-space: nowrap;
}

.app-diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.app-diagnosis-section {
  display: grid;
  gap: 8px;
  min-width: 0;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 11px 12px;
}

.app-diagnosis-section.ok {
  border-left-color: var(--mint);
}

.app-diagnosis-section.warn {
  border-left-color: var(--amber);
}

.app-diagnosis-section.risk {
  border-left-color: #ff6b8a;
}

.app-diagnosis-section.next {
  border-left-color: var(--cyan);
}

.app-diagnosis-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text);
}

.app-diagnosis-title strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-diagnosis-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 16px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.app-diagnosis-section li::marker {
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 1200px) {
  .diagnose-grid {
    grid-template-columns: 1fr;
  }

  .app-diagnosis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .scan-evidence-capture {
    grid-template-columns: 1fr;
  }

  .scan-evidence-images {
    grid-template-columns: 1fr;
  }

  .app-diagnosis-grid {
    grid-template-columns: 1fr;
  }

  .diagnosis-source {
    width: 100%;
    justify-content: center;
  }
}
