﻿:root {
  --bg: #f3efe8;
  --ink: #1f2a30;
  --card: #fffaf4;
  --line: #d6c7b3;
  --accent: #a34f2f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  background: radial-gradient(circle at top right, #efe1d2, var(--bg));
  color: var(--ink);
}

.container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px 40px;
}

h1 { margin: 0 0 8px; }
.subtitle { margin: 0 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.table-wrap {
  overflow-x: auto;
}

.extra-spec-preview {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.extra-spec-preview:empty {
  display: none;
}

.extra-spec-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.extra-spec-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.extra-spec-head h3,
.extra-spec-head p {
  margin: 0;
}

.extra-spec-head h3 {
  font-size: 16px;
}

.extra-spec-head p {
  color: #7d664f;
  font-size: 13px;
}

.extra-spec-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.extra-sample-card .table-wrap {
  margin-top: 10px;
}

.extra-sample-card h3 {
  margin: 0;
  font-size: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

th, td {
  border: 1px solid var(--line);
  padding: 6px;
  text-align: center;
}

td input {
  width: 100%;
  border: 1px solid #e3d6c5;
  border-radius: 6px;
  padding: 6px;
}

.actions {
  display: flex;
  gap: 10px;
}

button {
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #fdf1e8;
}

.status {
  margin-top: 12px;
  font-weight: 600;
}

.preview-card {
  padding: 18px;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.preview-meta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #efe3d3;
  color: #7b4b2e;
  font-size: 14px;
  font-weight: 700;
}

.preview-surface {
  overflow-x: auto;
  border: 1px solid #dec9b1;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(250, 225, 203, 0.9), transparent 30%),
    linear-gradient(180deg, #fffdf9 0%, #f9f1e8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.preview-sheet {
  min-width: 900px;
  padding: 28px;
}

.preview-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.preview-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9b7454;
}

.preview-sheet h3,
.preview-sheet h4 {
  margin: 0;
}

.decision-badge {
  padding: 10px 18px;
  border-radius: 999px;
  background: #f2e7d8;
  color: #6f4b31;
  font-size: 15px;
  font-weight: 800;
}

.decision-badge.pass {
  background: #dcefdc;
  color: #1f6a37;
}

.decision-badge.fail,
.decision-badge.reject {
  background: #f8d8d5;
  color: #9f2f2f;
}

.preview-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.preview-field {
  padding: 14px;
  border: 1px solid #e4d3bf;
  border-radius: 16px;
  background: rgba(255,255,255,0.76);
}

.preview-field strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #8f694b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preview-field span {
  font-size: 16px;
  font-weight: 700;
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.preview-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

.preview-table {
  min-width: 100%;
  background: rgba(255,255,255,0.84);
}

.preview-table th {
  background: #f2e6d6;
  font-size: 13px;
}

.preview-table td {
  font-size: 13px;
}

.preview-stats {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.preview-extra-bands {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.preview-extra-band {
  padding-top: 18px;
  border-top: 1px solid #e4d3bf;
}

.preview-extra-band-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.stat-card {
  padding: 14px;
  border: 1px solid #e4d3bf;
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
}

.stat-card strong {
  display: block;
  margin-bottom: 6px;
  color: #7d5639;
}

.stat-card span {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.stat-card small {
  color: #7c746a;
}

.empty-note {
  padding: 18px;
  border: 1px dashed #d5bea5;
  border-radius: 16px;
  color: #86664d;
  background: rgba(255,255,255,0.55);
}

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

  .preview-sheet {
    min-width: 0;
    padding: 18px;
  }

  .preview-head,
  .preview-sheet-head,
  .actions {
    flex-wrap: wrap;
  }
}

