* {
  box-sizing: border-box;
}

:root {
  --bg: #eef3ff;
  --card: #ffffff;
  --line: #e4ebfa;
  --text: #1f2a44;
  --muted: #66738f;
  --primary: #2f6bff;
  --primary-2: #4a83ff;
  --danger: #d63838;
  --danger-bg: #ffe9e9;
  --warn: #ba7a00;
  --warn-bg: #fff5df;
  --safe: #1f8f4d;
  --safe-bg: #e8f8ef;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: linear-gradient(180deg, #f6f8fc 0%, var(--bg) 100%);
  color: var(--text);
}

.container {
  width: min(1400px, 94%);
  margin: 24px auto 40px;
}

.hero,
.panel,
.section {
  background: var(--card);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(30, 60, 114, 0.08);
  border: 1px solid rgba(54, 92, 173, 0.08);
  margin-bottom: 22px;
}

.hero {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.hero-main {
  flex: 1;
}

.hero-badge,
.section-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 24px;
  background: linear-gradient(135deg, var(--primary), #6da0ff);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.28);
}

.hero h1,
.section h2,
.panel h2 {
  margin: 0 0 8px;
}

.hero h1 {
  font-size: 30px;
}

.hero p,
.desc,
.footer-note {
  color: var(--muted);
  line-height: 1.8;
}

.footer-note {
  text-align: center;
  font-size: 13px;
  margin-top: 10px;
}

.panel-head,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.title-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tabs,
.actions,
.hero-actions,
.row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn,
.tab-btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}

.btn:hover,
.tab-btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 700;
}

.btn-secondary,
.tab-btn {
  background: #edf3ff;
  color: var(--primary);
  font-weight: 700;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 700;
}

.tab-btn.active {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.25);
}

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

.stat-card {
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #f9fbff, #eef4ff);
  border: 1px solid var(--line);
}

.stat-title {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

.stat-time {
  font-size: 18px;
}

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

.compact-grid {
  margin-top: 8px;
}

.field.two {
  grid-column: span 2;
}

.field.full {
  grid-column: span 4;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #42506d;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #dbe5f5;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  background: #fbfdff;
  color: var(--text);
}

textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #6b95ff;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.10);
  background: #fff;
}

.mini-title {
  margin: 0 0 12px;
  font-size: 17px;
}

.section-block + .section-block {
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid #e8edf8;
}

.table-wrap table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  background: #fff;
}

thead {
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #edf1f8;
  vertical-align: top;
  line-height: 1.7;
  white-space: nowrap;
}

td.reason,
.empty-row {
  white-space: normal;
}

.empty-row {
  text-align: center;
  color: var(--muted);
  padding: 24px;
}

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

tbody tr:hover {
  background: #f1f6ff;
}

.level-high,
.level-medium,
.level-low,
.result-ok,
.result-warn,
.result-bad {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.level-high,
.result-bad {
  background: var(--danger-bg);
  color: var(--danger);
}

.level-medium,
.result-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.level-low,
.result-ok {
  background: var(--safe-bg);
  color: var(--safe);
}

.hidden {
  display: none !important;
}

.notice-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #1f2a44;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  z-index: 9999;
}

@media (max-width: 1100px) {
  .stats-grid,
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field.two,
  .field.full {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .container {
    width: 96%;
    margin-top: 18px;
  }

  .hero,
  .panel,
  .section {
    border-radius: 18px;
    padding: 18px;
  }

  .hero h1 {
    font-size: 24px;
  }

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

  .field.two,
  .field.full {
    grid-column: span 1;
  }

  th,
  td {
    padding: 12px 10px;
  }
}
