/* ============================================================================
 * 云聊 (YunChat H5) — Style 15: High-Tech SaaS Boutique (电光蓝高科精品风)
 * 规范来源: ui-ux-pro-max #72 SaaS Boutique & #86 Fluent 2 + tasteskill v2
 * - 底盘色: 冰川浅蓝灰 (#F4F7FB) + 纯白模块 (#FFFFFF) + 次级浅灰蓝 (#EDF2F9)
 * - 唯一主色: 硅谷电光蓝 (#0052FF)，文字碳海军蓝 (#0A192F)
 * - 几何与边框: 1px solid #DBE4F0 精密发丝边框，6px 硬朗微圆角，零毛玻璃、零粉紫渐变
 * - 图标与头像: 14px 极细矢量图标 (stroke-width: 1.5)，32px×32px 6px圆角方标头像
 * ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@400;500;600;700&display=swap');

:root {
  --ground: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #edf2f9;
  --border: #dbe4f0;
  --border-strong: #c2d1e5;

  --text: #0a192f;
  --muted: #334155;
  --subtle: #334155;

  --primary: #0052ff;
  --primary-hover: #0045d8;
  --primary-fg: #ffffff;
  --active: #ebf2ff;

  --accent: #0052ff;
  --accent-tint: #ebf2ff;
  --accent-border: #bfd4ff;
  --accent-ink: #0045d8;

  --pos: #047857;
  --pos-tint: #ecfdf5;
  --pos-ink: #065f46;

  --warn: #b45309;
  --warn-tint: #fffbeb;
  --warn-ink: #92400e;

  --neg: #dc2626;
  --neg-tint: #fef2f2;
  --neg-ink: #991b1b;

  /* 兼容旧变量别名 */
  --appbar-bg: #ffffff;
  --scaffold-bg: #f4f7fb;
  --card-bg: #ffffff;
  --text-main: #0a192f;
  --text-sub: #334155;
  --text-muted: #334155;
  --divider: #dbe4f0;
  --danger: #dc2626;
  --success: #047857;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;

  --radius: 6px;
  --radius-sm: 4px;
  --shadow-subtle: none;

  --font-sans: "Albert Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Albert Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--ground);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* 响应式容器 (无光球、无毛玻璃) */
.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  background: var(--ground);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 顶部精密导航栏 (Flat Architectural AppBar) */
.app-bar {
  background: var(--surface);
  color: var(--text);
  height: 50px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 10;
}

.app-bar-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.app-bar-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.app-bar-subtitle {
  font-size: 13px;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface-2);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.icon-btn-primary {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
}

.icon-btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  flex-shrink: 0;
}

/* 主视图与 Tab 页面切换 */
.tab-views {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.tab-page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  padding-bottom: 12px;
}

.tab-page.active {
  display: flex;
}

/* Tab 0: 桌面双栏精密工作台 */
.inbox-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr);
  gap: 16px;
  padding: 16px 20px;
  align-items: stretch;
}

.inbox-primary-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.section-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.section-strip .num {
  font-weight: 500;
  color: var(--subtle);
}

.inbox-col-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  color: var(--muted);
}

.inbox-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.ledger-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ledger-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.ledger-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.ledger-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--subtle);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid #a7f3d0;
}

.status-pos {
  background: var(--pos-tint);
  color: var(--pos-ink);
}

.status-text-pos {
  color: var(--pos);
  font-weight: 600;
}

.ledger-kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.ledger-kpi-cell {
  padding: 12px 14px;
}

.ledger-kpi-cell + .ledger-kpi-cell {
  border-left: 1px solid var(--border);
}

.ledger-kpi-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.ledger-kpi-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ledger-kpi-sub {
  font-size: 13px;
  color: var(--subtle);
  margin-top: 3px;
}

.ledger-quick-bar {
  display: flex;
  gap: 8px;
}

.ledger-quick-bar .btn-secondary {
  flex: 1;
}

.ledger-kv-list {
  display: flex;
  flex-direction: column;
}

.ledger-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
}

.ledger-kv-row:last-child {
  border-bottom: none;
}

.ledger-kv-row .num {
  color: var(--text);
  font-weight: 600;
}

/* 会话列表项 (1px 极细分割行 + 36px 硬朗方标头像) */
.session-list {
  flex: 1;
  background: var(--surface);
}

.session-item {
  display: flex;
  align-items: center;
  padding: 15px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 120ms ease;
}

.session-item:last-child {
  border-bottom: none;
}

.session-item.pinned {
  background: #f8fafd;
}

.session-item:hover {
  background: var(--surface-2);
}

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}

.unread-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--neg);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 0 5px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

.session-main {
  flex: 1;
  min-width: 0;
}

.session-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.session-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-official {
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 0 6px;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}

.session-subtitle {
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.session-time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
}

.pin-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0 6px;
  border-radius: 3px;
  white-space: nowrap;
}

