/* ============================================
   考核系统 — 简约高级设计系统
   ============================================ */

:root {
    --bg: #edf1f8;
    --bg-subtle: #f6f8fc;
    --surface: #ffffff;
    --surface-hover: #f8fafd;

    --text: #1a2942;
    --text-secondary: #5a6b82;
    --text-muted: #94a3b8;

    --border: #d8e2ef;
    --border-light: #e8eef6;

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eff6ff;
    --accent-glow: rgba(37, 99, 235, 0.12);

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #60a5fa;
    --primary-soft: #eff6ff;
    --primary-deep: #1e3a8a;

    --brand-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    --hero-gradient: linear-gradient(145deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);

    --success: #059669;
    --success-soft: #ecfdf5;
    --warning: #d97706;
    --warning-soft: #fffbeb;
    --danger: #dc2626;
    --danger-soft: #fef2f2;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-xs: 0 1px 2px rgba(26, 41, 66, 0.04);
    --shadow-sm: 0 2px 8px rgba(26, 41, 66, 0.06);
    --shadow-md: 0 8px 24px rgba(26, 41, 66, 0.08);
    --shadow-lg: 0 16px 48px rgba(26, 41, 66, 0.1);
    --shadow-blue: 0 8px 24px rgba(37, 99, 235, 0.18);

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 68px;
    --page-px: clamp(1.25rem, 2.5vw, 2.5rem);
    --sidebar-width: minmax(260px, 300px);
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 10% -10%, rgba(37, 99, 235, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 100%, rgba(96, 165, 250, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---- 导航栏 ---- */
.app-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid rgba(216, 226, 239, 0.8);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.app-nav-inner {
    width: 100%;
    margin: 0;
    padding: 0 var(--page-px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

.app-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--brand-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    box-shadow: var(--shadow-blue);
}

.app-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-user-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 1rem;
    background: var(--primary-soft);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 100px;
    font-size: 0.8125rem;
}

.app-user-chip span {
    color: var(--text-secondary);
}

.app-user-chip strong {
    color: var(--text);
    font-weight: 500;
}

.app-user-divider {
    width: 1px;
    height: 14px;
    background: var(--border);
}

/* ---- 按钮 ---- */
.btn-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}

.btn-app-primary {
    background: var(--brand-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-blue);
}

.btn-app-primary:hover {
    filter: brightness(1.06);
    color: #fff;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

.btn-app-outline {
    background: var(--surface);
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.25);
}

.btn-app-outline:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-deep);
}

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

.btn-app-ghost:hover {
    background: var(--accent-soft);
    color: var(--text);
}

.btn-app-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
}

.btn-app-block {
    width: 100%;
}

/* ---- 主内容区 ---- */
.app-main {
    width: 100%;
    margin: 0;
    padding: 2rem var(--page-px) 3rem;
}

.app-main-narrow {
    width: 100%;
}

.app-main-compact {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.page-header p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---- 卡片 ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-body {
    padding: 1.5rem;
}

.card-hover {
    transition: all var(--transition);
}

.card-hover:hover {
    border-color: var(--text-muted);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ---- 考核卡片网格 ---- */
.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.exam-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.exam-card:hover {
    border-color: var(--text-muted);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.exam-card-top {
    padding: 1.25rem 1.25rem 0;
}

.exam-card-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.625rem;
}

.exam-card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.375rem;
}

.exam-card-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.exam-card-bottom {
    padding: 1rem 1.25rem 1.25rem;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.exam-card-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ---- 空状态 ---- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: block;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.empty-state p {
    font-size: 0.875rem;
}

/* ---- 登录页（一体双栏面板） ---- */
.login-body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr min(480px, 42vw);
}

.login-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.5rem, 6vw, 5rem);
    background: var(--hero-gradient);
    color: #fff;
    overflow: hidden;
}

.login-hero-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.login-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 30% 50%, #000 20%, transparent 75%);
}

