body {
  margin: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
    'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* iOS PWA 全屏适配 */
  height: 100%;
  position: fixed;
  width: 100%;
  /* 防止 iOS Safari 橡皮筋效果 */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}
ul {
  list-style-type: none;
  padding-left: 0;
}

dd {
  margin-bottom: 0;
}

ul,
li,
p {
  padding: 0;
  margin: 0;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}
.fade-enter {
  opacity: 0;
}
.fade-enter-active {
  transform: translateX(0px);
  opacity: 1;
}
.fade-exit {
  opacity: 1;
}
.fade-exit-active {
  transform: translateX(-100px);
  transition: all 500ms;
  opacity: 0;
}

#root {
  height: 100%;
  overflow: hidden;
  /* iOS 安全区适配 */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  box-sizing: border-box;
}

.iconfont {
  font-family: 'iconfont' !important;
  font-size: 14px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 替换过时的-ms-high-contrast媒体查询，使用现代化的Forced Colors Mode */
@media (forced-colors: active) {
  /* 所有按钮确保在高对比度模式下保持可见 */
  .ant-btn {
    border: 1px solid ButtonText !important;
    color: ButtonText !important;
  }
  
  /* 确保焦点边框可见 */
  *:focus-visible {
    outline: 2px solid ButtonText !important;
  }
  
  /* 确保高对比度模式下表单元素保持合适的颜色 */
  .ant-input,
  .ant-select-selector {
    border: 1px solid ButtonText !important;
  }
  
  /* 确保图标在高对比度模式下可见 */
  .anticon svg {
    fill: currentColor !important;
  }
}

/* iOS PWA 全屏适配 */
html {
  height: 100%;
  /* iOS 安全区适配 */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* iOS PWA 状态栏适配 */
@media screen and (display-mode: standalone) {
  body {
    /* 在 PWA 模式下确保全屏 */
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
}

  #root {
    /* 在 PWA 模式下使用安全区 */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}


/* iOS PWA 安全区与背景适配，避免出现白边/白块 */
html, body {
  height: 100%;
  background: #f5f7fa; /* 与应用背景保持一致，可替换为主题色 */
  overscroll-behavior: none;
}

body {
  margin: 0;
  /* 适配刘海/底部 HomeBar 安全区 */
  /* 对于全黑状态栏，避免额外的顶部内边距 */
  padding-top: 0;
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  /* 兼容旧版 iOS 常量写法 */
  padding-top: 0;
  padding-right: constant(safe-area-inset-right);
  padding-bottom: constant(safe-area-inset-bottom);
  padding-left: constant(safe-area-inset-left);
}

#root {
  min-height: 100%;
  background: inherit;
}

/* 页面包裹容器建议使用该类，确保填满屏幕且与安全区对齐 */
.theme-wrapper {
  min-height: 100vh;
  min-height: 100svh; /* 支持的新视口单位，解决移动端地址栏伸缩 */
  background: inherit;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 金融页面特定样式，确保菜单栏完全铺满 */
.theme-wrapper.theme-jinrong {
  min-height: auto;
  height: auto;
}


.loading-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #ffffff;
}

.logo-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
}

.logo {
  width: 100%;
  height: 100%;
  animation: logoScale 0.8s ease-out;
}

@keyframes logoScale {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.loading-text {
  margin-top: 16px;
  color: #1677ff;
  font-size: 16px;
} 
input {
    -webkit-appearance: none;
    background-color: transparent;
    }
    
.page-transition {
  position: relative;
  width: 100%;
  height: 100%;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 首页加载容器 */
.loading-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
}

/* Logo 动画 */
.logo-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 24px;
}

.logo {
  width: 100%;
  height: 100%;
  animation: logoScale 1.2s ease-out;
}

