/* 数据录入页面全屏优化 */
/* 使用 body[data-page="data-input"] 选择器，与 index.html 中的 layout-override 配合 */

body[data-page="data-input"] .app-layout {
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

body[data-page="data-input"] .app-main {
  padding: 4px 8px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - var(--navbar-height)) !important;
}

/* app-main 的直接子元素（Suspense/Gd 包装器） */
body[data-page="data-input"] .app-main > * {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* DataInputPage 根 div */
body[data-page="data-input"] .app-main > * > * {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* 标题行 (h1 数据录入) */
body[data-page="data-input"] .app-main > * > * > div:first-child {
  flex-shrink: 0 !important;
  margin-bottom: 2px !important;
}
body[data-page="data-input"] .app-main > * > * > div:first-child h1 {
  margin: 0 !important;
  font-size: 16px !important;
}

/* tab 行 */
body[data-page="data-input"] .app-main > * > * > div:nth-child(2) {
  flex-shrink: 0 !important;
  margin-bottom: 4px !important;
}

body[data-page="data-input"] .glass-card {
  padding: 4px !important;
  margin-bottom: 0 !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* B/X 组件根 div */
body[data-page="data-input"] .glass-card > div:first-child {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* 按钮行 (新增行/保存数据) */
body[data-page="data-input"] .glass-card > div:first-child > div:first-child {
  flex-shrink: 0 !important;
  margin-bottom: 6px !important;
  min-height: 32px !important;
}

body[data-page="data-input"] .table-scroll-wrapper {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  margin-top: 0 !important;
  overflow: auto !important;
}

/* 横向滚动条加宽 */
body[data-page="data-input"] .table-scroll-wrapper::-webkit-scrollbar {
  height: 20px !important;
  width: 20px !important;
}
body[data-page="data-input"] .table-scroll-wrapper::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.06) !important;
  border-radius: 4px !important;
}
body[data-page="data-input"] .table-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.25) !important;
  border-radius: 4px !important;
}
body[data-page="data-input"] .table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.4) !important;
}

body[data-page="data-input"] .review-table {
  width: 100% !important;
  font-size: 12px !important;
}

body[data-page="data-input"] .review-table th,
body[data-page="data-input"] .review-table td {
  padding: 4px 6px !important;
  font-size: 11px !important;
}

body[data-page="data-input"] .cell-display {
  min-height: 24px !important;
  font-size: 11px !important;
  padding: 4px 6px !important;
}

body[data-page="data-input"] .cell-editing input {
  padding: 2px 4px !important;
  font-size: 11px !important;
}

/* 其他页面保留滚动+紧凑间距 */
body[data-page="chart"] .app-main,
body[data-page="review"] .app-main,
body[data-page="trade"] .app-main {
  overflow-y: auto !important;
}
