/* G · Glassmorphism. Visual-only layer; shared business DOM and behavior remain unchanged. */

html[data-ui-style="glass"] body:not(.login-active) {
  --glass-deep: #0b1f4a;
  --glass-blue: #4389f5;
  --glass-purple: #8b78f6;
  --glass-pink: #f2a7ba;
  --glass-accent: #76a8ff;
  --glass-text: #f7faff;
  --glass-muted: #d7e3f7;
  --glass-quiet: #a9bddc;
  --glass-line: rgba(215, 227, 247, .25);
  --glass-line-strong: rgba(215, 227, 247, .42);
  --glass-surface: rgba(18, 45, 91, .68);
  --glass-surface-raised: rgba(23, 54, 105, .78);
  --glass-reading: rgba(11, 31, 74, .94);
  --brand: #c5dbff;
  --brand-hover: #9fc3ff;
  --brand-soft: rgba(118, 168, 255, .18);
  --bg: #0b1f4a;
  --panel: rgba(18, 45, 91, .78);
  --panel-subtle: rgba(35, 70, 125, .68);
  --line: rgba(215, 227, 247, .25);
  --line-soft: rgba(215, 227, 247, .16);
  --line-strong: rgba(215, 227, 247, .42);
  --text: #f7faff;
  --muted: #d7e3f7;
  --hover: rgba(118, 168, 255, .16);
  --ui-brand: #c5dbff;
  --ui-brand-hover: #9fc3ff;
  --ui-brand-soft: rgba(118, 168, 255, .18);
  --ui-bg: #0b1f4a;
  --ui-surface: rgba(18, 45, 91, .78);
  --ui-surface-muted: rgba(35, 70, 125, .68);
  --ui-surface-raised: rgba(23, 54, 105, .84);
  --ui-surface-soft: rgba(118, 168, 255, .13);
  --ui-text: #f7faff;
  --ui-text-secondary: #d7e3f7;
  --ui-text-tertiary: #b9c9e3;
  --ui-text-inverse: #0b1f4a;
  --ui-line: rgba(215, 227, 247, .25);
  --ui-line-strong: rgba(215, 227, 247, .42);
  --ui-success: #85e5c1;
  --ui-success-soft: rgba(61, 163, 126, .2);
  --ui-warning: #ffd08a;
  --ui-warning-soft: rgba(211, 145, 49, .2);
  --ui-danger: #ffabbc;
  /* 深色主题「加深一档」方向相反：必须仍是浅色，否则压不亮深底 */
  --ui-danger-strong: #ffc2ce;
  --ui-danger-soft: rgba(202, 70, 98, .22);
  --ok: #a5f0d2;
  --warn: #ffd08a;
  /* 同 --ui-danger-strong：深色主题的「更强警示文字色」要更浅，不能回退到基础层深橙 */
  --warn-strong: #ffdca8;
  --purple: #d3c5ff;
  /* 前景色改为浅色后必须同步改底色，否则浅字压浅底（基础层 --*-bg 是给亮色主题用的）。
     --danger 基础层是深红 #c2413a，压深底只有 2.57:1，因此必须与 -bg 成对一起改。
     参考 nocturne 的成对覆盖做法。 */
  --danger: #ffabbc;
  --ok-bg: rgba(23, 78, 62, .82);
  --warn-bg: rgba(92, 62, 20, .82);
  --danger-bg: rgba(94, 30, 46, .82);
  --purple-bg: rgba(60, 48, 104, .82);
  --ui-focus: #76a8ff;
  --ui-overlay: rgba(4, 15, 39, .72);
  --ui-radius-sm: 8px;
  --ui-radius: 12px;
  --ui-radius-lg: 18px;
  --ui-shadow-card: 0 16px 42px rgba(4, 15, 39, .22), inset 0 1px rgba(255, 255, 255, .1);
  --ui-shadow-panel: 0 30px 90px rgba(4, 15, 39, .48), inset 0 1px rgba(255, 255, 255, .12);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 8% 10%, rgba(67, 137, 245, .76), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(139, 120, 246, .7), transparent 36%),
    radial-gradient(circle at 68% 96%, rgba(242, 167, 186, .38), transparent 32%),
    linear-gradient(145deg, #0b1f4a 0%, #173d75 52%, #243b78 100%);
  color: var(--glass-text);
  font-family: var(--theme-ui-font);
}

