/* 设计 token 来自 vendor/design-tokens.css（stock-lu 原文件） */

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  background-color: var(--color-bg);
  background-image: var(--gradient-page-admin-wide);
  background-attachment: fixed;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: 14px; }
a { color: var(--color-accent); text-decoration: none; }
.hidden { display: none !important; }
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- 认证页 ---------- */
.auth-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background-image: var(--gradient-login-page);
}
.login-shell {
  display: flex;
  align-items: center;
  gap: 48px;
  width: 100%;
  max-width: 880px;
}
.login-brand { flex: 1 1 46%; }
.brand-mark {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #2a86ff, var(--color-accent));
  color: var(--color-white);
  font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.28);
  margin-bottom: 20px;
}
.brand-mark.brand-logo { background: transparent; box-shadow: 0 8px 20px rgba(22, 119, 255, 0.24); }
.brand-mark.small { width: 40px; height: 40px; border-radius: var(--radius-sm); font-size: 20px; margin: 0; box-shadow: 0 6px 14px rgba(22, 119, 255, 0.24); }
.brand-mark.small.brand-logo { box-shadow: 0 6px 14px rgba(22, 119, 255, 0.22); }
.login-eyebrow { font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: 2px; text-transform: uppercase; color: var(--color-accent); }
.login-brand-title { font-size: 30px; font-weight: var(--font-weight-bold); letter-spacing: 0.2px; margin: 10px 0 12px; color: var(--color-text); }
.login-brand-copy { color: var(--color-text-muted); font-size: var(--text-md); line-height: 1.8; max-width: 340px; }

.login-card {
  flex: 1 1 46%;
  background: var(--gradient-panel-base);
  border: var(--border-default);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-panel-elevated);
  padding: 34px 36px;
}
.auth-switch {
  display: inline-flex;
  background: var(--color-bg-muted);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
  margin-bottom: 26px;
}
.auth-switch .switch-btn {
  border: none;
  background: transparent;
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: background var(--ease-standard), color var(--ease-standard), box-shadow var(--ease-standard);
}
.auth-switch .switch-btn.active {
  background: var(--color-surface);
  color: var(--color-text-strong);
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-xs);
}
.login-title { font-size: 21px; font-weight: var(--font-weight-bold); color: var(--color-text-strong); }
.login-subtitle { color: var(--color-text-muted); font-size: var(--text-sm); margin: 6px 0 22px; }
.login-form { display: flex; flex-direction: column; }
.field-label { font-size: var(--text-sm); font-weight: var(--font-weight-medium); color: var(--color-text-strong); margin-bottom: 6px; }
.form-control {
  height: var(--control-height-2xl);
  border: var(--border-strong);
  border-radius: var(--radius-control);
  padding: 0 14px;
  background: var(--color-surface);
  font-size: var(--text-md);
  color: var(--color-text);
  outline: none;
  margin-bottom: 16px;
  transition: border-color var(--ease-standard), box-shadow var(--ease-standard);
}
.form-control::placeholder { color: var(--color-text-faint); }
.form-control:focus { border-color: var(--color-accent); box-shadow: var(--shadow-focus-ring); }
textarea.form-control {
  height: auto;
  width: 100%;
  min-height: 150px;
  padding: 12px 14px;
  line-height: 1.6;
  resize: vertical;
}
.form-error { color: var(--color-danger); font-size: var(--text-sm); min-height: 18px; margin: 0 0 12px; }
.btn-normal {
  height: var(--control-height-2xl);
  border: none;
  border-radius: var(--radius-control);
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  padding: 0 20px;
  transition: background var(--ease-standard), transform 120ms ease;
}
.btn-normal:hover { background: var(--color-accent-strong); }
.btn-normal:active { background: var(--color-accent-strong); transform: translateY(1px); }
.btn-fluid { width: 100%; }
.btn-ghost {
  height: var(--control-height-lg);
  border: var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text-strong);
  padding: 0 16px;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  transition: border-color var(--ease-standard), background var(--ease-standard);
}
.btn-ghost:hover { border-color: var(--color-text-muted); }
.btn-ghost:active { background: var(--color-surface-button-active); }

