/*
 * M4-B-R2-FG — 剩余 PARTIAL 页面族 Light 集中收口
 * Scope: html[data-theme="light"] only
 * 覆盖：Mood(m3g-mood) · Auth(m3g-auth) · BidSnap · Admin(sf-admin-shell) · Market News
 * Overnight 人格补丁在 overnight.css（暖色研究台，不走冷灰蓝）
 * 冻结：业务涨跌/热度/状态语义色 · Recording 不碰 · Global 正文字 token 不改
 */

/* ========== Mood family: sector / market emotion / limit-ladder ========== */
html[data-theme="light"] body.m3g-mood .desc,
html[data-theme="light"] body.m3g-mood .tip,
html[data-theme="light"] body.m3g-mood .meta,
html[data-theme="light"] body.m3g-mood .stat-label,
html[data-theme="light"] body.m3g-mood .panel-title span,
html[data-theme="light"] body.m3g-mood .loading,
html[data-theme="light"] body.m3g-mood .empty,
html[data-theme="light"] body.m3g-mood .label {
  color: var(--color-text-muted);
  opacity: 1;
}
html[data-theme="light"] body.m3g-mood .name,
html[data-theme="light"] body.m3g-mood h1,
html[data-theme="light"] body.m3g-mood .panel-title,
html[data-theme="light"] body.m3g-mood .stat-value,
html[data-theme="light"] body.m3g-mood .count,
html[data-theme="light"] body.m3g-mood .num {
  color: var(--color-text-primary);
  opacity: 1;
}
html[data-theme="light"] body.m3g-mood .count small,
html[data-theme="light"] body.m3g-mood .rank,
html[data-theme="light"] body.m3g-mood .rank-num,
html[data-theme="light"] body.m3g-mood .rank-badge {
  color: var(--color-text-secondary);
  opacity: 1;
  font-weight: 800;
}
/* 排名圆：浅底深字，禁止浅圆白字 */
html[data-theme="light"] body.m3g-mood .rank-circle,
html[data-theme="light"] body.m3g-mood .ord,
html[data-theme="light"] body.m3g-mood .idx,
html[data-theme="light"] body.m3g-mood .rank {
  color: var(--color-text-primary);
  opacity: 1;
  font-weight: 900;
}
html[data-theme="light"] body.m3g-mood .rank.top1 {
  color: #7a3e00;
  background: rgba(255, 148, 24, 0.28);
  border: 1px solid rgba(230, 122, 24, 0.45);
}
html[data-theme="light"] body.m3g-mood .rank:not(.top1) {
  color: #0f5c3a;
  background: rgba(67, 200, 137, 0.2);
  border: 1px solid rgba(45, 160, 110, 0.35);
}
html[data-theme="light"] body.m3g-mood .item,
html[data-theme="light"] body.m3g-mood .list-row,
html[data-theme="light"] body.m3g-mood .rank-row,
html[data-theme="light"] body.m3g-mood .sector-row,
html[data-theme="light"] body.m3g-mood .mood-row {
  border-bottom: 1px solid rgba(70, 110, 160, 0.28);
  color: var(--color-text-body);
}
html[data-theme="light"] body.m3g-mood .item .meta,
html[data-theme="light"] body.m3g-mood .item .stocks,
html[data-theme="light"] body.m3g-mood .item .names {
  color: var(--color-text-secondary);
  opacity: 1;
}
html[data-theme="light"] body.m3g-mood .item:hover,
html[data-theme="light"] body.m3g-mood .list-row:hover {
  background: rgba(37, 99, 235, 0.05);
}
html[data-theme="light"] body.m3g-mood .bars {
  border-color: var(--color-border-subtle);
}
html[data-theme="light"] body.m3g-mood .bar {
  border-color: var(--color-border-subtle);
}
/* Limit ladder */
html[data-theme="light"] body.m3g-mood .level,
html[data-theme="light"] body.m3g-mood .ladder .level {
  background: var(--color-bg-panel);
  border-color: var(--color-border-card);
}
html[data-theme="light"] body.m3g-mood .level-head,
html[data-theme="light"] body.m3g-mood .level-title {
  color: var(--color-text-primary);
  border-bottom-color: var(--color-border-subtle);
}
html[data-theme="light"] body.m3g-mood .level-count {
  color: var(--color-text-secondary);
}
html[data-theme="light"] body.m3g-mood .stock,
html[data-theme="light"] body.m3g-mood .stock-name {
  color: var(--color-text-primary);
}
html[data-theme="light"] body.m3g-mood .stock-code,
html[data-theme="light"] body.m3g-mood .stock-meta {
  color: var(--color-text-secondary);
  opacity: 1;
}

