:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafd;
  --text: #101828;
  --body: #3f4a5c;
  --muted: #7b8798;
  --line: #dce4ef;
  --blue: #115df6;
  --blue-soft: #eaf1ff;
  --green: #17a05d;
  --green-soft: #e8f7ef;
  --amber: #f59e0b;
  --amber-soft: #fff4d8;
  --red: #ef4444;
  --red-soft: #fff0ef;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  --radius: 8px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 18px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 11px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
}

.brand-mark svg {
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.brand strong,
.brand em {
  display: block;
  font-style: normal;
}

.brand strong {
  font-size: 20px;
  line-height: 1.1;
}

.brand em {
  margin-top: 2px;
  color: #202a3b;
  font-size: 13px;
  font-weight: 800;
}

.sidebar-home-link {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}

.sidebar-home-link:hover {
  border-color: #8fb0f5;
  background: #dbeafe;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-list a {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--body);
  text-decoration: none;
  font-weight: 800;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}

.nav-list a:hover,
.nav-list a.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.nav-list span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eef3fb;
  color: #50617a;
  font-size: 11px;
  font-weight: 900;
}

.nav-list a.active span {
  background: var(--blue);
  color: #fff;
}

.quota-card {
  margin-top: auto;
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.quota-card small,
.quota-card p {
  margin: 0;
  color: var(--muted);
}

.quota-card strong {
  font-size: 28px;
  line-height: 1.1;
}

.quota-card b { font: inherit; }

.quota-track {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6edf7;
}

.quota-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 220ms var(--ease);
}

.workspace { min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(280px, 430px) auto;
  gap: 20px;
  align-items: center;
  padding: 0 26px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.topbar strong {
  display: block;
  margin-top: 1px;
}

.version-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.25;
}

.search-box {
  min-height: 42px;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.search-box svg,
.primary-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.topbar-actions,
.title-actions,
.report-actions,
.row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.diagnosis-page {
  display: grid;
  gap: 18px;
  padding: 26px;
}

.page-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.page-title h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.page-title p,
.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.workflow-panel {
  padding: 14px 16px;
}

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

.workflow-head strong {
  color: var(--text);
  font-size: 15px;
}

.workflow-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-steps li {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dbe5f2;
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.workflow-steps b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf2f8;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.workflow-steps strong,
.workflow-steps span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-steps strong {
  color: var(--text);
  font-size: 13px;
}

.workflow-steps span {
  margin-top: 2px;
  font-size: 12px;
}

.workflow-steps li.active {
  border-color: #9dbcf9;
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(17, 93, 246, .08);
}

.workflow-steps li.active b {
  background: var(--blue);
  color: #fff;
}

.workflow-steps li.done {
  border-color: #bfe8d1;
  background: #f3fbf6;
}

.workflow-steps li.done b {
  background: var(--green);
  color: #fff;
}

.workflow-steps li.error {
  border-color: #fecaca;
  background: #fff5f5;
}

.workflow-steps li.error b {
  background: var(--red);
  color: #fff;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(380px, 520px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.right-stack {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.input-panel,
.summary-panel,
.health-panel,
.issue-panel,
.action-panel,
.report-panel,
.method-panel,
.history-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.panel-head.compact { margin-bottom: 13px; }

.panel-head h2,
.method-panel h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.step-dot {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.input-panel {
  display: grid;
  gap: 15px;
}

.form-row,
.metric-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #202a3b;
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #ccd7e6;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
  outline: none;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #8db1f8;
  box-shadow: 0 0 0 4px rgba(17, 93, 246, .1);
}

fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
  margin: 0;
}

legend,
.section-label {
  margin-bottom: 8px;
  color: #202a3b;
  font-size: 13px;
  font-weight: 900;
}

.section-label {
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.import-box {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #cfe0ff;
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.import-box strong {
  color: var(--text);
}

.import-box p,
.import-box small {
  margin: 0;
  color: var(--body);
  font-size: 12px;
}

.import-box small {
  color: var(--blue);
  font-weight: 900;
}

.import-progress {
  display: grid;
  gap: 7px;
  margin: 4px 0;
  padding: 10px;
  border: 1px solid #bcd2ff;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.import-progress[hidden] {
  display: none;
}

.import-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--body);
  font-size: 12px;
  font-weight: 800;
}

.import-progress > div span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.import-progress > div b {
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.import-progress i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.import-progress i em {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #115df6, #16a34a);
  transition: width 160ms var(--ease);
}

.import-progress small {
  color: var(--muted);
  font-weight: 700;
}

.platform-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-tabs button,
.ghost-btn,
.tool-btn,
.report-actions button,
.history-table button,
.danger-btn {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--body);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  transition: border-color 180ms var(--ease), color 180ms var(--ease), background 180ms var(--ease);
}

.ghost-btn,
.tool-btn,
.danger-btn {
  min-height: 38px;
  padding: 0 14px;
}

.site-home-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  text-decoration: none;
}

.platform-tabs button:hover,
.platform-tabs button.selected,
.ghost-btn:hover,
.tool-btn:hover,
.report-actions button:hover,
.history-table button:hover {
  border-color: #8fb0f5;
  background: var(--blue-soft);
  color: var(--blue);
}

.danger-btn:hover {
  border-color: #fecaca;
  background: var(--red-soft);
  color: var(--red);
}

.primary-btn {
  min-height: 46px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 24px rgba(17, 93, 246, .22);
}

button:disabled,
.primary-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: .62;
  box-shadow: none;
}

