:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.nav nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.brand {
    font-size: 20px;
    color: var(--primary) !important;
}

.main-content {
    padding: 28px 0 48px;
}

.hero,
.card {
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.hero {
    padding: 36px;
    margin-bottom: 22px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 28%), #ffffff;
}

.badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-head h1,
.auth-card h1 {
    margin: 16px 0 12px;
    font-size: 34px;
    line-height: 1.2;
}

.hero p,
.page-head p,
.card p,
.card li,
.card span,
.card label {
    color: var(--muted);
    line-height: 1.7;
}

.hero-actions,
.submit-bar,
.inline-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.btn-hint {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    font-size: 13px;
    color: #6366f1;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-hint:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
}

.hint-answer {
    display: none;
    margin-top: 6px;
    padding: 8px 12px;
    font-size: 14px;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

.hint-answer.show {
    display: block;
}

.question-card.revealed {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.revealed-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    color: #92400e;
    background: #fde68a;
    border-radius: 4px;
    margin-left: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--primary);
    border-color: #bfdbfe;
}

.stats-grid,
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
}

.secondary-grid {
    grid-template-columns: 1fr 3fr;
}

.stat-card,
.score-card {
    padding: 24px;
    text-align: center;
}

.stat-card strong,
.score-card strong,
.stat-note-card strong {
    display: block;
    font-size: 34px;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-note-card {
    text-align: left;
}

.stat-note-card strong {
    font-size: 24px;
}

.section-card,
.toolbar,
.question-card,
.review-card,
.result-card,
.admin-login-card,
.empty-card {
    padding: 24px;
}

.feature-list,
.review-options {
    margin: 0;
    padding-left: 18px;
}

.page-head {
    margin-bottom: 18px;
}

.filter-form,
.admin-form,
.auth-form {
    display: flex;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-form label,
.admin-form label,
.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    flex: 1;
}

select,
textarea,
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    font: inherit;
}

.answer-input {
    max-width: 320px;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-align: center;
}

/* 题目配图 */
.question-image-wrapper {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    max-width: 100%;
}

.question-image {
    display: block;
    width: 100%;
    height: auto;
}

/* 阅读理解文章 */
.reading-passage {
    padding: 16px;
    margin-bottom: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    line-height: 1.9;
    font-size: 0.95rem;
    white-space: pre-line;
    max-height: 400px;
    overflow-y: auto;
}

/* 选词填空 — 1a 模板：词库顶部 + 题干下划线空 + 填入区 */
.word-bank-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.word-tile {
    padding: 5px 16px;
    font-size: 0.9rem;
    background: #fff;
    color: #1e293b;
    border: 1.5px solid #7dd3fc;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.word-tile:hover {
    background: #e0f2fe;
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.word-tile:active {
    background: #bae6fd;
    transform: translateY(0);
}

.word-tile-static {
    padding: 5px 16px;
    font-size: 0.9rem;
    background: #fff;
    color: #1e293b;
    border: 1.5px solid #7dd3fc;
    border-radius: 20px;
    user-select: none;
}

.word-bank-stem {
    font-size: 1.02rem;
    line-height: 2;
    margin-bottom: 14px;
    color: #334155;
}

.word-bank-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.wb-input-prefix {
    font-size: 0.9rem;
    color: #64748b;
    white-space: nowrap;
}

.word-bank-input {
    flex: 1;
    max-width: 280px;
    padding: 8px 14px;
    font-size: 1rem;
    border: 2px solid #bae6fd;
    border-radius: 8px;
    outline: none;
    background: #f8fafc;
    transition: border-color 0.15s ease;
}

.word-bank-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}

.question-list,
.result-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.compact-list {
    gap: 12px;
}

.inner-card {
    box-shadow: none;
    border-radius: 16px;
}

.question-meta {
    font-weight: 700;
    line-height: 1.7;
    margin-bottom: 14px;
}

.multi-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #f59e0b;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.option-list {
    display: grid;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.result-card {
    padding: 24px;
}