.login-hero-orb {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.login-hero-orb--1 {
    width: min(480px, 55vw);
    height: min(480px, 55vw);
    top: -18%;
    right: -12%;
}

.login-hero-orb--2 {
    width: min(320px, 38vw);
    height: min(320px, 38vw);
    bottom: 8%;
    left: -10%;
}

.login-hero-orb--3 {
    width: min(180px, 22vw);
    height: min(180px, 22vw);
    bottom: 28%;
    right: 18%;
    background: rgba(255, 255, 255, 0.08);
}

.login-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.login-emblem {
    width: 72px;
    height: 72px;
    margin-bottom: 2.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
}

.login-site-title {
    font-size: clamp(2.25rem, 4.5vw + 0.75rem, 4.5rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.12;
    margin-bottom: 0;
    word-break: break-word;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.login-site-title::after {
    content: '';
    display: block;
    width: 3.5rem;
    height: 4px;
    margin-top: 1.5rem;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.92);
}

.login-site-desc {
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.3125rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    max-width: 24em;
    margin-top: 1.25rem;
    letter-spacing: 0.04em;
}

.login-form-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    background: var(--surface);
    box-shadow: -12px 0 48px rgba(26, 41, 66, 0.08);
}

.login-form-inner {
    width: 100%;
    max-width: 400px;
}

.login-main-head {
    margin-bottom: 2rem;
}

.login-main-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.login-main-desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.login-main-alert {
    margin-bottom: 1rem;
}

.login-main-form .form-group {
    margin-bottom: 1.5rem;
}

.login-input {
    height: 52px;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.btn-login {
    width: 100%;
    height: 52px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font);
    color: #fff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-blue);
}

.btn-login:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: wait;
}

