/* 科技专题服务系统 - 菜单原型样式（可直接修改） */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #2563eb;
  --color-primary-bg: #eff6ff;
  --color-bg: #f0f4f8;
  --color-sidebar: #ffffff;
  --color-card: #ffffff;
  --color-text: #1e293b;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --sidebar-width: 220px;
  --header-height: 56px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

html,
body {
  height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system,
    sans-serif;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========== 布局 ========== */

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ========== 顶栏 ========== */

.header {
  height: var(--header-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--color-sidebar);
  border-bottom: 1px solid var(--color-border);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-title {
  font-size: 16px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-msg-btn,
.header-user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--color-text-secondary);
  font-size: 13px;
  position: relative;
}

.header-user-wrap {
  position: relative;
}

.header-msg-btn:hover,
.header-user:hover,
.header-user.is-open {
  background: #f8fafc;
  color: var(--color-text);
}

.header-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
  padding: 16px 0 10px;
  z-index: 400;
}

.header-user-menu[hidden] {
  display: none !important;
}

.header-user-menu-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 12px;
  text-align: center;
}

.header-user-menu-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
}

.header-user-menu-avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: block;
}

.header-user-menu-gender {
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  border: 2px solid #fff;
  box-sizing: border-box;
}

.header-user-menu-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.header-user-menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

.header-user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 20px;
  font-size: 14px;
  color: var(--color-text);
}

.header-user-menu-item:hover {
  background: #f8fafc;
}

html.auth-redirecting body {
  visibility: hidden;
}

.header-msg-text {
  position: relative;
  display: inline-block;
  line-height: 1;
  margin-right: 4px;
}

.header-msg-label {
  font-size: 13px;
}

.header-msg-count {
  position: absolute;
  top: -8px;
  right: -14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: #ef4444;
  border-radius: 999px;
  border: 1.5px solid #fff;
  box-sizing: border-box;
  pointer-events: none;
}

.header-msg-count[hidden] {
  display: none;
}

.header-user {
  color: var(--color-text);
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.avatar-icon {
  width: 28px;
  height: 28px;
}

/* ========== 侧边栏 ========== */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-sidebar);
  border-right: 1px solid var(--color-border);
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--color-text-secondary);
  font-size: 13px;
}

.sidebar-item:hover {
  background: #f8fafc;
  color: var(--color-text);
}

.sidebar-item.is-active,
.sidebar-sub-item.is-active {
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: 500;
}

.sidebar-item--parent {
  font-weight: 500;
  color: var(--color-text);
}

.sidebar-chevron {
  margin-left: auto;
  font-size: 10px;
  color: var(--color-text-muted);
}

.sidebar-section {
  margin-top: 8px;
}

.sidebar-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 28px;
  margin-top: 4px;
}

.sidebar-sub-item {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.sidebar-sub-item:hover {
  background: #f8fafc;
  color: var(--color-text);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}

/* ========== 主内容区 ========== */

.resource-page-wrap,
.tracking-page-wrap,
.content-page-wrap,
.task-mgmt-page-wrap {
  min-height: 100%;
}


.app-content {
  flex: 1;
  overflow: auto;
  padding: 24px;
}

.page-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  color: var(--color-text-muted);
}

.page-placeholder strong {
  color: var(--color-primary);
  font-weight: 500;
}
