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;
}

/* 全局 Tabs：统一为紧凑、可滑动的胶囊式导航 */
.ant-tabs-top > .ant-tabs-nav {
  margin: 0 0 14px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(31, 61, 100, 0.08);
  border-radius: 13px;
  box-shadow: 0 3px 12px rgba(31, 61, 100, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ant-tabs-top > .ant-tabs-nav::before,
.ant-tabs-top > .ant-tabs-nav .ant-tabs-ink-bar {
  display: none;
}

.ant-tabs-top > .ant-tabs-nav .ant-tabs-nav-list {
  gap: 2px;
}

.ant-tabs-top > .ant-tabs-nav .ant-tabs-tab {
  margin: 0 !important;
  padding: 7px 13px;
  color: #6b7280;
  border-radius: 9px;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ant-tabs-top > .ant-tabs-nav .ant-tabs-tab:hover {
  color: var(--theme-accent_color, #1677ff);
  background: rgba(22, 119, 255, 0.06);
}

.ant-tabs-top > .ant-tabs-nav .ant-tabs-tab-active {
  background: var(--theme-primary_soft_bg, rgba(22, 119, 255, 0.11));
  box-shadow: 0 1px 4px rgba(22, 119, 255, 0.1);
}

.ant-tabs-top > .ant-tabs-nav .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: var(--theme-accent_color, #1677ff) !important;
  font-weight: 650;
}

.ant-tabs-top > .ant-tabs-nav .ant-tabs-tab-btn:focus-visible {
  outline: 2px solid var(--theme-accent_color, #1677ff);
  outline-offset: 2px;
  border-radius: 5px;
}

@media (max-width: 768px) {
  .ant-tabs-top > .ant-tabs-nav {
    margin-bottom: 12px;
    border-radius: 11px;
  }

  .ant-tabs-top > .ant-tabs-nav .ant-tabs-tab {
    padding: 7px 11px;
    font-size: 13px;
  }

  .ant-tabs-top > .ant-tabs-nav .ant-tabs-nav-operations {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: -6px 0 10px rgba(255, 255, 255, 0.9);
  }
}

/* 全局 Card：统一边界、层次与交互反馈 */
.ant-card {
  border-color: rgba(31, 61, 100, 0.09);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 14px rgba(31, 61, 100, 0.055);
}

/* 记账模块及其子页面：统一面包屑为紧凑的路径导航 */
.ant-breadcrumb {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100%;
  flex: none !important;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ant-breadcrumb ol {
  flex-wrap: nowrap;
  align-items: center;
}

.ant-breadcrumb .ant-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8e8e93;
  font-size: 14px;
  line-height: 20px;
  transition: color 0.2s ease;
}

.ant-breadcrumb li:not(:last-child) .ant-breadcrumb-link {
  cursor: pointer;
}

.ant-breadcrumb li:not(:last-child) .ant-breadcrumb-link:hover {
  color: #007aff;
}

.ant-breadcrumb .ant-breadcrumb-separator {
  margin-inline: 7px;
  color: #c7c7cc;
}

.ant-breadcrumb li:last-child .ant-breadcrumb-link {
  color: #1c1c1e;
  font-weight: 600;
}

@media (max-width: 768px) {
  .ant-breadcrumb {
    display: inline-flex;
    width: fit-content !important;
    padding: 8px 12px;
    border-radius: 12px;
  }

  .ant-breadcrumb .ant-breadcrumb-link {
    max-width: 110px;
    overflow: hidden;
    font-size: 13px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ant-breadcrumb .ant-breadcrumb-separator {
    margin-inline: 5px;
  }
}

/* 财通配置：顶部图标标签 */
.ctpz-tabs > .ant-tabs-nav::before {
  border-bottom: 0 !important;
}

.ctpz-tabs > .ant-tabs-nav .ant-tabs-nav-list {
  gap: 6px;
}

.ctpz-tabs > .ant-tabs-nav .ant-tabs-tab {
  margin: 0 !important;
  padding: 8px 14px !important;
  border-radius: 10px;
  color: #667085;
  transition: all 0.2s ease;
}

.ctpz-tabs > .ant-tabs-nav .ant-tabs-tab-active {
  background: rgba(54, 88, 216, 0.1);
}

.ctpz-tabs > .ant-tabs-nav .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: #3658d8 !important;
  font-weight: 600;
}

.ctpz-tabs > .ant-tabs-nav .ant-tabs-ink-bar {
  display: none;
}

@media (max-width: 768px) {
  .ctpz-tabs > .ant-tabs-nav .ant-tabs-tab {
    padding: 7px 10px !important;
    font-size: 12px;
  }
}

/* 财通配置 - 基础资料 */
.jczl-page {
  padding: 2px 4px 22px;
}

.jczl-page .jczl-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 4px 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(54, 88, 216, 0.1), rgba(126, 87, 194, 0.08));
  border: 1px solid rgba(54, 88, 216, 0.12);
}

.jczl-page .jczl-intro-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #3658d8, #7b61d9);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 5px 12px rgba(54, 88, 216, 0.22);
}

.jczl-page .jczl-intro-title {
  color: #1f2937;
  font-size: 16px;
  font-weight: 700;
}

.jczl-page .jczl-intro-subtitle {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
}

.jczl-page .jczl-action-grid {
  justify-content: flex-start !important;
  padding: 0 4px 12px !important;
  gap: 10px !important;
}

.jczl-page .jczl-action-button {
  width: 142px !important;
  height: 42px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #3658d8 !important;
  border: 1px solid rgba(54, 88, 216, 0.18) !important;
  box-shadow: 0 3px 10px rgba(25, 42, 70, 0.05) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 600;
}

.jczl-page .jczl-action-button:hover {
  color: #fff !important;
  background: linear-gradient(135deg, #3658d8, #745ed1) !important;
  border-color: transparent !important;
  transform: translateY(-1px) !important;
}

.jczl-page .responsive-card.ant-card {
  margin: 0 4px 12px !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.07) !important;
  border-radius: 15px !important;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045) !important;
}

.jczl-page .responsive-card .ant-card-head {
  min-height: 46px;
  padding: 0 16px;
  background: #fbfcff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.jczl-page .responsive-card .ant-card-head-title {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.jczl-page .responsive-card .ant-card-body {
  padding: 12px 14px;
}

.jczl-page .list-container {
  height: auto !important;
  min-height: 42px;
  margin: 0 !important;
  padding: 2px !important;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  overflow: visible !important;
}

.jczl-page .list-item {
  height: 34px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  border: 0 !important;
  box-shadow: none !important;
}

.jczl-page .list-container .ant-btn-default {
  color: #3658d8;
  background: #edf2ff;
}

.jczl-page .jczl-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.jczl-page .jczl-color-swatches {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.jczl-page .jczl-color-swatches > button:not(.jczl-more-gradient) {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.13);
  cursor: pointer;
}

.jczl-page .jczl-color-swatches > button.selected,
.jczl-page .jczl-gradient-popover > button.selected {
  border-color: #1677ff !important;
  outline: 2px solid rgba(22, 119, 255, 0.16);
  outline-offset: 1px;
}

.jczl-page .jczl-text-swatches > button:not(.jczl-more-gradient) {
  border-radius: 50%;
  border-color: rgba(15, 23, 42, 0.15);
}

.jczl-page .jczl-more-gradient {
  height: 28px;
  border-radius: 8px;
  color: #3658d8;
  border-color: rgba(54, 88, 216, 0.2);
}

.jczl-gradient-popover {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 270px;
}

.jczl-gradient-popover > button {
  height: 40px;
  padding: 0 4px;
  color: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

/* 收支报表 */
.ctbb-report-page {
  min-height: 0;
  padding-bottom: 18px;
}

.ctbb-report-page .ant-tabs-content-holder {
  overflow: visible;
}

.ctbb-toolbar {
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px !important;
  border: 1px solid rgba(31, 61, 100, 0.08);
  border-radius: 14px !important;
  box-shadow: 0 3px 12px rgba(31, 61, 100, 0.05) !important;
}

.ctbb-tool-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 8px;
  background: #f8faff;
  border: 1px solid rgba(54, 88, 216, 0.09);
  border-radius: 10px;
}

.ctbb-tool-field > span {
  flex: none;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.ctbb-toolbar .ctbb-tool-field .ant-select {
  width: 94px !important;
  margin-right: 0 !important;
}

.ctbb-toolbar .ctbb-year-select {
  width: 104px !important;
  min-width: 0 !important;
  height: 30px !important;
  padding: 0 7px !important;
  color: #344054;
  background: #fff !important;
  border-color: rgba(54, 88, 216, 0.14) !important;
  border-radius: 8px !important;
}

.ctbb-toolbar .ant-btn {
  margin-left: 0 !important;
  border-radius: 9px;
}

.ctbb-toolbar .ctbb-refresh-button {
  width: 34px;
  padding: 0;
  color: #3658d8;
  background: #edf2ff;
  border-color: #dbe5ff;
}

.ctbb-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.ctbb-summary-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.045);
}

