:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #18202a;
  --muted: #66717f;
  --line: #d8dee6;
  --accent: #1f7a6d;
  --accent-strong: #0f5f54;
  --warn: #9a5b00;
  --danger: #a43333;
  --shadow: 0 18px 45px rgba(24, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(340px, 0.8fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.upload-panel {
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 760;
  letter-spacing: 0;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.status {
  flex: 0 0 auto;
  min-width: 86px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 138px;
  border: 1px dashed #97a5b3;
  border-radius: 8px;
  background: #f9fbfc;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--accent);
  background: #eef8f6;
}

.drop-zone input {
  display: none;
}

.drop-title,
.drop-subtitle {
  display: block;
  text-align: center;
}

.drop-title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.drop-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.preview-wrap {
  margin-top: 18px;
  width: 100%;
  aspect-ratio: 1024 / 655;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080a0d;
  display: grid;
  place-items: center;
  overflow: hidden;
}

#preview {
  max-width: 100%;
  max-height: 100%;
  display: none;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 11px 18px;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

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

button.secondary {
  background: #e8edf2;
  color: var(--ink);
}

.result-panel {
  padding: 22px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#label {
  margin-top: 8px;
  font-size: 52px;
  font-weight: 820;
  line-height: 1;
}

.label-empty {
  color: #a2abb5;
}

.label-open {
  color: var(--accent-strong);
}

.label-closed {
  color: var(--danger);
}

.review-text {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.review-text.warn {
  color: var(--warn);
  font-weight: 700;
}

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

.metrics div,
.model-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfcfd;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.model-card p {
  font-size: 13px;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 14px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .panel-header {
    display: grid;
  }
}