/* 特别关注 ⭐ */
.fav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius-pill);
  border: var(--border-strong); background: var(--color-surface);
  color: var(--color-text-muted); cursor: pointer;
  transition: all var(--ease-standard);
  vertical-align: middle;
}
.fav-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.fav-btn.fav-on {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.star-icon { width: 18px; height: 18px; fill: currentColor; display: block; }
.fav-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: var(--border-strong); border-radius: var(--radius-pill);
  background: var(--color-surface); color: var(--color-text-muted);
  font-size: var(--text-sm); cursor: pointer;
  transition: all var(--ease-standard);
}
.fav-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }
.fav-toggle.fav-on {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  font-weight: var(--font-weight-semibold);
}
.fav-toggle .star-icon { width: 16px; height: 16px; }

/* ---------- 申请添加大V 邀请横幅 ---------- */
.request-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(22, 119, 255, 0.16);
  border-radius: var(--radius-card);
  background: var(--color-accent-soft);
}
.request-banner-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-accent);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}
.request-banner-copy { flex: 1 1 auto; min-width: 0; }
.request-banner-copy .title {
  font-size: var(--text-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-strong);
}
.request-banner-copy .desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.request-banner .btn-normal { flex: 0 0 auto; }

/* ---------- 应用壳 ---------- */
.app-view { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--color-surface-soft);
  backdrop-filter: blur(var(--blur-nav)) saturate(160%);
  border-right: var(--border-default);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 20px; border-bottom: var(--border-default); }
