/**
 * 账户表格列宽调整样式
 * 只显示两列：账户名称和部门余额
 */

/* 账户表格列宽设置 */
.account-table {
    table-layout: fixed !important; /* 使用固定表格布局 */
    width: 100% !important;
}

/* 账户名称列 - 设置为40%宽度 */
.account-table th:first-child,
.account-table td:first-child {
    width: 40% !important; /* 账户列占40%宽度 */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 0 !important; /* 确保text-overflow生效 */
}

/* 部门余额列 - 设置为60%宽度 */
.account-table th:nth-child(2),
.account-table td:nth-child(2) {
    width: 60% !important; /* 部门余额列占60%宽度 */
    text-align: right !important;
    padding-right: 8px !important;
}

/* 隐藏第三列（实际余额列） */
.account-table th:nth-child(3),
.account-table td:nth-child(3) {
    display: none !important; /* 隐藏第三列 */
}

/* 账户名称列文字溢出处理 */
.account-table td:first-child {
    padding-right: 5px !important;
    padding-left: 5px !important;
}

/* 确保账户图标和名称在一行显示 */
.account-table td:first-child .me-1 {
    margin-right: 2px !important;
}

/* 创建账户名称容器，确保截断正确显示 */
.account-table td:first-child span:not(.me-1) {
    display: inline-block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100% - 20px) !important; /* 减去图标宽度 */
    vertical-align: middle !important;
}

/* 余额类型切换按钮样式 */
#toggleBalanceType {
    transition: all 0.2s ease !important;
}

#toggleBalanceType:hover {
    background-color: #0056b3 !important;
    transform: scale(1.1) !important;
}

#toggleBalanceType:active {
    background-color: #004085 !important;
    transform: scale(0.95) !important;
}

/* 确保按钮图标垂直居中 */
#toggleBalanceType i {
    display: inline-block !important;
    vertical-align: middle !important;
}

/* 账户表格第一列样式 */
.account-table td:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    font-size: 0.85rem;
}

/* 账户表格特定列设置 */
.account-table-container .table td:first-child {
    text-align: left !important;
}

.account-table-container .table td:nth-child(2),
.account-table-container .table td:nth-child(3) {
    text-align: right !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.account-table td:first-child .me-1 {
    margin-right: 2px !important;
}

/* 财务记录表格交替背景色 */
.data-table tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f8f9fa !important;
}

.data-table tbody tr:nth-child(odd) td {
    background-color: #ffffff !important;
}

.data-table tbody tr:nth-child(even) td {
    background-color: #f8f9fa !important;
}

/* 被选中行的显眼样式 */
.data-table tbody tr.selected {
    background-color: #e3f2fd !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3) !important;
    position: relative !important;
}

.data-table tbody tr.selected td {
    background-color: #e3f2fd !important;
    font-weight: 500 !important;
}

/* 鼠标悬停效果 */
.data-table tbody tr:hover:not(.selected) {
    background-color: #f5f5f5 !important;
    transition: background-color 0.2s ease !important;
}

.data-table tbody tr:hover:not(.selected) td {
    background-color: #f5f5f5 !important;
    transition: background-color 0.2s ease !important;
}

/* 被选中行的复选框样式 */
.data-table tbody tr.selected .form-check-input:checked {
    background-color: #2196f3 !important;
    border-color: #2196f3 !important;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2) !important;
} 