﻿/* ============================================================
 * Ratiomax 品牌换肤 —— 「B端SaaS知识中台」风格
 * 仅覆盖 TDesign CSS 变量与少量全局样式，不改任何组件结构/功能。
 * 主色：#1677FF（蓝），AI 渐变：蓝→紫。
 * ============================================================ */

html:root:root,
html:root:root[theme-mode="light"] {
  /* ---------- 品牌色：蓝 #1677FF ---------- */
  --td-brand-color-1: #E6F4FF;
  --td-brand-color-2: #BAE0FF;
  --td-brand-color-3: #91CAFF;
  --td-brand-color-4: #69B1FF;
  --td-brand-color-5: #4096FF;
  --td-brand-color-6: #1677FF;
  --td-brand-color-7: #0958D9;
  --td-brand-color-8: #003EB3;
  --td-brand-color-9: #002C8C;
  --td-brand-color-10: #001D66;

  --td-brand-color: #1677FF;
  --td-brand-color-hover: #4096FF;   /* hover 略浅 */
  --td-brand-color-active: #0958D9;  /* active 略深 */
  --td-brand-color-focus: rgba(22, 119, 255, 0.20);
  --td-brand-color-disabled: #91CAFF;
  --td-brand-color-light: #E6F4FF;
  --brand-main: #1677FF;
  --td-text-color-brand: #1677FF;
  --td-text-color-link: #1677FF;

  /* ---------- 成功 / 警告 / 错误（对齐设计稿） ---------- */
  --td-success-color-1: #E8FFEA;
  --td-success-color-2: #B7F7C0;
  --td-success-color-3: #7EE89A;
  --td-success-color-4: #4ED978;
  --td-success-color-5: #23C343;
  --td-success-color-6: #00B42A;
  --td-success-color-7: #009A29;
  --td-success-color-8: #008026;
  --td-success-color-9: #006622;
  --td-success-color-10: #004D1C;
  --td-success-color: #00B42A;
  --td-success-color-hover: #23C343;
  --td-success-color-active: #009A29;
  --td-success-color-light: #E8FFEA;

  --td-warning-color-1: #FFF7E8;
  --td-warning-color-2: #FFE4BA;
  --td-warning-color-3: #FFCF8B;
  --td-warning-color-4: #FFB65D;
  --td-warning-color-5: #FF9A2E;
  --td-warning-color-6: #FF7D00;
  --td-warning-color-7: #D25F00;
  --td-warning-color-8: #A64500;
  --td-warning-color-9: #792E00;
  --td-warning-color-10: #4D1B00;
  --td-warning-color: #FF7D00;
  --td-warning-color-hover: #FF9A2E;
  --td-warning-color-active: #D25F00;
  --td-warning-color-light: #FFF7E8;

  --td-error-color-1: #FFECE8;
  --td-error-color-2: #FDCDC5;
  --td-error-color-3: #FBACA3;
  --td-error-color-4: #F98981;
  --td-error-color-5: #F76560;
  --td-error-color-6: #F53F3F;
  --td-error-color-7: #CB272D;
  --td-error-color-8: #A1151C;
  --td-error-color-9: #77080C;
  --td-error-color-10: #4D0004;
  --td-error-color: #F53F3F;
  --td-error-color-hover: #F76560;
  --td-error-color-active: #CB272D;
  --td-error-color-light: #FFECE8;

  /* ---------- 中性色：背景 / 边框 / 文字 ---------- */
  --td-bg-color-page: #F7F8FA;
  --td-bg-color-container: #FFFFFF;
  --td-bg-color-container-select: #FFFFFF;
  --td-bg-color-container-hover: #F2F3F5;
  --td-bg-color-container-active: #E5E6EB;
  --td-bg-color-secondarycontainer: #F2F3F5;
  --td-bg-color-secondarycontainer-hover: #E5E6EB;
  --td-bg-color-secondarycontainer-active: #D4D7DE;
  --td-bg-color-component: #F2F3F5;
  --td-bg-color-component-hover: #E5E6EB;
  --td-bg-color-component-active: #D4D7DE;
  --td-bg-color-component-disabled: #F2F3F5;
  --td-component-stroke: #E5E6EB;
  --td-component-border: #E5E6EB;

  --td-text-color-primary: #1F1F1F;
  --td-text-color-secondary: #666666;
  --td-text-color-placeholder: #999999;
  --td-text-color-disabled: #C0C4CC;
  --td-text-color-anti: #FFFFFF;

  /* ---------- 圆角：更圆润 ---------- */
  --td-radius-small: 4px;
  --td-radius-default: 6px;
  --td-radius-medium: 8px;
  --td-radius-large: 12px;
  --td-radius-extraLarge: 16px;

  /* ---------- 字体 ---------- */
  --app-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --td-font-family: var(--app-font-family);
  --td-font-family-medium: var(--app-font-family);
}

/* ---------- AI 渐变（蓝→紫）：用于 AI 相关强调 ---------- */
html:root:root .ai-gradient,
html:root:root[theme-mode="light"] .ai-gradient {
  background: linear-gradient(135deg, #1677FF 0%, #722ED1 100%) !important;
}

/* ---------- 全局背景与字体基准 ---------- */
html:root:root,
html:root:root[theme-mode="light"] {
  color: #1F1F1F;
}

/* ============================================================
 * 额外修复：硬编码绿色的元素
 * ============================================================ */

/* 登录页背景：绿色渐变 → 蓝色渐变（浅色模式） */
.login-layout {
  background: linear-gradient(225deg, #001D66 0%, #003EB3 15%, #0958D9 25%, #1677FF 38%, #4096FF 50%, #69B1FF 65%, #91CAFF 78%, #BAE0FF 90%, #E6F4FF 100%) !important;
}

/* 登录页背景：深色模式 */
html[theme-mode="dark"] .login-layout {
  background: linear-gradient(225deg, #001233 0%, #001D66 15%, #002C8C 25%, #003EB3 38%, #0958D9 50%, #1677FF 65%, #4096FF 78%, #69B1FF 90%, #91CAFF 100%) !important;
}

/* 数据源卡片徽标：绿 → 蓝 */
.ds-card__badge {
  background: rgba(22, 119, 255, 0.12) !important;
  color: #1677FF !important;
}

/* 空间头像：绿/青渐变 → 蓝紫渐变 */
.space-avatar {
  background: linear-gradient(135deg, #1677FF 0%, #722ED1 100%) !important;
}

/* 组织编辑弹窗里的绿色渐变残影 → 蓝色 */
.illustration-icon {
  background: linear-gradient(135deg, #E6F4FF, rgba(22, 119, 255, 0.05)) !important;
}

/* 2026-10-03：删除了原 RATIOMAX:LOGO-PREVIEW 段（预览版 2026-09-29 的侧栏换标）。
 * 它把 .aside_box .logo_box .logo 指向 /brand/logo-light.png 与 /brand/logo-dark.png，
 * 但这两个文件从未存在：nginx 对不存在的路径回落到 SPA，返回的是 index.html
 * （Content-Type: text/html），图片必然加载失败；再叠加 object-position:-9999px
 * 把原图移出可视区、filter:none!important 关掉暗色处理，结果是侧栏 logo 空白，
 * 而且因为本文件在 index.html 里最后加载、选择器权重与前端自带规则相同，
 * 它还把前端镜像里已经换好的新标一起盖掉了。
 * 侧栏标志现由前端自己渲染：彩色版按宽 128px 等比（源图 512x168，横版 3.05:1），
 * 暗色版由 menu.vue 换成 ratiomax-dark.png。 */