html[data-ui-style="glass"] body:not(.login-active)::before,
html[data-ui-style="glass"] body:not(.login-active)::after {
  position: fixed;
  z-index: -1;
  width: 34vw;
  height: 34vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  content: "";
}

html[data-ui-style="glass"] body:not(.login-active)::before { top: -16vw; left: 20vw; background: rgba(67, 137, 245, .28); }
html[data-ui-style="glass"] body:not(.login-active)::after { right: -12vw; bottom: -18vw; background: rgba(242, 167, 186, .2); animation-delay: -7s; }

html[data-ui-style="glass"] body:not(.login-active) :is(.app-shell, .workspace, .today-page, .overview-page, .report-page, .data-center-page) {
  background: transparent;
}

html[data-ui-style="glass"] body:not(.login-active) :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--glass-accent);
  outline-offset: 2px;
}

html[data-ui-style="glass"] body:not(.login-active) ::selection { background: var(--glass-accent); color: var(--glass-deep); }

html[data-ui-style="glass"] body:not(.login-active) :is(.sidebar, .desktop-topbar, .sidebar-footer, .account-menu, .dialog-card, .drawer-panel) {
  border-color: var(--glass-line);
  background: var(--glass-surface);
  box-shadow: var(--ui-shadow-card);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  backdrop-filter: blur(24px) saturate(135%);
}

html[data-ui-style="glass"] body:not(.login-active) .preferences-dialog { overflow-y: auto; }

