/* 动态框架样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Agent执行进度条样式 */
.execution-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

.execution-progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.execution-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
    animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.execution-progress-text {
    font-size: 12px;
    color: #495057;
    font-weight: 500;
    text-align: center;
}

.execution-progress-detail {
    font-size: 11px;
    color: #6c757d;
    text-align: center;
}

/* 表格输入样式 */
.table-input-container {
    width: 100%;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
    overflow-y: visible;
    background: white;
    position: relative;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
    /* 确保容器可以显示滚动条 */
    display: block;
    
    /* Fix for dropdown clipping while maintaining horizontal scroll */
    overflow-x: auto;
    overflow-y: visible;
}

/* 确保表格容器内的表格可以超出容器宽度 */
.table-input-container .table-input-table {
    margin: 0;
}

.table-input-table {
    border-collapse: collapse;
    font-size: 13px;
    position: relative;
    z-index: 1;
    table-layout: fixed;
    /* 表格宽度由JavaScript根据列宽度计算设置 */
    width: auto;
    /* 移除 min-width: 100%，让表格宽度由列宽度之和决定 */
    /* 确保表格不会被压缩 */
    white-space: nowrap;
}

.table-input-table thead {
    background-color: #f8f9fa;
}

.table-input-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 确保列宽不被压缩 */
    box-sizing: border-box;
    /* 强制应用内联样式设置的宽度 */
    width: auto;
}

.table-input-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    overflow: visible;
    /* 确保列宽不被压缩 */
    box-sizing: border-box;
    /* 强制应用内联样式设置的宽度 */
    width: auto;
}

/* Ensure table cells can properly display dropdowns */
.table-input-table td {
    overflow: visible;
}

.table-input-table td .standard-multi-select-wrapper {
    position: relative;
    z-index: 10;
}

.table-input-table td .standard-multi-select-wrapper.open {
    z-index: 10000;
    overflow: visible;
}

.table-input-table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-input-table tbody tr:last-child td {
    border-bottom: none;
}

.table-input-select,
.table-input-text,
.table-input-number {
    width: 100%;
    min-width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    box-sizing: border-box;
}

.table-input-select:focus,
.table-input-text:focus,
.table-input-number:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 表格字段包装器 - 标签在左侧，与其他字段标签对齐 */
.table-field-group {
    width: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    /* 确保表格字段组与其他字段的间距一致 */
}

.table-field-col {
    width: 100%;
    /* grid-column is set dynamically via inline style in JavaScript */
}

.table-field-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding: 0;
}

.table-field-label {
    min-width: 100px;
    max-width: 100px;
    padding-top: 8px;
    font-weight: 500;
    color: #333;
    flex-shrink: 0;
    text-align: left;
    padding-right: 5px;
    line-height: 1.2;
    display: block;
    font-size: 13px;
    margin-bottom: 0;
    order: 1;
}

/* Fix for underlying_code label alignment */
.table-field-wrapper .table-field-label[for="underlying_code"] {
    text-align: left;
    order: 1 !important;
}

.table-field-wrapper .table-field-content {
    order: 2 !important;
}

.table-field-content {
    flex: 1;
    min-width: 0;
    order: 2;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    
    /* Fix for dropdown clipping while maintaining horizontal scroll */
    overflow-x: auto;
    overflow-y: visible;
}

/* 确保表格容器内的表格可以超出容器宽度 */
.table-field-content .table-input-container {
    /* 移除 width: 100%，让容器根据表格内容自适应 */
    min-width: 0;
    /* 确保容器可以显示滚动条 */
    display: block;
}

.table-field-content .table-input-container .table-input-table {
    width: auto !important;
    /* 确保表格宽度不被压缩 */
    min-width: auto !important;
}

/* 自定义多选下拉框 */
.multi-select-dropdown {
    position: relative;
    width: 100%;
}

.multi-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-height: 38px;
    line-height: 22px;
    user-select: none;
    transition: all 0.2s ease;
}

.multi-select-display:hover {
    border-color: #80bdff;
}

.multi-select-dropdown.open .multi-select-display {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.multi-select-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.multi-select-text:empty::before {
    content: '请选择';
    color: #999;
}

.multi-select-arrow {
    margin-left: 8px;
    color: #666;
    font-size: 12px;
    transition: transform 0.2s;
}

.multi-select-dropdown.open .multi-select-arrow {
    transform: rotate(180deg);
}

.multi-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: white;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: -1px;
    animation: slideDown 0.2s ease-out;
    display: block;
    
    /* Fix for dropdown clipping in containers */
    transform: translateZ(10px);
    will-change: transform;
    /* Ensure proper positioning above scrollbars */
    isolation: isolate;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.multi-select-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.multi-select-option:hover {
    background-color: #f8f9fa;
}

.multi-select-option input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #007bff;
    /* Ensure checkbox is always on the left */
    position: relative;
    order: -1 !important;
}

