/* =========================================================
   场馆AI运营官 — 基础样式（设计变量 / 布局 / 侧栏 / 顶栏）
   设计系统：浅色、蓝色主色、圆角卡片、克制阴影
   ========================================================= */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f4f9;
  --ink: #0b1220;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;

  --line: #e5e9f2;
  --line-2: #eef1f6;

  --brand: #0f766e;
  --brand-2: #0d5f58;
  --brand-soft: #e7f5f2;
  --brand-ink: #0b4f47;

  --ok: #0fa968;
  --ok-soft: #e8f8f0;
  --warn: #d97706;
  --warn-soft: #fff6e6;
  --danger: #dc2626;
  --danger-soft: #fdeeee;
  --violet: #7c5cff;
  --violet-soft: #f1eeff;
  --cyan: #0d9ec2;
  --cyan-soft: #e8f7fb;
  --pink: #e0508c;
  --pink-soft: #fdeef4;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 24px 60px -30px rgba(15, 23, 42, 0.3);

  --sidebar-w: 238px;
  --header-h: 66px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: #c9ece7; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #d3dae6;
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #b9c3d6; background-clip: content-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 应用外壳 ============ */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
}
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, #14b8a6, #0f766e);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 18px -8px rgba(15, 118, 110, 0.7);
  flex: 0 0 auto;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 0.2px; }
.brand-sub { font-size: 10.5px; color: var(--faint); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 18px;
}
.nav-group { margin-top: 14px; }
.nav-group__label {
  font-size: 11px;
  color: var(--faint);
  padding: 0 10px 6px;
  letter-spacing: 0.6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 13.5px;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}
.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.nav-item.is-active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 18px -10px rgba(15, 118, 110, 0.75);
}
.nav-item__icon { width: 18px; display: inline-grid; place-items: center; font-size: 15px; opacity: 0.95; }
.nav-item__badge {
  margin-left: auto;
  font-size: 10px;
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 999px;
  padding: 1px 6px;
  font-weight: 600;
}
.nav-item.is-active .nav-item__badge { background: rgba(255, 255, 255, 0.22); color: #fff; }

.sidebar__foot { padding: 12px; border-top: 1px solid var(--line-2); }
.credit-card {
  border-radius: var(--radius);
  padding: 12px 13px;
  background: linear-gradient(160deg, #eef3ff, #f7f9ff);
  border: 1px solid #e2e9fb;
}
.credit-card__top { display: flex; align-items: center; justify-content: space-between; }
.credit-card__label { font-size: 11.5px; color: var(--brand-ink); }
.credit-card__value { font-size: 20px; font-weight: 750; color: var(--brand-2); letter-spacing: -0.3px; }
.credit-card__hint { font-size: 11px; color: var(--faint); margin-top: 2px; }
.credit-card__btn {
  margin-top: 8px;
  width: 100%;
  border: 1px solid #d8e2fb;
  background: #fff;
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  padding: 6px 0;
}
.credit-card__btn:hover { background: #f2f6ff; }

/* ============ 主区 ============ */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--header-h);
  flex: 0 0 var(--header-h);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar__title { font-size: 16px; font-weight: 700; letter-spacing: 0.1px; }
.topbar__sub { font-size: 12px; color: var(--faint); margin-top: 1px; }
.topbar__spacer { flex: 1; }
.topbar__credits {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}
.topbar__credits b { color: var(--brand-2); font-weight: 700; }
.topbar__icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 15px;
  position: relative;
}
.topbar__icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.dot {
  position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--danger);
}
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 6px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, #ffd9a8, #ffb86b);
  display: grid; place-items: center; font-weight: 700; color: #7a4a12; font-size: 13px;
}
.user-chip__meta { line-height: 1.25; }
.user-chip__name { font-size: 12.5px; font-weight: 600; }
.user-chip__plan { font-size: 11px; color: var(--faint); }

.view {
  padding: 22px 26px 60px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.view-enter { animation: viewIn 0.28s ease both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* 页头 */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head__main { flex: 1; min-width: 260px; }
.page-head h1 { font-size: 22px; font-weight: 750; letter-spacing: -0.2px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 4px; max-width: 760px; }
.page-head__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 通用栅格 */
.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)); }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { display: none; }
  .view { padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* 工具类 */
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 650; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }

