.rec-body {
  min-height: 100vh;
  background: var(--bg);
}

.rec-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.rec-heading,
.rec-results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.rec-heading {
  margin-bottom: 18px;
}

.rec-heading h1,
.rec-results-head h2 {
  margin: 0;
  line-height: 1.25;
}

.rec-heading h1 {
  font-size: 26px;
}

.rec-results-head h2 {
  font-size: 19px;
}

.rec-heading p,
.rec-results-head p {
  margin: 7px 0 0;
  color: var(--muted);
}

.rec-panel,
.rec-results-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.rec-input-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.rec-input-head div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rec-input-head span {
  color: var(--muted);
  font: 12px "SFMono-Regular", Consolas, monospace;
}

.rec-input {
  width: 100%;
  min-height: 230px;
  display: block;
  padding: 16px;
  border: 0;
  outline: 0;
  resize: vertical;
  color: var(--text);
  font: 13px/1.7 "SFMono-Regular", Consolas, monospace;
}

.rec-input:focus {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.rec-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-subtle);
}

.rec-status {
  color: var(--muted);
  font-size: 12px;
}

.rec-status[data-state='loading'] { color: var(--primary); }
.rec-status[data-state='success'] { color: var(--success); }
.rec-status[data-state='warning'],
.rec-status[data-state='error'] { color: var(--danger); }

.rec-results-panel {
  margin-top: 18px;
  padding-top: 20px;
}

.rec-results-head {
  align-items: center;
  padding: 0 20px 18px;
}

.rec-results-panel .table-scroll {
  border-top: 1px solid var(--line);
}

.rec-results td,
.rec-results th {
  vertical-align: middle;
}

.rec-code {
  font-size: 17px;
  font-weight: 750;
}

.rec-status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.rec-status-badge.success { background: var(--success-soft); color: var(--success); }
.rec-status-badge.empty { background: var(--warning-soft); color: var(--warning); }
.rec-status-badge.error { background: var(--danger-soft); color: var(--danger); }

@media (max-width: 680px) {
  .rec-main { width: min(100% - 20px, 1120px); padding-top: 24px; }
  .rec-heading { align-items: flex-start; }
  .rec-heading h1 { font-size: 23px; }
  .rec-input-head div { align-items: flex-start; flex-direction: column; gap: 3px; }
  .rec-footer { align-items: stretch; flex-direction: column; }
  .rec-footer .button { width: 100%; }
  .rec-results-head { align-items: flex-start; }
}
