* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: #1f2933;
  background: #edf1f5;
  font-family: "Microsoft YaHei", "SimSun", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
}

button {
  cursor: pointer;
}

.app-shell {
  display: flex;
  min-height: 100%;
}

.sidebar {
  width: 248px;
  min-width: 248px;
  color: #dbe7f3;
  background: #203244;
  border-right: 1px solid #162331;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  line-height: 42px;
  text-align: center;
  color: #ffffff;
  background: #2c7a7b;
  border-radius: 6px;
  font-weight: 700;
  font-size: 20px;
}

.brand h1 {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

.brand p {
  margin: 4px 0 0;
  color: #a7bfce;
  font-size: 12px;
}

.nav {
  padding: 10px;
  overflow: auto;
  flex: 1;
}

.nav button {
  display: block;
  width: 100%;
  height: 38px;
  margin-bottom: 4px;
  padding: 0 14px;
  color: #d7e2ec;
  background: transparent;
  border: 0;
  border-radius: 4px;
  text-align: left;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav button.active {
  color: #ffffff;
  background: #2c7a7b;
  font-weight: 700;
}

.side-note {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #b9cbd8;
  font-size: 12px;
}

.side-note span {
  display: block;
  margin-top: 4px;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 16px;
  overflow: auto;
}

.topbar {
  min-height: 72px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  color: #17212b;
}

.topbar p {
  margin: 4px 0 0;
  color: #687784;
}

.top-actions {
  white-space: nowrap;
}

.page {
  display: none;
  margin-top: 14px;
}

.page.active {
  display: block;
}

.notice {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #c9d8e6;
  background: #f5fbff;
  color: #25425a;
}

.notice.warn {
  border-color: #f0c36a;
  background: #fff8e5;
  color: #7a4a00;
}

.notice.error {
  border-color: #f2a7a7;
  background: #fff1f1;
  color: #9c1c1c;
}

.hidden {
  display: none !important;
}

.layout-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.layout-row > .panel {
  flex: 1;
}

.layout-row .side-panel {
  width: 330px;
  flex: 0 0 330px;
}

.panel {
  margin-bottom: 14px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
}

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

.panel-title h3 {
  margin: 0;
  color: #17212b;
  font-size: 17px;
}

.panel-title p {
  margin: 3px 0 0;
  color: #6b7785;
  font-size: 13px;
}

.form-grid {
  display: flex;
  flex-wrap: wrap;
  margin: -6px;
}

.field {
  width: 25%;
  min-width: 190px;
  padding: 6px;
}

.field.wide {
  width: 50%;
}

.field.full {
  width: 100%;
}

.field label {
  display: block;
  margin-bottom: 4px;
  color: #43515f;
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 32px;
  padding: 5px 8px;
  border: 1px solid #c7d2dd;
  border-radius: 4px;
  background: #ffffff;
  color: #202b36;
}

.field input[type="checkbox"] {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  vertical-align: middle;
}

.field textarea {
  height: 68px;
  resize: vertical;
}

.inline-check {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  height: 32px;
  margin: 0;
  color: #202b36;
}

.condition-config-panel .panel-title {
  margin-bottom: 8px;
}

.condition-form {
  align-items: flex-start;
}

.condition-form .field {
  width: 20%;
  min-width: 160px;
}

.condition-form .field.wide {
  width: 40%;
  min-width: 320px;
}

.condition-form .field.check-field {
  width: 16%;
  min-width: 150px;
}

.condition-form textarea {
  height: 32px;
  min-height: 32px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.pick-line {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.pick-line select {
  flex: 1;
}

.btn {
  min-height: 32px;
  padding: 6px 12px;
  color: #ffffff;
  background: #2c7a7b;
  border: 1px solid #236b6c;
  border-radius: 4px;
  line-height: 1.25;
}

.btn:hover {
  background: #256f70;
}

.btn.secondary {
  color: #21313f;
  background: #eef3f6;
  border-color: #c6d2dd;
}

.btn.secondary:hover {
  background: #e2ebf0;
}

.btn.danger {
  color: #ffffff;
  background: #b83b3b;
  border-color: #9b2f2f;
}

.btn.warn {
  color: #ffffff;
  background: #c46b16;
  border-color: #a95b11;
}

.btn.small {
  min-height: 26px;
  padding: 3px 8px;
  font-size: 12px;
}

.icon-btn {
  min-width: 28px;
  height: 28px;
  border: 1px solid #cbd5df;
  border-radius: 4px;
  background: #ffffff;
  color: #293744;
}

.summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.summary-card {
  flex: 1;
  min-width: 170px;
  padding: 13px 14px;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-left: 4px solid #2c7a7b;
  border-radius: 6px;
}

.summary-card.orange {
  border-left-color: #d97706;
}

.summary-card.red {
  border-left-color: #b91c1c;
}

.summary-card.gray {
  border-left-color: #64748b;
}

.summary-card .label {
  color: #667585;
  font-size: 13px;
}

.summary-card .value {
  margin-top: 4px;
  color: #17212b;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}

.summary-card .sub {
  margin-top: 5px;
  color: #738393;
  font-size: 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #d8e0e8;
  border-radius: 4px;
  background: #ffffff;
}

.data-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  table-layout: auto;
}

.data-table th,
.data-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #e5ebf0;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.data-table th {
  background: #f3f6f9;
  color: #314150;
  font-weight: 700;
}

.data-table th button {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 700;
}

.data-table tr:hover td {
  background: #f8fbfd;
}

.table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.table-tools input {
  width: 260px;
  height: 32px;
  padding: 5px 8px;
  border: 1px solid #c7d2dd;
  border-radius: 4px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  color: #667585;
}

.tag {
  display: inline-block;
  margin: 1px 3px 1px 0;
  padding: 2px 6px;
  border-radius: 3px;
  background: #e8f3f3;
  color: #256a6b;
  font-size: 12px;
}

.risk-high {
  color: #a51414;
  font-weight: 700;
}

.risk-warn {
  color: #b45309;
  font-weight: 700;
}

.risk-good {
  color: #1f7a4d;
  font-weight: 700;
}

.chart-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.chart-card {
  width: calc(50% - 7px);
  min-width: 430px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
}

.chart-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #17212b;
}

.chart-box {
  height: 260px;
}

.check-row {
  display: inline-block;
  margin-right: 16px;
  margin-bottom: 8px;
  white-space: nowrap;
}

.check-row input {
  vertical-align: middle;
}

.modal-mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(18, 27, 38, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  width: 620px;
  max-width: 92%;
  max-height: 86%;
  overflow: auto;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #cfd8e3;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e0e6ed;
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
}

.modal-body {
  padding: 14px;
}

.report-box {
  background: #ffffff;
  border: 1px solid #d8e0e8;
  border-radius: 6px;
  padding: 18px;
}

.report-box h1 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 24px;
}

.report-box h2 {
  margin: 18px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dde6ee;
  font-size: 18px;
}

.report-box p {
  margin: 7px 0;
}

.empty {
  padding: 18px;
  color: #667585;
  text-align: center;
}

.help-list {
  margin: 0;
  padding-left: 20px;
}

.help-list li {
  margin-bottom: 8px;
}

@media (max-width: 1100px) {
  .sidebar {
    width: 218px;
    min-width: 218px;
  }

  .field {
    width: 33.333%;
  }

  .layout-row {
    display: block;
  }

  .layout-row .side-panel {
    width: auto;
  }

  .chart-card {
    width: 100%;
    min-width: 0;
  }
}

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

  .sidebar,
  .topbar,
  .notice,
  .toolbar,
  .table-tools,
  .pager,
  .no-print {
    display: none !important;
  }

  .main {
    padding: 0;
    overflow: visible;
  }

  .page {
    display: none !important;
  }

  #page-report {
    display: block !important;
    margin: 0;
  }

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