.report-progress {
  margin: 16px 0 0;
  background: #f8fbff;
}

.summary-panel {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr) minmax(220px, .7fr);
  gap: 18px;
  align-items: center;
}

.score-ring {
  --score-deg: 0deg;
  --score-color: var(--blue);
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--score-color) var(--score-deg), #e8eef7 0);
}

.score-ring span,
.score-ring small {
  grid-area: 1 / 1;
}

.score-ring span {
  margin-top: -12px;
  font-size: 34px;
  font-weight: 900;
}

.score-ring small {
  margin-top: 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.summary-panel p {
  margin: 0;
  color: var(--body);
}

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

.summary-kpis div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.summary-kpis span,
.summary-kpis strong {
  display: block;
}

.summary-kpis span {
  color: var(--muted);
  font-size: 12px;
}

.summary-kpis strong {
  margin-top: 2px;
  font-size: 17px;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 10px;
}

.health-card {
  min-height: 136px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.health-card.good { background: linear-gradient(180deg, #fff 0%, var(--green-soft) 160%); }
.health-card.warn { background: linear-gradient(180deg, #fff 0%, var(--amber-soft) 160%); }
.health-card.risk { background: linear-gradient(180deg, #fff 0%, var(--red-soft) 160%); }

.health-card span {
  color: var(--muted);
  font-size: 12px;
}

.health-card strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
}

.health-card em {
  color: var(--body);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.score-line {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--body);
  font-size: 12px;
  font-weight: 800;
}

.score-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9eef6;
}

.score-track i {
  display: block;
  width: var(--score);
  height: 100%;
  border-radius: inherit;
  background: var(--score-color);
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
}

.report-render-loading {
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  color: var(--ink);
}

.report-render-loading strong {
  font-size: 18px;
}

.report-render-loading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.report-render-loading i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbeafe;
}

.report-render-loading em {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
  animation: reportLoading 1.2s ease-in-out infinite alternate;
}

@keyframes reportLoading {
  from { transform: translateX(0); }
  to { transform: translateX(120%); }
}

.method-panel {
  display: none;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 18px;
  align-items: start;
}

.report-main,
.report-audit {
  min-width: 0;
}

.audit-sticky {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.audit-sticky::-webkit-scrollbar {
  width: 8px;
}

.audit-sticky::-webkit-scrollbar-track {
  background: #eef3fb;
  border-radius: 999px;
}

.audit-sticky::-webkit-scrollbar-thumb {
  background: #b8c6da;
  border-radius: 999px;
}

.audit-sticky::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.report-audit h4 {
  margin-top: 0;
  font-size: 14px;
}

.report-audit .report-section,
.report-audit .quality-box,
.report-audit .conclusion-box {
  margin: 0;
}

.report-audit .quality-box,
.report-audit .quality-box ul,
.report-audit .confidence-grid {
  grid-template-columns: 1fr;
}

.audit-priority,
.audit-confirm {
  margin: 0;
  padding: 13px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #f8fbff;
}

.audit-priority {
  border-color: #fed7aa;
  background: #fffaf0;
}

.audit-priority h4,
.audit-confirm h4 {
  margin-top: 0;
}

.audit-priority p {
  margin: 0 0 10px;
  color: var(--body);
  font-size: 12px;
  line-height: 1.5;
}

.audit-priority ul,
.audit-confirm ol {
  margin: 0;
  padding-left: 18px;
}

.audit-priority li,
.audit-confirm li {
  margin: 6px 0;
}

.delivery-grade {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  margin: 16px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbff;
}

.delivery-grade strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 16px;
}

.delivery-grade p {
  margin: 0 0 6px;
  color: var(--body);
}

.delivery-grade span {
  color: var(--muted);
  font-size: 12px;
}

.delivery-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  background: var(--blue);
}

.delivery-grade.grade-a {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.delivery-grade.grade-a .delivery-mark {
  background: #16a34a;
}

.delivery-grade.grade-b {
  border-color: #fed7aa;
  background: #fffaf0;
}

.delivery-grade.grade-b .delivery-mark {
  background: #f59e0b;
}

.delivery-grade.grade-c {
  border-color: #fecaca;
  background: #fff5f5;
}

.delivery-grade.grade-c .delivery-mark {
  background: #ef4444;
}

.missing-guide-list {
  display: grid;
  gap: 10px;
}

.missing-guide-list section {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 11px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fffaf0;
}

.missing-guide-list b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #b45309;
  background: #ffedd5;
  font-size: 12px;
}

.missing-guide-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  line-height: 1.35;
}

.missing-guide-list p {
  margin: 4px 0;
  color: var(--body);
  font-size: 12px;
  line-height: 1.45;
}

.missing-guide-list p span {
  display: inline-block;
  min-width: 58px;
  margin-right: 5px;
  color: #92400e;
  font-weight: 800;
}

.missing-guide-list em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}

.report-audit .report-table {
  table-layout: fixed;
  font-size: 10px;
}

.report-audit .report-table th,
.report-audit .report-table td {
  padding: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}

.report-audit .report-table th:first-child,
.report-audit .report-table td:first-child {
  max-width: 150px;
  overflow-wrap: anywhere;
}

.report-audit .usage-table th:nth-child(1),
.report-audit .usage-table td:nth-child(1) {
  width: 34%;
}

.report-audit .usage-table th:nth-child(2),
.report-audit .usage-table td:nth-child(2) {
  width: 15%;
}

.report-audit .usage-table th:nth-child(3),
.report-audit .usage-table td:nth-child(3),
.report-audit .usage-table th:nth-child(4),
.report-audit .usage-table td:nth-child(4) {
  width: 13%;
}

.issue-list,
.action-list,
.method-list {
  display: grid;
  gap: 9px;
}

.action-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.issue-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.issue-item-rich {
  grid-template-columns: 42px minmax(0, 1fr) minmax(120px, auto);
  align-items: start;
}

.issue-rank {
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.issue-rank.high { background: var(--red); }
.issue-rank.medium { background: var(--amber); }
.issue-rank.low { background: #64748b; }

.issue-copy strong,
.issue-copy span,
.issue-item small {
  display: block;
}

.issue-copy strong {
  color: var(--text);
  font-size: 13px;
}

.issue-copy span,
.issue-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.issue-copy .issue-meta {
  margin: 4px 0 8px;
  color: var(--blue);
  font-weight: 900;
}

.issue-copy p {
  margin: 7px 0 0;
  color: var(--body);
  font-size: 12px;
  line-height: 1.55;
}

.issue-copy p b {
  display: inline-flex;
  min-width: 42px;
  margin-right: 6px;
  color: var(--text);
}

.issue-item-rich small {
  max-width: 150px;
  padding: 7px 9px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--body);
  text-align: right;
  font-weight: 900;
}

.action-card,
.method-list div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.action-card span {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.action-card strong,
.method-list strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--text);
}

.action-card ul,
.report-paper ul,
.report-paper ol {
  margin: 0;
  padding-left: 18px;
}

.action-card li,
.report-paper li {
  color: var(--body);
}

.report-panel {
  min-width: 0;
}

.report-panel.report-focus {
  animation: reportFocusPulse 1.8s ease;
}

@keyframes reportFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(17, 93, 246, 0.28), var(--soft-shadow); }
  45% { box-shadow: 0 0 0 7px rgba(17, 93, 246, 0.12), var(--soft-shadow); }
  100% { box-shadow: var(--soft-shadow); }
}

