/* ===== 设计变量 ===== */
:root {
  --primary: #0082EF;
  --primary-600: #0071D1;
  --primary-50: #EAF4FE;
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --text: #17233D;
  --text-2: #5A6B87;
  --text-3: #94A3B8;
  --border: #E9EEF5;
  --green: #12B76A;
  --green-50: #E7F8F0;
  --orange: #F79009;
  --orange-50: #FEF4E6;
  --red: #F04438;
  --red-50: #FEECEB;
  --purple: #7A5AF8;
  --purple-50: #F1EDFE;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 64, .06);
  --shadow: 0 8px 24px rgba(16, 32, 64, .08);
  --shadow-lg: 0 24px 60px rgba(16, 32, 64, .16);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
a { color: var(--primary); }
.ico { display: block; flex: none; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: #F7F9FC; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(0, 130, 239, .24); }
.btn--primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn--success { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(18, 183, 106, .22); }
.btn--ghost { background: transparent; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn--block { width: 100%; height: 46px; font-size: 15px; border-radius: 12px; }
.btn--text { height: auto; padding: 0 4px; border: 0; background: none; color: var(--primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ===== 徽标 ===== */
.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.badge--blue { background: var(--primary-50); color: #0B6BCB; }
.badge--green { background: var(--green-50); color: #0E9F5E; }
.badge--orange { background: var(--orange-50); color: #B54708; }
.badge--purple { background: var(--purple-50); color: #5C36E8; }
.badge--gray { background: #F1F4F9; color: #697A94; }
.badge--red { background: var(--red-50); color: #C42B21; }

/* ===== 卡片 ===== */
.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }

/* ===== 表单 ===== */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field__label { font-size: 13px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 4px; }
.field__label .req { color: var(--red); }
.field__hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; border: 1px solid #DDE5EF; border-radius: 10px;
  padding: 11px 12px; font-size: 14px; font-family: inherit; color: var(--text);
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
  min-height: 42px;
}
.input::placeholder, .textarea::placeholder { color: #B4C0D2; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 130, 239, .12);
}
.textarea { resize: vertical; min-height: 74px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

/* ===== 其他 ===== */
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.muted { color: var(--text-3); }
.empty { text-align: center; padding: 34px 16px; color: var(--text-3); font-size: 13px; }
.empty strong { display: block; color: var(--text-2); font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.link { border: 0; background: none; color: var(--primary); font-size: 13px; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 2px; }

.toast {
  position: fixed; left: 50%; top: 26px; transform: translate(-50%, -14px);
  background: rgba(23, 35, 61, .93); color: #fff; padding: 10px 18px;
  border-radius: 10px; font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s; z-index: 9999; box-shadow: var(--shadow);
  max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
