/* ====== 2026专科志愿填报系统 - 样式表 ====== */
:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --success: #34a853;
    --warning: #fbbc04;
    --danger: #ea4335;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #202124;
    --text-secondary: #5f6368;
    --border: #dadce0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
.app-container { max-width: 1280px; margin: 0 auto; min-height: 100vh; }

/* ====== 顶部栏 ====== */
.top-bar {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    padding: 16px 28px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 12px rgba(26,115,232,0.3);
    position: sticky; top: 0; z-index: 100;
}
.logo-area {
    display: flex; align-items: center; gap: 12px;
}
.logo-icon { font-size: 28px; }
.top-bar h1 { font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }
.data-badge {
    background: rgba(255,255,255,0.2); padding: 6px 14px; border-radius: 20px;
    font-size: 13px; backdrop-filter: blur(4px);
}

/* ====== 主面板 ====== */
.main-content { padding: 0 20px 30px; }
.step-panel {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 28px; margin-bottom: 20px;
    display: none;
}
.step-panel.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.panel-header h2 { font-size: 22px; margin-bottom: 4px; color: var(--text); }
.panel-desc {
    color: var(--text-secondary); font-size: 14px; margin-bottom: 16px;
}
.panel-actions {
    display: flex; justify-content: space-between; gap: 12px;
    margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border);
}

/* ====== 表单 ====== */
.info-form .form-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px; margin-bottom: 24px;
}
.field-group label {
    display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px;
    color: var(--text-secondary);
}
.field-group.required label::before {
    content: '* '; color: var(--danger);
}
.field-group.highlight input {
    border-color: var(--primary); background: var(--primary-light);
}
.field-group input[type="text"],
.field-group input[type="number"] {
    width: 100%; padding: 11px 14px; border: 2px solid var(--border);
    border-radius: 8px; font-size: 15px; transition: all 0.25s;
    outline: none;
}
.field-group input:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.subject-section { margin-bottom: 24px; }
.subject-section > label {
    font-weight: 600; font-size: 15px; display: block; margin-bottom: 10px;
}
.subject-section > label::before {
    content: '* '; color: var(--danger);
}
.subject-checkboxes {
    display: flex; flex-wrap: wrap; gap: 10px;
}
.checkbox-item {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 20px; border: 2px solid var(--border);
    border-radius: 8px; cursor: pointer; transition: all 0.2s;
    user-select: none; font-size: 15px; background: #fafafa;
}
.checkbox-item:hover { border-color: var(--primary); background: var(--primary-light); }
.checkbox-item input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); }
.checkbox-item:has(input:checked) {
    border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark);
    font-weight: 600;
}

