/* Shared base styles for the Qianji Bridge server-rendered pages
   (/login, /account, /mcp-config, /about) and the nav injected into the
   docs pages (/docs, /redoc). Page-specific styles stay inline in
   qianji/server/pages.py and override these via normal cascade order. */
:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #f9fbfd;
  --text: #17202a;
  --muted: #697586;
  --line: #d9e1ea;
  --line-strong: #bdc9d6;
  --primary: #176b53;
  --primary-strong: #0f513f;
  --primary-soft: #e7f4ef;
  --danger: #c2413b;
  --income: #146eb4;
  --warning: #a15c13;
  --shadow: 0 18px 42px rgba(31, 41, 55, 0.10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar a { color: inherit; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; font-weight: 760; letter-spacing: 0; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  /* 常驻透明边框，使 hover/active 不产生位移 */
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: #f0f6fc; border-color: var(--line); }
.nav a.active { color: var(--text); background: #eef3f7; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}
.subtle { color: var(--muted); font-size: 14px; margin-bottom: 0; }

@media (max-width: 780px) {
  .topbar {
    min-height: 0;
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .nav { margin-left: 0; }
}
