* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-color: #009DFF;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --info-color: #1890ff;
    --text-primary: #3B3F48;
    --text-secondary: #646a73;
    --text-muted: #8f959e;
    --border-color: #e8eaed;
    --bg-color: #E6E9F0;
    --card-bg: #F6F7F9;
    --hover-bg: #fff;
    --radius: 4px;
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
    --menu-width: 220px;
    --header-height: 56px;
}

body {
    font-size: 13px;
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-color);
    min-height: 100vh;
    color: var(--text-primary);
    overflow: hidden;
}

.page-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2px 6px;
    gap: 4px;
}

.breadcrumb { display: none; }

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.search-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 12px;
    background: var(--card-bg);
    border-radius: var(--radius);
    flex-shrink: 0;
    box-shadow: var(--shadow);
    width: 100%;
}

.search-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-item label {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    font-weight: 400;
}

.search-item input, .search-item select {
    min-width: 150px;
    padding: 6px 10px;
    border: 1px solid #dcdfe6;
    border-radius: var(--radius);
    font-size: 13px;
    background: #fff;
    font-family: 'Microsoft YaHei';
    height: 32px;
}

.search-item input:focus, .search-item select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.btn {
    padding: 5px 12px;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: 'Microsoft YaHei';
}

.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: #0080cc; }
.btn-success { background: var(--success-color); color: #fff; }
.btn-success:hover { background: #43a047; }
.btn-warning { background: var(--warning-color); color: #fff; }
.btn-warning:hover { background: #d49409; }
.btn-danger { background: var(--danger-color); color: #fff; }
.btn-danger:hover { background: #c62828; }
.btn-secondary { background: #f5f6f8; color: var(--text-primary); border: 1px solid #e8eaed; }
.btn-secondary:hover { background: #e8eaed; }

.table-container {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    flex: 1;
    min-height: 0;
    width: 100%;
    padding-bottom: 12px;
}

.table-container > table {
    flex-shrink: 0;
}

.table-wrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.table-wrapper table {
    flex-shrink: 0;
}

/* 列表底栏：统计信息 + 分页示意 */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid #e8eaed;
    background: #fff;
    flex-shrink: 0;
}

.table-footer-info {
    font-size: 12px;
    color: #909399;
}

.table-footer-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.table-footer-pagination .page-btn {
    padding: 4px 8px;
    border: 1px solid #e8eaed;
    border-radius: 3px;
    background: #fff;
    color: #606266;
    font-size: 12px;
    cursor: default;
}

.table-footer-pagination .page-btn.active {
    background: #009DFF;
    color: #fff;
    border-color: #009DFF;
}

.table-footer-pagination .page-btn.disabled {
    color: #c0c4cc;
    cursor: not-allowed;
}

.table-toolbar {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #fff;
}

.table-title {
    font-size: 14px;
    color: #1f2329;
    line-height: 24px;
    font-weight: 500;
}

.table-count {
    font-size: 13px;
    color: var(--text-muted);
}

.table-actions {
    display: flex;
    gap: 8px;
}

table { width: 100%; border-collapse: collapse; }
thead { background: #fff; position: sticky; top: 0; z-index: 10; }
th {
    padding: 8px 10px;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    color: #606266;
    background: #fafafa;
    border-bottom: 1px solid #f0f2f5;
    white-space: nowrap;
}

td {
    padding: 8px 10px;
    font-size: 13px;
    color: #303133;
    border-bottom: 1px solid #e8eaed;
    white-space: nowrap;
}

tbody tr:hover { background: #f5f7fa; }

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: var(--radius);
}

.status-pending { background: #fff7e6; color: #fa8c16; }
.status-approved { background: #f6ffed; color: #52c41a; }
.status-rejected { background: #fff2f0; color: #f5222d; }
.status-canceled { background: #f5f5f5; color: #999; }
.status-closed { background: #f0f0f0; color: #8f959e; }
.status-receivable { background: #e6f7ff; color: #1890ff; }
.status-processing { background: #e6f7ff; color: #1890ff; }
.status-completed { background: #f6ffed; color: #52c41a; }
.status-exception { background: #fff2f0; color: #f5222d; }
.status-disabled { background: #f5f5f5; color: #909399; }

.action-cell { width: 180px; white-space: nowrap; }
.action-btns { display: flex; gap: 8px; align-items: center; }
.action-btn {
    padding: 4px 10px;
    border: none; background: transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    color: var(--primary-color);
    font-family: 'Microsoft YaHei';
}

.action-btn:hover { background: #e6f7ff; }
.action-btn.danger { color: var(--danger-color); }
.action-btn.warning { color: var(--warning-color); }
.action-btn.success { color: var(--success-color); }

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}

.modal-overlay.active { display: flex; }
.modal {
    background: #fff;
    border-radius: var(--radius);
    width: 100%;
    max-width: 800px;
    max-height: calc(100vh - 80px);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.modal-header {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
}

.modal-title { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.modal-close {
    width: 32px; height: 32px;
    border: none; background: transparent;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
}

.modal-close:hover { background: #f0f0f0; }
.modal-close svg { width: 16px; height: 16px; stroke: #8f959e; }
.modal-body { padding: 16px; max-height: calc(100vh - 180px); overflow-y: auto; }
.modal-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--card-bg);
}

.form-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.form-item label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.form-item label .required { color: var(--danger-color); }
.form-item input, .form-item select, .form-item textarea {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #e8eaed;
    border-radius: var(--radius);
    font-size: 14px;
    background: #fff;
    font-family: 'Microsoft YaHei';
}

.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-row-4 { grid-template-columns: repeat(4, 1fr); }

.pagination {
    padding: 6px 12px;
    border-top: 1px solid #e8eaed;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    background: #F6F7F9;
    font-size: 13px;
}

.pagination-info { color: var(--text-muted); margin-right: auto; }
.pagination-controls { display: flex; gap: 4px; align-items: center; }
.page-btn {
    padding: 4px 10px;
    border: 1px solid #dcdfe6;
    background: #fff;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    font-family: 'Microsoft YaHei';
    min-width: 32px;
    text-align: center;
}

.page-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.page-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.page-btn:disabled { color: #c0c4cc; cursor: not-allowed; background: #f5f7fa; }
.page-num { color: var(--text-muted); margin: 0 4px; }

.float-info {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
}

.float-info .info-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,157,255,0.3);
}

.float-info.expanded .info-btn {
    border-radius: var(--radius) var(--radius) 0 0;
    width: 280px;
    justify-content: flex-start;
    padding-left: 12px;
}

.float-info .info-content {
    display: none;
    background: #fff;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    max-height: 400px;
    overflow-y: auto;
}

.float-info.expanded .info-content { display: block; }
.float-info svg { width: 20px; height: 20px; }
.info-content h4 { font-size: 14px; margin-bottom: 10px; color: var(--text-primary); font-weight: 500; }
.info-content p { font-size: 13px; line-height: 1.6; color: var(--text-secondary); }

.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e8eaed;
    padding: 0 16px;
    margin-bottom: 16px;
}

.tab-item {
    padding: 12px 20px;
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: 'Microsoft YaHei';
}

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 500;
}

.tab-item:hover { color: var(--primary-color); }

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue { background: #e6f7ff; }
.stat-icon.green { background: #f6ffed; }
.stat-icon.orange { background: #fff7e6; }
.stat-icon.red { background: #fff2f0; }

.stat-info h3 { font-size: 24px; font-weight: 600; color: var(--text-primary); }
.stat-info p { font-size: 14px; color: var(--text-muted); }

.progress-bar {
    width: 100px;
    height: 8px;
    background: #f0f0f0;
    border-radius: var(--radius);
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius);
    transition: width 0.3s;
}

.progress-fill.completed { background: #52c41a; }
.progress-fill.processing { background: #1890ff; }
.progress-fill.pending { background: #faad14; }
.progress-fill.exception { background: #f5222d; }

.nature-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    line-height: 20px;
}

.nature-virtual { background: #e6f7ff; color: #1890ff; }
.nature-physical { background: #f6ffed; color: #52c41a; }

.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    line-height: 20px;
}

.type-wave { background: #e6f7ff; color: #1890ff; }
.type-single { background: #f6ffed; color: #52c41a; }

.mode-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    line-height: 20px;
}

.mode-light { background: #e6fff7; color: #13c2c2; }
.mode-pda { background: #fff7e6; color: #fa8c16; }

.count-badge {
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.detail-content { padding: 0; }
.detail-section { margin-bottom: 20px; }
.detail-section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8eaed;
}
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.detail-item { padding: 12px; background: var(--card-bg); border-radius: var(--radius); }
.detail-item label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.detail-item span { font-size: 14px; color: var(--text-primary); }