:root {
  --cmb-red: #d92128;
  --cmb-red-hover: #b8171d;
  --cmb-red-light: #fff1f0;
  --gold-accent: #d4a373;
  --text-primary: #1f2329;
  --text-secondary: #646a73;
  --text-muted: #8f959e;
  --bg-page: #f5f6f7;
  --bg-card: #ffffff;
  --border-light: #dee0e3;
  --border-subtle: #ebedf0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

html {
  max-width: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: clip;
}

.app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #f7f8fa;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
}

/* 顶部锁定头部 (如图2所示：滚动下滑时锁定品牌标头、状态提示与5天日期导航) */
.app-header-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.app-header-sticky .filter-chips-wrapper {
  border-bottom: none;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 10px;
}

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

.brand-badge {
  background: var(--cmb-red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.brand h1 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.user-status-pill {
  display: none !important; /* 保持隐藏登录与次数入口，保留底层逻辑不删代码 */
  height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  background: #fff5f5;
  border: 1px solid rgba(217, 33, 40, 0.22);
  color: #ba121e;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.user-status-pill:hover {
  background: #ffe3e3;
  border-color: rgba(217, 33, 40, 0.35);
}

.user-status-pill:active {
  transform: scale(0.96);
}

.user-status-pill.logged-in {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.user-status-pill.unlimited {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border-color: #f59e0b;
  color: #b45309;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.15);
}

/* iOS原生Switch风格：秒表悬浮窗开关 */
.stopwatch-switch-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  height: 28px;
  padding: 0 5px 0 8px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stopwatch-switch-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  letter-spacing: -0.2px;
}

/* iOS原生精细级Switch尺寸 (比手机大开关微调紧凑，适配28px胶囊栏) */
.ios-switch-btn {
  position: relative;
  width: 38px;
  height: 22px;
  background-color: #e2e8f0; /* 关闭状态：Airplane Mode风格灰色底槽 */
  border-radius: 11px;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ios-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18), 0 0 1px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 开启状态：参考用户截图中的VPN（iOS 经典高亮绿 #34C759） */
.ios-switch-btn.active {
  background-color: #34C759;
}

.ios-switch-btn.active .ios-switch-thumb {
  transform: translateX(16px);
}

.stopwatch-switch-wrapper.active {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.stopwatch-switch-wrapper.active .stopwatch-switch-label {
  color: #166534;
}

/* ==========================================================================
   页面内置高精度悬浮秒表卡片 (1:1 还原截图深空灰磨砂 + 大字时钟 + 3秒倒计时)
   ========================================================================== */
.floating-clock-widget {
  position: fixed;
  right: 14px;
  bottom: 80px;
  width: 256px;
  background: rgba(38, 41, 51, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 1px rgba(255, 255, 255, 0.2);
  z-index: 9999;
  padding: 8px 14px 12px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.floating-clock-widget.dragging {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6), 0 0 0 1.5px rgba(255, 90, 70, 0.6);
  opacity: 0.96;
}

/* 顶部轻量拖拽手柄条与关闭按钮 */
.floating-clock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 16px;
  margin-bottom: 2px;
  cursor: grab;
}

.floating-clock-widget.dragging .floating-clock-header {
  cursor: grabbing;
}

.clock-drag-pill {
  width: 32px;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  margin-left: auto;
  margin-right: auto;
}

.floating-clock-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.floating-clock-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* 大字纯时钟显示 */
.floating-clock-time-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  font-weight: 700;
  padding: 2px 0 4px;
}

.clock-time-main {
  font-size: 38px;
  color: #F8FAFC;
  letter-spacing: -1px;
  line-height: 1;
}

.clock-time-tenth {
  font-size: 38px;
  color: #FF5A46; /* 橙红高亮加粗 */
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

/* 最后3秒倒计时进度条 */
.floating-clock-countdown-zone {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  animation: fadeInZone 0.2s ease-out;
}

@keyframes fadeInZone {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.floating-clock-countdown-zone.active {
  display: flex;
}

.countdown-labels {
  position: relative;
  height: 14px;
  width: 100%;
}

.cd-node-label {
  position: absolute;
  top: 0;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  transform: translateX(-50%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  transition: color 0.15s ease;
}

.cd-node-label.reached {
  color: #FF5A46;
}

/* 轨道与节点 */
.countdown-track-wrapper {
  position: relative;
  height: 8px;
  display: flex;
  align-items: center;
}

.countdown-track-base {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.countdown-track-fill {
  position: absolute;
  left: 0;
  height: 3px;
  width: 0%;
  background: #FF5A46;
  border-radius: 2px;
  transition: width 0.05s linear;
}

.countdown-nodes {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
}

.cd-dot {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  background: #262933;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.cd-dot.reached {
  background: #FF5A46;
  border-color: #FFFFFF;
  box-shadow: 0 0 4px rgba(255, 90, 70, 0.6);
}

/* 5个节点位置百分比: 2.5(16.67%), 2.0(33.33%), 1.5(50%), 1.0(66.67%), 0.5(83.33%) */
.cd-node-label[data-node="2.5"], .cd-dot[data-node="2.5"] { left: 16.67%; }
.cd-node-label[data-node="2.0"], .cd-dot[data-node="2.0"] { left: 33.33%; }
.cd-node-label[data-node="1.5"], .cd-dot[data-node="1.5"] { left: 50.00%; }
.cd-node-label[data-node="1.0"], .cd-dot[data-node="1.0"] { left: 66.67%; }
.cd-node-label[data-node="0.5"], .cd-dot[data-node="0.5"] { left: 83.33%; }

/* 顶部右上角手动刷新按钮（taste-skill & frontend-design 规范级微交互） */
.header-refresh-btn {
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.header-refresh-btn .cooldown-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 0%;
  background: #cbd5e1;
  border-radius: 13px;
  pointer-events: none;
  opacity: 0;
  transition: width 0.3s ease-out, opacity 0.2s ease;
  z-index: 1;
}

.header-refresh-btn:hover:not(.cooldown) {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.header-refresh-btn:active:not(.cooldown) {
  transform: scale(0.95);
  background: #cbd5e1;
}

.header-refresh-btn .refresh-icon,
.header-refresh-btn .refresh-label {
  position: relative;
  z-index: 2;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.header-refresh-btn .refresh-icon {
  display: block;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.header-refresh-btn.refreshing {
  pointer-events: none;
  opacity: 0.85;
}

.header-refresh-btn.refreshing .refresh-icon {
  animation: rotateRefresh 0.65s linear infinite;
}

/* 60秒冷却置灰与“充能恢复式”进度条（底色为颜色2，进度遮罩为颜色1原始底色） */
.header-refresh-btn.cooldown {
  background: #cbd5e1; /* 颜色 2：冷却消耗底色 */
  border-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.header-refresh-btn.cooldown .refresh-icon {
  stroke: #64748b;
  opacity: 0.75;
}

.header-refresh-btn.cooldown .cooldown-progress-bar {
  opacity: 1;
  background: #f1f5f9; /* 进度条遮罩图层 = 颜色 1（未点击时的原始按钮底色） */
  border-right: none;  /* 边缘无额外颜色或阴影，纯净自然 */
  box-shadow: none;
}

@keyframes rotateRefresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.icon-btn {
  background: #f2f3f5;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #4e5969;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.icon-btn:active, .icon-btn.loading {
  background: #e5e6eb;
  transform: scale(0.96);
}

/* 状态栏 */
.status-banner {
  background: #fff8f8;
  border-top: 1px solid #ffecec;
  border-bottom: 1px solid #ffecec;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  background-color: var(--cmb-red);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(217, 33, 40, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(217, 33, 40, 0); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.status-text {
  flex: 1;
  color: #4e5969;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-sub {
  color: #86909c;
}

/* 日期水平3日导航 */
.date-nav-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 12px;
}

.date-scroll {
  display: flex;
  gap: 8px;
  width: 100%;
  padding: 2px 0;
}

.date-nav-3days,
.date-nav-5days {
  display: flex;
  gap: 6px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.date-nav-5days::-webkit-scrollbar {
  display: none;
}

.date-nav-3days .date-tab,
.date-nav-5days .date-tab {
  flex: 1;
  min-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  border-radius: 8px;
  background: #f7f8fa;
  cursor: pointer;
  border: 1px solid #ebeef5;
  transition: all 0.2s ease;
}

.date-tab .tab-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.date-tab .tab-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
}

.date-tab.active {
  background: var(--cmb-red);
  border-color: var(--cmb-red);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(217, 33, 40, 0.28);
}

.date-tab.active .tab-label,
.date-tab.active .tab-sub {
  color: #ffffff;
}

/* 持有期与机构渠道标签筛选栏 */
.filter-chips-wrapper {
  background: #ffffff;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-chips-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-chips-scroll::-webkit-scrollbar {
  display: none;
}

.filter-row-label {
  font-size: 11px;
  color: #8c8c8c;
  font-weight: 700;
  padding: 0 0 0 2px;
  flex: 0 0 40px;
  width: 40px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  user-select: none;
}

.filter-chip {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  border: 1.5px solid transparent;
  padding: 4px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

.filter-chip:hover:not(.active) {
  background: #e2e8f0;
  color: #0f172a;
}

.filter-chip:active {
  transform: scale(0.96);
}

/* 激活选中态：图1清爽天蓝胶囊风格 (浅蓝冰透底、晴空蓝细边框、醒目天蓝字) */
.filter-chip.active,
.sub-chip.active,
.filter-chips-quota .quota-chip.active {
  background: #eff6ff !important;
  color: #0958d9 !important;
  border: 1.5px solid #69b1ff !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 4px rgba(22, 119, 255, 0.12) !important;
}

/* 渠道筛选行间距微调 */
.filter-chips-sub {
  padding-top: 0;
}

/* 额度选项后置提示语样式 */
.quota-filter-hint {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  white-space: nowrap;
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
}

/* 额度胶囊 Badge */
.quota-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.quota-pill-big {
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
}
.quota-pill-micro {
  background: #fff1f0;
  color: #cf1322;
  border: 1px solid #ffa39e;
}
.quota-pill-closed {
  background: #f5f5f5;
  color: #8c8c8c;
  border: 1px solid #d9d9d9;
}

/* 主内容区 */

.main-content {
  flex: 1;
  padding: 12px 12px 24px;
}

.current-day-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 4px;
}

/* 顶部批量复制代码按钮 */
.batch-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  color: var(--cmb-red);
  border: 1px solid #ffd2d5;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(217, 33, 40, 0.08);
  transition: all 0.15s ease;
  user-select: none;
}

.batch-copy-btn:hover {
  background: #fff5f5;
  border-color: var(--cmb-red);
}

.batch-copy-btn:active {
  transform: scale(0.95);
  background: #fee;
}

.date-heading {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
}

.forecast-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.summary-tag {
  font-size: 11px;
  font-weight: 600;
  background: #fff2e8;
  color: #fa541c;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #ffd8bf;
}

/* 产品卡片列表 */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f0f1f2;
  position: relative;
  transition: transform 0.15s ease;
}

.product-card:active {
  transform: translateY(1px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.card-title-group {
  flex: 1;
  min-width: 0;
}

/* 第一行：产品简称 + 代码，保持极致干净不折行 */
.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: nowrap;
  min-width: 0;
}

.product-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.code-pill {
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

/* 第二行：优雅下沉的属性标签行 (大额/小额 + 期限 + 代销/自营 + 产品全称) */
.card-sub-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.issuer-text {
  font-size: 11px;
  color: #64748b;
  margin-left: 2px;
}

/* 右侧操作栏 (实况标置于按钮上方，垂直右对齐) */
.card-action-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  flex-shrink: 0;
}

.action-crowd-pill {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  margin-bottom: 5px;
  line-height: 1.35;
}
.action-crowd-pill.pill-available {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.action-crowd-pill.pill-soldout {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* 紧贴在代码右侧的期限标签与自营/代销标签 */
.period-inline-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
  background: #e8f4ff;
  color: #1677ff;
  border: 1px solid #bae0ff;
}

.period-inline-badge.p-7d { background: #e6f7ff; color: #096dd9; border-color: #91d5ff; }
.period-inline-badge.p-14d { background: #f6ffed; color: #389e0d; border-color: #b7eb8f; }
.period-inline-badge.p-30d { background: #fff7e6; color: #d46b08; border-color: #ffd591; }
.period-inline-badge.p-90d { background: #f9f0ff; color: #722ed1; border-color: #d3adf7; }
.period-inline-badge.p-180d { background: #e6fffb; color: #08979c; border-color: #87e8de; }

/* 机构类型徽标 (招银自营 / 他行代销) */
.agency-inline-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.agency-inline-badge.badge-ziying {
  background: #fff1f0;
  color: #cf1322;
  border: 1px solid #ffa39e;
}

.agency-inline-badge.badge-daixiao {
  background: #f0f5ff;
  color: #1d39c4;
  border: 1px solid #adc6ff;
}

.agency-inline-badge:active {
  transform: scale(0.94);
}

.issuer-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 右上角独立复制按钮 */
.copy-action-btn {
  background: var(--cmb-red);
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(217, 33, 40, 0.25);
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.copy-action-btn:active {
  background: var(--cmb-red-hover);
  transform: scale(0.94);
  box-shadow: 0 1px 3px rgba(217, 33, 40, 0.2);
}

/* 放额时间与产品指标条 - 4个格子严格均分对齐 */
.release-info-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  background: #fafafc;
  border-radius: 6px;
  padding: 8px 2px;
  margin-bottom: 10px;
  border: 1px dashed #e8eaec;
  gap: 0;
}

.strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  padding: 0 2px;
  min-width: 0;
}

.strip-item:not(:last-of-type) {
  border-right: 1px solid #e5e6eb;
}

.strip-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  margin-bottom: 2px;
}

.strip-value {
  font-size: 10.5px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
  text-align: center;
}

.strip-value.font-dark {
  color: #1a1a1a;
}

.strip-value.highlight-red {
  color: var(--cmb-red);
}

/* 小叹号 ⓘ 按钮样式 - 触摸友好，始终保持低调浅灰色，尺寸微调比文字略小 */
.info-bubble-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #8c8c8c;
  font-size: 10px;
  font-weight: normal;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.15s ease;
  user-select: none;
  position: relative;
}

.info-bubble-btn::after {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -8px;
  right: -8px;
}

.info-bubble-btn:hover {
  color: #666666;
}

.info-bubble-btn:active {
  color: #8c8c8c;
  transform: scale(0.9);
}

.strip-divider {
  display: none;
}

/* 详细说明弹窗样式 (移动端/桌面通用) */
.info-detail-dialog {
  background: #ffffff;
  border-radius: 14px;
  width: 90%;
  max-width: 360px;
  padding: 16px 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  margin: auto;
}

.info-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.info-dialog-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.modal-close-x {
  background: none;
  border: none;
  font-size: 16px;
  color: #8c8c8c;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.modal-close-x:hover {
  background: #f5f5f5;
  color: #262626;
}

.info-dialog-body {
  font-size: 13px;
  color: #333333;
  line-height: 1.6;
  margin-bottom: 16px;
  max-height: 60vh;
  overflow-y: auto;
}

.info-dialog-body .info-product-name {
  font-weight: 700;
  font-size: 13px;
  color: #1d2129;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #e8eaec;
}

.info-dialog-body .info-highlight-box {
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
  color: #237804;
  font-size: 13px;
  font-weight: 600;
}

.info-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 12px;
}

.info-detail-table td {
  padding: 5px 8px;
  border: 1px solid #f0f0f0;
}

.info-detail-table td:first-child {
  background: #fafafa;
  color: #595959;
  width: 50%;
}

.info-detail-table td:last-child {
  color: #1a1a1a;
  font-weight: 600;
}

.info-formula-box {
  background: #f7f8fa;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 12px;
  color: #4e5969;
  border-left: 3px solid #1677ff;
}

.info-dialog-footer {
  display: flex;
  justify-content: flex-end;
}

.info-dialog-footer .primary-btn {
  width: 100%;
  padding: 9px;
  font-size: 14px;
}

/* 4列多周期收益率网格 */
.yield-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #fdfdfd;
  border: 1px solid #f0f2f5;
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
  margin-bottom: 0;
}

/* 首发产品暂无收益数据提示条 */
.yield-new-release-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.new-release-badge {
  background: #fa8c16;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.2px;
}

.new-release-text {
  font-size: 13px;
  font-weight: 600;
  color: #ad4e00;
  letter-spacing: 0.2px;
}

.yield-col {
  display: flex;
  flex-direction: column;
  position: relative;
}

.yield-col:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 15%;
  height: 70%;
  width: 1px;
  background: #f0f0f0;
}

.yield-period-title {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.yield-num {
  font-size: 14px;
  font-weight: 800;
  color: #cf1322;
  letter-spacing: -0.3px;
}

/* 空状态与加载中 */
.loading-state, .empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #f0f2f5;
  border-top-color: var(--cmb-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.app-footer {
  padding: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* 弹窗与抽屉 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 999;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-sheet {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  border-radius: 18px 18px 0 0;
  padding: 18px 16px 26px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.calendar-list {
  overflow-y: auto;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f8fa;
  border: 1px solid #ebedf0;
  cursor: pointer;
  transition: background 0.15s;
}

.calendar-item:active {
  background: #eef0f3;
}

.calendar-item.selected {
  background: #fff1f0;
  border-color: #ffccc7;
}

.cal-date {
  font-size: 13px;
  font-weight: 700;
}

.cal-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.cal-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--cmb-red);
}

/* 引导唤起招行弹窗 */
.jump-guide-dialog {
  background: #ffffff;
  width: 86%;
  max-width: 340px;
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin: auto;
  animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.guide-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.guide-code-badge {
  font-size: 24px;
  font-weight: 900;
  color: var(--cmb-red);
  letter-spacing: 2px;
  background: #fff1f0;
  display: inline-block;
  padding: 3px 14px;
  border-radius: 8px;
  margin: 8px 0;
  border: 1px dashed var(--cmb-red);
}

.guide-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.primary-btn {
  background: var(--cmb-red);
  color: #ffffff;
  border: none;
  padding: 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn {
  background: #f2f3f5;
  color: #4e5969;
  border: none;
  padding: 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.wx-tip {
  font-size: 11px;
  color: #86909c;
  margin-top: 12px;
  line-height: 1.4;
  background: #fafafc;
  padding: 6px 8px;
  border-radius: 6px;
}

/* Toast 浮层 (带 5秒 撤销黄金通道) */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  padding: 8px 14px 8px 18px;
  border-radius: 24px;
  font-size: 12.5px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-undo-btn {
  background: #f59e0b;
  color: #0f172a;
  border: none;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  white-space: nowrap;
}

.toast-undo-btn:hover {
  background: #fbbf24;
}

.toast-undo-btn:active {
  transform: scale(0.92);
}

/* 财友众包实况反馈弹窗 (方案B：现代金融私享质感 + 纯净现代矢量微图标) */
#feedbackModal {
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.48);
  padding: 16px;
  box-sizing: border-box;
}

.feedback-dialog {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 350px;
  margin: auto;
  padding: 24px 20px 22px;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  text-align: center;
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.feedback-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 12px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}
.tag-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
  animation: tagPulse 1.8s infinite ease-in-out;
}
@keyframes tagPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.feedback-dialog-title {
  font-size: 16.5px;
  font-weight: 500;
  color: #334155;
  line-height: 1.45;
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}
.feedback-product-highlight {
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 5px;
  margin: 0 2px;
  display: inline-block;
}

.feedback-dialog-sub {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.feedback-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feedback-btn {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}
.feedback-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}
.feedback-btn:active {
  transform: scale(0.985);
  background: #f1f5f9;
}

.feedback-btn .feedback-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 13px;
  transition: transform 0.15s ease;
}
.feedback-btn:hover .feedback-icon-wrap {
  transform: scale(1.05);
}

.feedback-btn .btn-text-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.feedback-btn .btn-main-text {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.feedback-btn .btn-sub-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 400;
  line-height: 1.4;
}

.feedback-action-arrow {
  margin-left: 8px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: all 0.16s ease;
}
.feedback-btn:hover .feedback-action-arrow {
  color: #64748b;
  transform: translateX(2px);
}

/* 按钮微质感专属状态 */
.feedback-btn .icon-bought {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.15);
}
.feedback-btn.btn-bought:hover {
  border-color: rgba(5, 150, 105, 0.35);
  background: #fafffb;
}
.feedback-btn.btn-bought:hover .btn-main-text {
  color: #047857;
}

.feedback-btn .icon-soldout {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.15);
}
.feedback-btn.btn-soldout:hover {
  border-color: rgba(220, 38, 38, 0.35);
  background: #fffafa;
}
.feedback-btn.btn-soldout:hover .btn-main-text {
  color: #b91c1c;
}

.feedback-btn .icon-canceled {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid rgba(71, 85, 105, 0.15);
}
.feedback-btn.btn-canceled:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.feedback-btn.btn-canceled:hover .btn-main-text {
  color: #334155;
}

/* 全屏撒花 Canvas */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100000;
  display: none;
}

/* 财友实况标签 */
.crowd-status-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
  vertical-align: middle;
  line-height: 1.4;
}
.crowd-status-pill.pill-available {
  background: #f6ffed;
  color: #237804;
  border: 1px solid #b7eb8f;
}
.crowd-status-pill.pill-soldout {
  background: #fff2e8;
  color: #d4380d;
  border: 1px solid #ffbb96;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.pulse-dot.dot-green {
  background: #52c41a;
  box-shadow: 0 0 6px rgba(82, 196, 26, 0.6);
  animation: pulseGreen 1.6s infinite ease-in-out;
}
.pulse-dot.dot-gray {
  background: #8c8c8c;
}
@keyframes pulseGreen {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* 已售罄产品变灰卡片 */
.product-card.card-soldout {
  background: #fbfbfd;
  border-color: #e5e6eb;
  filter: grayscale(0.45);
  opacity: 0.88;
}
.product-card.card-soldout .product-title {
  color: #595959;
}
.product-card.card-soldout .yield-num {
  color: #8c8c8c !important;
}

/* 碰碰运气按钮 */
.copy-action-btn.btn-luck {
  background: #fa8c16;
  box-shadow: 0 2px 6px rgba(250, 140, 22, 0.28);
}
.copy-action-btn.btn-luck:active {
  background: #d46b08;
}

/* 非“今天”日期的产品预告标签（隐藏购买按钮与众包额度状态） */
.upcoming-status-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px dashed #cbd5e1;
  white-space: nowrap;
}

/* 页面滚动下滑时的回到顶部悬浮按钮 */
.back-to-top-btn {
  position: fixed;
  right: calc(50% - 240px + 18px);
  bottom: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(203, 213, 225, 0.9);
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.9);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 480px) {
  .back-to-top-btn {
    right: 16px;
    bottom: 24px;
  }
}

.back-to-top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: #ffffff;
  color: #1677ff;
  border-color: #69b1ff;
  box-shadow: 0 6px 18px rgba(22, 119, 255, 0.18);
  transform: translateY(-2px) scale(1.05);
}

.back-to-top-btn:active {
  transform: translateY(0) scale(0.94);
}

.back-to-top-text {
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.2px;
}

/* ==========================================================================
   微信内置浏览器轻量横幅与全屏高质感引导遮罩
   ========================================================================== */
.wechat-top-banner {
  background: #eff6ff;
  border-bottom: 1px solid #dbeafe;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #1e40af;
  position: relative;
  z-index: 101;
}

.wechat-banner-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.wechat-banner-text {
  flex: 1;
  line-height: 1.4;
  font-weight: 500;
}

.wechat-banner-close {
  background: transparent;
  border: none;
  color: #93c5fd;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: 4px;
}

.wechat-banner-close:active {
  background: rgba(30, 64, 175, 0.1);
  color: #1e40af;
}

/* 微信指引遮罩 */
.wechat-guide-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  flex-direction: column;
}

.wechat-guide-mask.active {
  display: flex;
  opacity: 1;
}

/* 右上角指示区 */
.wechat-guide-top {
  position: absolute;
  top: 14px;
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  z-index: 100000;
}

.wechat-guide-arrow-box {
  margin-bottom: 4px;
  padding-right: 6px;
}

.wechat-arrow-svg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  animation: wechatArrowFloat 1.8s ease-in-out infinite;
}

@keyframes wechatArrowFloat {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(4px, -6px);
  }
}

