/* ========== 全局基础 ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f2f5f9;
    color: #2c3e50;
    line-height: 1.5;
    padding: 30px 20px;
}

/* ========== 主容器 ========== */
.container {
    max-width: 1140px;
    margin: 0 auto;
    background: #ffffff;
    padding: 36px 40px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}

/* ========== 标题 ========== */
h2 {
    text-align: center;
    font-weight: 500;
    font-size: 24px;
    color: #34495e;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}

/* ========== 表单行 ========== */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1 1 160px;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

input {
    padding: 10px 14px;
    border: 1px solid #e1e8ee;
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    background: #fafbfc;
    transition: all 0.2s ease;
    outline: none;
}

input:focus {
    border-color: #5dade2;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(93,173,226,0.15);
}

input[readonly] {
    background: #f4f6f8;
    color: #7f8c8d;
}

/* ========== 按钮通用 ========== */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ========== 按钮颜色变体 ========== */
.btn-primary {
    background: #5dade2;
    color: #fff;
}

.btn-primary:hover {
    background: #4aa3d4;
}

.btn-danger {
    background: #f1948a;
    color: #fff;
}

.btn-danger:hover {
    background: #e07d73;
}

.btn-success {
    background: #58d68d;
    color: #fff;
}

.btn-success:hover {
    background: #46c27d;
}

.btn-warning {
    background: #f4d03f;
    color: #fff;
}

.btn-warning:hover {
    background: #e7c130;
}

.btn-info {
    background: #bdc3c7;
    color: #fff;
}

.btn-info:hover {
    background: #a9b4b9;
}

/* 小间隔 (用于行内按钮) */
.btn-danger,
.btn-info,
.btn-warning {
    margin-left: 8px;
}

/* ========== 表格区域 ========== */
.table-wrap {
    overflow-x: auto;
    margin-top: 30px;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 14px;
}

th {
    background: #f4f6f8;
    color: #2c3e50;
    font-weight: 600;
    padding: 14px 12px;
    text-align: center;
    border-bottom: 2px solid #e9ecef;
    letter-spacing: 0.3px;
}

td {
    padding: 12px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f2f5;
    color: #2c3e50;
}

tbody tr:hover td {
    background: #f8f9fb;
}

.total-row td {
    font-weight: 700;
    background: #fbf3e0;
    border-bottom: 2px solid #f0d89d;
    color: #c0392b;
}

.total-row:hover td {
    background: #f9efd6;
}

/* 复选框样式微调 */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #5dade2;
}

/* ========== 导出按钮组 ========== */
.export-btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

/* ========== 弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 36px;
    width: 90%;
    max-width: 640px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.modal-header {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 24px;
    border-bottom: 1px solid #f0f2f5;
    padding-bottom: 14px;
}

.modal-body .form-row {
    margin-bottom: 0;
}

.modal-footer {
    text-align: right;
    margin-top: 28px;
    border-top: 1px solid #f0f2f5;
    padding-top: 20px;
}

.modal-footer button {
    margin-left: 12px;
}

/* ========== 辅助文字 ========== */
.tips {
    margin-left: 15px;
    color: #95a5a6;
    font-size: 13px;
}