/* ==========================================================================
   站灵 · AI 网站管家 — 界面样式
   ========================================================================== */

:root {
  --ink: #0b1220;
  --ink-2: #1e293b;
  --ink-3: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e7eaf2;
  --line-2: #eef1f7;
  --bg: #f6f7fb;
  --bg-2: #fbfcfe;
  --card: #ffffff;
  --brand: #5b5bd6;
  --brand-2: #8b5cf6;
  --brand-3: #22d3ee;
  --brand-soft: #eef0ff;
  --mint: #10b981;
  --mint-soft: #e7f8f1;
  --amber: #f59e0b;
  --amber-soft: #fff7e6;
  --red: #ef4444;
  --red-soft: #fdecec;
  --sidebar: #0b1020;
  --sidebar-2: #111a33;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 10px 30px -16px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .04);
  --shadow-lg: 0 30px 70px -30px rgba(15, 23, 42, .35);
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --grad: linear-gradient(135deg, #5b5bd6 0%, #8b5cf6 55%, #22d3ee 130%);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: #4646c6; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
::selection { background: rgba(99, 102, 241, .18); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 20px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

.boot-screen {
  height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; background: radial-gradient(900px 500px at 50% -10%, #e9e9ff, transparent 70%), var(--bg);
}
.boot-logo {
  width: 64px; height: 64px; border-radius: 18px; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 28px; font-weight: 800;
  box-shadow: 0 18px 40px -18px rgba(91, 91, 214, .8);
  animation: floaty 2.4s ease-in-out infinite;
}
.boot-text { color: var(--muted); font-size: 13px; letter-spacing: .08em; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ------------------------------------------------------------------ 基础组件 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13.5px;
  transition: all .18s ease; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: #d8dcea; background: #fafbff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--grad); color: #fff; border: 0;
  box-shadow: 0 10px 24px -12px rgba(91, 91, 214, .9);
}
.btn-primary:hover { background: var(--grad); filter: brightness(1.05); box-shadow: 0 14px 28px -12px rgba(91, 91, 214, 1); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: #16213d; border-color: #16213d; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f2f4fa; color: var(--ink-2); border-color: transparent; }
.btn-danger { color: var(--red); border-color: #f6d7d7; background: #fff; }
.btn-danger:hover { background: var(--red-soft); border-color: #f0bcbc; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 15px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.card-body { padding: 20px 22px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #f1f3f9; color: var(--muted);
  white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge-green { background: var(--mint-soft); color: #0d8f68; }
.badge-amber { background: var(--amber-soft); color: #b4740a; }
.badge-red { background: var(--red-soft); color: #cf3030; }
.badge-brand { background: var(--brand-soft); color: #4a4ac4; }
.badge-dark { background: #eef1f7; color: var(--ink-3); }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); display: inline-block; flex: 0 0 auto; }
.dot-green { background: var(--mint); box-shadow: 0 0 0 3px rgba(16, 185, 129, .14); }
.dot-amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(245, 158, 11, .14); }
.dot-red { background: var(--red); box-shadow: 0 0 0 3px rgba(239, 68, 68, .14); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #eef0ff, #e7f8f5); color: #4a4ac4; font-weight: 700; font-size: 13px;
  flex: 0 0 auto;
}
.avatar-brand { background: var(--grad); color: #fff; }
.avatar-lg { width: 44px; height: 44px; font-size: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.field .hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 11px;
  padding: 10px 13px; font-size: 13.5px; color: var(--ink); transition: border-color .16s, box-shadow .16s;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: #b9b9ef; box-shadow: 0 0 0 4px rgba(99, 102, 241, .1); }
.input::placeholder, .textarea::placeholder { color: #a7b0c2; }
.textarea { resize: vertical; min-height: 92px; line-height: 1.65; }
.input-sm { height: 34px; padding: 6px 10px; font-size: 12.5px; border-radius: 9px; }
.input-group { display: flex; gap: 8px; }
.input-group .btn { flex: 0 0 auto; }
.mono { font-family: var(--mono); font-size: 12.5px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
  width: 40px; height: 22px; border-radius: 999px; background: #dfe4ef; position: relative; transition: background .18s;
  flex: 0 0 auto;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .18s;
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch .label { font-size: 13px; font-weight: 500; color: var(--ink-2); }

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbff; }
.table .num { font-variant-numeric: tabular-nums; }

.empty {
  text-align: center; padding: 56px 24px; color: var(--muted);
}
.empty .icon-wrap {
  width: 56px; height: 56px; border-radius: 16px; background: #f1f3fa; color: #98a2b8;
  display: grid; place-items: center; margin: 0 auto 14px;
}
.empty h4 { font-size: 15px; color: var(--ink-2); margin-bottom: 6px; }
.empty p { font-size: 13px; color: var(--muted); max-width: 380px; margin: 0 auto 18px; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(91, 91, 214, .18);
  border-top-color: var(--brand); animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, #f1f3f9 25%, #f8f9fd 37%, #f1f3f9 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%; } }

/* ------------------------------------------------------------------ 登录 / 落地页 */

.landing { min-height: 100vh; background: #fff; overflow-x: hidden; }
.landing-nav {
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, .82); border-bottom: 1px solid rgba(231, 234, 242, .8);
}
.landing-nav .inner { max-width: 1180px; margin: 0 auto; padding: 0 28px; height: 68px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--ink); letter-spacing: -.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: 16px; font-weight: 800;
  box-shadow: 0 8px 18px -8px rgba(91, 91, 214, .8);
}
.brand small { display: block; font-size: 10.5px; color: var(--muted-2); font-weight: 500; letter-spacing: .12em; }
.landing-nav .links { display: flex; gap: 26px; margin-left: 8px; }
.landing-nav .links a { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.landing-nav .links a:hover { color: var(--ink); }
.landing-nav .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.hero { position: relative; padding: 76px 28px 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -10%; height: 640px;
  background:
    radial-gradient(560px 320px at 18% 18%, rgba(99, 102, 241, .18), transparent 65%),
    radial-gradient(520px 320px at 82% 8%, rgba(34, 211, 238, .16), transparent 65%),
    radial-gradient(460px 320px at 62% 62%, rgba(139, 92, 246, .12), transparent 65%);
  pointer-events: none;
}
.hero .inner { position: relative; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--ink-3); font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot { background: var(--mint); }
.hero h1 { font-size: 52px; line-height: 1.14; letter-spacing: -.035em; margin: 20px 0 18px; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 16px; color: var(--muted); line-height: 1.8; max-width: 480px; }
.hero .cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero .trust { display: flex; gap: 22px; margin-top: 30px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.hero .trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero .trust svg { width: 14px; height: 14px; color: var(--mint); }

.hero-visual { position: relative; }
.glass-card {
  background: rgba(255, 255, 255, .9); border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px; box-shadow: 0 40px 90px -40px rgba(15, 23, 42, .45), 0 2px 10px rgba(15, 23, 42, .04);
  backdrop-filter: blur(18px); overflow: hidden;
}
.mock-window { transform: rotate(-1.2deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); background: #fbfcff; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #e5e8f0; display: block; }
.mock-bar .url { margin-left: 10px; height: 22px; flex: 1; border-radius: 7px; background: #f1f3f9; display: flex; align-items: center; padding: 0 9px; font-size: 10.5px; color: var(--muted-2); }
.mock-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(180deg, #fff, #fafbff); }
.mock-msg { display: flex; gap: 9px; }
.mock-msg .bubble { background: #f3f4fb; border-radius: 12px; padding: 9px 12px; font-size: 11.5px; color: var(--ink-2); max-width: 84%; line-height: 1.6; }
.mock-msg.right { justify-content: flex-end; }
.mock-msg.right .bubble { background: var(--brand); color: #fff; }
.mock-tool { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #0d8f68; background: var(--mint-soft); padding: 7px 10px; border-radius: 9px; width: fit-content; font-weight: 600; }
.mock-compose { margin: 4px 16px 16px; border: 1px dashed #d9deec; border-radius: 12px; padding: 10px 12px; font-size: 11px; color: var(--muted-2); display: flex; justify-content: space-between; align-items: center; background: #fff; }
.float-card {
  position: absolute; right: -18px; bottom: -26px; background: #fff; border-radius: 14px; padding: 12px 16px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); animation: floaty 5s ease-in-out infinite;
}
.float-card .mini { color: var(--muted); font-weight: 500; font-size: 11px; }

.section { padding: 80px 28px; }
.section .inner { max-width: 1180px; margin: 0 auto; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .kicker { color: var(--brand); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section-head h2 { font-size: 36px; letter-spacing: -.03em; margin: 12px 0 12px; }
.section-head p { color: var(--muted); font-size: 15px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  transition: all .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #dcdfef; }
.feature .ic {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--brand-soft); color: var(--brand);
}
.feature .ic.green { background: var(--mint-soft); color: #0d8f68; }
.feature .ic.amber { background: var(--amber-soft); color: #b4740a; }
.feature h3 { font-size: 15.5px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 13px; line-height: 1.75; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 26px; background: #fbfcff; border: 1px solid var(--line); border-radius: 18px; }
.step .n {
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; font-weight: 700;
  display: grid; place-items: center; font-size: 13px; margin-bottom: 14px;
}
.step h3 { font-size: 15px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13px; }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; position: relative; }
.price.featured { border-color: transparent; box-shadow: 0 30px 60px -30px rgba(91, 91, 214, .5); }
.price.featured::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 1.5px; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.price .tag { font-size: 12px; color: var(--brand); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.price h3 { font-size: 20px; margin: 10px 0 6px; }
.price .amount { font-size: 40px; font-weight: 800; letter-spacing: -.04em; margin: 8px 0 2px; }
.price .amount small { font-size: 14px; color: var(--muted); font-weight: 500; }
.price ul { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.price li { display: flex; gap: 8px; font-size: 13px; color: var(--ink-3); }
.price li svg { width: 16px; height: 16px; color: var(--mint); flex: 0 0 auto; margin-top: 2px; }

.landing-footer { border-top: 1px solid var(--line); padding: 40px 28px; color: var(--muted); font-size: 12.5px; }
.landing-footer .inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* 登录页 */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.auth-side {
  position: relative; background: var(--sidebar); color: #fff; padding: 56px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 20% 10%, rgba(99, 102, 241, .4), transparent 60%),
    radial-gradient(500px 400px at 90% 80%, rgba(34, 211, 238, .22), transparent 60%);
}
.auth-side > * { position: relative; }
.auth-side .brand { color: #fff; }
.auth-side .brand small { color: rgba(255, 255, 255, .5); }
.auth-side h2 { font-size: 34px; line-height: 1.3; letter-spacing: -.03em; margin: 40px 0 16px; max-width: 440px; }
.auth-side p { color: rgba(255, 255, 255, .62); font-size: 14.5px; max-width: 420px; line-height: 1.8; }
.auth-points { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-direction: column; gap: 16px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: rgba(255, 255, 255, .82); }
.auth-points .tick {
  width: 22px; height: 22px; border-radius: 7px; background: rgba(255, 255, 255, .1); display: grid; place-items: center;
  flex: 0 0 auto; color: #6ee7b7;
}
.auth-points svg { width: 13px; height: 13px; }
.auth-quote { border-left: 2px solid rgba(255, 255, 255, .2); padding-left: 16px; color: rgba(255, 255, 255, .55); font-size: 12.5px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 28px; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card h1 { font-size: 26px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--muted); margin: 8px 0 26px; font-size: 13.5px; }
.auth-tabs { display: flex; gap: 4px; background: #f3f4fa; padding: 4px; border-radius: 12px; margin-bottom: 24px; }
.auth-tabs button {
  flex: 1; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 13px; transition: all .16s;
}
.auth-tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-foot { margin-top: 20px; color: var(--muted); font-size: 12.5px; text-align: center; }
.form-error {
  display: none; margin-bottom: 14px; padding: 10px 12px; border-radius: 10px; background: var(--red-soft);
  color: #b42323; font-size: 12.5px; border: 1px solid #f6d0d0;
}
.form-error.show { display: block; }

/* ------------------------------------------------------------------ 应用外壳 */

.app-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar {
  width: 264px; flex: 0 0 264px; background: var(--sidebar); color: #d7deea;
  display: flex; flex-direction: column; position: relative; z-index: 40;
  background-image: radial-gradient(400px 240px at 10% 0%, rgba(99, 102, 241, .18), transparent 70%),
    radial-gradient(300px 240px at 100% 100%, rgba(34, 211, 238, .08), transparent 70%);
}
.sidebar-head { padding: 20px 20px 16px; display: flex; align-items: center; justify-content: space-between; }
.sidebar .brand { color: #fff; font-size: 16px; }
.sidebar .brand small { color: rgba(255, 255, 255, .38); }
.sidebar .brand-mark { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
.sidebar-body { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.sidebar-section { margin-top: 18px; }
.sidebar-section .title {
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px 8px;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .56);
  font-weight: 700;
}
.sidebar-section .title button {
  border: 0; background: rgba(255, 255, 255, .07); color: #cbd5e1; width: 22px; height: 22px;
  border-radius: 6px; display: grid; place-items: center; transition: all .16s;
}
.sidebar-section .title button:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.sidebar-section .title button svg { width: 13px; height: 13px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 10px; border-radius: 10px;
  color: #d3dbea; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; letter-spacing: .01em;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .9; }
.nav-item .count { margin-left: auto; font-size: 11.5px; color: rgba(255, 255, 255, .64); }
.site-item { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px; border-radius: 10px; cursor: pointer; color: #cbd5e1; font-size: 13.5px; transition: all .15s; }
.site-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.site-item.active { background: rgba(255, 255, 255, .09); color: #fff; }
.site-item .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-item .dot { width: 6px; height: 6px; }
.site-item.new { color: rgba(255, 255, 255, .62); border: 1px dashed rgba(255, 255, 255, .14); background: transparent; margin-top: 6px; justify-content: center; height: 36px; }
.site-item.new:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; cursor: pointer; transition: background .15s; }
.user-card:hover { background: rgba(255, 255, 255, .06); }
.user-card .avatar { width: 32px; height: 32px; font-size: 12px; }
.user-card .meta { flex: 1; min-width: 0; }
.user-card .meta b { display: block; font-size: 13px; color: #edf2f8; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card .meta span { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .58); }
.user-card .credits { font-size: 11px; color: #6ee7b7; font-weight: 700; white-space: nowrap; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  height: 62px; flex: 0 0 62px; display: flex; align-items: center; gap: 14px; padding: 0 26px;
  background: rgba(246, 247, 251, .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  z-index: 20;
}
.topbar .crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.topbar .crumbs b { color: var(--ink); font-weight: 600; }
.topbar .crumbs svg { width: 14px; height: 14px; opacity: .5; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent;
  display: grid; place-items: center; color: var(--muted); position: relative;
}
.topbar .icon-btn:hover { background: #eef1f8; color: var(--ink); }
.topbar .icon-btn svg { width: 18px; height: 18px; }
.topbar .user-chip {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.topbar .user-chip .avatar { width: 28px; height: 28px; font-size: 11px; }
.hamburger { display: none; }

.view { flex: 1; overflow-y: auto; min-height: 0; }
.view.no-scroll { overflow: hidden; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px; }
.page-wide { max-width: 1400px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -.025em; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 5px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 仪表盘 */
.hero-card {
  position: relative; overflow: hidden; border-radius: 20px; padding: 28px 30px;
  background: linear-gradient(115deg, #151a35 0%, #262a5c 48%, #3b2f74 100%); color: #fff;
  box-shadow: 0 30px 60px -36px rgba(30, 27, 75, .9);
}
.hero-card::before {
  content: ""; position: absolute; right: -60px; top: -80px; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .35), transparent 62%);
}
.hero-card::after {
  content: ""; position: absolute; right: 120px; bottom: -120px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, .45), transparent 62%);
}
.hero-card > * { position: relative; }
.hero-card .hello { font-size: 13px; color: rgba(255, 255, 255, .6); }
.hero-card h1 { font-size: 26px; margin: 8px 0 10px; letter-spacing: -.02em; }
.hero-card p { color: rgba(255, 255, 255, .62); font-size: 13.5px; max-width: 520px; }
.hero-card .actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hero-card .balance { display: flex; align-items: flex-end; gap: 8px; margin-top: 26px; }
.hero-card .balance b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.hero-card .balance span { font-size: 12px; color: rgba(255, 255, 255, .55); padding-bottom: 4px; }
.hero-card .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #fff; }
.hero-card .btn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .28); }
.hero-card .btn-primary { background: #fff; color: #262a5c; border: 0; }
.hero-card .btn-primary:hover { background: #f1f2ff; }

.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat-card .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-card .value { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-card .value small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat-card .foot { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }

.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.site-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: all .2s; cursor: pointer; display: flex; flex-direction: column; gap: 12px; }
.site-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #dcdfef; }
.site-card .head { display: flex; align-items: center; gap: 10px; }
.site-card .logo {
  width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: 0 0 auto;
}
.site-card .name { font-weight: 700; font-size: 14.5px; }
.site-card .url { font-size: 11.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card .meta { display: flex; gap: 14px; color: var(--muted); font-size: 11.5px; border-top: 1px dashed var(--line); padding-top: 12px; }
.site-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.site-card .meta svg { width: 13px; height: 13px; opacity: .7; }

.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 8px; }
.chart-bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.chart-bars .bar i {
  display: block; width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #8b5cf6, #6366f1); min-height: 4px; transition: height .4s ease;
}
.chart-bars .bar.dim i { background: #e6e9f4; }
.chart-bars .bar span { font-size: 10px; color: var(--muted-2); white-space: nowrap; }
.chart-bars .bar b { font-size: 10.5px; color: var(--ink-3); font-weight: 700; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .ic { width: 32px; height: 32px; border-radius: 9px; background: #f2f4fb; display: grid; place-items: center; color: var(--muted); flex: 0 0 auto; }
.list-row .ic svg { width: 15px; height: 15px; }
.list-row .main-txt { flex: 1; min-width: 0; }
.list-row .main-txt b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .main-txt span { display: block; font-size: 11.5px; color: var(--muted-2); }
.list-row .time { font-size: 11px; color: var(--muted-2); white-space: nowrap; }

.banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px;
  background: var(--amber-soft); border: 1px solid #f7e2b8; color: #8a5a06; font-size: 12.5px;
}
.banner .grow { color: #8a5a06; }
.banner svg { width: 17px; height: 17px; flex: 0 0 auto; }
.banner .btn { background: #fff; border-color: #f0d49b; color: #8a5a06; }

/* ------------------------------------------------------------------ 站点工作区 */

.site-head { padding: 20px 26px 0; border-bottom: 1px solid var(--line); background: #fff; }
.site-head .top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.site-head .logo { width: 44px; height: 44px; border-radius: 13px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: 0 0 auto; }
.site-head h1 { font-size: 19px; letter-spacing: -.02em; }
.site-head .url { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.site-head .url a { color: var(--muted); }
.site-head .url a:hover { color: var(--brand); }
.site-head .url svg { width: 12px; height: 12px; }
.site-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.site-tabs { display: flex; gap: 4px; margin-top: 18px; overflow-x: auto; }
.site-tabs a {
  position: relative; padding: 10px 14px 13px; font-size: 13px; color: var(--muted); font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.site-tabs a svg { width: 15px; height: 15px; }
.site-tabs a:hover { color: var(--ink-2); }
.site-tabs a.active { color: var(--brand); }
.site-tabs a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); }

/* 对话 */
.chat-layout { display: flex; height: 100%; min-height: 0; }
.conv-panel { width: 252px; flex: 0 0 252px; border-right: 1px solid var(--line); background: #fbfcff; display: flex; flex-direction: column; min-height: 0; }
.conv-panel .head { padding: 16px 14px 10px; display: flex; align-items: center; justify-content: space-between; }
.conv-panel .head b { font-size: 12.5px; color: var(--ink-3); }
.conv-list { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.conv-item { padding: 10px 11px; border-radius: 10px; cursor: pointer; transition: background .15s; margin-bottom: 2px; }
.conv-item:hover { background: #f1f3fa; }
.conv-item.active { background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); }
.conv-item .t { font-size: 12.5px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .m { font-size: 11px; color: var(--muted-2); margin-top: 2px; display: flex; justify-content: space-between; gap: 8px; }
.conv-item .del { opacity: 0; color: var(--muted-2); border: 0; background: none; padding: 0 2px; }
.conv-item:hover .del { opacity: 1; }
.conv-item .del:hover { color: var(--red); }
.conv-empty { padding: 26px 14px; text-align: center; color: var(--muted-2); font-size: 12px; }

.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; min-height: 0; }
.chat-top { height: 52px; flex: 0 0 52px; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--line-2); }
.chat-top .model { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.chat-top .model .dot { width: 6px; height: 6px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 22px 24px 8px; scroll-behavior: smooth; }
.chat-inner { max-width: 820px; margin: 0 auto; }

.msg { display: flex; gap: 12px; margin-bottom: 22px; animation: fadeUp .25s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg .avatar { margin-top: 2px; }
.msg .body { flex: 1; min-width: 0; }
.msg .who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.msg .who b { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.msg .who span { font-size: 11px; color: var(--muted-2); }
.msg.user { flex-direction: row-reverse; }
.msg.user .body { display: flex; flex-direction: column; align-items: flex-end; }
.msg.user .who { flex-direction: row-reverse; }
.msg.user .content {
  background: linear-gradient(135deg, #5b5bd6, #7c5ce0); color: #fff; border-radius: 16px 16px 4px 16px;
  padding: 11px 15px; max-width: min(86%, 620px); white-space: pre-wrap; word-break: break-word; font-size: 13.5px;
  box-shadow: 0 10px 24px -16px rgba(91, 91, 214, .9);
}
.msg.assistant .content { font-size: 13.8px; color: var(--ink-2); line-height: 1.78; }
.msg .attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; justify-content: flex-end; }
.msg .attachments .chip { background: rgba(255, 255, 255, .18); color: #fff; border-color: transparent; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 27px; padding: 0 10px; border-radius: 8px;
  background: #f3f5fb; border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); max-width: 240px;
}
.chip svg { width: 13px; height: 13px; flex: 0 0 auto; }
.chip .x { border: 0; background: none; color: var(--muted-2); padding: 0; display: grid; place-items: center; }
.chip .x:hover { color: var(--red); }

.msg-meta { display: flex; gap: 12px; align-items: center; margin-top: 8px; font-size: 10.5px; color: var(--muted-2); flex-wrap: wrap; }
.msg-meta span { display: inline-flex; align-items: center; gap: 4px; }
.msg-meta svg { width: 11px; height: 11px; }

.tool-trace { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fbfcff; }
.tool-trace .trace-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px; cursor: pointer; font-size: 11.5px;
  color: var(--muted); font-weight: 600; user-select: none; background: #f8f9fd;
}
.tool-trace .trace-head svg.chev { margin-left: auto; transition: transform .2s; width: 13px; height: 13px; }
.tool-trace.open .trace-head svg.chev { transform: rotate(180deg); }
.tool-trace .trace-list { display: none; padding: 4px 13px 9px; }
.tool-trace.open .trace-list { display: block; }
.tool-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 11.8px; border-top: 1px dashed var(--line); }
.tool-item:first-child { border-top: 0; }
.tool-item .st { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.tool-item .st.ok { background: var(--mint-soft); color: #0d8f68; }
.tool-item .st.fail { background: var(--red-soft); color: var(--red); }
.tool-item .st.run { background: var(--brand-soft); color: var(--brand); }
.tool-item .st svg { width: 10px; height: 10px; }
.tool-item .nm { font-weight: 600; color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.tool-item .ms { color: var(--muted-2); font-size: 10.5px; }
.tool-item .rs { color: var(--muted); flex: 1; }
.tool-item .rs.fail { color: #c33; }

.markdown { word-break: break-word; }
.markdown > *:first-child { margin-top: 0; }
.markdown > *:last-child { margin-bottom: 0; }
.markdown h1, .markdown h2, .markdown h3 { margin: 18px 0 8px; line-height: 1.4; font-size: 15.5px; }
.markdown h1 { font-size: 18px; }
.markdown p { margin: 7px 0; }
.markdown ul, .markdown ol { margin: 8px 0; padding-left: 22px; }
.markdown li { margin: 3px 0; }
.markdown li::marker { color: var(--brand); }
.markdown code { font-family: var(--mono); font-size: 12px; background: #f1f3fa; padding: 1.5px 5px; border-radius: 5px; color: #4b4ba8; }
.markdown pre { background: #0f1428; color: #dbe3f7; padding: 14px 16px; border-radius: 10px; overflow-x: auto; margin: 10px 0; }
.markdown pre code { background: transparent; color: inherit; padding: 0; font-size: 12px; line-height: 1.6; }
.markdown blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid #d9ddf0; background: #fafbff; color: var(--muted); border-radius: 0 8px 8px 0; }
.markdown a { color: var(--brand); text-decoration: underline; text-decoration-color: rgba(91, 91, 214, .3); }
.markdown hr { margin: 14px 0; }
.markdown table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12.5px; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.markdown th { background: #fafbff; }

.typing { display: inline-block; width: 7px; height: 15px; background: var(--brand); border-radius: 2px; vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.composer-wrap { padding: 10px 24px 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 24%); }
.composer { max-width: 820px; margin: 0 auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 12px 30px -20px rgba(15, 23, 42, .35); transition: border-color .18s, box-shadow .18s; }
.composer:focus-within { border-color: #c3c3f2; box-shadow: 0 0 0 4px rgba(99, 102, 241, .08), 0 12px 30px -20px rgba(15, 23, 42, .35); }
.composer textarea {
  width: 100%; border: 0; outline: 0; resize: none; padding: 15px 16px 6px; font-size: 13.5px;
  line-height: 1.7; min-height: 52px; max-height: 200px; background: transparent; color: var(--ink);
}
.composer textarea::placeholder { color: #a5adc0; }
.composer .bar { display: flex; align-items: center; gap: 6px; padding: 6px 10px 10px; }
.composer .bar .icon-btn {
  width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; display: grid; place-items: center;
  color: var(--muted);
}
.composer .bar .icon-btn:hover { background: #f2f4fa; color: var(--ink-2); }
.composer .bar .icon-btn svg { width: 17px; height: 17px; }
.composer .bar .hint { margin-left: auto; font-size: 10.5px; color: var(--muted-2); }
.send-btn {
  width: 36px; height: 36px; border-radius: 11px; border: 0; background: var(--grad); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 18px -10px rgba(91, 91, 214, .9); transition: all .16s;
}
.send-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.send-btn:disabled { opacity: .45; transform: none; cursor: not-allowed; }
.send-btn svg { width: 17px; height: 17px; }
.send-btn.stop { background: var(--ink); }
.attach-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 4px; }
.attach-row:empty { display: none; }

.chat-empty { max-width: 700px; margin: 4vh auto 0; text-align: center; padding: 0 16px; }
.chat-empty .orb {
  width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 16px; background: var(--grad);
  display: grid; place-items: center; color: #fff; box-shadow: 0 20px 40px -20px rgba(91, 91, 214, .8);
}
.chat-empty .orb svg { width: 26px; height: 26px; }
.chat-empty h2 { font-size: 21px; letter-spacing: -.02em; }
.chat-empty p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.suggest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; text-align: left; }
.suggest {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; cursor: pointer;
  transition: all .18s; display: flex; gap: 10px; align-items: flex-start;
}
.suggest:hover { border-color: #cfd3ea; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.suggest .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; }
.suggest .ic svg { width: 15px; height: 15px; }
.suggest b { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.suggest span { display: block; font-size: 11px; color: var(--muted-2); margin-top: 1px; }

/* 文件 / 内容 */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.crumbs-path { display: flex; align-items: center; gap: 4px; font-size: 12px; font-family: var(--mono); color: var(--muted); flex-wrap: wrap; }
.crumbs-path button { border: 0; background: none; padding: 2px 6px; border-radius: 6px; font: inherit; color: var(--ink-3); }
.crumbs-path button:hover { background: #f1f3fa; }
.crumbs-path span { color: var(--muted-2); }

.file-table td { font-size: 12.8px; }
.file-name { display: flex; align-items: center; gap: 9px; cursor: default; }
.file-name .fi { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #f3f5fb; color: var(--muted); flex: 0 0 auto; }
.file-name .fi.dir { background: var(--amber-soft); color: #b4740a; }
.file-name .fi.code { background: var(--brand-soft); color: var(--brand); }
.file-name .fi.img { background: var(--mint-soft); color: #0d8f68; }
.file-name .fi svg { width: 14px; height: 14px; }
.file-name a { color: var(--ink-2); font-weight: 500; }
.file-name a:hover { color: var(--brand); }
.file-actions { display: flex; gap: 2px; justify-content: flex-end; opacity: .35; transition: opacity .15s; }
tr:hover .file-actions { opacity: 1; }
.file-actions button { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 7px; display: grid; place-items: center; color: var(--muted); }
.file-actions button:hover { background: #f2f4fa; color: var(--ink-2); }
.file-actions button.danger:hover { background: var(--red-soft); color: var(--red); }
.file-actions svg { width: 14px; height: 14px; }

.dropzone {
  border: 1.5px dashed #d6dbeb; border-radius: 14px; padding: 26px; text-align: center; color: var(--muted);
  transition: all .18s; background: #fbfcff; cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.dropzone svg { width: 26px; height: 26px; margin-bottom: 6px; }
.dropzone b { display: block; color: var(--ink-2); font-size: 13px; }
.dropzone span { font-size: 11.5px; }

/* 设置 / 表单页 */
.settings-grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.settings-nav a { padding: 8px 12px; border-radius: 9px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.settings-nav a:hover { background: #eef1f8; color: var(--ink-2); }
.settings-nav a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.form-section { margin-bottom: 22px; }
.form-section h3 { font-size: 14px; margin-bottom: 4px; }
.form-section .desc { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.perm-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.perm-row:last-child { border-bottom: 0; }
.perm-row .grow b { display: block; font-size: 13px; }
.perm-row .grow span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.test-result { display: flex; flex-direction: column; gap: 8px; }
.test-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fafbff; border: 1px solid var(--line-2); font-size: 12.5px; }
.test-item .st { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.test-item .st svg { width: 11px; height: 11px; }
.test-item .st.ok { background: var(--mint-soft); color: #0d8f68; }
.test-item .st.fail { background: var(--red-soft); color: var(--red); }
.test-item .st.wait { background: #eef1f8; color: var(--muted); }
.test-item b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); display: block; }

/* 账户 / 计费 */
.balance-card { background: linear-gradient(135deg, #1b1f3b, #2b2560 60%, #3a2b6e); color: #fff; border-radius: 18px; padding: 24px; position: relative; overflow: hidden; }
.balance-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 211, 238, .3), transparent 60%); }
.balance-card .label { font-size: 12px; color: rgba(255, 255, 255, .55); }
.balance-card .num { font-size: 40px; font-weight: 800; letter-spacing: -.04em; line-height: 1.15; margin: 6px 0 2px; }
.balance-card .num small { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, .5); margin-left: 6px; }
.balance-card .eq { font-size: 12px; color: rgba(255, 255, 255, .45); }
.balance-card .acts { display: flex; gap: 8px; margin-top: 18px; }
.balance-card .btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); color: #fff; }
.balance-card .btn:hover { background: rgba(255, 255, 255, .2); }
.price-note { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.price-note div { background: #fafbff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.price-note b { display: block; font-size: 15px; }
.price-note span { font-size: 11px; color: var(--muted); }
.tx-list .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-list .amt.plus { color: #0d8f68; }
.tx-list .amt.minus { color: #cf3030; }

/* 后台 */
.admin-tabs { display: flex; gap: 4px; background: #eef1f8; padding: 4px; border-radius: 11px; width: fit-content; margin-bottom: 20px; }
.admin-tabs a { padding: 7px 13px; border-radius: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.admin-tabs a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.admin-tabs a:hover { color: var(--ink-2); }

/* 弹窗 */
.modal-root { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.modal-mask {
  position: absolute; inset: 0; background: rgba(10, 15, 30, .46); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px; pointer-events: auto;
  animation: fadeIn .18s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 540px; max-height: calc(100vh - 60px); overflow: hidden; display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); animation: modalIn .22s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal.wide { max-width: 760px; }
.modal-head { padding: 20px 24px 14px; display: flex; align-items: flex-start; gap: 12px; }
.modal-head h3 { font-size: 17px; }
.modal-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.modal-head .close { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; border: 0; background: #f4f6fb; color: var(--muted); display: grid; place-items: center; }
.modal-head .close:hover { background: #eceff7; color: var(--ink); }
.modal-head .close svg { width: 15px; height: 15px; }
.modal-body { padding: 4px 24px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line-2); }
.modal-foot .btn-ghost { margin-right: auto; }

.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px; background: #10162b; color: #fff; padding: 10px 16px;
  border-radius: 11px; font-size: 12.5px; box-shadow: var(--shadow-lg); animation: toastIn .22s ease both;
  max-width: 90vw; pointer-events: auto;
}
.toast.out { animation: toastOut .18s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }
.toast svg { width: 15px; height: 15px; flex: 0 0 auto; }
.toast.success svg { color: #6ee7b7; }
.toast.error svg { color: #fca5a5; }

/* 代码编辑弹窗 */
.code-area { width: 100%; min-height: 360px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fbfcff; tab-size: 2; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d9deea; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c6cddd; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 1100px) {
  .hero .inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 42px; }
  .hero-visual { max-width: 560px; }
  .feature-grid, .steps, .price-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 0 60px rgba(0, 0, 0, .3);
  }
  .app-shell.nav-open .sidebar { transform: none; }
  .app-shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(10, 15, 30, .4); z-index: 35; }
  .hamburger { display: grid; }
  .conv-panel { position: absolute; z-index: 10; height: 100%; background: #fff; box-shadow: var(--shadow-lg); display: none; }
  .conv-panel.show { display: flex; }
  .chat-layout { position: relative; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; position: static; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .page { padding: 18px; }
  .site-head { padding: 16px 18px 0; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 640px) {
  .hero { padding: 46px 18px 24px; }
  .hero h1 { font-size: 33px; }
  .hero .lead { font-size: 14px; }
  .section { padding: 54px 18px; }
  .section-head h2 { font-size: 27px; }
  .feature-grid, .steps, .price-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .suggest-grid { grid-template-columns: 1fr; }
  .landing-nav .links { display: none; }
  .hero-card { padding: 22px; }
  .hero-card h1 { font-size: 22px; }
  .chat-scroll { padding: 16px 14px 4px; }
  .composer-wrap { padding: 8px 12px 12px; }
  .msg.user .content { max-width: 92%; }
  .form-row { grid-template-columns: 1fr; }
  .modal-mask { padding: 12px; }
  .page-head h1 { font-size: 21px; }
  .site-card { padding: 16px; }
  .toolbar { padding: 12px 14px; }
  .conv-panel { width: 78%; flex-basis: 78%; }
  .topbar { height: 54px; flex-basis: 54px; gap: 6px; padding: 0 10px; }
  .topbar .crumbs { flex: 1; min-width: 0; gap: 4px; }
  .topbar .crumbs b { display: block; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .user-chip { padding: 0; border: 0; background: transparent; gap: 0; }
  .topbar .user-chip > span:last-child { display: none; }
  .topbar .icon-btn { width: 30px; }
  #chatTitle { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
  .chat-top { padding: 0 12px; gap: 8px; }
  .chat-top .model { font-size: 10.5px; white-space: nowrap; }
  .composer .bar .hint { display: none; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .site-head .actions { width: 100%; margin-left: 0; }
  .site-head h1 { font-size: 17px; }
  .site-head .logo { width: 38px; height: 38px; border-radius: 11px; font-size: 15px; }
}

/* 内容页左侧栏目导航：白底深字，不能复用深色侧栏的 .site-item 颜色 */
.content-cats { background: var(--bg-2); }
.content-cats .site-item { color: var(--ink-2); font-size: 13px; }
.content-cats .site-item:hover { background: var(--brand-soft); color: var(--brand); }
.content-cats .site-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.content-cats .site-item .name { font-weight: inherit; }
.content-cats .site-item .tiny { color: var(--muted); }