/* ========== Auth: register / change-password ========== */
html[data-theme="light"] body.m3g-auth .agree-row a,
html[data-theme="light"] body.m3g-auth .links a {
  color: var(--color-interactive-primary);
}
html[data-theme="light"] body.m3g-auth button,
html[data-theme="light"] body.m3g-auth .btn:not(.secondary):not(.danger) {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: transparent;
  font-weight: 800;
}
html[data-theme="light"] body.m3g-auth .secondary,
html[data-theme="light"] body.m3g-auth button.secondary {
  color: var(--color-text-primary);
  background: var(--color-bg-control);
  border: 1px solid var(--color-border-control);
}
html[data-theme="light"] body.m3g-auth .field label {
  color: var(--color-text-secondary);
  opacity: 1;
}
html[data-theme="light"] body.m3g-auth input {
  color: var(--color-text-primary);
  background: var(--color-bg-inset);
  border-color: var(--color-border-control);
}
html[data-theme="light"] body.m3g-auth input::placeholder {
  color: var(--color-text-disabled);
  opacity: 1;
}
html[data-theme="light"] body.m3g-auth .notice,
html[data-theme="light"] body.m3g-auth .err,
html[data-theme="light"] body.m3g-auth .error {
  color: #b91c1c;
}
html[data-theme="light"] body.m3g-auth .ok,
html[data-theme="light"] body.m3g-auth .success {
  color: #047857;
}

/* ========== BidSnap ========== */
html[data-theme="light"] body.has-desktop-shell .page-title,
html[data-theme="light"] .bid-snap .page-title {
  color: var(--color-text-primary);
}
html[data-theme="light"] .status-banner .banner-sub,
html[data-theme="light"] .data-notice,
html[data-theme="light"] .filter-label {
  color: var(--color-text-muted);
  opacity: 1;
}
html[data-theme="light"] .data-notice em {
  color: var(--color-interactive-primary);
  font-style: normal;
}
html[data-theme="light"] .tag-new {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
html[data-theme="light"] .tag-st {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}
html[data-theme="light"] .tag-limit-up {
  background: rgba(255, 59, 48, 0.12);
  color: #b91c1c;
}
html[data-theme="light"] .stock-table th {
  color: var(--color-text-secondary);
  background: var(--color-bg-elevated-soft);
}
html[data-theme="light"] .stock-table td {
  color: var(--color-text-body);
}
html[data-theme="light"] .stock-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.05);
}
html[data-theme="light"] .group-card {
  background: var(--color-bg-panel);
  border-color: var(--color-border-card);
}
html[data-theme="light"] .group-card.active {
  border-color: #2563eb;
  box-shadow: inset 3px 0 0 #2563eb;
  background: rgba(37, 99, 235, 0.06);
}
html[data-theme="light"] .stock-table.mock-table tbody tr,
html[data-theme="light"] .group-card.mock-group {
  opacity: 1;
  color: var(--color-text-secondary);
}
html[data-theme="light"] .filter-select,
html[data-theme="light"] select.filter-select {
  color: var(--color-text-primary);
  background: var(--color-bg-control);
  border-color: var(--color-border-control);
}

