/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 14px;
}
a { text-decoration: none; color: inherit; cursor: pointer; }

/* ===== 顶部导航 ===== */
/* ==================== 左侧固定侧边栏 ==================== */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    background: var(--bg-elev);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: background 0.2s, border-color 0.2s;
}
.sidebar-header {
    padding: 20px 18px 14px;
    border-bottom: 1px solid var(--card-border);
}
.sidebar-logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 17px; font-weight: 700; color: var(--text);
    white-space: nowrap;
}
.sidebar-logo-icon { font-size: 22px; }
.sidebar-logo-text { letter-spacing: 0.5px; }

.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--card-border);
}
.sidebar-user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    flex-shrink: 0;
}
.sidebar-user-meta { min-width: 0; flex: 1 1 auto; }
.sidebar-user-name {
    font-size: 14px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 12px; color: var(--text-dim);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 2px;
}

.sidebar-clock {
    padding: 12px 18px;
    border-bottom: 1px solid var(--card-border);
    background: var(--hover-bg);
}
.sidebar-clock-date { font-size: 12px; color: var(--text-dim); }
.sidebar-clock-time {
    font-size: 22px; font-weight: 700; color: var(--text);
    font-variant-numeric: tabular-nums;
    margin-top: 2px; letter-spacing: 1px;
}

.sidebar-menu {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 8px;
    display: flex; flex-direction: column; gap: 2px;
}
.sidebar-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 14px; font-weight: 500;
    text-decoration: none; cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    white-space: nowrap;
}
.sidebar-item:hover {
    background: var(--hover-bg);
    color: var(--text);
}
.sidebar-item.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    box-shadow: var(--accent-glow);
}
.sidebar-item-icon { font-size: 16px; line-height: 1; flex-shrink: 0; }
.sidebar-item-text { flex: 1 1 auto; }

/* 侧边栏人脸签到入口 */
.sidebar-face-entry { padding: 6px 8px 8px; }
.face-entry-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #2b7de0);
    color: #fff;
    font-size: 14px; font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(54, 158, 255, 0.3);
}
.face-entry-btn:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(54,158,255,0.4); }

.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--card-border);
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-elev);
}
.sidebar-icon-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-dim);
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 15px; line-height: 1;
    cursor: pointer;
    transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.sidebar-icon-btn:hover {
    background: var(--hover-bg);
    color: var(--text);
    border-color: var(--accent);
}
.sidebar-version {
    margin-left: auto;
    font-size: 11px; color: var(--text-dim);
    opacity: 0.6;
}

/* ==================== 移动端横向导航（≤768px 显示，桌面隐藏） ==================== */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--card-border);
    z-index: 200;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
}
.mobile-logo { font-size: 20px; flex-shrink: 0; }
.mobile-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    flex: 1 1 auto;
    scrollbar-width: none;
}
.mobile-tabs::-webkit-scrollbar { display: none; }
.mobile-tabs .nav-tab {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-dim);
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
    cursor: pointer;
}
.mobile-tabs .nav-tab:hover { background: var(--hover-bg); color: var(--text); }
.mobile-tabs .nav-tab.active { background: var(--accent); color: #fff; font-weight: 600; }

/* ==================== 顶部简洁标题栏 ==================== */
.topbar-mini {
    position: fixed;
    top: 0;
    left: 240px; right: 0;
    height: 60px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--card-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}
.topbar-mini-left { display: flex; align-items: center; gap: 12px; }
.topbar-mini-title {
    font-size: 18px; font-weight: 700; color: var(--text);
    margin: 0; letter-spacing: 0.5px;
}
.topbar-mini-right { display: flex; align-items: center; gap: 12px; }
.hour-quick-search { position: relative; }
.hour-quick-search input {
    width: 220px; padding: 8px 14px;
    border: 1px solid var(--card-border);
    border-radius: 20px;
    font-size: 13px; outline: none;
    background: var(--input-bg);
    color: var(--text);
    transition: all 0.2s;
}
.hour-quick-search input:focus {
    border-color: var(--accent);
    background: var(--bg-elev);
    width: 260px;
}
.hour-quick-results {
    position: absolute; top: 42px; right: 0;
    min-width: 240px; max-height: 360px; overflow-y: auto;
    background: var(--card-solid);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 1000; padding: 6px;
}
.hour-quick-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 12px; border-radius: 8px;
    cursor: pointer; font-size: 14px;
    color: var(--text);
}
.hour-quick-item:hover {
    background: var(--hover-bg);
}

/* ===== 主内容（侧边栏 + 顶部简洁栏布局） ===== */
.main-content {
    margin-left: 240px;
    margin-top: 60px;
    padding: 28px 32px 60px;
    min-height: calc(100vh - 60px);
    max-width: 1400px;
}
.module { display: none; }
.module.active { display: block; }

