/* ============================================
   表格样式基础配置
   ============================================ */

/* CSS 变量定义 - 便于主题定制和维护 */
:root {
    --tb1-header-bg-start: #f9fafb;
    --tb1-header-bg-end: #f3f4f6;
    --tb1-header-text: #374151;
    --tb1-border-color: #e5e7eb;
    --tb1-alt-row-bg: #ffffff;
    --tb1-hover-row-bg: linear-gradient(to right, #f9fafb, #f3f4f6);
    --tb1-select-row-bg: #ecfdf5;
    --tb1-text-primary: #111827;
    --tb1-text-secondary: #6b7280;
    --tb1-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --tb1-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --tb1-radius: 8px;

    --tb3-border-color: #cccccc;
    --tb3-cell-width: 130px;
    --tb3-cell-height: 35px;

    --fineline-gap: 15px;
    --fineline-row-height: 40px;
    --fineline-header-bg: #e4e4e4;
}

/* ============================================
   tb1 - 通用表格样式（现代化重构版）
   适用于：证书查询、评委打分、项目进度等
   ============================================ */
.tb1 {
    border-collapse: collapse;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tb1 th {
    background: linear-gradient(135deg, var(--tb1-header-bg-start) 0%, var(--tb1-header-bg-end) 100%);
    color: var(--tb1-header-text);
    font-weight: 600;
    padding: 16px 20px;
    text-align: left;
    text-transform: none;
    letter-spacing: 0.3px;
    font-size: 14px;
    position: relative;
    border: none;
    border-bottom: 2px solid #d1d5db;
}

.tb1 th:first-child {
    border-top-left-radius: var(--tb1-radius);
}

.tb1 th:last-child {
    border-top-right-radius: var(--tb1-radius);
}

.tb1 tr {
    border-bottom: 1px solid var(--tb1-border-color);
    transition: all 0.2s ease;
}

.tb1 tr:last-child {
    border-bottom: none;
}

.tb1 td {
    padding: 14px 20px;
    color: var(--tb1-text-primary);
    vertical-align: middle;
    word-break: break-word;
}

/* 隔行变色 - 提升可读性（柔和配色） */
.tb1 tr:nth-child(odd) td {
    background: var(--tb1-alt-row-bg);
}

/* 鼠标悬停效果 - 增强交互体验 */
.tb1 tr:hover td {
    background: var(--tb1-hover-row-bg);
    transform: translateX(2px);
    box-shadow: var(--tb1-shadow-sm);
}

.tb1 tr.select td {
    background: var(--tb1-select-row-bg);
    border-left: 3px solid #10b981;
}

/* 表单元素重置 */
.tb1 td input[type='text'],
.tb1 td input[type='password'],
.tb1 td input[type='tel'],
.tb1 td input[type='number'],
.tb1 td input[type='email'],
.tb1 td textarea,
.tb1 td div,
.tb1 td span {
    padding: 0;
    margin: 0;
}

/* ============================================
   ts - 提示说明区域
   ============================================ */
.ts {
    border: 1px solid #e5e7eb;
    padding: 16px;
    margin: 10px 0 0 0;
    clear: both;
    background-color: #f9fafb;
    border-radius: 8px;
    box-shadow: var(--tb1-shadow-sm);
}

/*

.stripe {
    border-collapse: collapse;
    font-size: 14px;
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stripe th {
    background: #e4e4e4;
    color: #6a6a6a;
    font-weight: bold;
    padding: 12px 11px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    line-height: 1.8;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.stripe td {
    padding: 10px 11px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    line-height: 1.6;
    transition: background-color var(--transition-fast);
}

.stripe tr.alt td {
    background: #fafafa;
}

.stripe tr.over td,
.stripe tr:hover td {
    background: var(--primary-light);
}

.stripe tr.select td {
    background: #d4edda;
}

.stripe td input,
.stripe td textarea,
.stripe td div,
.stripe td span {
    padding: 0;
    margin: 0;
}

.stripe td.tc {
    text-align: center;
}

.stripe td.tl {
    text-align: left;
}
*/

/* ============================================
   响应式适配 - 移动端优化
   ============================================ */
/* ============================================
   响应式适配 - 移动端优化
   ============================================ */
@media screen and (max-width: 768px) {
    .tb1 {
        font-size: 0.9em;
    }

    .tb1 th {
        padding: 12px 14px;
        font-size: 13px;
        white-space: nowrap; /* 防止表头换行 */
    }

    .tb1 td {
        padding: 10px 14px;
        white-space: nowrap; /* 防止内容换行，支持横向滚动 */
    }

    .tb1 th:first-child {
        border-top-left-radius: 4px;
    }

    .tb1 th:last-child {
        border-top-right-radius: 4px;
    }

    /* 移动端表格可横向滚动 */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
        border-radius: 8px; /* 圆角容器 */
    }

    /* 自定义滚动条样式（Webkit 浏览器） */
    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }

    .table-responsive::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }

    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
}

/* ============================================
   打印样式优化
   ============================================ */
@media print {
    .tb1 tr:hover td {
        background: transparent;
        transform: none;
        box-shadow: none;
    }

    .tb1 tr:nth-child(odd) td {
        background: #f5f5f5 !important;
    }

    .tb1 tr.select td {
        border-left: 3px solid #10b981 !important;
    }

    .tb1 th {
        background: #f3f4f6 !important;
        color: #374151 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
