/* ============================================================
   小草笔记 · 设计系统
   现代 SaaS 浅色风格 / 品牌珊瑚渐变
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --brand: #f43f5e;
  --brand-2: #fb7185;
  --brand-3: #ff9a62;
  --brand-soft: #fff1f3;
  --brand-soft-2: #ffe7eb;
  --grad: linear-gradient(135deg, #f43f5e 0%, #fb7185 52%, #ff9a62 100%);
  --grad-soft: linear-gradient(135deg, rgba(244, 63, 94, .1), rgba(255, 154, 98, .12));

  --ink: #161826;
  --ink-2: #3d4152;
  --muted: #7b8194;
  --muted-2: #9aa0b1;
  --line: #e8eaf1;
  --line-strong: #dcdfe9;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #fbfbfd;

  --success: #0f9d74;
  --success-soft: #e8f8f2;
  --warning: #d97706;
  --warning-soft: #fff5e6;
  --danger: #e11d48;
  --danger-soft: #ffe9ee;
  --info: #2563eb;
  --info-soft: #eaf1ff;
  --muted-soft: #f0f1f6;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(20, 24, 45, .04);
  --shadow-sm: 0 1px 2px rgba(20, 24, 45, .04), 0 6px 18px -8px rgba(20, 24, 45, .12);
  --shadow: 0 1px 3px rgba(20, 24, 45, .05), 0 18px 40px -18px rgba(20, 24, 45, .18);
  --shadow-lg: 0 24px 70px -24px rgba(20, 24, 45, .28);
  --ring: 0 0 0 4px rgba(244, 63, 94, .12);

  --font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
h1, h2, h3, h4, h5, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg.icon { flex: none; display: inline-block; vertical-align: -0.18em; }
::selection { background: rgba(244, 63, 94, .16); }

/* ---------- Typography helpers ---------- */
.h1 { font-size: 28px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.h2 { font-size: 20px; line-height: 1.35; font-weight: 650; letter-spacing: -.01em; }
.h3 { font-size: 16px; line-height: 1.4; font-weight: 620; }
.muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 16px; }
.strong { font-weight: 620; }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2, .clamp-3, .clamp-5 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }
.clamp-5 { -webkit-line-clamp: 5; }
.pre-line { white-space: pre-line; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }
.balance { text-wrap: balance; }