.login-main-note {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.login-main-note i {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.alert-app-danger {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.form-control-app {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    outline: none;
}

.form-control-app:focus {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.alert-app {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.alert-app-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.error-text {
    font-size: 0.8125rem;
    color: var(--danger);
    margin-top: 0.375rem;
}

.login-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ---- 错误页 ---- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg);
}

.error-card {
    max-width: 480px;
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
}

.error-icon {
    width: 56px;
    height: 56px;
    background: var(--danger-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--danger);
    font-size: 1.5rem;
}

.error-card h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.error-message-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: left;
}

.error-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.error-footer {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---- 考核页 ---- */
.exam-page-header {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.exam-page-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.exam-page-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.timer-box {
    text-align: center;
    padding: 0.75rem 1.25rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-width: 100px;
}

.timer-box #timer {
    font-size: 1.375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.timer-box .timer-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.125rem;
}

.progress-wrap {
    margin-bottom: 1.25rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.progress-track {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.question-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.question-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition);
}

.question-nav-btn:hover {
    border-color: var(--text-muted);
    background: var(--bg-subtle);
}

.question-nav-btn.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.question-nav-btn.answered {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(5, 150, 105, 0.3);
}

.question-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.question-type-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    background: var(--accent-soft);
    color: var(--text-secondary);
}

.question-number {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.question-content {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding-right: 5rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-label {
    display: flex;
    align-items: flex-start;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.option-label:hover {
    border-color: var(--primary-light);
    background: var(--primary-soft);
}

.option-label.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.option-input {
    margin-right: 0.75rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--accent);
}

.option-text {
    flex: 1;
    font-size: 0.9375rem;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 0.75rem;
}

.submit-container {
    text-align: center;
    margin: 2rem 0;
}

.auto-jump-notice {
    background: var(--primary-soft);
    color: var(--primary);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    font-size: 0.8125rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.auto-jump-notice.show {
    display: flex;
}

.time-warning {
    color: var(--danger) !important;
    animation: pulse 1s infinite;
}

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

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

}

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

/* ---- 历史记录 ---- */
.history-page .page-header-compact {
    margin-bottom: 0.875rem;
}

.history-page .page-header-compact h1 {
    font-size: 1.25rem;
    margin-bottom: 0.125rem;
}

.history-page .page-header-compact p {
    font-size: 0.8125rem;
}

.history-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    width: 100%;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid var(--border);
}

.stat-item {
    padding: 0.625rem 0.75rem;
    text-align: center;
    border-right: 1px solid var(--border-light);
}

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

.stat-number {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.charts-section {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
    width: 100%;
}

.charts-grid-compact {
    grid-template-columns: repeat(4, 1fr);
}

.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.75rem;
}

.chart-card-sm {
    min-width: 0;
}

.chart-card-wide {
    grid-column: span 2;
}

.chart-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.chart-wrap {
    position: relative;
    height: 160px;
}

.chart-wrap-pie {
    height: 140px;
}

.chart-wrap-bar,
.chart-wrap-line {
    height: 140px;
}

.history-panel .table-app th {
    padding: 0.5rem 0.875rem;
    font-size: 0.625rem;
}

.history-panel .table-app td {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
}

.history-panel .pagination-app {
    padding: 0.75rem 1rem;
}

.table-section-head {
    padding: 0.625rem 1rem 0;
}

.table-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.table-app {
    width: 100%;
    border-collapse: collapse;
}

.table-app th {
    padding: 0.875rem 1.25rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.table-app td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table-app tbody tr {
    transition: background var(--transition);
}

.table-app tbody tr:hover {
    background: var(--bg-subtle);
}

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

.score-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.score-excellent { background: var(--success-soft); color: var(--success); }
.score-good { background: var(--primary-soft); color: var(--primary); }
.score-average { background: var(--warning-soft); color: var(--warning); }
.score-poor { background: var(--danger-soft); color: var(--danger); }

.panel-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.pagination-app {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    padding: 1.25rem;
    border-top: 1px solid var(--border);
}

.pagination-app .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.pagination-app .page-link:hover {
    background: var(--bg-subtle);
    border-color: var(--text-muted);
    color: var(--text);
}

.pagination-app .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination-app .page-item.disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
}

/* ---- 成绩单 ---- */
.result-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    width: 100%;
}

.result-header {
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.result-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0.375rem;
}

.result-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.result-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: var(--border);
    border-bottom: 1px solid var(--border);
}

.info-grid-item {
    background: var(--surface);
    padding: 1.25rem 1.5rem;
}

.info-grid-item .label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.info-grid-item .value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
}

.score-display-section {
    text-align: center;
    padding: 2.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.score-big {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--text);
    line-height: 1;
}

