:root {
  --bg: #f6f7f9;
  --surface: #fff;
  --text: #18202a;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button, input, textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}

.brand {
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.heading { margin-bottom: 22px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-weight: 800; font-size: 13px; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: 0; }
h2 { margin: 0 0 14px; font-size: 20px; }

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

.panel, .notice, .empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.notice { margin-bottom: 18px; border-color: #99d7ca; background: #ecfdf8; }

label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 800; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
}
textarea { resize: vertical; }

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--accent-dark);
  background: #e6fffa;
  font-weight: 800;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tabs button.active {
  border-color: var(--accent);
  background: #e6fffa;
  color: var(--accent-dark);
}

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

.summary-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.summary-card strong {
  font-size: 26px;
}

.error-text {
  color: #b42318;
  font-weight: 800;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters .active { border-color: var(--accent); background: #e6fffa; color: var(--accent-dark); }

.request-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-bottom: 10px;
  text-align: left;
}

.request-row span { display: grid; gap: 4px; }
small { color: var(--muted); }
.status { color: var(--accent-dark); font-weight: 800; }

.product-line {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr .8fr .7fr;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.product-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.product-table-head,
.product-table-row {
  display: grid;
  grid-template-columns: var(--product-columns);
  gap: 10px;
  min-width: 780px;
  align-items: end;
}

.product-table-head {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.product-table-row {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.compact-field {
  font-size: 12px;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  margin-top: 10px;
}

.api-help {
  margin-top: 16px;
}

pre {
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 13px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.timeline { margin: 0; padding-left: 22px; }
.timeline li { margin: 8px 0; }

@media (max-width: 760px) {
  .topbar, .request-row, .section-title { align-items: stretch; flex-direction: column; }
  .two, .product-line, .copy-row { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  .no-print, .topbar, .filters { display: none !important; }
  body { background: #fff; }
  .shell { width: 100%; padding: 0; }
  .panel { break-inside: avoid; }
}
