.smr-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  color: #0f172a;
}

.smr-head,
.smr-card,
.smr-filters,
.smr-summary-card {
  background: #fff;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.smr-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
}

.smr-kicker {
  margin: 0 0 6px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.smr-head h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.smr-copy {
  margin: 0;
  color: #526175;
  line-height: 1.45;
}

.smr-head-actions,
.smr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.smr-btn,
.smr-link-btn {
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  padding: 9px 13px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
}

.smr-primary,
.smr-link-btn {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.smr-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.smr-filters {
  margin-top: 16px;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.smr-filters label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 900;
  color: #475569;
  text-transform: uppercase;
}

.smr-filters input,
.smr-filters select,
.smr-action-panel textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 11px;
  min-width: 150px;
  font: inherit;
}

.smr-scope-note {
  flex: 1 1 100%;
  margin: 0;
  color: #526175;
  line-height: 1.45;
  font-size: 13px;
}

.smr-summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.smr-summary-card {
  padding: 13px;
}

.smr-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.smr-summary-card strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.smr-review-list {
  display: grid;
  gap: 12px;
}

.smr-review-card {
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.smr-review-card:hover {
  border-color: #2563eb;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
}

.smr-review-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.smr-review-top h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.smr-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.smr-review-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.smr-review-body p {
  margin: 4px 0 0;
  color: #334155;
  line-height: 1.35;
}

.smr-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.smr-review-meta span,
.smr-confidence {
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  padding: 5px 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.smr-confidence.is-high {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.smr-confidence.is-medium {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.smr-confidence.is-low {
  border-color: #fecaca;
  background: #fff1f2;
  color: #9f1239;
}

.smr-review-card .smr-link-btn {
  margin-top: 12px;
}

.smr-queue-workspace {
  margin-top: 16px;
}

.smr-queue-card {
  min-height: 420px;
}

.smr-card {
  padding: 16px;
}

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

.smr-card h2,
.smr-card h3 {
  margin: 0;
}

.smr-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

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

.smr-table th,
.smr-table td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.smr-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
}

.smr-status {
  display: inline-flex;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.smr-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.smr-wizard-head,
.smr-step {
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
  margin-top: 12px;
}

.smr-wizard-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 0;
}

.smr-wizard-head h2,
.smr-wizard-head p,
.smr-step h3 {
  margin: 0;
}

.smr-wizard-head p {
  margin-top: 5px;
  color: #475569;
  line-height: 1.45;
}

.smr-step-pill,
.smr-step-title span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
}

.smr-step-title {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.smr-wizard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.smr-wizard-modal[hidden] {
  display: none;
}

.smr-wizard-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, .58);
}

.smr-wizard-shell {
  width: min(1400px, 95vw);
  height: min(90vh, 920px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .38);
}

.smr-wizard-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid #e2e8f0;
}

.smr-wizard-modal-head h2,
.smr-wizard-modal-head p {
  margin: 0;
}

.smr-wizard-modal-head p {
  margin-top: 5px;
  color: #526175;
}

.smr-wizard-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: #e2e8f0;
}

.smr-wizard-progress span {
  background: #f8fafc;
  padding: 10px;
  text-align: center;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.smr-wizard-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 22px 32px;
}

.smr-warning-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.smr-warning {
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px;
  background: #fffbeb;
  color: #92400e;
  display: grid;
  gap: 3px;
}

.smr-warning.is-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.smr-warning.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.smr-warning.is-blocked {
  border-color: #fecaca;
  background: #fff1f2;
  color: #9f1239;
}

.smr-diff-table {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.smr-diff-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.smr-diff-table th,
.smr-diff-table td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.smr-diff-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
}

.smr-diff-table tr.is-match span {
  color: #166534;
  font-weight: 900;
}

.smr-diff-table tr.is-review span {
  color: #9f1239;
  font-weight: 900;
}

.smr-field {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 0;
}

.smr-field span,
.smr-raw span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.smr-field strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.smr-raw pre {
  white-space: pre-wrap;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  max-height: 180px;
  overflow: auto;
}

.smr-sale-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  cursor: pointer;
}

.smr-sale-card.is-search-result {
  border-color: #7dd3fc;
  background: #f0f9ff;
}

.smr-sale-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.smr-sale-card p {
  margin: 4px 0;
  color: #475569;
}

.smr-sale-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.smr-sale-meta a {
  border: 1px solid #2563eb;
  border-radius: 999px;
  padding: 5px 9px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.smr-sale-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.smr-sale-evidence-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px;
  background: #f8fafc;
  min-width: 0;
}

.smr-sale-evidence-grid span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.smr-sale-evidence-grid strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.smr-sale-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.smr-sale-warnings span {
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.smr-match-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.smr-match-notes div {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.smr-match-notes span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.smr-corrections label,
.smr-search-grid label,
.smr-note-label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.smr-corrections input,
.smr-corrections select,
.smr-search-grid input,
.smr-search-grid select,
.smr-note-label textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 11px;
  font: inherit;
}

.smr-search-results {
  margin-top: 12px;
}

.smr-modal-footer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(210px, 280px) 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid #dbe3ef;
  background: #fff;
  box-shadow: 0 -12px 28px rgba(15, 23, 42, .08);
}

.smr-modal-footer h3,
.smr-modal-footer p {
  margin: 0;
}

.smr-modal-footer p {
  margin-top: 4px;
  color: #526175;
  line-height: 1.35;
}

.smr-decision-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.smr-action-card {
  border: 1px solid #cbd7e6;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
  min-height: 68px;
}

.smr-action-card:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.smr-action-card strong,
.smr-action-card span {
  display: block;
}

.smr-action-card span {
  margin-top: 4px;
  color: #526175;
  line-height: 1.35;
}

.smr-action-panel {
  margin-top: 16px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.smr-check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  color: #334155;
  font-weight: 700;
}

.smr-action-panel textarea {
  width: 100%;
  min-height: 72px;
  margin-top: 10px;
  box-sizing: border-box;
}

.smr-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 18px;
  color: #64748b;
}

.smr-alert {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 420px;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
}

.smr-alert.is-ok {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.smr-alert.is-bad {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #9f1239;
}

.smr-modal[hidden] {
  display: none;
}

.smr-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, .58);
}

.smr-modal-card {
  width: min(760px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .38);
}

.smr-confirm-summary {
  display: grid;
  gap: 8px;
}

.smr-confirm-summary h3 {
  margin: 10px 0 0;
}

.smr-audit {
  margin-top: 16px;
}

.smr-audit-row {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 0;
}

@media (max-width: 980px) {
  .smr-wizard-progress,
  .smr-evidence-grid,
  .smr-wizard-grid,
  .smr-review-body,
  .smr-modal-footer,
  .smr-decision-actions,
  .smr-corrections,
  .smr-search-grid,
  .smr-match-notes {
    grid-template-columns: 1fr;
  }
}
