:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #16203a;
  --muted: #6b7488;
  --line: #e7ebf2;
  --accent: #ff6a3d;
  --accent2: #4f7cff;
  --red: #e2433b;
  --amber: #f0a020;
  --green: #1faa6b;
  --shadow: 0 6px 20px rgba(22, 32, 58, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  background: linear-gradient(120deg, #ff7a4d, #ff5a7a 55%, #6a5cff);
  color: #fff;
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.25);
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.brand h1 { margin: 0; font-size: 20px; font-weight: 700; }
.brand p { margin: 2px 0 0; font-size: 12px; opacity: 0.9; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.pill {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.22); color: #fff;
}
.btn {
  border: none; border-radius: 10px; cursor: pointer; font-size: 13px;
  padding: 9px 14px; font-weight: 600; transition: transform .08s ease, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.small { padding: 6px 10px; font-size: 12px; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 18px 22px 4px; max-width: 1080px; margin: 0 auto; width: 100%;
}
.stat {
  background: var(--card); border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px;
}
.stat .num { font-size: 26px; font-weight: 800; color: var(--accent); }
.stat .lbl { font-size: 12px; color: var(--muted); }

main { max-width: 1080px; margin: 0 auto; padding: 14px 22px 40px; width: 100%; }
.card-block {
  background: var(--card); border-radius: 16px; padding: 16px 18px;
  box-shadow: var(--shadow); margin-top: 16px;
}
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.block-head h2 { margin: 0; font-size: 16px; }
.block-head .hint { font-size: 12px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

.alert-list { display: flex; flex-direction: column; gap: 12px; }
.alert {
  display: flex; gap: 14px; border-radius: 14px; padding: 12px;
  border-left: 5px solid var(--accent2); background: #fbfcff;
}
.alert.deep { border-left-color: var(--red); }
.alert.mid { border-left-color: var(--amber); }
.alert img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: #eef; flex: none; }
.alert .body { flex: 1; min-width: 0; }
.alert .title { font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.alert .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef1f7; color: var(--muted);
}
.tag.price { background: #fdeee9; color: var(--accent); font-weight: 700; }
.tag.gap { background: #fdeceb; color: var(--red); font-weight: 700; }
.tag.time { background: #e9f3ff; color: var(--accent2); font-weight: 700; }
.tag.src { background: #eafaf1; color: var(--green); }
.alert a { color: var(--accent2); font-size: 12px; text-decoration: none; }

.list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 10px; background: #f8f9fc; font-size: 13px;
}
.list li .meta { color: var(--muted); font-size: 12px; }
.list li button { border: none; background: transparent; color: var(--red); cursor: pointer; font-size: 12px; }

.disc-list { display: flex; flex-direction: column; gap: 10px; }
.disc { border-radius: 12px; padding: 10px 12px; background: #f8f9fc; border-left: 4px solid var(--accent2); }
.disc-main { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.disc-title { font-weight: 600; font-size: 13px; }

.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.inline-form input, .inline-form select {
  flex: 1; min-width: 120px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 13px;
}
.chk { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td .fp { font-family: ui-monospace, monospace; font-size: 11px; color: var(--muted); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.settings-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.settings-grid input, .settings-grid select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink);
}
.settings-grid button { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }

.empty { text-align: center; color: var(--muted); padding: 22px; font-size: 13px; }
.example { border-style: dashed; opacity: 0.85; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; }