.score-sub {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

.result-status {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1rem;
}

.result-success { background: var(--success-soft); color: var(--success); }
.result-warning { background: var(--warning-soft); color: var(--warning); }
.result-danger { background: var(--danger-soft); color: var(--danger); }

.detail-section {
    padding: 1.5rem 2rem 2rem;
}

.section-title {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.answer-correct { color: var(--success); font-weight: 500; }
.answer-incorrect { color: var(--danger); font-weight: 500; }

.result-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    flex-wrap: wrap;
}

.result-footer {
    text-align: center;
    padding: 1rem 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
}

/* ---- 视频页 ---- */
.search-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.search-input-wrap {
    position: relative;
}

.search-input-wrap i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input-wrap input {
    padding-left: 2.75rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 1rem;
}

.filter-tag {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all var(--transition);
}

.filter-tag:hover,
.filter-tag.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.video-category {
    margin-bottom: 2.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.video-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--accent-soft);
    padding: 0.2rem 0.625rem;
    border-radius: 100px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.video-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    border-color: var(--text-muted);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.video-thumbnail {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: var(--bg);
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .thumbnail-image {
    transform: scale(1.03);
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1rem;
}

.video-info {
    padding: 1rem 1.125rem 1.125rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 全站匿名视频：主题色顶栏 + 缩略图，无标题无分类 */
.video-grid--anonymous {
    margin-top: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.875rem;
}

.video-grid--anonymous > a {
    display: block;
    height: 100%;
}

.video-card--anonymous {
    height: 100%;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.video-card--anonymous:hover {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    box-shadow: var(--shadow-blue);
    transform: translateY(-2px);
}

.video-card-theme-bar {
    height: 2rem;
    padding: 0 0.625rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background: var(--brand-gradient);
}

.video-index-num {
    min-width: 1.375rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    letter-spacing: 0.02em;
}

.video-card--anonymous .video-thumbnail {
    height: auto;
    flex: 1;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    overflow: hidden;
    background: var(--primary-deep);
}

.video-card--anonymous .thumbnail-image {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card--anonymous .thumbnail-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-deep) 100%);
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.75rem;
}

.video-index-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.video-preview-list--anonymous {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.video-preview-list--anonymous .video-preview-item {
    flex-direction: column;
    padding: 0;
    gap: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.video-preview-list--anonymous .video-preview-theme-bar {
    height: 1.375rem;
    padding: 0 0.375rem;
    display: flex;
    align-items: center;
    background: var(--brand-gradient);
    flex-shrink: 0;
}

.video-preview-list--anonymous .video-index-num {
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    border-radius: 3px;
}

.video-preview-list--anonymous .video-preview-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: var(--primary-deep);
    border-radius: 0;
}

.video-preview-list--anonymous .video-preview-thumb img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-preview-list--anonymous .video-preview-thumb i {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-deep) 100%);
}

/* ---- 视频播放 ---- */
.video-player-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.video-player-wrap {
    background: #000;
}

.video-player-wrap video {
    width: 100%;
    max-height: 70vh;
    display: block;
}

.video-detail {
    padding: 1.5rem;
}

.video-detail h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
}

.meta-item .meta-label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.meta-item .meta-value {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ---- 详情页（历史详情） ---- */
.detail-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.detail-panel-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.detail-panel-header h1 {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.detail-panel-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ---- 首页布局 ---- */
.app-main-home {
    width: 100%;
    padding: 1rem var(--page-px) 1rem;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--nav-height));
    box-sizing: border-box;
}

/* 三栏：左右等宽，中间为主，三列底对齐同高 */
.home-layout-v3 {
    --home-side: 272px;
    display: grid;
    grid-template-columns: var(--home-side) minmax(0, 1fr) var(--home-side);
    gap: 1rem;
    align-items: stretch;
    flex: 1;
    width: 100%;
    min-height: 0;
}

