/* ============================================
   英语单词学习 - WeChat 小程序风格样式
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #07C160;
    --primary-dark: #06AD56;
    --primary-light: #E8F8EF;
    --danger: #FA5151;
    --warning: #FFC300;
    --text: #191919;
    --text-secondary: #888;
    --text-light: #B2B2B2;
    --bg: #F5F5F5;
    --bg-white: #FFFFFF;
    --border: #E5E5E5;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --header-height: 48px;
    --tab-height: 56px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-white);
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

/* ---------- Header ---------- */
.header {
    height: var(--header-height);
    background: linear-gradient(135deg, #07C160, #05A050);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(7,193,96,0.3);
}

.header-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ---------- Tab Bar ---------- */
.tab-bar {
    height: 70px;
    background: var(--bg-white);
    border-top: 2px solid var(--border);
    display: flex;
    flex-shrink: 0;
    padding-bottom: var(--safe-bottom);
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    position: relative;
}

.tab-item.active {
    color: var(--primary);
}

.tab-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 3px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.tab-item.active .tab-icon {
    transform: scale(1.15);
}

.tab-label {
    font-size: 12px;
    font-weight: 600;
}

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.page {
    display: none;
    padding: 16px;
    padding-bottom: 24px;
    min-height: 100%;
}

.page.active {
    display: block;
}

/* ---------- Search Bar ---------- */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg);
    border-radius: 8px;
    padding: 0 12px;
    height: 38px;
}

.search-icon {
    font-size: 16px;
    margin-right: 8px;
    opacity: 0.5;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    color: var(--text);
}

.search-input::placeholder {
    color: var(--text-light);
}

