/* ============================================
   笔记本键盘制造部门知识技能学习平台
   样式表
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f97316;
    --danger: #ef4444;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============ 顶部导航 ============ */
.header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.nav-tabs {
    display: flex;
    gap: 4px;
}

.nav-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-tab.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

/* ============ 主内容区 ============ */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary);
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* ============ 卡片容器 ============ */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: all 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--secondary);
}

/* ============ 仪表板 ============ */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.stat-card.blue::before { background: var(--primary); }
.stat-card.green::before { background: var(--success); }
.stat-card.orange::before { background: var(--warning); }
.stat-card.purple::before { background: #8b5cf6; }

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

.stat-progress {
    margin-top: 16px;
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.blue { background: var(--primary); }
.progress-fill.green { background: var(--success); }
.progress-fill.orange { background: var(--warning); }
.progress-fill.purple { background: #8b5cf6; }

.progress-text {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
    text-align: right;
}

/* ============ 岗位卡片 ============ */
.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.position-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.position-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.position-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.position-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.position-card:nth-child(1) .position-icon { background: #dbeafe; }
.position-card:nth-child(2) .position-icon { background: #dcfce7; }
.position-card:nth-child(3) .position-icon { background: #fef3c7; }
.position-card:nth-child(4) .position-icon { background: #fce7f3; }
.position-card:nth-child(5) .position-icon { background: #e0e7ff; }
.position-card:nth-child(6) .position-icon { background: #ccfbf1; }

.position-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary);
}

.position-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.position-resp {
    font-size: 12px;
    color: var(--text-light);
}

.position-resp-item {
    padding: 3px 0;
    padding-left: 16px;
    position: relative;
}

.position-resp-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.position-select-btn {
    margin-top: 16px;
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.position-select-btn:hover {
    background: var(--primary-dark);
}

/* ============ 分类标签 ============ */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.category-chip {
    padding: 10px 20px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-chip:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

.category-chip.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* 分类条数：与列表实际可见条数一致 */
.cat-count {
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}

.category-chip.active .cat-count {
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
}

/* ============ 知识文章列表 ============ */
.articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.article-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.article-difficulty {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 2px;
}

.difficulty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
}

.difficulty-dot.filled {
    background: var(--warning);
}

.article-category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.article-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--secondary);
    line-height: 1.4;
    padding-right: 40px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light);
}

.article-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.article-tag {
    padding: 3px 10px;
    background: #f1f5f9;
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-light);
}

.article-progress {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.article-progress-bar {
    flex: 1;
    margin-right: 12px;
}

/* ============ 文章详情页 ============ */
.article-detail {
    max-width: 900px;
    margin: 0 auto;
}

.article-detail-header {
    margin-bottom: 32px;
}

.article-detail-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--secondary);
}

.article-detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.article-detail-content {
    background: var(--card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.article-detail-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--secondary);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.article-detail-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 12px;
    color: var(--secondary);
}

.article-detail-content p {
    margin-bottom: 12px;
    line-height: 1.8;
    color: var(--text);
}

.article-detail-content ul,
.article-detail-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.article-detail-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.article-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.article-detail-content table th,
.article-detail-content table td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: left;
}

.article-detail-content table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--secondary);
}

.article-detail-content table tr:nth-child(even) {
    background: #fafbfc;
}

/* v1.5.16 正文图片：按容器宽度等比缩放，完整显示不裁切 */
.article-detail-content img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
    margin: 14px auto;
    border-radius: 6px;
    cursor: zoom-in;
}

.flow-box,
.tip-box,
.warning-box,
.level-box,
.step-box,
.formula-box {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid;
}

.flow-box {
    background: #eff6ff;
    border-color: var(--primary);
}

.tip-box {
    background: #f0fdf4;
    border-color: var(--success);
}

.warning-box {
    background: #fff7ed;
    border-color: var(--warning);
}

.level-box {
    background: #faf5ff;
    border-color: #8b5cf6;
}

.step-box {
    background: #f1f5f9;
    border-color: #64748b;
}

.formula-box {
    background: #fef3c7;
    border-color: var(--accent);
    text-align: center;
    font-weight: 600;
}

.fault-table th {
    background: #fef2f2 !important;
    color: var(--danger) !important;
}

/* ============ 学习路径 ============ */
.path-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.path-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.path-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary);
}

.path-steps {
    position: relative;
    padding-left: 40px;
}

.path-steps::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.path-step {
    position: relative;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.path-step:hover {
    background: #eff6ff;
}

.path-step::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border);
    z-index: 1;
}

.path-step.completed::before {
    background: var(--success);
    border-color: var(--success);
}

.path-step.current::before {
    background: var(--primary);
    border-color: var(--primary);
}

.path-step.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.path-step-title {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 6px;
}

.path-step-desc {
    font-size: 13px;
    color: var(--text-light);
}

/* ---- 学习路径：主管维护 ---- */
.path-admin-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.path-admin-tip {
    font-size: 12px;
    color: var(--text-light);
}

.path-card {
    position: relative;
}

.path-card-ops {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.path-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
}

.path-step-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.path-step-info {
    min-width: 0;
    flex: 1;
}

.path-step-note {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 6px;
}

.path-step-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.path-step-done {
    color: var(--success);
    font-size: 18px;
    font-weight: 700;
}

