/* ============================================================
   TVVO · 即梦式布局：左侧固定导航 + 顶部细栏
   深色、克制、图标 + 文字，账户入口在侧栏底部（无“我的”）
   ============================================================ */

:root { --sidebar-w: 226px; }

/* 主体让位给侧栏 + 给固定页脚留白 */
body { margin-left: var(--sidebar-w); padding-bottom: 54px; }

/* ---------- 左侧导航 ---------- */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  background: #0a0a0c;
  border-right: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column;
  padding: 20px 14px; z-index: 80;
  overflow-y: auto;
}

.sidebar__brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 18px; text-decoration: none; color: var(--ink);
}
.sidebar__brand img { width: 28px; height: 28px; object-fit: contain; }
.sidebar__brand span { font-size: 19px; font-weight: 800; letter-spacing: .02em; }

.sidebar__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.sidebar__item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 11px;
  color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500;
  position: relative; transition: background .15s ease, color .15s ease;
}
.sidebar__item:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.sidebar__item.is-active { background: var(--brand-soft); color: var(--ink); }
.sidebar__item.is-active::before {
  content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.sidebar__icon {
  width: 22px; height: 22px; flex: 0 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); transition: color .15s ease;
}
.sidebar__icon svg { width: 21px; height: 21px; display: block; fill: none; }
.sidebar__item.is-active .sidebar__icon { color: var(--brand); }
.sidebar__item.is-active .sidebar__icon svg { fill: none; stroke: var(--brand); stroke-width: 1.9; }
.sidebar__label { flex: 1; }
.sidebar__hot {
  font-size: 10px; font-weight: 800; color: #fff; background: var(--brand);
  padding: 2px 6px; border-radius: 5px; box-shadow: 0 1px 4px rgba(214,21,24,.45);
}
.sidebar__badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font-size: 11px; font-weight: 800; color: #fff; background: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(214,21,24,.45);
}

/* 侧栏左下角：三站矩阵入口 */
.sidebar__matrix {
  display: flex; gap: 8px; margin-top: 12px; padding: 0 2px;
}
.sidebar__matrix a {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 6px; border: 1px solid rgba(255,255,255,.20); border-radius: 10px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  text-decoration: none; white-space: nowrap;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.sidebar__matrix a:hover { color: #fff; border-color: var(--brand); background: var(--brand-soft); }

.sidebar__account {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 10px; border-radius: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  text-decoration: none; color: var(--ink); transition: background .15s ease;
}
.sidebar__account:hover { background: rgba(255,255,255,.06); }
.sidebar__acctxt { min-width: 0; }
.avatar--sm {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 34px;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), #ff5b52);
}
.sidebar__acname { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__acsub { font-size: 12px; color: var(--ink-3); }

/* ---------- 顶部细栏 ---------- */
.topbar {
  position: sticky; top: 0; height: 56px; z-index: 70;
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
  background: rgba(0,0,0,.72); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar__menu {
  display: none; background: none; border: 0; color: var(--ink);
  font-size: 22px; cursor: pointer; line-height: 1;
}
.topbar__title { font-size: 16px; font-weight: 600; color: var(--ink); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar__search {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); background: rgba(255,255,255,.06);
  border: 1px solid var(--border); transition: .15s;
}
.topbar__search svg { width: 19px; height: 19px; }
.topbar__search:hover { color: var(--brand); border-color: rgba(214,21,24,.4); }
.topbar__search.is-active { color: var(--brand); background: var(--brand-soft); border-color: rgba(214,21,24,.4); }
.topbar__points {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--ink);
  background: rgba(255,255,255,.08); padding: 6px 11px; border-radius: 999px;
}
.topbar__points:empty { display: none; }
.btn--sm { padding: 7px 14px; font-size: 13.5px; }
/* 顶栏：我的头像 → 下拉菜单 */
.tb-me { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-2); background: linear-gradient(135deg,#D61518,#7a0d6b); color: #fff; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; transition: box-shadow .15s; }
.tb-me__avatar { font-size: 15px; font-weight: 700; line-height: 1; }
.tb-me:hover, .tb-me.on { box-shadow: 0 0 0 3px rgba(214,21,24,.32); }
.tb-settings { position: relative; }
.tb-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 208px; z-index: 200;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 13px;
  padding: 7px; box-shadow: 0 16px 44px rgba(0,0,0,.5);
  display: none; animation: tbMenuIn .14s ease;
}
@keyframes tbMenuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tb-menu.open { display: block; }
.tb-menu__hd { font-size: 12.5px; color: var(--ink-3); padding: 7px 10px 9px; border-bottom: 1px solid var(--border); margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font-size: 13.5px; color: var(--ink-2); text-decoration: none; padding: 9px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; font-family: inherit; }
.tb-menu__item:hover { background: rgba(255,255,255,.07); color: var(--ink); }
.tb-menu__item span { font-size: 15px; width: 18px; text-align: center; }
.tb-menu__sep { height: 1px; background: var(--border); margin: 5px 4px; }
.tb-menu__logout { color: #efa1a3; }

/* ---------- 首页 · 诊断主入口下方的快捷导航 ---------- */
.jm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; justify-content: center; }
.jm-chips--left { justify-content: flex-start; margin-top: 22px; }
.jm-chips__lab { font-size: 13px; color: var(--ink-3); align-self: center; }
.jm-chips a {
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border);
  transition: all .15s ease;
}
.jm-chips a:hover { color: var(--ink); border-color: var(--border-2); background: rgba(255,255,255,.05); }

/* ---------- 移动端：侧栏变抽屉 ---------- */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  body { margin-left: 0; }
  .topbar__menu { display: block; }
  .sidebar {
    transform: translateX(-100%); transition: transform .22s ease;
    width: 240px; box-shadow: var(--shadow-md);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar__overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 75;
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  body.nav-open .sidebar__overlay { opacity: 1; pointer-events: auto; }
}

/* ---------- 固定底部细页脚 ---------- */
.app-footer {
  position: fixed; left: var(--sidebar-w); right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 8px 22px;
  background: rgba(0,0,0,.82); backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px; color: var(--ink-3);
}
.app-footer__brand { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); }
.app-footer__brand img { width: 18px; height: 18px; object-fit: contain; }
.app-footer__brand span { font-family: var(--font-d); font-weight: 800; font-size: 13px; letter-spacing: .01em; }
.app-footer__nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.app-footer__nav a { color: var(--ink-2); text-decoration: none; font-size: 12px; white-space: nowrap; }
.app-footer__nav a:hover { color: var(--ink); }
.app-footer__matrix { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.app-footer__matrix a { color: var(--ink-2); text-decoration: none; font-size: 12px; white-space: nowrap; transition: color .15s ease; }
.app-footer__matrix a:hover { color: var(--brand); }
.app-footer__copy { margin-left: auto; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
@media (max-width: 900px) { .app-footer { left: 0; } .app-footer__copy { margin-left: 0; } }