.ctbb-summary-item span {
  color: #667085;
  font-size: 12px;
}

.ctbb-summary-item strong {
  overflow: hidden;
  color: #344054;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ctbb-summary-item.income { background: linear-gradient(135deg, #f3fff5, #fff); }
.ctbb-summary-item.income strong { color: #20a04b; }
.ctbb-summary-item.expense { background: linear-gradient(135deg, #fff5f5, #fff); }
.ctbb-summary-item.expense strong { color: #e5484d; }
.ctbb-summary-item.net { background: linear-gradient(135deg, #f1f6ff, #fff); }
.ctbb-summary-item.net strong { color: #2563eb; }
.ctbb-summary-item.net.negative strong { color: #e5484d; }

.ctbb-chart-card {
  border: 1px solid rgba(31, 61, 100, 0.08);
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(31, 61, 100, 0.06) !important;
}

.ctbb-detail-section {
  overflow: visible !important;
  max-height: none !important;
}

.ctbb-month-grid {
  overflow: visible !important;
  padding: 10px 0 !important;
}

.ctbb-month-list {
  display: block !important;
  min-width: 0 !important;
}

.ctbb-heatmap {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fbf8, #f4f7fb);
  width: 100%;
}

.ctbb-heat-cell {
  display: flex;
  min-width: 0;
  min-height: 62px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 9px;
  box-shadow: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  color: #14532d;
  cursor: default;
  font-family: inherit;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.ctbb-heat-cell.negative {
  color: #7f1d1d;
}

.ctbb-heat-cell:hover {
  z-index: 1;
  transform: scale(1.035);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.14);
  filter: saturate(1.06);
}

.ctbb-heat-cell > span {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.78;
}

.ctbb-heat-cell > strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ctbb-heatmap-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ctbb-heatmap-heading > span {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.ctbb-heatmap-heading > em {
  color: #98a2b3;
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
}

@media (max-width: 768px) {
  .ctbb-toolbar {
    align-items: center !important;
    margin-bottom: 10px !important;
    gap: 7px;
    flex-wrap: nowrap !important;
  }

  .ctbb-tool-field {
    flex: 1 1 0;
    min-width: 0;
    gap: 5px;
    padding: 4px 6px;
  }

  .ctbb-toolbar .ctbb-tool-field .ant-select,
  .ctbb-toolbar .ctbb-year-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .ctbb-toolbar .ant-btn {
    width: 34px;
    min-width: 34px;
    flex: none;
  }

  .ctbb-summary-grid {
    gap: 7px;
    margin: 8px 0;
  }

  .ctbb-summary-item {
    padding: 10px 9px;
    border-radius: 11px;
  }

  .ctbb-summary-item span { font-size: 11px; }
  .ctbb-summary-item strong { font-size: 13px; }

  .ctbb-chart-card {
    padding: 6px !important;
    border-radius: 12px !important;
  }

  .ctbb-heatmap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
  }

  .ctbb-heat-cell {
    min-height: 62px;
    padding: 8px;
    border-radius: 9px;
  }

  .ctbb-heat-cell > span {
    font-size: 11px;
  }

  .ctbb-heat-cell > strong {
    font-size: 12px;
  }

  .ctbb-heatmap-heading {
    gap: 5px;
  }

  .ctbb-heatmap-heading > em {
    font-size: 10px;
  }
}

@media (max-width: 768px) {
  .jczl-page {
    padding: 0 1px 16px;
  }

  .jczl-page .jczl-intro {
    margin: 2px 2px 10px;
    padding: 12px;
  }

  .jczl-page .jczl-action-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 2px 10px !important;
    gap: 8px !important;
  }

  .jczl-page .jczl-action-grid .jczl-action-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
  }

  .jczl-page .responsive-card.ant-card {
    margin: 0 2px 10px !important;
  }

  .jczl-page .list-container {
    align-items: flex-start;
    gap: 6px;
  }

  .jczl-page .list-item {
    max-width: 100%;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .jczl-page .jczl-color-row {
    align-items: flex-start;
  }

  .jczl-page .jczl-color-swatches > button:not(.jczl-more-gradient) {
    width: 26px;
    height: 26px;
  }

  .jczl-gradient-popover {
    width: min(260px, calc(100vw - 56px));
  }
}

.ant-card .ant-card-head {
  min-height: 48px;
  padding: 0 16px;
  background: linear-gradient(135deg, rgba(249, 251, 255, 0.96), rgba(255, 255, 255, 0.96));
  border-bottom-color: rgba(31, 61, 100, 0.07);
}

.ant-card .ant-card-head-title {
  padding: 13px 0;
  color: #1c1c1e;
  font-weight: 650;
}

.ant-card-hoverable,
.ant-card[role='button'] {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ant-card-hoverable:hover,
.ant-card[role='button']:hover {
  border-color: rgba(22, 119, 255, 0.2);
  box-shadow: 0 8px 22px rgba(31, 61, 100, 0.11);
  transform: translateY(-2px);
}

/* 日账单与年账单：统一工具栏和内容容器 */
.ctjh-day-ledger .dateContainer,
.ctjh-year-ledger .dateContainer {
  padding: 8px 10px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(31, 61, 100, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 3px 12px rgba(31, 61, 100, 0.05) !important;
}

.ctjh-day-ledger .dateContainer input,
.ctjh-year-ledger .dateContainer select {
  border-color: #dce5f0 !important;
  border-radius: 9px !important;
  box-shadow: none !important;
}

.ctjh-day-bill-list {
  padding: 8px !important;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(31, 61, 100, 0.06);
  border-radius: 14px;
}

.ctjh-year-month-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start !important;
  gap: 10px !important;
  min-height: 0 !important;
  padding: 10px !important;
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(31, 61, 100, 0.06) !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 14px rgba(31, 61, 100, 0.05) !important;
}

.ctjh-year-month-grid > * {
  width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 768px) {
  .ant-card {
    border-radius: 12px;
  }

  .ant-card .ant-card-head {
    min-height: 44px;
    padding: 0 12px;
  }

  .ctjh-day-bill-list {
    padding: 6px !important;
    border-radius: 12px;
  }

  .ctjh-year-month-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px !important;
    padding: 7px !important;
    border-radius: 12px !important;
  }
}

/* 页面包裹容器建议使用该类，确保填满屏幕且与安全区对齐 */
.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;
  }
}