/* ========== Market News ========== */
html[data-theme="light"] .cat-chip {
  color: var(--color-text-secondary);
  background: var(--mn-chip-bg, var(--color-bg-control));
  border-color: var(--mn-chip-border, var(--color-border-control));
  opacity: 1;
}
html[data-theme="light"] .cat-chip.active,
html[data-theme="light"] .cat-chip[aria-selected="true"] {
  color: var(--mn-chip-active-text, #1d4ed8);
  background: var(--mn-chip-active-bg, rgba(37, 99, 235, 0.16));
  border-color: var(--mn-chip-active-border, #2563eb);
  font-weight: 800;
}
html[data-theme="light"] .news-card,
html[data-theme="light"] .mn-card,
html[data-theme="light"] article.card {
  background: var(--mn-card, var(--color-bg-panel));
  border-color: var(--color-border-card);
  box-shadow: var(--shadow-panel);
}
html[data-theme="light"] .news-title,
html[data-theme="light"] .mn-title {
  color: var(--mn-title, var(--color-text-primary));
}
html[data-theme="light"] .news-summary,
html[data-theme="light"] .mn-body,
html[data-theme="light"] .news-meta,
html[data-theme="light"] .source,
html[data-theme="light"] .news-time {
  color: var(--color-text-muted);
  opacity: 1;
}
html[data-theme="light"] .news-card:hover {
  border-color: var(--color-border-selected);
  background: var(--color-bg-panel-2, var(--color-bg-panel));
}

/* ========== Admin shell deepen ========== */
html[data-theme="light"] body.sf-admin-shell .hint,
html[data-theme="light"] body.sf-admin-shell .muted,
html[data-theme="light"] body.sf-admin-shell .sub,
html[data-theme="light"] body.sf-admin-shell .meta {
  color: var(--color-text-muted);
  opacity: 1;
}
html[data-theme="light"] body.sf-admin-shell th {
  color: var(--color-text-secondary);
  background: var(--color-bg-elevated-soft);
  font-weight: 800;
}
html[data-theme="light"] body.sf-admin-shell td {
  color: var(--color-text-body);
}
html[data-theme="light"] body.sf-admin-shell tbody tr:hover td {
  background: rgba(37, 99, 235, 0.04);
}
html[data-theme="light"] body.sf-admin-shell .btn.secondary,
html[data-theme="light"] body.sf-admin-shell button.secondary,
html[data-theme="light"] body.sf-admin-shell .small.secondary {
  background: var(--color-bg-control);
  border: 1px solid var(--color-border-control);
  color: var(--color-text-primary);
}
html[data-theme="light"] body.sf-admin-shell .btn.secondary:hover,
html[data-theme="light"] body.sf-admin-shell button.secondary:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--color-border-selected);
}
/* Inline Dark label leftovers — must beat style="" */
html[data-theme="light"] body.sf-admin-shell label[style*="rgba(255,255,255"],
html[data-theme="light"] body.sf-admin-shell label[style*="rgba(255, 255, 255"],
html[data-theme="light"] body.sf-admin-shell span[style*="rgba(255,255,255"],
html[data-theme="light"] body.sf-admin-shell div[style*="rgba(255,255,255"],
html[data-theme="light"] body.sf-admin-shell p[style*="rgba(255,255,255"] {
  color: var(--color-text-muted) !important; /* necessary: inline style beats classes */
}
html[data-theme="light"] body.sf-admin-shell .pagination a,
html[data-theme="light"] body.sf-admin-shell .pager a,
html[data-theme="light"] body.sf-admin-shell .page-btn {
  color: var(--color-text-primary);
  background: var(--color-bg-control);
  border-color: var(--color-border-control);
}
html[data-theme="light"] body.sf-admin-shell .pagination .active,
html[data-theme="light"] body.sf-admin-shell .pager .active {
  color: #1e3a8a;
  background: rgba(37, 99, 235, 0.14);
  border-color: #2563eb;
}
html[data-theme="light"] body.sf-admin-shell .empty,
html[data-theme="light"] body.sf-admin-shell .empty-state {
  color: var(--color-text-muted);
}

/* Admin 卡片/表单再加深一层，避免“背景变白就算完” */
html[data-theme="light"] body.sf-admin-shell .card,
html[data-theme="light"] body.sf-admin-shell .perm-box,
html[data-theme="light"] body.sf-admin-shell .stat {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border-card);
  box-shadow: var(--shadow-panel);
}
html[data-theme="light"] body.sf-admin-shell .card-title,
html[data-theme="light"] body.sf-admin-shell h2,
html[data-theme="light"] body.sf-admin-shell h3 {
  color: var(--color-text-primary);
}
html[data-theme="light"] body.sf-admin-shell table {
  border-color: var(--color-border-subtle);
}
html[data-theme="light"] body.sf-admin-shell .badge,
html[data-theme="light"] body.sf-admin-shell .status-pill {
  opacity: 1;
}
html[data-theme="light"] body.sf-admin-shell a:not(.btn):not(.back):not(.logout) {
  color: var(--color-interactive-primary);
}

/* ========== Overnight 暖色研究台：只补可读性，不改人格 ========== */
html[data-theme="light"] [data-testid="overnight-root"] .eyebrow,
html[data-theme="light"] [data-testid="overnight-root"] .cell-label,
html[data-theme="light"] [data-testid="overnight-root"] .metric-dim,
html[data-theme="light"] [data-testid="overnight-root"] .hint,
html[data-theme="light"] [data-testid="overnight-root"] .sub {
  color: #62564a;
  opacity: 1;
}
html[data-theme="light"] [data-testid="overnight-root"] .primary-tab,
html[data-theme="light"] [data-testid="overnight-root"] .subtab {
  color: #5c4a3a;
  opacity: 1;
}
html[data-theme="light"] [data-testid="overnight-root"] .primary-tab.active,
html[data-theme="light"] [data-testid="overnight-root"] .subtab.active {
  color: #160a00;
  font-weight: 850;
}