.home-col {
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-col-left,
.home-col-right {
    width: var(--home-side);
    max-width: var(--home-side);
}

.home-col-center {
    min-width: 0;
}

.welcome-bar-top {
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.welcome-bar {
    background: var(--hero-gradient);
    border-radius: var(--radius-md);
    padding: 0.875rem 1.25rem;
    color: #fff;
    box-shadow: var(--shadow-blue);
}

.welcome-bar-label {
    font-size: 0.6875rem;
    opacity: 0.8;
    margin-right: 0.5rem;
}

.welcome-bar-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.welcome-bar-meta {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-left: 0.75rem;
}

.home-exams-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.home-exams-panel .exam-list {
    flex: 1;
}

.home-charts.home-charts-col {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.home-charts.home-charts-col .home-chart-card {
    min-width: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.home-charts.home-charts-col .home-chart-card:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 80px;
}

.home-charts.home-charts-col .home-chart-card:last-child .home-chart-wrap {
    flex: 1;
    height: auto;
    min-height: 72px;
}

.home-charts.home-charts-col .home-chart-wide {
    grid-column: span 1;
}

.home-layout-v2 {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 320px);
    gap: 1.25rem;
    align-items: start;
    width: 100%;
}

.home-left {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
}

.learning-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.learning-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.learning-panel-head h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

.home-stats-mini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.home-col-left .home-stats-mini {
    grid-template-columns: repeat(2, 1fr);
}

.home-stat {
    text-align: center;
    padding: 0.5rem 0.25rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.home-stat-val {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.home-stat-lbl {
    font-size: 0.625rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.home-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

.home-chart-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.625rem;
}

.home-chart-wide {
    grid-column: span 2;
}

.home-chart-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.home-chart-wrap {
    height: 120px;
    position: relative;
}

.home-charts-col .home-chart-card:not(:last-child) .home-chart-wrap {
    height: 88px;
}

.home-chart-line {
    height: 110px;
}


.home-col-left .learning-panel {
    padding: 0.875rem;
}

.home-col-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.home-col-right .sidebar-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0.875rem;
}

.home-col-right .video-preview-list,
.home-col-right .record-preview-list {
    flex: 1;
    min-height: 0;
}

.home-col-right .record-preview-empty,
.home-col-right .sidebar-panel .record-preview-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.learning-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.learning-empty i {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.home-exams .section-head {
    margin-bottom: 0.875rem;
}

.home-exams .section-head-text h1 {
    font-size: 1.25rem;
}

.video-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.video-preview-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-subtle);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.video-preview-item:hover {
    background: var(--primary-soft);
    border-color: rgba(37, 99, 235, 0.2);
}

.video-preview-thumb {
    width: 48px;
    height: 36px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
}

.video-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-preview-info {
    flex: 1;
    min-width: 0;
}

.video-preview-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-preview-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.home-right .sidebar-panel {
    padding: 0.875rem;
}

.home-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: clamp(1rem, 2vw, 2rem);
    align-items: start;
    width: 100%;
}

.home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: calc(var(--nav-height) + 1.25rem);
}

.welcome-card {
    background: var(--hero-gradient);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    color: #fff;
    box-shadow: var(--shadow-blue);
    position: relative;
    overflow: hidden;
}

.welcome-card::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.welcome-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

.welcome-name {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.welcome-meta {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.8125rem;
    opacity: 0.88;
    position: relative;
    z-index: 1;
}

.welcome-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-xs);
}

.sidebar-panel-title {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
    margin-bottom: 0.25rem;
}

.quick-link:last-child {
    margin-bottom: 0;
}

.quick-link:hover {
    background: var(--primary-soft);
    color: var(--primary-deep);
}

.quick-link-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.quick-link-icon.blue { background: var(--primary-soft); color: var(--primary); }
.quick-link-icon.green { background: var(--success-soft); color: var(--success); }

.sidebar-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}

.sidebar-more {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary);
    transition: color var(--transition);
}

.sidebar-more:hover {
    color: var(--primary-deep);
}

.record-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.record-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-subtle);
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.record-preview-item:hover {
    background: var(--primary-soft);
    border-color: rgba(37, 99, 235, 0.2);
}

.record-preview-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.record-preview-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.record-preview-date {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.record-preview-score {
    flex-shrink: 0;
    min-width: 2.25rem;
    text-align: center;
}

.record-preview-empty {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.75rem 0;
}

.home-content {
    min-width: 0;
    width: 100%;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.section-head-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.section-head-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.exam-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.exam-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    width: 100%;
}

.exam-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.exam-row:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.exam-row-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    color: #fff;
}