.multi-select-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    /* Ensure label is always on the right and left-aligned */
    text-align: left;
    order: 1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 标准样式的多选下拉框 - 与普通select样式一致 */
.standard-multi-select-wrapper {
    position: relative;
    width: 100%;
}

/* 标签显示区域 */
.standard-multi-select-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    min-height: 24px;
}

.standard-multi-select-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    font-size: 12px;
    color: #0066cc;
    gap: 6px;
}

.standard-multi-select-tag .tag-text {
    flex: 1;
}

.standard-multi-select-tag .tag-remove {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #0066cc;
    font-weight: bold;
    padding: 0 2px;
    transition: color 0.2s;
}

.standard-multi-select-tag .tag-remove:hover {
    color: #dc3545;
}

/* 多选框选中内容展示：小号字体 */
.standard-multi-select-tags,
.standard-multi-select-tag,
.standard-multi-select-tag .tag-text,
.standard-multi-select-display .standard-multi-select-text {
    font-size: 9px;
}
.standard-multi-select-tag .tag-remove {
    font-size: 10px;
}

.standard-multi-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-height: 32px;
    line-height: 20px;
    user-select: none;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.standard-multi-select-display:hover {
    border-color: #80bdff;
}

.standard-multi-select-wrapper.open .standard-multi-select-display {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.standard-multi-select-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
    font-size: 13px;
}

.standard-multi-select-text:empty::before {
    content: '请选择';
    color: #999;
}

.standard-multi-select-arrow {
    margin-left: 8px;
    color: #666;
    font-size: 12px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.standard-multi-select-wrapper.open .standard-multi-select-arrow {
    transform: rotate(180deg);
}

.standard-multi-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: white;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: -1px;
    animation: slideDown 0.2s ease-out;
    display: block;
    
    /* Fix for dropdown clipping in containers */
    transform: translateZ(10px);
    will-change: transform;
    /* Ensure proper positioning above scrollbars */
    isolation: isolate;
}

.standard-multi-select-wrapper {
    position: relative;
    width: 100%;
    z-index: 10;
}

.standard-multi-select-wrapper.open {
    z-index: 10000;
}

/* Fix for multi-select dropdown clipping in table cells */
.table-input-table td .standard-multi-select-wrapper.open {
    z-index: 10000;
    position: relative;
}

.table-input-table td .standard-multi-select-options {
    z-index: 10001;
    position: fixed;
    overflow-y: auto;
    max-height: 200px;
    /* Ensure dropdown appears above scrolling container */
    transform: translateZ(10px);
    /* Position relative to viewport */
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
}

/* Fix for custom multi-select dropdown clipping in table cells */
.table-input-table td .multi-select-dropdown.open {
    z-index: 10000;
    position: relative;
}

.table-input-table td .multi-select-options {
    z-index: 10001;
    position: fixed;
    overflow-y: auto;
    max-height: 200px;
    /* Ensure dropdown appears above scrolling container */
    transform: translateZ(10px);
    /* Position relative to viewport */
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
}

/* Fix for multi-select option alignment in table cells */
.table-input-table td .multi-select-option {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.table-input-table td .multi-select-option input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #007bff;
    /* Ensure checkbox is always on the left */
    position: relative;
    order: -1 !important;
}

.table-input-table td .multi-select-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    /* Ensure label is always on the right and left-aligned */
    text-align: left;
    order: 1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 全选/反选按钮区域 */
.standard-multi-select-actions {
    display: flex;
    gap: 12px;
    padding: 8px 10px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.select-all-btn,
.invert-select-btn {
    cursor: pointer;
    color: #007bff;
    font-size: 13px;
    padding: 2px 4px;
    transition: color 0.2s;
}

.select-all-btn:hover,
.invert-select-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

.standard-multi-select-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.standard-multi-select-option:hover {
    background-color: #f8f9fa;
}

.standard-multi-select-option input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #007bff;
    /* Ensure checkbox is always on the left */
    position: relative;
    order: -1 !important;
}

.standard-multi-select-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
    font-size: 13px;
    /* Ensure label is always on the right and left-aligned */
    text-align: left;
    order: 1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-action-cell {
    text-align: center;
    white-space: nowrap;
}

.btn-remove-row,
.btn-add-row {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-remove-row {
    background-color: #dc3545;
    color: white;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-remove-row:hover {
    background-color: #c82333;
}

.btn-add-row {
    background-color: #28a745;
    color: white;
    margin-top: 8px;
    padding: 8px 16px;
}

.btn-add-row:hover {
    background-color: #218838;
}

.input-suffix {
    margin-left: 4px;
    color: #6c757d;
    font-size: 13px;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 框架容器 */
.framework-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
}

/* 顶部导航栏 */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 999;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-switcher {
    display: flex;
    align-items: center;
}

.language-switcher .btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: 60px;
}

.user-info {
    font-size: 0.9rem;
    color: #666;
}

.logout-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    border: 1px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #dc3545;
    color: white;
}