/* ---------- Filter Panel ---------- */
.filter-panel {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

/* 筛选面板：来源下拉 / 页码范围行 */
.filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.filter-row label {
    font-size: 13px;
    color: #888;
    flex-shrink: 0;
    width: 32px;
}

.filter-row .input {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    height: auto;
}

.filter-page {
    width: 80px !important;
    flex: none !important;
}

.filter-page-sep {
    color: #888;
    font-size: 13px;
}

/* 词性 + 页码 合并到同一行：压缩间距与标签宽度，页码输入变窄，给可手工录入的词性输入框留出空间 */
.filter-row-combined {
    gap: 6px;
}

.filter-row-combined label {
    width: 28px;
}

.filter-pos {
    min-width: 60px;
}

.filter-row-combined .filter-page {
    width: 58px !important;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.filter-tag {
    padding: 4px 12px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.filter-tag.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* ---------- Word List ---------- */
.word-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.word-card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.15s;
    border: 1px solid var(--border);
    /* 长列表滚动优化：屏幕外的卡片跳过布局与绘制，滚动更顺滑（占位高度用 auto 记忆真实高度） */
    content-visibility: auto;
    contain-intrinsic-size: auto 88px;
}

.word-card:active {
    transform: scale(0.98);
    background: #F9F9F9;
}

.word-card-index {
    flex-shrink: 0;
    width: 26px;
    margin-right: 6px;
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-light);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.word-card-main {
    flex: 1;
    min-width: 0;
}

.word-card-english {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.word-card-phonetic {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.word-card-chinese {
    font-size: 14px;
    color: var(--text-secondary);
}

.word-card-meta {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.word-card-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.word-card-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.word-card-btn:active {
    background: #E0E0E0;
}

.word-card-btn.danger {
    color: var(--danger);
}

.word-card-btn.bookmark-btn {
    color: #ccc;
    font-size: 18px;
    transition: all 0.3s;
}

.word-card-btn.bookmark-btn.active {
    color: #FFB800;
    transform: scale(1.1);
}

/* ---------- Bookmark Bar (书签定位栏) ---------- */
.bookmark-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #FFF9E6;
    border-bottom: 1px solid #FFE1A0;
    overflow: hidden;
}

.bookmark-bar-label {
    font-size: 16px;
    flex-shrink: 0;
}

.bookmark-bar-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
    padding-bottom: 2px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.bookmark-bar-list::-webkit-scrollbar {
    display: none;
}

.bookmark-tag {
    display: inline-block;
    padding: 4px 12px;
    background: white;
    border: 1px solid #FFB800;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.bookmark-tag:active {
    background: #FFB800;
    color: white;
    transform: scale(0.95);
}

/* ---------- Scroll Highlight ---------- */
.word-card-highlight {
    animation: bookmarkHighlight 2s ease;
}

@keyframes bookmarkHighlight {
    0% { background: #FFF9E6; box-shadow: 0 0 0 3px rgba(255,184,0,0.5); }
    50% { background: #FFFDF5; box-shadow: 0 0 0 3px rgba(255,184,0,0.2); }
    100% { background: transparent; box-shadow: 0 0 0 0 rgba(255,184,0,0); }
}

/* ---------- Badge ---------- */
.badge {
    display: inline-block;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ---------- Wrong Book ---------- */
.wrong-book-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wrong-book-card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    border-left: 3px solid var(--danger);
}

.wrong-book-main {
    flex: 1;
    min-width: 0;
}

.wrong-book-word {
    font-size: 15px;
    margin-bottom: 2px;
}

.wrong-book-phonetic {
    color: var(--text-secondary);
    font-size: 12px;
    margin-left: 6px;
}

.wrong-book-chinese {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.wrong-book-meta {
    font-size: 11px;
    color: var(--text-light);
}

.wrong-book-hint {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-light);
    margin-left: 6px;
}

.wrong-book-actions {
    margin-left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 错题集卡片：修改词库按钮（修正录入错误造成的误判），胶囊形文字按钮 */
.wrong-book-edit {
    width: auto;
    border-radius: 14px;
    padding: 0 10px;
    font-size: 12px;
    color: var(--primary-dark);
    white-space: nowrap;
}

/* ---------- btn-warning ---------- */
.btn-warning {
    background: #FFB800;
    color: white;
}

.btn-warning:active {
    background: #E6A500;
}

/* ---------- Empty State ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state.small {
    padding: 30px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-text {
    font-size: 15px;
}

/* ---------- FAB ---------- */
.fab {
    position: fixed;
    bottom: calc(24px + var(--safe-bottom));
    right: calc(50% - 220px);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #07C160, #06AD56);
    color: white;
    border: none;
    font-size: 32px;
    /* flex 居中：line-height 方案会让 + 字形偏离中心 */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(7,193,96,0.45);
    z-index: 50;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

.fab:active {
    transform: scale(0.85);
    box-shadow: 0 3px 10px rgba(7,193,96,0.3);
}

@media (min-width: 480px) {
    .fab {
        right: calc(50% - 220px);
    }
}

@media (max-width: 480px) {
    .fab {
        right: 16px;
    }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 10px 20px;
    font-family: inherit;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

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

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

.btn-default {
    background: var(--bg);
    color: var(--text);
}

.btn-default:active {
    background: #E5E5E5;
}

.btn-default.active {
    background: #FFF3D6;
    color: #E6A500;
    border: 1px solid #FFB800;
}

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

.btn-block {
    width: 100%;
    display: flex;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-xs {
    padding: 3px 10px;
    font-size: 12px;
}

.btn-link {
    background: transparent;
    color: var(--primary);
    padding: 4px 8px;
}

.btn-speak {
    font-size: 18px;
    margin-top: 4px;
}

.btn-voice {
    padding: 6px 12px;
    font-size: 18px;
    flex-shrink: 0;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

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

.input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    background: var(--bg-white);
    color: var(--text);
}

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

.input-half {
    width: calc(50% - 20px);
}

.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-sep {
    color: var(--text-secondary);
    flex-shrink: 0;
}

textarea.input {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* 中文释义框：默认 3 行，内容超出给滚动条（禁止手动拉伸，配合行级即时保存） */
#inputChinese {
    height: auto;
    min-height: 0;
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
}

/* 多行中文框内的麦克风按钮靠上对齐，避免遮挡首行文字 */
.voice-wrap-cn .voice-mic {
    top: 10px;
    transform: none;
}

.voice-wrap-cn .voice-mic.recording {
    animation: voicePulseTop 1s ease-in-out infinite;
}

@keyframes voicePulseTop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* ---------- Radio Group ---------- */
.radio-group {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.radio-item {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    cursor: pointer;
    background: var(--bg-white);
    transition: all 0.2s;
    border-right: 1px solid var(--border);
}

.radio-item:last-child {
    border-right: none;
}

.radio-item input {
    display: none;
}

.radio-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s;
}

/* 录入/编辑弹窗层级高于其它 overlay：日历错题清单编辑时清单弹窗(#modalWordDetail)保持打开在下层，
   编辑弹窗须盖在其上（DOM 中 #modalAddWord 在前，同 z-index 会被后出现的清单弹窗遮挡）。
   toast(999)、启动遮罩(500) 仍更高，不受影响。 */
#modalAddWord {
    z-index: 210;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.modal {
    background: var(--bg-white);
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: zoomIn 0.2s;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:active {
    background: var(--bg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* ---------- Add Word Tabs ---------- */
.add-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.add-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
    transition: color 0.2s;
}

.add-tab.active {
    color: var(--primary);
    font-weight: 500;
}

.add-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.add-panel {
    display: none;
}

.add-panel.active {
    display: block;
}

/* ---------- 添加单词弹窗：紧凑 + 两列布局，尽量不出现滚动条（overflow-y:auto 仍作兜底） ---------- */
#modalAddWord .modal {
    max-height: 90vh;
}

#modalAddWord .modal-header {
    padding: 12px 16px;
}

#modalAddWord .modal-body {
    padding: 14px 16px;
}

#modalAddWord .add-tabs {
    margin-bottom: 12px;
}

#modalAddWord .add-tab {
    padding: 8px 0;
}

#modalAddWord .form-group {
    margin-bottom: 10px;
}

#modalAddWord .form-group label {
    font-size: 13px;
    margin-bottom: 4px;
}

#modalAddWord .input {
    height: 38px;
    font-size: 14px;
}

/* 中文释义多行框：在默认基础上再加高 2 行（min-height 64→106px，约 4~5 行），便于查看/输入较长释义 */
#panelManual textarea.input {
    min-height: 106px;
    padding: 8px 12px;
}

/* 音标|词性、来源|页码 两列并排，压缩纵向高度 */
.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}

/* 页码固定窄列：容纳 4 位数字 + 原生 ±1 步进按钮 + 麦克风；来源字数多，用 flex:1 占满剩余宽度 */
.form-row .form-group.fg-page {
    flex: 0 0 120px;
}

/* 页码保留浏览器原生上下 ±1 步进按钮（用户需要，不隐藏 spinner）：
   .voice-wrap .input 的 padding-right:44px 已让出麦克风位置，步进按钮落在「数字」与「麦克风」之间，互不遮挡 */

/* ---------- OCR Upload ---------- */
.ocr-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s;
}

.ocr-upload-area:hover {
    border-color: var(--primary);
}

.ocr-upload-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.ocr-upload-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.ocr-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ocr-preview {
    margin-bottom: 16px;
}

.ocr-preview img {
    width: 100%;
    border-radius: var(--radius-sm);
    max-height: 200px;
    object-fit: contain;
    background: #000;
}

.ocr-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.ocr-textarea {
    margin-bottom: 12px;
}

/* ---------- Spinner ---------- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Test Home ---------- */
.test-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* 词库筛选汇总：复用 stat-card，数字略小以容纳页码范围，间距贴合列表 */
.vocab-stats {
    margin: 2px 0 12px;
}

.vocab-stats .stat-num {
    font-size: 22px;
}

.stat-card {
    flex: 1;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.test-config-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.config-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* ---------- History ---------- */
.history-section {
    margin-top: 8px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-info {
    flex: 1;
}

.history-date {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.history-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.history-score {
    font-size: 20px;
    font-weight: 700;
}

.history-score.good {
    color: var(--primary);
}

.history-score.medium {
    color: var(--warning);
}

.history-score.bad {
    color: var(--danger);
}

/* ---------- 考核记录列表：编号 + 单选高亮；详情在列表下方案区展示（列表不隐藏） ---------- */
.day-record-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.record-card {
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

/* 圆形序号（考核记录列表 / 错题清单 / 答题详情通用） */
.record-index {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.record-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.record-card.selected .record-index {
    background: var(--primary);
    color: #fff;
}

/* 答题详情卡加序号后：内容区占满剩余宽度，右侧对错状态靠右 */
.result-wrong-card .rw-content {
    flex: 1;
    min-width: 0;
}

/* ---------- Exam ---------- */
.exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.exam-progress {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.exam-timer {
    font-size: 14px;
    color: var(--warning);
    font-weight: 500;
}

.exam-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 32px 20px;
    text-align: center;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.exam-question-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.exam-word {
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-all;
}

.exam-phonetic {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.answer-area {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.answer-input-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.answer-input {
    flex: 1;
}

.voice-status {
    text-align: center;
    padding: 8px;
    color: var(--primary);
    font-size: 14px;
    animation: pulse 1.5s infinite;
    margin-bottom: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ---------- Exam Feedback ---------- */
.exam-feedback {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.feedback-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.feedback-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feedback-answer {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ---------- Test Result ---------- */
.result-header {
    text-align: center;
    padding: 32px 0;
}

.result-score {
    font-size: 64px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.result-label {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.result-details {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.result-item:last-child {
    border-bottom: none;
}

.text-success { color: var(--primary); font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 600; }

.result-wrong-list {
    margin-bottom: 20px;
}

.result-wrong-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.result-wrong-card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 999;
    white-space: nowrap;
    animation: toastIn 0.3s;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- Word Detail ---------- */
.detail-field {
    margin-bottom: 16px;
}

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.detail-value {
    font-size: 16px;
    color: var(--text);
}

.detail-actions {
    display: grid;
    /* minmax(0,1fr) 让列可收缩到 0、按钮文字自动换行，从根上杜绝横向溢出/滚动条 */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
    padding-right: 6px;   /* 右侧留一点呼吸空间，不顶边 */
}

.detail-actions .btn {
    min-width: 0;         /* 允许收缩，防止窄屏溢出 */
}

/* 窄屏改两列，避免四个按钮挤在一行导致文字过度换行 */
@media (max-width: 520px) {
    .detail-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- Scrollbar ---------- */
/* 长列表（词库管理）需要可拖动的滚动条快速定位；内容不溢出的页面不显示，故首页/考核不受影响 */
.main-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.28) transparent;
}
.main-content::-webkit-scrollbar {
    width: 8px;
}
.main-content::-webkit-scrollbar-track {
    background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.28);
    border-radius: 4px;
}
.main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.45);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .header {
        height: 44px;
    }
    
    .header-title {
        font-size: 16px;
    }

    .header-user {
        right: 46px;
        max-width: 28vw;
        font-size: 11px;
        padding: 2px 8px;
    }
    
    .page {
        padding: 12px;
    }
    
    .exam-word {
        font-size: 28px;
    }
    
    .result-score {
        font-size: 56px;
    }
}

/* ============================================
   默写纸（仿纸质单词表）
   ============================================ */

/* 答题时放宽页面，模拟纸张横向双栏 */
body.wide {
    max-width: 960px;
}

.sheet-title-bar {
    text-align: center;
    padding: 10px 12px 12px;
    border: 2px solid var(--text);
    border-bottom: none;
    background: var(--bg-white);
}

.sheet-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
}

.sheet-meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 草稿自动保存状态提示（已答 n/N · 已保存 HH:MM:SS） */
.sheet-save-tip {
    margin-top: 4px;
    font-size: 12px;
    color: var(--primary);
}

.sheet-save-tip.saving {
    color: var(--text-secondary);
}

/* 考核记录列表：未提交草稿标识与继续按钮 */
.record-draft-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    font-size: 11px;
    border-radius: 10px;
    color: #fff;
    background: var(--warning);
    vertical-align: middle;
}

.btn-resume {
    flex-shrink: 0;
    margin-left: 8px;
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    cursor: pointer;
}

.sheet-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: var(--bg-white);
    padding: 10px;
    border: 2px solid var(--text);
}

@media (max-width: 640px) {
    .sheet-wrap {
        grid-template-columns: 1fr;
    }
}

.sheet-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--bg-white);
}

.sheet-table td {
    border: 1px solid #999;
    padding: 6px 6px;
    font-size: 13px;
    vertical-align: middle;
    word-break: break-all;
}

.sheet-num {
    width: 34px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.sheet-cn {
    width: 52%;
    line-height: 1.5;
}

.sheet-en {
    font-weight: 600;
}

.sheet-phonetic {
    font-weight: 400;
    font-size: 11px;
    color: var(--text-secondary);
}

.sheet-pos {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-secondary);
}

.sheet-fill {
    padding: 2px 4px;
    position: relative;
}

.sheet-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    padding: 6px 2px;
    color: var(--text);
    user-select: text;
}

.sheet-input:focus {
    background: #FFFBE8;
}

.sheet-input:disabled {
    color: var(--text);
}

/* 答题卡作答格麦克风：小尺寸，不挤占仿纸质布局 */
.sheet-fill .sheet-input {
    padding-right: 24px;
}

.sheet-mic {
    right: 2px;
    width: 22px;
    height: 22px;
    font-size: 13px;
}

.sheet-mic:disabled {
    opacity: 0.25;
    cursor: default;
}

/* 判分标注 */
.cell-correct {
    background: var(--primary-light);
}

.cell-wrong {
    background: #FDECEC;
}

.input-correct {
    color: var(--primary-dark);
    font-weight: 600;
}

.input-wrong {
    color: var(--danger);
    text-decoration: line-through;
}

.num-correct {
    color: var(--primary);
    font-weight: 700;
}

.num-wrong {
    color: var(--danger);
    font-weight: 700;
}

.sheet-answer {
    font-size: 12px;
    color: var(--primary-dark);
    font-weight: 600;
    padding: 0 2px 4px;
}

.sheet-footer {
    margin-top: 14px;
}

.sheet-result {
    margin-top: 16px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    text-align: center;
}

.sheet-score-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sheet-score {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.sheet-score::after {
    content: ' 分';
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

.sheet-score-detail {
    font-size: 13px;
    color: var(--text-secondary);
}

.sheet-result-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* ============================================
   拍照导入（多图 OCR）
   ============================================ */

.ocr-img-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.ocr-img-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 8px;
}

.ocr-img-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #ddd;
}

.ocr-img-info {
    flex: 1;
    min-width: 0;
}

.ocr-img-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ocr-img-status {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.ocr-img-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.ocr-img-page label {
    font-size: 11px;
    color: var(--text-secondary);
}

.ocr-img-page .input {
    width: 64px;
    padding: 4px 6px;
    font-size: 13px;
    text-align: center;
}

.ocr-preview-wrap {
    margin-top: 12px;
}

.ocr-preview-head {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.ocr-preview-head strong {
    color: var(--primary-dark);
}

.ocr-preview-table {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    user-select: text;
}

.ocr-preview-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-bottom: 1px solid var(--border);
}

.ocr-preview-row:last-child {
    border-bottom: none;
}

.ocr-preview-head-row {
    background: var(--bg);
    font-size: 12px;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
}

.ocr-preview-row .col-page {
    width: 44px;
    flex-shrink: 0;
}

.ocr-preview-row .col-pos {
    width: 48px;
    flex-shrink: 0;
}

.ocr-preview-row .col-cn {
    flex: 1;
    min-width: 0;
}

.ocr-preview-row .col-en {
    flex: 1;
    min-width: 0;
}

.ocr-preview-row input {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 4px;
    font-size: 13px;
    background: transparent;
    outline: none;
    min-width: 0;
}

.ocr-preview-row input:focus {
    border-color: var(--primary);
    background: var(--bg-white);
}

.ocr-preview-row .word-card-btn {
    flex-shrink: 0;
}

/* 词性标签 */
.pos-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 400;
    color: var(--primary-dark);
    background: var(--primary-light);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ============================================
   登录 / 注册页
   ============================================ */

.login-page {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: linear-gradient(160deg, #07C160, #05A050 60%, #04833F);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: var(--bg-white);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    text-align: center;
}

.login-logo {
    font-size: 44px;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: 2px;
}

.login-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 6px 0 18px;
}

.login-tabs {
    display: flex;
    background: var(--bg);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 16px;
}

.login-tab {
    flex: 1;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
}

.login-tab.active {
    background: var(--bg-white);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.login-input {
    margin-bottom: 12px;
    user-select: text;
}

/* 密码框 + 小眼睛 */
.pwd-wrap {
    position: relative;
    margin-bottom: 12px;
}

.pwd-wrap .login-input {
    margin-bottom: 0;
    padding-right: 42px;
}

.pwd-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    color: var(--text-secondary);
    opacity: 0.55;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwd-eye.active {
    opacity: 1;
    color: var(--primary);
}

/* 语音输入（手动录入弹窗） */
.voice-wrap {
    position: relative;
}

.voice-wrap .input {
    padding-right: 44px;
}

.voice-mic {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    opacity: 0.55;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-mic:hover {
    opacity: 1;
}

.voice-mic.recording {
    opacity: 1;
    color: var(--danger);
    animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.25); }
}

.login-error {
    margin-top: 10px;
    font-size: 13px;
    color: var(--danger);
}

/* 登录卡底部版本标识（小灰字，居中） */
.login-version {
    margin-top: 14px;
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    letter-spacing: 1px;
}

/* ============================================
   头部返回 / ...菜单
   ============================================ */

.header-btn {
    position: absolute;
    top: 0;
    height: 100%;
    width: 44px;
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.header-btn.left {
    left: 4px;
}

.header-btn.right {
    right: 4px;
    font-size: 20px;
    font-weight: 700;
}

/* 右上角当前登录账号徽章（登录前 display:none，由 app.js 填充用户名并显示） */
.header-user {
    position: absolute;
    top: 50%;
    right: 48px;                 /* 让出 ⋯ 菜单按钮宽度（⋯ 常驻所有页面） */
    transform: translateY(-50%);
    display: none;
    max-width: 32vw;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 10px;
    z-index: 200;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    min-width: 130px;
    overflow: hidden;
}

.dropdown-item {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

.dropdown-item:active {
    background: var(--bg);
}

.dropdown-item + .dropdown-item {
    border-top: 1px solid var(--border);
}

/* ⋯ 菜单底部版本标识（小灰字，不可点击） */
.dropdown-version {
    padding: 8px 16px;
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    border-top: 1px solid var(--border);
    cursor: default;
}

/* 修改密码弹窗：字段小标签 */
.cp-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 12px 0 4px;
}

.cp-label:first-child {
    margin-top: 0;
}

/* 考核数量行：数字输入 + “全部”勾选 */
.count-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.count-row .input {
    flex: 1;
}

.count-row .input:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.count-all {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.count-all input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ============================================
   首页打卡日历
   ============================================ */

.calendar-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
}

.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cal-nav {
    width: 34px;
    height: 34px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
}

.calendar-title {
    font-size: 16px;
    font-weight: 700;
}

.calendar-summary {
    margin: 8px 2px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.calendar-summary strong {
    color: var(--primary-dark);
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    position: relative;
    min-height: 58px;
    border-radius: 8px;
    background: var(--bg);
    padding: 4px 2px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.cal-empty {
    background: transparent;
}

.cal-day.today {
    outline: 2px solid var(--primary);
}

.cal-day.has-record {
    cursor: pointer;
}

.cal-date {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1;
}

.cal-score {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.cal-score.good { color: var(--primary); }
.cal-score.medium { color: var(--warning); }
.cal-score.bad { color: var(--danger); }

.cal-checkin {
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    border-radius: 8px;
    padding: 2px 8px;
    cursor: pointer;
    line-height: 1.4;
}

.cal-checkin:active {
    background: var(--primary-dark);
}

.cal-miss {
    font-size: 10px;
    color: var(--text-light);
}

.cal-flower {
    position: absolute;
    top: 0;
    right: 1px;
    font-size: 11px;
    line-height: 1;
    pointer-events: none;
}

/* 日历错题标签：截止当天未清 0 的错题累计数（仅有错题的日子显示，点击看清单） */
.cal-wrong {
    font-size: 9px;
    color: var(--danger);
    background: #FFECEC;
    border-radius: 6px;
    padding: 0 5px;
    line-height: 1.5;
    margin-top: 1px;
    cursor: pointer;
}

.cal-wrong:active {
    background: #FFD9D9;
}

/* 日历草稿标签：当天有未提交的考核草稿（点击当天格子可「继续作答」） */
.cal-draft {
    font-size: 9px;
    color: #fff;
    background: var(--warning);
    border-radius: 6px;
    padding: 0 5px;
    line-height: 1.5;
    margin-top: 1px;
}

.calendar-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.calendar-legend .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
}

.calendar-legend .dot.good { background: var(--primary); }
.calendar-legend .dot.medium { background: var(--warning); }
.calendar-legend .dot.bad { background: var(--danger); }

.calendar-legend .legend-tip {
    color: var(--text-light);
}

/* ============================================
   管理页（仅管理员）—— V2.0
   ============================================ */
.admin-summary {
    margin-bottom: 16px;
}

.admin-acct-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-acct-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    cursor: pointer;
}

.admin-acct-card:active {
    background: var(--bg);
}

.admin-acct-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-acct-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    word-break: break-all;
}

.admin-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 400;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 4px;
    vertical-align: middle;
}

.admin-acct-date {
    font-size: 11px;
    color: var(--text-light);
    white-space: nowrap;
}

.admin-acct-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.admin-acct-metrics b {
    color: var(--text);
    font-weight: 700;
}

.admin-acct-foot {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-light);
}

/* 账号明细弹窗 */
.admin-detail-stats {
    margin-bottom: 14px;
}

.admin-detail-stats .stat-num {
    font-size: 22px;
}

.admin-detail-sec {
    margin-top: 14px;
}

.admin-detail-h {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.admin-src-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-src-chip {
    padding: 3px 10px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg);
    border-radius: 12px;
}

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

.admin-test-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid var(--border);
}

.admin-test-row:last-child {
    border-bottom: none;
}

.admin-test-date {
    color: var(--text-secondary);
    white-space: nowrap;
}

.admin-test-type {
    color: var(--text);
}

.admin-test-score {
    margin-left: auto;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}