/* 位次结果 */
.rank-result {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 2px solid var(--success); border-radius: var(--radius);
    padding: 18px 24px; margin-bottom: 24px;
}
.rank-result h3 { margin-bottom: 12px; color: #2e7d32; }
.rank-result.hidden { display: none; }
.rank-table td { padding: 6px 20px; font-size: 15px; }
.rank-table th {
    color: #555; text-align: left; font-weight: normal;
}

/* 按钮 */
.btn-primary {
    background: var(--primary); color: white; border: none;
    padding: 12px 28px; border-radius: 8px; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover {
    background: var(--primary-dark); transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,0.35);
}
.btn-primary.btn-large {
    width: 100%; max-width: 400px; display: block; margin: 0 auto;
    padding: 15px; font-size: 17px;
}
.btn-secondary {
    background: white; color: var(--text); border: 2px solid var(--border);
    padding: 11px 24px; border-radius: 8px; font-size: 15px; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-search {
    background: var(--primary); color: white; border: none;
    padding: 10px 24px; border-radius: 8px; font-size: 14px; font-weight: 500;
    cursor: pointer;
}
.btn-tiny {
    background: #f5f5f5; border: 1px solid var(--border);
    padding: 5px 14px; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.btn-tiny:hover { background: #eee; }

/* 全部加入志愿按钮 */
.btn-add-all {
    background: linear-gradient(135deg, #34a853, #2d9249); color: white;
    border: none; padding: 10px 20px; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
.btn-add-all:disabled {
    opacity: 0.65; cursor: not-allowed; transform: none;
}
.btn-add-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52,168,83,0.35);
}
.btn-add-all:active { transform: translateY(0); }

/* ====== 结果卡片网格 ====== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.result-card {
    background: white; border: 1px solid var(--border); border-radius: 10px;
    padding: 18px; transition: all 0.2s; position: relative;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.result-card:hover {
    border-color: var(--primary); box-shadow: 0 4px 16px rgba(26,115,232,0.12);
    transform: translateY(-2px);
}

/* 卡片头部：院校名 + 风险标签 */
.card-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0;
}
.card-school-name {
    font-size: 15px; font-weight: 700; color: var(--primary-dark);
    line-height: 1.4; flex: 1; min-width: 0;
}
.card-risk-badge {
    padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700;
    flex-shrink: 0; margin-left: 10px; line-height: 1.6;
}
.risk-badge-chong { background: #fce8e6; color: var(--danger); }
.risk-badge-wen { background: #fef7e0; color: #e37400; }
.risk-badge-bao { background: #e6f4ea; color: var(--success); }
.risk-badge-new { background: #e8eaed; color: #5f6368; }

/* 卡片主体信息 */
.card-fields {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px;
    font-size: 13px;
}
.card-field {
    display: flex; align-items: baseline; min-width: 0;
}
.card-field-label {
    color: var(--text-secondary); flex-shrink: 0; font-size: 12px;
    min-width: 68px;
}
.card-field-value {
    color: var(--text); font-weight: 500; word-break: break-all;
}
.card-field.full-width { grid-column: 1 / -1; }
.card-field-value.major-name { font-weight: 600; color: var(--text); font-size: 14px; }

/* 选科要求特殊样式 */
.card-subject-req {
    background: #fff8e1; padding: 2px 8px; border-radius: 4px;
    font-size: 12px; color: #b8860b; font-weight: 500;
}

/* 卡片底部：链接 + 操作 */
.card-footer {
    display: flex; align-items: center; gap: 8px;
    margin-top: 10px; padding-top: 10px; border-top: 1px solid #f5f5f5;
    flex-wrap: wrap;
}
.card-field-value.tuition-per-year {
    color: #e65100; font-weight: 600;
}
.vol-added-label {
    color: var(--success); font-size: 12px; font-weight: 600;
}
.btn-add-vol {
    margin-left: auto; color: var(--primary); border-color: var(--primary);
}
.btn-cancel-vol {
    color: var(--danger); border-color: var(--danger);
}
.btn-cancel-vol:hover { background: #fce8e6; }
.card-link {
    font-size: 11px; color: var(--primary); text-decoration: none;
    padding: 3px 10px; border: 1px solid var(--primary-light);
    border-radius: 4px; transition: all 0.15s; background: #f8fbff;
    white-space: nowrap;
}
.card-link:hover { background: var(--primary); color: white; }
.card-link.disabled { color: #ccc; border-color: #eee; background: #fafafa; cursor: default; pointer-events: none; }

/* 新招/军士 标签 */
.card-tag {
    display: inline-block; padding: 1px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600;
}
.tag-new { background: #e3f2fd; color: #1565c0; }
.tag-junshi { background: #fce4ec; color: #c62828; }
.tag-public { background: #e8f5e9; color: #2e7d32; }
.tag-private { background: #fff3e0; color: #e65100; }

/* 空状态 */
.empty-card-msg {
    grid-column: 1 / -1; text-align: center; padding: 60px 20px;
    color: #bbb; font-size: 15px;
}
.empty-card-msg p { margin: 4px 0; }
.empty-hint { font-size: 13px !important; color: #ddd !important; }

/* ====== 筛选器 ====== */

/* 考生信息展示栏（红框区域） */
.student-info-bar {
    background: linear-gradient(135deg, #e8f0fe, #d4e5f7);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 14px 20px;
    margin: 12px 0;
}
.info-bar-row {
    display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
}
.info-item {
    font-size: 14px; color: var(--text);
}
.info-item b { color: var(--primary-dark); }
.score-highlight {
    color: var(--danger); font-size: 18px; font-weight: 800; }

.quick-tags {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.tag {
    padding: 5px 14px; border-radius: 16px; background: #f1f3f4;
    font-size: 13px; cursor: pointer; transition: all 0.2s;
    color: var(--text-secondary); border: 1px solid transparent;
}
.tag:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

.filter-bar { margin-bottom: 16px; }
.filter-action-row {
    display: flex; gap: 10px; justify-content: center;
    margin-top: 12px;
}
.search-row {
    display: flex; gap: 10px; margin-top: 12px; margin-bottom: 0;
}
.search-note {
    margin-top: 8px; font-size: 13px; color: var(--text-secondary);
}
.search-input {
    flex: 1; padding: 11px 16px; border: 2px solid var(--border);
    border-radius: 8px; font-size: 15px; outline: none; transition: all 0.25s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.12); }
.filter-grid {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.filter-grid select,
.small-input {
    padding: 9px 12px; border: 2px solid var(--border);
    border-radius: 7px; font-size: 13px; outline: none;
    background: white; min-width: 120px;
}
.filter-grid select:focus { border-color: var(--primary); }
.small-input { width: 90px; }

/* 专业多选下拉框 */
.multi-select {
    position: relative; min-width: 160px;
}
.mobile-dropdown-backdrop { display: none; }
.multi-select-trigger {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; border: 2px solid var(--border);
    border-radius: 7px; font-size: 13px; cursor: pointer;
    background: white; min-width: 160px; user-select: none;
    transition: border-color 0.2s;
}
.multi-select-trigger:hover { border-color: var(--primary); }
.multi-select-trigger .arrow { font-size: 10px; color: #999; transition: transform 0.2s; }
.multi-select.open .multi-select-trigger { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(66,133,244,0.15); }
.multi-select.open .multi-select-trigger .arrow { transform: rotate(180deg); }

.multi-select-dropdown {
    display: none; position: absolute; top: calc(100% + 4px); left: 0;
    z-index: 1000; background: white; border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    min-width: 280px; max-width: 360px; max-height: 400px;
    overflow: hidden; padding: 0;
}
.multi-select.open .multi-select-dropdown { display: block; }
.multi-select-header { display: none; }
.btn-dropdown-close {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.major-search-box { padding: 6px 10px; border-bottom: 1px solid var(--border); }
.major-search-box input {
    width: 100%; padding: 7px 10px; border: 1px solid var(--border);
    border-radius: 5px; font-size: 13px; outline: none; box-sizing: border-box;
}
.major-search-box input:focus { border-color: var(--primary); }

.major-select-all {
    padding: 6px 14px; border-bottom: 1px solid #f0f0f0;
    font-size: 13px; color: var(--text-secondary);
}
.major-select-all label { display: flex; align-items: center; gap: 5px; cursor: pointer; }

.major-options { padding: 4px 0; max-height: 300px; overflow-y: auto; }
.multi-select-actions {
    display: flex; gap: 10px; justify-content: space-between;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: #fff;
    position: sticky;
    bottom: 0;
}
.btn-dropdown-secondary,
.btn-dropdown-primary {
    flex: 1;
    min-height: 40px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.btn-dropdown-secondary {
    background: #eef2f7;
    color: #475569;
}
.btn-dropdown-primary {
    background: linear-gradient(135deg, #4285f4, #2b6de0);
    color: #fff;
}
.major-option {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 6px 14px; cursor: pointer; box-sizing: border-box;
    font-size: 13px; transition: background 0.15s, color 0.15s; user-select: none;
}
.major-option:hover { background: #f5f7ff; }
.major-option.checked {
    background: #eef4ff;
    color: var(--primary-dark);
    font-weight: 600;
}
.major-option.checked:hover { background: #e4eeff; }
.major-option input[type="checkbox"] {
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--primary);
}
.major-option-text {
    flex: 1;
    line-height: 1.5;
}
.subject-option-all {
    font-weight: 700; color: var(--primary-dark); border-bottom: 1px solid #eef2ff;
}
.major-option.hidden { display: none; }

/* 已选专业标签 */
.selected-majors-tags {
    display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
    max-height: 60px; overflow-y: auto;
}
.major-tag {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 7px; background: #e8f0fe; color: var(--primary-dark);
    border-radius: 4px; font-size: 11px; line-height: 18px;
}
.major-tag .remove-tag {
    cursor: pointer; color: #999; font-weight: bold; margin-left: 2px;
}
.major-tag .remove-tag:hover { color: #e53935; }

.result-stats {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px; background: #f8f9fa; border-radius: 8px;
    margin-bottom: 12px; font-size: 14px; color: var(--text-secondary);
}
.result-stats-left { justify-self: start; }
.result-stats-center { justify-self: center; }
.vol-manage-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.add-search-feedback {
    min-height: 20px;
    font-size: 13px;
    color: #5f6368;
    white-space: nowrap;
}
.add-search-feedback.success { color: #188038; font-weight: 600; }
.add-search-feedback.warn { color: #b06000; font-weight: 600; }
.add-search-feedback.error { color: #d93025; font-weight: 600; }
.btn-clear-vol {
    background: white; color: var(--danger);
    border: 2px solid #ffcdd2; padding: 10px 18px; border-radius: 8px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
    touch-action: manipulation;
}
.btn-clear-vol:hover { background: #fff5f5; border-color: var(--danger); }
.btn-clear-vol:disabled { opacity: 0.6; cursor: not-allowed; }
.result-stats-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--primary); font-size: 13px; font-weight: 600;
}
.vol-count-box {
    color: var(--primary-dark);
    font-size: 18px;
    font-weight: 800;
    white-space: nowrap;
}
.vol-count-box #volunteerInResultCount {
    font-size: 24px;
    color: var(--primary);
}
.stat-detail { font-size: 13px; color: #aaa; margin-left: 6px; }
.load-more-sentinel { height: 1px; }
.load-more-status {
    text-align: center; padding: 12px 0 4px;
    font-size: 13px; color: var(--text-secondary);
}

/* 结果表格 */
.table-wrapper {
    overflow-x: auto; border: 1px solid var(--border); border-radius: 8px;
}
.result-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
    white-space: nowrap;
}
.result-table th {
    background: #f1f3f4; padding: 10px 12px; text-align: left;
    font-weight: 600; position: sticky; top: 0;
    border-bottom: 2px solid var(--border); color: var(--text-secondary); font-size: 12px;
}
.result-table td {
    padding: 10px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle;
}
.result-table tr:hover { background: #f8fbff; }
.empty-msg {
    text-align: center; color: #bbb; padding: 40px !important; font-size: 15px;
}
.btn-add-volunteer {
    background: var(--primary); color: white; border: none;
    padding: 5px 12px; border-radius: 5px; font-size: 12px; cursor: pointer;
    white-space: nowrap;
}
.btn-add-volunteer:hover { background: var(--primary-dark); }
.btn-add-volunteer.added {
    background: #ccc; cursor: not-allowed; pointer-events: none;
}

.risk-chong { color: var(--danger); font-weight: 700; }
.risk-wen { color: var(--warning); font-weight: 700; text-shadow: 0 0 1px #b8860b; }
.risk-bao { color: var(--success); font-weight: 700; }

/* ====== 志愿选择区 ====== */
.volunteer-layout {
    min-height: 400px;
}

.volunteer-selected {
    border: 2px solid var(--border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
    width: 100%;
}
.volunteer-selected h3 {
    padding: 14px 18px; background: #f8f9fa; border-bottom: 1px solid var(--border);
    font-size: 15px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.tips { font-weight: normal; font-size: 12px; color: #aaa; }

.selected-toolbar {
    padding: 8px 18px; border-bottom: 1px solid var(--border);
    background: #fdfdfd; display: flex; gap: 8px;
}
.vol-table-wrap {
    flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.vol-table-header,
.volunteer-list li:not(.empty-volunteer-tip) {
    display: grid;
    grid-template-columns: 36px 44px minmax(62px, 0.78fr) minmax(116px, 1.15fr) minmax(150px, 1.2fr) 40px 36px 42px minmax(126px, 140px) 78px 38px 56px;
    align-items: center;
    gap: 3px;
    padding: 0 8px;
}
.vol-table-header {
    padding: 10px 8px;
    background: #f1f3f4;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.vol-table-header.hidden { display: none; }
.vol-col { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol-col-school, .vol-col-major, .vol-col-job { white-space: normal; line-height: 1.45; }
.vol-col-major { padding-left: 0; }
.vol-col-job {
    color: #5f6368;
    font-size: 13px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}
.vol-col-score {
    white-space: nowrap; font-size: 15px; line-height: 1.3;
}
.vol-col-score .score-sep { color: #999; margin: 0 1px; }
.vol-tag-mini {
    display: inline-block; padding: 1px 6px; border-radius: 3px;
    font-size: 11px; font-weight: 600; margin-left: 4px; vertical-align: middle;
    white-space: nowrap;
}
.vol-tag-mini.tag-junshi { background: #fce4ec; color: #c2185b; }
.vol-tag-mini.tag-new { background: #e3f2fd; color: #1565c0; }
.volunteer-list {
    flex: 1; overflow-y: auto; overflow-x: auto; list-style: none; padding: 6px 0; margin: 0;
}
.volunteer-list li:not(.empty-volunteer-tip) {
    min-height: 52px;
    padding-top: 10px; padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    background: white; font-size: 15px; cursor: grab; transition: background 0.15s;
}
.volunteer-list li:not(.empty-volunteer-tip):hover { background: #f8fbff; }
.volunteer-list li.dragging { opacity: 0.5; background: var(--primary-light); }
.vol-col-idx {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: white; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.vol-col-code { font-family: monospace; font-size: 14px; color: var(--text-secondary); }
.vol-col-school { font-weight: 600; font-size: 15px; }
.vol-col-major { color: var(--text-secondary); font-size: 14px; }
.vol-col-score .score-num { color: var(--danger); font-weight: 600; }
.vol-col-score .rank-num { color: #666; font-size: inherit; }
.vol-col-tuition { font-size: 14px; }
.vol-del-btn {
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    color: var(--danger);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    min-width: 48px;
    min-height: 36px;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.vol-del-btn:hover { background: #fce8e6; border-color: var(--danger); }
.vol-del-btn:active { transform: scale(0.96); }
.empty-volunteer-tip {
    text-align: center; color: #ccc; padding: 60px 10px; font-size: 15px;
    list-style: none; display: block;
}

.risk-summary {
    padding: 14px 18px; border-top: 1px solid var(--border);
    background: #f8f9fa; font-size: 13px;
}

/* ====== 预览 & 支付 ====== */
.preview-section { margin-bottom: 28px; }
.preview-section h3 { margin-bottom: 12px; font-size: 17px; }
.preview-student-info {
    background: #f8f9fa; border: 1px solid var(--border); border-radius: 8px;
    padding: 12px 16px; margin-bottom: 12px; font-size: 14px;
}
.preview-info-grid {
    display: flex; flex-wrap: wrap; gap: 12px 24px;
}
.preview-info-grid b { color: var(--primary-dark); }
.table-scroll-wrap {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    touch-action: auto;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    border: 1px solid var(--border); border-radius: 8px;
}
.preview-table {
    width: max-content; min-width: 1080px; border-collapse: collapse;
    table-layout: fixed; font-size: 13px;
}
.preview-table th {
    background: #f1f3f4; padding: 10px 12px; text-align: left;
    font-weight: 600; font-size: 12px; white-space: nowrap;
}
.preview-table td {
    padding: 9px 12px; border-bottom: 1px solid #f0f0f0;
    white-space: nowrap; vertical-align: middle;
}
.preview-school-cell {
    min-width: 180px;
}
.preview-school-cell,
.preview-major-cell {
    overflow: hidden;
    text-overflow: ellipsis;
}
.preview-major-cell { min-width: 180px; }
.preview-share-box {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #eef6ff, #f7f1ff);
    border: 1px dashed #90caf9;
    border-radius: 10px;
}
.preview-share-qr {
    width: 88px;
    height: 88px;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(26,115,232,0.12);
}
.preview-share-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #3949ab;
}
.preview-share-text strong {
    font-size: 16px;
    color: #1565c0;
}
.preview-share-text span {
    font-size: 14px;
    letter-spacing: 0.3px;
}
.preview-tuition-cell {
    white-space: nowrap;
    min-width: 92px;
}
.preview-risk-cell {
    white-space: nowrap;
}
.preview-risk-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.preview-risk-badge.risk-chong {
    background: #fdecea;
    color: #d93025;
}
.preview-risk-badge.risk-wen {
    background: #fff4e5;
    color: #f29900;
    text-shadow: none;
}
.preview-risk-badge.risk-bao {
    background: #e6f4ea;
    color: #188038;
}
.report-contact-note {
    margin-top: 12px;
    padding: 10px 14px;
    border: 1px dashed #ffb74d;
    border-radius: 8px;
    background: #fff8e1;
    color: #e65100;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.wechat-browser-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(7, 24, 43, 0.82);
    backdrop-filter: blur(4px);
}
.wechat-browser-gate[hidden] {
    display: none !important;
}
.wechat-browser-gate-card {
    width: min(100%, 520px);
    padding: 28px 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    text-align: center;
}
.wechat-browser-gate-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #07c160, #20a44b);
    color: #fff;
    font-size: 34px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wechat-browser-gate-card h2 {
    margin-bottom: 12px;
    font-size: 28px;
    color: #0d47a1;
}
.wechat-browser-gate-desc {
    margin-bottom: 16px;
    color: #334155;
    font-size: 16px;
    line-height: 1.8;
}
.wechat-browser-gate-steps {
    margin: 0 auto 18px;
    padding: 14px 16px;
    border: 1px dashed #90caf9;
    border-radius: 14px;
    background: #eef6ff;
    color: #0d47a1;
    text-align: left;
    line-height: 1.9;
    font-size: 15px;
}
.wechat-browser-copy-btn {
    width: 100%;
    margin-bottom: 12px;
}
.wechat-browser-gate-note {
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

.payment-section {
    background: linear-gradient(135deg, #fff9e6, #ffecb3);
    border: 2px dashed var(--warning); border-radius: var(--radius);
    padding: 28px;
}
.price-tag {
    text-align: center; margin-bottom: 24px;
}
.price-label { font-size: 16px; color: var(--text-secondary); display: block; margin-bottom: 4px; }
.price-value {
    font-size: 48px; font-weight: 800; color: var(--danger);
    letter-spacing: -1px;
}
.price-unit { font-size: 14px; color: var(--text-secondary); margin-left: 8px; }

.payment-wechat-only {
    max-width: 720px; margin: 0 auto 20px; padding: 12px 16px;
    background: #e8f5e9; border: 2px solid #07c160; border-radius: 10px;
    text-align: center;
}
.payment-wechat-only strong { color: #067a42; font-size: 16px; }
.payment-wechat-only p {
    margin: 8px 0 0; font-size: 14px; color: #2e7d32; line-height: 1.55;
}

.qr-payment-box {
    display: flex; gap: 36px; align-items: center; justify-content: center;
    max-width: 720px; margin: 0 auto;
}
@media (max-width: 650px) {
    .qr-payment-box { flex-direction: column; }
}
.qr-left { text-align: center; }
.qr-image {
    width: 280px; height: 280px; object-fit: contain;
    border: 4px solid white; border-radius: 12px;
    box-shadow: var(--shadow-lg);
}
.qr-hint { font-size: 13px; color: var(--text-secondary); margin-top: 10px; }
.qr-hint-wechat { color: #07c160; font-weight: 700; font-size: 15px; }
.qr-hint-alipay-warn {
    margin-top: 6px; font-size: 14px; font-weight: 700; color: #c62828;
}
.qr-right ul {
    list-style: disc inside; line-height: 2; color: var(--text-secondary);
    font-size: 14px; margin-bottom: 14px;
}
.payment-honor-note {
    padding: 10px 12px; margin-bottom: 14px;
    background: #fff3e0; border: 1px solid #ffb74d; border-radius: 8px;
    font-size: 13px; color: #e65100; line-height: 1.65;
}
.payment-confirm-check {
    display: flex; align-items: flex-start; gap: 8px;
    margin-bottom: 14px; padding: 10px 12px;
    background: #fff; border: 2px solid #07c160; border-radius: 8px;
    cursor: pointer; font-size: 15px; line-height: 1.5;
}
.payment-confirm-check input {
    margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0;
    accent-color: #07c160;
}
.qr-right h4 { font-size: 16px; margin-bottom: 12px; color: var(--text); }
.btn-pay {
    background: linear-gradient(135deg, #ea4335, #d33426);
    color: white; border: none; padding: 14px 36px;
    border-radius: 10px; font-size: 18px; font-weight: 700;
    cursor: pointer; transition: all 0.3s; width: 100%;
    box-shadow: 0 4px 14px rgba(234,67,53,0.3);
}
.btn-pay:hover {
    transform: translateY(-2px); box-shadow: 0 6px 20px rgba(234,67,53,0.4);
}
.export-buttons {
    display: flex; flex-direction: column; gap: 12px;
}
.btn-pay.btn-excel {
    background: linear-gradient(135deg, #1e8e3e, #137333);
    box-shadow: 0 4px 14px rgba(30,142,62,0.3);
}
.btn-pay.btn-excel:hover {
    box-shadow: 0 6px 20px rgba(30,142,62,0.4);
}

/* ====== 页脚 ====== */
.app-footer {
    text-align: center; padding: 20px; color: #aaa;
    font-size: 13px; margin-top: 10px;
}
.disclaimer { font-size: 12px; color: #ccc; margin-top: 4px; }

/* ====== PDF打印模板（隐藏）====== */
.pdf-template { display: none; }
.pdf-page {
    width: 100%; max-width: 277mm;
    min-height: auto; padding: 0; margin: 0;
    background: white;
    font-family: "Microsoft YaHei", "SimHei", "PingFang SC", sans-serif;
    font-size: 11pt; line-height: 1.45; color: #1a237e;
}
.pdf-header {
    text-align: center; margin-bottom: 10pt;
    border-bottom: 2.5pt solid #1565c0; padding-bottom: 8pt;
}
.pdf-header h1 { font-size: 20pt; font-weight: 700; color: #0d47a1; letter-spacing: 1pt; }
.pdf-subtitle { font-size: 9.5pt; color: #3949ab; margin-top: 4pt; }

.pdf-section { margin-bottom: 10pt; }
.pdf-section-info { margin-bottom: 8pt; }
.pdf-section-title {
    font-size: 13pt; font-weight: 700; color: #1565c0;
    border-left: 5pt solid #ff6f00; padding-left: 8pt;
    margin-bottom: 6pt;
}
.pdf-vol-count { font-size: 10pt; font-weight: normal; color: #5c6bc0; }

.pdf-student-info {
    padding: 7pt 10pt;
    border: 1.5pt solid #42a5f5;
    background: linear-gradient(90deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 4pt;
}
.pdf-info-row {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 6pt 18pt;
}
.pdf-info-part { display: inline-flex; align-items: baseline; gap: 5pt; white-space: nowrap; }
.pdf-label { color: #1565c0; font-size: 10.5pt; font-weight: 600; }
.pdf-value { font-size: 12pt; font-weight: 700; color: #283593; }
.pdf-highlight { color: #d50000; font-size: 13pt; }

.pdf-disclaimer-box {
    margin-top: 6pt; padding: 5pt 8pt;
    border: 1pt solid #ffb74d;
    background: #fff8e1;
    border-radius: 3pt;
    font-size: 7.5pt; color: #e65100; line-height: 1.45;
}
.pdf-disclaimer-box strong { color: #bf360c; }

.pdf-volunteer-table-wrapper { overflow: visible; }
.pdf-vol-table {
    width: 100%; border-collapse: collapse; font-size: 10.5pt; table-layout: fixed;
}
.pdf-vol-table th {
    background: linear-gradient(180deg, #1976d2 0%, #1565c0 100%);
    color: #fff; padding: 6pt 4pt;
    font-weight: 700; text-align: center; font-size: 10pt;
    border: 0.5pt solid #0d47a1;
}
.pdf-vol-table td {
    padding: 5pt 4pt; border: 0.5pt solid #90caf9; text-align: center;
    vertical-align: middle; word-wrap: break-word; overflow-wrap: break-word;
    color: #1a237e; font-size: 10.5pt;
}
.pdf-vol-table td.text-left { text-align: left; }
.pdf-vol-table .col-idx { width: 5%; }
.pdf-vol-table .col-code { width: 7%; }
.pdf-vol-table .col-school { width: 15%; font-weight: 600; }
.pdf-vol-table .col-major { width: 24%; font-size: 11pt; font-weight: 600; }
.pdf-vol-table .col-city { width: 7%; }
.pdf-vol-table .col-nature { width: 6%; }
.pdf-vol-table .col-score-rank { width: 16%; }
.pdf-vol-table .col-tuition { width: 10%; }
.pdf-vol-table .col-risk { width: 6%; }
.pdf-vol-table tbody tr:nth-child(odd) { background: #e8f4fd; }
.pdf-vol-table tbody tr:nth-child(even) { background: #fce4ec; }
.pdf-idx-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18pt; height: 18pt; border-radius: 50%;
    background: #1976d2; color: #fff; font-weight: 700; font-size: 9pt;
}
.pdf-score-rank .score-num { color: #d50000; font-weight: 700; }
.pdf-score-rank .rank-num { color: #3949ab; font-weight: 600; }
.pdf-score-rank .score-sep { color: #7986cb; margin: 0 2pt; }
.pdf-tag {
    display: inline-block; font-size: 8pt; font-weight: 600;
    padding: 1pt 4pt; margin-left: 3pt;
    border-radius: 3pt; white-space: nowrap;
}
.pdf-tag-new { color: #fff; background: #7b1fa2; border: 0.5pt solid #6a1b9a; }
.pdf-tag-junshi { color: #fff; background: #c62828; border: 0.5pt solid #b71c1c; }
.pdf-risk-badge {
    display: inline-block; min-width: 20pt;
    padding: 2pt 7pt; border-radius: 10pt;
    font-weight: 700; font-size: 10pt; color: #fff;
}
.pdf-vol-table .risk-chong { background: #f44336; }
.pdf-vol-table .risk-wen { background: #ff9800; }
.pdf-vol-table .risk-bao { background: #4caf50; }

.pdf-gen-time {
    margin-top: 6pt; font-size: 8pt; color: #5c6bc0; text-align: right;
}
.pdf-contact-note {
    margin-top: 6pt;
    padding: 6pt 8pt;
    border: 1pt dashed #ffb74d;
    border-radius: 4pt;
    background: #fff8e1;
    color: #e65100;
    font-size: 8.5pt;
    font-weight: 700;
    text-align: center;
}
.pdf-share-box {
    margin-top: 8pt;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10pt;
    padding: 8pt 10pt;
    border: 1pt dashed #90caf9;
    background: linear-gradient(135deg, #eef6ff, #f7f1ff);
    border-radius: 4pt;
    page-break-inside: avoid;
}
.pdf-share-qr {
    width: 54pt;
    height: 54pt;
    background: #fff;
    border-radius: 4pt;
    padding: 4pt;
}
.pdf-share-text {
    display: flex;
    flex-direction: column;
    gap: 2pt;
    color: #3949ab;
}
.pdf-share-text strong {
    font-size: 10.5pt;
    color: #1565c0;
}
.pdf-share-text span {
    font-size: 9pt;
}

/* 打印：仅输出 PDF 模板，横向 A4 */
@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }
    body {
        margin: 0; padding: 0; background: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    body > *:not(.pdf-template) { display: none !important; }
    .pdf-template {
        display: block !important;
        position: static; width: 100%; margin: 0; padding: 0;
    }
    .pdf-page {
        width: 100%; min-height: auto; padding: 0; margin: 0;
        page-break-before: avoid;
    }
    .pdf-header { page-break-after: avoid; }
    .pdf-section-info { page-break-after: avoid; page-break-inside: avoid; }
    .pdf-vol-table thead { display: table-header-group; }
    .pdf-vol-table tr { page-break-inside: avoid; }
}

/* 响应式 - 手机适配 */
@media (max-width: 768px) {
    body { overflow-x: hidden; }
    .app-container { max-width: 100%; }
    .main-content { padding: 0 12px 20px; }

    /* 顶部栏 */
    .top-bar {
        padding: 12px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .top-bar h1 { font-size: 15px; line-height: 1.4; }
    .logo-icon { font-size: 22px; }
    .data-badge { font-size: 12px; padding: 5px 10px; }

    /* 面板 */
    .step-panel { padding: 16px 14px; margin-bottom: 12px; }
    .panel-header h2 { font-size: 18px; }
    .panel-desc { font-size: 13px; }
    .panel-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        padding-top: 16px;
    }
    .panel-actions .btn-secondary,
    .panel-actions .btn-primary,
    .panel-actions .btn-primary.btn-large {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    /* 第一步表单 */
    .info-form .form-grid { grid-template-columns: 1fr; gap: 14px; }
    .checkbox-item {
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
        padding: 12px 10px;
        min-height: 44px;
    }
    .btn-primary.btn-large { padding: 14px; font-size: 16px; }

    /* 第二步筛选 */
    .student-info-bar { padding: 12px 14px; }
    .info-bar-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .score-highlight { font-size: 16px; }
    .quick-tags { gap: 6px; }
    .tag { padding: 8px 12px; font-size: 12px; min-height: 36px; display: inline-flex; align-items: center; }

    .filter-grid { gap: 8px; }
    .filter-grid select,
    .filter-grid .multi-select {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
    }
    .multi-select-trigger { min-width: 0; width: 100%; }
    .multi-select { min-width: 0; width: calc(50% - 4px); }
    .mobile-dropdown-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 998;
    }
    body.dropdown-modal-open {
        overflow: hidden;
    }
    body.dropdown-modal-open .mobile-dropdown-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
    .multi-select-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        min-width: 0;
        width: min(80vw, 340px);
        max-width: 80vw;
        max-height: 70vh;
        border-radius: 14px;
        box-shadow: 0 12px 36px rgba(0,0,0,0.22);
        z-index: 1001;
    }
    .multi-select-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 14px;
        border-bottom: 1px solid var(--border);
        background: #f8fbff;
        color: var(--primary-dark);
        font-size: 15px;
    }
    .major-search-box { padding: 10px 12px; }
    .major-select-all { padding: 10px 14px; }
    .major-options { max-height: calc(70vh - 172px); }
    .multi-select-actions { padding: 12px; gap: 8px; }

    .filter-action-row,
    .search-row { flex-direction: column; gap: 8px; }
    .search-input { width: 100%; font-size: 16px; }
    .btn-search, .btn-secondary, .btn-add-all {
        width: 100%;
        min-height: 44px;
        font-size: 15px;
    }

    .result-stats {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
        padding: 12px;
    }
    .result-stats-left, .result-stats-center, .result-stats-right { justify-self: center; }
    .vol-manage-bar { flex-direction: column; width: 100%; }
    .add-search-feedback { white-space: normal; text-align: center; }
    .result-stats-right { flex-direction: column; width: 100%; }
    .vol-count-box { font-size: 17px; }
    .vol-count-box #volunteerInResultCount { font-size: 22px; }
    .btn-add-all, .btn-clear-vol { width: 100%; min-height: 44px; }

    /* 结果卡片 */
    .card-grid { grid-template-columns: 1fr; gap: 12px; }
    .result-card { padding: 14px; }
    .card-school-name { font-size: 15px; }
    .btn-tiny { min-height: 36px; padding: 8px 14px; }

    /* 志愿清单 */
    .volunteer-selected h3 { padding: 12px 14px; font-size: 14px; }
    .selected-toolbar { padding: 10px 14px; flex-wrap: wrap; }
    .selected-toolbar .btn-tiny {
        flex: 1;
        min-height: 40px;
        font-size: 14px;
    }
    .vol-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .vol-table-header,
    .volunteer-list li:not(.empty-volunteer-tip) {
        min-width: 860px;
    }
    .vol-del-btn {
        padding: 10px 14px;
        min-width: 52px;
        min-height: 40px;
        font-size: 14px;
    }

    /* 第四步预览与支付 */
    .preview-table { font-size: 12px; min-width: 1080px; }
    .payment-section { padding: 18px 14px; }
    .price-value { font-size: 36px; }
    .qr-image { width: 220px; height: 220px; }
    .btn-pay { min-height: 48px; font-size: 16px; }
    .wechat-browser-gate { padding: 14px; }
    .wechat-browser-gate-card { padding: 22px 16px; border-radius: 16px; }
    .wechat-browser-gate-card h2 { font-size: 22px; }
    .wechat-browser-gate-desc { font-size: 15px; line-height: 1.7; }
    .wechat-browser-gate-steps { font-size: 14px; }

    .app-footer { padding: 16px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
    .filter-grid select,
    .filter-grid .multi-select {
        flex: 1 1 100%;
        min-width: 100%;
        width: 100%;
    }
    .checkbox-item { flex: 1 1 100%; }
    .tips { display: block; width: 100%; margin-top: 4px; }
}
