/* XiaoMao AI · 桌面客户端外壳
   只在 Muse.exe（无边框窗口）里生效：html.shell 由 shell.js 加上，
   浏览器访问时这些规则完全不参与。 */

html.shell { --sc-bar: 40px; }

/* ---------------- 标题栏（登录 / 注册 / 管理页） ---------------- */
.sc-cap {
  position: fixed; left: 0; right: 0; top: 0; height: var(--sc-bar); z-index: 9997;
  display: flex; align-items: center; gap: 10px;
  padding-left: 13px; box-sizing: border-box;
  background: linear-gradient(180deg, rgba(5, 8, 15, .95), rgba(5, 8, 15, .74));
  border-bottom: 1px solid rgba(120, 190, 255, .10);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  user-select: none; -webkit-user-select: none;
}
html.sc-max .sc-cap { border-bottom-color: rgba(120, 190, 255, .18); }

.sc-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sc-mark {
  width: 17px; height: 17px; border-radius: 50%; flex: 0 0 auto;
  background: url(/static/logo.png) center / contain no-repeat;
  box-shadow: 0 0 10px rgba(55, 217, 196, .38);
}
.sc-title {
  font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
  color: rgba(214, 233, 255, .86); white-space: nowrap;
}
.sc-tag {
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(140, 190, 215, .45); white-space: nowrap;
}
.sc-spacer { flex: 1; }

/* ---------------- 窗口按钮 ---------------- */
.sc-ctl { display: flex; align-self: stretch; margin-left: auto; }
.sc-ctl button {
  width: 46px; border: 0 !important; padding: 0 !important; margin: 0 !important;
  background: transparent !important; border-radius: 0 !important; box-shadow: none !important;
  color: rgba(203, 223, 245, .72); font-size: 0; line-height: 0;
  display: grid; place-items: center; cursor: default;
  transition: background .12s ease, color .12s ease;
}
.sc-ctl button:hover { background: rgba(255, 255, 255, .09) !important; color: #fff; }
.sc-ctl button:active { background: rgba(255, 255, 255, .15) !important; }
.sc-ctl button.sc-x:hover { background: #e81123 !important; color: #fff; }
.sc-ctl svg { width: 10px; height: 10px; display: block; }

/* 对话页：按钮直接长在 64px 顶栏右端（不额外加一条标题栏） */
html.sc-appbar header.bar { padding-right: 0 !important; }
html.sc-appbar header.bar .sc-ctl {
  margin-right: 0; margin-left: 8px;
  border-left: 1px solid rgba(120, 190, 255, .12);
}
html.sc-appbar header.bar .sc-ctl button { width: 48px; }
html.sc-appbar header.bar,
.sc-cap { cursor: default; }

/* ---------------- 边缘缩放热区 ---------------- */
.sc-rz { position: fixed; z-index: 9995; }
.sc-rz.s  { left: 9px; right: 9px; bottom: 0; height: 5px; cursor: ns-resize; }
.sc-rz.e  { top: 9px; right: 0; bottom: 9px; width: 5px; cursor: ew-resize; }
.sc-rz.w  { top: 9px; left: 0; bottom: 9px; width: 5px; cursor: ew-resize; }
.sc-rz.se { right: 0; bottom: 0; width: 11px; height: 11px; cursor: nwse-resize; }
.sc-rz.sw { left: 0; bottom: 0; width: 11px; height: 11px; cursor: nesw-resize; }
html.sc-max .sc-rz { display: none; }

/* ---------------- 内容让位 ---------------- */
html.shell:not(.sc-appbar) body { padding-top: var(--sc-bar); box-sizing: border-box; }
html.shell:not(.sc-appbar) .login-wrap { min-height: calc(100vh - var(--sc-bar)); }
html.shell:not(.sc-appbar) .wrap { padding-top: 26px; }
html.sc-scroll body { overflow-y: auto !important; overflow-x: hidden; }
html.sc-admin .top .logo { display: none; }
html.sc-admin .top { padding-bottom: 10px; border-bottom: 1px solid rgba(120, 190, 255, .10); margin-bottom: 16px; }

/* 无边框窗口里不需要网页自己画滚动条占位 */
html.shell ::-webkit-scrollbar { width: 10px; }
html.shell ::-webkit-scrollbar-thumb { background: rgba(120, 170, 210, .22); border-radius: 10px; }
html.shell ::-webkit-scrollbar-thumb:hover { background: rgba(120, 170, 210, .34); }
html.shell ::-webkit-scrollbar-track { background: transparent; }