.exam-row:nth-child(4n+1) .exam-row-icon { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.exam-row:nth-child(4n+2) .exam-row-icon { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.exam-row:nth-child(4n+3) .exam-row-icon { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.exam-row:nth-child(4n+4) .exam-row-icon { background: linear-gradient(135deg, #059669, #34d399); }

.exam-row-body {
    flex: 1;
    min-width: 0;
}

.exam-row-title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.exam-row-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.exam-row-meta i {
    font-size: 0.75rem;
}

.exam-row-action {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1.125rem;
    background: var(--brand-gradient);
    color: #fff;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    flex-shrink: 0;
    box-shadow: var(--shadow-blue);
    transition: all var(--transition);
}

.exam-row:hover .exam-row-action {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

/* ---- 响应式 ---- */
@media (max-width: 900px) {
    .login-screen {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .login-hero {
        padding: 2.5rem 1.75rem 2rem;
        min-height: auto;
    }

    .login-emblem {
        width: 56px;
        height: 56px;
        margin-bottom: 1.5rem;
        font-size: 1.625rem;
    }

    .login-site-title {
        font-size: clamp(1.875rem, 7vw, 2.75rem);
    }

    .login-site-title::after {
        width: 2.75rem;
        margin-top: 1.125rem;
    }

    .login-site-desc {
        font-size: 0.9375rem;
        margin-top: 1rem;
    }

    .login-form-area {
        box-shadow: none;
        padding: 2rem 1.75rem 2.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .app-nav-inner {
        padding: 0 1rem;
    }

    .app-user-chip {
        display: none;
    }

    .app-main {
        padding: 1.25rem var(--page-px) 2rem;
    }

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

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-card-wide {
        grid-column: span 1;
    }

    .chart-wrap,
    .chart-wrap-pie,
    .chart-wrap-bar,
    .chart-wrap-line {
        height: 130px;
    }

    .stat-item:nth-child(2) {
        border-right: none;
    }

    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid var(--border-light);
    }

    .question-content {
        padding-right: 0;
    }

    .question-type-badge {
        position: relative;
        top: 0;
        right: 0;
        display: inline-block;
        margin-bottom: 0.75rem;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .exam-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-app thead {
        display: none;
    }

    .table-app tbody tr {
        display: block;
        border-bottom: 1px solid var(--border);
        padding: 0.75rem 0;
    }

    .table-app tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.375rem 1.25rem;
        border: none;
    }

    .table-app tbody td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-muted);
        font-size: 0.75rem;
        margin-right: 1rem;
    }

    .score-big {
        font-size: 3rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn-app {
        width: 100%;
    }

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

    .error-actions {
        flex-direction: column;
    }


    .home-layout-v3 {
        grid-template-columns: 1fr;
        --home-side: 100%;
    }

    .home-col-left,
    .home-col-right {
        position: static;
        width: 100%;
        max-width: 100%;
    }

    .welcome-bar-meta {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }

    .home-layout-v2 {
        grid-template-columns: 1fr;
    }

    .home-right {
        position: static;
    }

    .home-stats-mini {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-charts {
        grid-template-columns: 1fr 1fr;
    }

    .home-chart-wide {
        grid-column: span 2;
    }

    .home-layout {
        grid-template-columns: 1fr;
    }

    .home-sidebar {
        position: static;
    }

    .welcome-card {
        padding: 1.25rem;
    }

    .exam-row {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .exam-row-action {
        width: 100%;
        justify-content: center;
        margin-top: 0.25rem;
    }
}

@media print {
    .app-nav, .result-actions, .panel-footer, .pagination-app {
        display: none !important;
    }

    body {
        background: white;
    }
}

/* ---- 考核详情（学习模式） ---- */
.review-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.review-card.is-correct {
    border-left: 3px solid var(--success);
}

.review-card.is-wrong {
    border-left: 3px solid var(--danger);
}

.review-option {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    gap: 0.625rem;
}

.review-option.is-correct {
    background: var(--success-soft);
    border-color: rgba(5, 150, 105, 0.25);
}

.review-option.is-selected {
    background: var(--primary-soft);
    border-color: rgba(37, 99, 235, 0.25);
}

.review-marker {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    flex-shrink: 0;
    background: var(--border);
    color: var(--text-secondary);
}

.review-marker.correct { background: var(--success); color: #fff; }
.review-marker.selected { background: var(--primary); color: #fff; }

.review-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 1.5rem;
}

.review-summary-item {
    background: var(--surface);
    padding: 1.25rem;
    text-align: center;
}

.review-summary-item .val {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.review-summary-item .lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
