/* 全站统一壳：左侧导航 + 右侧主区（各模块 HTML 内嵌侧栏，首屏不跳动） */
html {
  height: 100%;
}

body.hehao-has-nav {
  margin: 0;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

.hehao-sidebar {
  flex-shrink: 0;
  width: 200px;
  height: 100%;
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid #ededed;
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.hehao-sidebar-brand {
  padding: 20px 16px 12px;
  border-bottom: 1px solid #ededed;
  flex-shrink: 0;
}

.hehao-sidebar-brand a {
  text-decoration: none;
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.hehao-sidebar-brand span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #888;
  font-weight: 400;
}

.hehao-nav-list {
  flex: 1;
  overflow: auto;
  padding: 8px 0;
  list-style: none;
  margin: 0;
}

.hehao-nav-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  text-decoration: none;
  color: #444;
  font-size: 14px;
}

.hehao-nav-list a:hover {
  background: #f5f5f5;
  color: #1a1a1a;
}

.hehao-nav-list a.active {
  background: #eef4ff;
  color: #136ce9;
  font-weight: 500;
}

.hehao-nav-list .icon {
  width: 22px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.hehao-sidebar-foot {
  border-top: 1px solid #ededed;
  padding: 8px 0 12px;
  flex-shrink: 0;
}

.hehao-sidebar-foot button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: 11px 16px;
  font-size: 14px;
  color: #888;
  cursor: pointer;
  font-family: inherit;
}

.hehao-sidebar-foot button:hover {
  background: #f5f5f5;
  color: #1a1a1a;
}

.hehao-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f5f5f5;
}

.hehao-page-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.hehao-has-nav .hehao-main > .app {
  width: 100% !important;
  height: 100% !important;
  max-height: 100%;
  flex: 1;
  min-height: 0;
}

/* 首页：轻欢迎 */
.home-welcome {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
  box-sizing: border-box;
}

.home-welcome-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.home-hero {
  width: min(100%, 320px);
  margin: 0 auto 32px;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 32px rgba(19, 108, 233, 0.08);
  border: 1px solid #ededed;
}

.home-hero svg {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.home-greeting {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.5px;
  line-height: 1.25;
}

.home-date {
  margin: 0 0 28px;
  font-size: 14px;
  color: #bbb;
  font-weight: 400;
}

.msg:empty {
  display: none;
  min-height: 0;
  padding: 0;
  margin: 0;
}

@media (max-width: 720px) {
  html {
    height: 100%;
    height: 100dvh;
  }
  body.hehao-has-nav {
    flex-direction: column;
    height: 100%;
    height: 100dvh;
    min-height: 0;
  }
  .hehao-sidebar {
    order: 2;
    width: 100%;
    height: auto;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
    border-right: none;
    border-top: 1px solid #ededed;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
  }
  .hehao-sidebar-brand { display: none; }
  .hehao-nav-list {
    display: flex;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    -webkit-overflow-scrolling: touch;
  }
  .hehao-nav-list li {
    flex: 1 1 0;
    min-width: 0;
  }
  .hehao-nav-list a {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 100%;
    padding: 6px 2px 8px;
    font-size: 10px;
    line-height: 1.2;
  }
  .hehao-nav-list .icon { font-size: 18px; width: auto; }
  .hehao-nav-list .label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .hehao-sidebar-foot {
    border-top: none;
    border-left: 1px solid #ededed;
    padding: 0;
    display: flex;
    align-items: center;
  }
  .hehao-sidebar-foot button {
    font-size: 10px;
    text-align: center;
    padding: 8px 10px;
    white-space: nowrap;
  }
  .hehao-main {
    order: 1;
    flex: 1;
    min-height: 0;
  }
}
