:root {
  --bg: #F7FBF8;
  --bg-2: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hi: #F1F7F3;
  --border: #E4EDE7;
  --border-hi: #CFDDD4;
  --text: #0F1A14;
  --text-dim: #55665C;
  --text-mute: #8A968D;
  --brand: #22C55E;
  --brand-hi: #16A34A;
  --brand-deep: #15803D;
  --brand-soft: rgba(34, 197, 94, 0.35);
  --brand-bg: rgba(34, 197, 94, 0.08);
  --green: #16A34A;
  --amber: #D97706;
  --red: #DC2626;
  --gold: #B7791F;
}

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

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

body { position: relative; }

.bg-base {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 197, 94, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(22, 163, 74, 0.06), transparent 60%),
    linear-gradient(180deg, #F7FBF8 0%, #F1F8F3 40%, #F7FBF8 100%);
  z-index: 0; pointer-events: none;
}

.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(21, 128, 61, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 128, 61, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 75%);
  z-index: 1; pointer-events: none;
}

.bg-gold-line {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(34,197,94,0.5) 30%, rgba(34,197,94,0.9) 50%, rgba(34,197,94,0.5) 70%, transparent 100%);
  z-index: 10; pointer-events: none;
}

.container {
  position: relative; z-index: 5;
  max-width: 1160px; margin: 0 auto; padding: 0 28px;
}

nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex; align-items: center; gap: 11px;
  font-size: 15px; font-weight: 600; color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #22C55E 0%, #15803D 100%);
  display: flex; align-items: center; justify-content: center;
  color: #FFFFFF; font-weight: 700; font-size: 14px;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25), 0 6px 20px -6px rgba(34, 197, 94, 0.55);
}

.nav-links {
  display: flex; align-items: center; gap: 34px;
  font-size: 13.5px;
}

.nav-links a {
  color: var(--text-dim); text-decoration: none; transition: color 0.2s;
}

.nav-links a:hover { color: var(--brand-deep); }
.nav-links a.active { color: var(--brand-deep); font-weight: 500; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  color: var(--text); font-size: 13px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 1px 2px rgba(15, 26, 20, 0.04);
}

.btn-ghost:hover {
  background: var(--brand-bg);
  border-color: var(--brand-soft);
  color: var(--brand-deep);
}

.page-title {
  font-size: 34px; font-weight: 600;
  letter-spacing: -0.035em;
  margin: 32px 0 8px;
  color: var(--text);
}

.page-sub {
  font-size: 14px; color: var(--text-dim); margin-bottom: 36px;
}

.input-group {
  display: flex; align-items: center;
  padding: 6px 6px 6px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  transition: all 0.25s;
  box-shadow: 0 1px 2px rgba(15, 26, 20, 0.04);
}

.input-group:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), 0 4px 16px -4px rgba(34, 197, 94, 0.2);
}

.input-group input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px; padding: 12px;
  font-family: inherit;
}

.input-group input::placeholder { color: var(--text-mute); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 20px; border-radius: 10px;
  background: linear-gradient(180deg, #22C55E 0%, #16A34A 100%);
  border: 1px solid rgba(21, 128, 61, 0.5);
  color: #fff; font-size: 13.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all 0.25s; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 12px -2px rgba(34, 197, 94, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #34D27A 0%, #22C55E 100%);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 20px -4px rgba(34, 197, 94, 0.5);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border-hi);
  color: var(--text-dim); font-size: 12.5px;
  font-family: inherit; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
}

.btn-secondary:hover {
  color: var(--brand-deep);
  border-color: var(--brand-soft);
  background: var(--brand-bg);
}

.btn-danger:hover {
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.06);
}

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 60px;
  font-size: 12.5px; color: var(--text-mute);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}

footer a { color: var(--text-mute); text-decoration: none; margin-left: 24px; transition: color 0.2s; }
footer a:hover { color: var(--brand-deep); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 12px 20px; border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-hi);
  color: var(--text); font-size: 13.5px;
  box-shadow: 0 12px 40px -8px rgba(15, 26, 20, 0.15);
  z-index: 100; opacity: 0; transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.error { border-color: rgba(220, 38, 38, 0.4); color: var(--red); }

.empty {
  text-align: center; padding: 80px 20px;
  color: var(--text-mute); font-size: 14px;
}

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(34, 197, 94, 0.15);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .page-title { font-size: 26px; }
}