/* 设计令牌与基础样式 */
:root {
  --brand: #14304d;
  --brand-2: #1d4568;
  --brand-3: #2c5f8c;
  --brand-soft: #eef3f8;
  --gold: #bf8f3c;
  --gold-2: #d8ad5f;
  --gold-soft: #fbf5e9;
  --ink: #121b26;
  --text: #2a3542;
  --muted: #66727f;
  --muted-2: #8d97a3;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --line: #e4e9f0;
  --line-2: #eef2f7;
  --ok: #147a54;
  --ok-soft: #e9f6f0;
  --warn: #b06a17;
  --warn-soft: #fdf3e4;
  --blue-soft: #eaf1fa;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(17, 33, 51, 0.05);
  --shadow: 0 12px 32px rgba(17, 33, 51, 0.08);
  --shadow-lg: 0 24px 60px rgba(17, 33, 51, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; color: var(--text); }

::selection { background: rgba(29, 69, 104, 0.15); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 轻提示 */
.tm-toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translate(-50%, 12px);
  background: rgba(18, 27, 38, 0.94);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.2px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 9999;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  max-width: 80vw;
  text-align: center;
}
.tm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tm-toast.error { background: rgba(150, 40, 40, 0.96); }
.tm-toast.success { background: rgba(20, 100, 70, 0.96); }

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); box-shadow: 0 8px 20px rgba(20, 48, 77, 0.22); }
.btn-gold { background: linear-gradient(135deg, #c99a46, #b8862f); color: #fff; }
.btn-gold:hover { box-shadow: 0 8px 20px rgba(191, 143, 60, 0.3); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand-3); color: var(--brand); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  background: var(--brand-soft);
  color: var(--brand-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }

/* 表单 */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 84px; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-3); box-shadow: 0 0 0 3px rgba(44, 95, 140, 0.1); }
.input::placeholder, .textarea::placeholder { color: #a9b2bd; }

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 38, 0.48);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  padding: 20px;
}
.modal-mask.show { opacity: 1; visibility: visible; }
.modal {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  transform: translateY(10px);
  transition: transform 0.22s;
  box-shadow: var(--shadow-lg);
}
.modal-mask.show .modal { transform: translateY(0); }
.modal h3 { font-size: 19px; margin-bottom: 6px; }
.modal .sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
}
.modal-close:hover { background: var(--bg); }
