:root {
  --sa-ink: #17241f;
  --sa-muted: #718078;
  --sa-line: #dce4ee;
  --sa-green: #1f3b33;
  --sa-paper: #f7f4ec;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f1f4f2; color: var(--sa-ink); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
a { color: inherit; }
.hidden { display: none !important; }
.sa-topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--sa-line); }
.sa-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.sa-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--sa-green); color: #f7f4ec; font-family: Georgia, serif; font-weight: 700; }
.sa-brand b { display: block; font-family: Georgia, "Songti SC", serif; font-size: 18px; }
.sa-brand small { display: block; color: var(--sa-muted); font-family: monospace; font-size: 8px; letter-spacing: 1.2px; margin-top: 2px; }
.sa-top-actions { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--sa-muted); }
.sa-top-actions a { text-decoration: none; }
.sa-top-actions button { border: 1px solid var(--sa-line); background: #fff; border-radius: 7px; padding: 7px 10px; color: var(--sa-muted); font-size: 11px; }
.sa-login { min-height: calc(100vh - 62px); display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, rgba(31,59,51,.1), transparent 30%), #f1f4f2; }
.sa-login-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--sa-line); border-radius: 16px; padding: 30px; box-shadow: 0 24px 70px rgba(23,36,31,.08); }
.sa-kicker { color: #a44737; font-family: monospace; font-size: 9px; letter-spacing: 1.5px; margin: 0; }
.sa-login-card h1 { margin: 10px 0 8px; font-family: Georgia, "Songti SC", serif; font-size: 30px; }
.sa-muted { color: var(--sa-muted); font-size: 12px; line-height: 1.7; margin: 0 0 18px; }
.sa-login-card label { display: block; margin: 13px 0 5px; color: #59697a; font-size: 11px; font-weight: 600; }
.sa-login-card label span { font-weight: 400; color: #9aa8b6; }
.sa-login-card input { width: 100%; border: 1px solid var(--sa-line); border-radius: 8px; padding: 11px 12px; font-size: 13px; outline: none; }
.sa-login-card input:focus { border-color: #4d7c6b; box-shadow: 0 0 0 3px rgba(77,124,107,.1); }
.sa-login-card button[type="submit"] { width: 100%; margin-top: 18px; border: 0; border-radius: 9px; padding: 12px; background: var(--sa-green); color: #fff; font-size: 13px; font-weight: 650; }
.sa-error { color: #b84a3a; font-size: 12px; margin: 10px 0 0; }
.sa-dashboard { max-width: 1440px; margin: 0 auto; padding: 20px 24px 40px; }
.sa-view-tabs { display: flex; gap: 5px; margin-bottom: 18px; }
.sa-view-tabs button { border: 1px solid var(--sa-line); background: #fff; border-radius: 999px; padding: 8px 14px; color: #59697a; font-size: 12px; }
.sa-view-tabs button.active { background: var(--sa-green); border-color: var(--sa-green); color: #fff; }
.sa-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.sa-page-head h1 { margin: 7px 0 5px; font-family: Georgia, "Songti SC", serif; font-size: 31px; }
.sa-page-head p { margin: 0; color: var(--sa-muted); font-size: 12px; line-height: 1.7; }
.sa-primary { border: 0; border-radius: 8px; background: var(--sa-green); color: #fff; padding: 10px 14px; font-size: 12px; font-weight: 650; }
.sa-panel { background: #fff; border: 1px solid var(--sa-line); border-radius: 14px; padding: 18px; margin-bottom: 16px; }
.sa-panel h2 { margin: 0; font-size: 19px; }
.sa-panel-sub { color: var(--sa-muted); font-size: 11px; margin: 5px 0 13px; }
.sa-key-form { display: flex; flex-wrap: wrap; gap: 8px; }
.sa-key-form input { border: 1px solid var(--sa-line); border-radius: 8px; padding: 9px 10px; font-size: 12px; min-width: 230px; }
.sa-key-form button { border: 0; border-radius: 8px; background: var(--sa-green); color: #fff; padding: 9px 13px; font-size: 12px; }
.sa-toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 999; background: var(--sa-green); color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 12px; box-shadow: 0 12px 30px rgba(23,36,31,.2); }
@media (max-width: 800px) {
  .sa-topbar { padding: 0 14px; }
  .sa-dashboard { padding: 14px; }
  .sa-page-head { flex-direction: column; }
  .sa-page-head h1 { font-size: 26px; }
  .sa-view-tabs { overflow-x: auto; }
}


/* 更明显的站点设置 */
.sa-theme-panel { border-color: #bfd2c5; box-shadow: 0 10px 30px rgba(31,59,51,.06); }
.sa-theme-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.sa-saved { flex: 0 0 auto; color: #285547; background: #eef5f1; border: 1px solid #d3e4da; border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 650; }
.site-theme-list .settings-theme-btn { min-width: 150px; padding: 13px 14px; border-radius: 12px; }
.settings-theme-btn .theme-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--dot, #a44737); }
.settings-theme-btn b { font-size: 14px; }
.settings-theme-btn small { display: block; color: #8a97a5; font-size: 10px; margin-top: 4px; line-height: 1.5; }
@media (max-width: 800px) { .sa-theme-head { flex-direction: column; } }


/* AI 检索 */
.sa-ai-model { color: #6b7b73; border: 1px solid #dce4ee; border-radius: 999px; padding: 6px 10px; font-family: monospace; font-size: 9px; background: #fff; }
.sa-ai-box { background: #fff; border: 1px solid #dce4ee; border-radius: 14px; padding: 16px; }
.sa-ai-input-row { display: flex; gap: 9px; align-items: stretch; }
.sa-ai-input-row textarea { flex: 1; resize: vertical; min-height: 62px; border: 1px solid #dce4ee; border-radius: 9px; padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.6; }
.sa-ai-input-row textarea:focus { outline: none; border-color: #4d7c6b; box-shadow: 0 0 0 3px rgba(77,124,107,.1); }
.sa-ai-input-row button { border: 0; border-radius: 9px; background: #1f3b33; color: #fff; padding: 0 18px; min-width: 86px; font-size: 13px; font-weight: 650; }
.sa-ai-input-row button:disabled { opacity: .55; }
.sa-ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sa-ai-chips button { border: 1px solid #e1e8f0; background: #fbfcfe; border-radius: 999px; padding: 6px 9px; color: #59697a; font-size: 10px; }
.sa-ai-chips button:hover { border-color: #4d7c6b; color: #1f3b33; }
.sa-ai-answer { margin-top: 15px; border-top: 1px solid #edf1f6; padding-top: 14px; min-height: 120px; color: #263238; font-size: 13px; line-height: 1.85; white-space: pre-wrap; }
.sa-ai-empty { color: #8a97a5; margin: 0; }
.sa-ai-thinking { color: #285547; }
.sa-ai-sources { display: grid; gap: 6px; margin-top: 12px; }
.sa-ai-source { display: block; padding: 8px 10px; border: 1px solid #edf1f6; border-radius: 8px; text-decoration: none; background: #fbfcfe; }
.sa-ai-source:hover { border-color: #bfd2c5; }
.sa-ai-source b { display: block; color: #17241f; font-size: 12px; }
.sa-ai-source span { display: block; color: #8a97a5; font-size: 10px; margin-top: 3px; }
@media (max-width: 800px) {
  .sa-ai-input-row { flex-direction: column; }
  .sa-ai-input-row button { min-height: 42px; }
  .sa-ai-model { align-self: flex-start; }
}