.path-step-toggle {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.path-step-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.path-step-detail {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.path-step-detail.open {
    display: block;
}

.path-detail-group {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.path-detail-label {
    font-size: 12px;
    color: #fff;
    background: var(--secondary);
    border-radius: 4px;
    padding: 2px 8px;
}

.path-detail-item {
    font-size: 13px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 8px;
}

.path-detail-empty {
    font-size: 13px;
    color: var(--text-light);
}

.path-step-ops {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.path-step-ops .btn-mini[disabled],
.path-card-ops .btn-mini[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.path-add-step {
    margin-top: 4px;
    padding-left: 40px;
}

/* 阶段编辑弹窗 */
.form-modal.path-edit-modal,
.form-modal.path-audit-modal {
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.form-modal.path-edit-modal > h3,
.form-modal.path-audit-modal > h3,
.path-edit-modal .form-modal-actions,
.path-audit-modal .form-modal-actions {
    flex-shrink: 0;
}

.path-edit-modal .form-modal-body,
.path-audit-modal .form-modal-body {
    overflow-y: auto;
    min-height: 0;
}

.path-pick-search {
    width: 100%;
    height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    margin: 6px 0;
}

.path-pick-list {
    max-height: 190px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    background: #f8fafc;
}

.path-pick-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 4px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
}

.path-pick-item:hover {
    background: #eff6ff;
}

.path-pick-item input {
    margin-top: 3px;
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.audit-table th,
.audit-table td {
    border-bottom: 1px solid var(--border);
    padding: 8px 6px;
    text-align: left;
    vertical-align: top;
}

.audit-table th {
    background: #f8fafc;
    color: var(--secondary);
    font-weight: 600;
    white-space: nowrap;
}

.audit-time {
    white-space: nowrap;
    color: var(--text-light);
}

.audit-empty {
    color: var(--text-light);
    font-size: 14px;
    padding: 12px 0;
}

/* ============ 测试考核 ============ */
.quiz-container {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
}

.quiz-header {
    text-align: center;
    margin-bottom: 32px;
}

.quiz-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary);
}

.quiz-info {
    color: var(--text-light);
    font-size: 14px;
}

.quiz-progress {
    margin-bottom: 32px;
}

.quiz-progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 5px;
    transition: width 0.3s;
}

.quiz-progress-text {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

.question-card {
    padding: 28px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 24px;
}

.question-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 16px;
}

.question-type.single { background: #dbeafe; color: #1d4ed8; }
.question-type.multi { background: #fef3c7; color: #b45309; }
.question-type.judge { background: #dcfce7; color: #15803d; }

.question-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--secondary);
}

.options-list {
    list-style: none;
}

.option-item {
    padding: 14px 18px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.option-item:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.option-item.selected {
    border-color: var(--primary);
    background: #eff6ff;
}

.option-item.correct {
    border-color: var(--success);
    background: #dcfce7;
}

.option-item.wrong {
    border-color: var(--danger);
    background: #fee2e2;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ 测试结果 ============ */
.result-container {
    text-align: center;
    padding: 40px;
}

.result-score {
    font-size: 72px;
    font-weight: 700;
    margin: 20px 0;
}

.result-score.pass { color: var(--success); }
.result-score.fail { color: var(--danger); }

.result-label {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.result-detail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
}

.result-detail-item {
    text-align: center;
}

.result-detail-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--secondary);
}

.result-detail-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ============ 历史成绩 ============ */
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.history-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--secondary);
    font-size: 14px;
}

.history-table td {
    font-size: 14px;
}

.score-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.score-badge.pass {
    background: #dcfce7;
    color: #15803d;
}

.score-badge.fail {
    background: #fee2e2;
    color: #dc2626;
}

.score-badge.pending {
    background: #fef3c7;
    color: #b45309;
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-subtext {
    font-size: 14px;
}

/* ============ 返回按钮 ============ */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============ 筛选区 ============ */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 240px;
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============ 动画 ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 12px;
    }

    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
        margin: 12px 0;
    }

    .nav-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .main {
        padding: 20px 16px;
    }

    .positions-grid,
    .articles-list {
        grid-template-columns: 1fr;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .article-detail-content {
        padding: 24px 20px;
    }

    .article-detail-content table {
        font-size: 12px;
    }

    .result-detail {
        grid-template-columns: 1fr;
    }

    .quiz-nav {
        flex-direction: column;
        gap: 12px;
    }

    .quiz-nav .btn {
        width: 100%;
    }
}

/* ============================================
   资料上传 / 审核 / 视频嵌入
   ============================================ */

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    vertical-align: middle;
}

