/* ==================== 报名管理表格优化样式 ==================== */

/* 状态徽章样式 */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-paid {
    background-color: #d1edff;
    color: #0969da;
}

.status-pending {
    background-color: #fff8c5;
    color: #9a6700;
}

.status-cancelled {
    background-color: #ffebe9;
    color: #cf222e;
}

.status-refunded {
    background-color: #f6f8fa;
    color: #656d76;
}

/* 报名类型徽章样式 */
.type-personal {
    background-color: #ddf4ff;
    color: #0969da;
}

.type-group {
    background-color: #fff8c5;
    color: #9a6700;
}

.type-family {
    background-color: #dcfdf7;
    color: #116329;
}

.type-team {
    background-color: #f0fff4;
    color: #116329;
}

/* 响应式表格容器 */
.table-responsive {
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

/* 在小屏幕设备上启用横向滚动 */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 1200px;
        /* 确保表格有足够的宽度 */
    }
}

/* 表格样式优化 */
.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 12px;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    min-width: 120px;
}

.table td {
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
    padding: 12px;
    min-width: 120px;
}

/* 斑马纹样式 */
.table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.table:not(.project-stat-table) tbody tr:hover {
    background-color: #e9ecef !important;
    transition: background-color 0.15s ease-in-out;
}

.project-stat-table tbody tr:nth-child(even),
.project-stat-table tbody tr:nth-child(odd) {
    background-color: transparent;
}

.project-stat-table tbody tr {
    transition: background-color 0.15s ease-in-out, filter 0.15s ease-in-out;
}

.project-stat-table tbody tr:hover {
    filter: brightness(0.95);
}

.project-stat-table tbody tr.project-row-max,
.project-stat-table tbody tr.project-row-max>td {
    background-color: rgba(158, 158, 158, 0.15) !important;
    color: #333333 !important;
}

.project-stat-table tbody tr.project-row-current,
.project-stat-table tbody tr.project-row-current>td {
    background-color: rgba(33, 150, 243, 0.15) !important;
    color: #0d6efd !important;
}

.project-stat-table tbody tr.project-row-paid,
.project-stat-table tbody tr.project-row-paid>td {
    background-color: rgba(76, 175, 80, 0.15) !important;
    color: #198754 !important;
}

.project-stat-table tbody tr.project-row-reserved,
.project-stat-table tbody tr.project-row-reserved>td {
    background-color: rgba(255, 193, 7, 0.15) !important;
    color: #664d03 !important;
}

.project-stat-table tbody tr.project-row-refunded,
.project-stat-table tbody tr.project-row-refunded>td {
    background-color: rgba(220, 53, 69, 0.15) !important;
    color: #dc3545 !important;
}

/* 确保表格单元格背景透明，允许行背景透出（作为兜底） */
.project-stat-table tbody tr td {
    background-color: transparent;
}

/* 特定列的宽度设置 */
.table th:nth-child(1),
.table td:nth-child(1) {
    /* 复选框列 */
    width: 50px;
    min-width: 50px;
    text-align: center;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    /* 报名人信息列 */
    width: 260px;
    /* 增加30% */
    min-width: 200px;
}

.table th:nth-child(3),
.table td:nth-child(3) {
    /* 性别列 */
    width: 80px;
    min-width: 80px;
    text-align: center;
}

.table th:nth-child(4),
.table td:nth-child(4) {
    /* 紧急联系人列 */
    width: 180px;
    min-width: 150px;
}

.table th:nth-child(5),
.table td:nth-child(5) {
    /* 赛事列 */
    width: 260px;
    /* 增加30% */
    min-width: 200px;
}

.table th:nth-child(6),
.table td:nth-child(6) {
    /* 类型列 */
    width: 100px;
    min-width: 100px;
    text-align: center;
}

.table th:nth-child(7),
.table td:nth-child(7) {
    /* 订单号列 */
    width: 195px;
    /* 增加30% */
    min-width: 150px;
}

.table th:nth-child(8),
.table td:nth-child(8) {
    /* 状态列 */
    width: 120px;
    min-width: 120px;
    text-align: center;
}

.table th:nth-child(9),
.table td:nth-child(9) {
    /* 费用列 */
    width: 120px;
    min-width: 120px;
    text-align: center;
}

.table th:nth-child(10),
.table td:nth-child(10) {
    /* 报名时间列 */
    width: 140px;
    min-width: 120px;
    text-align: center;
}

.table th:nth-child(11),
.table td:nth-child(11) {
    /* 操作列 */
    width: 120px;
    min-width: 120px;
    text-align: center;
}

/* 报名人信息样式 */
.participant-info {
    line-height: 1.2;
}

.participant-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.participant-phone {
    font-size: 0.8em;
    /* 80% of name font size */
    color: var(--text-secondary);
}

/* 紧急联系人信息样式 */
.emergency-contact {
    line-height: 1.15;
    margin: 0.5em 0;
}

.emergency-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.emergency-phone {
    font-size: 0.85em;
    /* 85% of name font size */
    color: var(--text-secondary);
}

/* 性别显示样式 */
.gender-display {
    font-weight: 500;
    color: var(--text-primary);
}

/* 文本溢出处理 */
.text-overflow {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==================== 打印样式 ==================== */