.sidebar-brand-text { display: flex; flex-direction: column; }
.sidebar-brand-name { font-size: var(--text-lg); font-weight: var(--font-weight-bold); color: var(--color-text-strong); }
.sidebar-brand-meta { font-size: 11px; color: var(--color-text-faint); letter-spacing: 0.4px; }
.sidebar-nav {
  flex: 1; min-height: 0; overflow-y: auto;
  padding-top: 14px; display: flex; flex-direction: column; gap: 2px;
}
.nav-group-label { font-size: 11px; font-weight: var(--font-weight-semibold); color: var(--color-text-faint); letter-spacing: 1px; padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  border: none; background: transparent;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  font-size: var(--text-md);
  color: var(--color-text);
  text-align: left;
  transition: background var(--ease-standard), color var(--ease-standard);
}
.nav-item:hover { background: var(--color-surface-accent-soft); }
.nav-item.active { background: var(--color-accent-soft); color: var(--color-accent-strong); font-weight: var(--font-weight-semibold); }
.nav-item .nav-icon { width: 20px; text-align: center; font-size: var(--text-body); }
.nav-item .nav-icon svg { width: 15px; height: 15px; vertical-align: -2px; }
.sidebar-foot { padding: 24px 12px 14px; }
.sidebar-user { font-size: var(--text-xs); color: var(--color-text-muted); display: block; }
.sidebar-foot-links { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.sidebar-gh-link {
  width: 26px; height: 26px; border-radius: 50%;
  border: var(--border-strong); background: var(--color-surface);
  color: var(--color-text-faint);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--ease-standard);
}
.sidebar-gh-link:hover { border-color: var(--color-accent); color: var(--color-accent); }
.sidebar-gh-link.has-update { position: relative; border-color: var(--color-accent); color: var(--color-accent); }
.sidebar-gh-link.has-update::after {
  content: ""; position: absolute; top: -2px; right: -2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--color-accent); border: 2px solid var(--color-surface-soft);
}
.sidebar-gh-icon { width: 14px; height: 14px; }
.sidebar-user-meta { font-size: 11px; color: var(--color-text-faint); letter-spacing: 0.3px; }
.sidebar-update { color: var(--color-accent); font-weight: 600; text-decoration: none; margin-left: 2px; }
.sidebar-update:hover { text-decoration: underline; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(247, 249, 252, 0.84);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: var(--border-default);
}
.topbar-title { display: flex; align-items: center; gap: 6px; }
.topbar-title h2 { font-size: var(--text-lg); font-weight: var(--font-weight-bold); color: var(--color-text-strong); }
.icon-btn { width: 30px; height: 30px; border: none; background: none; font-size: 20px; color: var(--color-text); border-radius: var(--radius-2xs); }
.icon-btn:hover { background: rgba(12, 18, 34, 0.05); }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2a86ff, var(--color-accent));
  color: var(--color-white);
  font-size: var(--text-md); font-weight: var(--font-weight-bold);
  display: flex; align-items: center; justify-content: center;
}
.user-meta { display: flex; flex-direction: column; }
.user-name { font-size: var(--text-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.user-role { font-size: 11px; color: var(--color-accent); }
.topbar-logout { border: none; background: none; color: var(--color-text-muted); font-size: var(--text-sm); padding: 6px 10px; border-radius: var(--radius-2xs); }
.topbar-logout:hover { background: rgba(12, 18, 34, 0.05); color: var(--color-danger); }

.page-main { padding: 24px; max-width: 1180px; width: 100%; margin: 0 auto; }

/* ---------- Hero 与面板 ---------- */
.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  padding: 22px 26px;
  margin-bottom: 18px;
}
.hero-eyebrow { font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: 1.5px; text-transform: uppercase; color: var(--color-accent); }
.hero-title { font-size: var(--text-xl); font-weight: var(--font-weight-bold); color: var(--color-text-strong); margin-top: 6px; }
.hero-subtitle { color: var(--color-text-muted); font-size: var(--text-sm); margin-top: 6px; }
.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-pill {
  border: var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  padding: 6px 14px;
}
.hero-pill-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
}
.hero-pill-icon .ch-icon { width: 18px; height: 18px; }
.hero-pill-icon[data-channel="telegram"] .ch-icon { color: #26a5e4; }
.hero-pill-icon[data-channel="feishu"] .ch-icon { color: #3370ff; }
.hero-pill-icon[data-channel="wecom"] .ch-icon { color: #07c160; }

.section-panel {
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-card);
  box-shadow: none;
  padding: var(--section-padding-lg-y) var(--section-padding-lg-x);
  margin-bottom: 18px;
}
.section-head { margin-bottom: 16px; }
.section-eyebrow { font-size: var(--text-xs); font-weight: var(--font-weight-semibold); letter-spacing: 1.5px; text-transform: uppercase; color: var(--color-accent); }
.section-title { font-size: var(--text-title-sm); font-weight: var(--font-weight-bold); color: var(--color-text-strong); margin-top: 4px; }
.section-meta { color: var(--color-text-muted); font-size: var(--text-xs); margin-top: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 平台筛选 */
.platform-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.platform-tab {
  border: var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--ease-standard);
}
.platform-tab:hover { border-color: var(--color-accent); color: var(--color-accent); }
.platform-tab.selected { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-white); }
.platform-tab.selected .pt-icon { filter: brightness(0) invert(1); }
.pt-label { display: none; }
.pt-icon { width: 18px; height: 18px; }
.platform-tab[data-platform="xueqiu"]:not(.selected) .pt-icon { color: #287dff; }
.platform-tab[data-platform="combination"]:not(.selected) .pt-icon { color: var(--color-accent); }
.platform-tab[data-platform="weibo"]:not(.selected) .pt-icon { color: #e6162d; }
.platform-tab[data-platform="twitter"]:not(.selected) .pt-icon { color: #000; }

/* 搜索 */
.search-bar {
  display: flex; align-items: center;
  background: var(--color-surface);
  border: var(--border-strong);
  border-radius: var(--radius-control);
  height: var(--control-height-2xl);
  padding: 0 14px;
  gap: 8px;
}
.search-bar input { flex: 1; border: none; outline: none; background: none; color: var(--color-text); }
.search-bar:focus-within { border-color: var(--color-accent); box-shadow: var(--shadow-focus-ring); }

/* 大V 行 */
.kol-item {
  display: flex; align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: var(--border-soft);
}
.kol-item:last-child { border-bottom: none; }
.kol-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2a86ff, var(--color-accent));
  color: var(--color-white);
  font-size: var(--text-title-sm); font-weight: var(--font-weight-bold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kol-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.kol-info { flex: 1; min-width: 0; cursor: pointer; }
.kol-info .base { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kol-info .name { min-width: 104px; font-size: var(--text-body); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.kol-info .tag { font-size: var(--text-xs); color: var(--color-accent); background: var(--color-accent-soft); border-radius: var(--radius-pill); padding: 2px 10px; }
.kol-info .desc { color: var(--color-text-muted); font-size: var(--text-xs); margin-top: 5px; }
.btn-sub {
  height: var(--control-height-lg);
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  padding: 0 20px;
  flex-shrink: 0;
  transition: background var(--ease-standard), transform 120ms ease;
}
.btn-sub:hover { background: var(--color-accent-strong); }
.btn-sub:active { transform: translateY(1px); }
.btn-sub.subscribed {
  background: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid var(--color-line-success);
  box-shadow: none;
}
.btn-sub.subscribed:hover { background: var(--color-success-soft); border-color: var(--color-success); }
.sub-type-switches { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sub-type-switch {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--color-text-muted); cursor: pointer; user-select: none;
}
.sub-type-switch input { accent-color: #16a34a; cursor: pointer; }

/* 推送通道选择 */
.channel-picks { display: flex; gap: 10px; flex-wrap: wrap; }
.channel-pick {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border: var(--border-strong); border-radius: var(--radius-control);
  background: var(--color-surface); cursor: pointer; user-select: none;
  font-size: var(--text-sm); color: var(--color-text-strong);
  transition: all var(--ease-standard);
}
.channel-pick:hover { border-color: var(--color-accent); }
.channel-pick.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.channel-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.ch-icon-wrap { display: inline-flex; align-items: center; }
.ch-icon { width: 20px; height: 20px; display: block; }
.ch-label { font-weight: var(--font-weight-medium); }
.ch-check {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; color: transparent;
  border: 1px solid var(--color-line-strong);
  transition: all var(--ease-standard);
}
.channel-pick.selected .ch-check {
  background: var(--color-accent); border-color: var(--color-accent); color: var(--color-white);
}
.channel-pick[data-channel="telegram"] .ch-icon { color: #26a5e4; }
.channel-pick[data-channel="feishu"] .ch-icon { color: #3370ff; }
.channel-pick[data-channel="wecom"] .ch-icon { color: #07c160; }

/* 帖子 */
.post-item { padding: 16px 4px; border-bottom: var(--border-soft); }
.post-item:last-child { border-bottom: none; }
.post-item .p-header { display: flex; align-items: center; gap: 12px; }
.post-item .p-header .kol-avatar { width: 38px; height: 38px; font-size: var(--text-body); }
.post-item .p-name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.post-item .p-name { font-size: var(--text-md); font-weight: var(--font-weight-semibold); color: var(--color-text-strong); }
.post-item .p-time { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }
.post-item .p-title { font-size: var(--text-body); font-weight: var(--font-weight-bold); margin-top: 12px; color: var(--color-text); }
.post-item .p-content { color: var(--color-text); margin-top: 8px; line-height: 1.7; word-break: break-all; font-size: var(--text-md); }
.post-images { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.post-images img {
  width: 120px; height: 120px; object-fit: cover;
  border-radius: var(--radius-control);
  border: var(--border-soft);
  background: var(--color-bg-muted);
}
.post-item .p-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: var(--text-xs); color: var(--color-text-muted); flex-wrap: wrap; }
.post-item .p-meta .cat { color: var(--color-accent); background: var(--color-accent-soft); border-radius: var(--radius-pill); padding: 2px 10px; }
.post-item .p-name-line .p-platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f1f2f4;
  flex-shrink: 0;
}
.post-item .p-name-line .p-platform .pt-icon { width: 13px; height: 13px; }
.post-item .p-name-line .p-platform[data-platform="twitter"] .pt-icon { width: 11px; height: 11px; }
.post-item .p-name-line .p-platform[data-platform="xueqiu"] .pt-icon { color: #287dff; }
.post-item .p-name-line .p-platform[data-platform="combination"] .pt-icon { color: var(--color-accent); }
.post-item .p-name-line .p-platform[data-platform="weibo"] .pt-icon { color: #e6162d; }
.post-item .p-name-line .p-platform[data-platform="twitter"] .pt-icon { color: #000; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { padding: 12px 10px; text-align: left; border-bottom: var(--border-soft); white-space: nowrap; }
th { color: var(--color-text-muted); font-weight: var(--font-weight-semibold); font-size: var(--text-xs); background: var(--color-bg-table-head); }
tbody tr { transition: background var(--ease-standard); }
tbody tr:hover { background: var(--color-surface-row-hover); }
.btn-sm {
  font-size: var(--text-xs); padding: 5px 12px;
  border: var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text-strong);
  transition: border-color var(--ease-standard), color var(--ease-standard), background var(--ease-standard);
}
.btn-sm:hover { border-color: var(--color-text-muted); }
td .btn-sm { margin-right: 6px; }
.btn-sm.danger { color: var(--color-danger); border-color: var(--color-line-danger); }
.btn-sm.danger:hover { border-color: var(--color-danger); color: var(--color-danger-strong); }
/* 首页大V行：删除按钮与订阅按钮同尺寸（表格内的 btn-sm 保持紧凑） */
.kol-item .btn-sm.danger {
  height: var(--control-height-lg);
  padding: 0 20px;
  font-size: var(--text-sm);
}
.status-ok { color: var(--color-success); }
.status-fail { color: var(--color-danger); }
.status-warn { color: var(--color-warning, #d97706); }

.rate-bar {
  position: relative;
  min-width: 110px;
  height: 16px;
  background: var(--color-bg-muted);
  border-radius: 8px;
  overflow: hidden;
}

.rate-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease;
}

.rate-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-strong);
}
.channel-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: stretch;
}
.channel-card {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  min-width: 240px;
  background: var(--color-bg-muted);
  border: var(--border-soft);
  border-radius: var(--radius-control);
  padding: 18px 20px;
}
.channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.channel-head b { color: var(--color-text-strong); }
.channel-title { display: inline-flex; align-items: center; gap: 8px; }
.channel-title .ch-icon { width: 22px; height: 22px; }
.channel-card[data-channel="telegram"] .ch-icon { color: #26a5e4; }
.channel-card[data-channel="feishu"] .ch-icon { color: #3370ff; }
.channel-card[data-channel="wecom"] .ch-icon { color: #07c160; }
.channel-desc { margin-top: 10px; line-height: 1.6; }
.channel-actions { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.channel-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: var(--control-height-xl);
  border: none; border-radius: var(--radius-control);
  font-size: var(--text-sm); font-weight: var(--font-weight-semibold);
  cursor: pointer; transition: all var(--ease-standard);
}
.channel-btn.primary { background: var(--color-accent); color: var(--color-white); }
.channel-btn.primary:hover { background: var(--color-accent-strong); }
.channel-btn.secondary {
  background: var(--color-surface);
  border: var(--border-strong);
  color: var(--color-text-strong);
}
.channel-btn.secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.channel-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); font-weight: var(--font-weight-semibold);
  padding: 4px 10px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
.channel-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.channel-status.status-ok { color: var(--color-success); background: rgba(22, 163, 74, 0.1); }
.channel-status.status-warn { color: var(--color-warning, #d97706); background: rgba(217, 119, 6, 0.1); }
.channel-status.status-fail { color: var(--color-danger); background: rgba(220, 38, 38, 0.1); }

/* 系统日志 */
.syslog {
  background: var(--color-bg-muted);
  border: var(--border-soft);
  border-radius: var(--radius-control);
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 62vh;
  overflow-y: auto;
  color: var(--color-text-strong);
}
pre.content-cell { white-space: pre-wrap; word-break: break-all; min-width: 260px; font-family: inherit; }

.empty { text-align: center; color: var(--color-text-muted); padding: 56px 20px; }
.empty .btn-add { margin-top: 18px; }
.notice {
  background: var(--color-surface-accent);
  color: var(--color-accent-strong);
  font-size: var(--text-sm);
  border-radius: var(--radius-control);
  padding: 12px 16px;
  margin-bottom: 16px;
  line-height: 1.7;
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.7; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: var(--text-sm); font-weight: var(--font-weight-medium); color: var(--color-text-strong); }
.form-row .form-control { margin-bottom: 0; }
/* 横向工具栏/行内的表单控件不需要纵向间距，避免与按钮错位 */
.toolbar .form-control,
.row .form-control { margin-bottom: 0; }
.form-label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: var(--text-sm); font-weight: var(--font-weight-medium); color: var(--color-text-strong); }
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-card {
  background: var(--color-surface); color: var(--color-text-strong);
  border: 1px solid var(--color-border); border-radius: var(--radius-card);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  width: min(480px, 100%); padding: 24px; max-height: 90vh; overflow: auto;
}

/* 轻量 toast 提示 */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 18px;
  border-radius: var(--radius-control);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-white);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  white-space: pre-wrap;
  pointer-events: none;
  animation: toast-in 0.18s ease-out;
}
.toast.success { background: var(--color-success-strong); }
.toast.error { background: var(--color-danger-strong); }
.toast.hide { opacity: 0; transition: opacity 0.3s ease; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 响应式 */
@media (max-width: 900px) {
  .sidebar { width: 68px; padding: 18px 8px; }
  .sidebar-brand { justify-content: center; padding: 6px 0 16px; }
  .sidebar-brand-text, .sidebar-brand-meta, .nav-item .nav-label, .nav-group-label, .sidebar-user { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .login-shell { flex-direction: column; gap: 28px; max-width: 420px; }
  .login-brand { text-align: center; }
  .login-brand .brand-mark { margin-left: auto; margin-right: auto; }
  .login-brand-copy { margin: 0 auto; }
  .hero-panel { flex-direction: column; align-items: flex-start; }
  .topbar { padding: 0 16px; }
  .page-main { padding: 16px; }
}

@media (max-width: 640px) {
  .post-item .p-title { font-size: var(--text-md); }
}

/* ---------- 移动端底部标签栏 ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--color-surface-soft);
  backdrop-filter: blur(var(--blur-nav)) saturate(160%);
  border-top: var(--border-default);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}
.bnav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  border: none; background: transparent;
  color: var(--color-text-muted);
  font-size: 11px;
  min-height: 48px;
  border-radius: var(--radius-control);
}
.bnav-item .bnav-icon { font-size: 18px; line-height: 1; }
.bnav-item.active { color: var(--color-accent-strong); font-weight: var(--font-weight-semibold); }

/* 「更多」页网格 */
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.more-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px;
  border: var(--border-strong); border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-md);
  padding: 0 14px;
}
.more-item .more-icon { font-size: 16px; width: 20px; text-align: center; }
.more-item .more-icon svg { width: 16px; height: 16px; vertical-align: -2px; }

/* ---------- 手机端（≤768px）壳层 ---------- */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .main-col { min-height: 100vh; }
  .topbar { padding: 0 12px; }
  .page-main { padding: 16px 14px calc(74px + env(safe-area-inset-bottom)); }
  .platform-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .platform-tab { flex-shrink: 0; width: auto; height: auto; min-height: 38px; padding: 0 14px; gap: 6px; border-radius: var(--radius-pill); }
  .platform-tab .pt-label { display: inline; font-size: var(--text-sm); }
  .kol-item { flex-wrap: wrap; }
  .kol-item .btn-sub { width: 100%; min-height: 44px; }
  .kol-item .btn-sm.danger { min-height: 44px; }
  .search-bar { min-height: 44px; }
  .toolbar { flex-wrap: wrap; }
  .fav-toggle { min-height: 44px; }
  .sub-type-switches { gap: 8px; }
  .sub-type-switch { min-height: 44px; }
  .post-item { padding: 14px 4px; }
  .post-item a { min-height: 40px; display: inline-flex; align-items: center; }
  .btn-normal, .btn-ghost, .channel-btn { min-height: 44px; }
  .btn-add { min-height: 44px; }
  .hero-panel { padding: 16px; }
  .form-control { min-height: 44px; }
}

/* ---------- 数据看板 ---------- */
.dash-trend { display: flex; gap: 6px; align-items: flex-end; height: 180px; padding: 10px 4px 0; }
.dash-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.dash-trend-bar { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; max-width: 42px; height: 150px; border-radius: 6px; background: var(--color-bg-muted); overflow: hidden; }
.dash-trend-ok { width: 100%; background: var(--color-success); transition: height 0.3s ease; }
.dash-trend-fail { width: 100%; background: var(--color-danger); transition: height 0.3s ease; }
.dash-trend-date { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; }
.dash-bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.dash-bar-label { width: 90px; flex-shrink: 0; font-size: 13px; color: var(--color-text-strong); }
.dash-bar-track { flex: 1; height: 10px; border-radius: 5px; background: var(--color-bg-muted); overflow: hidden; }
.dash-bar-fill { height: 100%; background: var(--color-accent); border-radius: 5px; }
.dash-bar-fill.warn { background: var(--color-warning); }
.dash-bar-value { width: 110px; flex-shrink: 0; text-align: right; font-size: 12px; color: var(--color-text-muted); }
.dash-warn { padding: 10px 14px; border-radius: var(--radius-control); background: var(--color-warning-soft); color: var(--color-warning-strong); font-size: 13px; }
.dash-warn a { color: var(--color-link); }
.dash-event { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--color-line-soft); font-size: 13px; }
.dash-event:last-child { border-bottom: none; }
.dash-event-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dash-event-dot.ok { background: var(--color-success); }
.dash-event-dot.warn { background: var(--color-warning); }
.dash-event-dot.fail { background: var(--color-danger); }
.dash-event-time { font-size: 12px; flex-shrink: 0; }
.dash-event-platform { flex-shrink: 0; font-weight: 600; color: var(--color-text-strong); width: 70px; }
.dash-event-detail { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- 开关（switch）与免打扰时段表单 ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--text-sm); color: var(--color-text-strong); position: relative; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.switch .track { width: 38px; height: 22px; border-radius: 11px; background: var(--color-line-strong); position: relative; flex-shrink: 0; transition: background var(--ease-standard); }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--color-white); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform var(--ease-standard); }
.switch input:checked + .track { background: var(--color-accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: var(--outline-focus); outline-offset: 2px; }
.dnd-form { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; max-width: 560px; }
.dnd-range-field { display: flex; flex-direction: column; gap: 6px; }
.dnd-range-label { font-size: 12px; color: var(--color-text-muted); }
.dnd-range { display: flex; align-items: center; gap: 10px; }
.dnd-range input[type="time"] { margin: 0; min-width: 138px; }
.dnd-sep { font-size: 13px; color: var(--color-text-muted); }
.dnd-range-field.is-off { opacity: 0.55; }
.dnd-range-field.is-off input { pointer-events: none; }
.dnd-actions { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }

/* 渠道绑定步骤折叠（设置页压缩） */
details.bind-steps { margin-top: 10px; }
details.bind-steps > summary {
  cursor: pointer;
  color: var(--color-accent);
  font-size: 13px;
  padding: 4px 0;
  user-select: none;
}
details.bind-steps > summary:hover { opacity: 0.85; }
details.bind-steps > summary::before {
  content: "▸ ";
  color: var(--color-text-muted);
}
details.bind-steps[open] > summary::before { content: "▾ "; }

/* 设置页分段导航 */
.settings-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.settings-tab {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(128, 128, 128, 0.3);
  background: transparent;
  color: var(--color-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.settings-tab:hover { border-color: var(--color-accent); color: var(--color-accent); }
.settings-tab.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}
