:root {
  --bg: #eef3f7;
  --ink: #172033;
  --muted: #667085;
  --line: #d8e0e8;
  --panel: #ffffff;
  --navy: #17365d;
  --teal: #0f766e;
  --amber: #b7791f;
  --red: #b42318;
  --green: #287345;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.panel,
.workspace {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(23, 54, 93, 0.08);
}

.controls {
  padding: 20px;
}

.brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.2;
  color: var(--navy);
}

h2 {
  font-size: 22px;
  color: var(--navy);
}

.brand p,
.toolbar p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.badge {
  border: 1px solid #b7d7ce;
  color: var(--teal);
  background: #e8f5f2;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  color: #344054;
}

input[type="file"],
input[type="text"],
input[type="password"],
input:not([type]) {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cdd6df;
  border-radius: 7px;
  padding: 9px 11px;
  font: inherit;
  background: #fbfcfe;
  color: var(--ink);
}

input:focus {
  border-color: #2b6cb0;
  outline: 3px solid rgba(43, 108, 176, 0.15);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.upload-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.file-list {
  min-height: 50px;
  border: 1px dashed #b9c6d3;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 14px;
  color: #344054;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.6;
}

.file-list.empty {
  color: var(--muted);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  font-weight: 700;
  color: #344054;
}

.switch input {
  display: none;
}

.switch span {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
}

.switch span::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  background: #fff;
  transition: transform 0.18s ease;
}

.switch input:checked + span {
  background: var(--teal);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

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

button,
.button {
  appearance: none;
  border: 0;
  border-radius: 7px;
  padding: 11px 16px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:disabled,
.button.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.button.secondary {
  background: var(--teal);
}

.workspace {
  min-width: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.preview {
  overflow: auto;
  min-height: 0;
  flex: 1;
}

.empty-state {
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #c7d2df;
  border-radius: 8px;
  background: #f8fafc;
}

.empty-title {
  font-weight: 800;
}

.store {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #fff;
}

.store-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 18px;
  background: #f7fbff;
  border-bottom: 1px solid var(--line);
}

.store-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--navy);
}

.score {
  min-width: 92px;
  text-align: center;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  padding: 10px 12px;
}

.score strong {
  display: block;
  font-size: 28px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--line);
}

.metric {
  background: #fff;
  padding: 12px;
}

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

.metric strong {
  font-size: 15px;
}

.section {
  padding: 16px 18px 12px;
  border-top: 1px solid #edf1f5;
}

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

.section h3 {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #c4ced8;
  border-radius: 7px;
  background: #fff;
  margin-bottom: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 1120px;
  margin-bottom: 0;
}

th,
td {
  border: 1px solid #c4ced8;
  padding: 10px;
  vertical-align: top;
  text-align: left;
  line-height: 1.55;
  word-break: break-word;
}

th {
  background: #ffe3bf;
  color: #7f3f00;
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.risk-high {
  color: var(--red);
  font-weight: 900;
}

.risk-mid {
  color: var(--amber);
  font-weight: 900;
}

.risk-low {
  color: var(--green);
  font-weight: 900;
}

.warn {
  margin: 12px 18px 18px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 10px;
  }

  .grid2,
  .store-head {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}
