/* 道元易学 · 深色主题独立样式
   独立文件原因: App.vue 全局样式打包进 index.css 后规则数超13万,
   超出 Chromium 规则上限 (~131072), 末尾规则被浏览器丢弃, 深色一直不生效。
   独立 link 加载即可避开该限制。 */

/* 深色主题 (跟随系统/手动切换, H5/App) */
[data-theme='dark'] {
  --dy-page: #1c1712;      /* 深墨底 */
  --dy-card: #2a231c;      /* 深色卡片 */
  --dy-soft: #342b21;      /* 深色浅底 */
  --dy-text: #e9dfcd;      /* 米白主文字 */
  --dy-sub: #b0a18d;       /* 次级文字 */
  --dy-faint: #7d6f5e;     /* 浅文字 */
  --dy-line: #3b332a;      /* 深边框 */
  --dy-mask: rgba(42, 35, 28, 0.6);
}
[data-theme='dark'] page {
  --dy-page: #1c1712;
  --dy-card: #2a231c;
  --dy-soft: #342b21;
  --dy-text: #e9dfcd;
  --dy-sub: #b0a18d;
  --dy-faint: #7d6f5e;
  --dy-line: #3b332a;
  --dy-mask: rgba(42, 35, 28, 0.6);

  background-color: #1c1712 !important;
  color: #e9dfcd !important;
}

[data-theme='dark'] uni-page-body,
[data-theme='dark'] uni-page-head {
  background-color: #1c1712 !important;
}
/* App 端 WebView: body/uni-app 容器背景兜底 */
[data-theme='dark'] body,
[data-theme='dark'] uni-app,
[data-theme='dark'] uni-page {
  background-color: #1c1712 !important;
}

/* 深色: uview 弹窗/动作面板 + tabbar 适配 */
[data-theme='dark'] .u-popup__content,
[data-theme='dark'] .u-popup__content--bottom,
[data-theme='dark'] .u-popup__content--top,
[data-theme='dark'] .u-action-sheet__body,
[data-theme='dark'] .u-picker__content {
  background-color: #2a231c !important;
  color: #e9dfcd !important;
}
[data-theme='dark'] .uni-tabbar,
[data-theme='dark'] .uni-tabbar__border,
[data-theme='dark'] .uni-tabbar__item {
  background-color: #2a231c !important;
  border-color: #3b332a !important;
}
[data-theme='dark'] .uni-tabbar__label {
  color: #b0a18d !important;
}
[data-theme='dark'] .uni-tabbar__label.uni-tabbar__label--active {
  color: #e9dfcd !important;
}

/* ==================== 深色主题全局覆盖 ====================
   v1.8.6 回归硬编码后, 页面内色值写死, 深色需按类名覆盖:
   所有页面根容器均以 -page 结尾 + admin 后台根 .admin-dash */
[data-theme='dark'] [class$='-page'],
[data-theme='dark'] .admin-dash {
  background-color: #1c1712 !important;
}
/* 深色: 卡片/面板/表格容器 (背景 + 边框) */
[data-theme='dark'] .panel,
[data-theme='dark'] .card,
[data-theme='dark'] .pp-block,
[data-theme='dark'] .pp-grid,
[data-theme='dark'] .tool-panel,
[data-theme='dark'] .asset-card,
[data-theme='dark'] .order-card,
[data-theme='dark'] .product-card,
[data-theme='dark'] .course-card,
[data-theme='dark'] .jp-block,
[data-theme='dark'] .br-cell,
[data-theme='dark'] .ly-lines,
[data-theme='dark'] .lr-col,
[data-theme='dark'] .zw-cell,
[data-theme='dark'] .qm-cell,
[data-theme='dark'] .form-sheet,
[data-theme='dark'] .hist-item,
[data-theme='dark'] .pp-dy-item,
[data-theme='dark'] .pp-expand,
[data-theme='dark'] .pp-ln-box,
[data-theme='dark'] .wz-ln-box,
[data-theme='dark'] .cate-side,
[data-theme='dark'] .msg-item,
[data-theme='dark'] .coupon-card,
[data-theme='dark'] .pf-avatar-img {
  background-color: #2a231c !important;
  border-color: #3b332a !important;
}
/* 深色: 通用浅底容器 */
[data-theme='dark'] .tp-picker,
[data-theme='dark'] .tp-gz-input-row,
[data-theme='dark'] .tp-gz-drop,
[data-theme='dark'] .pp-cell.pp-label,
[data-theme='dark'] .pp-head .pp-cell,
[data-theme='dark'] .jp-block-head,
[data-theme='dark'] .wz-meta,
[data-theme='dark'] .wz-canggan,
[data-theme='dark'] .wz-col,
[data-theme='dark'] .f-input,
[data-theme='dark'] .invite-link,
[data-theme='dark'] .tg,
[data-theme='dark'] .tsg,
[data-theme='dark'] .pp-tab {
  background-color: #342b21 !important;
  border-color: #3b332a !important;
}
/* 深色: 表格行/列分隔线 */
[data-theme='dark'] .pp-row,
[data-theme='dark'] .pp-cell,
[data-theme='dark'] .pp-block-head,
[data-theme='dark'] .panel-head,
[data-theme='dark'] .menu-item,
[data-theme='dark'] .entry-item {
  border-color: #3b332a !important;
}
/* 深色: 主文字 */
[data-theme='dark'] .panel-title,
[data-theme='dark'] .pp-dy-gan,
[data-theme='dark'] .pp-dy-zhi,
[data-theme='dark'] .tp-picker,
[data-theme='dark'] .f-input,
[data-theme='dark'] .tg,
[data-theme='dark'] .tsg,
[data-theme='dark'] .pp-tab,
[data-theme='dark'] .cell-value,
[data-theme='dark'] .sheet-title,
[data-theme='dark'] .hist-gz,
[data-theme='dark'] .pp-block-head,
[data-theme='dark'] .wz-col,
[data-theme='dark'] .jp-block-name {
  color: #e9dfcd !important;
}
/* 深色: 次级文字 */
[data-theme='dark'] .panel-more,
[data-theme='dark'] .entry-label,
[data-theme='dark'] .pp-ss,
[data-theme='dark'] .pp-mv,
[data-theme='dark'] .tp-label,
[data-theme='dark'] .cell-label,
[data-theme='dark'] .tp-title,
[data-theme='dark'] .br-k,
[data-theme='dark'] .hist-time,
[data-theme='dark'] .hist-label,
[data-theme='dark'] .menu-label,
[data-theme='dark'] .pp-expand-head,
[data-theme='dark'] .jp-free-tag,
[data-theme='dark'] .jp-paid-tag,
[data-theme='dark'] .ly-idx,
[data-theme='dark'] .wz-ny,
[data-theme='dark'] .wz-zs {
  color: #b0a18d !important;
}
/* 深色: 弹窗内输入/选择底色 */
[data-theme='dark'] .f-row input,
[data-theme='dark'] .tp-picker text {
  color: #e9dfcd !important;
}
/* 深色: 选中态保留高亮 (不被上面的容器覆盖盖掉) */
[data-theme='dark'] .pp-tab.on,
[data-theme='dark'] .tg.on,
[data-theme='dark'] .tsg.on {
  background-color: #8c5a2b !important;
  border-color: #8c5a2b !important;
  color: #fefbf6 !important;
}
[data-theme='dark'] .pp-dy-item.on {
  border-color: #8c5a2b !important;
  box-shadow: 0 0 0 2rpx rgba(140, 90, 43, 0.3);
}
