/* ============================================================
   换皮配置层 skin.css
   ------------------------------------------------------------
   换一个新俱乐部，只改这个文件里的变量即可，不用动其他 CSS。
   · 主色：--brand-950 ~ --brand-50（深→浅，一般只改 900/800/700/600）
   · 点缀金：--gold-soft
   · 页面底色：--skin-bg
   ============================================================ */
:root,
.css-var-r0 {
  /* 主色阶（当前：墨绿） */
  --brand-950: #0b326d;
  --brand-900: #0e3b7c;
  --brand-800: #124692;
  --brand-700: #1956b0;
  --brand-600: #2a6aca;
  --brand-500: #4984de;
  --brand-400: #94bafa;
  --brand-300: #c3d8ff;
  --brand-200: #dbe8ff;
  --brand-100: #ecf3ff;
  --brand-50:  #f1f6ff;
  /* 点缀色 */
  --gold-soft: #b0ccff;
  /* 页面底色 */
  --skin-bg: #f1f6ff;
}

body, .home-page { background-color: var(--skin-bg) !important; }

/* ============================================================
   无 Logo 化：所有端的品牌图形一律不显示
   （文字标题保留，图标/水印全部去掉）
   ============================================================ */
.brand-mark,
.home-logo-area img,
.fy-topbar-logo,
.fy-topbar-logo img,
.app-sider-logo,
.fy-so-brand img,
.logo-area,
img[data-fy-logo] {
  display: none !important;
}

/* ============================================================
   蓝色主题（清新蓝）+ 关闭页面淡入动画
   淡入动画在后台标签页会冻结在 opacity:0，导致内容不可见，
   演示站直接关闭，内容常驻可见。
   ============================================================ */
.ant-layout-content > div,
.ant-layout-content > main,
.ka-wrapper { animation: none !important; opacity: 1 !important; }

/* ============================================================
   颜色角色令牌（Material 3 思路：先定用途，再定色值）
   ------------------------------------------------------------
   改主题只改这一段；组件按角色取色，不要直接写死色值。
   对比度（WCAG AA，正文 ≥ 4.5:1）已核算：
     on-primary / primary            6.09
     on-surface / surface           16.74
     on-surface-variant / surface    5.86
     on-primary-container / container 9.16
   ============================================================ */
:root {
  /* 主色（按钮、选中态、关键操作） */
  --color-primary: #1c5fc0;
  --color-on-primary: #ffffff;
  --color-primary-container: #d8e6ff;
  --color-on-primary-container: #0d3775;
  /* 次强调（次级操作、辅助高亮） */
  --color-secondary: #3a78d6;
  --color-on-secondary: #ffffff;
  --color-secondary-container: #ebf2ff;
  /* 表面（页面/卡片/描边/文字） */
  --color-surface: #f7faff;
  --color-surface-container: #eff4fb;
  --color-outline: #c7d3e2;
  --color-on-surface: #121a24;
  --color-on-surface-variant: #556374;
  /* 语义色（状态，不随主题变） */
  --color-error: #b3261e;
  --color-on-error: #ffffff;
  --color-success: #205387;
  --color-warning: #9a6700;
  /* 页面底色接角色 */
  --skin-bg: #f7faff;
}

/* 侧栏菜单：组件自带的 opacity:0 淡入会因运行时未触发而一直隐身，这里直接常显 */
.ant-layout-sider .ant-menu,
.layout-menu-drawer .ant-menu { opacity: 1 !important; transition: none !important; }

/* 表面角色统一：表头 = surface-container，表体/空状态 = 白面
   （antd 的 colorFillAlter 在演示库算出来偏米色，这里按角色强制归位） */
.ant-table-thead > tr > th {
  background: var(--color-surface-container) !important;
  background-image: none !important;
}
.ant-table-tbody > tr > td,
.ant-table-placeholder,
.ant-table-empty .ant-table-tbody > tr > td {
  background: #ffffff !important;
  background-image: none !important;
}

/* 入场动画没写 forwards 时，动画播完会退回基础 opacity:0，导致登录卡整块隐身 */
.login-container,
.login-card,
.portal-login-card { opacity: 1 !important; animation: none !important; }

/* 提高优先级压掉运行时注入的 emotion 样式（其 !important 在文档顺序上更靠后） */
html body .ant-table-thead > tr > th,
html body .ant-table-thead > tr > th.ant-table-cell {
  background: var(--color-surface-container) !important;
  background-image: none !important;
  color: var(--color-on-surface-variant) !important;
}
html body .ant-table-tbody > tr > td,
html body .ant-table-placeholder {
  background: #ffffff !important;
  background-image: none !important;
}

/* antd 主题令牌归位：表头底色原本是品牌米色 #f2f3f5，改走 surface-container 角色 */
html:root,
html .css-var-r0,
html .ant-app {
  --ant-table-header-bg: #eff4fb;
  --ant-color-fill-alter: rgba(28, 95, 192, 0.04);
}