@keyframes logoScale {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 加载进度条 */
.progress-bar {
  width: 200px;
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #1890ff, #52c41a);
  animation: progress 2s ease-in-out infinite;
  border-radius: 2px;
}

@keyframes progress {
  0% {
    width: 0;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

/* 骨架屏样式 */
.skeleton {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.8) 25%, 
    rgba(255, 255, 255, 0.9) 50%, 
    rgba(255, 255, 255, 0.8) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* 首页内容骨架屏 */
.home-skeleton {
  padding: 24px;
}

.skeleton-header {
  height: 64px;
  margin-bottom: 24px;
}

.skeleton-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.skeleton-card {
  height: 200px;
  border-radius: 8px;
}

.skeleton-footer {
  height: 48px;
}
    
/* 全局主题样式 */
:root {
  /* 默认主题变量 */
  --theme-header_bg: linear-gradient(135deg, #2d2d2d 0%, #4a4a4a 50%, #2d2d2d 100%);
  --theme-button_bg: linear-gradient(135deg, #434343 0%, #1a1a1a 100%);
  --theme-button_hover: linear-gradient(135deg, #535353 0%, #2a2a2a 100%);
  --theme-text_primary: #ffffff;
  --theme-text_secondary: #cccccc;
  --theme-border_color: rgba(160, 231, 229, 0.4);
  --theme-accent_color: #a0e7e5;
  --theme-success_color: #52c41a;
  --theme-warning_color: #faad14;
  --theme-error_color: #ff4d4f;
  
  /* 页面级主题变量 */
  --theme-background_color: #1a1a1a;
  --theme-card_bg: #2d2d2d;
  --theme-card_header_bg: #3a3a3a;
  --theme-table_bg: #2d2d2d;
  --theme-table_header_bg: #3a3a3a;
  --theme-nav_bg: #001529;
  --theme-nav_text: #ffffff;
  --theme-nav_hover_bg: #1890ff;
  --theme-nav_selected_bg: #1890ff;
  --theme-sider_bg: #001529;
  --theme-footer_bg: #1a1a1a;
}

/* 主题应用样式 */
.theme-header {
  background: var(--theme-header_bg) !important;
}

.theme-button {
  background: var(--theme-button_bg) !important;
}

.theme-button:hover {
  background: var(--theme-button_hover) !important;
}

.theme-text-primary {
  color: var(--theme-text_primary) !important;
}

.theme-text-secondary {
  color: var(--theme-text_secondary) !important;
}

.theme-border {
  border-color: var(--theme-border_color) !important;
}

.theme-accent {
  color: var(--theme-accent_color) !important;
}

.theme-success {
  color: var(--theme-success_color) !important;
}

.theme-warning {
  color: var(--theme-warning_color) !important;
}

.theme-error {
  color: var(--theme-error_color) !important;
}

/* 渐变色支持 */
.gradient-bg {
  background: var(--theme-header_bg);
}

.gradient-button {
  background: var(--theme-button_bg);
}

.gradient-button:hover {
  background: var(--theme-button_hover);
}

/* 响应式主题支持 */
@media (max-width: 768px) {
  :root {
    /* 移动端主题变量调整 */
    --theme-header_bg: linear-gradient(135deg, #1a1a1a 0%, #333333 50%, #1a1a1a 100%);
    --theme-button_bg: linear-gradient(135deg, #2a2a2a 0%, #0a0a0a 100%);
    --theme-button_hover: linear-gradient(135deg, #3a3a3a 0%, #1a1a1a 100%);
  }
}

/* 页面级主题样式 */
.theme-wrapper {
  min-height: 83vh;
  transition: all 0.3s ease;
}

/* 卡片主题样式 */
.theme-card {
  background: var(--theme-card_bg, #ffffff);
  border-color: var(--theme-border_color, #d9d9d9);
  color: var(--theme-text_primary, #333333);
}

.theme-card .ant-card-head {
  background: var(--theme-card_header_bg, #fafafa);
  border-bottom-color: var(--theme-border_color, #d9d9d9);
}

.theme-card .ant-card-head-title {
  color: var(--theme-text_primary, #333333);
}

/* 表格主题样式 */
.theme-table .ant-table {
  background: var(--theme-table_bg, #ffffff);
  color: var(--theme-text_primary, #333333);
}

.theme-table .ant-table-thead > tr > th {
  background: var(--theme-table_header_bg, #fafafa);
  color: var(--theme-text_primary, #333333);
  border-bottom-color: var(--theme-border_color, #d9d9d9);
}

.theme-table .ant-table-tbody > tr > td {
  border-bottom-color: var(--theme-border_color, #d9d9d9);
}

/* 表单主题样式 */
.theme-form .ant-form-item-label > label {
  color: var(--theme-text_primary, #333333);
}

.theme-form .ant-input,
.theme-form .ant-select-selector,
.theme-form .ant-picker {
  border-color: var(--theme-border_color, #d9d9d9);
  color: var(--theme-text_primary, #333333);
}

.theme-form .ant-input:focus,
.theme-form .ant-select-focused .ant-select-selector,
.theme-form .ant-picker-focused {
  border-color: var(--theme-accent_color, #1890ff);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 按钮主题样式 */
.theme-button .ant-btn {
  background: var(--theme-button_bg, #1890ff);
  border-color: var(--theme-button_bg, #1890ff);
  color: var(--theme-button_text, #ffffff);
}

.theme-button .ant-btn:hover {
  background: var(--theme-button_hover, #40a9ff);
  border-color: var(--theme-button_hover, #40a9ff);
}

/* 导航主题样式 */
.theme-nav .ant-menu {
  background: var(--theme-nav_bg, #001529);
  color: var(--theme-nav_text, #ffffff);
}

.theme-nav .ant-menu-item:hover {
  background: var(--theme-nav_hover_bg, #1890ff);
}

.theme-nav .ant-menu-item-selected {
  background: var(--theme-nav_selected_bg, #1890ff);
}

/* 侧边栏主题样式 */
.theme-sider {
  background: var(--theme-sider_bg, #001529);
  border-right-color: var(--theme-border_color, #d9d9d9);
}

/* 页脚主题样式 */
.theme-footer {
  background: var(--theme-footer_bg, #f0f2f5);
  color: var(--theme-text_secondary, #666666);
  border-top-color: var(--theme-border_color, #d9d9d9);
}

/* 面包屑主题样式 */
.theme-breadcrumb .ant-breadcrumb-link {
  color: var(--theme-text_secondary, #666666);
}

.theme-breadcrumb .ant-breadcrumb-link:hover {
  color: var(--theme-accent_color, #1890ff);
}

/* 标签页主题样式 */
.theme-tabs .ant-tabs-tab {
  color: var(--theme-text_secondary, #666666);
}

.theme-tabs .ant-tabs-tab-active {
  color: var(--theme-accent_color, #1890ff);
}

.theme-tabs .ant-tabs-ink-bar {
  background: var(--theme-accent_color, #1890ff);
}

/* 分页主题样式 */
.theme-pagination .ant-pagination-item {
  border-color: var(--theme-border_color, #d9d9d9);
  color: var(--theme-text_primary, #333333);
}

.theme-pagination .ant-pagination-item:hover {
  border-color: var(--theme-accent_color, #1890ff);
  color: var(--theme-accent_color, #1890ff);
}

.theme-pagination .ant-pagination-item-active {
  background: var(--theme-accent_color, #1890ff);
  border-color: var(--theme-accent_color, #1890ff);
  color: #ffffff;
}

/* Homecontent组件主题样式 */
.theme-homecontent {
  background: var(--theme-background_color, #f0f2f5) !important;
}

.theme-homecontent .ant-tabs {
  background: var(--theme-card_bg, #ffffff) !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0 8px;
}

.theme-homecontent .ant-tabs-tab {
  color: var(--theme-text_secondary, #666666) !important;
}

.theme-homecontent .ant-tabs-tab-active {
  color: var(--theme-accent_color, #1890ff) !important;
}

.theme-homecontent .ant-tabs-ink-bar {
  background: var(--theme-accent_color, #1890ff) !important;
}

.theme-homecontent .ant-card {
  background: var(--theme-card_bg, #ffffff) !important;
  border-color: var(--theme-border_color, #d9d9d9) !important;
  color: var(--theme-text_primary, #333333) !important;
}

.theme-homecontent .ant-card:hover {
  border-color: var(--theme-accent_color, #1890ff) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.theme-homecontent .ant-divider {
  border-color: var(--theme-border_color, #d9d9d9) !important;
}

/* 主题预览模态框样式 */
.theme-preview-modal .ant-modal-body {
  padding: 0;
  max-height: 80vh;
  overflow-y: auto;
}

.theme-preview-container {

}

.preview-header {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-content {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-content h3,
.preview-content h4 {
  margin: 0;
  line-height: 1.4;
}

.preview-content .ant-btn {
  border: none;
  font-weight: 500;
}

.preview-content .ant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 响应式预览 */
@media (max-width: 768px) {
  .theme-preview-modal {
    width: 95% !important;
    max-width: none !important;
  }
  
  .theme-preview-container {
    padding: 16px;
  }
  
  .preview-content .ant-btn {
    font-size: 12px;
    padding: 4px 8px;
  }
}

/* 预设主题卡片样式 */
.preset-theme-card {
  transition: all 0.3s ease !important;
}

.preset-theme-card:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.preset-theme-card .ant-card-head {
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 8px 12px;
  text-align: center;
}

.preset-theme-card .ant-card-head-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.preset-theme-card .ant-card-body {
  padding: 12px;
  text-align: center;
}

.preset-theme-card .color-preview {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preset-theme-card .color-preview > div {
  display: flex !important;
  gap: 4px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}

.preset-theme-card .color-preview > div > div {
  width: 20px !important;
  height: 20px !important;
  border-radius: 4px !important;
  border: 1px solid #fff !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
  flex-shrink: 0 !important;
  display: block !important;
}

.preset-theme-card .apply-btn {
  border-radius: 4px;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.preset-theme-card .apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* 移动端优化 */
@media (max-width: 768px) {
  .preset-theme-card {
    margin-bottom: 8px;
  }
  
  .preset-theme-card .ant-card-head {
    padding: 6px 8px;
  }
  
  .preset-theme-card .ant-card-head-title {
    font-size: 12px;
  }
  
  .preset-theme-card .ant-card-body {
    padding: 8px;
  }
  
  .preset-theme-card .color-preview {
    padding: 8px;
    min-height: 50px;
  }
  
  .preset-theme-card .color-preview > div > div {
    width: 18px !important;
    height: 18px !important;
  }
  
  .preset-theme-card .apply-btn {
    font-size: 10px !important;
    padding: 1px 6px !important;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .preset-theme-card .ant-card-head-title {
    font-size: 11px;
  }
  
  .preset-theme-card .color-preview > div > div {
    width: 16px !important;
    height: 16px !important;
  }
  
  .preset-theme-card .ant-card-body {
    padding: 6px;
  }
  
  .preset-theme-card .color-preview {
    padding: 6px;
    min-height: 45px;
  }
}