/* ---------- Layout helpers ---------- */
.flex { display: flex; align-items: center; }
.shell, .main, .content { min-width: 0; }
.dash-grid, .card-grid, .grid-2, .grid-3, .grid-4 { min-width: 0; }
.dash-grid > *, .card-grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.card, .chart-box, .table-wrap { min-width: 0; max-width: 100%; }
.flex-col { display: flex; flex-direction: column; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; justify-content: center; }
.wrap { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.ml-auto { margin-left: auto; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.span-2 { grid-column: span 2; }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.req { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 560; white-space: nowrap;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(244, 63, 94, .6);
}
.btn-primary:hover { filter: brightness(1.03); box-shadow: 0 12px 26px -10px rgba(244, 63, 94, .68); }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink-2); }
.btn-outline:hover { border-color: #c6cad8; background: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--muted-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand-soft-2); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #ffdbe4; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #24263a; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 38px; height: 38px; border-radius: 10px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--muted);
  transition: background .2s ease, color .2s ease;
}
.btn-icon:hover { background: var(--muted-soft); color: var(--ink); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px;
  padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 560;
  background: var(--muted-soft); color: var(--muted); white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-muted { background: var(--muted-soft); color: var(--muted); }
.badge-lg { height: 28px; padding: 0 12px; font-size: 13px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 520; transition: all .18s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink-2); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: rgba(22, 24, 38, .06); font-size: 11px; font-weight: 600;
}
.chip.is-active .count { background: rgba(255, 255, 255, .18); }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
.tag-brand { background: var(--brand-soft); border-color: transparent; color: var(--brand); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 13px; font-weight: 560; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.label .req { color: var(--brand); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: var(--radius-sm); padding: 10px 13px; font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  min-height: 42px;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:hover, .select:hover, .textarea:hover { border-color: #c9cdda; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-2); box-shadow: var(--ring); background: #fff;
}
.textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.select {
  appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b8194' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--danger); background: #fffafb; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.error-text { font-size: 12px; color: var(--danger); display: flex; align-items: center; gap: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 10px; padding-top: 6px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--brand); }
.radio-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card span {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; transition: all .18s ease;
}
.radio-card span strong { font-size: 13px; font-weight: 600; }
.radio-card span small { font-size: 11px; color: var(--muted); }
.radio-card input:checked + span { border-color: var(--brand-2); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(244, 63, 94, .07); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.card-body { padding: 20px; }
.card-body.tight { padding: 14px 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-hover { transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #e2e5ee; }
.soft-panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.brand-panel { background: var(--grad-soft); border: 1px solid rgba(244, 63, 94, .12); border-radius: var(--radius); padding: 18px; }

/* ---------- Avatar ---------- */
.avatar {
  width: 40px; height: 40px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; color: #fff; font-weight: 640;
  font-size: 15px; flex: none; background: linear-gradient(135deg, #94a3b8, #64748b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.avatar-sm { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
.avatar-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; }
.avatar-xl { width: 72px; height: 72px; border-radius: 20px; font-size: 26px; }
.tone-0 { background: linear-gradient(135deg, #fb7185, #f43f5e); }
.tone-1 { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.tone-2 { background: linear-gradient(135deg, #34d399, #0f9d74); }
.tone-3 { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.tone-4 { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.tone-5 { background: linear-gradient(135deg, #f472b6, #db2777); }

/* ---------- App shell ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 256px; z-index: 40;
  display: flex; flex-direction: column; background: var(--surface);
  border-right: 1px solid var(--line); padding: 20px 14px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 8px 18px -8px rgba(244, 63, 94, .7); flex: none;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.brand-text span { font-size: 10px; color: var(--muted-2); letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.nav { flex: 1; overflow-y: auto; padding: 0 2px 12px; scrollbar-width: thin; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: #e4e6ee; border-radius: 99px; }
.nav-section {
  padding: 16px 12px 7px; font-size: 10px; font-weight: 650; color: var(--muted-2);
  letter-spacing: .12em; text-transform: uppercase;
}
.nav-link {
  display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px;
  border-radius: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  transition: background .16s ease, color .16s ease; position: relative;
}
.nav-link svg { color: var(--muted); transition: color .16s ease; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link:hover svg { color: var(--ink-2); }
.nav-link.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-link.is-active svg { color: var(--brand); }
.nav-link.is-active::before {
  content: ""; position: absolute; left: -14px; top: 11px; width: 3px; height: 18px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav-badge {
  margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 99px;
  background: var(--brand-soft-2); color: var(--brand); font-size: 11px; font-weight: 650;
  display: inline-flex; align-items: center; justify-content: center;
}
.sidebar-foot { border-top: 1px solid var(--line); padding: 12px 4px 0; }
.user-chip { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 11px; transition: background .16s ease; }
.user-chip:hover { background: var(--surface-2); }
.user-chip-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.user-chip-text { min-width: 0; line-height: 1.25; }
.user-chip-text strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-text span { font-size: 11px; color: var(--muted); }
.user-chip .logout { margin-left: auto; color: var(--muted-2); }
.user-chip .logout:hover { color: var(--danger); }

.main { margin-left: 256px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 68px;
  display: flex; align-items: center; gap: 16px; padding: 0 32px;
  background: rgba(246, 247, 251, .82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(232, 234, 241, .8);
}
.topbar .menu-btn { display: none; }
.topbar-search { position: relative; width: min(360px, 40vw); }
.topbar-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.topbar-search input {
  width: 100%; height: 38px; padding: 0 14px 0 38px; border-radius: 10px;
  border: 1px solid transparent; background: rgba(255, 255, 255, .7); font-size: 13px;
  transition: all .18s ease;
}
.topbar-search input:focus { outline: none; background: #fff; border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar-actions .btn-icon { position: relative; }
.dot-dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg); }
.user-menu { position: relative; }
.user-menu > summary {
  list-style: none; display: flex; align-items: center; gap: 9px; padding: 5px 9px 5px 5px;
  border-radius: 11px; cursor: pointer; transition: background .16s ease; user-select: none;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover { background: rgba(255, 255, 255, .8); }
.user-menu-text { line-height: 1.2; display: flex; flex-direction: column; }
.user-menu-text strong { font-size: 13px; font-weight: 600; }
.user-menu-text span { font-size: 11px; color: var(--muted); }
.user-menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 208px; padding: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); z-index: 60;
}
.user-menu-panel a, .user-menu-panel button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px;
  border-radius: 8px; font-size: 13px; color: var(--ink-2); text-align: left;
}
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--surface-2); color: var(--ink); }
.user-menu-panel .danger { color: var(--danger); }
.user-menu-panel hr { border: 0; height: 1px; background: var(--line); margin: 6px 4px; }

.content { flex: 1; padding: 28px 32px 56px; width: 100%; max-width: 1440px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.page-head p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 520; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.stat-icon.tone-info { background: var(--info-soft); color: var(--info); }
.stat-icon.tone-success { background: var(--success-soft); color: var(--success); }
.stat-icon.tone-warning { background: var(--warning-soft); color: var(--warning); }
.stat-icon.tone-violet { background: #f1ecff; color: #7c3aed; }
.stat-value { margin-top: 12px; font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.stat-foot { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.trend-up { color: var(--success); font-weight: 600; }
.trend-down { color: var(--danger); font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  text-align: left; padding: 11px 16px; font-size: 11.5px; font-weight: 620;
  color: var(--muted); letter-spacing: .04em; text-transform: uppercase;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th:first-child { border-radius: 8px 0 0 0; }
.table th:last-child { border-radius: 0 8px 0 0; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .14s ease; }
.table tbody tr:hover { background: #fcfcfe; }
.table .main-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.table .main-cell strong { font-weight: 560; color: var(--ink); }
.table .main-cell span { font-size: 12px; color: var(--muted); }
.table .actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-compact td { padding: 11px 16px; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search-box { position: relative; min-width: 220px; flex: 1; max-width: 340px; }
.toolbar .search-box svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.toolbar .search-box input { padding-left: 36px; height: 38px; min-height: 38px; }
.toolbar .select { height: 38px; min-height: 38px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tabs.scroll { overflow-x: auto; padding-bottom: 2px; }

/* ---------- Empty state ---------- */
.empty { padding: 56px 20px; text-align: center; }
.empty-icon {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted-2);
  display: flex; align-items: center; justify-content: center;
}
.empty h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.empty p { font-size: 13px; color: var(--muted); max-width: 380px; margin: 0 auto 18px; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.page-info { font-size: 12.5px; color: var(--muted); }
.page-links { display: flex; align-items: center; gap: 4px; }
.page-link {
  min-width: 32px; height: 32px; padding: 0 9px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px; color: var(--ink-2);
  border: 1px solid transparent; transition: all .15s ease;
}
.page-link:hover { background: var(--surface-2); border-color: var(--line); }
.page-link.is-active { background: var(--ink); color: #fff; }
.page-link.is-disabled { color: var(--muted-2); pointer-events: none; }
.page-ellipsis { width: 26px; text-align: center; color: var(--muted-2); }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.chart-box { padding: 8px 20px 16px; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); display: inline-block; margin-right: 6px; }
.quick-list { display: flex; flex-direction: column; }
.quick-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 20px;
  border-bottom: 1px solid var(--line); transition: background .15s ease;
}
.quick-item:last-child { border-bottom: 0; }
.quick-item:hover { background: var(--surface-2); }
.quick-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.quick-text { min-width: 0; }
.quick-text strong { display: block; font-size: 13px; font-weight: 560; }
.quick-text span { font-size: 11.5px; color: var(--muted); }
.quick-item > svg:last-child { margin-left: auto; color: var(--muted-2); }
.notice-item { padding: 12px 20px; border-bottom: 1px solid var(--line); display: block; }
.notice-item:last-child { border-bottom: 0; }
.notice-item:hover { background: var(--surface-2); }
.notice-item .meta { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.notice-item .meta time { font-size: 11px; color: var(--muted-2); margin-left: auto; }
.notice-item strong { display: block; font-size: 13px; font-weight: 560; }
.notice-item p { margin-top: 3px; font-size: 12px; color: var(--muted); }

/* ---------- Content cards (materials / templates) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.content-card { display: flex; flex-direction: column; overflow: hidden; }
.content-card .card-body { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.content-card h3 { font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.content-card p { font-size: 12.5px; color: var(--muted); line-height: 1.7; flex: 1; }
.content-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.content-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted-2); }
.content-card .actions { display: flex; gap: 4px; }
.thumb {
  height: 92px; background: var(--grad-soft); display: flex; align-items: center; justify-content: center;
  color: var(--brand); border-bottom: 1px solid var(--line); position: relative; overflow: hidden;
}
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(244, 63, 94, .18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 154, 98, .22), transparent 45%);
}
.thumb svg { position: relative; z-index: 1; opacity: .8; }
.thumb.tone-universal { background: linear-gradient(135deg, #eef4ff, #e8f0ff); color: #2563eb; }
.thumb.tone-collected { background: linear-gradient(135deg, #f2ecff, #f7f0ff); color: #7c3aed; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); margin-top: 5px; flex: none; z-index: 1; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tl-item.done .tl-dot { background: var(--success); box-shadow: 0 0 0 1px var(--success); }
.tl-item.active .tl-dot { background: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.tl-body strong { display: block; font-size: 13px; font-weight: 560; }
.tl-body span { font-size: 12px; color: var(--muted); }

/* ---------- Finance ---------- */
.balance-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 26px 28px;
  background: linear-gradient(135deg, #1c1e30 0%, #2b2038 55%, #47202e 100%); color: #fff;
  box-shadow: var(--shadow);
}
.balance-hero::before, .balance-hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none;
}
.balance-hero::before { width: 260px; height: 260px; right: -60px; top: -110px; background: radial-gradient(circle, rgba(244, 63, 94, .5), transparent 65%); }
.balance-hero::after { width: 220px; height: 220px; right: 120px; bottom: -140px; background: radial-gradient(circle, rgba(255, 154, 98, .32), transparent 65%); }
.balance-hero .label { color: rgba(255, 255, 255, .62); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.balance-amount { font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1.15; margin: 6px 0 2px; }
.balance-amount small { font-size: 16px; font-weight: 500; opacity: .6; margin-right: 5px; letter-spacing: 0; }
.balance-actions { display: flex; gap: 9px; margin-top: 18px; position: relative; z-index: 1; }
.balance-hero .btn-primary { background: #fff; color: #1c1e30; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.balance-hero .btn-outline { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.balance-hero .btn-outline:hover { background: rgba(255, 255, 255, .14); }
.balance-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); position: relative; z-index: 1; }
.balance-stats span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .55); }
.balance-stats strong { display: block; font-size: 16px; font-weight: 620; margin-top: 3px; }
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--ink); font-weight: 600; }
.withdraw-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.withdraw-item:last-child { border-bottom: 0; }
.withdraw-item .amount { margin-left: auto; text-align: right; }
.withdraw-item .amount strong { display: block; font-size: 13px; }
.withdraw-item .amount span { font-size: 11px; color: var(--muted-2); }

/* ---------- Invite ---------- */
.invite-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 28px;
  background: var(--grad); color: #fff; box-shadow: 0 20px 50px -24px rgba(244, 63, 94, .7);
}
.invite-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: -80px; top: -120px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.invite-hero h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.invite-hero p { font-size: 13px; opacity: .86; margin-top: 6px; max-width: 520px; }
.invite-code { display: flex; align-items: center; gap: 10px; margin-top: 20px; position: relative; z-index: 1; flex-wrap: wrap; }
.invite-code .code {
  font-family: var(--mono); font-size: 18px; letter-spacing: .18em; font-weight: 600;
  background: rgba(255, 255, 255, .16); border: 1px dashed rgba(255, 255, 255, .35);
  padding: 9px 16px; border-radius: 10px;
}
.invite-hero .btn-outline { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--surface); }
.auth-side {
  position: relative; overflow: hidden; padding: 44px 48px; color: #fff;
  background: radial-gradient(1200px 600px at 10% 0%, #2a1c35 0%, #1b1a2b 55%, #141522 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side::before {
  content: ""; position: absolute; width: 460px; height: 460px; right: -160px; top: -140px;
  background: radial-gradient(circle, rgba(244, 63, 94, .55), transparent 62%); filter: blur(10px);
}
.auth-side::after {
  content: ""; position: absolute; width: 420px; height: 420px; left: -120px; bottom: -180px;
  background: radial-gradient(circle, rgba(255, 154, 98, .28), transparent 62%); filter: blur(10px);
}
.auth-side > * { position: relative; z-index: 1; }
.auth-side .brand { padding: 0; }
.auth-side .brand-text strong { color: #fff; }
.auth-side .brand-text span { color: rgba(255, 255, 255, .45); }
.auth-side .brand-mark { box-shadow: 0 12px 30px -10px rgba(244, 63, 94, .8); }
.auth-copy h1 { font-size: clamp(30px, 3vw, 42px); line-height: 1.22; font-weight: 700; letter-spacing: -.03em; }
.auth-copy h1 em { font-style: normal; background: linear-gradient(120deg, #fda4af, #fdba74); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-copy p { margin-top: 14px; font-size: 14px; line-height: 1.8; color: rgba(255, 255, 255, .62); max-width: 420px; }
.auth-points { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; }
.auth-point .ico {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); color: #fda4af; flex: none;
}
.auth-point strong { display: block; font-size: 13px; font-weight: 560; }
.auth-point span { font-size: 12px; color: rgba(255, 255, 255, .5); }
.auth-side-foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: rgba(255, 255, 255, .4); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 32px; background: var(--surface); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .auth-logo { display: none; }
.auth-card h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.auth-card .sub { margin-top: 6px; font-size: 13px; color: var(--muted); }
.auth-form { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn-lg { margin-top: 4px; }
.auth-switch { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--brand); font-weight: 560; }
.auth-demo {
  margin-top: 22px; padding: 13px 15px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px dashed var(--line-strong); font-size: 12px; color: var(--muted);
  line-height: 1.8;
}
.auth-demo strong { color: var(--ink-2); font-weight: 560; }
.auth-demo code { font-family: var(--mono); background: #fff; border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; color: var(--ink-2); }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.auth-links a { color: var(--muted); }
.auth-links a:hover { color: var(--brand); }

/* ---------- Marketing ---------- */
.market { background: var(--surface); }
.market-nav {
  position: sticky; top: 0; z-index: 50; height: 72px; display: flex; align-items: center;
  padding: 0 max(24px, calc((100vw - 1200px) / 2)); gap: 30px;
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(232, 234, 241, .7);
}
.market-nav .links { display: flex; align-items: center; gap: 26px; }
.market-nav .links a { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.market-nav .links a:hover { color: var(--brand); }
.market-nav .actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.market-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; background: radial-gradient(900px 400px at 80% 0%, #fff1f3 0%, transparent 60%), radial-gradient(700px 380px at 0% 20%, #f4f7ff 0%, transparent 55%); }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 560; border: 1px solid rgba(244, 63, 94, .1);
}
.hero h1 { margin-top: 18px; font-size: clamp(38px, 4.4vw, 58px); line-height: 1.1; letter-spacing: -.04em; font-weight: 750; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 18px; font-size: 16px; line-height: 1.8; color: var(--muted); max-width: 500px; }
.hero-cta { display: flex; align-items: center; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-trust { display: flex; align-items: center; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-trust .item strong { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.hero-trust .item span { font-size: 12px; color: var(--muted); }
.hero-visual { position: relative; }
.hero-glow {
  position: absolute; inset: -40px -20px; background: radial-gradient(circle at 60% 40%, rgba(244, 63, 94, .18), transparent 60%); filter: blur(8px);
}
.mock {
  position: relative; border-radius: 22px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 40px 90px -40px rgba(22, 24, 38, .34), 0 2px 6px rgba(22, 24, 38, .04);
  overflow: hidden;
}
.mock-bar { height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #e2e5ee; display: block; }
.mock-bar i:nth-child(1) { background: #fda4af; }
.mock-bar i:nth-child(2) { background: #fcd34d; }
.mock-bar i:nth-child(3) { background: #86efac; }
.mock-bar .addr { margin-left: 10px; height: 20px; flex: 1; border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: 9px; color: var(--muted-2); display: flex; align-items: center; padding: 0 8px; }
.mock-body { display: grid; grid-template-columns: 132px 1fr; min-height: 360px; }
.mock-side { border-right: 1px solid var(--line); padding: 14px 10px; background: #fff; }
.mock-logo { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); margin: 0 0 14px 6px; }
.mock-nav { display: flex; flex-direction: column; gap: 5px; }
.mock-nav span { height: 24px; border-radius: 6px; display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 8.5px; color: var(--muted); }
.mock-nav span::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: #e2e5ee; }
.mock-nav span.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.mock-nav span.on::before { background: var(--brand); }
.mock-main { padding: 18px; background: var(--bg); }
.mock-title { font-size: 12px; font-weight: 650; margin-bottom: 2px; }
.mock-sub { font-size: 8px; color: var(--muted-2); }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mock-stat { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.mock-stat span { display: block; font-size: 7px; color: var(--muted-2); }
.mock-stat strong { display: block; font-size: 16px; font-weight: 700; margin-top: 3px; letter-spacing: -.02em; }
.mock-chart { margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; height: 112px; position: relative; overflow: hidden; }
.mock-bars { position: absolute; inset: 14px 12px 12px; display: flex; align-items: flex-end; gap: 5px; }
.mock-bars i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #fda4af, #fff1f3); }
.mock-bars i:nth-child(4n) { background: linear-gradient(180deg, #fb7185, #ffe4e8); }
.mock-rows { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.mock-row { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.mock-row .ava { width: 16px; height: 16px; border-radius: 5px; background: var(--grad-soft); }
.mock-row .ln { height: 5px; border-radius: 99px; background: #eef0f5; flex: 1; }
.mock-row .ln.short { max-width: 46px; }
.mock-badge { font-size: 6.5px; padding: 2px 6px; border-radius: 99px; background: var(--success-soft); color: var(--success); }
.mock-float {
  position: absolute; right: -18px; bottom: 26px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 9px;
}
.mock-float .fi { width: 30px; height: 30px; border-radius: 9px; background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center; }
.mock-float strong { display: block; font-size: 12px; }
.mock-float span { font-size: 10px; color: var(--muted); }

.section { padding: 76px 0; }
.section.alt { background: var(--bg); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head .kicker { font-size: 11px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.section-head h2 { margin-top: 10px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; font-weight: 720; }
.section-head p { margin-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
  transition: transform .22s ease, box-shadow .25s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #e6e8f0; }
.feature .fi { width: 44px; height: 44px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature h3 { font-size: 16px; font-weight: 620; letter-spacing: -.01em; }
.feature p { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.75; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.flow-step { position: relative; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.flow-step .no {
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; margin-bottom: 14px;
}
.flow-step h3 { font-size: 14.5px; font-weight: 620; }
.flow-step p { margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.notice-strip { margin: 0 auto; max-width: 1200px; padding: 0 24px; }
.notice-strip .inner {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 12px;
  background: var(--brand-soft); border: 1px solid rgba(244, 63, 94, .1); color: var(--brand);
  font-size: 13px; margin-top: -26px; position: relative; z-index: 2;
}
.notice-strip .inner a { margin-left: auto; font-weight: 560; white-space: nowrap; }
.cta-band { position: relative; overflow: hidden; border-radius: 26px; padding: 52px; background: linear-gradient(135deg, #1c1e30, #37202f 60%, #55202e); color: #fff; }
.cta-band::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 63, 94, .45), transparent 65%); }
.cta-band h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; }
.cta-band p { margin-top: 10px; color: rgba(255, 255, 255, .62); font-size: 14px; }
.cta-band .actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta-band .btn-primary { background: #fff; color: #1c1e30; }
.market-footer { border-top: 1px solid var(--line); padding: 40px 0 36px; background: #fff; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { max-width: 300px; }
.footer-brand p { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.footer-cols { display: flex; gap: 70px; }
.footer-col h4 { font-size: 12px; font-weight: 620; color: var(--ink); margin-bottom: 12px; }
.footer-col a { display: block; font-size: 12.5px; color: var(--muted); padding: 4px 0; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted-2); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.price-card { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; display: flex; flex-direction: column; }
.price-card.highlight { border-color: rgba(244, 63, 94, .34); box-shadow: 0 26px 60px -30px rgba(244, 63, 94, .4); }
.price-card.highlight::before { content: "最受欢迎"; position: absolute; top: -12px; left: 24px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 99px; }
.price-card h3 { font-size: 17px; font-weight: 620; }
.price-card .desc { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.price { margin-top: 20px; display: flex; align-items: baseline; gap: 4px; }
.price strong { font-size: 38px; font-weight: 720; letter-spacing: -.04em; }
.price span { font-size: 12px; color: var(--muted); }
.price-card ul { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-card li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.price-card li svg { color: var(--success); }
.price-card .btn { margin-top: 24px; }
.fee-table { margin-top: 40px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px;
}
.faq summary { list-style: none; cursor: pointer; padding: 17px 0; font-size: 14px; font-weight: 560; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 18px; color: var(--muted); font-weight: 400; }
.faq[open] summary::after { content: "−"; }
.faq p { padding: 0 0 18px; font-size: 13px; color: var(--muted); line-height: 1.8; }

/* ---------- Details / popover ---------- */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.card > summary.card-head { border-bottom: 1px solid transparent; }
details.card[open] > summary.card-head { border-bottom-color: var(--line); }
details.card > summary.card-head::after {
  content: "+"; margin-left: 10px; color: var(--muted-2); font-size: 17px; font-weight: 400;
}
details.card[open] > summary.card-head::after { content: "−"; }
.action-pop { position: relative; display: inline-block; }
.action-pop > summary { cursor: pointer; list-style: none; }
.action-pop > summary::-webkit-details-marker { display: none; }
.pop-form {
  position: absolute; right: 0; top: calc(100% + 8px); width: 250px; z-index: 25;
  display: flex; flex-direction: column; gap: 8px; padding: 13px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.pop-form .textarea { min-height: 72px; font-size: 12.5px; }
.pop-form .label { font-size: 12px; }

/* ---------- Installer ---------- */
.install-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 85% 0%, #fff1f3 0%, transparent 60%),
    radial-gradient(700px 380px at 0% 12%, #eef4ff 0%, transparent 55%),
    var(--bg);
}
.install-top {
  max-width: 1200px; margin: 0 auto; padding: 26px 28px 0;
  display: flex; align-items: center; gap: 16px;
}
.install-top .brand { padding: 0; }
.install-tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 99px; background: var(--brand-soft); color: var(--brand);
  font-size: 11.5px; font-weight: 600;
}
.install-top-meta {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--muted); font-family: var(--mono);
}
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.install-main { max-width: 1200px; margin: 0 auto; padding: 38px 28px 48px; }
.install-hero { max-width: 700px; }
.install-hero h1 { margin-top: 14px; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.15; letter-spacing: -.035em; font-weight: 750; }
.install-hero p { margin-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.install-steps { display: flex; align-items: center; gap: 8px; margin: 28px 0 20px; flex-wrap: wrap; }
.install-step {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px;
  border-radius: 99px; background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); font-weight: 520;
}
.install-step span {
  width: 19px; height: 19px; border-radius: 50%; background: var(--muted-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 650; color: var(--muted);
}
.install-step.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.install-step.is-active span { background: rgba(255, 255, 255, .18); color: #fff; }
.install-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
.install-env { position: sticky; top: 24px; }
.install-env .card-body { padding: 18px; }
.env-list { display: flex; flex-direction: column; gap: 2px; }
.env-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.env-item:last-child { border-bottom: 0; }
.env-ico {
  width: 22px; height: 22px; border-radius: 7px; flex: none; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  background: var(--muted-soft); color: var(--muted);
}
.env-item.is-ok .env-ico { background: var(--success-soft); color: var(--success); }
.env-item.is-fail .env-ico { background: var(--danger-soft); color: var(--danger); }
.env-item.is-warn .env-ico { background: var(--warning-soft); color: var(--warning); }
.env-text { min-width: 0; line-height: 1.5; }
.env-text strong { display: block; font-size: 12.5px; font-weight: 560; color: var(--ink-2); }
.env-text strong .req { display: inline; color: var(--brand); margin-left: 2px; font-size: 11px; }
.env-text > span { display: block; font-size: 11px; color: var(--muted); word-break: break-word; }
.env-text em { display: block; margin-top: 2px; font-style: normal; font-size: 11px; color: var(--warning); }
.env-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px;
  padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line);
}
.env-info span { display: block; font-size: 10.5px; color: var(--muted-2); }
.env-info strong { display: block; font-size: 12px; font-weight: 560; margin-top: 2px; word-break: break-word; }
.install-form .card-body { padding: 22px 24px; }
.install-section { padding: 20px 0; border-top: 1px solid var(--line); }
.install-section:first-of-type { border-top: 0; padding-top: 0; }
.install-section h3 { font-size: 14px; font-weight: 620; margin-bottom: 14px; letter-spacing: -.01em; }
.db-panel.is-hidden, .is-hidden { display: none !important; }
.install-note {
  display: flex; gap: 10px; padding: 13px 14px; border-radius: 10px;
  background: var(--info-soft); border: 1px solid #dbe7ff; color: #1d4ed8; font-size: 12.5px; line-height: 1.65;
}
.install-note svg { flex: none; margin-top: 2px; }
.install-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.install-actions-text { font-size: 12px; color: var(--muted); max-width: 380px; }
.install-foot {
  max-width: 1200px; margin: 0 auto; padding: 0 28px 30px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted-2);
}
.install-foot span { display: inline-flex; align-items: center; gap: 6px; }
.install-foot code, .install-body code { font-family: var(--mono); font-size: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.install-result {
  max-width: 760px; margin: 20px auto 0; padding: 44px 44px 38px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.result-icon {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
}
.result-icon.is-success { background: var(--success-soft); color: var(--success); box-shadow: 0 14px 30px -14px rgba(15, 157, 116, .5); }
.result-icon.is-warning { background: var(--warning-soft); color: var(--warning); box-shadow: 0 14px 30px -14px rgba(217, 119, 6, .45); }
.install-result h1 { margin-top: 14px; font-size: 30px; letter-spacing: -.03em; font-weight: 720; }
.install-result > p { margin: 10px auto 0; max-width: 560px; font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.result-meta {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  margin: 26px 0; text-align: left;
}
.result-meta > div { padding: 13px 15px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.result-meta span { display: block; font-size: 11px; color: var(--muted-2); }
.result-meta strong { display: block; margin-top: 3px; font-size: 13px; font-weight: 560; word-break: break-word; }
.result-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13px; color: var(--ink-2); animation: toastIn .28s cubic-bezier(.2, .8, .2, 1);
}
.toast .ti { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; }
.toast-success .ti { background: var(--success-soft); color: var(--success); }
.toast-error .ti { background: var(--danger-soft); color: var(--danger); }
.toast-warning .ti { background: var(--warning-soft); color: var(--warning); }
.toast-info .ti { background: var(--info-soft); color: var(--info); }
.toast .tx { flex: 1; padding-top: 3px; line-height: 1.55; }
.toast .close { color: var(--muted-2); padding: 3px; }
.toast .close:hover { color: var(--ink); }
.toast.is-out { opacity: 0; transform: translateX(12px); transition: all .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 10px; padding: 13px 15px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6; border: 1px solid transparent; }
.alert svg { flex: none; margin-top: 2px; }
.alert-info { background: var(--info-soft); color: #1d4ed8; border-color: #dbe7ff; }
.alert-success { background: var(--success-soft); color: #087a5a; border-color: #d1f2e6; }
.alert-warning { background: var(--warning-soft); color: #b45309; border-color: #ffe8c2; }
.alert-danger { background: var(--danger-soft); color: #be123c; border-color: #ffd3de; }
.alert strong { font-weight: 620; }

/* ---------- Detail list ---------- */
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.meta-item span { display: block; font-size: 11.5px; color: var(--muted-2); margin-bottom: 4px; }
.meta-item strong { font-size: 13.5px; font-weight: 560; }
.kv { display: flex; flex-direction: column; gap: 12px; }
.kv-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; font-size: 13px; }
.kv-row span { color: var(--muted); }
.kv-row strong { font-weight: 560; text-align: right; }
.summary-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row span { color: var(--muted); }
.summary-row strong { font-weight: 620; }
.total-row { font-size: 15px; }
.total-row strong { font-size: 20px; color: var(--brand); letter-spacing: -.02em; }

/* ---------- Copy field ---------- */
.copy-field { display: flex; align-items: center; gap: 8px; }
.copy-field input { flex: 1; font-family: var(--mono); font-size: 12px; }
.copy-field .btn { flex: none; }

/* ---------- Error page ---------- */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; background: radial-gradient(700px 380px at 70% 10%, #fff1f3, transparent 60%), var(--bg); }
.error-card { max-width: 520px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 48px 44px; box-shadow: var(--shadow); }
.error-code { font-size: 72px; font-weight: 800; letter-spacing: -.06em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-card h1 { margin-top: 14px; font-size: 20px; font-weight: 650; }
.error-card p { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.error-card .actions { margin-top: 26px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Skeleton / misc ---------- */
.skeleton { background: linear-gradient(90deg, #f1f2f7 25%, #f8f9fc 37%, #f1f2f7 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.scroll-x { overflow-x: auto; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.cursor-pointer { cursor: pointer; }
.hover-lift { transition: transform .2s ease, box-shadow .2s ease; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sidebar-overlay { display: none; }
.only-mobile { display: none !important; }
.only-desktop { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { gap: 36px; }
  .mock-float { display: none; }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 60px rgba(20, 24, 45, .18); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(16, 18, 30, .36); z-index: 39; backdrop-filter: blur(2px); }
  .main { margin-left: 0; }
  .topbar { padding: 0 20px; }
  .topbar .menu-btn { display: inline-flex; }
  .content { padding: 22px 20px 48px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-card .auth-logo { display: flex; margin-bottom: 26px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .hero { padding-top: 56px; }
  .market-nav .links { display: none; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .footer-cols { gap: 40px; }
  .install-grid { grid-template-columns: 1fr; }
  .install-env { position: static; }
}

@media (max-width: 760px) {
  .topbar-search { display: none; }
  .topbar { height: 62px; gap: 8px; }
  .user-menu-text { display: none; }
  .content { padding: 20px 16px 44px; }
  .card-head { flex-wrap: wrap; }
  .chart-box { overflow-x: auto; padding-bottom: 10px; }
  .chart-svg { width: 640px; max-width: none; }
  .only-mobile { display: block !important; }
  .only-desktop { display: none !important; }
  .table { min-width: 680px; }
  .table-compact { min-width: 560px; }
  .table-fees { min-width: 0; width: 100%; }
  .table-fees th:nth-child(3), .table-fees td:nth-child(3) { display: none; }
  .mobile-list { display: flex; flex-direction: column; }
  .mobile-task { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .mobile-task:last-child { border-bottom: 0; }
  .mobile-task strong.title { display: block; margin: 8px 0 6px; font-size: 14px; font-weight: 600; line-height: 1.5; }
  .mobile-task .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
  .page-head h1 { font-size: 21px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 15px; }
  .stat-value { font-size: 23px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .radio-cards { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .hero-trust { gap: 18px; }
  .mock-body { grid-template-columns: 96px minmax(0, 1fr); min-height: 320px; }
  .mock-side { padding: 12px 8px; }
  .mock-logo { margin-left: 4px; }
  .mock-nav span { font-size: 7.5px; padding: 0 6px; gap: 5px; }
  .mock-main { padding: 14px; min-width: 0; }
  .mock-stats { gap: 6px; }
  .mock-stat { padding: 7px; }
  .mock-stat strong { font-size: 13px; }
  .mock-row { padding: 6px 7px; }
  .cta-band { padding: 34px 24px; }
  .cta-band h2 { font-size: 24px; line-height: 1.32; }
  .section { padding: 54px 0; }
  .balance-hero { padding: 22px 20px; }
  .balance-amount { font-size: 34px; }
  .balance-stats { gap: 10px; }
  .balance-stats strong { font-size: 14px; }
  .pagination { justify-content: center; }
  .footer-cols { flex-wrap: wrap; gap: 28px; }
  .card-head { padding: 15px 16px; }
  .card-body { padding: 16px; }
  .card-body.tight { padding: 12px 16px; }
  .table th, .table td { padding: 11px 12px; }
  .auth-main { padding: 32px 20px; }
  .auth-card h2 { font-size: 23px; }
  .modal-card { width: calc(100vw - 28px); }
  .install-top { padding: 20px 18px 0; }
  .install-top-meta { display: none; }
  .install-main { padding: 28px 16px 40px; }
  .install-foot { padding: 0 18px 24px; }
  .install-result { padding: 32px 20px 28px; border-radius: var(--radius-lg); }
  .install-result h1 { font-size: 25px; }
  .result-meta { grid-template-columns: 1fr; }
  .install-steps { gap: 6px; }
  .install-step { height: 31px; padding: 0 10px; font-size: 11.5px; }
  .install-form .card-body { padding: 18px 16px; }
  .install-actions { flex-direction: column; align-items: stretch; }
  .install-actions .btn { width: 100%; }
  .install-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