/* 绿色残留收尾：胶囊/公式注释统一到蓝色角色 */
.fy-pill.is-date { background: #144b9b !important; border-color: #144b9b !important; color: #fff !important; }
.fy-pill { color: #1c5fc0; }
.sendorder-formula-note { color: #556374 !important; }
.sendorder-price-value { border-color: #c9dcf7 !important; }

/* 再修一处隐身：派单页日期/单号胶囊 opacity 恒为 0（淡入动画未回落） */
.fy-pill, .fy-chip { opacity: 1 !important; animation: none !important; }

/* 飞羽品牌图兜底隐藏：即便组件重新插入也不再显示 */
img[alt="logo"],
img[src*="Log.png"],
img[src*="transparent_logo"],
.login-logo { display: none !important; background-image: none !important; }

/* 丝滑度优化：底色连续、滚动条占位固定、菜单过渡缩短 */
html { background: #f7faff !important; scrollbar-gutter: stable; }
.ant-layout, .ant-layout-content, .ant-layout-header { background: var(--color-surface) !important; }
.ant-menu-item, .ant-menu-submenu-title { transition: background-color .12s linear, color .12s linear !important; }
.ant-table-cell, .ant-btn, .ant-input, .ant-select { transition-duration: .12s !important; }

/* 顶部标语样式 */
header.ant-layout-header { display: flex; align-items: center; }
.fy-slogan-slot { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; }
.fy-slogan {
  font-size: 13px; line-height: 1; letter-spacing: .4px; color: #3f6ea8;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(180deg, #f4f8ff, #e9f1fe); border: 1px solid #dbe7f7;
}
@media (max-width: 1180px) { .fy-slogan-slot { display: none; } }

/* 顶部标语 v2：去胶囊，细线 + 字距，重心在文字本身 */
.fy-slogan {
  display: inline-flex; align-items: center; gap: 12px;
  background: none !important; border: 0 !important; padding: 0 !important;
  border-radius: 0 !important; box-shadow: none !important;
  white-space: nowrap;
}
.fy-slogan .t1 { font-size: 14px; letter-spacing: 2.4px; color: #1b3f6f; font-weight: 600; }
.fy-slogan .t2 { font-size: 13.5px; letter-spacing: 2.2px; color: #6a829c; font-weight: 500; }
.fy-slogan .dot { width: 4px; height: 4px; border-radius: 50%; background: #a9c0dc; margin: 0 2px; }
.fy-slogan .ln { width: 44px; height: 1px; flex: 0 0 44px; background: linear-gradient(90deg, rgba(169,192,220,0), rgba(169,192,220,.95)); }
.fy-slogan .ln.r { background: linear-gradient(270deg, rgba(169,192,220,0), rgba(169,192,220,.95)); }

/* 余额管理弹窗重设计：卡片化余额 + 主次分明的操作区 */
.ant-modal.account .ant-modal-container { border-radius: 18px; overflow: hidden; box-shadow: 0 24px 64px rgba(12, 53, 113, .18); }
.ant-modal.account .ant-modal-header { padding: 20px 26px 14px; margin: 0; border-bottom: 1px solid #eaf1fb; background: #fff; }
.ant-modal.account .ant-modal-title { font-size: 17px; font-weight: 600; letter-spacing: .4px; color: #12345c; }
.ant-modal.account .ant-modal-close { top: 14px; right: 14px; border-radius: 10px; }
.ant-modal.account .ant-modal-body { padding: 16px 26px 22px; }
.ant-modal.account .modal-subtitle { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 12px; font-size: 12px; letter-spacing: .6px; color: #6b829c; background: #f3f7fd; border: 1px solid #e6eefa; border-radius: 8px; }
.ant-modal.account .balance-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 22px; }
.ant-modal.account .balance-info-grid .form-group { margin: 0; padding: 16px 18px; border: 1px solid #e2ecfa; border-radius: 14px; background: linear-gradient(180deg, #f8fbff, #edf4ff); }
.ant-modal.account .balance-info-grid label { display: block; margin: 0 0 8px; font-size: 12px; letter-spacing: 1.2px; color: #7b8ca4; }
.ant-modal.account .balance-value { font-size: 24px; font-weight: 700; line-height: 1.1; color: #1c5fc0; letter-spacing: .2px; font-variant-numeric: tabular-nums; }
.ant-modal.account .actions-row { display: flex; gap: 10px; margin: 0 0 10px; }
.ant-modal.account .actions-row:last-child { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed #e4edfa; }
.ant-modal.account .actions-row .ant-btn { flex: 1 1 0; height: 40px; border-radius: 10px; font-size: 13px; box-shadow: none; }
.ant-modal.account .actions-row:first-child .ant-btn { border-color: #d9e6f8; color: #1c5fc0; background: #fff; }
.ant-modal.account .actions-row:first-child .ant-btn:first-child { border-color: #1c5fc0; background: #1c5fc0; color: #fff; box-shadow: 0 8px 18px rgba(28, 95, 192, .22); }
.ant-modal.account .actions-row:first-child .ant-btn:first-child:hover { background: #1855ad; border-color: #1855ad; }
.ant-modal.account .actions-row:last-child .ant-btn { height: 32px; border-color: transparent; background: transparent; color: #4a6fa5; font-size: 12.5px; }
.ant-modal.account .actions-row:last-child .ant-btn:hover { background: #f1f6fe; }

/* 余额弹窗微调：主按钮阴影收敛、次级按钮彻底去边框 */
.ant-modal.account .actions-row:first-child .ant-btn:first-child { box-shadow: 0 6px 14px rgba(28, 95, 192, .16) !important; }
.ant-modal.account .actions-row:last-child .ant-btn { border: 0 !important; box-shadow: none !important; }
.ant-modal.account .actions-row:last-child .ant-btn:hover { background: #eef4ff !important; }