/* 通用分组列表 (通讯录 / 发现 / 我的) */
.page-inner {
  padding: 14px 20px 24px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.section-header {
  padding: 12px 2px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.list-cell {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background-color 120ms ease;
}

.list-cell:last-child {
  border-bottom: none;
}

.list-cell:hover {
  background: var(--surface-2);
}

.cell-glyph {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cell-glyph svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

.cell-content {
  flex: 1;
  min-width: 0;
}

.cell-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.cell-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.cell-action-text {
  font-family: var(--font-mono);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Tab 4: 我的 & 节点诊断 */
.profile-scroll {
  padding: 16px 20px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.white-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-subtle);
  padding: 16px 18px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-info {
  min-width: 0;
  flex: 1;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.vip-tag {
  background: var(--warn-tint);
  border: 1px solid #fde68a;
  color: var(--warn-ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.mono-meta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}

/* 钱包卡片：电光蓝高科账本卡片 */
.wallet-card {
  background: var(--text);
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  padding: 18px;
  color: #ffffff;
}

.wallet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
}

.wallet-label {
  font-weight: 600;
}

.vip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.vip-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.wallet-balance {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 8px 0 14px;
  font-variant-numeric: tabular-nums;
}

.wallet-actions {
  display: flex;
  gap: 8px;
}

.wallet-action-btn {
  flex: 1;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.wallet-action-btn:hover {
  background: var(--primary-hover);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.card-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
}

.endpoint-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.endpoint-item:last-child {
  border-bottom: none;
}

.ep-check {
  color: var(--pos);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
  flex-shrink: 0;
}

.ep-body {
  flex: 1;
  min-width: 0;
}

.ep-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.ep-detail {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  word-break: break-all;
  line-height: 1.45;
}

.ep-ms {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pos);
  flex-shrink: 0;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

.timelock-pre {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
}

/* 底部精密导航栏 (Docked Architectural TabBar) */
.bottom-nav {
  height: 46px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  flex-shrink: 0;
  z-index: 15;
}

.nav-item {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 120ms ease, background-color 120ms ease;
}

.nav-item:last-child {
  border-right: none;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-pill svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

.nav-item.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 700;
}

/* 聊天详情全屏视图 (ChatDetailScreen) */
.chat-detail-view {
  position: absolute;
  inset: 0;
  background: var(--ground);
  z-index: 30;
  display: none;
  flex-direction: column;
}

.chat-detail-view.open {
  display: flex;
}

.chat-appbar-titles {
  flex: 1;
  margin-left: 10px;
  min-width: 0;
}

.chat-appbar-main {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-appbar-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.group-notice-bar {
  background: var(--warn-tint);
  color: var(--warn-ink);
  border-bottom: 1px solid #fde68a;
  padding: 7px 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.notice-tag {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: var(--warn-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.chat-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sys-notice-pill {
  align-self: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  text-align: center;
}

.msg-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.msg-row.me {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.msg-col {
  display: flex;
  flex-direction: column;
  max-width: 72%;
}

.msg-row.me .msg-col {
  align-items: flex-end;
}

.msg-sender-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}

.msg-bubble {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 13px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.msg-row.me .msg-bubble {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
}

/* 红包卡片 */
.redpacket-bubble {
  width: 224px;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: #dc2626;
  border: 1px solid #b91c1c;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.redpacket-bubble.claimed {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--muted);
}

.rp-icon-box {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.redpacket-bubble.claimed .rp-icon-box {
  background: var(--neg-tint);
  color: var(--neg);
}

.rp-text-title {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-text-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: inherit;
  opacity: 0.9;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* 底部聊天输入栏 */
.chat-input-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-banned-bar {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.chat-text-input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  outline: none;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
}

.chat-text-input:focus {
  background: var(--surface);
  border-color: var(--primary);
}

.rp-trigger-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.rp-trigger-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.send-trigger-btn {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  height: 34px;
  padding: 0 16px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
}

.send-trigger-btn:hover {
  background: var(--primary-hover);
}

/* 模态底部抽屉与弹窗 */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 25, 47, 0.42);
  z-index: 50;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop.center-dialog {
  align-items: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
}

.bottom-sheet {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border-top: 1px solid var(--border-strong);
  border-radius: 8px 8px 0 0;
  padding: 16px 20px 24px;
  max-height: 82%;
  overflow-y: auto;
}

.dialog-box {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 12px 32px rgba(10, 25, 47, 0.16);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}

.sheet-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.switch-row:last-child {
  border-bottom: none;
}

.switch-label-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.switch-label-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.15s ease;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.15s ease;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
}

/* 表单与按钮 */
.form-field {
  margin-top: 12px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.form-field input {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.form-field input:focus {
  background: var(--surface);
  border-color: var(--primary);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  height: 32px;
  padding: 0 10px;
  cursor: pointer;
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius);
  white-space: nowrap;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-danger {
  background: var(--neg);
  color: #ffffff;
  border: 1px solid var(--neg);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  cursor: pointer;
}

/* 浮动 SnackBar 提示条 */
.snackbar-toast {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 60px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--text);
  border: 1px solid #1e293b;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 80;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.snackbar-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .app-bar {
    padding: 0 14px;
    height: 46px;
  }
  .app-bar-subtitle,
  .btn-label-desktop {
    display: none;
  }
  .inbox-workspace {
    grid-template-columns: 1fr;
    padding: 10px 12px;
    gap: 10px;
  }
  .inbox-aside {
    display: none;
  }
  .page-inner,
  .profile-scroll {
    padding: 10px 12px 18px;
  }
  .chat-messages-area,
  .chat-input-bar,
  .group-notice-bar {
    padding-left: 14px;
    padding-right: 14px;
  }
}