.role-btn {
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.role-btn:hover { background: rgba(255,255,255,0.22); }
.role-btn.admin { border-color: var(--accent); color: #fde68a; }

/* ---- 知识库工具条 ---- */
.kb-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kb-tip {
    font-size: 12px;
    color: var(--text-light);
    background: #f8fafc;
    border-left: 3px solid var(--primary);
    padding: 8px 12px;
    border-radius: 4px;
}

/* ---- 类型徽章 ---- */
.type-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    margin-bottom: 8px;
}
.type-badge.video { background: #ede9fe; color: #6d28d9; }
.type-badge.file { background: #ffedd5; color: #c2410c; }
.type-badge.plain { background: #e2e8f0; color: #334155; }

/* ---- 主管操作条 ---- */
.article-admin-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 8px;
    flex-wrap: wrap;
}
.admin-tag { font-size: 12px; color: var(--text-light); font-weight: 500; }

/* ---- 按钮补充 ---- */
.btn-danger { background: #fee2e2; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: #dcfce7; color: #15803d; }
.btn-success:hover { background: #bbf7d0; }

.btn-mini {
    padding: 5px 12px;
    font-size: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 6px;
}
.btn-mini:hover { border-color: var(--primary); color: var(--primary); }
.btn-mini.danger:hover { border-color: var(--danger); color: var(--danger); background: #fee2e2; }

/* ---- 媒体区块 ---- */
.media-block {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.media-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 12px;
}
.video-wrap {
    position: relative;
    width: 100%;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
}
.media-missing {
    margin: 12px;
    padding: 12px 16px;
    background: #fff5f5;
    border-left: 3px solid #e74c3c;
    border-radius: 6px;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.7;
}
.video-frame {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}
.video-player {
    display: block;
    width: 100%;
    max-height: 520px;
    background: #000;
}
.video-link-card {
    padding: 20px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 14px;
    word-break: break-all;
}
.video-link-card a { color: var(--primary); }

.file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.file-icon { font-size: 28px; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 14px; color: var(--secondary); word-break: break-all; }
.file-size { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* ---- 表单 ---- */
.upload-tip {
    padding: 12px 16px;
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 20px;
}

.upload-form { display: flex; flex-direction: column; gap: 4px; }

.form-row { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
}

.req { color: var(--danger); }

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--primary); }
textarea.form-input { resize: vertical; line-height: 1.6; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-hint {
    font-size: 12px;
    color: var(--text-light);
    margin: 6px 0;
}

.type-selector { display: flex; gap: 10px; flex-wrap: wrap; }
.type-opt {
    padding: 10px 18px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.type-opt:hover { border-color: var(--primary); }
.type-opt input { accent-color: var(--primary); }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    background: #f8fafc;
}
.chip-check input { accent-color: var(--primary); }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

/* ---- 状态徽章 ---- */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.status-badge.approved { background: #dcfce7; color: #15803d; }
.status-badge.pending { background: #fef3c7; color: #b45309; }
.status-badge.rejected { background: #fee2e2; color: #b91c1c; }
.status-badge.returned { background: #ffedd5; color: #c2410c; }
.status-badge.builtin { background: #e0e7ff; color: #3730a3; }

/* ---- 审核中心 ---- */
.review-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.review-stat {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    text-align: center;
}
.review-stat-value { font-size: 30px; font-weight: 700; }
.review-stat-label { font-size: 13px; color: var(--text-light); margin-top: 4px; }

.card-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.review-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fafbfc;
}
.review-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.review-card-title { font-size: 16px; font-weight: 600; color: var(--secondary); margin: 4px 0 6px; }
.review-card-meta { font-size: 12px; color: var(--text-light); }
.review-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
.review-card-actions .btn { padding: 9px 18px; font-size: 13px; }

.review-preview {
    margin-top: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border);
    /* v1.5.16：不再限高，避免图片下半截看不到 */
    max-height: none;
    overflow: visible;
}
.review-preview .media-block { box-shadow: none; padding: 0; margin-bottom: 12px; }
.review-preview .article-detail-content h2 { font-size: 16px; margin: 12px 0 8px; }

@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .review-stats { grid-template-columns: 1fr; }
    .review-card-head { flex-direction: column; }
    .review-card-actions { width: 100%; }
    .review-card-actions .btn { flex: 1; }
}

/* ============ 登录页 ============ */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
    padding: 36px 32px 28px;
    animation: fadeIn 0.3s ease-out;
}

.login-brand { text-align: center; margin-bottom: 26px; }

.login-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.login-brand h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1.4;
}

.login-brand p {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

.login-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
}

.login-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-error {
    min-height: 18px;
    font-size: 12px;
    color: var(--danger);
    margin-bottom: 8px;
}

.login-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.login-submit:hover { background: var(--primary-dark); }

.login-demo {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    text-align: center;
}

.login-demo-title {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.login-demo-line {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.9;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.login-demo-line b { color: var(--primary); }

/* ============ 用户信息区 ============ */
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.user-role.admin { color: #fde68a; }

/* ============ 人员管理 ============ */
.users-form .form-row:last-child { margin-bottom: 0; }

.user-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.user-table thead th {
    background: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.user-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: middle;
}

.user-table tbody tr:last-child td { border-bottom: none; }

.user-table tbody tr:hover { background: #f8fafc; }

.user-cell-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.user-cell-icon { font-size: 16px; }

.self-badge {
    padding: 1px 7px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 500;
}

.default-pw-badge {
    padding: 1px 7px;
    border-radius: 10px;
    background: #fef3c7;
    color: #b45309;
    font-size: 11px;
    font-weight: 500;
}

.default-pw-alert {
    border: 1px solid #fcd34d;
    background: #fffbeb;
}

.default-pw-tip {
    margin: 6px 0 12px;
    font-size: 13px;
    color: #92400e;
}

.default-pw-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.default-pw-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #fde68a;
    font-size: 13px;
    color: var(--text);
}

.default-pw-item em {
    font-style: normal;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    color: var(--text-light);
}

.account-text {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    color: var(--text-light);
}

.user-pos-select,
.user-role-select {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 130px;
    margin-bottom: 0;
}

.user-role-select { min-width: 110px; }

.user-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.user-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .login-card { padding: 28px 20px 22px; }
    .header-inner { gap: 8px; }
    .nav-tab { padding: 7px 11px; font-size: 12px; }
    .user-table { min-width: 640px; }
}

/* 导航项较多，桌面端保持单行紧凑显示 */
@media (min-width: 769px) {
    .nav-tabs { flex-wrap: nowrap; gap: 2px; }
    .nav-tab { padding: 8px 12px; font-size: 13px; }
    .logo { font-size: 16px; }
}

/* 课件在线预览 */
.doc-preview-wrap { margin-bottom: 12px; }
.doc-preview-tip { font-size: 12px; color: #8a8f98; margin-bottom: 6px; }
.doc-preview {
    width: 100%;
    height: 68vh;
    min-height: 360px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    display: block;
}

/* v1.5.16 图片课件：按容器宽度等比缩放，完整显示不裁切 */
.courseware-image-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}
.courseware-image {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    cursor: zoom-in;
}

/* ============ 通用表单弹窗 ============ */
.form-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 3000;
}

.form-modal {
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    animation: formModalIn 0.18s ease-out;
}

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

.form-modal h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 18px;
}

.form-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row > span {
    font-size: 13px;
    color: var(--text-light);
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 9px 11px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-row input[type="color"] {
    height: 38px;
    padding: 3px;
    cursor: pointer;
}

.form-row textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

.form-hint {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.6;
    color: #94a3b8;
    white-space: pre-line;
}

.form-modal-error {
    min-height: 18px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--danger);
}

.form-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 6px;
}

/* ============ 试卷解析结果编辑 ============ */
.q-edit-meta {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
}

.q-edit-warn {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    font-size: 13px;
    color: #9a3412;
}

.q-edit-list {
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 6px;
}

.q-edit-row {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fafbfc;
}

.q-edit-row.q-edit-unknown {
    border-color: #f59e0b;
    background: #fffbeb;
}

.q-edit-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.q-edit-num {
    font-weight: 700;
    color: var(--primary);
    font-size: 13px;
    min-width: 32px;
}

.q-edit-type {
    flex: 1;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    outline: none;
}

.q-edit-del {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 15px;
    opacity: 0.7;
}
.q-edit-del:hover { opacity: 1; }

.q-edit-row textarea,
.q-edit-row input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-sizing: border-box;
    outline: none;
    margin-bottom: 6px;
    resize: vertical;
    background: #fff;
}

.q-edit-row textarea:focus,
.q-edit-row input[type="text"]:focus,
.q-edit-row select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.q-edit-row .q-edit-o:disabled {
    background: #f1f5f9;
    color: var(--text-light);
    cursor: not-allowed;
}

/* ============ 项目进度管理（周进度 / 月进度） ============ */
.progress-stats { margin-bottom: 20px; }
.progress-overview { margin-bottom: 20px; }
.progress-deadline { font-size: 12.5px; color: var(--text-light); }

.progress-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.progress-badge.on-time { background: #dcfce7; color: #15803d; }
.progress-badge.missing { background: #fef3c7; color: #b45309; }
.progress-badge.late { background: #fee2e2; color: #b91c1c; }
.progress-last-submit { font-size: 12.5px; color: var(--text-light); }

.progress-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.progress-status-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    background: #f8fafc;
}
.psc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
}
.psc-period { font-size: 13.5px; color: var(--text); }
.psc-deadline { font-size: 12.5px; color: var(--text-light); margin-top: 4px; }
.psc-meta { font-size: 12.5px; color: var(--text-light); margin-top: 4px; }

.progress-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 16px;
}
.progress-type-fixed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}
.progress-scope-tabs { display: flex; gap: 8px; }
.progress-scope-tab {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-light);
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all .2s;
}
.progress-scope-tab:hover { border-color: var(--primary); color: var(--primary); }
.progress-scope-tab { padding: 7px 14px; font-size: 13px; }
.progress-scope-tab.active { background: #e0e7ff; border-color: #c7d2fe; color: #3730a3; }

.progress-form-card { margin-bottom: 20px; }
.progress-banner {
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    color: #1e40af;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 18px;
    line-height: 1.7;
}
.late-text { color: var(--danger); }
.progress-hint { font-size: 12px; color: var(--text-light); margin-top: 6px; }
.progress-textarea { resize: vertical; min-height: 96px; font-family: inherit; }
.fill-summary {
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.7;
    word-break: break-all;
}
.fill-readonly {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 14px;
    color: #92400e;
    font-size: 13px;
    line-height: 1.7;
}
.fill-textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    line-height: 1.7;
}

.progress-list { display: flex; flex-direction: column; gap: 14px; }
.progress-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    background: #fff;
}
.progress-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.progress-item-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.progress-project { font-size: 15.5px; font-weight: 700; color: var(--text); }
.progress-item-actions { display: flex; align-items: center; gap: 10px; }
.progress-period { font-size: 12.5px; color: var(--text-light); }
.progress-desc {
    margin-top: 10px;
    white-space: pre-wrap;
    word-break: break-word;
    color: #334155;
    font-size: 14px;
    line-height: 1.75;
}
.progress-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    font-size: 12.5px;
    color: var(--text-light);
}
.progress-empty { padding: 32px 0; }
@media (max-width: 900px) {
    .progress-status-grid { grid-template-columns: 1fr; }
}