/* ===== 工具栏 ===== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.toolbar .btn { white-space: nowrap; }   /* 工具栏按钮文字单行，不再竖排 */
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-label { font-size: 16px; font-weight: 600; min-width: 220px; text-align: center; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-select {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    outline: none;
}
.filter-select:focus { border-color: var(--accent); }

/* ===== 按钮 ===== */
.btn {
    padding: 6px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #3a7bc8; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #d68910; }
.btn-success { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.btn-success:hover { background: #256528; }
/* 整周复制按钮：醒目高亮，吸引注意 */
.btn-week-copy {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    border: 2px solid #1b5e20;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(46,125,50,0.35);
    padding: 5px 14px;
}
.btn-week-copy:hover {
    background: linear-gradient(135deg, #388e3c, #4caf50);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(46,125,50,0.45);
}
.btn-sm { padding: 4px 12px; font-size: 13px; }
.unattended-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }

/* ===== 教案/测评 ===== */
.lp-section-title { font-size: 15px; font-weight: 600; margin: 18px 0 10px; color: #2e7d32; border-left: 3px solid #2e7d32; padding-left: 8px; }
.plan-card { border: 1px solid #e3e8ee; border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.plan-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.plan-title { font-size: 15px; font-weight: 600; color: #222; }
.plan-class-tag { font-size: 12px; color: #fff; background: #5b8def; border-radius: 10px; padding: 2px 10px; }
.plan-goal { font-size: 13px; color: #555; margin: 4px 0; }
.plan-chapters { font-size: 13px; color: #444; margin: 4px 0; }
.plan-chapters ul { margin: 4px 0 4px 18px; padding: 0; }
.plan-chapters li { margin: 2px 0; }
.plan-remarks { font-size: 13px; color: #666; background: #f7f9fb; border-radius: 4px; padding: 6px 8px; margin: 4px 0; }
.plan-meta { font-size: 12px; color: #999; margin-top: 6px; }
.plan-actions { margin-top: 8px; display: flex; gap: 6px; }
.chapter-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.chapter-row input { padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.score-tag { display: inline-block; font-size: 12px; border-radius: 10px; padding: 2px 10px; color: #fff; }
.score-优 { background: #2e7d32; }
.score-良 { background: #5b8def; }
.score-中 { background: var(--warning); }
.score-待提升 { background: var(--danger); }
.btn-icon {
    width: 32px; height: 32px; padding: 0;
    font-size: 20px; line-height: 30px; text-align: center;
}

/* ===== 课表网格 ===== */
.schedule-grid { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.schedule-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.schedule-table th, .schedule-table td { border: 1px solid #e8e8e8; padding: 0; vertical-align: top; }
.schedule-table thead th {
    background: #fafafa;
    padding: 10px 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    color: #333;
}
.schedule-table thead th .date-num { font-size: 12px; color: #999; font-weight: 400; display: block; margin-top: 2px; }

/* 年份表头行 */
.year-row th.year-header {
    background: #2c3e50;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    padding: 8px 4px;
    letter-spacing: 2px;
}
.time-col { width: 60px; }
.schedule-table th:not(.time-col) { width: calc((100% - 60px) / 7); }

/* 时段行标签 */
.slot-label {
    text-align: center;
    font-weight: 600;
    color: #666;
    padding: 12px 4px;
    background: #fafafa;
    font-size: 13px;
}

/* 单元格 */
.cell { min-height: 120px; padding: 4px; }

/* 课程卡片 */
.course-card {
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.5;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.course-card:hover { transform: translateX(2px); box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.course-card .time { font-weight: 600; font-size: 11px; color: #555; }
.course-card .coach { font-weight: 600; }
.course-card .venue { font-size: 11px; color: #888; }
.course-card .type-tag { font-size: 11px; padding: 1px 5px; border-radius: 3px; display: inline-block; margin-top: 2px; }
.course-card .students { font-size: 11px; color: #666; margin-top: 2px; }
.course-card.conflict { border-left-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }

/* ===== 手机端卡片式课表 =====
   基础规则：桌面隐藏（手机媒体查询内才显示），卡片视觉样式全局定义（仅在容器可见时生效）。 */
.schedule-mobile { display: none; padding: 4px 0; }
.m-day {
    margin-bottom: 14px;
    background: var(--card-solid, #fff);
    border: 1px solid var(--card-border, #e8e8e8);
    border-radius: 12px;
    overflow: hidden;
}
.m-day.m-today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-weak); }
.m-day-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: #f5f7fa; border-bottom: 1px solid #eee;
}
.m-day-name { font-weight: 700; font-size: 15px; color: #333; }
.m-day-date { font-size: 13px; color: #999; }
.m-today-badge { background: var(--accent); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 10px; }
.m-day-count { margin-left: auto; font-size: 12px; color: #888; }
.m-day-add {
    margin-left: 8px; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--accent); background: #fff; color: var(--accent);
    font-size: 20px; line-height: 1; cursor: pointer; flex: 0 0 auto;
}
.m-day-empty { padding: 18px; text-align: center; color: #bbb; font-size: 13px; cursor: pointer; }
.m-course-card {
    position: relative; padding: 10px 14px; border-left: 4px solid #ccc;
    border-bottom: 1px solid #f0f0f0; cursor: pointer; background: #fff;
}
.m-course-card:last-child { border-bottom: none; }
.m-course-card.selected { background: #fff8e1; }
.m-course-card.conflict { border-left-color: var(--danger); }
.m-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.m-time { font-weight: 700; font-size: 14px; color: #333; }
.m-type-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #eee; color: #555; }
.m-coach { font-size: 13px; color: #444; font-weight: 600; }
.m-asst { color: #2e7d32; font-weight: 400; font-size: 12px; }
.m-sep { color: #ccc; font-weight: 400; }
.m-venue { font-size: 12px; color: #888; font-weight: 400; }
.m-students { font-size: 13px; color: #555; margin-top: 4px; line-height: 1.4; }
.m-conflict-flag { margin-top: 4px; font-size: 12px; color: var(--danger); font-weight: 600; }
.m-select-flag { position: absolute; top: 8px; right: 10px; font-size: 18px; color: #999; }
.m-course-card.selected .m-select-flag { color: var(--danger); }
/* 类型色（与桌面 type-* 同色，作用于标签） */
.type-adult    .m-type-tag { background: #bbdefb; color: #1565c0; }
.type-1v1      .m-type-tag { background: #e1bee7; color: #6a1b9a; }
.type-1v2      .m-type-tag { background: #c8e6c9; color: #2e7d32; }
.type-1v3      .m-type-tag { background: #ffccbc; color: #bf360c; }
.type-longterm .m-type-tag { background: #d1c4e9; color: #4527a0; }
.type-camp     .m-type-tag { background: #fff9c4; color: #f57f17; }
.type-club     .m-type-tag { background: #b3e5fc; color: #0277bd; }

/* 课程类型颜色 */
.type-adult { background: #e3f2fd; border-left-color: #1976d2; }
.type-adult .type-tag { background: #bbdefb; color: #1565c0; }
.type-1v1 { background: #f3e5f5; border-left-color: #7b1fa2; }
.type-1v1 .type-tag { background: #e1bee7; color: #6a1b9a; }
.type-1v2 { background: #e0f2f1; border-left-color: #00695c; }
.type-1v2 .type-tag { background: #b2dfdb; color: #00695c; }
.type-1v3 { background: #fff3e0; border-left-color: #e65100; }
.type-1v3 .type-tag { background: #ffe0b2; color: #e65100; }
.type-longterm { background: #e8f5e9; border-left-color: #2e7d32; }
.type-longterm .type-tag { background: #c8e6c9; color: #2e7d32; }
.type-camp { background: #ffebee; border-left-color: #c62828; }
.type-camp .type-tag { background: #ffcdd2; color: #c62828; }
.type-club { background: #f5f5f5; border-left-color: #616161; }
.type-club .type-tag { background: #e0e0e0; color: #616161; }

/* 空格子点击提示 */
.cell.empty:hover { background: #f9f9f9; cursor: pointer; }
.cell.empty::after { content: "+"; color: #ccc; font-size: 20px; display: block; text-align: center; margin-top: 30px; }

/* ===== 图例 ===== */
.legend {
    margin-top: 12px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.legend-title { font-weight: 600; color: #666; font-size: 13px; }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #555; }
.dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.dot.type-adult { background: #1976d2; }
.dot.type-1v1 { background: #7b1fa2; }
.dot.type-1v2 { background: #00695c; }
.dot.type-1v3 { background: #e65100; }
.dot.type-longterm { background: #2e7d32; }
.dot.type-camp { background: #c62828; }
.dot.type-club { background: #616161; }

/* ===== 统计 ===== */
.week-stats {
    margin-top: 12px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: #666;
}
.stat-item b { color: var(--accent); font-size: 16px; }
.stat-coaches span { margin-right: 12px; }

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal {
    background: #fff;
    border-radius: 10px;
    width: 480px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}
.modal-header h3 { font-size: 17px; }
.hour-detail-summary { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.hd-card {
    flex: 0 0 90px; text-align: center; padding: 12px 8px; border-radius: 10px;
    background: #e8f5e9; color: #2e7d32;
}
.hd-card.low { background: #fdecea; color: #e53935; }
.hd-num { font-size: 28px; font-weight: 700; line-height: 1.1; }
.hd-label { font-size: 12px; margin-top: 2px; }
.hd-meta { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 4px; font-size: 13px; color: #555; }
.modal-close {
    border: none; background: none; font-size: 20px;
    color: #999; cursor: pointer; padding: 0 4px;
}
.modal-close:hover { color: #333; }
.modal-body { padding: 20px; }

/* ===== 表单 ===== */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 13px; color: #555; }
.form-row label small { font-weight: 400; color: #aaa; }
.form-row input, .form-row select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}
.form-row input:focus, .form-row select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-weak); }
.form-row.two-col { display: flex; gap: 12px; }
.form-row.two-col > div { flex: 1; }
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.form-actions .btn-danger { margin-right: auto; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ===== 子导航 ===== */
.sub-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e8e8e8;
}
.sub-tab {
    padding: 8px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    outline: none;
}
.sub-tab:hover { color: var(--accent); }
.sub-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.submodule { display: none; }
.submodule.active { display: block; }

/* ===== 卡片盒子 ===== */
.card-box {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow-x: auto;        /* 列多时横向滚动，避免被挤压按字竖排 */
}
.card-box h4 { margin-bottom: 12px; font-size: 15px; color: #333; }

/* ===== 空提示 ===== */
.empty-hint { text-align: center; color: #aaa; padding: 40px 0; font-size: 14px; }

/* ===== 考勤点名 ===== */
.rollcall-list { display: flex; flex-direction: column; gap: 12px; }
.rollcall-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rollcall-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.rollcall-card-info { font-size: 14px; }
.rollcall-card-info .time { font-weight: 700; color: #333; }
.rollcall-card-info .coach { color: var(--accent); font-weight: 600; }
.rollcall-card-info .type-tag-sm {
    font-size: 11px; padding: 2px 8px; border-radius: 3px;
    background: #e3f2fd; color: #1565c0; margin-left: 4px;
}
.rollcall-status-tag {
    font-size: 12px; padding: 2px 10px; border-radius: 12px;
}
.rollcall-status-tag.done { background: #e8f5e9; color: #2e7d32; }
.rollcall-status-tag.pending { background: #fff3e0; color: #e65100; }

/* 未考勤课表面板 */
.unattended-panel {
    background: #fff7f0;
    border: 1px solid #ffd9b3;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 14px;
}
.unattended-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.unattended-header h4 { margin: 0; font-size: 15px; color: #e65100; }
.unattended-count {
    font-size: 12px; color: #fff; background: #ff8a65;
    padding: 1px 9px; border-radius: 10px;
}
.unattended-list { display: flex; flex-direction: column; gap: 8px; }
.unattended-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    border: 1px solid #ffe0cc;
    border-radius: 6px;
    padding: 10px 14px;
    flex-wrap: wrap;
}
.unattended-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.unattended-info .unattended-date { font-weight: 700; color: #333; }
.unattended-info .unattended-time { color: var(--accent); font-weight: 600; }
.unattended-info .coach { color: var(--accent); font-weight: 600; }
.unattended-info .unattended-students { color: #555; }

/* 工资结算未点名拦截横幅 */
.salary-alert-banner {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-left: 4px solid var(--warning);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 14px;
    color: #e65100;
}
.salary-alert-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.salary-alert-list { font-size: 13px; color: #8a5a00; margin-bottom: 8px; line-height: 1.6; }

/* 批量考勤弹窗 */
.bulk-attend-body { max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.bulk-course {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #fafafa;
}
.bulk-course-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.bulk-course-head .unattended-date { font-weight: 700; }
.bulk-course-head .coach { color: var(--accent); font-weight: 600; }
.bulk-course-head .bulk-all-present { margin-left: auto; }
.bulk-students { display: flex; flex-direction: column; gap: 6px; }
.bulk-student { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 6px; padding: 6px 10px; }
.bulk-student-name { font-weight: 600; font-size: 14px; }
.bulk-student-btns { display: flex; gap: 4px; }
.bulk-toggle {
    border: 1px solid #ccc; background: #f5f5f5; color: #555;
    border-radius: 4px; padding: 3px 10px; font-size: 13px; cursor: pointer;
}
.bulk-toggle.present.active { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.bulk-toggle.leave.active { background: var(--warning); border-color: var(--warning); color: #fff; }
.bulk-toggle.absent.active { background: #c62828; border-color: #c62828; color: #fff; }

.attendance-students {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.att-student {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f9f9f9;
    min-width: 120px;
}
.att-student-name { font-weight: 600; font-size: 14px; }
.hour-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    background: #e8f5e9;
    color: #2e7d32;
    white-space: nowrap;
}
.hour-badge.low { background: #fdecea; color: #e53935; }
.att-btn-group { display: flex; gap: 4px; }
.att-btn {
    padding: 4px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    transition: all 0.15s;
    outline: none;
}
.att-btn:hover { border-color: var(--accent); }
.att-btn.active.present { background: var(--success); color: #fff; border-color: var(--success); }
.att-btn.active.leave { background: var(--warning); color: #fff; border-color: var(--warning); }
.att-btn.active.absent { background: var(--danger); color: #fff; border-color: var(--danger); }
.rollcall-save-btn { margin-top: 12px; }

/* ===== 表格化考勤点名 ===== */
.rollcall-table-wrap {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 16px;
    overflow: hidden;
}
.rollcall-table-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.rollcall-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 12px;
}
.rollcall-data-table {
    min-width: 720px;
    font-size: 13px;
}
.rollcall-data-table th,
.rollcall-data-table td {
    text-align: center;
    vertical-align: middle;
}
.rollcall-data-table th[rowspan] {
    background: #fafafa;
}
.rollcall-coach-group {
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    font-weight: 700;
}
.rollcall-thead-sub th {
    background: #fafafa;
    font-size: 12px;
    color: #555;
    min-width: 60px;
}
.rollcall-coach-cell {
    color: var(--accent);
    font-weight: 600;
    min-width: 48px;
}
.rollcall-data-table td .att-btn-group {
    justify-content: center;
}
.rollcall-data-table td .att-btn {
    padding: 3px 8px;
    font-size: 11px;
}
.rollcall-table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.rollcall-save-tip {
    font-size: 12px;
    color: #888;
}

/* ===== 考勤点名：日/月/年 视图切换 ===== */
.rollcall-view-switch {
    display: inline-flex;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    overflow: hidden;
    flex: 0 0 auto;
}
.rollcall-view-switch .view-tab {
    border: none;
    background: #fff;
    color: #4a5568;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    border-right: 1px solid #d0d7e2;
}
.rollcall-view-switch .view-tab:last-child { border-right: none; }
.rollcall-view-switch .view-tab.active { background: var(--accent); color: #fff; }

/* 考勤汇总矩阵表：学生 × 教练 课时合计 */
.rollcall-total-row { background: #f5f8fc; font-weight: 700; }
.rollcall-total-row td { border-top: 2px solid #cfdcec; color: #2c3e50; }

/* ===== 续费表单 ===== */
.renewal-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.renewal-form input, .renewal-form select {
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}
.renewal-form input:focus, .renewal-form select:focus { border-color: var(--accent); }

/* ===== 数据表格 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th, .data-table td {
    white-space: nowrap;       /* 防止中文/数字按字竖排（"性\n别"、"当\n前\n水\n平"等） */
}
.data-table th {
    background: #fafafa;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e8e8e8;
}
.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}
/* 多列表格（学员档案等）保证列宽舒适；窄屏横向滚动由 .card-box 提供 */
#student-table { min-width: 1080px; }
#package-table { min-width: 720px; }
#feedback-table { min-width: 760px; }
#enroll-table { min-width: 960px; }
/* 表头点击排序 */
.data-table th[onclick] { cursor: pointer; user-select: none; }
.data-table th[onclick]:hover { background: #eef3fb; }
.sort-hint { color: var(--accent); font-size: 11px; font-weight: 700; }
.data-table tr:hover td { background: var(--hover-bg); }

/* ===== 学员档案：手机卡片视图 ===== */
.m-stu-card {
    background: #fff;
    border: 1px solid #e5e8ef;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 8px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.m-stu-card.risk { border-color: #f5c6c4; background: #fffafa; }
.m-stu-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; margin-bottom: 6px; }
.m-stu-head label { display: flex; align-items: center; gap: 6px; }
.m-stu-head .hours-badge { margin-left: auto; }
.m-stu-row { font-size: 13px; color: #555; line-height: 1.7; }
.m-stu-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.m-stu-actions .btn { min-height: 34px; padding: 6px 12px; }
.text-right { text-align: right; }
.text-bold { font-weight: 700; color: var(--accent); }

/* ===== 工资结算 ===== */
.salary-hint {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.salary-hint p { margin-bottom: 6px; color: #666; font-size: 13px; }
.salary-rule { background: #fff8e1; padding: 8px 12px; border-radius: 6px; border-left: 3px solid #ffc107; }

/* 教练专属课时费矩阵 */
.coach-fee-table { margin-top: 4px; }
.coach-fee-cell { text-align: center; vertical-align: middle; }
.coach-fee-cell.coach-fee-ov { background: #fff3e6; }
.coach-fee-cell.coach-fee-ov .cf-input { border-color: #e67e22; background: #fffaf3; font-weight: 600; color: #d35400; }
.ov-tag {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #fff;
    background: #e67e22;
    border-radius: 3px;
    padding: 0 4px;
    vertical-align: middle;
}

.salary-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.salary-table th {
    background: var(--accent);
    color: #fff;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}
.salary-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.salary-table .total-row { background: #f0f7ff; font-weight: 700; }
.salary-table .total-row td { color: var(--accent); }
.salary-detail-note { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ===== 学员档案 ===== */
.data-table td .student-hours { font-size: 12px; }
.data-table td .student-hours .remaining { font-weight: 700; color: var(--success); }
.data-table td .student-hours.low { color: var(--danger); }
.data-table td .student-hours.low .remaining { color: var(--danger); }
.data-table td .action-btn {
    padding: 3px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: var(--accent);
    margin-right: 4px;
    transition: all 0.15s;
}
.data-table td .action-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.data-table td .action-btn.danger { color: var(--danger); }
.data-table td .action-btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.data-table td .level-tag {
    font-size: 11px; padding: 2px 8px; border-radius: 3px;
    background: #e3f2fd; color: #1565c0;
}
.data-table td .hours-badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 12px; font-weight: 600;
}
.hours-badge.ok { background: #e8f5e9; color: #2e7d32; }
.hours-badge.low { background: #fff3e0; color: #e65100; }
.hours-badge.empty { background: #ffebee; color: #c62828; }

/* 到期预警分级标签 */
.expire-badge {
    display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px;
    font-size: 11px; font-weight: 600; vertical-align: middle;
}
.expire-badge.ok { display: none; }
.expire-badge.soon { background: #fff8e1; color: #f57f17; border: 1px solid #ffe082; }
.expire-badge.expired { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* 风险行高亮（课时不足 / 即将到期 / 已过期） */
.data-table tbody tr.risk-row td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.data-table tbody tr.risk-row { background: rgba(231, 76, 60, 0.06); }

/* 复选框列 */
.col-check { width: 36px; text-align: center; }
.data-table td.col-check, .data-table th.col-check { text-align: center; }

/* 考勤筛选横幅 */
.rollcall-filter-banner {
    display: flex; align-items: center; gap: 12px;
    background: #e3f2fd; color: #1565c0; padding: 8px 14px; border-radius: 6px;
    margin-bottom: 12px; font-size: 13px; font-weight: 600;
}
.rollcall-filter-banner .btn { margin-left: auto; }

/* 批量续费弹窗 */
.batch-renew-target { background: #f5f7fa; padding: 8px 12px; border-radius: 6px; margin: 0 0 14px; font-size: 13px; color: #333; }
.batch-renew-hint { font-size: 12px; color: #888; margin: 12px 0 0; line-height: 1.6; }
/* 统一层接管 .btn-warning，此处旧定义已作废 */

/* 教案库文件引用徽标 */
.lp-ref-badge {
    display: inline-block; margin-left: 8px; padding: 1px 7px;
    background: #e3f2fd; color: #1565c0; border-radius: 10px;
    font-size: 11px; font-weight: 600; vertical-align: middle;
}
.plan-file { margin-top: 6px; }
.plan-file .action-btn { color: #1565c0; background: #e3f2fd; border-color: #bbdefb; }
.plan-file .action-btn:hover { background: #bbdefb; }

/* ===== 课后点评 ===== */
.feedback-content {
    max-width: 300px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}
.send-tag {
    font-size: 11px; padding: 2px 8px; border-radius: 3px;
}
.send-tag.sent { background: #e8f5e9; color: #2e7d32; }
.send-tag.unsent { background: #fff3e0; color: #e65100; }

/* ===== 教案库 ===== */
.lp-tree {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    min-height: 400px;
}
.lp-path { font-size: 13px; color: #888; }
.lp-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    font-size: 14px;
}
.lp-item:hover { background: #f0f7ff; }
.lp-item .lp-icon { margin-right: 8px; font-size: 18px; }
.lp-item .lp-name { flex: 1; }
.lp-item .lp-size { font-size: 12px; color: #aaa; margin-right: 12px; }
.lp-item .lp-actions { display: flex; gap: 4px; }
.lp-item .lp-action-btn {
    padding: 2px 8px; border: 1px solid #d9d9d9; border-radius: 4px;
    background: #fff; cursor: pointer; font-size: 11px; color: var(--accent);
    transition: all 0.15s;
}
.lp-item .lp-action-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.lp-item .lp-action-btn.danger { color: var(--danger); }
.lp-item .lp-action-btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
/* 教案卡片删除按钮 */
.plan-actions .action-btn.danger { color: var(--danger); }
.plan-actions .action-btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.lp-children { margin-left: 24px; border-left: 1px solid #eee; }
.lp-empty { text-align: center; color: #aaa; padding: 60px 0; }
.lp-folder-form {
    display: none;
    gap: 8px;
    align-items: center;
    margin: 8px 0;
    padding: 8px 12px;
    background: #f0f7ff;
    border-radius: 6px;
}
.lp-folder-form.show { display: flex; }
.lp-folder-form input {
    flex: 1; padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px;
}

/* ===== 待办提醒模块 ===== */
.dash-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.dash-stat-card {
    flex: 1;
    min-width: 110px;
    background: #fff;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.dash-stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.dash-stat-card .dash-stat-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}
.dash-stat-card .dash-stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}
.dash-stat-card.dash-salary { background: #fff3e0; }
.dash-stat-card.dash-salary .dash-stat-num { color: #e65100; }

/* ===== 经营看板 ===== */
.biz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.chart-wrap {
    position: relative;
    height: 260px;
}
.biz-alert-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px dashed rgba(128,128,128,0.25);
}
.biz-alert-row:last-child { border-bottom: none; }
.biz-alert-badge {
    background: #fff3cd;
    color: #856404;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.biz-alert-count {
    font-size: 14px;
    font-weight: 700;
    color: #e65100;
    white-space: nowrap;
}
.biz-alert-names {
    font-size: 13px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.month-input {
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    font-size: 13px;
}
@media (max-width: 900px) {
    .biz-grid { grid-template-columns: 1fr; }
}

.dash-alert {
    border-left: 4px solid var(--danger);
}
.dash-salary-alert {
    border-left: 4px solid #ff9800;
    background: #fff8e1;
}
.dash-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--success);
    font-size: 16px;
}

/* 今日排课列表 */
.dash-today-course {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 14px;
}
.dash-today-course .time { font-weight: 700; color: #333; min-width: 100px; }
.dash-today-course .coach { color: var(--accent); font-weight: 600; }
.dash-today-course .type-tag-sm {
    font-size: 11px; padding: 2px 8px; border-radius: 3px;
    background: #e3f2fd; color: #1565c0;
}
.dash-today-course .status-tag {
    font-size: 11px; padding: 2px 8px; border-radius: 3px; margin-left: auto;
}
.dash-today-course .status-tag.done { background: #e8f5e9; color: #2e7d32; }
.dash-today-course .status-tag.pending { background: #fff3e0; color: #e65100; }

/* 冲突项 */
.dash-conflict-item {
    padding: 8px 12px;
    background: #ffebee;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #c62828;
}
.dash-conflict-item b { color: #333; }

/* ===== 批量选择拖拽框选 ===== */
.drag-select-rect {
    position: fixed;
    border: 2px dashed var(--accent);
    background: var(--accent-weak);
    z-index: 9999;
    pointer-events: none;
    border-radius: 4px;
}
.course-card.drag-highlight {
    outline: 2px solid var(--accent) !important;
    outline-offset: -1px;
    background-color: rgba(74,144,217,0.08) !important;
}
.batch-hint {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 4px;
}
.batch-bar button { white-space: nowrap; }
.copy-bar button { white-space: nowrap; }
.course-card.copy-selected {
    outline: 2px solid #2e7d32 !important;
    outline-offset: -1px;
}
.cell.paste-target { cursor: copy; }

/* ===== 删除进度遮罩 ===== */
.delete-progress-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.delete-progress-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    min-width: 260px;
}
.delete-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e8e8e8;
    border-top-color: var(--danger);
    border-radius: 50%;
    animation: delete-spin 0.7s linear infinite;
}
@keyframes delete-spin {
    to { transform: rotate(360deg); }
}
.delete-progress-text {
    font-size: 15px;
    color: #333;
    font-weight: 600;
}
.delete-progress-sub {
    font-size: 12px;
    color: #999;
}

/* ===== 搜索结果表格 ===== */
#search-results-table tr:hover td {
    background: #f5f7fa;
}
#search-results-table .type-tag { color: #fff; }
/* 搜索结果中的课程类型标签独立配色 */
#search-results-table .type-tag.type-adult { background: #1976d2; color: #fff; }
#search-results-table .type-tag.type-1v1 { background: #7b1fa2; color: #fff; }
#search-results-table .type-tag.type-1v2 { background: #00695c; color: #fff; }
#search-results-table .type-tag.type-1v3 { background: #e65100; color: #fff; }
#search-results-table .type-tag.type-longterm { background: #2e7d32; color: #fff; }
#search-results-table .type-tag.type-camp { background: #c62828; color: #fff; }
#search-results-table .type-tag.type-club { background: #616161; color: #fff; }
.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-weak);
}

/* ===== 响应式适配（平板 / 手机横屏） ===== */
/* 主要针对横屏手机（约 667-900px 宽）与平板，确保不溢出、不错位 */
@media (max-width: 1024px) {
    .main-content { padding: 12px; }
    .top-bar { padding: 0 12px; }
    .nav-tabs { flex-wrap: wrap; }
    .nav-tab { padding: 8px 12px; font-size: 13px; }
    .logo { font-size: 16px; }
    .filters { flex-wrap: wrap; }
    .week-label { min-width: 150px; font-size: 14px; }
    .week-nav { flex-wrap: wrap; }
    /* 宽表与课表网格在窄屏内横向滚动，避免列压扁 / 错位 */
    .schedule-grid { overflow: auto; }
    .schedule-table { min-width: 660px; }
    .card-box { overflow-x: auto; }
    .data-table { min-width: 600px; }
}

/* ===== 手机端适配（竖屏，宽 ≤768px）=====
   说明：已移除旧版"伪横屏旋转" hack（transform: rotate(90deg)）。
   那种写法会让 position:fixed/sticky 的弹窗、顶部导航、Toast 等
   的定位坐标系错乱，导致界面显示不全、触摸坐标错位、无法精准点击。
   现改为主流做法：窄屏横向滚动 + 弹窗/表单全屏 + 放大可点区域。 */
@media (max-width: 768px) {
    /* 主内容收窄 */
    .main-content { padding: 10px 12px; }

    /* 顶部导航：导航 tab 单独成行并横向滚动，避免被挤出或遮挡 */
    .top-bar {
        flex-wrap: wrap;
        height: auto;
        min-height: 52px;
        padding: 6px 10px;
        gap: 8px;
        align-items: center;
    }
    .logo { flex: 0 0 auto; }
    .logo-text { font-size: 14px; }
    .current-user { display: none; }            /* 窄屏省空间 */
    .hour-quick-search { display: none; }       /* 让位给导航，桌面端仍可用 */
    .theme-toggle { margin-left: auto; }
    .nav-tabs {
        order: 5;
        width: 100%;
        flex: 1 1 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 2px;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }
    .nav-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 13px;
    }

    /* 工具栏竖排撑满，按钮够大 */
    .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .week-nav { justify-content: space-between; width: 100%; }
    .filters { flex-wrap: wrap; width: 100%; }
    .filter-select { flex: 1 1 auto; min-height: 40px; }

    /* 通用按钮放大可点区域（最小 40px 高） */
    .btn { min-height: 40px; padding: 10px 16px; font-size: 14px; }
    .btn-sm { min-height: 36px; padding: 8px 12px; }
    .btn-icon { min-width: 44px; min-height: 44px; font-size: 20px; }

    /* 课表：手机改用卡片式视图，隐藏桌面表格（不再横向滚动） */
    .schedule-grid { display: none !important; }
    .schedule-mobile { display: block; }
    .data-table { min-width: 480px; }

    /* 考勤点名：视图切换占满一行，日/月/年输入各自成行 */
    .rollcall-view-switch { width: 100%; flex: 1 1 100%; }
    .rollcall-view-switch .view-tab { flex: 1 1 auto; padding: 10px 8px; }
    .week-nav #rollcall-day-wrap,
    .week-nav #rollcall-month-wrap,
    .week-nav #rollcall-year-wrap {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    /* 弹窗全屏，避免被裁切/遮挡 */
    .modal-overlay { padding: 0; align-items: stretch; justify-content: flex-start; }
    .modal {
        width: 100%;
        max-width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    .modal-header { padding: 14px 16px; }
    .modal-close { font-size: 24px; padding: 4px 8px; }
    .modal-body { padding: 16px; }

    /* 表单：两列改单列，输入框加大防误触、防 iOS 聚焦缩放 */
    .form-row.two-col { flex-direction: column; }
    .form-row input, .form-row select { min-height: 44px; font-size: 16px; padding: 10px 12px; }
    .form-actions { flex-wrap: wrap; }
    .form-actions .btn { flex: 1 1 auto; min-height: 44px; }

    /* 批量/复制操作栏：可换行、可滚动，不挡内容 */
    .batch-bar, .copy-bar {
        flex-wrap: wrap;
        max-height: 42vh;
        overflow-y: auto;
        gap: 8px;
        padding: 10px 12px;
    }

    /* 工作台卡片：窄屏双列起步 */
    .wb-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .wb-header { flex-wrap: wrap; }
}

/* 超小屏（≤480px）：进一步收紧 */
@media (max-width: 480px) {
    .logo-text { display: none; }
    .week-label { min-width: 120px; font-size: 13px; }
    .modal-body { padding: 12px; }
    .schedule-table { min-width: 560px; }
}

/* 刘海屏安全区：Toast 不被底部工具栏遮挡 */
.toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

/* ===== 加载转圈 UI ===== */
#page-loading {
    position: fixed; inset: 0; z-index: 9999;
    display: none; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.5);
}
#page-loading.show { display: flex; }
#page-loading .loading-inner {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    background: #fff; padding: 18px 24px; border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.18); min-width: 120px;
}
#page-loading .loading-text { font-size: 13px; color: #555; }
.spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid #e6e6e6; border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 按钮内联转圈 */
.btn-spinner {
    display: inline-block; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff;
    animation: spin 0.7s linear infinite; vertical-align: -2px; margin-right: 6px;
}
.btn:not(.btn-primary) .btn-spinner { border-color: rgba(0,0,0,0.2); border-top-color: var(--accent); }
/* 小号内联转圈（如选课程类型加载学员） */
.mini-spinner {
    display: inline-block; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid #e3e3e3; border-top-color: var(--accent);
    animation: spin 0.8s linear infinite; vertical-align: middle;
}

/* ===== 工作台总览首页（现代化：2×2 圆角卡片 + 进度条） ===== */
.wb-greeting {
    display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
    margin-bottom: 22px;
}
.wb-greeting-label {
    font-size: 12px; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase; color: var(--text-dim);
}
.wb-greeting-title {
    font-size: 28px; font-weight: 800; color: var(--text);
    margin: 0; letter-spacing: 0.5px;
}
.wb-greeting-sub {
    font-size: 13px; color: var(--text-dim);
    width: 100%; margin-top: 4px;
}
.wb-greeting-sub b { color: var(--accent); font-weight: 600; }

.wb-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.wb-header h2, .wb-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.wb-sub { font-size: 13px; color: var(--text-dim); }
.wb-sub #wb-date { color: var(--accent); font-weight: 600; }
.wb-date { font-size: 13px; color: var(--text-dim); }

/* 卡片模块大块 */
.wb-section {
    margin-bottom: 28px;
    background: var(--card-solid);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.wb-section > h3 {
    font-size: 16px; font-weight: 700; color: var(--text);
    margin: 0 0 18px; letter-spacing: 0.3px;
    display: flex; align-items: center; justify-content: space-between;
}
.wb-section > h3 .wb-count {
    font-size: 12px; color: var(--text-dim); font-weight: 500;
    background: var(--hover-bg, rgba(0,0,0,0.04));
    padding: 3px 10px; border-radius: 10px;
}

/* 2×2 圆角卡片网格（参考图） */
.wb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.wb-grid.wb-grid-2x2 { grid-template-columns: repeat(2, 1fr); }

/* 今日课表小卡 */
.wb-course {
    background: var(--card-bg, var(--card-solid));
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--accent);
    border-radius: 12px; padding: 14px 16px;
    cursor: pointer; transition: all .2s; position: relative;
}
.wb-course:hover { border-color: var(--accent); box-shadow: 0 4px 14px var(--accent-weak); transform: translateY(-1px); }
.wb-course .wb-time { font-weight: 700; color: var(--text); font-size: 15px; }
.wb-course .wb-coach { color: var(--accent); font-weight: 600; font-size: 13px; margin-left: 8px; }
.wb-course .wb-type { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.wb-status {
    position: absolute; top: 12px; right: 12px;
    font-size: 11px; padding: 2px 10px; border-radius: 10px;
    font-weight: 500;
}
.wb-status.done { background: rgba(46, 204, 113, .15); color: var(--success); }
.wb-status.pending { background: rgba(255, 176, 46, .15); color: var(--warning); }

/* 2×2 大圆角卡片（参考图风格：角标 + 标题 + 大数字 + 进度条） */
.wb-stat {
    background: var(--card-bg, var(--card-solid));
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px 22px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex; flex-direction: column; justify-content: space-between;
}
.wb-stat:hover { border-color: var(--accent); box-shadow: 0 6px 20px var(--accent-weak); transform: translateY(-2px); }
.wb-stat::before {
    content: attr(data-icon);
    position: absolute;
    top: 18px; left: 22px;
    font-size: 18px; opacity: 0.7;
}
.wb-stat-tag {
    position: absolute; top: 16px; right: 18px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text-dim);
    background: var(--hover-bg, rgba(0,0,0,0.04));
    padding: 4px 10px; border-radius: 6px;
}
.wb-stat .wb-label {
    font-size: 13px; color: var(--text-dim);
    font-weight: 500; margin-top: 28px;
}
.wb-stat .wb-num {
    font-size: 36px; font-weight: 800; color: var(--text);
    line-height: 1.1; margin: 4px 0 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}
.wb-stat .wb-num-suffix { font-size: 14px; font-weight: 500; color: var(--text-dim); margin-left: 4px; }
.wb-stat .wb-num.alert { color: var(--danger); }
.wb-stat .wb-num.warn  { color: var(--warning); }
.wb-stat .wb-num.ok    { color: var(--success); }
.wb-stat .wb-num.accent { color: var(--accent); }
.wb-stat .wb-bar {
    margin-top: 14px;
    height: 4px; background: var(--hover-bg, rgba(0,0,0,0.06));
    border-radius: 2px; overflow: hidden;
}
.wb-stat .wb-bar-fill {
    display: block; height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width .4s ease;
}
.wb-stat.alert .wb-bar-fill { background: var(--danger); }
.wb-stat.warn  .wb-bar-fill { background: var(--warning); }
.wb-stat.ok    .wb-bar-fill { background: var(--success); }

.wb-list { display: flex; flex-direction: column; gap: 8px; }
.wb-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--card-bg, var(--card-solid));
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px 16px; cursor: pointer;
    transition: all .15s; font-size: 14px; color: var(--text);
}
.wb-row:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(74,144,217,0.08); }
.wb-row .wb-meta { color: var(--text-dim); font-size: 13px; }
.wb-badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: rgba(255, 92, 92, .15); color: var(--danger); }
.wb-badge.warn { background: rgba(255, 176, 46, .15); color: var(--warning); }
.wb-badge.ok { background: rgba(46, 204, 113, .15); color: var(--success); }
.wb-badge.info { background: rgba(74, 144, 217, .15); color: var(--accent); }
.wb-badge.info { background: var(--accent-weak); color: var(--accent); }
.wb-stat.info .wb-num { color: var(--text-dim); }
.wb-coach-bars { display: flex; flex-direction: column; gap: 8px; }
.wb-coach-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); }
.wb-coach-bar .wb-coach-name { width: 80px; color: var(--text-dim); white-space: nowrap; }
.wb-coach-bar .wb-bar-track { flex: 1; height: 10px; background: var(--input-bg); border-radius: 6px; overflow: hidden; }
.wb-coach-bar .wb-bar-fill { height: 100%; background: var(--accent); border-radius: 6px; }
.wb-coach-bar .wb-bar-val { width: 52px; text-align: right; color: var(--text-dim); }
.wb-note { font-size: 12px; color: var(--text-mute); margin-top: 6px; }
.wb-more-toggle { cursor: pointer; color: var(--accent); user-select: none; }
.wb-more-toggle:hover { text-decoration: underline; }
#wb-cf-more { flex-direction: column; gap: 8px; }


/* ==================== 移动端响应式：恢复横向导航布局（≤768px） ==================== */
@media (max-width: 768px) {
    /* 显示移动端横向导航，隐藏侧边栏与顶部简洁栏 */
    .mobile-nav { display: flex; }
    .sidebar { display: none; }
    .topbar-mini { display: none; }

    /* 主内容区回到无侧边栏布局 */
    .main-content {
        margin-left: 0;
        margin-top: 52px;
        padding: 16px 12px 48px;
        min-height: calc(100vh - 52px);
    }

    /* 工作台卡片：手机上恢复紧凑网格（原 1 列风格），卡片内边距收窄 */
    .wb-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .wb-grid-2x2 { grid-template-columns: repeat(2, 1fr); }
    .wb-greeting-title { font-size: 22px; }
    .wb-stat { padding: 16px; min-height: 120px; }
    .wb-stat .wb-num { font-size: 28px; }
    .wb-section { padding: 16px; border-radius: 12px; }
}

/* ==================== 人脸识别模块（教练主页标签） ==================== */
.face-checkin-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.face-checkin-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.face-checkin-notice {
    font-size: 12px; color: var(--text-dim); margin-top: 4px;
    background: var(--hover-bg); border-radius: 8px; padding: 6px 10px;
}
.face-checkin-layout {
    display: flex; gap: 18px; flex-wrap: wrap;
}
.face-cam-col {
    flex: 1 1 360px; min-width: 300px;
    background: var(--card-solid); border: 1px solid var(--card-border);
    border-radius: 16px; padding: 16px;
}
.face-camera-wrap {
    position: relative; border-radius: 14px; overflow: hidden;
    background: #000; aspect-ratio: 3/4; max-height: 460px;
    border: 1px solid rgba(255,255,255,0.08);
}
.face-camera-wrap video { width: 100%; height: 100%; object-fit: cover; }
.face-camera-wrap img { width: 100%; height: 100%; object-fit: cover; }
.fc-placeholder {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    color: var(--text-dim); font-size: 14px;
}
.fc-big { font-size: 44px; }
.fc-hint { text-align: center; font-size: 12px; color: var(--text-dim); margin-top: 8px; }
.fc-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.fc-btns .btn { white-space: nowrap; }

.face-result-col {
    flex: 1 1 320px; min-width: 280px;
    background: var(--card-solid); border: 1px solid var(--card-border);
    border-radius: 16px; padding: 18px;
    display: flex; flex-direction: column;
}
.fc-empty-tip {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-dim); text-align: center; padding: 30px 10px;
}
.fc-result-card { text-align: center; padding: 10px 4px; }
.fc-result-card .fc-label { font-size: 13px; color: var(--text-dim); }
.fc-result-card .fc-name { font-size: 36px; font-weight: 900; margin: 8px 0 4px; letter-spacing: 2px; }
.fc-result-card .fc-score { font-size: 13px; color: var(--text-dim); }
.fc-result-card .fc-remaining { font-size: 20px; font-weight: 800; margin-top: 8px; }
.fc-result-card .fc-note { font-size: 13px; margin-top: 8px; color: var(--text-dim); }
.fc-result-card .fc-warn { color: var(--warning); font-weight: 600; }
.fc-result-card .fc-ok { color: var(--success); font-weight: 600; }
.fc-result-card .fc-err { color: var(--danger); font-weight: 600; }
.fc-candidate {
    background: var(--card-bg); border: 2px solid var(--accent);
    border-radius: 14px; padding: 18px; text-align: center; margin-top: 6px;
}
.fc-candidate .fc-cname { font-size: 26px; font-weight: 800; }
.fc-candidate .fc-cscore { font-size: 13px; color: var(--text-dim); margin: 6px 0 4px; }
.fc-candidate .fc-cwarn { font-size: 12px; color: var(--warning); margin-top: 4px; }

/* ==================== 课表卡片快捷签到图标 ==================== */
.course-face-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px;
    margin-left: 8px; padding: 0;
    background: linear-gradient(135deg, #369EFF, #2b7de0);
    color: #fff; border-radius: 6px; cursor: pointer;
    font-size: 13px; line-height: 1;
    vertical-align: middle;
    transition: transform 0.15s, box-shadow 0.15s;
    user-select: none;
    box-shadow: 0 1px 3px rgba(54,158,255,0.35);
}
.course-face-btn:hover { transform: scale(1.15); box-shadow: 0 3px 8px rgba(54,158,255,0.5); }
.course-face-btn:active { transform: scale(0.95); }

.m-face-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    margin-left: 8px; padding: 0;
    background: linear-gradient(135deg, #369EFF, #2b7de0);
    color: #fff; border-radius: 8px; cursor: pointer;
    font-size: 15px; line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(54,158,255,0.35);
}
.m-face-btn:hover { opacity: 0.85; }

/* ==================== 人脸库管理模块（管理员） ==================== */
.facelib-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.facelib-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.facelib-notice { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.facelib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 12px;
}
.facelib-card {
    background: var(--card-solid);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 14px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.facelib-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.facelib-card.unreg { border-color: rgba(255,176,46,0.4); }
.facelib-avatar {
    width: 84px; height: 84px; border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--card-border);
    background: var(--hover-bg);
}
.facelib-avatar-empty {
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: 800; color: var(--text-dim);
    background: var(--hover-bg);
}
.facelib-name { font-size: 15px; font-weight: 700; color: var(--text); text-align: center; }
.facelib-meta { font-size: 11px; color: var(--text-dim); text-align: center; }
.facelib-badge { font-size: 12px; padding: 2px 10px; border-radius: 10px; font-weight: 600; }
.facelib-badge.ok { background: rgba(46,204,113,0.15); color: var(--success); }
.facelib-badge.warn { background: rgba(255,176,46,0.15); color: var(--warning); }
.facelib-ops { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
.facelib-ops .btn { padding: 5px 10px; font-size: 12px; }

/* 待办任务角标 */
.badge-dot {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    background: var(--danger); color: #fff;
    border-radius: 10px; font-size: 12px; font-weight: 700;
    vertical-align: middle;
}

/* 侧边栏待办角标（红色圆圈数字） */
.todo-nav-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    background: var(--danger); color: #fff;
    border-radius: 10px; font-size: 12px; font-weight: 700;
    margin-left: auto; vertical-align: middle;
    animation: todo-blink 1.6s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255,92,92,0.5);
}
@keyframes todo-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}
.nav-tab .todo-nav-badge { margin-left: 4px; }

/* ===== 报名记录多选批量操作条 ===== */
.enroll-batch-bar {
    display: flex; align-items: center; gap: 12px;
    margin-top: 12px; padding: 10px 14px;
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.25);
    border-radius: 8px;
}
.enroll-batch-bar .batch-count { font-size: 13px; color: var(--text-dim); }
.enroll-batch-bar .batch-count b { color: var(--danger); font-size: 15px; }
.enroll-batch-bar .btn-danger { background: var(--danger); border-color: var(--danger); }

/* ===== 课时费查看：总览 → 详情 两段式 ===== */
.coach-overview-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.coach-overview-item {
    padding: 12px 14px;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    background: var(--bg-elev);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .05s;
}
.coach-overview-item:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.coach-overview-item:active { transform: scale(0.995); }
.coach-overview-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.coi-head { display: flex; align-items: baseline; gap: 8px; }
.coi-name { font-weight: 600; font-size: 15px; color: var(--text); }
.coi-level { font-size: 12px; color: var(--text-dim); }
.coi-fee { margin-left: auto; font-size: 13px; color: var(--accent); font-weight: 600; }
.coi-bar { margin-top: 8px; height: 8px; border-radius: 4px; background: rgba(128,128,128,.18); overflow: hidden; }
.coi-bar-fill { height: 100%; border-radius: 4px; background: var(--accent); min-width: 2px; }
.cf-detail-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.cf-detail-title { font-size: 14px; font-weight: 600; color: var(--text); }
.day-block .day-sub { float: right; font-size: 13px; color: var(--accent); font-weight: 600; }

/* ===== 公开首页（群活动 + 比赛）===== */
body.guest .sidebar, body.guest .topbar-mini, body.guest .mobile-nav, body.guest .sidebar-footer { display: none !important; }
body.guest .main-content { margin-left: 0 !important; padding: 0 !important; }
.public-home { max-width: 1100px; margin: 0 auto; padding: 24px 18px 60px; }
.ph-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 16px; border-bottom: 1px solid var(--card-border); }
.ph-brand { font-size: 20px; font-weight: 700; color: var(--text); }
.ph-hero { text-align: center; padding: 28px 0 18px; }
.ph-hero h1 { font-size: 26px; color: var(--text); }
.ph-hero p { color: var(--text-dim); margin-top: 8px; max-width: 640px; margin-left: auto; margin-right: auto; }
.ph-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
.ph-board { background: var(--bg-elev); border: 1px solid var(--card-border); border-radius: 12px; padding: 16px; }
.ph-board h2 { font-size: 17px; margin-bottom: 12px; color: var(--text); }
.ph-card-list { display: flex; flex-direction: column; gap: 12px; }
.ph-card { border: 1px solid var(--card-border); border-radius: 10px; padding: 12px 14px; background: var(--bg); }
.ph-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ph-card-title { font-weight: 600; color: var(--text); font-size: 15px; }
.ph-card-meta, .ph-card-sub { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.ph-card-desc { font-size: 13px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; }
.ph-status { font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.ph-status-open { background: rgba(46,160,67,.15); color: #2ea043; }
.ph-status-closed { background: rgba(210,153,34,.18); color: #d29922; }
.ph-status-ended { background: rgba(128,128,128,.18); color: #888; }
.ph-status-other { background: rgba(88,166,255,.15); color: #58a6ff; }
/* 公开首页卡片操作区：报名 / 查看对阵等按钮统一放进此容器，
   用 gap 明确拉开按钮间距，窄屏自动换行，不再靠按钮各自 margin 挤在一起。 */
.ph-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; }
.ph-card-actions:empty { display: none; }
.ph-pay { font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.ph-pay-paid { background: rgba(46,160,67,.15); color: #2ea043; }
.ph-pay-unpaid { background: rgba(210,153,34,.18); color: #d29922; }
.ph-voucher-link { color: var(--accent); font-size: 13px; }
.ph-my-row { margin-top: 10px; }
@media (max-width: 768px) { .ph-boards { grid-template-columns: 1fr; } }

/* ===== 管理员：群活动/赛事管理 + 会员申请 ===== */
.module-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.module-head h2 { font-size: 18px; color: var(--text); }
.admin-form { background: var(--bg-elev); border: 1px solid var(--card-border); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 16px; }
.form-grid .form-row { margin: 0; }
.admin-form .form-row { margin-top: 10px; }
.form-actions { margin-top: 12px; display: flex; gap: 10px; justify-content: flex-end; }
.filter-tabs { display: inline-flex; gap: 6px; }
.filter-tab { border: 1px solid var(--card-border); background: var(--bg); color: var(--text-dim); padding: 5px 12px; border-radius: 14px; cursor: pointer; font-size: 13px; }
.filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 赛事归档：列表筛选标签 + 徽标 */
.ev-arch-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ev-arch-tab { border: 1px solid var(--card-border); background: var(--bg); color: var(--text-dim); padding: 6px 14px; border-radius: 14px; cursor: pointer; font-size: 13px; }
.ev-arch-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ev-arch-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #1f4d33; color: #bdf2d3; border: 1px solid #2f9e63; vertical-align: middle; }

/* ===== 赛事操作下拉分组菜单 ===== */
.ev-actions { position: relative; display: inline-block; }
.ev-act-trigger .caret { display: inline-block; margin-left: 4px; font-size: 10px; opacity: 0.7; transition: transform 0.15s; }
.ev-actions.open .ev-act-trigger .caret { transform: rotate(180deg); }
.ev-menu {
    position: fixed;
    min-width: 172px;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(20, 40, 80, 0.18);
    padding: 6px;
    z-index: 200;
    text-align: left;
}
.ev-menu[hidden] { display: none; }
.ev-menu-group { padding: 2px 0; }
.ev-menu-group + .ev-menu-group { border-top: 1px solid #f0f3f7; }
.ev-menu-group.ev-menu-danger { border-top: 1px solid #f6d6d2; margin-top: 2px; }
.ev-menu-label { font-size: 11px; color: #9aa4b2; font-weight: 600; padding: 3px 10px 4px; letter-spacing: 0.5px; }
.ev-menu-item {
    display: block; width: 100%; box-sizing: border-box;
    border: none; background: transparent; cursor: pointer;
    padding: 8px 10px; border-radius: 6px; font-size: 13px; color: #334;
    text-align: left; white-space: nowrap;
}
.ev-menu-item:hover { background: #f0f6ff; color: var(--accent); }
.ev-menu-item.danger { color: var(--danger); }
.ev-menu-item.danger:hover { background: #fdecea; color: #c0392b; }

/* ===== 通用「操作 ▾」分组下拉菜单（dropdown.js，复用 .ev-menu 视觉） ===== */
.am-actions { position: relative; display: inline-block; }
.am-act-trigger .caret { display: inline-block; margin-left: 4px; font-size: 10px; opacity: 0.7; transition: transform 0.15s; }
.am-actions.open .am-act-trigger .caret { transform: rotate(180deg); }
.am-act-trigger { min-width: 78px; }

/* 公开观赛弹窗：实时指示灯 */
.tour-live { font-size: 13px; color: #2f9e63; margin-right: auto; padding-left: 4px; }

/* ===== 开通账号 申请弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-box { background: var(--bg-elev); border: 1px solid var(--card-border); border-radius: 12px; width: 100%; max-width: 440px; padding: 20px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-sub { font-size: 13px; color: var(--text-dim); margin: 6px 0 14px; line-height: 1.5; }
.modal-box .form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.modal-box .form-row label { font-size: 13px; color: var(--text-dim); }
.modal-box .form-row input, .modal-box .form-row select { padding: 8px 10px; border: 1px solid var(--card-border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 14px; }
.form-error { color: #e5484d; font-size: 13px; margin: 4px 0 10px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }

/* ===== 分组导航：教练工作台 / 经营工作台 ===== */
.sidebar-group {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 14px; font-weight: 600;
    text-decoration: none; cursor: pointer;
    transition: all 0.15s;
    user-select: none; white-space: nowrap;
}
.sidebar-group:hover { background: var(--hover-bg); color: var(--text); }
.sidebar-group .group-caret {
    margin-left: auto; font-size: 12px;
    transition: transform 0.15s;
    transform: rotate(0deg);
}
.sidebar-group.open .group-caret { transform: rotate(90deg); }

.sidebar-submenu { display: none; flex-direction: column; gap: 2px; padding-left: 14px; margin: 2px 0; }
.sidebar-submenu.open { display: flex; }
.sidebar-item.sub {
    padding: 8px 14px 8px 22px;
    font-size: 13.5px; font-weight: 500;
    color: var(--text-dim);
}
.sidebar-item.sub::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--text-dim); opacity: 0.5;
    margin-right: 8px; flex-shrink: 0;
    align-self: center;
}
.sidebar-item.sub.active { color: #fff; }
.sidebar-item.sub.active::before { background: #fff; opacity: 0.9; }

/* 移动端分组导航 */
.nav-group {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 12px; border-radius: 8px; white-space: nowrap;
    color: var(--text-dim); font-size: 13px; font-weight: 600;
    text-decoration: none; cursor: pointer; user-select: none;
}
.nav-group .group-caret { font-size: 10px; transition: transform 0.15s; transform: rotate(0deg); }
.nav-group.open .group-caret { transform: rotate(90deg); }
.nav-submenu { display: none; gap: 6px; padding: 4px 0 4px 8px; }
.nav-submenu.open { display: flex; flex-wrap: wrap; flex: 1 1 100%; }
.nav-tab.sub { padding: 8px 12px; font-size: 13px; }
.nav-tab.sub::before { content: "·"; margin-right: 2px; color: var(--text-dim); }

/* ===== 物资库存模块 ===== */
.module-head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.stat-card {
    background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
    padding: 14px 16px; box-shadow: var(--shadow);
}
.stat-card .stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-card .stat-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.stat-card.neg .stat-value { color: var(--danger); }

.lowstock-banner {
    background: rgba(255, 92, 92, 0.12); border: 1px solid rgba(255, 92, 92, 0.4);
    border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
}
.lowstock-title { color: var(--danger); font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.lowstock-list { display: flex; flex-wrap: wrap; gap: 6px; }
.lowstock-chip {
    background: rgba(255, 92, 92, 0.2); color: var(--danger); border-radius: 6px;
    padding: 3px 8px; font-size: 12px; border: 1px solid rgba(255, 92, 92, 0.35);
}

.stock-ok { color: var(--success); font-weight: 600; }
.stock-warn { color: var(--warning); font-weight: 600; }
.stock-neg { color: var(--danger); font-weight: 700; }

/* ===== 赛事编排 ===== */
.tour-guide { margin: 6px 0 14px; }
.tour-guide-item {
    background: var(--accent-weak); border-left: 3px solid var(--accent);
    color: var(--text); padding: 10px 14px; border-radius: 8px; font-size: 13px;
    display: flex; align-items: center; gap: 10px;
}
.tour-guide-item.ok { background: rgba(46, 204, 113, 0.12); border-left-color: var(--success); color: var(--text); }
/* 赛制/选手已变更、待重新编排时的警示态 */
.tour-guide-item.warn { background: var(--warning-bg); border-left-color: var(--warning); color: var(--text); }
.tour-guide-item.warn .tour-chip { background: var(--warning); color: var(--on-warning); }
.tour-chip {
    background: var(--accent); color: #fff; border-radius: 12px; padding: 2px 10px;
    font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.tour-status { margin-top: 10px; }
/* 选手名单行内「编辑 / 删除」按钮组，窄屏自动换行不重叠 */
.tour-row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tour-row-actions .btn { white-space: nowrap; }

/* 缴费状态：汇总 chip + 名单内下拉直选 */
.tour-pay-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; }
.pay-chip {
    font-size: 12px; font-weight: 600; padding: 4px 10px;
    border-radius: var(--radius-pill); border: 1px solid transparent;
}
.pay-chip.pay-ok { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.pay-chip.pay-no { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.pay-chip.pay-free { background: var(--info-bg); color: var(--accent); border-color: var(--accent); }
.pay-tip { color: var(--text-mute); font-size: 12px; }
.tour-pay-cell { display: flex; flex-direction: column; gap: 3px; min-width: 96px; }
.tour-pay-select {
    background: var(--input-bg); color: var(--text); font-size: 12.5px;
    border: 1px solid var(--input-border); border-radius: var(--radius-sm);
    padding: 5px 8px; min-width: 92px; cursor: pointer;
}
.tour-pay-select.pay-ok { color: var(--success); border-color: var(--success); }
.tour-pay-select.pay-no { color: var(--danger); border-color: var(--danger); }
.tour-pay-select.pay-free { color: var(--accent); border-color: var(--accent); }
.tour-pay-note {
    color: var(--text-dim); font-size: 11px; max-width: 130px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 窄屏折叠列时，把性别/年龄段/种子/分组/来源附在姓名下方；桌面端不显示 */
.tour-mobile-meta { display: none; }

/* 对阵图：横向轮次 */
.tour-group-block { margin-bottom: 22px; }
.tour-group-title { color: var(--text); font-size: 15px; margin: 6px 0 10px; border-left: 3px solid var(--accent); padding-left: 8px; }
.tour-bracket { display: flex; gap: 22px; overflow-x: auto; padding: 6px 2px 14px; align-items: flex-start; }
.tour-round { display: flex; flex-direction: column; gap: 16px; min-width: 180px; justify-content: space-around; }
.tour-round-title { text-align: center; color: var(--text-dim); font-size: 13px; font-weight: 600; padding-bottom: 6px; border-bottom: 1px dashed var(--card-border); margin-bottom: 4px; }

.tour-match {
    background: var(--card-solid); border: 1px solid var(--card-border); border-radius: 10px;
    padding: 8px 10px; box-shadow: var(--shadow); position: relative; min-width: 170px;
}
.tour-match.done { border-color: var(--card-border); }
.tour-match.pending { opacity: 0.55; cursor: default; }
.tour-match[data-mid] { cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.tour-match[data-mid]:hover { border-color: var(--accent); box-shadow: var(--accent-glow); }
.tour-match.champion { border-color: var(--warning); box-shadow: 0 0 0 1px var(--warning); }
.tm-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 4px; border-radius: 6px; gap: 10px; }
.tm-row.win { background: var(--accent-weak); }
.tm-name { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-row.win .tm-name { color: var(--accent); font-weight: 700; }
.tm-score { color: var(--text-dim); font-weight: 700; font-size: 14px; min-width: 24px; text-align: center; }
.tour-match.champion .tm-row.win .tm-name { color: var(--warning); }
.tour-crown { position: absolute; top: -10px; right: 8px; background: var(--warning); color: #1a1a1a; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 8px; }
.tour-match-hint { display: block; text-align: center; color: var(--text-mute); font-size: 11px; margin-top: 4px; }
.tour-match[data-mid] .tour-match-hint { color: var(--accent); }
.tour-match.conflict { border-color: #e5484d !important; background: rgba(229, 72, 77, 0.12); box-shadow: 0 0 0 1px rgba(229, 72, 77, 0.45); }
.tour-match.conflict .tm-meta { color: #e5484d; font-weight: 700; }
.tm-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.tm-meta-inputs { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.tm-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-dim); flex: 1; min-width: 120px; }
.tm-field input { padding: 6px 8px; border: 1px solid var(--card-border); border-radius: 6px; background: var(--input-bg); color: var(--text); }

/* 排名表：名次列收紧，避免数字列被拉宽、姓名右侧出现大片空列 */
.tour-st-table { width: 100%; max-width: 420px; margin-bottom: 14px; table-layout: fixed; }
.tour-st-table th:first-child, .tour-st-table td:first-child { width: 64px; }
/* 公开弹窗比后台面板宽，小组排名表跟着撑满，不留半截表格 */
#tour-public-body .tour-st-table { max-width: none; }

/* 总排名：只有「名次 + 姓名」两项，改用排行榜列表行。
   两列表格会把「选手」列拉得极宽，姓名后面拖出一大片空列；
   列表行让名次紧贴姓名、整行贯穿分隔线，桌面与手机都不会塌陷。 */
.tour-rank-list {
    display: flex; flex-direction: column; width: 100%; margin-bottom: 14px;
    border: 1px solid var(--card-border); border-radius: var(--radius-sm); overflow: hidden;
}
.tour-rank-row {
    display: flex; align-items: center; gap: 14px; padding: 8px 12px;
    border-bottom: 1px solid var(--card-border); font-size: 13px;
}
.tour-rank-row:last-child { border-bottom: none; }
.tour-rank-row:nth-child(even) { background: var(--hover-bg); }
.tour-rank-no { flex: 0 0 26px; text-align: center; font-weight: 600; color: var(--text-mute); }
.tour-rank-row:first-child .tour-rank-no { color: var(--warning); }
.tour-rank-name { color: var(--text); }

/* 比分录入弹窗 */
.tour-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1200;
    background: rgba(0, 0, 0, 0.55); display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(2px);
}
.tour-modal {
    background: var(--card-solid); border: 1px solid var(--card-border); border-radius: var(--radius);
    width: 360px; max-width: 92vw; box-shadow: var(--shadow); overflow: hidden;
}
.tour-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--card-border); }
.tour-modal-header h3 { color: var(--text); font-size: 16px; margin: 0; }
.tour-modal-close { color: var(--text-mute); font-size: 22px; cursor: pointer; line-height: 1; }
.tour-modal-close:hover { color: var(--text); }
.tour-modal-body { padding: 16px 18px; }
.tour-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--card-border); }
.tm-vs { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.tm-vs-name { color: var(--text); font-weight: 600; font-size: 15px; }
.tm-vs-vs { color: var(--text-mute); font-size: 13px; }
.tm-score-inputs { display: flex; align-items: center; justify-content: center; gap: 12px; }
.tm-score-inputs input {
    width: 80px; text-align: center; background: var(--input-bg); color: var(--text);
    border: 1px solid var(--input-border); border-radius: 6px; padding: 8px; font-size: 16px;
}
.tm-score-inputs span { color: var(--text-dim); font-size: 18px; }

/* 公开查看弹窗（更宽、可滚动） */
.tour-public-modal {
    background: var(--card-solid); border: 1px solid var(--card-border); border-radius: var(--radius);
    width: min(92vw, 880px); max-height: 86vh; display: flex; flex-direction: column;
    box-shadow: var(--shadow); overflow: hidden;
}
.tour-public-modal .tour-modal-body { overflow-y: auto; max-height: calc(86vh - 56px); }
/* 公开查看弹窗头部：标题占剩余空间，导出按钮与关闭按钮靠右不挤压 */
.tour-public-modal .tour-modal-header { gap: 10px; }
.tour-public-modal .tour-modal-header h3 { flex: 1 1 auto; min-width: 0; }
.tour-public-modal #tour-public-export { white-space: nowrap; }

/* ============================================================================
   移动端统一风格（≤768px）—— 2026-10-29 重构
   ----------------------------------------------------------------------------
   背景：原先 .mobile-nav 固定 52px 高，.nav-tabs 不换行，而展开的分组子菜单
   用 flex:1 1 100% 想占满一行 → 在不换行的 flex 容器里被挤压，图标与文字
   互相压盖；同时主内容的 margin-top 恒为 52px，导航一变高内容就被遮住。

   本次方案（导航三段式，互不重叠）：
     ① .mobile-bar        顶栏：品牌 + 当前模块名 + 搜索/主题/退出
     ② .mobile-tabs      一级导航：单行横向滚动，绝不换行挤压
     ③ .mobile-submenus  分组子菜单：展开时独立成行（换行排布，互不压盖）
        .mobile-search-panel 课时快查面板：点击 🔍 展开/收起
   导航实际高度由 JS 写入 CSS 变量 --mobile-nav-h，主内容 margin-top 跟随，
   保证任何展开状态下内容都不会被遮挡。
   ============================================================================ */
@media (max-width: 768px) {

    /* ---------- ① 导航容器 ---------- */
    .mobile-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        height: auto;
        min-height: 0;
        padding: env(safe-area-inset-top, 0px) 0 0 0;   /* 刘海屏安全区 */
        gap: 0;
        background: var(--bg-elev);
        border-bottom: 1px solid var(--card-border);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16);
        z-index: 300;
    }

    /* ---------- ①-a 顶栏 ---------- */
    .mobile-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 10px;
        min-height: 42px;
        border-bottom: 1px solid var(--card-border);
    }
    .mobile-logo { font-size: 19px; line-height: 1; flex: 0 0 auto; }
    .mobile-title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 15px;
        font-weight: 700;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mobile-bar-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
    .mobile-icon-btn {
        width: 32px;
        height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        border: 1px solid var(--card-border);
        border-radius: 8px;
        background: transparent;
        color: var(--text-dim);
        font-size: 15px;
        line-height: 1;
        cursor: pointer;
        transition: border-color 0.15s, color 0.15s, transform 0.1s;
    }
    .mobile-icon-btn:hover { border-color: var(--accent); color: var(--accent); }
    .mobile-icon-btn:active { transform: scale(0.94); }

    /* ---------- ② 一级导航：横向滚动，单行不换行 ---------- */
    .mobile-tabs {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        gap: 4px;
        width: 100%;
        padding: 5px 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .mobile-tabs::-webkit-scrollbar { display: none; }

    .mobile-tabs .nav-tab,
    .mobile-tabs .nav-group {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        flex: 0 0 auto;                 /* 关键：不参与收缩，图标与文字永不被压扁 */
        min-height: 34px;
        padding: 6px 11px;
        border-radius: 8px;
        background: transparent;
        color: var(--text-dim);
        font-size: 13.5px;
        font-weight: 500;
        line-height: 1.2;
        white-space: nowrap;
        cursor: pointer;
        user-select: none;
        transition: background 0.15s, color 0.15s;
    }
    .mobile-tabs .nav-tab-icon { font-size: 14px; line-height: 1; flex: 0 0 auto; }
    .mobile-tabs .nav-tab:hover,
    .mobile-tabs .nav-group:hover { background: var(--hover-bg); color: var(--text); }
    .mobile-tabs .nav-tab.active {
        background: var(--accent);
        color: #fff;
        font-weight: 600;
    }
    .mobile-tabs .nav-group { font-weight: 600; }
    .mobile-tabs .nav-group.open { background: var(--accent-weak); color: var(--accent); }
    .mobile-tabs .nav-group .group-caret { font-size: 10px; line-height: 1; transition: transform 0.15s; }
    .mobile-tabs .nav-group.open .group-caret { transform: rotate(90deg); }
    .mobile-tabs .nav-tab .todo-nav-badge { margin-left: 2px; }

    /* ---------- ③ 分组子菜单：独立成行 ---------- */
    .mobile-submenus { display: flex; flex-direction: column; }
    .mobile-submenus .nav-submenu {
        display: none;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 10px;
        background: var(--hover-bg);
        border-top: 1px solid var(--card-border);
    }
    .mobile-submenus .nav-submenu.open { display: flex; }
    .mobile-submenus .nav-tab.sub {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex: 0 0 auto;
        min-height: 32px;
        padding: 6px 13px;
        border: 1px solid var(--card-border);
        border-radius: 16px;
        background: var(--card-solid);
        color: var(--text-dim);
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
        cursor: pointer;
        user-select: none;
        transition: all 0.15s;
    }
    .mobile-submenus .nav-tab.sub::before { content: none; }
    .mobile-submenus .nav-tab.sub.active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
        font-weight: 600;
    }

    /* ---------- 课时快查面板 ---------- */
    .mobile-search-panel {
        display: none;
        padding: 8px 10px 10px;
        background: var(--hover-bg);
        border-top: 1px solid var(--card-border);
    }
    .mobile-search-panel.open { display: block; }
    .mobile-search-panel input {
        width: 100%;
        min-height: 38px;
        padding: 8px 12px;
        border: 1px solid var(--card-border);
        border-radius: 18px;
        background: var(--input-bg);
        color: var(--text);
        font-size: 16px;              /* ≥16px 防 iOS 聚焦自动缩放 */
        outline: none;
    }
    .mobile-search-panel input:focus { border-color: var(--accent); }
    .mobile-search-panel .hour-quick-results {
        position: static;
        margin-top: 6px;
        width: 100%;
        max-height: 46vh;
        overflow-y: auto;
        min-width: 0;
        background: var(--card-solid);
    }

    /* ---------- 主内容区：跟随导航高度，永不被遮挡 ---------- */
    .main-content {
        margin-left: 0;
        margin-top: var(--mobile-nav-h, 96px);
        padding: 12px 10px calc(56px + env(safe-area-inset-bottom, 0px));
        min-height: calc(100vh - var(--mobile-nav-h, 96px));
        max-width: 100%;
    }
    .main-content > *, .module { max-width: 100%; }

    /* ---------- 模块头部：标题与操作区上下分层，图标不再互相压盖 ---------- */
    .module-head {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .module-head h2 { font-size: 17px; }
    .module-head-actions { width: 100%; gap: 8px; }
    .module-head-actions > * { flex: 0 0 auto; }
    .module-head-actions .btn { flex: 0 0 auto; }

    /* ---------- 工具栏 / 筛选器 ---------- */
    .toolbar { gap: 8px; }
    .week-nav { gap: 6px; width: 100%; }
    .week-label { min-width: 0; flex: 1 1 auto; font-size: 14px; }
    .filters { gap: 6px; width: 100%; }
    .filters .btn, .filters .filter-select { flex: 0 0 auto; }
    #schedule-search { width: 100% !important; flex: 1 1 140px !important; min-width: 120px; }

    /* ---------- 子页签：横向滚动，不换行压扁 ---------- */
    .sub-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 2px;
        scrollbar-width: none;
    }
    .sub-tabs::-webkit-scrollbar { display: none; }
    .sub-tab {
        flex: 0 0 auto;
        padding: 8px 13px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* ---------- 表格：窄屏内横向滚动，不再把整页撑宽 ---------- */
    .data-table {
        display: block;
        max-width: 100%;
        min-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 窄屏下 .data-table 变 block 会让排名表塌成左侧一小条、右边整片空白；
       排名表列数少，恢复为真正的表格并撑满弹窗宽度即可。 */
    #tour-public-body .data-table.tour-st-table { display: table; width: 100%; }

    /* ---------- 赛事选手名单：操作列贴右常驻，窄屏不用横滑就能点编辑 ---------- */
    #tour-player-table th:last-child,
    #tour-player-tbody td:last-child {
        position: sticky;
        right: 0;
        z-index: 2;
        background: var(--card-solid);
        box-shadow: -6px 0 12px rgba(0, 0, 0, 0.12);
    }

    /* 窄屏只保留「姓名 / 缴费 / 操作」三列，缴费下拉首屏即可选，不需横滑；
       被隐藏的 5 列信息折叠成姓名下方小字，桌面端仍显示完整 8 列。 */
    #tour-player-table th:nth-child(2), #tour-player-table th:nth-child(3),
    #tour-player-table th:nth-child(4), #tour-player-table th:nth-child(5),
    #tour-player-table th:nth-child(6),
    #tour-player-tbody td:nth-child(2), #tour-player-tbody td:nth-child(3),
    #tour-player-tbody td:nth-child(4), #tour-player-tbody td:nth-child(5),
    #tour-player-tbody td:nth-child(6) { display: none; }
    .tour-mobile-meta {
        display: block; margin-top: 2px; font-size: 11px; line-height: 1.35;
        color: var(--text-mute); white-space: normal;
    }
    #tour-player-table .tour-pay-cell { min-width: 88px; }
    #tour-player-table .tour-pay-select { min-width: 84px; }
    #tour-player-table .tour-pay-note { max-width: 90px; }

    /* ---------- 课表卡片：选择图标与类型标签各占其位 ---------- */
    .m-course-card.has-select .m-card-top { padding-right: 32px; }
    .m-select-flag { top: 8px; right: 8px; font-size: 17px; line-height: 1; }
    .m-type-tag { white-space: nowrap; flex: 0 0 auto; }
    .m-face-btn { vertical-align: middle; margin-left: 6px; }

    /* ---------- 通用卡片与表格节奏 ---------- */
    .card-box { padding: 14px 12px; }
    .data-table { font-size: 12.5px; }
    .data-table th, .data-table td { padding: 8px 10px; }
}

/* ---------- 超小屏（≤380px）进一步收紧，保证每颗图标都点得下 ---------- */
@media (max-width: 380px) {
    .mobile-bar { padding: 5px 8px; }
    .mobile-title { font-size: 14px; }
    .mobile-icon-btn { width: 30px; height: 30px; font-size: 14px; }
    .mobile-tabs { padding: 4px 6px; gap: 2px; }
    .mobile-tabs .nav-tab,
    .mobile-tabs .nav-group { padding: 6px 9px; font-size: 13px; }
    .mobile-tabs .nav-tab-icon { font-size: 13px; }
    .mobile-submenus .nav-tab.sub { padding: 6px 10px; font-size: 12.5px; }
    .main-content { padding: 10px 8px 52px; }
}

/* ============================================================================
   移动端细节修正（≤768px）：补齐各处绝对定位图标/角标的避让空间
   ============================================================================ */
@media (max-width: 768px) {
    /* 工作台课程卡：右上角状态标签不再压住时间文字 */
    .wb-course { padding-right: 74px; }
    /* 工作台统计卡：左上角图标与右上角角标各占一侧 */
    .wb-stat { padding-left: 18px; padding-right: 18px; }
    .wb-stat::before { top: 16px; left: 18px; font-size: 16px; }
    .wb-stat-tag { top: 14px; right: 14px; padding: 3px 8px; font-size: 9.5px; letter-spacing: 1px; }
    .wb-stat .wb-label { margin-top: 26px; }

    /* 赛事编排：冠军皇冠独占顶部空间，不再压住选手名 */
    .tour-match.champion { padding-top: 20px; }
    .tour-crown { top: 2px; right: 6px; font-size: 10px; padding: 1px 7px; }
    /* 对阵卡在窄屏允许换行，选手名过长时截断而不是挤出卡片 */
    .tm-row { gap: 6px; }
    .tm-name { max-width: 68%; }
    .tour-match { min-width: 150px; }
    .tour-round { min-width: 160px; }
}

/* ============================================================================
   移动端：公开首页 / 我的报名 排版收紧（≤768px）
   ============================================================================ */
@media (max-width: 768px) {
    .public-home { padding: 16px 12px 48px; }
    .ph-header { padding: 6px 2px 12px; gap: 8px; }
    .ph-brand { font-size: 17px; }
    .ph-hero { padding: 18px 0 12px; }
    .ph-hero h1 { font-size: 20px; }
    .ph-hero p { font-size: 13px; }
    .ph-board { padding: 12px; }
    .ph-board h2 { font-size: 16px; }
    .ph-card-head { flex-wrap: wrap; gap: 6px; }
    .ph-card-title { font-size: 14px; }
    .ph-card-actions { gap: 12px; margin-top: 12px; }
}

/* ============================================================================
   设计系统统一层（2026-10-29）
   ----------------------------------------------------------------------------
   原则：
   1. 视觉令牌全部收敛到 theme.css 变量，两套主题自动跟随，源码不再写死颜色
   2. 只统一视觉维度（颜色/圆角/阴影/动效/字重/间距节奏），不改布局尺寸
   3. 主题无关属性（圆角/动效/字重）在此统一，两主题都生效
   4. 浅色主题下令牌值与原硬编码一致 → 零视觉漂移；暗色由 theme.css 补丁接管
   ============================================================================ */

/* ---- 按钮：统一节奏与交互 ---- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: var(--transition);
    user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); transition-duration: var(--dur-fast); }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-success { background: var(--success); color: var(--on-success); border-color: var(--success); }
.btn-danger { background: var(--danger); color: var(--on-danger); border-color: var(--danger); }
.btn-warning { background: var(--warning); color: var(--on-warning); border-color: var(--warning); }
.btn-icon { border-radius: var(--radius-sm); }
.btn-week-copy { border-radius: var(--radius-sm); }

/* ---- 卡片：收敛到主题令牌（浅色=原视觉，暗色自动跟随）---- */
.card-box {
    background: var(--card-solid);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: var(--text);
}
.card-box h4 { color: var(--text); }
.card-box h5 { color: var(--text); }
.empty-hint { color: var(--text-mute); }

/* ---- 表单：输入控件统一 ---- */
.form-row label { color: var(--text-dim); font-weight: 600; }
.form-row label small { color: var(--text-mute); }
.form-row input,
.form-row select,
.filter-select {
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form-row input::placeholder,
.filter-select::placeholder { color: var(--text-mute); }
.form-row input:focus,
.form-row select:focus,
.filter-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-weak);
    outline: none;
}

/* ---- 数据表格：表头/斑马纹/悬停统一 ---- */
.data-table th {
    background: var(--table-head);
    color: var(--text);
    border-bottom: 2px solid var(--table-border);
    font-weight: 600;
}
.data-table td {
    color: var(--text);
    border-bottom: 1px solid var(--table-border);
}
.data-table tbody tr:nth-child(even) td { background: var(--table-row-alt); }
.data-table tr:hover td { background: var(--accent-weak); }
.data-table td .student-hours .remaining { color: var(--success); }
.data-table td .student-hours.low,
.data-table td .student-hours.low .remaining { color: var(--danger); }
.data-table td .level-tag { background: var(--info-bg); color: var(--accent); border-radius: var(--radius-sm); }

/* ---- 徽章/状态标签：统一胶囊风格 ---- */
.hours-badge,
.badge-dot,
.m-today-badge,
.ph-status,
.wb-status,
.rollcall-status-tag,
.type-tag,
.m-type-tag {
    border-radius: var(--radius-pill);
    font-weight: 600;
}
.hours-badge.ok { background: var(--success-bg); color: var(--success); }
.hours-badge.low { background: var(--warning-bg); color: var(--warning); }
.hours-badge.empty { background: var(--danger-bg); color: var(--danger); }
.hour-badge { background: var(--success-bg); color: var(--success); }
.hour-badge.low { background: var(--danger-bg); color: var(--danger); }
.m-today-badge { background: var(--accent); color: var(--on-accent); }

/* ---- 弹窗：统一卡片质感 ---- */
.modal {
    background: var(--card-solid);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    color: var(--text);
}
.modal-header { border-bottom: 1px solid var(--card-border); }
.modal-header h3 { color: var(--text); font-size: 17px; }
.modal-close { color: var(--text-mute); }
.modal-close:hover { color: var(--text); }
.modal-overlay { background: rgba(0, 0, 0, 0.45); }
[data-theme="dark"] .modal-overlay { background: rgba(0, 0, 0, 0.6); }

/* ---- 子页签：统一选中态 ---- */
.sub-tabs { border-bottom: 2px solid var(--card-border); }
.sub-tab { color: var(--text-dim); transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.sub-tab:hover { color: var(--accent); }
.sub-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- Toast：统一语义色 ---- */
.toast { border-radius: var(--radius-sm); font-weight: 500; }
.toast.success { background: var(--success); color: var(--on-success); }
.toast.error { background: var(--danger); color: var(--on-danger); }

/* ---- 视图切换（日/月/年、进行中/完成）统一 ---- */
.view-tab { border-radius: var(--radius-sm); transition: var(--transition); }
.view-tab.active { background: var(--accent); color: var(--on-accent); }

/* ---- 工具栏筛选器统一 ---- */
.filters .filter-select { border-radius: var(--radius-sm); }

/* ---- 待办徽标统一 ---- */
.todo-nav-badge { border-radius: var(--radius-pill); }

/* ---- 链接强调色统一 ---- */
.text-bold { color: var(--accent); }

/* ---- 全局焦点可见性（无障碍） ---- */
.btn:focus-visible,
.nav-tab:focus-visible,
.sidebar-item:focus-visible,
.mobile-icon-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== 比赛用品（赛事用具领用 / 归还） ===== */
.evg-panel {
    background: var(--card); border: 1px solid var(--card-border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 18px; margin: 14px 0 18px;
}
.evg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.evg-head h3 { font-size: 16px; font-weight: 700; color: var(--text); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.evg-sub { font-size: 12px; font-weight: 500; color: var(--text-dim); }
.evg-event-name { font-size: 13px; color: var(--accent); margin-top: 5px; font-weight: 600; }

.evg-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0 4px; }
.evg-sum-card { background: var(--hover-bg, rgba(127,127,127,.07)); border: 1px solid var(--card-border); border-radius: var(--radius-sm); padding: 10px 12px; }
.evg-sum-card .evg-sum-value { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.evg-sum-card .evg-sum-label { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.evg-sum-card.is-consumed .evg-sum-value { color: var(--danger); }
.evg-sum-card.is-returnable .evg-sum-value { color: var(--success); }

.evg-section-title { font-size: 13px; font-weight: 700; color: var(--text); margin: 18px 0 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.evg-hint { font-size: 12px; font-weight: 400; color: var(--text-dim); }
.evg-lines { display: flex; flex-direction: column; gap: 8px; }
.evg-line { display: grid; grid-template-columns: minmax(160px, 2fr) minmax(90px, 1fr) minmax(120px, 1.5fr) 28px; gap: 8px; align-items: center; }
.evg-line select, .evg-line input { width: 100%; padding: 7px 9px; border: 1px solid var(--card-border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); font-size: 13px; }
.evg-line .evg-sel { grid-column: 1; grid-row: 1; }
.evg-line .evg-qty { grid-column: 2; grid-row: 1; }
.evg-line .evg-note { grid-column: 3; grid-row: 1; }
.evg-line .evg-line-del { grid-column: 4; grid-row: 1; justify-self: end; }
.evg-line .evg-stock { grid-column: 1 / -1; grid-row: 2; font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.evg-line .evg-stock.is-low { color: var(--danger); font-weight: 600; }
.evg-line-del { border: none; background: transparent; color: var(--danger); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 6px; }
.evg-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.evg-table-wrap { width: 100%; overflow-x: auto; }
.evg-table { min-width: 820px; }
.evg-table td, .evg-table th { white-space: nowrap; }
.evg-num { font-weight: 600; }
.evg-num.is-consumed { color: var(--danger); }
.evg-num.is-returned { color: var(--success); }
.evg-num.is-zero { color: var(--text-dim); }
.evg-foot { font-size: 12px; color: var(--text-dim); margin-top: 10px; line-height: 1.6; }


.evg-return-box {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--hover-bg, rgba(127,127,127,.07)); border: 1px solid var(--card-border);
    border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; font-size: 13px;
}
.evg-return-box input { width: 110px; padding: 6px 8px; border: 1px solid var(--card-border); border-radius: var(--radius-sm); background: var(--card); color: var(--text); }
@media (max-width: 768px) {
    .evg-panel { padding: 12px; }
    .evg-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .evg-sum-card .evg-sum-value { font-size: 17px; }
    .evg-line { grid-template-columns: minmax(0, 1fr) 90px 26px; gap: 6px; }
    .evg-line .evg-sel { grid-column: 1; grid-row: 1; }
    .evg-line .evg-qty { grid-column: 2; grid-row: 1; }
    .evg-line .evg-line-del { grid-column: 3; grid-row: 1; }
    .evg-line .evg-note { grid-column: 1 / -1; grid-row: 2; }
    .evg-line .evg-stock { grid-column: 1 / -1; grid-row: 3; }
    .evg-actions .btn { flex: 1 1 auto; }
}

/* ===== 报名审核 / 缴费管理（2026-11-05） ===== */
.evs-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.evs-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.evs-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.evs-chip {
    display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
    border: 1px solid var(--card-border); background: var(--hover-bg, rgba(127,127,127,.07)); color: var(--text);
}
.evs-chip.rv-wait { color: #b8860b; border-color: #b8860b; }
.evs-chip.rv-ok, .evs-chip.pay-ok { color: var(--success); border-color: var(--success); background: var(--success-bg); }
.evs-chip.rv-no, .evs-chip.pay-no { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.evs-chip.pay-free { color: var(--accent); border-color: var(--accent); background: var(--info-bg); }
.evg-sum-value.rv-wait { color: #b8860b; }
.evg-sum-value.rv-ok, .evg-sum-value.pay-ok { color: var(--success); }
.evg-sum-value.rv-no, .evg-sum-value.pay-no { color: var(--danger); }
.evs-mobile-meta { display: none; font-size: 11px; color: var(--text-dim); margin-top: 3px; line-height: 1.35; word-break: break-all; }
.evs-summary .evg-sum-card { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.evs-summary .evg-sum-label { margin-top: 0; }
.evs-table { min-width: 900px; }
.evs-ops { display: flex; flex-wrap: wrap; gap: 4px; }
.evs-ops .btn { padding: 2px 7px; font-size: 12px; }
.evs-reason { color: var(--danger); font-size: 12px; margin-top: 2px; }
.evs-note { color: var(--text-dim); font-size: 12px; margin-top: 2px; word-break: break-all; }
.tour-pay-sync { font-size: 11px; color: var(--text-dim); margin-left: 6px; white-space: nowrap; }
.tour-pay-cell .pay-chip { padding: 2px 8px; }

/* 会员端：审核状态 / 收款说明 / 驳回后修改重提交 */
.ph-review-reason { margin-top: 6px; padding: 6px 9px; border-radius: var(--radius-sm); background: var(--danger-bg); color: var(--danger); font-size: 12px; }
.ph-review-tip, .ph-pay-note { margin-top: 6px; color: var(--text-dim); font-size: 12px; }
.ph-modal-overlay {
    position: fixed; inset: 0; z-index: 9999; display: none;
    align-items: center; justify-content: center; background: rgba(0,0,0,.45); padding: 16px;
}
.ph-modal-card {
    width: min(420px, 100%); background: var(--card); border: 1px solid var(--card-border);
    border-radius: var(--radius); padding: 18px; box-shadow: 0 12px 36px rgba(0,0,0,.2);
}
.ph-modal-card h4 { margin: 0 0 12px; font-size: 16px; }
.ph-modal-fields { display: grid; gap: 9px; }
.ph-modal-fields label { display: grid; gap: 4px; font-size: 13px; color: var(--text-dim); }
.ph-modal-fields input, .ph-modal-fields textarea {
    width: 100%; padding: 7px 9px; border: 1px solid var(--card-border);
    border-radius: var(--radius-sm); background: var(--card); color: var(--text); font-size: 14px;
}
.ph-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ph-modal-err { margin-top: 10px; color: var(--danger); font-size: 12px; }
@media (max-width: 768px) {
    .evs-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    /* 全局手机规则会把 .data-table 改成 display:block，这里必须恢复表格布局，
       否则每个 td 各自堆叠成块、行间出现大片空白。 */
    .evs-table { display: table; min-width: 0; width: 100%; table-layout: fixed; }
    .evs-table th, .evs-table td { padding: 7px 5px; font-size: 12px; white-space: normal; vertical-align: top; }
    .evs-table th:nth-child(1), .evs-table td:nth-child(1) { width: 30%; }
    .evs-table th:nth-child(4), .evs-table td:nth-child(4),
    .evs-table th:nth-child(5), .evs-table td:nth-child(5) { width: 17%; }
    .evs-table th:nth-child(9), .evs-table td:nth-child(9) { width: 36%; }
    /* 只留 姓名 / 审核 / 缴费 / 操作 四列，驳回原因与备注折进姓名下方小字 */
    .evs-table th:nth-child(2), .evs-table td:nth-child(2),
    .evs-table th:nth-child(3), .evs-table td:nth-child(3),
    .evs-table th:nth-child(6), .evs-table td:nth-child(6),
    .evs-table th:nth-child(7), .evs-table td:nth-child(7),
    .evs-table th:nth-child(8), .evs-table td:nth-child(8) { display: none; }
    .evs-mobile-meta { display: block; }
    .evs-ops { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
    .evs-ops .btn { min-width: 0; white-space: nowrap; padding: 2px 3px; font-size: 11px; }
}
