/* 公共组件样式：提示条、弹窗、按钮 */
:root {
  --brand: #2f6bff;
  --brand-dark: #1f4fd0;
  --brand-soft: #eef3ff;
  --ink: #16213a;
  --ink-2: #4b5875;
  --ink-3: #8792a8;
  --line: #e5eaf3;
  --bg: #f5f7fc;
  --card: #ffffff;
  --success: #16a34a;
  --success-soft: #e9f8ef;
  --warn: #e08600;
  --warn-soft: #fff5e4;
  --danger: #e0353a;
  --danger-soft: #fdecec;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(28, 48, 96, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--brand); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s ease;
  white-space: nowrap; background: #fff; color: var(--ink-2);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(47, 107, 255, .22); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { border-color: var(--line); background: #fff; color: var(--ink-2); }
.btn-ghost:hover { border-color: #c9d5ee; background: #fafbff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c62b30; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

#toast-root {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none; width: min(92vw, 480px);
}
.toast {
  background: #1f2b45; color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 14px; line-height: 1.5; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(-10px); transition: .22s ease; max-width: 100%;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #137a3c; }
.toast-error { background: #c62b30; }
.toast-warn { background: #a86400; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 26, 48, .48);
  display: flex; align-items: center; justify-content: center;
  z-index: 9998; padding: 20px; backdrop-filter: blur(2px);
}
.modal-card {
  background: #fff; border-radius: 16px; padding: 22px;
  width: min(100%, 420px); box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.modal-message { font-size: 14px; color: var(--ink-2); line-height: 1.65; margin-bottom: 14px; white-space: pre-wrap; }
.modal-input {
  width: 100%; min-height: 90px; resize: vertical; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; outline: none;
  font-size: 14px; line-height: 1.6; color: var(--ink); background: #fbfcff;
}
.modal-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-approved { background: var(--success-soft); color: var(--success); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-gray { background: #eef1f6; color: var(--ink-3); }

.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .55; }
.empty-state p { margin: 6px 0; font-size: 14px; }
