:root {
  --primary: #1a9ec0;
  --primary-dark: #15809b;
  --primary-soft: #e6f5fa;
  --accent: #20a0c0;
  --bg: #f4f8fa;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e6e9f2;
  --success: #16a34a;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --warning: #d97706;
  --grad: linear-gradient(135deg, #20a0c0 0%, #15809b 100%);
  --radius: 16px;
  --shadow: 0 6px 24px rgba(30, 41, 59, 0.08);
  --shadow-lg: 0 12px 40px rgba(30, 41, 59, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航 ---------- */
.nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; font-weight: 800;
}
.brand .sub { font-weight: 400; color: var(--text-muted); font-size: 13px; }
.nav .nav-link { font-size: 14px; color: var(--text-muted); margin-left: 16px; }
.nav .nav-link:hover { color: var(--primary); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; transition: all .18s ease;
  font-family: inherit;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(26, 158, 192, .3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(26, 158, 192, .4); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-block { width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- 表单 ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.input, textarea.input, select.input {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 15px; font-family: inherit; color: var(--text);
  background: #fff; transition: border-color .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input::placeholder { color: #b6bcc9; }

/* ---------- 提示 ---------- */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: #1e293b; color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow-lg); animation: slideDown .25s ease;
  max-width: 90vw;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 加载遮罩 ---------- */
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.center-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 0; color: var(--text-muted); }

/* ---------- 徽章 ---------- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-green { background: var(--success-soft); color: var(--success); }
.badge-gray { background: #f1f5f9; color: var(--text-muted); }
.badge-blue { background: var(--primary-soft); color: var(--primary); }
.badge-amber { background: #fef3c7; color: var(--warning); }

/* ---------- 分割标题 ---------- */
.section-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.section-title::before { content: ""; width: 4px; height: 20px; background: var(--grad); border-radius: 2px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #f8fafc; color: var(--text-muted); font-weight: 600; font-size: 13px; }
tbody tr:hover { background: #fafbff; }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 30px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.stat-card .label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

@media (max-width: 720px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