/* 侧边栏（PRD_页面设计：深色、可折叠、localStorage） */
.sidebar {
    width: 280px;
    background: #0f172a;
    color: #cbd5e1;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    position: fixed;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.06);
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar.collapsed .sidebar-header-text,
.sidebar.collapsed .menu-item-text,
.sidebar.collapsed .menu-arrow,
.sidebar.collapsed .submenu,
.sidebar.collapsed .search-container {
    display: none !important;
}

.sidebar.collapsed .sidebar-header {
    padding: 12px 0;
    justify-content: center;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .menu-header {
    justify-content: center;
}

.sidebar.collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.sidebar-toggle-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.sidebar-toggle-icon {
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.3s;
}

.menu-container {
    padding: 10px 0;
    flex: 1;
}

/* 搜索栏 */
.search-container {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.1);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar .search-icon {
    color: #94a3b8;
}

.sidebar .search-input {
    background: rgba(0,0,0,0.2);
    border-color: rgba(255,255,255,0.1);
    color: #e2e8f0;
}

.sidebar .search-input:focus {
    border-color: #2563eb;
    background: rgba(0,0,0,0.25);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.sidebar .search-input::placeholder {
    color: #64748b;
}

.sidebar .search-separator {
    background: rgba(255,255,255,0.15);
}

.search-icon {
    position: absolute;
    left: 12px;
    color: #6c757d;
    font-size: 14px;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    background: #f8f9fa;
    color: #333;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.search-input::placeholder {
    color: #6c757d;
}

.search-separator {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: #dee2e6;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #cbd5e1 !important;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.menu-item.active {
    background: rgba(37, 99, 235, 0.2);
    color: #fff;
    border-left-color: #2563eb;
}

.menu-item-text {
    flex: 1;
    color: inherit !important;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
    color: #94a3b8;
    margin-left: auto;
    flex-shrink: 0;
}

.menu-arrow.expanded {
    transform: rotate(180deg);
}

/* 子菜单样式 */
.submenu {
    background: rgba(0,0,0,0.15);
    border-left: 3px solid rgba(255,255,255,0.1);
}

.submenu .menu-item {
    padding-left: 40px;
    font-size: 13px;
    color: #94a3b8;
}

.submenu .menu-item:hover {
    background: rgba(255,255,255,0.06);
    color: #cbd5e1;
}

.submenu .menu-item.active {
    background: rgba(37, 99, 235, 0.25);
    color: #fff;
    font-weight: 600;
    border-left-color: #2563eb;
}

/* 三级菜单进一步缩进 */
.submenu .submenu .menu-item,
.submenu .submenu .submenu-item {
    padding-left: 56px;
    font-size: 13px;
}

.submenu .submenu .menu-item.active,
.submenu .submenu .submenu-item.active {
    background: rgba(37, 99, 235, 0.25);
    color: #fff;
    font-weight: 600;
    border-left-color: #2563eb;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 280px;
    margin-top: 60px;
    background-color: #f5f5f5;
    overflow-x: auto;
    min-height: calc(100vh - 60px);
    transition: margin-left 0.3s ease;
}

body.sidebar-collapsed .main-content {
    margin-left: 64px;
}

/* 页面头部 */
.page-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title-section h1 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 5px;
}

.page-description {
    color: #666;
    font-size: 0.9rem;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 页面内容 */
.page-content {
    padding: 30px;
    min-height: calc(100vh - 120px);
    width: 100%;
    max-width: none; /* 移除最大宽度限制 */
}

/* 欢迎页面 */
.welcome-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.welcome-card:hover {
    transform: translateY(-5px);
}

.welcome-card h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.welcome-card ul, .welcome-card ol {
    padding-left: 20px;
}

.welcome-card li {
    margin-bottom: 10px;
    line-height: 1.8;
}

/* 动态表单 */
.dynamic-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 1000px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    color: #667eea;
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.section-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Form row - Grid layout for proper 3-column table structure */
.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 16px;
    width: 100%;
}

.form-col {
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Empty field styling - occupies space but invisible */
.empty-field {
    height: 60px;
    visibility: hidden;
    width: 100%;
}

/* 支持多列布局的form-fields容器 */
.form-fields {
    display: grid;
    gap: 15px;
    width: 100%;
    max-width: none; /* 允许超出容器宽度 */
    overflow-x: auto; /* 如果超出则显示滚动条 */
}

/* 表单容器平铺整个页面 */
.data-form {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-section {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 表单字段容器居中 */
.form-fields {
    display: grid;
    gap: 15px;
    width: 100%;
    max-width: none;
    overflow-x: auto;
    justify-content: center;
}

/* 表格前操作按钮样式 */
.form-actions-before-table {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 只读文本框样式 */
textarea[readonly] {
    background-color: #f8f9fa !important;
    border: 1px solid #ddd !important;
    color: #495057;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
}

textarea[readonly]:focus {
    outline: none;
    border-color: #2196f3 !important;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

/* JSON Viewer Styles */
.json-viewer-container {
    position: relative;
    margin-top: 8px;
    width: 100%;
    min-height: 400px;
}

.json-viewer {
    background: #2d2d2d !important;
    color: #f8f8f2 !important;
    padding: 20px !important;
    border-radius: 6px !important;
    overflow-x: auto !important;
    font-family: 'Courier New', monospace !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    min-height: 400px !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    border: 1px solid #444 !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.btn-copy-json {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
    transition: background 0.2s;
}

.btn-copy-json:hover {
    background: #0056b3;
}

.btn-copy-json:active {
    background: #004085;
}

/* 默认单列布局 */
.form-fields[style*="grid-template-columns: repeat(1, 1fr)"] {
    grid-template-columns: 1fr;
}

/* 双列布局 */
.form-fields[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: repeat(2, 1fr);
}

/* 三列布局 */
.form-fields[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(3, 1fr);
}

/* 四列布局 */
.form-fields[style*="grid-template-columns: repeat(4, 1fr)"] {
    grid-template-columns: repeat(4, 1fr);
}

/* 布局设置页面特殊样式 */
.layout-settings .form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.layout-settings .form-section h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 0;
}

.layout-settings textarea[readonly] {
    background-color: #e8f4fd;
    border: 1px solid #b3d9ff;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

/* 配置预览表格样式 */
.config-preview-container {
    margin-top: 20px;
    width: 100%;
    max-width: none; /* 移除最大宽度限制 */
}

.config-preview-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
    border: 1px solid #e0e0e0;
    min-width: 100%; /* 确保表格至少占满容器宽度 */
}

.config-preview-table thead {
    background: #f5f5f5;
    color: #333;
}

.config-preview-table th {
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #ddd;
    background: #f5f5f5;
}

.config-preview-table td {
    padding: 12px 16px;
    border: 1px solid #ddd;
    vertical-align: middle;
    text-align: center;
}

.config-preview-table tbody tr:hover {
    background-color: #fafafa;
    transition: background-color 0.2s ease;
}

.config-preview-table tbody tr:last-child td {
    border-bottom: none;
}

/* 页面名称单元格 */
.page-name-cell {
    min-width: 200px;
    text-align: left !important;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-icon {
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 6px;
    color: #666;
}

/* 配置值单元格 */
.config-value-cell {
    text-align: center;
    min-width: 100px;
}

.config-value {
    display: inline-block;
    padding: 4px 8px;
    background: #f8f8f8;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    border: 1px solid #e0e0e0;
}

/* 配置值单元格 */
.config-value-cell {
    text-align: center;
    min-width: 100px;
}

.config-value {
    display: inline-block;
    padding: 4px 8px;
    background: #f8f8f8;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    border: 1px solid #e0e0e0;
}

/* 操作按钮样式 */
.action-cell {
    text-align: center;
    min-width: 120px;
}

.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.edit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.view-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.reset-btn {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.config-preview-table .effect-row {
    background-color: #e8f4fd;
    font-style: italic;
}

.config-preview-table .effect-row:hover {
    background-color: #d1ecf1;
}

/* 当前页面高亮样式 */
.config-preview-table .current-page {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.config-preview-table .current-page:hover {
    background: #bbdefb;
}

/* 配置效果摘要样式 */
.config-effect-summary {
    margin-top: 20px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d1ecf1 100%);
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #3498db;
}

.config-effect-summary .effect-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.config-effect-summary .effect-icon {
    font-size: 1.2rem;
}

.config-effect-summary .effect-content {
    color: #34495e;
    line-height: 1.6;
    font-size: 0.95rem;
}

.config-effect-summary .effect-content strong {
    color: #2980b9;
    font-weight: 600;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95rem;
}

.required {
    color: #e74c3c;
    margin-right: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 表单操作区 */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* 模态框中的表单操作按钮 */
.modal-body .form-actions {
    margin-top: 10px;
    padding-top: 10px;
    flex-shrink: 0;
}

/* 加载提示 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息提示 */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

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

.toast-content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: #28a745;
}

.toast-error .toast-icon {
    background: #dc3545;
}

.toast-warning .toast-icon {
    background: #ffc107;
}

.toast-info .toast-icon {
    background: #17a2b8;
}

/* 字段管理器样式 */
.field-manager {
    margin-top: 20px;
}

.field-list {
    margin-bottom: 20px;
}

.field-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.field-section h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.field-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.field-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.field-label {
    font-weight: 500;
    color: #333;
}

.field-type {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.field-required {
    background: #d4edda;
    color: #155724;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.field-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Ensure Select2 dropdowns appear above modal overlays */
.select2-container--bootstrap-5 .select2-dropdown {
    z-index: 10001 !important;
}

/* Additional fix for Select2 dropdowns in modals */
.modal-overlay .select2-container--bootstrap-5 .select2-dropdown {
    z-index: 10001 !important;
}

/* Ensure Select2 dropdowns in portfolio forms are properly positioned */
.modal-overlay .portfolio-form .select2-container--bootstrap-5 .select2-dropdown {
    z-index: 10002 !important;
}

.modal-dialog {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Larger modal for JSON viewing */
.modal-dialog.has-json-viewer {
    max-width: 90%;
    width: 90%;
    max-height: 90vh;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* Larger modal body for JSON viewing */
.modal-dialog.has-json-viewer .modal-body {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

/* 菜单样式优化 */
.menu-group {
    margin-bottom: 20px;
}

.menu-children {
    padding-left: 10px;
}

.menu-item {
    display: block;
    padding: 10px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin-left: 10px;
}

.menu-item:hover {
    background-color: rgba(255,255,255,0.1);
    border-left-color: rgba(255,255,255,0.5);
    color: white;
}

.menu-item.active {
    background-color: rgba(255,255,255,0.2);
    border-left-color: white;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .sidebar.collapsed {
        width: 64px;
    }
    .main-content {
        margin-left: 200px;
    }
    body.sidebar-collapsed .main-content {
        margin-left: 64px;
    }
    
    .page-header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .welcome-content {
        grid-template-columns: 1fr;
    }
    
    .field-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .field-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .field-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* 消息框样式 */
.message-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.message-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 300px;
    max-width: 500px;
}

.message-text {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}

.message-close {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.message-close:hover {
    background: #0056b3;
}

.message-box.success .message-content {
    border-left: 4px solid #28a745;
}

.message-box.error .message-content {
    border-left: 4px solid #dc3545;
}

/* 表单页面样式 - 2列布局 */
.form-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    background: #f5f5f5;
    min-height: 100vh;
}

/* 顶部操作栏 */
.top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
}

.back-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.back-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-save {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-save:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.btn-cancel {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-cancel:hover {
    background-color: #545b62;
    border-color: #4e555b;
}

/* 标签页导航 */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.tab-item {
    padding: 12px 20px;
    cursor: pointer;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tab-item.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 500;
}

.tab-item:hover:not(.active) {
    color: #495057;
}

/* 表单卡片 */
.form-card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 18px;
    margin-bottom: 12px;
}

.form-section-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e9ecef;
}

/* 3列网格布局 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px 25px;
    align-items: start;
}

/* 动态列数支持 */
.form-grid.cols-1 {
    grid-template-columns: 1fr;
}

.form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.form-grid.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-grid.cols-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* 使用CSS变量的动态列数 */
.form-grid[style*="--columns"] {
    grid-template-columns: repeat(var(--columns, 3), 1fr);
}

/* 字段跨列支持 */
.form-group.col-span-1 {
    grid-column: span 1;
}

.form-group.col-span-2 {
    grid-column: span 2;
}

.form-group.col-span-3 {
    grid-column: span 3;
}

.form-group.col-span-4 {
    grid-column: span 4;
}

/* 字段跨列支持 - 使用CSS变量 */
.form-group[style*="--span"] {
    grid-column: span var(--span, 1);
}

/* 字段组 - 左右布局 */
.form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
    margin-bottom: 0;
    line-height: 1.2;
    min-width: 80px;
    flex-shrink: 0;
}

.required-asterisk {
    color: #dc3545;
    margin-right: 2px;
    font-weight: bold;
}

/* 输入框和选择框 */
.form-input,
.form-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    flex: 1;
    box-sizing: border-box;
    height: 32px;
    line-height: 1.2;
}

/* 下拉框占位符样式 - 更强制的方式 */
select.form-select {
    color: #333;
}

select.form-select option[disabled] {
    color: #666 !important;
    font-style: normal !important;
    background-color: #f8f9fa !important;
    font-weight: normal !important;
    opacity: 1 !important;
    display: block !important;
}

select.form-select option:not([disabled]) {
    color: #333 !important;
    background-color: white !important;
}

/* 确保占位符文本始终可见 - 使用更具体的选择器 */
select.form-select option[value=""][disabled] {
    color: #666 !important;
    opacity: 1 !important;
    font-weight: normal !important;
    visibility: visible !important;
}

/* 下拉框选中状态 */
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 下拉框悬停效果 */
.form-select:hover {
    border-color: #999;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-input.error,
.form-select.error {
    border-color: #dc3545;
}

.form-input.error:focus,
.form-select.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
}

/* 复选框 */
.form-checkbox {
    margin-right: 8px;
    transform: scale(1.1);
}

/* 动态间距支持 */
.form-grid.gap-small {
    gap: 12px 18px;
}

.form-grid.gap-medium {
    gap: 15px 25px;
}

.form-grid.gap-large {
    gap: 18px 30px;
}

/* 使用CSS变量的动态间距 */
.form-grid[style*="--gap"] {
    gap: var(--gap, 15px 25px);
}

/* 字段对齐方式 */
.form-grid.align-start {
    align-items: start;
}

.form-grid.align-center {
    align-items: center;
}

.form-grid.align-end {
    align-items: end;
}

/* 响应式断点 */
@media (max-width: 1200px) {
    .form-grid.cols-4 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .form-grid.cols-3,
    .form-grid.cols-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .form-group {
        grid-column: span 1 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    
    .form-label {
        min-width: auto !important;
        margin-bottom: 2px !important;
    }
    
    .form-input,
    .form-select {
        width: 100% !important;
        flex: none !important;
    }
}

@media (max-width: 768px) {
    .form-page-container {
        padding: 15px;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .top-actions {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .action-buttons {
        justify-content: center;
    }
}

/* 查询页面样式 */
.query-section {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.query-filters {
    display: flex;
    flex-direction: row;
    align-items: end;
    gap: 15px;
    justify-content: space-between;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-items: end;
    flex: 1;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
}
/* 查询区控件宽度一致：输入框、下拉、日期、async_select、多选占位均填满 filter-group */
.query-section .filter-group .filter-input,
.query-section .filter-group .filter-select,
.query-section .filter-group input.query-date-input,
.query-section .filter-group input[data-filter-type="date"],
.query-section .filter-group input[type="text"],
.query-section .filter-group select,
.query-section .filter-group .select2-container,
.query-section .filter-group .filter-standard-multi-select-placeholder {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

.filter-group label {
    font-weight: 500;
    color: #555;
    font-size: 13px;
    margin-bottom: 3px;
}

.filter-input,
.filter-select,
.query-section input.query-date-input,
.query-section input[data-filter-type="date"] {
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    height: 32px;
}

.filter-input:focus,
.filter-select:focus,
.query-section input.query-date-input:focus,
.query-section input[data-filter-type="date"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

/* async_select（Select2）与其它查询控件字体、高度一致 */
.query-section .select2-container--bootstrap-5 .select2-selection,
.query-section .select2-container--bootstrap-5.select2-container {
    height: 32px !important;
    min-height: 32px;
}
.query-section .select2-container--bootstrap-5 .select2-selection__rendered {
    font-size: 13px;
    font-family: inherit;
    line-height: 30px;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

/* 查询页面通用样式 */
.query-section {
    background: white;
    border-radius: 8px;
    overflow: visible; /* 避免多选下拉被裁切 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-info-section,
.org-info-section,
.log-info-section {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-bar {
    width: 3px;
    height: 18px;
    background: #007bff;
    border-radius: 2px;
}

.section-title span {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

/* 查询表格通用样式 */
.query-table-container,
.user-table-container,
.org-table-container,
.log-table-container {
    overflow-x: auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    margin-top: 5px;
}

/* 查询表格通用样式 */
.query-table,
.user-table,
.org-table,
.log-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

/* 查询表格单元格通用样式 */
.query-table th,
.query-table td,
.user-table th,
.user-table td,
.org-table th,
.org-table td,
.log-table th,
.log-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    font-size: 13px;
    line-height: 1.4;
}

/* 查询表格表头通用样式 */
.query-table th,
.user-table th,
.org-table th,
.log-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

/* 查询表格排序通用样式 */
.query-table th.sortable,
.user-table th.sortable,
.org-table th.sortable,
.log-table th.sortable {
    cursor: pointer;
    position: relative;
    text-align: center;
}

.query-table th.sortable:hover,
.user-table th.sortable:hover,
.org-table th.sortable:hover,
.log-table th.sortable:hover {
    background: #e9ecef;
}

.query-table th.sortable::after,
.user-table th.sortable::after,
.org-table th.sortable::after,
.log-table th.sortable::after {
    content: '↕';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 12px;
}

/* 查询表格斑马纹和悬停通用样式 */
.query-table tbody tr:nth-child(even),
.user-table tbody tr:nth-child(even),
.org-table tbody tr:nth-child(even),
.log-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.query-table tbody tr:hover,
.user-table tbody tr:hover,
.org-table tbody tr:hover,
.log-table tbody tr:hover {
    background: #e3f2fd;
    transition: background-color 0.2s ease;
}

/* 查询表格无数据通用样式 */
.query-table .no-data,
.user-table .no-data,
.org-table .no-data,
.log-table .no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px;
}

/* 查询表格序号列通用样式 */
.query-table td:first-child,
.user-table td:first-child,
.org-table td:first-child,
.log-table td:first-child {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
    width: 60px;
}

.query-table th:first-child,
.user-table th:first-child,
.org-table th:first-child,
.log-table th:first-child {
    background: #e9ecef;
    font-weight: 700;
    color: #495057;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 3px;
    justify-content: center;
    align-items: center;
}

.action-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 12px;
}

.action-btn:hover {
    background: #f8f9fa;
}

.action-btn.view-btn:hover {
    background: #e3f2fd;
}

.action-btn.edit-btn:hover {
    background: #fff3e0;
}

.action-btn.delete-btn:hover {
    background: #ffebee;
}

.action-btn.reset-btn:hover {
    background: #f3e5f5;
}

.btn-icon {
    font-size: 14px;
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .sidebar.collapsed {
        width: 64px;
        position: fixed;
        height: calc(100vh - 60px);
    }
    .main-content {
        margin-left: 0;
    }
    body.sidebar-collapsed .main-content {
        margin-left: 64px;
    }
    
    .page-header {
        padding: 10px 15px;
    }
    
    .page-content {
        padding: 15px;
    }
    
    .dynamic-form {
        padding: 20px;
    }
    
    .modal-dialog {
        width: 95%;
        margin: 10px;
    }
    
    .query-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .filter-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filter-group label {
        font-size: 12px;
    }
    
    .filter-input,
    .filter-select {
        font-size: 12px;
        padding: 6px 8px;
        height: 30px;
    }
    
        .query-table-container,
        .user-table-container,
        .org-table-container,
        .log-table-container {
            font-size: 0.8rem;
            box-shadow: none;
            border-radius: 0;
        }
        
        .query-table,
        .user-table,
        .org-table,
        .log-table {
            border-radius: 0;
            border: 1px solid #dee2e6;
        }
        
        .query-table th,
        .query-table td,
        .user-table th,
        .user-table td,
        .org-table th,
        .org-table td,
        .log-table th,
        .log-table td {
            padding: 6px 4px;
            font-size: 12px;
        }
        
        .action-buttons {
            flex-direction: column;
            gap: 2px;
        }
        
        .action-btn {
            padding: 4px;
        }
        
        .pagination-container {
            flex-direction: column;
            gap: 10px;
        }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-info {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.detail-item span {
    color: #333;
    font-size: 14px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========================================
   通用模态框样式 (Universal Modal)
   ======================================== */

/* 模态框遮罩层 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

/* 模态框对话框 */
.modal-dialog {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 1200px;
    width: 100%;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 模态框头部 */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background-color: #e9ecef;
    color: #333;
}

/* 模态框主体 */
.modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

/* 模态框中的表单样式调整 - 保持与原始表单完全一致 */
.modal-body .form-page-container {
    background: transparent;
    padding: 0;
    box-shadow: none;
    margin: 0;
}

.modal-body .page-title {
    display: none; /* 隐藏表单内的标题，使用模态框头部标题 */
}

/* 保持表单原始样式 - 不改变任何尺寸 */
.modal-body .data-form {
    margin: 0;
    max-width: none; /* 移除最大宽度限制，充分利用模态框空间 */
}

/* 保持表单行高度与原始一致 - 使用CSS Grid固定3列 */
.modal-body .form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 固定3列，每列宽度相等 */
    gap: 20px; /* 与原始保持一致 */
    margin-bottom: 16px; /* 与普通表单行保持一致 */
}

/* 所有列保持相同宽度 - 重要！*/
.modal-body .form-col {
    min-width: 0; /* 防止内容溢出 */
}

/* 保持表单字段组样式 */
.modal-body .form-group {
    margin-bottom: 0; /* 与原始保持一致 */
    width: 100%; /* 确保字段组占满整个列宽 */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0; /* 移除gap，使用margin控制间距 */
}

.modal-body .form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-weight: 500;
    color: #333;
    font-size: 13px;
    text-align: left; /* 标签文字左对齐 */
    min-width: 100px;
    min-height: 38px; /* Match the min-height of multi-select display and regular selects */
    width: auto; /* 标签宽度自适应内容 */
    flex-shrink: 0;
    flex-grow: 0; /* 标签不占据剩余空间 */
    order: 1 !important; /* 标签在左侧 - 使用!important确保优先级 */
    margin-right: 5px; /* 标签与输入框之间的间距，紧贴输入框 */
    line-height: 1.5; /* Match form-control line-height */
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    order: 2 !important; /* 输入框在右侧 - 使用!important确保优先级 */
    flex: 0 1 auto; /* 输入框宽度自适应，不占据所有空间 */
    max-width: 300px; /* 限制输入框最大宽度 */
}

/* Select2 container should also follow the order */
.modal-body .form-group .select2-container {
    order: 2 !important; /* Select2 container on the right */
    flex: 1; /* Allow Select2 to grow */
    min-width: 0;
}

/* Standard multi-select wrapper should also follow the order in modals */
.modal-body .form-group .standard-multi-select-wrapper {
    order: 2 !important; /* Multi-select appears on the right */
    flex: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

/* Ensure multi-select display aligns with label baseline in modals - hide tags area when empty */
.modal-body .form-group .standard-multi-select-wrapper .standard-multi-select-tags:empty {
    display: none;
    margin-bottom: 0;
}

.modal-body .form-group .standard-multi-select-wrapper .standard-multi-select-tags:not(:empty) {
    margin-bottom: 6px;
}

/* Align the display element with the label - match the height and alignment of regular selects */
.modal-body .form-group .standard-multi-select-wrapper .standard-multi-select-display {
    min-height: 38px; /* Match regular select height */
    display: flex;
    align-items: center;
    padding: 10px 12px; /* Match regular form-control padding exactly */
    line-height: 1.5; /* Match regular form-control line-height */
}

/* 多选下拉项与查询条件一致：checkbox 在左、label 在右，行距紧凑 */
.modal-body .form-group .standard-multi-select-wrapper .standard-multi-select-option input[type="checkbox"],
.form-group .standard-multi-select-wrapper .standard-multi-select-option input[type="checkbox"] {
    order: -1 !important;
}
.modal-body .form-group .standard-multi-select-wrapper .standard-multi-select-option label,
.form-group .standard-multi-select-wrapper .standard-multi-select-option label {
    order: 1 !important;
    min-height: 0 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}
/* 下拉项行间距与查询条件一致（不受 form-group label 的 min-height 影响） */
.modal-body .form-group .standard-multi-select-wrapper .standard-multi-select-option,
.form-group .standard-multi-select-wrapper .standard-multi-select-option {
    padding: 6px 10px !important;
    min-height: 0 !important;
}

.modal-body .form-group .radio-group {
    order: 2; /* radio组在右侧 */
    flex: 0 1 auto; /* radio组宽度自适应，不占据所有空间 */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.modal-body .form-group .radio-group .radio-group-label {
    order: 0; /* radio标签在radio组内的最左侧 */
    text-align: right;
    min-width: 100px;
    width: auto; /* 标签宽度自适应内容 */
    flex-shrink: 0;
    flex-grow: 0; /* 标签不占据剩余空间 */
    margin-right: 5px; /* 标签与radio选项之间的间距，紧贴radio选项 */
    margin-left: 0;
    margin-bottom: 0;
}

.modal-body .form-group .radio-group .radio-item {
    order: 1; /* radio选项在标签之后 */
}

.modal-body .form-control {
    width: 100%;
    padding: 10px 12px; /* 与原始保持一致 */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box; /* 确保padding不增加总宽度 */
}

.modal-body .form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.modal-body .form-control:disabled,
.modal-body .form-control[readonly] {
    background-color: #f8f9fa;
    opacity: 1;
}

/* 保持按钮区域样式 */
.modal-body .form-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.modal-body .form-actions .btn {
    min-width: 100px; /* 与原始保持一致 */
}

/* 保持必填标识样式 */
.modal-body .required {
    color: #dc3545;
    margin-left: 2px;
}

/* 保持textarea样式 */
.modal-body textarea.form-control {
    height: auto;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

/* 响应式设计 */
@media (max-width: 1280px) {
    .modal-dialog {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .modal-dialog {
        max-width: 100%;
        max-height: 95vh;
        margin: 0;
        border-radius: 0;
    }
    
    .modal-overlay {
        padding: 0;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    /* 移动端表单调整为单列 */
    .modal-body .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .modal-body .form-actions {
        flex-direction: column;
    }
    
    .modal-body .form-actions .btn {
        width: 100%;
    }
}

/* 响应式模态框 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
}

/* ============================================
   操作日志详情样式
   ============================================ */
.log-detail-container {
    padding: 20px;
}

.log-detail-container h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.log-detail-container h4 {
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 15px;
    color: #555;
}

.detail-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row label {
    font-weight: 600;
    color: #555;
    min-width: 120px;
    margin-right: 20px;
}

.detail-row span {
    color: #333;
    flex: 1;
}

.changes-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.changes-table thead {
    background: #007bff;
    color: white;
}

.changes-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.changes-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.changes-table tbody tr:last-child td {
    border-bottom: none;
}

.changes-table tbody tr:hover {
    background-color: #f8f9fa;
}

.detail-section pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
}

.detail-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    text-align: right;
}

.detail-actions .btn {
    min-width: 100px;
}

/* Split Panel Layout for Fund Event Form */
.split-panel-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.split-panel-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    gap: 20px;
    min-height: 0;
    flex: 1;
}

.split-panel-left {
    flex: 1;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.split-panel-left .data-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.split-panel-right {
    flex: 1;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-y: auto;
}

/* Balance Panel Styles */
.balance-panel-container {
    min-height: 400px;
}

.balance-panel-content {
    padding: 10px;
}

.balance-total-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.balance-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.balance-totals {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.balance-total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.balance-currency {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

.balance-amount {
    font-weight: 700;
    color: #007bff;
    font-size: 1.1rem;
}

.balance-details-section {
    margin-top: 20px;
}

.balance-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.balance-details-table thead {
    background: #f8f9fa;
}

.balance-details-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.balance-details-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
}

.balance-details-table tbody tr:hover {
    background: #f8f9fa;
}

.balance-details-table .text-right {
    text-align: right;
}

.balance-empty-details {
    padding: 20px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

/* Empty and Error States */
.empty-balance-panel,
.error-balance-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px;
}

.empty-balance-message,
.error-balance-message {
    text-align: center;
    color: #6c757d;
    font-size: 1rem;
}

.error-balance-message {
    color: #dc3545;
}

/* 清算结果展示区域：12px */
.clearing-result-content {
    font-size: 12px;
}
