* {
  box-sizing: border-box;
}

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #fff8ee;
  --panel: #fffdf9;
  --line: #ecd9bf;
  --line-strong: #f5bf73;
  --ink: #172033;
  --text: #2f3a4f;
  --muted: #7b6a55;
  --quiet: #9aa4b2;
  --orange: #ff8a00;
  --orange-strong: #f45b0b;
  --green: #2fa84f;
  --blue: #2672d9;
  --red: #d94f2b;
  --shadow: 0 18px 38px rgba(66, 43, 17, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 1180px;
  background:
    linear-gradient(90deg, #ffffff 0, #ffffff 238px, transparent 238px),
    var(--bg);
  color: var(--text);
  font: 14px/1.5 "Inter", "Segoe UI", "Source Han Sans SC", "Noto Sans SC", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
select,
input {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

button {
  min-height: 34px;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  border-color: var(--orange);
  color: var(--orange-strong);
}

button.primary {
  border-color: var(--orange);
  background: linear-gradient(90deg, var(--orange), #ff742f);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(244, 91, 11, 0.18);
}

button.ghost {
  background: #fffaf3;
  color: #69481f;
}

button.small-primary {
  min-height: 32px;
  padding: 0 12px;
}

input,
select {
  height: 36px;
  padding: 0 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.12);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 4;
  width: 238px;
  padding: 22px 14px 18px;
  background: #fffefe;
  border-right: 1px solid #e9edf2;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: block;
}

.brand h1 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
}

.brand p {
  margin: 4px 0 0;
  color: var(--quiet);
  font-size: 12px;
}

nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: #596579;
  text-decoration: none;
  font-weight: 800;
}

nav a.active,
nav a:hover {
  background: #fff0e6;
  color: var(--orange-strong);
}

.side-note {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  display: grid;
  gap: 6px;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.45;
}

.side-note b {
  color: #6f4d24;
}

.workspace {
  margin-left: 238px;
  padding: 26px 30px 48px;
}

.page-head,
.section-head,
.head-actions,
.toolbar,
.filters,
.mode-switch,
.summary-strip,
.report-title {
  display: flex;
  align-items: center;
}

.page-head {
  justify-content: space-between;
  gap: 24px;
  max-width: 1220px;
  margin: 0 auto 14px;
}

.page-head h2 {
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
}

.page-head p,
.section-head p,
.report-title p,
.report-summary,
.side-note {
  color: var(--muted);
}

.page-head p {
  margin: 0;
  font-size: 13px;
}

.head-actions {
  justify-content: flex-end;
  gap: 10px;
}

.site-select {
  display: grid;
  gap: 1px;
  min-width: 142px;
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.site-select span {
  color: var(--quiet);
  font-size: 11px;
}

.site-select select {
  height: 20px;
  min-width: 112px;
  padding: 0 22px 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  outline: none;
}

.admin-config {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px auto minmax(220px, 0.7fr);
  gap: 10px;
  align-items: end;
  max-width: 1220px;
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf3;
}

.admin-config[hidden] {
  display: none;
}

.admin-config label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-config span {
  color: var(--muted);
  font-size: 12px;
}

.mode-switch {
  max-width: 1220px;
  margin: 0 auto 18px;
  gap: 6px;
  padding: 6px;
  width: max-content;
  border: 1px solid #e9edf2;
  border-radius: 8px;
  background: #ffffff;
}

.mode-switch button {
  min-width: 102px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.mode-switch button.active {
  background: var(--orange);
  color: #ffffff;
}

.mode-switch button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.metric-grid,
.summary-strip,
.history-panel,
.asin-panel,
.dashboard-grid,
.module-page,
.asset-panel,
.report-grid,
.qa-panel {
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  min-height: 92px;
  padding: 18px 20px;
  border: 1px solid #e9edf2;
  border-radius: 8px;
  background: var(--surface);
}

.metric-card span,
.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--orange-strong);
  font-size: 30px;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 7px;
  color: var(--quiet);
  font-size: 12px;
}

.metric-card-accent {
  border-color: #ffd3aa;
  background: linear-gradient(180deg, #fff4ea, #ffffff);
}

.summary-strip {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

.summary-strip div {
  min-width: 120px;
}

.summary-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.history-panel,
.panel,
.asin-panel,
.asset-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.history-panel,
.asin-panel,
.asset-panel,
.panel,
.qa-panel {
  padding: 18px;
}

.section-head {
  justify-content: space-between;
  gap: 16px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.section-head h3,
.report-title h3,
.sub-block h4 {
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
}

.section-head h3,
.report-title h3 {
  font-size: 16px;
}

.section-head p {
  margin: 5px 0 0;
  font-size: 12px;
}

.filters,
.toolbar {
  gap: 9px;
}

.filters select {
  min-width: 136px;
}

.history-search {
  min-width: 248px;
  background: #ffffff;
}

[data-view-section][hidden] {
  display: none !important;
}

.module-page {
  margin-top: 18px;
}

.module-card {
  min-height: 420px;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.history-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) minmax(58px, 76px) 104px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.history-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.history-row.active,
.history-row:hover {
  border-color: var(--orange);
  background: #fff7ed;
}

.history-row .title {
  display: -webkit-box;
  min-width: 0;
  max-height: 2.7em;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-row .meta,
.small-text {
  color: var(--muted);
  font-size: 12px;
}

.history-row .meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row > strong {
  color: var(--orange-strong);
  font-size: 18px;
  text-align: right;
  white-space: nowrap;
}

.history-row > .small-text {
  min-width: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asin-panel {
  margin-top: 18px;
}

.asin-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.asin-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #ffffff;
}

.asin-card.active,
.asin-card:hover {
  border-color: var(--orange);
  background: #fffaf3;
}

.asin-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 12px;
  align-items: start;
}

.asin-card-copy {
  min-width: 0;
}

.asin-card-copy h4 {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.asin-card-copy p,
.asin-type-line {
  min-width: 0;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asin-score {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.asin-score strong {
  color: var(--orange-strong);
  font-size: 26px;
  line-height: 1;
}

.asin-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 11px;
}

.asin-stats span {
  min-width: 0;
  overflow: hidden;
  padding: 6px 7px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #fffaf3;
  color: #6f4d24;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asin-stats .good {
  border-color: #b7e1c1;
  background: #effaf1;
  color: #19713a;
}

.asin-stats .warn {
  border-color: #ffd4b8;
  background: #fff2ea;
  color: #c44200;
}

.asin-terms {
  margin-top: 11px;
  padding: 10px;
  border: 1px dashed #efd8bc;
  border-radius: 8px;
  background: #fffdfa;
}

.asin-terms b {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
}

.asin-runs {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.asin-run {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) 58px 46px 76px;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #fffaf3;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}

.asin-run span,
.asin-run small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asin-run strong,
.asin-run em {
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #ffd2a3;
  border-radius: 999px;
  background: #fff2e5;
  color: var(--orange-strong);
  font-size: 12px;
  font-weight: 900;
}

.pill.muted {
  border-color: #e5e7eb;
  background: #f6f7f9;
  color: #667085;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(310px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  margin-top: 18px;
}

.panel-wide {
  min-width: 0;
}

.category-cards {
  display: grid;
  gap: 9px;
}

.category-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #ffffff;
}

.category-card.active {
  border-color: var(--orange);
  background: #fff4e8;
}

.category-card strong {
  color: var(--ink);
  font-size: 13px;
}

.category-card .mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.bars {
  display: grid;
  gap: 9px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 164px 32px;
  gap: 10px;
  align-items: center;
  min-height: 24px;
  font-size: 12px;
}

.bar-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3e1ca;
}

.bar-track span {
  display: block;
  height: 100%;
  min-width: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange-strong), var(--orange));
}

.bar-row strong {
  color: var(--orange-strong);
  text-align: right;
}

.asset-panel {
  margin-top: 18px;
}

.asset-scope-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.asset-scope-stats span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #fffaf3;
  color: #7b6a55;
  font-size: 11px;
  font-weight: 700;
}

.asset-scope-stats strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.asset-group {
  min-height: 128px;
  padding: 12px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #ffffff;
}

.asset-group h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid #f0d8bb;
  border-radius: 999px;
  background: #fff7ea;
  color: #6f4d24;
  font-size: 12px;
  font-weight: 800;
}

.asset-group.competitor {
  border-color: #d8c7ff;
  background: #fbf8ff;
}

.asset-group.negative {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.asset-group.cautious {
  grid-column: span 2;
  border-color: #ffc6a6;
  background: #fff8f3;
}

.chip.competitor {
  border-color: #c4b5fd;
  background: #f3edff;
  color: #6d28d9;
}

.chip.negative {
  border-color: #cbd5e1;
  background: #eef2f7;
  color: #475569;
}

.chip.cautious {
  border-color: #ffb58a;
  background: #fff0e6;
  color: #c2410c;
}

.risk-list {
  display: grid;
  gap: 8px;
}

.risk-item {
  padding: 8px 9px;
  border: 1px solid #ffd0b6;
  border-radius: 8px;
  background: #fffdf9;
  color: #667085;
  font-size: 12px;
}

.risk-item strong {
  color: #c2410c;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.65fr) minmax(260px, 0.65fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.selected-report {
  border-color: #f7c88f;
}

.report-title {
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
}

.report-title > div {
  min-width: 0;
}

.report-title h3 {
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.report-title p {
  margin: 6px 0 0;
  font-size: 12px;
}

.score-card {
  width: 88px;
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid #f7c88f;
  border-radius: 8px;
  background: #fff1d7;
}

.score-card strong {
  color: var(--orange-strong);
  font-size: 34px;
  line-height: 1;
}

.score-card span {
  margin-top: -8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.report-summary {
  margin: 14px 0 0;
}

.score-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.score-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  color: #5a4630;
  font-size: 12px;
  font-weight: 900;
}

.score-row .bar-track {
  height: 9px;
}

.score-row .bar-track span {
  background: linear-gradient(90deg, var(--orange), var(--green));
}

.score-row strong {
  color: var(--ink);
  text-align: right;
}

.text-list {
  display: grid;
  gap: 8px;
}

.text-list.compact-list {
  gap: 7px;
}

.text-item {
  padding: 10px 11px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #fffaf3;
  color: #304157;
}

.sub-block {
  margin-top: 16px;
}

.sub-block h4 {
  margin-bottom: 9px;
  font-size: 13px;
}

.rank-list {
  display: grid;
  gap: 8px;
}

.rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 56px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f1e3d0;
}

.rank-row strong {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #fff0dc;
  color: var(--orange-strong);
  text-align: center;
  line-height: 24px;
}

.rank-row span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row b {
  color: var(--orange-strong);
  text-align: right;
}

.compare-cards {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.compare-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #ffffff;
}

.compare-card.own {
  border-color: var(--orange);
  background: #fff7ed;
}

.compare-card-top {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: start;
}

.compare-card-top strong {
  color: var(--ink);
}

.compare-card-title {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-score {
  color: var(--orange-strong);
  font-size: 24px;
  font-weight: 950;
  text-align: right;
}

.dimension-mini {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.dimension-mini span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #f1e3d0;
  border-radius: 8px;
  background: #fffaf3;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.dimension-mini em {
  font-style: normal;
}

.dimension-mini b {
  color: var(--ink);
  font-size: 13px;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.install-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #fffaf3;
}

.install-card h4 {
  color: var(--ink);
  font-size: 15px;
}

.install-card p,
.install-card li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.install-card ol {
  display: grid;
  gap: 6px;
  margin-left: 18px;
}

.install-card code {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 9px 10px;
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  background: #ffffff;
  color: #493829;
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 12px;
}

.qa-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.qa-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.qa-item {
  border: 1px solid #f0dfc9;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.qa-item summary {
  cursor: pointer;
  padding: 11px 12px;
  background: #fff7ed;
  color: var(--ink);
  font-weight: 900;
}

.qa-answer {
  padding: 11px 12px;
  color: #304157;
}

.empty {
  padding: 18px;
  border: 1px dashed #efd8bc;
  border-radius: 8px;
  background: #fffaf3;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1280px) {
  body {
    min-width: 1040px;
  }

  .sidebar {
    width: 214px;
  }

  .workspace {
    margin-left: 214px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .asset-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .asset-scope-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-config {
    grid-template-columns: 1fr 1fr auto;
  }

  .admin-config > span {
    grid-column: 1 / -1;
  }

  .install-grid {
    grid-template-columns: 1fr;
  }
}
.source-rule-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 18px;
}

.source-rule-strip span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7ea;
  color: #6d4a1d;
  font-size: 13px;
}

.source-asset-list {
  display: grid;
  gap: 16px;
}

.source-card {
  border: 1px solid #eadfce;
  border-radius: 16px;
  padding: 18px;
  background: #fffdf9;
}

.source-card-head,
.source-batch-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.source-card-head h4 {
  margin: 8px 0 4px;
  font-size: 18px;
}

.source-card-head p,
.source-more {
  margin: 0;
  color: #7b6a55;
  font-size: 12px;
}

.source-status-stack {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.source-status {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #fff0d9;
  color: #8b5715;
}

.source-status.success { background: #e7f7ed; color: #227447; }
.source-status.danger { background: #fde9e7; color: #b42318; }
.source-status.waiting { background: #fff0d9; color: #8b5715; }

.source-batch-summary {
  justify-content: flex-start;
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f4ed;
  font-size: 13px;
}

.source-table-wrap { overflow-x: auto; }
.source-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.source-table th, .source-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #eee5d8; }
.source-table th { color: #7b6a55; font-weight: 600; }
.compact-empty { padding: 14px; }

.source-count-guide,
.source-clean-state {
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 13px;
}

.source-count-guide {
  background: #eef6ff;
  color: #285a87;
  border: 1px solid #cfe3f7;
}

.source-clean-state {
  background: #f7f4ee;
  color: #6e6253;
}

.source-fold {
  border: 1px solid #eadfce;
  border-radius: 14px;
  background: #fffaf2;
  overflow: hidden;
}

.source-fold > summary {
  cursor: pointer;
  padding: 14px 16px;
  color: #8b5715;
  font-weight: 700;
}

.source-fold > summary span {
  display: block;
  margin-top: 4px;
  color: #7b6a55;
  font-size: 12px;
  font-weight: 400;
}

.source-fold[open] > summary { border-bottom: 1px solid #eadfce; }
.source-fold > .source-card { margin: 14px; }
.muted-fold { background: #f8f7f4; }
.muted-fold > summary { color: #655f57; }