.report-toolbar {
  align-items: center;
}

.report-toolbar > div:first-of-type {
  flex: 1;
}

.report-paper {
  min-height: 520px;
  padding: 24px;
  border: 1px solid #dce4ef;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.report-cover {
  margin: 0 0 22px;
  padding: 28px;
  border: 1px solid #cfe0ff;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(17, 93, 246, 0.1), rgba(22, 163, 74, 0.08)),
    #ffffff;
}

.cover-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--body);
}

.cover-brand span {
  color: var(--blue);
  font-weight: 900;
  font-size: 18px;
}

.cover-brand strong {
  color: var(--muted);
  font-size: 12px;
}

.report-cover h2 {
  max-width: 920px;
  margin: 0 auto 10px;
  color: var(--ink);
  font-size: 32px;
  line-height: 1.2;
  text-align: center;
}

.report-cover > p {
  margin: 0 auto 20px;
  color: var(--muted);
  text-align: center;
}

.cover-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.cover-kpis section {
  padding: 13px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.cover-kpis span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.cover-kpis strong {
  color: var(--ink);
  font-size: 20px;
}

.cover-conclusion {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: #ffffff;
}

.cover-conclusion b {
  color: var(--ink);
}

.cover-conclusion span {
  color: var(--body);
  line-height: 1.7;
}

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

.module-insight section {
  padding: 12px;
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: #f8fbff;
}

.module-insight span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.module-insight strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.report-brand {
  color: var(--blue);
  font-weight: 900;
}

.report-paper h3 {
  margin: 18px 0 8px;
  font-size: 26px;
  text-align: center;
}

.report-paper h4 {
  margin: 18px 0 8px;
  font-size: 16px;
}

.report-paper p {
  margin: 0 0 10px;
  color: var(--body);
}

.report-meta {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.conclusion-box {
  margin: 16px 0;
  padding: 13px;
  border: 1px solid #cfe0ff;
  border-radius: var(--radius);
  background: var(--blue-soft);
}

.visual-summary {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.visual-score,
.visual-kpi-card {
  border: 1px solid #dce4ef;
  border-radius: var(--radius);
  background: #fff;
}

.visual-score {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, #fff 0%, #f5f9ff 100%);
}

.visual-score-ring {
  --score: 0;
  width: 122px;
  height: 122px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 55%, transparent 56%),
    conic-gradient(var(--blue) calc(var(--score) * 1%), #e8eef7 0);
}

.visual-score-ring strong,
.visual-score-ring span {
  grid-area: 1 / 1;
}

.visual-score-ring strong {
  margin-top: -12px;
  font-size: 30px;
  line-height: 1;
}

.visual-score-ring span {
  margin-top: 36px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.visual-score p {
  margin: 0;
  color: var(--body);
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

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

.visual-kpi-card {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 13px;
  border-top: 4px solid var(--accent);
}

.visual-kpi-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.visual-kpi-card strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.visual-kpi-card i {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf2f8;
}

.visual-kpi-card i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.visual-kpi-card p {
  margin: 0;
  color: var(--body);
  font-size: 12px;
  line-height: 1.45;
}

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

.boss-summary section {
  min-height: 132px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.boss-summary span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.boss-summary p {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.quality-box {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: start;
  margin: 10px 0 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.quality-box > div {
  min-height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: var(--radius);
  background: var(--blue-soft);
  text-align: center;
}

.quality-box strong {
  color: var(--blue);
  font-size: 28px;
  line-height: 1.1;
}

.quality-box span {
  color: var(--body);
  font-size: 12px;
  font-weight: 900;
}

.quality-box ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quality-box li {
  margin: 0;
  padding: 9px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 12px;
}

.quality-box li b {
  display: inline-flex;
  margin-right: 6px;
}

.quality-box li.ok b {
  color: var(--green);
}

.quality-box li.missing b {
  color: var(--amber);
}

.outline-box {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}

.outline-box div {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.outline-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.outline-box p {
  margin: 0;
}

.report-note {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #d9e4f6;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--body);
  font-size: 12px;
}

.summary-grid.compact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.summary-grid.compact section {
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.summary-grid.compact span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.summary-grid.compact strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--text);
  font-size: 17px;
}

.summary-grid.compact p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}

.chart-card {
  min-height: 188px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.chart-card h5 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 13px;
}

.chart-row {
  display: grid;
  gap: 4px;
  margin: 8px 0;
}

.chart-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.chart-row-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-row p,
.chart-note,
.empty-text {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.chart-bar,
.stacked-chart {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.chart-bar i,
.stacked-chart i {
  display: block;
  height: 100%;
}

.stacked-chart {
  display: flex;
  height: 18px;
  margin: 6px 0 10px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--body);
  font-size: 11px;
  font-weight: 800;
}

.chart-legend b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.daily-trend-card {
  margin: 10px 0 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

.daily-trend-head strong {
  color: var(--text);
  font-size: 13px;
}

.daily-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.daily-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--body);
  font-size: 11px;
  font-weight: 800;
}

.daily-trend-legend b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.daily-trend-svg {
  width: 100%;
  height: auto;
  display: block;
}

.trend-grid-line {
  stroke: #e6edf7;
  stroke-width: 1;
}

.trend-axis-line {
  stroke: #cdd7e6;
  stroke-width: 1.2;
}

.trend-axis {
  fill: var(--muted);
  font-size: 11px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
}

.report-table th,
.report-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.report-table th {
  background: #f4f7fb;
  color: var(--body);
}

.quadrant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.quadrant-grid section {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.quadrant-grid section > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.quadrant-grid strong {
  color: var(--text);
  font-size: 14px;
}

.quadrant-grid span {
  min-width: 46px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.quadrant-grid p,
.quadrant-grid small,
.quadrant-grid em {
  margin: 0;
  line-height: 1.55;
}

.quadrant-grid small {
  color: var(--muted);
}

.quadrant-grid ul,
.quadrant-grid ol {
  flex: 1;
  margin: 0;
  padding-left: 0;
}

.quadrant-grid li {
  color: var(--body);
}

.sku-ranked-list {
  display: grid;
  gap: 7px;
  list-style: none;
}

.sku-ranked-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.sku-ranked-list li > b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.sku-ranked-list li strong,
.sku-ranked-list li span {
  display: block;
}

.sku-ranked-list li strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.sku-ranked-list li span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.quadrant-grid em {
  padding: 8px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-style: normal;
  font-weight: 800;
}

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

.confidence-grid section {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.confidence-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.confidence-grid strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
}

.confidence-grid p {
  margin: 0;
  color: var(--body);
}

.confidence-pill {
  display: inline-flex;
  min-width: 78px;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.confidence-pill.strong,
.confidence-pill.good {
  background: var(--green-soft);
  color: var(--green);
}

.confidence-pill.weak {
  background: var(--amber-soft);
  color: var(--amber);
}

.confidence-pill.missing {
  background: var(--red-soft);
  color: var(--red);
}

.confidence-table td:nth-child(4),
.usage-table td:first-child {
  max-width: 220px;
  word-break: break-word;
}

.report-actions-list {
  display: grid;
  gap: 10px;
}

.report-actions-list section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.ops-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.ops-card {
  min-height: 188px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.ops-card header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ops-card header b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
}

.ops-card header span,
.ops-card header em {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.ops-card header em {
  background: var(--surface-soft);
  color: var(--body);
}

.ops-card strong {
  color: var(--ink);
  line-height: 1.45;
}

.ops-card p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.ops-card footer {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.ops-card footer span,
.ops-card footer small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.report-issue-list p {
  margin: 4px 0;
}

.method-panel {
  align-self: stretch;
  display: none;
  flex-direction: column;
}

.method-panel h2 {
  margin-bottom: 12px;
}

.method-list {
  flex: 1;
  grid-template-rows: repeat(5, 1fr);
}

.method-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.method-list div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 96px;
}

.history-panel .panel-head {
  align-items: center;
}

.history-panel .panel-head > div {
  flex: 1;
}

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

.history-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.history-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.store-cell strong,
.store-cell span {
  display: block;
}

.store-cell span {
  color: var(--muted);
  font-size: 12px;
}

.score-pill {
  display: inline-flex;
  min-width: 48px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  color: #fff;
  font-weight: 900;
}

.score-pill.good { background: var(--green); }
.score-pill.warn { background: var(--amber); }
.score-pill.risk { background: var(--red); }

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

.import-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  height: min(780px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.modal-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

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

.modal-main {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(460px, 1.1fr);
  gap: 16px;
  align-items: stretch;
  overflow: hidden;
  padding: 0 22px 22px;
}

.modal-left,
.modal-right {
  min-height: 0;
  height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.modal-left {
  gap: 16px;
  overflow: auto;
  padding-right: 2px;
}

.modal-right {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.modal-summary {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.modal-summary strong {
  color: var(--title);
}

.modal-summary p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.modal-metrics span {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.modal-metrics b {
  color: var(--title);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.modal-metrics .ok b {
  color: var(--green);
}

.modal-metrics .warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.modal-metrics .warn b {
  color: var(--amber);
}

.modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid #bfd3ff;
  border-radius: 99px;
  background: #eef4ff;
  color: var(--blue);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.modal-recognition {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-recognition.empty {
  justify-content: flex-start;
}

.recognition-empty {
  border: 1px dashed #c8d6ef;
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  padding: 14px;
  line-height: 1.6;
}

.recognition-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.recognition-head strong {
  color: var(--text);
}

.recognition-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.recognition-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recognition-filter button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--body);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.recognition-filter button:hover:not(:disabled),
.recognition-filter button.active {
  border-color: #8fb0f5;
  background: var(--blue-soft);
  color: var(--blue);
}

.recognition-filter button:disabled {
  color: #a5b4c7;
  background: #f1f5fb;
}

.recognition-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  max-height: none;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.recognition-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 12px;
}

.recognition-table th,
.recognition-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.recognition-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5fb;
  color: var(--muted);
  font-weight: 900;
}

.recognition-table td:first-child {
  max-width: 260px;
}

.recognition-table td strong,
.recognition-table td span {
  display: block;
}

.recognition-table td span {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.recognition-table select {
  min-height: 34px;
  padding: 0 8px;
  font-size: 12px;
}

.recognition-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.recognition-badge.ok {
  background: var(--green-soft);
  color: var(--green);
}

.recognition-badge.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.recognition-pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.recognition-pager button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--body);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.recognition-pager button:hover:not(:disabled) {
  border-color: #8fb0f5;
  background: var(--blue-soft);
  color: var(--blue);
}

.recognition-pager button:disabled {
  color: #9aa8bd;
  background: #f1f5fb;
}

.modal-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.modal-form label.field-error {
  color: var(--red);
}

.modal-form input,
.modal-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--body);
}

.modal-form label.field-error input,
.modal-form label.field-error select {
  border-color: #ef4444;
  background: #fff7f7;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
}

.modal-card .report-progress {
  margin: 0;
}

@media (max-width: 920px) {
  .modal-card {
    height: auto;
    display: block;
    overflow-y: auto;
    padding: 22px;
  }

  .modal-head {
    padding: 0 0 16px;
  }

  .modal-main {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 0;
  }

  .modal-left {
    overflow: visible;
    padding-right: 0;
  }

  .modal-right {
    max-height: 460px;
  }
}

@media (max-width: 720px) {
  .modal-form {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions button {
    flex: 1 1 100%;
  }
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #111827;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1380px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .main-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .method-list {
    grid-template-rows: none;
  }

  .health-grid {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }

  .summary-panel {
    grid-template-columns: 126px minmax(0, 1fr);
  }

  .summary-kpis {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .action-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-shell {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .workspace,
  .diagnosis-page,
  .page-title,
  .workflow-panel,
  .main-grid,
  .right-stack,
  .report-grid,
  .input-panel,
  .summary-panel,
  .health-panel,
  .issue-panel,
  .action-panel,
  .report-panel,
  .history-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .nav-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .quota-card {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 14px 16px;
  }

  .diagnosis-page {
    padding: 16px;
  }

  .page-title {
    display: grid;
    align-items: start;
  }

  .workflow-head {
    display: grid;
    align-items: start;
  }

  .workflow-head span {
    text-align: left;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .main-grid,
  .report-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-row,
  .metric-inputs,
  .channel-grid,
  .health-grid,
  .visual-summary,
  .visual-kpis,
  .cover-kpis,
  .module-insight,
  .boss-summary,
  .quality-box,
  .quality-box ul,
  .ops-board,
  .quadrant-grid,
  .confidence-grid,
  .chart-grid,
  .report-layout,
  .summary-panel,
  .summary-kpis {
    grid-template-columns: 1fr;
  }

  .audit-sticky {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .score-ring {
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 13px;
  }

  .brand strong {
    font-size: 18px;
  }

  .nav-list,
  .title-actions,
  .topbar-actions,
  .report-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .page-title h1 {
    font-size: 25px;
  }

  .daily-trend-head {
    display: grid;
    align-items: start;
  }

  .issue-item {
    grid-template-columns: 36px 1fr;
  }

  .issue-item small {
    grid-column: 2;
  }

  .issue-item-rich small {
    max-width: none;
    text-align: left;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .page-title,
  .input-panel,
  .summary-panel,
  .health-panel,
  .issue-panel,
  .action-panel,
  .method-panel,
  .history-panel,
  .report-toolbar .step-dot,
  .report-actions,
  .toast {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .diagnosis-page,
  .report-grid,
  .report-layout {
    display: block;
    min-height: auto;
    padding: 0;
  }

  .report-panel,
  .report-paper {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .report-toolbar {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