html[data-ui-style="glass"] body:not(.login-active) .sidebar { border-right: 1px solid var(--glass-line); }
html[data-ui-style="glass"] body:not(.login-active) .brand { border-bottom: 1px solid var(--glass-line); background: rgba(11, 31, 74, .36); }
html[data-ui-style="glass"] body:not(.login-active) .brand-mark { border: 1px solid rgba(255, 255, 255, .28); background: linear-gradient(135deg, #76a8ff, #8b78f6); color: #f7faff; box-shadow: 0 10px 24px rgba(11, 31, 74, .3), inset 0 1px rgba(255, 255, 255, .35); }
html[data-ui-style="glass"] body:not(.login-active) :is(
  .brand-title, .workspace-head h1, .page-header h1, .panel-title, .dialog-title,
  .overview-block-title, .report-panel-title, .detail-title, .table-panel-title,
  .today-section-title, .report-section-title, .today-context-title
) { color: var(--glass-text); }
html[data-ui-style="glass"] body:not(.login-active) :is(
  .brand-subtitle, .sidebar-nav-group h2, .status-meta, .page-subtitle, .workspace-head p,
  .panel-subtitle, .report-panel-subtitle, .row-meta, .cell-secondary, .field-hint,
  .empty-state, .today-action-meta, .today-action-reason, .overview-panel-subtitle,
  .today-context-kicker, .today-context-copy, .topbar-sync-status
) { color: var(--glass-muted); }

html[data-ui-style="glass"] body:not(.login-active) :is(.row-title, .table-row-title) { color: #ffffff; }
html[data-ui-style="glass"] body:not(.login-active) .row-sub { color: #f7faff; }
html[data-ui-style="glass"] body:not(.login-active) .today-schedule-row strong { color: var(--glass-text); }

html[data-ui-style="glass"] body:not(.login-active) .sidebar-nav .nav-item {
  border: 1px solid transparent;
  background: transparent;
  color: var(--glass-muted);
}

html[data-ui-style="glass"] body:not(.login-active) .sidebar-nav .nav-item:hover { border-color: var(--glass-line); background: rgba(255, 255, 255, .08); color: var(--glass-text); }
html[data-ui-style="glass"] body:not(.login-active) .sidebar-nav .nav-item.active { border-color: rgba(118, 168, 255, .54); background: linear-gradient(105deg, rgba(118, 168, 255, .28), rgba(139, 120, 246, .16)); color: var(--glass-text); box-shadow: inset 3px 0 var(--glass-accent); }
html[data-ui-style="glass"] body:not(.login-active) :is(.metric-value, .nav-count, time) { font-variant-numeric: tabular-nums; }
html[data-ui-style="glass"] body:not(.login-active) .sidebar-nav .nav-count { border-color: var(--glass-line); background: rgba(11, 31, 74, .28); color: var(--glass-muted); }

html[data-ui-style="glass"] body:not(.login-active) :is(.global-search-button, .account-button, .account-menu-button, .icon-button, .sidebar-toggle, .secondary-button, .ghost-button) {
  border-color: var(--glass-line);
  background: rgba(247, 250, 255, .08);
  color: var(--glass-text);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.global-search-button, .account-button, .account-menu-button, .icon-button, .sidebar-toggle, .secondary-button, .ghost-button):hover {
  border-color: rgba(118, 168, 255, .7);
  background: rgba(118, 168, 255, .18);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.primary-button, .report-action-btn.primary, .today-action-primary) {
  border-color: rgba(255, 255, 255, .28);
  background: linear-gradient(135deg, #76a8ff, #4389f5 58%, #8b78f6);
  color: #071a3d;
  box-shadow: 0 12px 28px rgba(11, 31, 74, .3), inset 0 1px rgba(255, 255, 255, .28);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.primary-button, .report-action-btn.primary, .today-action-primary):hover { background: linear-gradient(135deg, #9fc3ff, #5a98f7 58%, #9b8af7); }

html[data-ui-style="glass"] body:not(.login-active) :is(
  .panel, .card, .metric-card, .toolbar, .table-panel, .today-panel, .today-status-bar,
  .today-summary-strip, .today-action-queue, .today-context-card, .overview-panel,
  .overview-dashboard-section, .report-panel, .report-generator-bar, .report-materials-card,
  .report-current-card, .report-timeline-card, .report-archives-strip, .report-card,
  .data-protection-panel, .detail-panel, .preferences-dialog, .global-search-dialog,
  .report-polish-dialog, .form-section
) {
  border-color: var(--glass-line);
  background: var(--glass-surface);
  box-shadow: var(--ui-shadow-card);
  -webkit-backdrop-filter: blur(20px) saturate(128%);
  backdrop-filter: blur(20px) saturate(128%);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.table-panel, .table-wrap, .data-table, .detail-panel, .detail-card, .rich-text, .communication-content, .report-content) {
  border-color: var(--glass-line);
  background: rgba(11, 31, 74, .94);
  color: var(--glass-text);
  box-shadow: 0 18px 48px rgba(4, 15, 39, .28);
}

html[data-ui-style="glass"] body:not(.login-active) :is(table, thead, tbody, tr, th, td) { border-color: var(--glass-line); }
html[data-ui-style="glass"] body:not(.login-active) .data-table tbody td { background: rgba(11, 31, 74, .98); }
html[data-ui-style="glass"] body:not(.login-active) :is(th, .table-header) { background: rgba(35, 70, 125, .88); color: var(--glass-muted); }
html[data-ui-style="glass"] body:not(.login-active) .data-table tbody tr:hover td { background: rgba(35, 70, 125, .98); }
html[data-ui-style="glass"] body:not(.login-active) .list-row:hover { background: rgba(118, 168, 255, .1); }

html[data-ui-style="glass"] body:not(.login-active) :is(input, textarea, select, .select-control) {
  border-color: var(--glass-line-strong);
  background: rgba(11, 31, 74, .72);
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) :is(input, textarea)::placeholder { color: #b9c9e3; }
html[data-ui-style="glass"] body:not(.login-active) :is(.tag, .badge, .chip, .status-pill, .filter-chip) { border-color: var(--glass-line); background: #183661; color: #eaf2ff; }
html[data-ui-style="glass"] body:not(.login-active) :is(.tag.active, .chip.active, .filter-chip.active) { border-color: var(--glass-accent); background: rgba(118, 168, 255, .22); color: var(--glass-text); }
html[data-ui-style="glass"] body:not(.login-active) :is(.badge.warn, .badge.warning, .status-pill.warn) { border-color: #ffd08a; background: #253757; color: #ffdca8; }
html[data-ui-style="glass"] body:not(.login-active) :is(.badge.danger, .badge.error, .badge.risk, .status-pill.danger) { border-color: #ffabbc; background: #49324f; color: #ffd5de; }
html[data-ui-style="glass"] body:not(.login-active) :is(.badge.ok, .badge.healthy, .status-pill.ok) { border-color: #85e5c1; background: #1f4557; color: #baf3dd; }
html[data-ui-style="glass"] body:not(.login-active) .expected-close-cell.tone-muted { border-color: var(--glass-line); background: #23467d; color: #eaf2ff; }
html[data-ui-style="glass"] body:not(.login-active) .expected-close-cell.tone-info { border-color: #76a8ff; background: #173b72; color: #eef5ff; }

html[data-ui-style="glass"] body:not(.login-active) :is(.table-panel-head, .table-head, thead th, .report-panel-head) {
  border-color: var(--glass-line);
  background: rgba(35, 70, 125, .76);
  color: var(--glass-muted);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.segmented-control, .report-segmented, .today-tabs, .today-source-filters) {
  border-color: var(--glass-line);
  background: rgba(11, 31, 74, .42);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.segment-button, .report-segment, .today-tab, .today-source-filter) {
  color: var(--glass-muted);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.segment-button, .report-segment, .today-tab, .today-source-filter).active {
  background: rgba(118, 168, 255, .18);
  color: var(--glass-text);
  box-shadow: inset 0 -2px var(--glass-accent);
}

html[data-ui-style="glass"] body:not(.login-active) .today-action-item {
  border-color: var(--glass-line);
  background: rgba(15, 40, 83, .72);
  color: var(--glass-text);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

html[data-ui-style="glass"] body:not(.login-active) .today-action-item:first-child {
  border-color: rgba(118, 168, 255, .66);
  background: linear-gradient(105deg, rgba(118, 168, 255, .24), rgba(15, 40, 83, .78) 48%, rgba(139, 120, 246, .16));
  box-shadow: inset 3px 0 var(--glass-accent), 0 16px 34px rgba(4, 15, 39, .18);
}

html[data-ui-style="glass"] body:not(.login-active) .today-action-item:hover {
  border-color: rgba(118, 168, 255, .5);
  background: rgba(25, 58, 110, .8);
}

/* 选中态：玻璃主题提亮玻璃面并加主色描边，深色底下必须够亮才可辨 */
html[data-ui-style="glass"] body:not(.login-active) .today-action-item.is-selected {
  border-color: var(--glass-accent);
  background: rgba(38, 76, 138, .88);
  box-shadow: inset 3px 0 var(--glass-accent), inset 0 0 0 1px rgba(118, 168, 255, .5), 0 18px 38px rgba(4, 15, 39, .26);
}

html[data-ui-style="glass"] body:not(.login-active) .today-action-order {
  border-color: rgba(255, 255, 255, .24);
  background: linear-gradient(135deg, #76a8ff, #8b78f6);
  color: #f7faff;
}

html[data-ui-style="glass"] body:not(.login-active) .today-state-empty {
  border-color: var(--glass-line);
  background: rgba(11, 31, 74, .38);
  color: var(--glass-muted);
}

html[data-ui-style="glass"] body:not(.login-active) .today-state-empty strong { color: var(--glass-text); }

html[data-ui-style="glass"] body:not(.login-active) :is(
  .overview-kpi, .business-change-item, .overview-weighted-item, .overview-stage,
  .overview-ranking-item, .overview-partner-item, .overview-risk-item,
  .report-material-card, .report-source-item, .report-base-status, .report-workflow,
  .report-preview-source-status, .report-summary-item, .data-protection-metric,
  .detail-highlight-strip, .related-item, .insight-card, .field-static, .db-json,
  .detail-message, .project-communication-meta
) {
  border-color: var(--glass-line);
  background: rgba(25, 57, 109, .72);
  color: var(--glass-text);
  box-shadow: inset 0 1px rgba(255, 255, 255, .07);
  transition: background-color var(--ui-motion-hover, 120ms) var(--ui-ease, ease),
    border-color var(--ui-motion-hover, 120ms) var(--ui-ease, ease);
}

/* 上面这条主题规则优先级高于基础层的 .overview-kpi:hover，会把它整体压掉。
   只给可交互的几类补 hover（纯展示容器如 .field-static / .db-json 不加）。 */
html[data-ui-style="glass"] body:not(.login-active) :is(
  .overview-kpi, .business-change-item, .overview-weighted-item, .overview-stage,
  .overview-ranking-item, .overview-partner-item, .overview-risk-item,
  .report-material-card, .report-summary-item, .related-item
):hover,
html[data-ui-style="glass"] body:not(.login-active) :is(
  .overview-kpi, .business-change-item, .overview-weighted-item, .overview-stage,
  .overview-ranking-item, .overview-partner-item, .overview-risk-item,
  .report-material-card, .report-summary-item, .related-item
):focus-visible {
  border-color: rgba(118, 168, 255, .58);
  background: rgba(38, 76, 138, .86);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.overview-kpi strong, .data-protection-metric strong) { color: #a8c8ff; }

html[data-ui-style="glass"] body:not(.login-active) .report-paper {
  border-color: var(--glass-line);
  background: rgba(8, 25, 58, .9);
  color: var(--glass-text);
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
}

html[data-ui-style="glass"] body:not(.login-active) .report-paper :is(h1, h2, h3, h4, strong) { color: var(--glass-text); }
html[data-ui-style="glass"] body:not(.login-active) .report-paper :is(p, li, blockquote) { color: var(--glass-muted); }

html[data-ui-style="glass"] body:not(.login-active) .ui-style-preference-options button {
  border-color: var(--glass-line);
  background: rgba(25, 57, 109, .72);
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) .ui-style-preference-options button.active {
  border-color: var(--glass-accent);
  background: rgba(118, 168, 255, .22);
  color: var(--glass-text);
  box-shadow: inset 0 0 0 1px var(--glass-accent);
}

html[data-ui-style="glass"] body:not(.login-active) .global-search-input-row {
  border-color: var(--glass-line);
  background: rgba(11, 31, 74, .8);
  color: var(--glass-accent);
}

html[data-ui-style="glass"] body:not(.login-active) .global-search-result { color: var(--glass-text); }
html[data-ui-style="glass"] body:not(.login-active) .global-search-result.active { background: rgba(118, 168, 255, .18); }
html[data-ui-style="glass"] body:not(.login-active) .global-search-result :is(small, em) { color: var(--glass-muted); }
html[data-ui-style="glass"] body:not(.login-active) .account-menu button { color: var(--glass-text); }
html[data-ui-style="glass"] body:not(.login-active) .account-menu button:hover { background: rgba(118, 168, 255, .16); }

html[data-ui-style="glass"] body:not(.login-active) :is(.detail-scroll, .detail-form, .detail-related, .detail-actions) {
  background: rgba(8, 25, 58, .9);
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.project-communication-card, .record-timeline) {
  border-color: rgba(215, 227, 247, .72);
  background: rgba(8, 25, 58, .96);
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) .record-timeline-item {
  border-color: rgba(215, 227, 247, .72);
  background: rgba(31, 67, 122, .92);
  color: var(--glass-text);
}
html[data-ui-style="glass"] body:not(.login-active) .record-timeline-meta em { color: #b8d2ff; }
html[data-ui-style="glass"] body:not(.login-active) .record-timeline-item-completed .record-timeline-meta em { color: #a5f0d2; }
html[data-ui-style="glass"] body:not(.login-active) .record-timeline-item-note .record-timeline-meta em { color: #d3c5ff; }

html[data-ui-style="glass"] body:not(.login-active) :is(.record-timeline-section, .project-communication-meta) {
  border-color: rgba(215, 227, 247, .72);
}

html[data-ui-style="glass"] body:not(.login-active) .project-communication-meta {
  background: rgba(31, 67, 122, .92);
}

html[data-ui-style="glass"] body:not(.login-active) .detail-panel .ai-extract-panel {
  border-color: rgba(215, 227, 247, .72);
  background: #173b72;
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) .detail-panel :is(.ai-extract-title) {
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) .detail-panel :is(.ai-extract-subtitle, .ai-extract-count, .ai-extract-message) {
  color: var(--glass-muted);
}

html[data-ui-style="glass"] body:not(.login-active) .detail-panel .ai-extract-textarea {
  border-color: var(--glass-line-strong);
  background: var(--glass-deep);
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) .detail-panel .ai-extract-button {
  border-color: var(--glass-line-strong);
  background: #c5dbff;
  color: var(--glass-deep);
}

html[data-ui-style="glass"] body:not(.login-active) .detail-panel .ai-extract-button:hover:not(:disabled) {
  border-color: var(--glass-accent);
  background: #9fc3ff;
  color: var(--glass-deep);
}

html[data-ui-style="glass"] body:not(.login-active) :is(
  .detail-field-section-title, .detail-field-section .field-label, .field-label,
  .related-item strong, .insight-title, .project-communication-title,
  .record-timeline-copy strong, .report-polish-dialog-title, .report-polish-field-title,
  .report-polish-source-card strong, .report-polish-source-option-text strong, .report-template-card strong,
  .report-radio-item, .report-model-field span
) { color: var(--glass-text); }

html[data-ui-style="glass"] body:not(.login-active) :is(
  .detail-field-section-kicker, .field-hint, .related-item span, .insight-subtitle,
  .insight-reason, .project-communication-meta, .record-timeline-copy small,
  .record-timeline-head > span, .record-timeline-section h4, .record-timeline-section h4 > span,
  .record-timeline-meta, .record-timeline-labels small, .report-polish-dialog-subtitle, .report-polish-source-hint,
  .report-polish-direction-field span, .report-polish-direction-field small,
  .report-polish-hint-meta, .report-polish-helper-title, .report-polish-field-sub,
  .report-polish-source-card span, .report-polish-source-option-text small
) { color: var(--glass-muted); }

html[data-ui-style="glass"] body:not(.login-active) :is(
  .report-polish-panel, .report-polish-source-card, .report-polish-source-option,
  .report-template-card, .report-polish-editor, .report-polish-textarea
) {
  border-color: var(--glass-line);
  background: #102d5a;
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) .report-polish-source-option.disabled {
  background: #17355f;
  color: var(--glass-quiet);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.report-polish-helper, .report-polish-side-btn, .report-polish-close-btn) {
  border-color: var(--glass-line);
  background: #173b72;
  color: #eef5ff;
}

html[data-ui-style="glass"] body:not(.login-active) :is(.report-polish-helper, .report-polish-side-btn, .report-polish-close-btn):hover {
  border-color: var(--glass-accent);
  background: #214b88;
  color: #ffffff;
}

html[data-ui-style="glass"] body:not(.login-active) :is(.report-polish-input, .report-polish-select) {
  border-color: var(--glass-line-strong);
  background-color: #0d2852;
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) :is(.modal-backdrop, .dialog-backdrop, .drawer-backdrop) { background: rgba(4, 15, 39, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

html[data-ui-style="glass"] body:not(.login-active) .overview-stage-matrix-row {
  border-color: rgba(215,227,247,.82);
  background: rgba(20,48,94,.72);
  box-shadow: 0 8px 22px rgba(18,39,82,.2), inset 0 1px rgba(255,255,255,.2);
}

html[data-ui-style="glass"] body:not(.login-active) .overview-stage-index {
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.14);
  color: #fff;
}

html[data-ui-style="glass"] body:not(.login-active) .overview-stage-share-track { background: var(--glass-deep); }
html[data-ui-style="glass"] body:not(.login-active) .overview-stage-share-track i { background: var(--glass-accent); }
html[data-ui-style="glass"] body:not(.login-active) .overview-stage-signal { color: var(--glass-muted); }

/* Full-page readability: absorb legacy light business/report components into the glass surface. */
html[data-ui-style="glass"] body:not(.login-active) :is(
  .today-context-card button.active, .period-button.active, .business-change-chip.active,
  .overview-panel-badge, .overview-probability-settings-button, .panel-summary,
  .task-group-count, .detail-kicker
) {
  background: #173b72;
  color: #c5dbff;
}

html[data-ui-style="glass"] body:not(.login-active) .overview-summary-action { color: var(--glass-deep); }

html[data-ui-style="glass"] body:not(.login-active) :is(
  .customer-project-item, .business-summary-grid > div, .insight-reason,
  .report-classification-panel, .report-classification-row select,
  .report-empty, .report-center-item, .report-center-source-tags span,
  .report-badge.light, .report-version-item, .report-material-tags span,
  .report-current-source
) {
  border-color: var(--glass-line-strong);
  background: #173b72;
  color: var(--glass-text);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

html[data-ui-style="glass"] body:not(.login-active) :is(
  .customer-project-name, .business-summary-grid strong,
  .report-classification-panel strong, .report-classification-row strong,
  .report-empty strong, .report-center-title-row strong, .report-version-main strong,
  .report-current-source strong, .report-base-status strong,
  .data-protection-panel-heading h2, .data-protection-empty strong
) {
  color: var(--glass-text);
}

html[data-ui-style="glass"] body:not(.login-active) :is(
  .customer-project-meta, .customer-project-next, .business-summary-grid span,
  .insight-reason, .report-date-field span, .report-classification-head span,
  .report-classification-row small, .report-empty span, .report-center-meta,
  .report-center-main p, .report-version-main span, .report-version-main p,
  .report-current-source span, .report-timeline-time
) {
  color: var(--glass-muted);
}

html[data-ui-style="glass"] body:not(.login-active) .detail-panel .field-label em { color: #ffd08a; }
html[data-ui-style="glass"] body:not(.login-active) .report-summary-number.purple { color: #d3c5ff; }
html[data-ui-style="glass"] body:not(.login-active) .report-summary-number.ok { color: #a5f0d2; }
html[data-ui-style="glass"] body:not(.login-active) .report-timeline-kind { color: #a5f0d2; }
html[data-ui-style="glass"] body:not(.login-active) .report-period-archives-link { color: #c5dbff; }

html[data-ui-style="glass"] body:not(.login-active) :is(
  .report-badge, .report-material-tags span, .report-material-type, .report-material-filter-head span
) {
  border-color: var(--glass-line-strong);
  background: #173b72;
  color: var(--glass-muted);
}

html[data-ui-style="glass"] body:not(.login-active) .report-material-type.info { color: #c5dbff; }
html[data-ui-style="glass"] body:not(.login-active) .report-material-type.note { color: #d3c5ff; }
html[data-ui-style="glass"] body:not(.login-active) :is(.report-material-type.partner, .report-badge.success) { color: #a5f0d2; }

html[data-ui-style="glass"] body:not(.login-active) .report-current-card :is(.report-action-btn.primary-lite, .report-action-btn.final) {
  border-color: var(--glass-line-strong);
  background: #c5dbff;
  color: var(--glass-deep);
}

html[data-ui-style="glass"] body:not(.login-active) .report-current-card .report-action-btn.final {
  background: #a5f0d2;
}

@supports not ((backdrop-filter: blur(1px))) {
  html[data-ui-style="glass"] body:not(.login-active) :is(.sidebar, .desktop-topbar, .sidebar-footer, .account-menu, .metric-card, .today-action-queue, .today-context-card, .overview-panel, .table-panel, .detail-panel, .preferences-dialog, .global-search-dialog, .report-polish-dialog, .overview-stage-matrix-row) {
    background: rgba(11, 31, 74, .96);
  }
}

@media (max-width: 1100px) {
  html[data-ui-style="glass"] body:not(.login-active)::before,
  html[data-ui-style="glass"] body:not(.login-active)::after { display: none; }
  html[data-ui-style="glass"] body:not(.login-active) :is(.sidebar, .desktop-topbar, .sidebar-footer, .panel, .card, .today-action-queue, .today-context-card, .overview-panel) {
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui-style="glass"] body:not(.login-active) .table-panel { transform: none; }

  html[data-ui-style="glass"] body:not(.login-active) *,
  html[data-ui-style="glass"] body:not(.login-active) *::before,
  html[data-ui-style="glass"] body:not(.login-active) *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: .01ms !important;
  }

  html[data-ui-style="glass"] body:not(.login-active)::before,
  html[data-ui-style="glass"] body:not(.login-active)::after { animation: none; }
}

html[data-ui-style="glass"] body:not(.login-active).reduce-motion *,
html[data-ui-style="glass"] body:not(.login-active).reduce-motion *::before,
html[data-ui-style="glass"] body:not(.login-active).reduce-motion *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition-duration: .01ms !important;
}

html[data-ui-style="glass"] body:not(.login-active).reduce-motion::before,
html[data-ui-style="glass"] body:not(.login-active).reduce-motion::after { animation: none !important; }
