* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f8;
  color: #172033;
  font-family: Arial, Helvetica, sans-serif;
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: 32px auto;
}

.card {
  background: white;
  border: 1px solid #dde3ea;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

h1 {
  margin: 0 0 10px;
  font-size: 34px;
}

h2, h3 {
  margin-top: 0;
}

.muted {
  color: #687085;
  margin-bottom: 20px;
}

.upload {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

input[type="file"] {
  display: block;
  padding: 12px;
  border: 1px solid #dde3ea;
  border-radius: 12px;
  background: #fff;
}

button {
  border: none;
  border-radius: 12px;
  padding: 13px 18px;
  background: #111827;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.preview {
  display: block;
  max-width: 100%;
  max-height: 420px;
  margin-top: 18px;
  border-radius: 14px;
  border: 1px solid #dde3ea;
}

.status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef2ff;
  color: #26346b;
}

.status.error {
  background: #fff0f0;
  color: #8a1f1f;
}

.status.ok {
  background: #eef8f1;
  color: #1b6b36;
}

.hidden {
  display: none !important;
}

.label {
  font-size: 13px;
  color: #687085;
  margin-bottom: 5px;
}

.name {
  font-size: 28px;
  font-weight: 800;
}

.description {
  margin: 16px 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #dde3ea;
  border-radius: 14px;
  line-height: 1.5;
}

.metrics,
.quality {
  display: grid;
  gap: 12px;
}

.metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.quality {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metrics > div,
.quality > div {
  border: 1px solid #dde3ea;
  border-radius: 14px;
  padding: 14px;
}

.metrics span,
.quality span {
  display: block;
  color: #687085;
  font-size: 13px;
  margin-bottom: 6px;
}

.metrics b {
  font-size: 22px;
}

.quality b {
  font-size: 16px;
}

details {
  margin-top: 20px;
}

pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 14px;
  background: #0f172a;
  color: #e5e7eb;
}

@media (max-width: 760px) {
  .metrics,
  .quality {
    grid-template-columns: 1fr;
  }
}