.wechat-guide-instruction {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wechat-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: #f8fafc;
  font-weight: 500;
}

.wechat-step-item .step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wechat-dots-icon {
  font-weight: 900;
  letter-spacing: 2px;
  color: #93c5fd;
}

.step-highlight {
  color: #60a5fa;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 屏幕中央卡片 */
.wechat-guide-card {
  margin: auto 24px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  animation: wechatCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wechatCardPop {
  from {
    transform: scale(0.92) translateY(12px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.wechat-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.wechat-code-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 6px;
}

.wechat-product-name {
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 16px;
}

.wechat-guide-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 22px;
  padding: 0 4px;
}

.wechat-guide-desc strong {
  color: #60a5fa;
  font-weight: 600;
}

.wechat-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wechat-btn-know {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  background: #3b82f6;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wechat-btn-know:active {
  transform: scale(0.96);
  background: #2563eb;
}

.wechat-btn-gateway {
  width: 100%;
  height: 38px;
  border-radius: 19px;
  background: transparent;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wechat-btn-gateway:active {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

/* ========================================================
   账户登录、注册、密保找回与裂变特权体系 (Taste-Skill 规范)
   ======================================================== */

.auth-modal-overlay,
.profile-modal-overlay {
  align-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.auth-dialog,
.profile-dialog,
.quota-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 400px;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    transform: scale(0.95) translateY(8px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* 弹窗头部 */
.auth-dialog-header {
  padding: 18px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.auth-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.auth-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

/* 分段选项卡 (Segmented Control) */
.auth-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 0;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.auth-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 选项卡面板 */
.auth-tab-pane {
  display: none;
  padding: 16px 20px 22px;
}

.auth-tab-pane.active {
  display: block;
}

/* 权益微横幅 */
.auth-benefit-badge {
  background: #fff1f0;
  border: 1px solid rgba(217, 33, 40, 0.18);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #ba121e;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-benefit-badge strong {
  font-weight: 700;
  color: #d92128;
}

.benefit-icon {
  font-size: 15px;
  flex-shrink: 0;
}

/* 表单组件 */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.label-optional {
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
}

.form-link-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}

.phone-input-wrap,
.password-input-wrap,
.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.phone-prefix {
  position: absolute;
  left: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  pointer-events: none;
}

.phone-input-wrap .form-input {
  padding-left: 48px;
}

.form-input,
.form-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.15s ease;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #d92128;
  box-shadow: 0 0 0 3px rgba(217, 33, 40, 0.12);
}

.pwd-toggle-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px 8px;
}

.input-inline-btn {
  position: absolute;
  right: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: none;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.input-inline-btn:hover {
  background: #e2e8f0;
}

.question-display-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #334155;
  font-weight: 500;
}

/* 首次注册展开折叠区 */
.auth-register-extra {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px 12px 14px;
}

.extra-divider {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-align: center;
  padding-bottom: 2px;
}

.invite-code-input {
  letter-spacing: 2px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
}

/* 提交主按钮 */
.auth-submit-btn {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  background: #d92128;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 4px 12px rgba(217, 33, 40, 0.28);
  transition: transform 0.12s ease, background 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.auth-submit-btn:hover {
  background: #b8171d;
}

.auth-submit-btn:active {
  transform: scale(0.98);
}

.auth-safe-note {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  margin-top: 2px;
}

.auth-recover-notice {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ----------------------------------------------------
   个人中心与邀请裂变弹窗 (Profile & Referral Dialog)
   ---------------------------------------------------- */
.profile-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.profile-user-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid #e2e8f0;
}

.user-info-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-phone-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.user-privilege-status .privilege-pill {
  font-size: 12px;
  font-weight: 600;
  color: #d92128;
}

.profile-dialog-body {
  padding: 18px 20px;
  max-height: 68vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 专属邀请码卡片箱 */
.referral-box {
  background: linear-gradient(135deg, #fffbf0 0%, #fff7ed 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.referral-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.referral-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
}

.referral-badge-count {
  font-size: 11.5px;
  font-weight: 600;
  color: #b45309;
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
}

.referral-desc {
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.5;
}

.referral-desc strong {
  color: #b45309;
}

.invite-codes-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invite-code-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.code-meta-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #0f172a;
}

.code-status-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.code-status-tag.active {
  background: #dcfce7;
  color: #15803d;
}

.code-status-tag.used {
  background: #f1f5f9;
  color: #94a3b8;
  text-decoration: line-through;
}

.copy-code-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.copy-code-btn:hover {
  background: #fde68a;
}

.copy-code-btn:active {
  transform: scale(0.95);
}

.copy-code-btn:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

.share-copy-btn {
  height: 40px;
  width: 100%;
  border-radius: 8px;
  background: #f59e0b;
  border: none;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
  transition: background 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.share-copy-btn:hover {
  background: #d97706;
}

.share-copy-btn:active {
  transform: scale(0.98);
}

/* 特权与规则卡片 */
.privilege-rules-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.rules-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.rules-card-list {
  padding-left: 18px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.7;
}

.profile-dialog-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid #f1f5f9;
}

.logout-btn {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.logout-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ----------------------------------------------------
   额度用尽拦截弹窗 (Quota Exhausted Dialog)
   ---------------------------------------------------- */
.quota-dialog {
  padding: 24px 20px 20px;
  text-align: center;
}

.quota-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 26px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.quota-dialog-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.quota-dialog-message {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 20px;
}

.quota-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quota-primary-btn {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  background: #d92128;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(217, 33, 40, 0.28);
  transition: background 0.15s ease;
}

.quota-primary-btn:hover {
  background: #b8171d;
}

.quota-secondary-btn {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
}

/* =========================================================
   四维客观推荐指数与首发/热门分区展示样式
   ========================================================= */

.product-section {
  margin-bottom: 24px;
}

.list-section-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 16px 4px 10px 4px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #edf2f7;
}

.list-section-header .section-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.list-section-header .section-emoji {
  font-size: 16px;
  line-height: 1;
}

.list-section-header .section-main-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.list-section-header .section-pill-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 12px;
  background: #fef2f2;
  color: #ba121e;
  border: 1px solid rgba(186, 18, 30, 0.2);
}

.list-section-header .section-count-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
}

.list-section-header .section-sub-tip {
  font-size: 12px;
  color: #64748b;
  margin-left: 22px;
}

/* 推荐星级徽标 */
.stars-badge {
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
  filter: drop-shadow(0 1px 1px rgba(245, 158, 11, 0.25));
}

/* 推荐总分胶囊 */
.score-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
  letter-spacing: -0.2px;
}

/* 特征标签 */
.score-tag-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}

.score-tag-badge.tag-excess {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.score-tag-badge.tag-solid {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.score-tag-badge.tag-pulse {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.score-tag-badge.tag-dilution {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.score-tag-badge.tag-new {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

/* ========================================================
   顶级导航 Tab (纯文本分段控件 · 严禁 Emoji)
   ======================================================== */
.top-nav-tabs {
  display: flex;
  align-items: center;
  background: #f1f3f5;
  padding: 3px;
  border-radius: 9px;
  margin: 6px 16px 10px;
  position: relative;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.top-nav-tab {
  flex: 1;
  text-align: center;
  padding: 7px 0;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
}

.top-nav-tab.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.top-nav-tab:active {
  transform: scale(0.98);
}

/* 视图面板容器 */
.view-panel {
  width: 100%;
}

.view-panel.active {
  display: block !important;
}

/* ========================================================
   【我的持有】看板样式
   ======================================================== */
.holdings-sticky-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  margin-bottom: 8px;
}

.holdings-sticky-header .holdings-filter-wrapper {
  margin-bottom: 0;
  border-bottom: none;
  padding-top: 2px;
}

.holdings-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 6px;
  position: relative;
}

.holdings-heading {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.2px;
}

/* 用户状态胶囊 (无 emoji，纯 SVG + 精致微标) */
.user-status-capsule {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  background: #f1f5f9;
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  max-width: 140px;
}

.user-status-capsule:active {
  background: #e2e8f0;
  transform: scale(0.97);
}

.user-status-capsule.is-logged-in {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.user-status-svg {
  stroke: currentColor;
  flex-shrink: 0;
}

.user-status-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 齿轮设置按钮 (纯 SVG，高质感) */
.holdings-gear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.holdings-gear-btn:hover {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.holdings-gear-btn:active {
  transform: scale(0.94);
  background: #e2e8f0;
}

.gear-svg {
  stroke: currentColor;
  transition: transform 0.3s ease;
}

.holdings-gear-btn:hover .gear-svg {
  transform: rotate(30deg);
}

/* 统计摘要独立展示行 */
.holdings-summary-banner {
  margin: 0 16px 8px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.4;
}

/* 赎回预警提示条与设置一体化 */
.holdings-threshold-bar {
  margin: 0 16px 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  font-size: 11.5px;
  color: #475569;
}

.threshold-tag-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.threshold-tag-main {
  flex: 1;
  line-height: 1.4;
}

.threshold-tag-main strong {
  color: #0f172a;
  font-weight: 700;
}

.inline-threshold-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.inline-threshold-btn:active {
  background: #eff6ff;
}

/* 演示模式横幅 (未登录假数据提示) */
.demo-mode-banner {
  margin: 0 16px 12px;
  padding: 8px 12px;
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #854d0e;
}

.demo-mode-tag {
  background: #ca8a04;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.demo-mode-tip {
  flex: 1;
  line-height: 1.35;
}

.demo-mode-login-link {
  background: transparent;
  border: none;
  color: #854d0e;
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
  padding: 2px 4px;
  text-decoration: underline;
}

/* 右下角圆形悬浮记一笔持仓按钮 (FAB) */
.fab-add-holding {
  position: fixed;
  right: 20px;
  bottom: 86px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.38), 0 2px 6px rgba(15, 23, 42, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, opacity 0.2s ease;
}

.fab-add-holding:active {
  transform: scale(0.92);
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.3);
}

.fab-add-holding svg {
  stroke: #ffffff;
}

/* 持仓列表卡片 */
.holdings-list {
  padding: 0 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.holding-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.15s ease;
}

.holding-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* 卡片第一行：左侧产品简称，右侧产品代码 (优化项 6) */
.holding-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.holding-short-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.holding-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #eff6ff;
  color: #2563eb;
  padding: 1.5px 6px;
  border-radius: 5px;
  border: 1px solid #dbeafe;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.holding-code-pill:active {
  background: #dbeafe;
  transform: scale(0.97);
}

.holding-code-pill svg {
  stroke: #2563eb;
}

/* 卡片第二行：近7日年化率与近1月年化率同行并列 (优化项 5, 6) */
.holding-card-yield-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}

.yield-stat-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.yield-stat-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.yield-stat-val {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a; /* 正常默认显示黑色 */
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: "tnum";
}

/* 低于阈值标绿，正常纯黑，彻底去红 (优化项 5) */
.yield-stat-val.yield-below {
  color: #16a34a !important;
}

.yield-stat-divider {
  width: 1px;
  height: 12px;
  background: #e2e8f0;
}

/* 多批次购买合并列表容器 (优化项 7) */
.holding-batches-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 单批次左滑删除容器 (优化项 6) */
.batch-swipe-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}

.batch-swipe-action-delete {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 68px;
  background: #ef4444;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  z-index: 1;
  transition: background-color 0.15s ease;
}

.batch-swipe-action-delete:active {
  background: #dc2626;
}

.batch-swipe-content {
  position: relative;
  background: #f8fafc;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  z-index: 2;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  user-select: none;
}

/* 多批次买入/可赎日期左侧精准对齐 (优化项 9) */
.batch-row-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 168px;
  min-width: 168px;
}

.batch-dates {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: "tnum";
}

.batch-arrow {
  color: #94a3b8;
  font-size: 11px;
  margin: 0 1px;
}

.batch-row-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* 统一标签形态：4px 圆角矩形，严格对齐 (优化项 8) */
.rec-badge-rect {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.25;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.rec-badge-rect.rec-hold {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.rec-badge-rect.rec-redeem {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.lock-status-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.25;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.lock-status-badge.unlocked {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.lock-status-badge.locked {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.holding-btn-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.holding-btn-icon:hover, .holding-btn-icon:active {
  background: #e2e8f0;
  color: #475569;
}

.holding-btn-icon.btn-delete:hover, .holding-btn-icon.btn-delete:active {
  background: #fee2e2;
  color: #ef4444;
}

/* 持仓空状态 */
.holdings-empty-state {
  text-align: center;
  padding: 48px 20px 32px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  margin-top: 8px;
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto 18px;
}

.empty-state-add-btn {
  background: #0f172a;
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  transition: all 0.15s ease;
}

.empty-state-add-btn:active {
  background: #1e293b;
}

/* ========================================================
   全市场产品搜索弹窗 (#holdingSearchModal)
   ======================================================== */
.search-modal-dialog {
  background: #ffffff;
  width: 92%;
  max-width: 440px;
  max-height: 82vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.search-dialog-header {
  padding: 16px 16px 10px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.search-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.search-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0 10px;
  height: 40px;
  gap: 8px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
}

.search-input-box:focus-within {
  border-color: #2563eb;
  background: #ffffff;
}

.search-box-icon {
  color: #94a3b8;
  flex-shrink: 0;
}

.search-input-control {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #0f172a;
  outline: none;
}

.search-clear-btn {
  background: #cbd5e1;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-hint-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 8px;
}

.search-results-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-item:hover, .search-result-item:active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.search-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.search-item-code {
  font-size: 11px;
  font-family: monospace;
  color: #2563eb;
  background: #dbeafe;
  padding: 1px 6px;
  border-radius: 4px;
}

.search-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
}

.search-item-yield {
  color: #334155;
  font-weight: 600;
}

/* ========================================================
   持仓录入/编辑弹窗 (#holdingFormModal)
   ======================================================== */
.holding-form-dialog {
  background: #ffffff;
  width: 92%;
  max-width: 420px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.holding-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.holding-form-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.holding-form-body {
  padding: 16px 20px 20px;
}

.holding-product-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.preview-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-short-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}

.preview-code-badge {
  font-size: 11px;
  font-family: monospace;
  background: #e2e8f0;
  color: #334155;
  padding: 1px 6px;
  border-radius: 4px;
}

.preview-sub-row {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-meta-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.preview-tag {
  font-size: 10.5px;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 1px 6px;
  border-radius: 4px;
}

.label-with-tip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.form-tip-text {
  font-size: 10.5px;
  color: #94a3b8;
}

.btn-input-reset {
  background: #f1f5f9;
  color: #2563eb;
  border: 1px solid #dbeafe;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-input-reset:hover {
  background: #eff6ff;
}

.btn-input-reset:active {
  transform: scale(0.95);
}

.label-req {
  color: #ef4444;
}

.form-action-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-form-cancel {
  flex: 1;
  height: 42px;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-form-submit {
  flex: 2;
  height: 42px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
  transition: all 0.15s ease;
}

.btn-form-submit:hover {
  background: #1e293b;
}

.btn-form-submit:active {
  background: #000000;
  transform: scale(0.98);
}

/* ========================================================
   阈值设置弹窗 (#thresholdModal) - 彻底去红 (优化项 10)
   ======================================================== */
.threshold-dialog {
  background: #ffffff;
  width: 90%;
  max-width: 400px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.threshold-dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.threshold-dialog-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.threshold-dialog-body {
  padding: 16px 20px 20px;
}

.threshold-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 16px;
}

.threshold-desc strong {
  color: #0f172a;
}

.threshold-field-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.threshold-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.threshold-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.threshold-input {
  width: 90px;
  height: 38px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.threshold-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.threshold-input-unit {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.threshold-sub-tip {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.threshold-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-threshold-reset {
  flex: 1;
  height: 42px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-threshold-save {
  flex: 2;
  height: 42px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: all 0.15s ease;
}

.btn-threshold-save:hover {
  background: #1e293b;
}

.btn-threshold-save:active {
  background: #000000;
  transform: scale(0.98);
}

/* ========================================================
   页面全局留白：确保底部悬浮胶囊不遮挡任何内容
   ======================================================== */
body {
  padding-bottom: 96px !important;
}

/* ========================================================
   底部悬浮药丸主导航栏 (.floating-capsule-nav)
   参考美团风格：更大字号、白底选中、柔和投影、通透毛玻璃 (优化项 1)
   ======================================================== */
.floating-capsule-nav {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 16px 42px -6px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(0, 0, 0, 0.04);
  user-select: none;
  -webkit-user-select: none;
}

.capsule-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 28px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.capsule-nav-item:active {
  transform: scale(0.96);
}

.capsule-nav-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  flex-shrink: 0;
  transition: stroke 0.2s ease;
}

/* 选中高亮态：纯白底色 + 饱满投影 + 深色粗体字 (1:1 参考美团) */
.capsule-nav-item.active {
  background: #ffffff !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

.capsule-nav-item.active .capsule-nav-icon {
  stroke: #0f172a !important;
}

/* 持仓筛选栏容器 (100% 对齐雷达页 渠道/类别 样式) */
.holdings-filter-wrapper {
  background: #ffffff;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.holdings-empty-filtered {
  text-align: center;
  padding: 36px 16px;
  font-size: 13px;
  color: #94a3b8;
  background: #ffffff;
  border-radius: 12px;
  border: 1px dashed #e2e8f0;
  margin: 12px 16px;
}

/* ========================================================
   全市场搜索弹窗防键盘遮挡：居上偏顶显示
   ======================================================== */
#holdingSearchModal.modal-overlay {
  align-items: flex-start !important;
  padding-top: 5vh !important;
}

#holdingSearchModal .search-modal-dialog {
  max-height: 68vh !important;
}

@media (max-width: 480px) {
  #holdingSearchModal.modal-overlay {
    padding-top: 15px !important;
  }
}

/* ========================================================
   自定义精美 iOS 风格日历弹窗 (#customCalendarModal)
   1:1 复刻 iOS 原生浮层：纯白圆角、左下角回到今天、右下角确定、超限精准置灰
   ======================================================== */
.custom-date-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.custom-date-input {
  cursor: pointer !important;
  background-color: #ffffff !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  color: #0f172a;
}

.date-calendar-icon {
  position: absolute;
  right: 12px;
  color: #64748b;
  pointer-events: none;
}

.calendar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1050; /* 悬浮在持仓表单模态框 (999) 之上 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: calFadeIn 0.18s ease-out;
}

@keyframes calFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.calendar-card {
  background: #ffffff;
  width: 100%;
  max-width: 324px;
  border-radius: 20px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.28), 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: calPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
}

@keyframes calPopIn {
  from { transform: scale(0.93); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px 4px;
}

.calendar-month-year {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.calendar-nav-arrows {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-nav-btn:hover {
  background: #e2e8f0;
}

.cal-nav-btn:active {
  transform: scale(0.92);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  padding: 4px 0 2px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  row-gap: 5px;
}

.cal-day-cell {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14.5px;
  font-weight: 500;
  color: #0f172a;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.cal-day-cell:hover:not(.disabled):not(.selected) {
  background: #f1f5f9;
}

.cal-day-cell:active:not(.disabled) {
  transform: scale(0.92);
}

/* 选中高亮态：1:1 复刻 iOS 蓝圈白字 */
.cal-day-cell.selected {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.32);
}

/* 今天指示标记 (若未被选中) */
.cal-day-cell.is-today:not(.selected) {
  border: 1.5px solid #2563eb;
  color: #2563eb;
  font-weight: 700;
}

/* 超限置灰禁用态 (严格不可点击) */
.cal-day-cell.disabled {
  color: #cbd5e1 !important;
  opacity: 0.38 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* 空白单元格 */
.cal-day-cell.empty {
  cursor: default;
  pointer-events: none;
}

.calendar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
}

/* 底部左侧：回到今天胶囊按钮 (替代 Reset) */
.btn-cal-today {
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cal-today:hover {
  background: #e2e8f0;
}

.btn-cal-today:active {
  transform: scale(0.95);
}

/* 底部右侧：确定胶囊按钮 (仅文字无对勾) */
.btn-cal-confirm {
  background: #2563eb;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 22px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  transition: all 0.15s ease;
}

.btn-cal-confirm:hover {
  background: #1d4ed8;
}

.btn-cal-confirm:active {
  background: #1e40af;
  transform: scale(0.96);
}

/* ========================================================
   设置与账号管理独立全屏抽屉 (严格裁切于480px视口，杜绝大屏右侧露馅)
   ======================================================== */
.settings-drawer-wrapper {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100%;
  overflow: hidden; /* 核心：超出 480px 容器右边缘的一切物体被物理裁切，绝无露馅 */
  z-index: 9999;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.28s;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
}

.settings-drawer-wrapper.active {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

.settings-view-panel {
  width: 100%;
  height: 100%;
  background-color: #f6f7f9;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 40px;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.settings-drawer-wrapper.active .settings-view-panel {
  transform: translate3d(0, 0, 0);
}

/* 顶栏：左侧带 < 返回，中间居中标题“设置” */
.settings-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.settings-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: #1e293b;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  margin-left: -6px;
  transition: all 0.15s ease;
}

.settings-back-btn:active {
  background: #f1f5f9;
  transform: scale(0.92);
}

.settings-page-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.settings-header-right-placeholder {
  width: 36px;
  height: 36px;
}

/* 页面内容区域 */
.settings-page-body {
  padding: 16px 16px 40px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-group-title {
  font-size: 13px;
  font-weight: 500;
  color: #8c939d;
  padding-left: 6px;
}

.settings-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
  overflow: hidden;
}

/* 单元行结构 (1:1对齐参考图：左侧图标+文字，右侧信息+小箭头 >) */
.settings-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  cursor: pointer;
  background: #ffffff;
  transition: background 0.15s ease;
  user-select: none;
}

.settings-nav-item + .settings-nav-item {
  border-top: 1px solid #f3f4f6;
}

.settings-nav-item:active {
  background: #f8fafc;
}

.settings-nav-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-item-icon {
  stroke: #475569;
  flex-shrink: 0;
}

.settings-nav-label {
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
  letter-spacing: -0.1px;
}

.settings-nav-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-nav-meta {
  font-size: 13px;
  color: #8c939d;
  font-weight: 400;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-arrow-icon {
  stroke: #c4c9d2;
  flex-shrink: 0;
}

.settings-status-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2.5px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.settings-status-pill.pill-active {
  background: #f0fdf4;
  color: #166534;
}

.settings-version-tag {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
}

/* 底部操作区 (退出登录 & 注销账号) */
.settings-actions-group {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-page-logout-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
  transition: all 0.15s ease;
}

.settings-page-logout-btn:active {
  background: #f8fafc;
  transform: scale(0.98);
}

.settings-delete-account-btn {
  background: transparent;
  border: none;
  color: #dc2626;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  text-align: center;
  transition: opacity 0.15s ease;
}

.settings-delete-account-btn:hover {
  text-decoration: underline;
}

.settings-delete-account-btn:active {
  opacity: 0.6;
}

.settings-delete-account-btn:active {
  opacity: 0.6;
}

/* 注销二次确认模态弹窗 */
.confirm-dialog {
  background: #ffffff;
  border-radius: 16px;
  width: 88%;
  max-width: 360px;
  padding: 20px 20px 16px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: settingsModalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.confirm-dialog-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.confirm-dialog-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.confirm-btn-danger {
  flex: 1;
  height: 38px;
  border-radius: 8px;
  background: #dc2626;
  color: #ffffff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.confirm-btn-danger:active {
  background: #b91c1c;
}

.confirm-btn-cancel {
  flex: 1;
  height: 38px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.confirm-btn-cancel:active {
  background: #e2e8f0;
}
