/* Extracted from v2.5 inline style block #4. v3.0-alpha split packaging. */
/* =========================================================
   布局优化：左侧页面导航固定 + 删除行列缩窄
   只改显示布局，不改数据库、RLS、保存、统计逻辑
   ========================================================= */

/* 桌面端：左侧导航固定在屏幕内，往下滚动也一直可见 */
@media (min-width: 901px){
  .sidebar-layout{
    display:block!important;
    width:100%!important;
  }

  .sidebar-nav{
    position:fixed!important;
    left:24px!important;
    top:24px!important;
    width:300px!important;
    max-height:calc(100vh - 48px)!important;
    overflow-y:auto!important;
    z-index:120!important;
    box-sizing:border-box!important;
  }

  .main-content-flex{
    margin-left:324px!important;
    width:calc(100vw - 372px)!important;
    max-width:none!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  .wrap{
    padding-left:24px!important;
    padding-right:24px!important;
  }
}

/* 超宽屏 / 缩放场景：继续铺满右侧，不出现大空白 */
@media (min-width: 1600px){
  .sidebar-nav{
    width:310px!important;
  }
  .main-content-flex{
    margin-left:334px!important;
    width:calc(100vw - 382px)!important;
  }
}

/* 小屏：导航恢复为顶部，不固定在左边 */
@media (max-width: 900px){
  .sidebar-layout{
    display:flex!important;
    flex-direction:column!important;
  }
  .sidebar-nav{
    position:sticky!important;
    top:8px!important;
    left:auto!important;
    width:100%!important;
    max-height:none!important;
  }
  .main-content-flex{
    margin-left:0!important;
    width:100%!important;
  }
}

/* 表格不再强行把最后一列撑满，避免“删除行”特别宽 */
#fundTable,
#accountTable{
  width:max-content!important;
  min-width:max-content!important;
  table-layout:auto!important;
}

/* 删除行列缩窄 */
#fundTable th:last-child,
#fundTable td:last-child,
#accountTable th:last-child,
#accountTable td:last-child{
  min-width:62px!important;
  width:62px!important;
  max-width:62px!important;
  white-space:nowrap!important;
  text-align:center!important;
}

/* 删除按钮更小，不占空间 */
#fundTable td:last-child button,
#accountTable td:last-child button{
  min-width:30px!important;
  width:30px!important;
  height:26px!important;
  padding:2px 0!important;
  border-radius:8px!important;
  font-size:12px!important;
  line-height:1!important;
}

/* 表头“删除行”文字优化 */
#fundTable th:last-child .col-name,
#accountTable th:last-child .col-name{
  font-size:12px!important;
  padding:4px!important;
}

/* 防止宽屏下表格区域被删除列撑出奇怪空白 */
.scroll{
  overflow:auto!important;
  width:100%!important;
  max-width:100%!important;
}

/* 表格底部分页保持全宽但不挤压表格 */
.pagination-bar{
  width:100%!important;
  box-sizing:border-box!important;
}