/* ============ 项目进度：分类 / 阶段 / 项目看板 ============ */
.progress-view-tabs { display: flex; gap: 8px; }
.progress-view-tab {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-light);
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
}
.progress-view-tab:hover { border-color: var(--primary); color: var(--primary); }
.progress-view-tab.active { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }

.tag-category,
.tag-stage {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.tag-category { background: #e0f2fe; color: #0369a1; }
.tag-stage { background: #ede9fe; color: #5b21b6; }

.progress-due {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.progress-due.done { background: #dcfce7; color: #15803d; }
.progress-due.ongoing { background: #e2e8f0; color: #475569; }
.progress-due.overdue { background: #fee2e2; color: #b91c1c; }
.progress-due.late { background: #ffedd5; color: #c2410c; }
.progress-due.near { background: #fef3c7; color: #b45309; }

/* 项目进度状态表（主管视角） */
.progress-sort-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 0;
    font-size: 12px;
    color: #64748b;
}
.progress-status-table-wrap { width: 100%; overflow-x: auto; }
.progress-status-table { min-width: 1080px; }
.progress-status-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.progress-status-table th.sortable:hover { color: var(--primary); }
.progress-status-table th.sortable.active { color: var(--primary); font-weight: 700; }
.progress-status-row { cursor: pointer; }
.progress-status-row:hover td { background: #f5f7ff; }
.progress-status-row:focus-visible { outline: 2px solid #4f46e5; outline-offset: -2px; }
.progress-status-row.risk-overdue td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
.progress-status-row.completed { opacity: 0.62; }
.progress-status-table .ps-name { max-width: 220px; }
.progress-status-table .ps-pct { font-weight: 600; color: #4338ca; white-space: nowrap; }
.progress-status-table .ps-yes { color: #15803d; font-weight: 600; white-space: nowrap; }
.progress-status-table .ps-no { color: #b91c1c; font-weight: 600; white-space: nowrap; }
.progress-status-table .ps-empty { text-align: center; color: #94a3b8; padding: 18px; }
.progress-status-table .progress-last-submit { font-size: 12px; color: #475569; white-space: nowrap; }
.progress-member-details { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.progress-member-details > summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    padding: 4px 0;
}
.progress-member-details > summary:hover { color: var(--primary); }

/* 负责人视角：待办提示条与项目卡片状态 */
.progress-my-alert {
    margin: 10px 0 4px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #fecaca;
    background: linear-gradient(90deg, #fef2f2, #fff7ed);
    color: #991b1b;
}
.progress-my-alert.ok {
    border-color: #bbf7d0;
    background: linear-gradient(90deg, #f0fdf4, #ecfdf5);
    color: #166534;
}
.progress-my-alert .pma-main { font-size: 15px; font-weight: 700; }
.progress-my-alert .pma-sub { margin-top: 4px; font-size: 12px; color: #64748b; }
.project-status-flags { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.psf-item {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}
.psf-item.ok { background: #dcfce7; color: #15803d; }
.psf-item.todo { background: #fee2e2; color: #b91c1c; }
.psf-item.overdue { background: #fee2e2; color: #b91c1c; }
.psf-item.near { background: #fef3c7; color: #b45309; }
.psf-item.warn { background: #fef3c7; color: #b45309; }
.tag-stage.done { background: #dcfce7; color: #15803d; }
.ps-warn {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-weight: 600;
    white-space: nowrap;
}
.project-card.completed { opacity: 0.72; background: #fbfcfe; }
.project-card.flash { animation: projectCardFlash 1.8s ease; }
@keyframes projectCardFlash {
    0% { box-shadow: 0 0 0 3px #6366f1; }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* 选中阶段后的明细（阶段信息 + 周/月进度）见下方 stage-detail 样式 */

.progress-content {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 13.5px;
    color: #334155;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.project-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    background: #fff;
}
.project-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s;
}
.project-card-head:hover { background: #f8fafc; }

/* 单项目视图（#project=<id>）：一屏只放一个项目 */
.project-focus-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    flex-wrap: wrap;
}
.project-focus-hint { font-size: 13px; color: var(--text-light); }
.project-focus-head {
    margin-bottom: 14px;
    border-left: 4px solid var(--primary);
}
.pfh-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pfh-title .page-title { margin: 0; }
.pfh-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-light);
}
.project-focus-card { margin-bottom: 16px; }
.stage-detail-grid.single { grid-template-columns: 1fr; }
.project-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.project-progress-num { font-size: 20px; font-weight: 800; color: var(--primary); }
.progress-bar {
    margin-top: 12px;
    height: 8px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #22c55e); border-radius: 999px; }

.stage-ladder {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.stage-step {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    border: 1px solid var(--border);
    background: #f8fafc;
    color: #94a3b8;
    min-width: 118px;
}
.stage-step-head { display: flex; align-items: center; gap: 5px; }
.stage-step .stage-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    background: #e2e8f0;
    color: #64748b;
    flex: 0 0 auto;
}
.stage-dates { font-size: 11px; color: #94a3b8; white-space: nowrap; }
.stage-empty {
    width: 100%;
    padding: 10px 12px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 12.5px;
    text-align: center;
    background: #f8fafc;
}
.stage-step.done { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.stage-step.done .stage-dot { background: #22c55e; color: #fff; }
.stage-step.done .stage-dates { color: #4d7c5f; }
.stage-step.current { background: #eef2ff; border-color: #818cf8; color: #3730a3; font-weight: 700; }
.stage-step.current .stage-dot { background: #4f46e5; color: #fff; }
.stage-step.current .stage-dates { color: #4338ca; font-weight: 600; }
.stage-step.custom { border-style: dashed; }
.stage-step.custom.current { border-color: #d97706; background: #fffbeb; color: #92400e; }
.stage-step.custom.current .stage-dot { background: #f59e0b; color: #fff; }
.stage-step.custom.current .stage-dates { color: #92400e; }
.stage-step .progress-due { margin-top: 2px; font-size: 10px; padding: 1px 6px; align-self: flex-start; }

/* 阶段块可点选：键盘、触屏都有效，选中态加粗描边 + 深底色，截图/打印也能看出来 */
button.stage-step {
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}
button.stage-step:hover { border-color: #a5b4fc; }
button.stage-step:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }
.stage-step.selected {
    border: 2px solid #4338ca;
    background: #c7d2fe;
    color: #1e1b4b;
    box-shadow: 0 0 0 2px #c7d2fe inset;
    padding: 5px 9px;
}
.stage-step.selected .stage-dot { background: #4338ca; color: #fff; }
.stage-step.selected.custom { border-color: #b45309; background: #fde68a; color: #78350f; }
.stage-step.selected.custom .stage-dot { background: #b45309; color: #fff; }
.stage-step-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.stage-stat { font-size: 11px; color: #475569; }
.stage-step.selected .stage-stat { color: #312e81; font-weight: 600; }
.stage-week-flag {
    font-size: 10px;
    padding: 0 5px;
    border-radius: 999px;
    font-weight: 600;
}
.stage-week-flag.submitted { background: #dcfce7; color: #15803d; }
.stage-week-flag.missing { background: #fee2e2; color: #b91c1c; }
.stage-week-flag.done { background: #e5e7eb; color: #4b5563; }
/* 不参与周进度统计（未添加阶段 / 已全部完成）的占位与补录标记 */
.ps-muted { color: #9ca3af; }
.ps-yes.admin { color: #7c3aed; }
.stage-last { font-size: 10.5px; color: #64748b; }
.stage-lock-hint {
    font-size: 10.5px;
    color: #b45309;
    background: #fef3c7;
    border-radius: 6px;
    padding: 1px 6px;
    align-self: flex-start;
}
.stage-lock { margin-left: 3px; font-size: 10.5px; cursor: help; }
.form-hint-lock { color: #b45309; }
.stage-expand-hint { font-size: 10.5px; color: #6366f1; }
.stage-step.selected .stage-expand-hint { color: #312e81; font-weight: 600; }

/* 选中阶段后的明细（阶段信息 + 周/月进度） */
.stage-detail {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: #f8faff;
}
.stage-detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
}
.stage-detail-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.stage-detail-step {
    font-size: 11px;
    font-weight: 700;
    color: #4338ca;
    background: #e0e7ff;
    border-radius: 999px;
    padding: 1px 8px;
}
.stage-detail-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.stage-detail-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12px;
    color: #475569;
}
.stage-detail-done { color: #b45309; font-weight: 600; }
.stage-detail-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.stage-detail-col {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.stage-detail-title { font-size: 12.5px; font-weight: 700; color: #334155; }
.stage-detail-row {
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.stage-detail-row.order-issue { border-color: #fca5a5; background: #fef2f2; }
.stage-detail-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: #475569; }
.stage-detail-desc { margin-top: 4px; font-size: 12.5px; color: #334155; white-space: pre-wrap; word-break: break-word; }
.stage-detail-meta { font-size: 11.5px; color: #64748b; margin-top: 4px; }
.stage-detail-empty { font-size: 12px; color: #94a3b8; padding: 6px 2px; }

/* 「全部阶段」汇总视图 */
.stage-all { margin-top: 12px; }
.stage-all-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 12.5px;
    color: #475569;
}
.stage-all-head span { color: #94a3b8; font-size: 11.5px; }
.stage-log-step { font-size: 11px; font-weight: 700; color: #6366f1; }
.stage-log-count { font-size: 11.5px; color: #6366f1; }

.stage-logs {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stage-log {
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px 10px;
}
.stage-log-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: #475569; }
.stage-log-dates { color: #64748b; }
.stage-log-meta { color: #94a3b8; font-size: 11.5px; }
.stage-log-note { color: #475569; font-size: 12px; }
.stage-log-actions { display: inline-flex; gap: 6px; }
.stage-log .project-inline-form { flex-basis: 100%; }

.tag-category.empty { background: #f1f5f9; color: #94a3b8; font-weight: 500; }
.stage-source {
    font-style: normal;
    font-size: 11.5px;
    padding: 0 5px;
    border-radius: 4px;
}
.stage-source.admin { background: #fef3c7; color: #92400e; }
.stage-source.owner { background: #dcfce7; color: #15803d; }

.project-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.project-inline-form {
    margin-top: 12px;
    padding: 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.project-inline-form .form-actions { margin-top: 0; }

/* ============================================
   手机端适配（≤ 768px）
   目标：导航折叠为汉堡菜单；状态表改卡片式；
   阶段阶梯横向滑动；可点区域 ≥ 44px；视频自适应。
   ============================================ */

/* 汉堡按钮：桌面端隐藏 */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:active { background: rgba(255, 255, 255, 0.26); }

@media (max-width: 768px) {
    html { -webkit-text-size-adjust: 100%; }

    body { font-size: 15px; }

    /* ---- 顶部导航：logo + 汉堡 + 用户，导航下拉 ---- */
    .header-inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        height: auto;
        padding: 8px 12px;
        gap: 8px;
    }

    .logo {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 15px;
        gap: 8px;
    }

    .logo > div:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .logo-icon { width: 32px; height: 32px; font-size: 18px; }

    .nav-toggle { display: flex; order: 2; flex: 0 0 auto; }

    .user-area {
        order: 3;
        width: 100%;
        justify-content: flex-end;
        gap: 6px;
    }
    .user-avatar { display: none; }
    .user-chip {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
    }
    .user-meta {
        display: flex;
        min-width: 0;
        text-align: right;
    }
    .user-name {
        font-size: 12px;
        max-width: 24vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .user-role {
        font-size: 10px;
        max-width: 24vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .role-btn {
        flex: 0 0 auto;
        min-height: 44px;
        padding: 0 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    .nav-tabs {
        display: none;
        order: 4;
        flex: 1 1 100%;
        width: 100%;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 4px;
        margin: 4px 0 6px;
    }

    .header.nav-open .nav-tabs { display: flex; }

    .nav-tab {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        padding: 10px 14px;
        font-size: 15px;
        background: rgba(255, 255, 255, 0.08);
    }

    /* ---- 页面与卡片 ---- */
    .main { padding: 16px 12px; }
    .page-title { font-size: 22px; line-height: 1.35; }
    .page-subtitle { font-size: 13px; margin-bottom: 20px; line-height: 1.7; }

    .card { padding: 16px; border-radius: 10px; }
    .card-title { font-size: 16px; }
    .card-head-row { gap: 8px; }
    .card-head-row .card-title { flex: 1 1 100%; }

    /* ---- 可点区域 ≥ 44px ---- */
    .btn,
    .btn-mini,
    .back-btn,
    .login-submit,
    .category-chip,
    .type-opt,
    .chip-check,
    .progress-type-tab,
    .progress-view-tab,
    .progress-scope-tab {
        min-height: 44px;
    }

    .btn { padding: 11px 16px; font-size: 14px; }
    .btn-mini { padding: 10px 14px; font-size: 13px; margin-left: 4px; }

    .form-input,
    .search-input,
    .login-input,
    .form-row input,
    .form-row select,
    .form-row textarea,
    .user-pos-select,
    .user-role-select {
        min-height: 44px;
        font-size: 16px; /* ≥16px 可避免 iOS 聚焦时自动放大 */
    }

    .form-row textarea,
    .progress-textarea { min-height: 96px; }

    .login-overlay { padding: 12px; }
    .login-card { padding: 26px 18px 20px; max-width: 100%; }
    .login-brand h1 { font-size: 17px; }
    .login-input { margin-bottom: 14px; }
    .login-submit { min-height: 48px; font-size: 16px; }
    .login-demo { margin-top: 18px; }

    /* ---- 知识库 ---- */
    .kb-toolbar { gap: 8px; }
    .kb-toolbar .btn { flex: 1 1 100%; }
    .kb-toolbar .kb-tip { flex: 1 1 100%; }

    .filter-bar { gap: 8px; }
    .search-input { min-width: 0; width: 100%; flex: 1 1 100%; }

    .categories {
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .category-chip { flex: 0 0 auto; padding: 10px 16px; }

    .articles-list { gap: 14px; }
    .article-card { padding: 18px 16px; }
    .article-title { font-size: 15.5px; }
    .article-progress { gap: 8px; flex-wrap: wrap; }

    .article-detail { max-width: 100%; }
    .article-detail-header { margin-bottom: 20px; }
    .article-detail-title { font-size: 22px; line-height: 1.4; }
    .article-detail-meta { flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
    .article-admin-bar { gap: 8px; }
    .article-admin-bar .btn { flex: 1 1 100%; }

    .article-detail-content { padding: 18px 14px; font-size: 15px; }
    .article-detail-content h2 { font-size: 18px; margin: 24px 0 12px; }
    .article-detail-content h3 { font-size: 15px; }
    .article-detail-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 13px;
    }
    /* v1.5.16：窄屏图片宽度跟随容器，不横向溢出、不撑破卡片 */
    .article-detail-content img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain;
    }
    .courseware-image-wrap { padding: 4px; border-radius: 8px; }
    .courseware-image { width: 100%; }

    /* ---- 视频 / 媒体：宽度自适应 ---- */
    .media-block { padding: 14px; }
    .video-wrap { border-radius: 8px; }
    .video-player {
        width: 100%;
        max-height: none;
        aspect-ratio: 16 / 9;
        background: #000;
    }
    .video-frame { width: 100%; }
    .doc-preview { height: 60vh; min-height: 300px; }

    .file-card { padding: 12px; gap: 10px; }
    .file-card .btn { flex: 0 0 auto; }

    /* ---- 项目进度：工具条与表单 ---- */
    .review-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .review-stat { padding: 14px 16px; }
    .review-stat-value { font-size: 24px; }

    .progress-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .progress-view-tabs,
    .progress-scope-tabs {
        width: 100%;
        gap: 6px;
    }

    .progress-view-tab,
    .progress-scope-tab { flex: 1 1 0; padding: 10px 8px; font-size: 13px; }

    .progress-form-card .form-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .progress-form-card .form-actions .btn { width: 100%; }
    .fill-textarea {
        min-height: 180px;
        font-size: 16px;
        padding: 12px;
    }
    .fill-summary { font-size: 12.5px; }

    .progress-banner { font-size: 12.5px; }

    /* ---- 项目进度状态表：手机改卡片式，不横向滚动 ---- */
    .progress-status-table-wrap { overflow: visible; }
    .progress-status-table { min-width: 0; width: 100%; }

    .progress-status-table thead { display: none; }
    .progress-status-table tbody { display: block; }

    .progress-status-table tbody tr {
        display: block;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 10px;
        background: #fff;
        box-shadow: var(--shadow-sm);
    }

    .progress-status-table tbody tr:last-child { margin-bottom: 0; }

    .progress-status-table tbody td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 5px 0;
        border-bottom: 1px dashed #eef2f7;
        font-size: 13.5px;
        text-align: right;
        white-space: normal;
        word-break: break-word;
    }

    .progress-status-table tbody td:last-child { border-bottom: none; }

    .progress-status-table tbody td::before {
        content: attr(data-label);
        flex: 0 0 84px;
        text-align: left;
        color: var(--text-light);
        font-weight: 500;
        font-size: 12.5px;
    }

    .progress-status-table tbody td.ps-name {
        font-size: 15px;
        color: var(--secondary);
        border-bottom: 1px solid var(--border);
        padding-bottom: 8px;
        margin-bottom: 2px;
    }

    .progress-status-table tbody td.ps-name::before { content: none; }
    .progress-status-table tbody td.ps-name b { text-align: left; }

    .progress-status-table tbody td.ps-empty {
        display: block;
        text-align: center;
        border-bottom: none;
        padding: 18px 0;
    }
    .progress-status-table tbody td.ps-empty::before { content: none; }

    .progress-status-row.risk-overdue td:first-child { box-shadow: inset 3px 0 0 #dc2626; }

    /* ---- 阶段阶梯：横向滑动 ---- */
    .stage-ladder {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 8px;
        margin-right: -4px;
        margin-left: -4px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .stage-step {
        flex: 0 0 auto;
        min-width: 210px;
        max-width: 260px;
        scroll-snap-align: start;
        padding: 10px 12px;
    }

    .stage-empty { min-width: 100%; }

    .stage-detail { padding: 10px; }
    .stage-detail-actions { width: 100%; }
    .stage-detail-actions .btn { flex: 1 1 auto; }
    .stage-detail-grid { grid-template-columns: 1fr; }
    .stage-detail-head { align-items: flex-start; }

    .stage-log { padding: 10px; }
    .stage-log-actions { width: 100%; }
    .stage-log-actions .btn { flex: 1; }

    .project-card { padding: 14px; }
    .project-card-head { gap: 8px; }
    .project-title-line { gap: 6px; }
    .project-progress-num { font-size: 18px; }
    .project-actions { gap: 6px; }
    .project-actions .btn { flex: 1 1 calc(50% - 6px); margin-left: 0; }
    .project-inline-form { padding: 12px; }

    .progress-item { padding: 14px; }
    .progress-item-head { flex-direction: column; gap: 8px; }
    .progress-item-actions { width: 100%; justify-content: space-between; }
    .progress-meta { gap: 4px 14px; }

    .progress-my-alert .pma-main { font-size: 14px; }
    .progress-sort-bar { font-size: 12px; }

    /* ---- 人员管理 / 审核：表格允许滚动，不改卡片 ---- */
    .user-table-wrap { -webkit-overflow-scrolling: touch; }

    /* ---- 学习路径：手机端 ---- */
    .path-card { padding: 18px 14px; }
    .path-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .path-card-ops { justify-content: flex-start; }
    .path-card-ops .btn-mini,
    .path-step-ops .btn-mini { margin-left: 0; }
    .path-steps { padding-left: 24px; }
    .path-steps::before { left: 6px; }
    .path-step::before { left: -25px; }
    .path-step { padding: 12px; }
    .path-step-toggle { width: 44px; height: 44px; font-size: 18px; }
    .path-step-ops { gap: 6px; }
    .path-step-ops .btn-mini { flex: 1 1 calc(50% - 6px); }
    .path-add-step { padding-left: 24px; }
    .path-add-step .btn { width: 100%; }

    /* ---- 弹窗：手机全宽、按钮 44px ---- */
    .form-modal-mask { padding: 12px; align-items: flex-end; }
    .form-modal {
        max-width: 100%;
        max-height: 92vh;
        padding: 20px 16px;
        border-radius: 14px 14px 10px 10px;
    }
    .form-modal-actions { flex-direction: column-reverse; gap: 10px; }
    .form-modal-actions .btn { width: 100%; }

    /* ---- 页脚 ---- */
    footer { padding: 18px 14px !important; font-size: 11.5px; }
}

@media (max-width: 390px) {
    .logo > div:last-child { font-size: 14px; }
    .nav-tab { font-size: 14px; }
    .stage-step { min-width: 190px; }
    .progress-status-table tbody td::before { flex-basis: 74px; }
}

/* ============ PWA 安装到桌面提示 ============ */
.pwa-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto;
    padding: 10px 10px 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 35, 70, .18);
    transform: translateY(140%);
    opacity: 0;
    transition: transform .26s ease, opacity .26s ease;
    text-align: left;
}
.pwa-banner.show { transform: translateY(0); opacity: 1; }
.pwa-banner-icon { width: 42px; height: 42px; border-radius: 10px; flex: 0 0 auto; }
.pwa-banner-body { flex: 1 1 auto; min-width: 0; }
.pwa-banner-title { font-size: 14px; font-weight: 600; color: var(--text); }
.pwa-banner-text { font-size: 12px; color: var(--text-light); line-height: 1.55; margin-top: 2px; }
.pwa-banner-action {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.pwa-banner-action:active { background: var(--primary-dark); }
.pwa-banner-close {
    flex: 0 0 auto;
    width: 36px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
@media (max-width: 480px) {
    .pwa-banner-text { font-size: 11.5px; }
}


/* ===== 阶段参与人（仅展示） ===== */
.stage-participants {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.5;
}
.stage-log-participants {
    font-size: 12px;
    color: #64748b;
}
.stage-detail-participants {
    color: #475569;
}
.my-stage-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 10px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.participant-readonly-tip {
    color: #4f46e5;
}
.participant-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 0 2px;
}
.participant-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}
.participant-chip:hover {
    border-color: #c7d2fe;
    background: #f5f7ff;
}
.participant-chip input {
    margin: 0;
    accent-color: var(--primary);
}
.participant-picker-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.participant-picker-foot .form-hint { flex: 1 1 auto; margin: 0; }
.participant-picker-foot .btn { flex: 0 0 auto; }
.ps-participants {
    font-size: 12px;
    color: #475569;
}
.ps-muted {
    font-size: 12px;
    color: #94a3b8;
}

/* ============ 按人查看本周完成情况 ============ */
.progress-stats { display: block; }
.person-week-bar {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 16px 18px;
}
.person-week-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.pwh-title { font-size: 14px; font-weight: 700; color: #334155; }
.pwc-all {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    padding: 3px 14px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
}
.pwc-all.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.person-week-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}
.person-week-card {
    flex: 0 0 178px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    cursor: pointer;
    transition: box-shadow .15s, border-color .15s;
}
.person-week-card:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .10); }
.person-week-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, .18); }
.pwc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pwc-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pwc-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.pwc-badge.ok { background: #dcfce7; color: #15803d; }
.pwc-badge.late { background: #fee2e2; color: #b91c1c; }
.pwc-badge.missing { background: #fef3c7; color: #b45309; }
.pwc-badge.none { background: #f1f5f9; color: #94a3b8; }
.pwc-counts { margin-top: 8px; font-size: 12px; color: #64748b; }
.pwc-counts b { font-size: 20px; color: #0f172a; margin-right: 2px; }
.pwc-slash { margin: 0 2px; color: #cbd5e1; }
.pwc-count-label { margin-left: 8px; color: #94a3b8; }
.pwc-expand {
    display: none;
    margin-top: 6px;
    border: 1px solid var(--border);
    background: #f8fafc;
    border-radius: 6px;
    padding: 2px 10px;
    font-size: 11.5px;
    color: #475569;
    cursor: pointer;
}
.pwc-detail { display: none; margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.person-week-card:hover .pwc-detail,
.person-week-card.active .pwc-detail,
.person-week-card.expanded .pwc-detail { display: block; }
.pwc-projects { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pwc-projects li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 11.5px; }
.pwc-p-name { color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwc-p-state { flex: 0 0 auto; color: #64748b; }
.pwc-fill { flex: 0 0 auto; padding: 2px 8px; font-size: 11px; line-height: 1.5; }
.pma-actions { margin-top: 8px; }
.pwc-projects li.submitted .pwc-p-state { color: #15803d; }
.pwc-projects li.unsubmitted .pwc-p-state { color: #b45309; }
.pwc-projects li.late .pwc-p-state { color: #b91c1c; }
.pwc-p-empty { color: #94a3b8; }
.pwc-note { margin-top: 8px; font-size: 11.5px; color: #94a3b8; }
.progress-filter-note {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 10px;
    padding: 8px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 12.5px;
    color: #1e40af;
}
@media (max-width: 768px) {
    .person-week-card { flex: 0 0 160px; }
    .pwc-expand { display: inline-block; }
    /* v1.5.11：手机端参与人多选加大点选面积，不依赖 hover */
    .participant-picker { gap: 10px; }
    .participant-chip {
        min-height: 42px;
        padding: 8px 14px;
        font-size: 14px;
        border-radius: 21px;
        touch-action: manipulation;
    }
    .participant-chip input { width: 18px; height: 18px; }
    .participant-picker-foot { flex-direction: column; align-items: stretch; gap: 6px; }
    .participant-picker-foot .btn { align-self: flex-end; min-height: 38px; }
}

/* ============ v1.5.12：轻提示与提交状态 ============ */
#app-toast-box {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    width: max-content;
    max-width: calc(100vw - 32px);
}
.app-toast {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(30, 41, 59, .94);
    color: #fff;
    font-size: 13.5px;
    line-height: 1.5;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .22);
    animation: appToastIn .2s ease;
    word-break: break-word;
    text-align: center;
}
.app-toast.warn { background: rgba(180, 83, 9, .96); }
.app-toast.out { opacity: 0; transform: translateY(6px); transition: opacity .24s ease, transform .24s ease; }
@keyframes appToastIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.progress-save-state {
    font-size: 12.5px;
    color: #15803d;
    font-weight: 600;
    margin-right: 8px;
    align-self: center;
}

/* ============ v1.5.14 主页团队学习情况（仅主管） ============ */
.team-card-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.team-card-sub {
    font-size: 12.5px;
    color: var(--text-light);
}
.team-table-wrap {
    overflow-x: auto;
}
.team-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.team-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid var(--border);
    color: var(--text-light);
    font-weight: 600;
    white-space: nowrap;
}
.team-sort {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.team-sort:hover { color: var(--primary); }
.team-row {
    cursor: pointer;
    transition: background .15s;
}
.team-row:hover { background: #f8fafc; }
.team-row.expanded { background: #eff6ff; }
.team-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.team-name { font-weight: 600; color: var(--text); }
.team-user { font-size: 11.5px; color: var(--text-light); margin-top: 2px; }
.team-metric {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}
.team-metric b { font-size: 14px; }
.team-metric span { font-size: 11.5px; color: var(--text-light); }
.team-bar {
    height: 5px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    min-width: 78px;
}
.team-bar i {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
}
.team-bar.green i { background: var(--success); }
.team-bar.orange i { background: var(--warning); }
.team-time { font-weight: 600; color: #8b5cf6; white-space: nowrap; }
.team-more {
    margin-top: 12px;
    width: 100%;
    justify-content: center;
}
.team-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-light);
}
.team-detail-row td {
    background: #f8fafc;
    padding: 14px;
}
.team-detail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.team-detail h4 {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text);
}
.team-detail-item {
    font-size: 12.5px;
    color: var(--text);
    padding: 3px 0;
    line-height: 1.5;
}
.team-detail-item.done { color: #15803d; }
.team-detail-empty { font-size: 12.5px; color: var(--text-light); }

@media (max-width: 768px) {
    .team-table thead { display: none; }
    .team-table, .team-table tbody, .team-table tr, .team-table td {
        display: block;
        width: 100%;
    }
    .team-row {
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 10px 12px;
        background: #fff;
    }
    .team-row td {
        border: 0;
        padding: 6px 0;
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
    }
    .team-row td::before {
        content: attr(data-label);
        font-size: 12px;
        color: var(--text-light);
        white-space: nowrap;
    }
    .team-detail-row { display: block; }
    .team-detail-row td {
        display: block;
        border-radius: 12px;
        margin: -4px 0 12px;
    }
    .team-detail { grid-template-columns: 1fr; gap: 12px; }
    .team-bar { min-width: 0; width: 100%; }
}

/* ============ v1.5.15 导出/导入进度 ============ */
.backup-progress {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.backup-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 8px;
}
.backup-progress-head b {
    color: var(--primary);
    font-size: 15px;
}
.backup-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.backup-progress-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    border-radius: 999px;
    transition: width .25s ease;
}

/* ============ v1.5.16 图片查看器（默认适应屏幕，一屏看全） ============ */
body.kp-viewer-lock { overflow: hidden; }

.kp-viewer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #0b1220;
    display: none;
    color: #fff;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.kp-viewer.open { display: block; }

.kp-viewer-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    touch-action: none;
    cursor: default;
}

.kp-viewer-stage.can-pan { cursor: grab; }
.kp-viewer-stage.panning { cursor: grabbing; }

.kp-viewer-img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    max-height: none;
    transform-origin: center center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    background: #fff;
}

.kp-viewer-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    background: linear-gradient(180deg, rgba(2, 6, 23, .78), rgba(2, 6, 23, 0));
    pointer-events: none;
    z-index: 3;
}

.kp-viewer-bar > * { pointer-events: auto; }

.kp-viewer-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #e5e7eb;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kp-viewer-count { font-size: 13px; color: #cbd5e1; }

.kp-viewer-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.kp-viewer-close:hover { background: rgba(255, 255, 255, .26); }

.kp-viewer-tools {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, .82);
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 999px;
    z-index: 3;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    white-space: nowrap;
}

.kp-viewer-tools button {
    flex: 0 0 auto;
    border: none;
    background: rgba(255, 255, 255, .10);
    color: #e5e7eb;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.kp-viewer-tools button:hover { background: rgba(255, 255, 255, .2); }
.kp-viewer-tools button:disabled { opacity: .35; cursor: not-allowed; }
.kp-viewer-tools .kp-key { background: #2563eb; color: #fff; font-weight: 600; }
.kp-viewer-tools .kp-key:hover { background: #1d4ed8; }

.kp-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}

.kp-viewer-nav:hover { background: rgba(255, 255, 255, .28); }
.kp-viewer-nav.prev { left: 18px; }
.kp-viewer-nav.next { right: 18px; }
.kp-viewer-nav[hidden] { display: none; }

.kp-viewer-loading,
.kp-viewer-error {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #cbd5e1;
    z-index: 2;
    text-align: center;
    line-height: 1.8;
}

.kp-viewer-error { color: #fca5a5; max-width: 80vw; }

@media (max-width: 768px) {
    .kp-viewer-nav { display: none; }
    .kp-viewer-tools {
        left: 8px;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        transform: none;
        max-width: none;
        justify-content: flex-start;
        padding: 8px;
        border-radius: 14px;
    }
    .kp-viewer-tools button { padding: 9px 12px; font-size: 13px; }
    .kp-viewer-title { font-size: 13px; }
}

/* ============ v1.5.17 批量上传 ============ */
.batch-card {
    border: 1px solid #bfdbfe;
    background: linear-gradient(180deg, #f8fbff, #fff);
}

.batch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.batch-actions .btn { font-size: 13px; }

.batch-settings {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
}

.batch-skip-note {
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    margin: 8px 0;
    line-height: 1.6;
}

.batch-skip-note:empty { display: none; }

.batch-overall { margin: 10px 0 8px; }

.batch-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.batch-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    border-radius: 999px;
    transition: width .2s ease;
}

.batch-status-text {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

.batch-list {
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    background: #fff;
}

.batch-empty {
    padding: 18px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

.batch-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
}

.batch-item + .batch-item { border-top: 1px dashed #e5e7eb; }

.batch-item-icon {
    font-size: 20px;
    line-height: 1.4;
}

.batch-item-main {
    flex: 1;
    min-width: 0;
}

.batch-item-title {
    font-size: 13px;
    padding: 6px 8px;
}

.batch-item-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.batch-item-file {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-item-state { flex: 0 0 auto; }

.batch-item-bar {
    height: 4px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 5px;
}

.batch-item-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: #3b82f6;
    transition: width .2s ease;
}

.batch-item.success .batch-item-bar i { background: #22c55e; }
.batch-item.failed .batch-item-bar i { background: #ef4444; }
.batch-item.failed .batch-item-state { color: #dc2626; }
.batch-item.success .batch-item-state { color: #16a34a; }
.batch-item.uploading .batch-item-state { color: #2563eb; }

@media (max-width: 768px) {
    .batch-settings { grid-template-columns: 1fr; }
    .batch-actions .btn { flex: 1 1 calc(50% - 8px); }
    .batch-list { max-height: 340px; }
}