.result-header {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.result-header .result-index {
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.result-header .result-question {
    font-weight: 700;
    color: var(--text);
    line-height: 1.7;
}

.result-options {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-option {
    position: relative;
    padding: 10px 14px 10px 30px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    line-height: 1.6;
}

.result-option::before {
    content: "•";
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 12px;
}

.result-option strong {
    color: var(--text);
}

.result-option.opt-correct {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.result-option.opt-correct::before {
    content: "✓";
    color: #16a34a;
    font-size: 14px;
    font-weight: 700;
}

.result-option.opt-wrong {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.result-option.opt-wrong::before {
    content: "✗";
    color: #dc2626;
    font-size: 14px;
    font-weight: 700;
}

.result-option.opt-missed {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.result-option.opt-missed::before {
    content: "!";
    color: #d97706;
    font-size: 14px;
    font-weight: 700;
}

.result-answer {
    color: #475569;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.7;
}

.result-answer strong {
    color: #334155;
}

.result-analysis {
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.result-analysis strong {
    color: #475569;
}

.result-status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

.result-status.correct {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.result-status.wrong {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.result-status.revealed {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.score-detail {
    margin-left: 8px;
    font-size: 12px;
    color: #6366f1;
    font-weight: 600;
}

/* AI 审判区域 */
.ai-review-area {
    margin: 12px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.btn-ai-review {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.btn-ai-review:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-ai-review:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-report {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    margin-left: 8px;
}

.btn-report:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.report-form {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.report-form .form-group {
    margin-bottom: 12px;
}

.report-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #334155;
}

.report-form select,
.report-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.report-form .form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* 上报管理页面样式 */
.report-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-item {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.report-item.resolved {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.report-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-resolved {
    background: #d1fae5;
    color: #065f46;
}

.report-time {
    font-size: 12px;
    color: #64748b;
}

.report-content {
    margin-bottom: 12px;
}

.report-info {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.report-question {
    margin-bottom: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    font-size: 14px;
}

.report-question p {
    margin: 4px 0 0 0;
}

.report-description {
    padding: 8px;
    background: white;
    border-radius: 6px;
    font-size: 14px;
}

.report-description p {
    margin: 4px 0 0 0;
}

.report-resolved {
    margin-top: 8px;
    font-size: 13px;
    color: #059669;
}

.report-actions {
    display: flex;
    gap: 8px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.page-actions {
    margin-top: 20px;
    text-align: center;
}

.ai-review-result {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.ai-loading {
    color: #667eea;
    font-size: 14px;
    text-align: center;
    padding: 8px;
}

.ai-error {
    color: #dc2626;
    font-size: 14px;
    padding: 8px;
}

.ai-content {
    font-size: 14px;
    line-height: 1.8;
    color: #334155;
}

.ai-content strong {
    color: #1e293b;
    font-weight: 700;
}

/* AI 协助处理（管理员上报管理页） */
.btn-ai-fix {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-ai-fix:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-ai-fix:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.ai-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ai-fix-result {
    margin-top: 12px;
}

.ai-fix-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
}

.ai-fix-card.ai-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.ai-fix-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
}

.ai-diagnosis {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 12px;
}

.badge.ai-valid {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.ai-invalid {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.ai-fix-suggestion {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 14px;
    margin-top: 8px;
}

.ai-fix-suggestion h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #1d4ed8;
}

.fix-field {
    margin-bottom: 10px;
}

.fix-field strong {
    display: inline-block;
    min-width: 70px;
    color: #475569;
    font-size: 13px;
    vertical-align: top;
}

.fix-field pre {
    display: inline-block;
    margin: 4px 0 0 0;
    padding: 6px 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
    max-width: 100%;
}

.fix-field code {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1d4ed8;
}

.fix-options {
    display: inline-block;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.8;
    color: #334155;
}

.btn-apply-fix {
    display: inline-block;
    margin-top: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-apply-fix:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

/* 编辑题目表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.option-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-row label {
    min-width: 30px;
    font-weight: 600;
    color: #475569;
}

.option-row input {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.ai-highlight {
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 4px;
    color: #92400e;
    font-weight: 600;
}

/* ── 填空题红色下划线占位符 ── */
span.blank {
    display: inline-block;
    min-width: 80px;
    padding: 0 4px;
    border-bottom: 2px dashed #ef4444;
    color: #ef4444;
    font-weight: 600;
    text-align: center;
    margin: 0 2px;
    vertical-align: -1px;
}

/* ── 填空徽章（橙色，与多选徽章风格一致）── */
.fill-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    color: #d97706;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ── 简答 / 综合 / 判断徽章 ── */
.sa-badge, .cs-badge, .j-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    border-radius: 12px;
    margin-left: 4px;
    vertical-align: middle;
}

.sa-badge {
    color: #7c3aed;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
}

.cs-badge {
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.j-badge {
    color: #4f46e5;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
}

.wb-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    color: #0891b2;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    border-radius: 12px;
    margin-left: 4px;
    vertical-align: middle;
}

.tr-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    color: #0d9488;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    margin-left: 4px;
    vertical-align: middle;
}

.es-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    margin-left: 4px;
    vertical-align: middle;
}

.rd-badge {
    display: inline-block;
    padding: 1px 8px;
    font-size: 12px;
    color: #9333ea;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 12px;
    margin-left: 4px;
    vertical-align: middle;
}

.flash-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.flash-item {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 600;
}

.flash-success {
    color: var(--success);
    border-color: rgba(22, 163, 74, 0.2);
    background: rgba(220, 252, 231, 0.8);
}

.flash-warning {
    color: var(--warning);
    border-color: rgba(217, 119, 6, 0.2);
    background: rgba(255, 247, 237, 0.9);
}

.flash-error {
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(254, 242, 242, 0.95);
}

.user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.user-row:last-child {
    border-bottom: 0;
}

.user-row.compact {
    align-items: center;
}

.user-row.disabled-user {
    opacity: 0.55;
    background: #f1f5f9;
}

.user-row .status.bad {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #fee2e2;
    color: #dc2626;
    margin-left: 6px;
}

.bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.bank-card {
    padding: 18px 20px;
    text-decoration: none;
    color: var(--text);
    border-radius: 16px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bank-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.12);
}

.bank-card-wrap {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.bank-card-wrap .bank-card {
    flex: 1;
    min-width: 0;
}

.bank-card-wrap.disabled .bank-card {
    opacity: 0.55;
    background: #f1f5f9;
}

.bank-card strong {
    display: block;
    font-size: 18px;
    color: var(--text);
    margin-bottom: 6px;
}

.bank-card span {
    color: var(--muted);
    font-size: 14px;
}

.disabled-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    color: #991b1b;
    background: #fee2e2;
    border-radius: 4px;
    margin-left: 6px;
}

.admin-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    color: #6d28d9;
    background: #ede9fe;
    border-radius: 4px;
    margin-left: 6px;
}

.bank-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 8px;
    white-space: nowrap;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
    border: none;
}

.btn-outline {
    background: #fff;
    color: #6366f1;
    border: 1px solid #6366f1;
}none;
    cursor: pointer;
    font-weight: 600;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-danger {
    background: #fff;
    color: var(--danger);
    border: 1px solid var(--danger);
    cursor: pointer;
    font-weight: 600;
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.bank-delete-form {
    flex-shrink: 0;
    margin-top: 10px;
}

.btn-delete {
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--danger);
    background: #fff;
    color: var(--danger);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.btn-delete:hover {
    background: var(--danger);
    color: #fff;
}

.auth-card {
    max-width: 720px;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .stats-grid,
    .dashboard-grid,
    .secondary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav,
    .admin-form,
    .filter-form,
    .hero-actions,
    .submit-bar,
    .inline-actions,
    .auth-form {
        flex-direction: column;
        align-items: stretch;
    }

    .hero,
    .section-card,
    .toolbar,
    .question-card,
    .review-card,
    .result-card,
    .admin-login-card {
        padding: 18px;
    }

    .hero h1,
    .page-head h1,
    .auth-card h1 {
        font-size: 28px;
    }

    .user-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---- 公告 ---- */
.announce-section {
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
}

.announce-entry {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.announce-entry:last-child {
    border-bottom: none;
}

.announce-entry strong {
    color: var(--accent-dark);
    font-size: 16px;
}

.announce-entry p {
    margin: 4px 0;
    color: var(--text);
    white-space: pre-line;
}

.announce-entry small {
    color: var(--text-muted);
}

/* 公告管理列表 */
.announce-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.announce-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.announce-item.disabled {
    opacity: 0.5;
    background: #f5f5f5;
}

.announce-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.announce-header strong {
    font-size: 16px;
}

.announce-header small {
    color: var(--text-muted);
}

.announce-content {
    color: var(--text);
    margin: 8px 0 12px;
    white-space: pre-line;
}

.announce-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.edit-form {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: 6px;
}

/* ---- 刷题统计 ---- */
.stats-table-wrap {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stats-table th {
    background: var(--bg);
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    white-space: nowrap;
}

.stats-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.stats-table tr:hover td {
    background: #f8f9ff;
}

.stats-table td.correct {
    color: #16a34a;
    font-weight: 600;
}

.stats-table td.wrong {
    color: #dc2626;
    font-weight: 600;
}

.progress-bar-wrap {
    min-width: 100px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    background: var(--accent);
    color: #fff;
    text-align: center;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 4px;
    white-space: nowrap;
}
