/* ESS v4 管理台 — S1 左栏导航骨架样式
 * 配色：乳环玻璃 ins 风（沿用 P0 设计语言）
 * 作者：玲玲 (14-Software) | 任务：T12v4-S1
 */

/* ─── CSS 变量 ─── */
:root {
  --bg-primary:    #f8f9fc;
  --card-bg:       rgba(255, 255, 255, 0.78);
  --card-blur:     blur(16px);
  --text-primary:  #1a1a2e;
  --text-secondary:#6c7086;
  --accent:        #4f8cff;
  --accent-soft:   #eaf2ff;
  --border:        rgba(0, 0, 0, 0.06);
  --shadow:        0 4px 16px rgba(0, 0, 0, 0.04);
  --sidebar-width: 200px;
  --topbar-height: 60px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow: hidden; /* 防止整页滚动，内容区自己滚 */
}

/* ─── 顶栏 ─── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--card-bg);
  backdrop-filter: saturate(180%) var(--card-blur);
  -webkit-backdrop-filter: saturate(180%) var(--card-blur);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-hamburger {
  font-size: 18px;
  color: var(--text-secondary);
  cursor: default; /* S1 仅装饰，不实现折叠 */
  user-select: none;
  line-height: 1;
}

.topbar-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.topbar-title span {
  color: var(--accent);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  flex-shrink: 0;
}

.status-dot.red   { background: #ff3b30; }
.status-dot.yellow{ background: #ff9500; }

.status-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ─── 主体布局：左栏 + 内容区 ─── */
.layout {
  display: flex;
  height: 100vh;
  padding-top: var(--topbar-height);
}

/* ─── 左栏 ─── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  backdrop-filter: saturate(180%) var(--card-blur);
  -webkit-backdrop-filter: saturate(180%) var(--card-blur);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

/* 左栏顶部 logo 区 */
.sidebar-logo {
  height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sidebar-logo-version {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 菜单列表 */
.nav-list {
  flex: 1;
  list-style: none;
  padding: 8px 0;
  overflow-y: auto;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
  user-select: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
}

/* 选中态：浅蓝底 + 左侧 3px 竖条 + 文字加粗 */
.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.nav-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.nav-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── 左栏底部状态区 ─── */
.sidebar-status {
  height: 80px;
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.sidebar-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.sidebar-status-row .status-dot {
  width: 7px;
  height: 7px;
}

/* ─── 内容区 ─── */
.content {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 32px;
  background: var(--bg-primary);
}

/* 页面占位 */
.page {
  display: none;
}

.page.active {
  display: block;
}

.page-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.page-placeholder-text {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ── S2: 仪表盘 ── */

/* 页面顶部 header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn-refresh:hover {
  background: rgba(255, 255, 255, 0.95);
}

.btn-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


