:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --primary: #1677ff;
  --text: #111827;
  --muted: rgba(17, 24, 39, 0.65);
  --danger: #ef4444;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.appbar {
  position: sticky;
  top: 0;
  padding: 14px 16px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.appbar-title {
  font-size: 18px;
  font-weight: 700;
}

.container {
  padding: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.hero {
  background: var(--primary);
  color: white;
}

.hero-title {
  font-size: 20px;
  font-weight: 800;
}

.hero-sub {
  margin-top: 10px;
  opacity: 0.9;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
}

.input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  outline: none;
  font-size: 15px;
}

.input:focus {
  border-color: rgba(22, 119, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.15);
}

.btn {
  border: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.hint.error {
  color: var(--danger);
}

.list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.item-title {
  font-size: 15px;
  font-weight: 800;
}

.item-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.item-right {
  text-align: right;
}

.item-nav {
  font-size: 16px;
  font-weight: 900;
}

.item-rate {
  margin-top: 6px;
  font-weight: 800;
}

.rate-up {
  color: #ef4444;
}

.rate-down {
  color: #10b981;
}

.dialog {
  width: min(720px, calc(100vw - 24px));
  border: 0;
  border-radius: 18px;
  padding: 0;
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.dialog-header {
  background: var(--primary);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-title {
  font-weight: 900;
}

.dialog-sub {
  margin-top: 6px;
  opacity: 0.9;
  font-size: 13px;
}

.dialog-body {
  padding: 16px;
}

.detail-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.metric {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 900;
}

.dialog-footer {
  padding: 16px;
  padding-top: 0;
}

canvas {
  width: 100%;
  height: 260px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

