:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --line: #d9dee5;
  --text: #1f2933;
  --muted: #64748b;
  --primary: #1f6fae;
  --primary-dark: #165782;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
}

.site-header,
.site-footer,
.cta-area,
.name-page-banner {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

.site-header .header-call {
  position: static;
}

.site-language {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  font-size: 14px;
}

.site-language a {
  color: #fff;
}

.name-page-banner {
  min-height: 260px;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(rgba(22, 31, 38, 0.38), rgba(22, 31, 38, 0.38)), url("/static/upload/image/20240804/1722778757461339.jpg") center/cover no-repeat;
}

.name-page-banner h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 38px;
  line-height: 1.25;
}

.name-page-banner p,
.name-page-banner a {
  color: #fff;
}

.name-page-banner a:hover {
  color: #f0ca7b;
}

.site-footer .wechat-code {
  width: 100px;
  height: auto;
}

.app-shell {
  width: min(1120px, calc(100vw - 32px));
  min-height: calc(100vh - 32px);
  margin: 40px auto;
  display: grid;
  gap: 12px;
}

.topbar,
.input-panel,
.result-panel,
.notice-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
}

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

.admin-tools-panel {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 17px;
  margin-bottom: 8px;
}

.topbar p {
  color: var(--muted);
}

.input-panel {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
  padding: 14px 16px;
  align-items: center;
}

.data-source-panel,
.password-panel {
  position: fixed;
  top: 76px;
  right: max(16px, calc((100vw - 1120px) / 2 + 16px));
  z-index: 20;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(31, 41, 51, 0.16);
}

.data-source-panel[hidden],
.password-panel[hidden] {
  display: none;
}

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

.data-source-panel p,
.data-source-panel span {
  color: var(--muted);
  line-height: 1.6;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 8px;
}

.password-row input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #aab4c0;
  border-radius: 4px;
  font-size: 16px;
}

.password-error {
  color: var(--danger);
  font-weight: 700;
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #475569;
  font-size: 20px;
  line-height: 1;
}

.icon-button:hover {
  background: #f1f5f9;
  color: #1f2933;
}

.field-row {
  display: grid;
  grid-template-columns: 82px 1fr 112px;
  gap: 8px;
  align-items: center;
}

label,
legend,
.label-cell {
  font-weight: 700;
}

input[type="text"] {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #aab4c0;
  border-radius: 4px;
  font-size: 18px;
}

button {
  height: 36px;
  border: 0;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--primary-dark);
}

.secondary-button,
.file-button {
  width: 112px;
  background: #eef3f8;
  color: #1f4f76;
  border: 1px solid #b8c7d6;
}

.secondary-button:hover,
.file-button:hover {
  background: #dfeaf4;
  color: #163f5f;
}

.file-button {
  height: 36px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
}

.file-button input {
  display: none;
}

.mode-group {
  min-height: 68px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-group label {
  font-weight: 400;
  white-space: nowrap;
}

.mode-group legend {
  width: auto;
  margin: 0;
  padding: 0 4px;
  font-size: 16px;
  line-height: 1.2;
}

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

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

.result-details {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
}

.label-cell {
  display: flex;
  align-items: center;
  color: #344054;
}

.small-card,
.wide-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
}

.small-card {
  min-height: 58px;
  padding: 8px 12px;
}

.small-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.small-card strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.wide-card {
  min-height: 88px;
  padding: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.notice-panel {
  padding: 14px 18px;
  color: #506987;
}

.notice-panel h2 {
  margin-bottom: 8px;
}

.notice-panel ul {
  margin: 0 0 8px 20px;
  padding: 0;
  line-height: 1.8;
}

.notice-panel p {
  line-height: 1.8;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

@media (min-width: 861px) and (max-width: 1050px) {
  .result-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-language {
    justify-content: center;
    margin-top: 6px;
  }

  .name-page-banner {
    min-height: 180px;
  }

  .name-page-banner h1 {
    font-size: 30px;
  }

  .app-shell {
    margin: 20px auto;
  }

  .input-panel {
    grid-template-columns: 1fr;
  }

  .topbar,
  .top-actions {
    align-items: stretch;
  }

  .topbar {
    flex-direction: column;
    gap: 12px;
  }

  .data-source-panel,
  .password-panel {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .field-row {
    grid-template-columns: 76px 1fr;
  }

  .field-row button {
    grid-column: 2;
  }

  .result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-details {
    grid-template-columns: 1fr;
  }
}
