/* ============ 全局设计变量 ============ */
:root {
  --bg: #0f1226;
  --bg-soft: #171b36;
  --card: #ffffff;
  --ink: #1d2140;
  --ink-soft: #5c6285;
  --line: #e6e8f2;
  --brand: #6c5ce7;
  --brand-2: #00cec9;
  --ok: #00b894;
  --warn: #fdcb6e;
  --bad: #e74c3c;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(15, 18, 38, 0.28);
  --shadow-soft: 0 6px 18px rgba(15, 18, 38, 0.12);
  --font: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(1200px 700px at 12% -10%, #2b2f63 0%, transparent 55%),
    radial-gradient(1000px 600px at 100% 0%, #12565a 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1080px, 100% - 32px);
  margin: 0 auto;
}

/* ============ 顶部栏 ============ */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0 12px;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(108, 92, 231, 0.5);
}

.topbar .spacer {
  flex: 1;
}

.navlink {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: #e7e9ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s, transform 0.2s;
}

.navlink:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

/* ============ 通用按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  background: #eef0fb;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, opacity 0.2s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #8e7bff);
  color: #fff;
  box-shadow: 0 10px 22px rgba(108, 92, 231, 0.4);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.btn-danger {
  background: #fdecea;
  color: var(--bad);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 10px;
}

/* ============ 面板卡片 ============ */
.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel + .panel {
  margin-top: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
}

.panel-title .count {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  background: #efecff;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ============ 表单 ============ */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.input,
.textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.16);
  background: #fff;
}

.textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.7;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: rgba(29, 33, 64, 0.95);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 99;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.ok {
  background: var(--ok);
}

.toast.bad {
  background: var(--bad);
}

/* ============ 空状态 ============ */
.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--ink-soft);
}

.empty .emoji {
  font-size: 44px;
  display: block;
  margin-bottom: 10px;
}
