/* ========================================
   TransGuide - Linear 风格设计系统
   设计原则：深色优先、低饱和蓝色强调、极简克制
   版本: v2.1 - 2026-04-29 (术语库列表项布局优化)
   ======================================== */

/* 使用系统字体栈，避免外部资源依赖 */
/* 如需 Inter 字体，请下载到本地 static/fonts/ 目录 */

/* 强制刷新标记 - 确保浏览器加载最新版本 */
body::before { content: ''; display: none; }

/* CSS 变量 - Linear 风格 (全局基础规范) */
:root {
    /* 核心背景层级 */
    --bg-base: #0f0f11;
    --bg-sidebar: #141417;
    --bg-elevated: #18181b;
    --bg-surface: #202024;
    --bg-hover: #202024;
    --bg-active: #27272a;

    /* 文字层级 */
    --text-primary: #fafafa;
    --text-body: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-disabled: #52525b;

    /* 边框 - 低对比 */
    --border-subtle: #27272a;
    --border-default: #27272a;
    --border-hover: #3f3f46;

    /* 强调色 - 低饱和蓝 */
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.15);

    /* 功能色 - 低饱和 */
    --success: #22c55e;
    --warning: #f97316;
    --error: #ef4444;
    --info: #3b82f6;

    /* 阴影 - 柔和弥散 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* 间距 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;

    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* 浅色主题 - 保留但默认深色 */
[data-theme="light"] {
    --bg-base: #ffffff;
    --bg-elevated: #fafafa;
    --bg-surface: #f4f4f5;
    --bg-hover: #e4e4e7;
    --bg-active: #d4d4d8;

    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-tertiary: #a1a1aa;
    --text-disabled: #d4d4d8;

    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-default: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(0, 0, 0, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* 重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 应用布局 */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-base);
}

/* ========================================
   侧边栏 - Linear 风格
   ======================================== */
.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* 顶部品牌区 */
.sidebar-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-default);
}

.logo {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.theme-toggle {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    color: var(--text-secondary);
    font-size: 14px;
}

.theme-toggle:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* 导航 */
.nav {
    flex: 1;
    padding: 16px 8px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-label {
    display: block;
    padding: 0 12px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #71717a;
    text-transform: none;
    letter-spacing: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 2px;
    background: none;
    border: none;
    border-radius: 6px;
    color: #a1a1aa;
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-item:hover {
    background: #18181b;
    color: #e4e4e7;
}

.nav-item.active {
    background: #18181b;
    color: #3b82f6;
    font-weight: 500;
}

.nav-item svg {
    flex-shrink: 0;
}

/* 数据统计模块 */
.stats {
    padding: 16px;
    margin: 0 12px;
    background: var(--bg-elevated);
    border-radius: 8px;
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.stat-value {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-body);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* About 入口按钮 */
.about-btn {
    margin: 8px 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    border-radius: 0;
}

.about-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-body);
}

/* 用户区域 */
.user-section {
    padding: 16px;
    margin: 0 12px 12px;
    background: var(--bg-elevated);
    border-radius: 8px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.user-name {
    font-size: 16px;
    color: var(--text-body);
    font-weight: 600;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-logout {
    font-size: 12px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background var(--transition-fast);
}

.btn-logout:hover {
    background: var(--bg-surface);
}

/* 版本信息 */
.version-info {
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.version-separator {
    margin: 0 6px;
    opacity: 0.5;
}

/* About 弹窗 */
.about-modal {
    width: 480px;
    max-width: 90vw;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 24px;
}

.about-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.about-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.about-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
}

.about-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-section {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.about-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.about-section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-body);
    margin: 0 0 12px 0;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.about-list li {
    font-size: 14px;
    color: var(--text-secondary);
}

.about-placeholder {
    font-size: 14px;
    color: var(--text-tertiary);
    margin: 0;
}

.about-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.about-list li strong {
    color: var(--text-body);
    font-weight: 500;
}

.about-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
}

.about-close-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-body);
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.about-close-btn:hover {
    background: var(--bg-surface);
}

/* 统计 */
.stats {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: var(--space-5);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   主内容区
   ======================================== */
.main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg-base);
}

.view {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.view.active {
    display: flex;
}

/* 统一页面标题区样式 */
.page-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid #27272a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: #e4e4e7;
    margin: 0;
    line-height: 1.3;
}

.page-subtitle {
    font-size: 14px;
    color: #a1a1aa;
    margin: 0;
    line-height: 1.4;
}

/* 旧样式保留兼容 */
.view-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.view-title-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.view-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   翻译方向切换器 - Linear 风格
   ======================================== */

/* 标准切换器（文件翻译页、文本翻译页顶部） */
/* ========================================
   翻译方向切换器 - Pill 按钮风格
   ======================================== */

.lang-switcher-pill {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-switch-pill-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #a1a1aa;
    position: relative;
    transition: all var(--transition-fast);
}

.lang-switch-pill-btn:hover {
    background: #18181b;
    color: #e4e4e7;
}

.lang-switch-pill-btn.active {
    background: #18181b;
    color: #3b82f6;
    font-weight: 500;
}

.lang-switch-pill-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: #3b82f6;
    border-radius: 1px;
}

.lang-flag {
    font-size: 14px;
    line-height: 1;
}

/* 文字国旗徽章 */
.lang-flag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    width: 22px;
    height: 16px;
    border-radius: 3px;
    line-height: 1;
}

/* 切换器中的徽章 - US蓝色，CN红色 */
.lang-switch-pill-btn[data-direction="en2zh"] .lang-flag-badge {
    background: #3b82f6;
    color: #fff;
}

.lang-switch-pill-btn[data-direction="zh2en"] .lang-flag-badge {
    background: #ef4444;
    color: #fff;
}

/* 原文/译文标签中的徽章 - 放大并区分颜色 */
.editor-label .label-flag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    width: 26px;
    height: 18px;
    border-radius: 3px;
    line-height: 1;
}

/* US标识蓝色 */
.editor-label .label-flag-badge[data-lang="en"],
#sourceFlag.label-flag-badge[data-lang="en"],
#targetFlag.label-flag-badge[data-lang="en"] {
    background: #3b82f6;
    color: #fff;
}

/* CN标识红色 */
.editor-label .label-flag-badge[data-lang="zh"],
#sourceFlag.label-flag-badge[data-lang="zh"],
#targetFlag.label-flag-badge[data-lang="zh"] {
    background: #ef4444;
    color: #fff;
}

/* 默认状态 */
#sourceFlag.label-flag-badge {
    background: #3b82f6;
    color: #fff;
}

#targetFlag.label-flag-badge {
    background: #ef4444;
    color: #fff;
}

.view-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

/* ========================================
   按钮系统 - Linear 极简风格
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    height: 32px;
}

.btn:hover {
    background: var(--bg-surface);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--bg-surface);
    border-color: var(--border-default);
    color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.btn-icon.delete:hover {
    color: var(--error);
}

/* 小型按钮 */
.btn-small {
    padding: 4px 10px;
    font-size: 12px;
    height: 28px;
}

.guest-remaining {
    font-size: 11px;
    color: #f97316;
    display: block;
    text-align: center;
    margin-bottom: 6px;
    padding: 2px 0;
    border-radius: 4px;
    background: rgba(249, 115, 22, 0.1);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    height: 28px;
}

/* 文字链接按钮 */
.btn-link {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 12px;
    padding: 4px 8px;
    height: auto;
}

.btn-link:hover {
    background: transparent;
    color: var(--text-secondary);
}

.btn-block {
    width: 100%;
}

/* ========================================
   表单元素 - Linear 风格
   ======================================== */
.form-input,
.form-select,
.form-textarea,
.search-input,
.select {
    padding: 6px 10px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.search-input:focus,
.select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow), inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 下拉选择器 - 带自定义箭头 */
.select,
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
}

.select:hover,
.form-select:hover {
    border-color: var(--border-hover);
    background-color: var(--bg-elevated);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-disabled);
}

/* 多译词输入提示 */
.multi-translation-input {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.multi-translation-input .input-hint {
    font-size: 11px;
    color: var(--text-tertiary);
    margin: 0;
    padding-left: 2px;
}

.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.input-group {
    display: flex;
    gap: var(--space-2);
}

.input-group .form-input {
    flex: 1;
}

/* ========================================
   导入功能
   ======================================== */
.import-container {
    flex: 1;
    padding: var(--space-6);
    overflow-y: auto;
}

/* ========================================
   文件上传区域 - Linear 风格
   ======================================== */

.upload-section {
    margin-bottom: 24px;
}

.upload-area {
    padding: 48px;
    border: 2px dashed var(--border-hover);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--bg-elevated);
}

.upload-area.large {
    padding: 64px;
}

.upload-area:hover {
    border-color: #52525b;
    background: var(--bg-surface);
}

.upload-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.upload-content p {
    color: var(--text-body);
    margin-bottom: 8px;
    font-size: 14px;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.upload-note {
    font-size: 12px;
    color: var(--warning);
    margin-top: 8px;
}

/* 选择文件按钮 */
.btn-select-files {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin-top: 16px;
    background: transparent;
    border: 1px solid var(--border-hover);
    border-radius: 6px;
    color: var(--text-body);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-select-files:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
}

/* 导入预览 */
.import-preview {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.preview-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-surface);
}

.preview-header h3 {
    font-size: 14px;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
}

.preview-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-shrink: 0;
}

.import-stats {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.stat-card {
    flex: 1;
    text-align: center;
    padding: var(--space-4);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--border-default);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--space-1);
    font-weight: 500;
}

/* 术语统计高亮 */
.terms-stats-highlight {
    padding: 40px 20px;
    background: var(--accent-gradient);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.terms-stats-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.terms-count-large {
    color: white;
    position: relative;
    z-index: 1;
}

.terms-count-large .count-number {
    font-size: 56px;
    font-weight: 800;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.terms-count-large .count-label {
    font-size: 16px;
    margin-left: var(--space-2);
    opacity: 0.9;
    font-weight: 500;
}

/* 术语预览区域 */
.terms-preview-section {
    padding: var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
}

.preview-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--accent-primary);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.terms-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.terms-category {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-subtle);
}

.category-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-secondary);
    background: rgba(139, 92, 246, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.terms-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* 术语提取预览 - 使用独立class避免与术语库管理冲突 */
.extract-term-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.extract-term-item:hover {
    border-color: var(--border-default);
    background: var(--bg-hover);
}

.extract-term-en {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.extract-term-arrow {
    color: var(--accent-secondary);
    font-weight: 700;
    font-size: 11px;
}

.extract-term-zh {
    color: var(--text-secondary);
    flex: 1;
}

.no-terms {
    text-align: center;
    color: var(--text-tertiary);
    padding: 40px;
    font-style: italic;
}

/* 双语对预览区域（折叠） */
.pairs-preview-section {
    padding: var(--space-4) var(--space-5);
}

.pairs-details {
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    overflow: hidden;
}

.pairs-summary {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
    font-size: 13px;
    transition: background var(--transition-fast);
}

.pairs-summary:hover {
    background: var(--bg-hover);
}

.pairs-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.pairs-list {
    padding: 0 var(--space-4) var(--space-4);
    max-height: 400px;
    overflow-y: auto;
}

.sentence-pair {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-2);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.sentence-pair:hover {
    border-color: var(--border-default);
}

.sentence-index {
    font-size: 11px;
    color: var(--text-tertiary);
    min-width: 28px;
    text-align: center;
    padding-top: 2px;
    font-weight: 600;
}

.sentence-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sentence-en {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 500;
}

.sentence-zh {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.more-sentences {
    text-align: center;
    color: var(--text-tertiary);
    padding: var(--space-4);
    font-size: 13px;
}

.no-pairs {
    text-align: center;
    color: var(--text-tertiary);
    padding: 30px;
    font-style: italic;
}

/* 导入结果 */
.import-result {
    padding: 40px;
    text-align: center;
}

.result-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--space-5);
    color: var(--text-primary);
}

.result-stats {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
}

.result-item {
    padding: var(--space-5) 40px;
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.result-item:hover {
    border-color: var(--border-default);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.result-item.success {
    border-color: rgba(34, 197, 94, 0.3);
}

.result-number {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--success);
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.result-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: var(--space-1);
    font-weight: 500;
}

/* ========================================
   批量导入进度
   ======================================== */
.batch-import-progress {
    margin: var(--space-5) 0;
    padding: var(--space-5);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.progress-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-bar {
    height: 6px;
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.progress-files {
    max-height: 150px;
    overflow-y: auto;
}

.progress-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px var(--space-3);
    margin-bottom: var(--space-1);
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.progress-file-item.processing {
    border-left: 3px solid var(--accent-primary);
    background: rgba(139, 92, 246, 0.05);
}

.progress-file-item.success {
    border-left: 3px solid var(--success);
}

.progress-file-item.error {
    border-left: 3px solid var(--error);
}

.file-status {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ========================================
   批量导入结果
   ======================================== */
.batch-import-result {
    margin-top: var(--space-5);
    padding: var(--space-5);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.result-summary {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
}

.summary-item {
    flex: 1;
    text-align: center;
}

.summary-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--space-1);
    font-weight: 500;
}

.result-files {
    max-height: 200px;
    overflow-y: auto;
}

.result-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-2);
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.result-file-item:hover {
    border-color: var(--border-default);
}

.result-file-item.success {
    border-color: rgba(34, 197, 94, 0.2);
}

.result-file-item.error {
    border-color: rgba(239, 68, 68, 0.2);
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-weight: 500;
}

.file-stats {
    font-size: 11px;
    color: var(--text-tertiary);
}

.file-status-icon {
    font-size: 16px;
}

/* ========================================
   术语库和翻译记忆 - Linear 风格
   ======================================== */

/* 工具栏 */
.terms-toolbar, .memory-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.terms-toolbar-title, .memory-toolbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.terms-toolbar-actions, .memory-toolbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 搜索框 */
.toolbar-search {
    width: 240px;
    padding: 8px 12px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: var(--bg-elevated);
    color: var(--text-body);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.toolbar-search::placeholder {
    color: var(--text-tertiary);
}

.toolbar-search:hover {
    border-color: var(--border-hover);
}

.toolbar-search:focus {
    border-color: var(--accent-primary);
}

/* 工具栏按钮 */
.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toolbar-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-body);
}

/* 列表容器 */
.terms-list, .memory-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

/* 术语项 - 三列布局 (v2.1 优化) */
.term-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 24px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: var(--bg-elevated);
    transition: border-color var(--transition-fast);
}

.term-item:hover {
    border-color: var(--border-hover);
}

/* 左侧主信息区 */
.term-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.term-english {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.term-arrow {
    color: var(--text-tertiary);
    font-size: 14px;
    flex-shrink: 0;
}

.term-chinese {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 多译词展示 */
.term-multiple {
    border-left: 3px solid var(--accent-primary);
}

.term-translations-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.term-translations-list .term-chinese {
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}

.term-translations-list .term-chinese.term-primary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
    font-weight: 600;
}

.term-separator {
    color: var(--text-tertiary);
    font-size: 12px;
    margin: 0 4px;
}

/* 中间元信息区 */
.term-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* 分类标签 - 小圆点+文字 */
.term-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.term-category::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    flex-shrink: 0;
}

.term-category.uncategorized::before {
    background: var(--text-tertiary);
}

.term-source {
    font-size: 12px;
    color: var(--text-tertiary);
}

.term-source::before {
    content: '·';
    margin-right: 8px;
    color: var(--text-tertiary);
}

/* 右侧操作区 */
.term-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.term-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.term-btn:hover {
    background: var(--bg-surface);
    color: var(--text-body);
}

.term-btn.delete:hover {
    color: var(--error);
}

.term-category {
    padding: 2px 8px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.term-tag {
    padding: 2px 8px;
    background: rgba(139, 92, 246, 0.15);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--accent-secondary);
    font-weight: 600;
}

.term-notes {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

/* 分类筛选 */
.category-filter {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.category-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.category-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-secondary);
    background: rgba(139, 92, 246, 0.1);
}

.category-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.3);
}

/* ========================================
   弹窗样式
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-5);
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-subtle);
    border: 1px solid var(--border-default);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.modal-body {
    padding: var(--space-5);
    overflow-y: auto;
    max-height: 50vh;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-subtle);
}

/* 分类列表 */
.category-list {
    margin-top: var(--space-4);
}

.category-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    background: var(--bg-surface);
    transition: all var(--transition-fast);
}

.category-list-item:hover {
    border-color: var(--border-default);
}

.category-list-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.category-list-count {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: var(--space-2);
}

.category-list-actions {
    display: flex;
    gap: var(--space-2);
}

/* ========================================
   翻译记忆 - Linear 风格
   ======================================== */

/* 统计栏 */
.memory-stats {
    display: flex;
    gap: 32px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    border-radius: 8px;
    margin: 16px 24px;
}

.memory-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.memory-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.memory-stat-number {
    font-size: 18px;
    font-weight: 500;
    color: var(--accent-primary);
}

/* 空状态 */
.memory-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}

.memory-empty-icon {
    font-size: 48px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.memory-empty-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.memory-empty-desc {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 记忆项 - 与术语管理相同的布局 */
.memory-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: var(--bg-elevated);
    transition: border-color var(--transition-fast);
}

.memory-item:hover {
    border-color: var(--border-hover);
}

.memory-content {
    min-width: 0;
}

.memory-source {
    font-size: 14px;
    color: var(--text-body);
    margin-bottom: 8px;
    word-break: break-word;
}

.memory-target {
    font-size: 14px;
    color: var(--accent-primary);
    word-break: break-word;
}

/* 记忆操作按钮 - 与术语管理相同 */
.memory-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.memory-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 重复句段弹窗 */
.modal-content.large {
    max-width: 700px;
}

.duplicates-list {
    max-height: 60vh;
    overflow-y: auto;
}

.duplicate-group {
    margin-bottom: var(--space-4);
    padding: var(--space-4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.duplicate-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
}

.duplicate-group-title {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.duplicate-group-actions {
    display: flex;
    gap: var(--space-2);
}

.duplicate-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3);
    margin-bottom: var(--space-2);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.duplicate-item:hover {
    border-color: var(--border-default);
}

.duplicate-item input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--accent-primary);
}

.duplicate-item-content {
    flex: 1;
}

.duplicate-item-source {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 500;
}

.duplicate-item-target {
    font-size: 12px;
    color: var(--accent-secondary);
}

.duplicate-item-similarity {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ========================================
   翻译区域
   ======================================== */
.translate-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 0;
    overflow: hidden;
}

/* ========================================
   文本翻译页面 - Linear 风格
   ======================================== */

/* 页面头部 */
.translate-view-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-base);
}

.translate-view-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 编辑器区域 */
.editor-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* 放大原文/译文标签 */
.editor-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.editor {
    flex: 1;
    padding: 16px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: var(--bg-elevated);
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: border-color var(--transition-fast);
    font-family: inherit;
}

.editor:hover {
    border-color: var(--border-hover);
}

.editor:focus {
    border-color: var(--accent-primary);
}

/* 英译中时：原文框hover蓝色，译文框hover红色 */
body[data-direction="en2zh"] #sourceText:hover,
body[data-direction="en2zh"] #sourceText:focus {
    border-color: #3b82f6;
}

body[data-direction="en2zh"] #targetText:hover,
body[data-direction="en2zh"] #targetText:focus {
    border-color: #ef4444;
}

/* 中译英时：原文框hover红色，译文框hover蓝色 */
body[data-direction="zh2en"] #sourceText:hover,
body[data-direction="zh2en"] #sourceText:focus {
    border-color: #ef4444;
}

body[data-direction="zh2en"] #targetText:hover,
body[data-direction="zh2en"] #targetText:focus {
    border-color: #3b82f6;
}

.editor::placeholder {
    color: var(--text-tertiary);
}

/* 清空按钮 */
.btn-clear {
    font-size: 12px;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.btn-clear:hover {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

/* 翻译按钮区域 - 对称间距24px */
.editor-actions {
    display: flex;
    justify-content: center;
    padding: 24px 0;
}

.editor-actions .btn-primary {
    width: 120px;
    height: 36px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.editor-actions .btn-primary:hover {
    background: #2563eb;
}

.btn-translate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-translate:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
}

.btn-translate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   文件翻译
   ======================================== */
.file-container {
    flex: 1;
    padding: var(--space-6);
    overflow-y: auto;
}

.file-preview {
    margin-top: var(--space-5);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* 文件翻译遮罩层 - 只在预览区域内 */
.file-preview .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
}

/* 下载区域 */
.download-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
}

.download-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.download-icon {
    width: 32px;
    height: 32px;
    background: var(--success);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.download-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.preview-list {
    max-height: 400px;
    overflow-y: auto;
}

.preview-item {
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    transition: background var(--transition-fast);
}

.preview-item:hover {
    background: var(--bg-hover);
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-index {
    font-size: 11px;
    color: var(--text-tertiary);
    min-width: 32px;
    font-weight: 700;
    padding-top: 2px;
}

.preview-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 500;
}

.preview-translation {
    flex: 1;
    font-size: 14px;
    color: var(--accent-secondary);
    line-height: 1.5;
    padding-left: var(--space-4);
    border-left: 2px solid var(--border-default);
    font-weight: 500;
}

.preview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.location-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    display: inline-block;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.excel-tag {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.ppt-tag {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

/* ========================================
   空状态和加载
   ======================================== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 14px;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    padding: 40px;
}

.empty-state .hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

/* ========================================
   Toast 提示
   ======================================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-default);
    border: 1px solid var(--border-default);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========================================
   滚动条
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ========================================
   用户认证样式
   ======================================== */
.user-section {
    margin-top: auto;
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-subtle);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: var(--space-2);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--accent-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 用户信息主区域（用户名+设置按钮） */
.user-info-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* 用户设置按钮 */
.user-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #a1a1aa;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.user-settings-btn:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.user-settings-btn svg {
    width: 16px;
    height: 16px;
}

/* 用户邮箱显示 */
.user-email {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* 退出按钮样式统一 */
.btn-logout {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid #27272a;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #18181b;
    color: var(--text-primary);
}

/* 个人设置弹窗 */
.user-settings-modal {
    width: 480px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 24px;
}

.user-settings-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #27272a;
}

.user-settings-modal .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #e4e4e7;
    margin: 0;
}

.user-settings-modal .modal-close {
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.user-settings-modal .modal-close:hover {
    background: #202024;
    color: #e4e4e7;
}

.user-settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-settings-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-settings-form .form-label {
    font-size: 12px;
    color: #a1a1aa;
    font-weight: 500;
}

.user-settings-form .form-static-text {
    font-size: 14px;
    color: #71717a;
    padding: 10px 12px;
    background: #202024;
    border-radius: 6px;
    border: 1px solid #27272a;
}

.user-settings-form .form-input {
    padding: 10px 12px;
    font-size: 14px;
    color: #e4e4e7;
    background: #202024;
    border: 1px solid #27272a;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
}

.user-settings-form .form-input:hover,
.user-settings-form .form-input:focus {
    border-color: #3b82f6;
}

.user-settings-form .form-input::placeholder {
    color: #71717a;
}

.user-settings-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #27272a;
}

.user-settings-modal .btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.user-settings-modal .btn-text {
    color: #a1a1aa;
    background: transparent;
}

.user-settings-modal .btn-text:hover {
    background: #18181b;
    color: #e4e4e7;
}

.user-settings-modal .btn-primary {
    color: #ffffff;
    background: #3b82f6;
}

.user-settings-modal .btn-primary:hover {
    background: #2563eb;
}

/* 认证弹窗样式 */
.auth-tabs {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
}

.auth-tab {
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    color: var(--accent-secondary);
    border-bottom-color: var(--accent-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-error {
    color: var(--error);
    font-size: 13px;
    min-height: 18px;
    font-weight: 500;
}

.form-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: var(--space-2);
}

/* 管理员面板样式 */
.admin-tabs {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
}

.admin-tab {
    padding: var(--space-3) var(--space-4);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.admin-tab:hover {
    color: var(--text-primary);
}

.admin-tab.active {
    color: var(--accent-secondary);
    border-bottom-color: var(--accent-primary);
}

.admin-panel {
    max-height: 50vh;
    overflow-y: auto;
}

.pending-list, .users-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.pending-item, .user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    transition: all var(--transition-fast);
}

.pending-item:hover, .user-item:hover {
    border-color: var(--border-default);
    background: var(--bg-hover);
}

.pending-info, .user-info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pending-username, .user-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.pending-email, .user-email {
    font-size: 12px;
    color: var(--text-tertiary);
}

.pending-date, .user-status {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.pending-actions, .user-actions {
    display: flex;
    gap: var(--space-2);
}

.user-status-badge {
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-status-badge.approved {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.user-status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.user-status-badge.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.user-status-badge.disabled {
    background: var(--bg-hover);
    color: var(--text-tertiary);
}

/* ========================================
   用户管理页面 - Linear 风格
   ======================================== */

/* 标签页 */
.admin-view-tabs {
    display: flex;
    gap: 32px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-base);
}

.admin-view-tab {
    padding: 16px 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    position: relative;
    transition: color var(--transition-fast);
}

.admin-view-tab:hover {
    color: var(--text-body);
}

.admin-view-tab.active {
    color: var(--accent-primary);
    font-weight: 500;
}

.admin-view-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

/* ========================================
   统计面板样式 - Linear深色风格
   ======================================== */

/* 统计面板容器 */
#statsView {
    padding: 24px;
}

#statsView .page-header {
    padding: 0 0 16px 0;
    margin-bottom: 24px;
}

/* 概览卡片行 */
.stats-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* 指标卡片 - 复用系统数据卡片规范 */
.stats-metric-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-fast);
}

.stats-metric-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface);
}

.stats-metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.stats-metric-icon svg {
    width: 20px;
    height: 20px;
}

.stats-metric-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-body);
    line-height: 1.2;
}

.stats-metric-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.stats-metric-sub {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 统计块 - 统一模块样式 */
.stats-block {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.stats-block:last-child {
    margin-bottom: 0;
}

/* 块标题区 */
.stats-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-block-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-body);
    margin: 0;
}

/* 分段控制器 - 复用语言切换器样式 */
.stats-segmented-control {
    display: flex;
    background: var(--bg-surface);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.stats-segment {
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.stats-segment:hover {
    color: var(--text-body);
}

.stats-segment.active {
    background: var(--accent-primary);
    color: #ffffff;
}

/* 图表容器 */
.stats-chart-wrapper {
    height: 300px;
    position: relative;
}

/* 标签页 - 复用系统标签页样式 */
.stats-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.stats-tab {
    padding: 12px 4px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.stats-tab:hover {
    color: var(--text-body);
}

.stats-tab.active {
    color: var(--accent-primary);
    font-weight: 500;
}

.stats-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

/* 分页 - 复用系统分页样式 */
.stats-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.stats-page-btn {
    padding: 6px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.stats-page-btn:hover:not(:disabled) {
    border-color: var(--border-hover);
    color: var(--text-body);
}

.stats-page-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.stats-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 1200px) {
    .stats-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-cards-row {
        grid-template-columns: 1fr;
    }

    .stats-block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stats-segmented-control {
        width: 100%;
    }

    .stats-segment {
        flex: 1;
        text-align: center;
    }
}

/* 面板 */
.admin-view-panel {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* 表格容器 */
.users-table-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    overflow: hidden;
}

/* 表格 */
.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-default);
}

.users-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text-body);
    border-bottom: 1px solid var(--border-subtle);
}

.users-table tbody tr:last-child td {
    border-bottom: none;
}

.users-table tbody tr:hover {
    background: var(--bg-surface);
}

/* 用户角色 */
.user-role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.user-role-badge.admin {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

.user-role-badge.user {
    background: var(--bg-surface);
    color: var(--text-secondary);
}

/* 用户状态 */
.user-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.user-status-badge.approved {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.user-status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.user-status-badge.disabled {
    background: var(--bg-surface);
    color: var(--text-tertiary);
}

/* 操作按钮 */
.user-action-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-right: 8px;
}

.user-action-btn:last-child {
    margin-right: 0;
}

.user-action-btn.approve {
    background: var(--success);
    color: white;
}

.user-action-btn.approve:hover {
    background: #16a34a;
}

.user-action-btn.reject {
    background: var(--error);
    color: white;
}

.user-action-btn.reject:hover {
    background: #dc2626;
}

.user-action-btn.disable {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

.user-action-btn.disable:hover {
    background: var(--border-default);
}

/* 编辑按钮 - Linear风格 */
.user-action-btn.edit {
    background: transparent;
    color: #a1a1aa;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
}

.user-action-btn.edit:hover {
    background: #18181b;
    color: #e4e4e7;
}

/* 启用按钮 */
.user-action-btn.enable {
    background: transparent;
    color: #a1a1aa;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
}

.user-action-btn.enable:hover {
    background: #18181b;
    color: #e4e4e7;
}

/* 操作列单元格 */
.user-actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 编辑用户弹窗 - 与个人设置弹窗风格统一 */
.edit-user-modal {
    width: 480px;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 24px;
}

.edit-user-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #27272a;
}

.edit-user-modal .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #e4e4e7;
    margin: 0;
}

.edit-user-modal .modal-close {
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.edit-user-modal .modal-close:hover {
    background: #202024;
    color: #e4e4e7;
}

.edit-user-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.edit-user-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-user-form .form-label {
    font-size: 12px;
    color: #a1a1aa;
    font-weight: 500;
}

.edit-user-form .form-static-text {
    font-size: 14px;
    color: #71717a;
    padding: 10px 12px;
    background: #202024;
    border-radius: 6px;
    border: 1px solid #27272a;
}

.edit-user-form .form-input,
.edit-user-form .form-select {
    padding: 10px 12px;
    font-size: 14px;
    color: #e4e4e7;
    background: #202024;
    border: 1px solid #27272a;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
}

.edit-user-form .form-input:hover,
.edit-user-form .form-select:hover,
.edit-user-form .form-input:focus,
.edit-user-form .form-select:focus {
    border-color: #3b82f6;
}

.edit-user-form .form-input::placeholder {
    color: #71717a;
}

.edit-user-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #27272a;
}

.edit-user-modal .btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.edit-user-modal .btn-text {
    color: #a1a1aa;
    background: transparent;
}

.edit-user-modal .btn-text:hover {
    background: #18181b;
    color: #e4e4e7;
}

.edit-user-modal .btn-primary {
    color: #ffffff;
    background: #3b82f6;
}

.edit-user-modal .btn-primary:hover {
    background: #2563eb;
}

/* 空状态 */
.empty-state {
    padding: 48px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   加载遮罩层
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(14, 14, 16, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-default);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-5);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.loading-subtext {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   登录/注册弹窗 - Linear 风格
   ======================================== */

/* 弹窗遮罩 */
.auth-modal {
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

/* 登录卡片 */
.auth-card {
    width: 420px;
    max-width: 90vw;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 40px 32px 32px;
}

/* 品牌区 */
.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.auth-brand-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-body);
    margin: 0 0 4px 0;
}

.auth-brand-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0;
}

/* 标签页 */
.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.auth-tab {
    padding: 0;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast);
}

.auth-tab:hover {
    color: var(--text-body);
}

.auth-tab.active {
    color: var(--accent-primary);
    font-weight: 500;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

/* 表单 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.auth-form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--text-body);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast);
    box-sizing: border-box;
}

.auth-form-input::placeholder {
    color: var(--text-tertiary);
}

.auth-form-input:hover {
    border-color: var(--border-hover);
}

.auth-form-input:focus {
    border-color: var(--accent-primary);
}

/* 错误提示 */
.auth-form-error {
    font-size: 12px;
    color: var(--error);
    min-height: 16px;
}

/* 提示文字 */
.auth-form-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    margin: 0;
}

/* 提交按钮 */
.auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-primary);
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast);
    margin-top: 8px;
}

.auth-submit-btn:hover {
    background: #2563eb;
}

/* ========================================
   翻译历史页面 - Linear 极简风格
   ======================================== */

/* 页面容器 */
.history-container {
    padding: 0;
    flex: 1;
    overflow-y: auto;
    background: var(--bg-base);
}

/* 顶部标题栏 */
.history-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-base);
}

.history-page-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.history-page-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* 搜索工具栏 */
.history-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-base);
}

.history-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.history-filters .search-input {
    width: 320px;
    padding: 8px 12px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 400;
    outline: none;
    transition: border-color var(--transition-fast);
}

.history-filters .search-input::placeholder {
    color: var(--text-tertiary);
}

.history-filters .search-input:hover {
    border-color: var(--border-hover);
}

.history-filters .search-input:focus {
    border-color: var(--accent-primary);
}

.history-filters .form-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 400;
}

/* 刷新按钮 */
#refreshHistoryBtn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

#refreshHistoryBtn:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* 列表区域 */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 24px;
}

.history-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 400;
}

/* 列表项卡片 */
.history-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    transition: border-color var(--transition-fast);
}

.history-item:hover {
    border-color: var(--border-hover);
}

/* 文件图标 */
.history-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-surface);
    flex-shrink: 0;
}

/* 内容区 */
.history-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-filename {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-summary {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    font-size: 12px;
    color: var(--text-tertiary);
}

.history-meta span {
    display: inline;
}

.history-meta span:not(:last-child)::after {
    content: ' · ';
    color: var(--text-tertiary);
}

/* 状态标签 - 文字+圆点 */
.history-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
    white-space: nowrap;
}

.history-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.history-status.completed::before {
    background: var(--success);
}

.history-status.processing::before {
    background: var(--warning);
}

.history-status.failed::before {
    background: var(--error);
}

/* 操作区 */
.history-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.history-actions .btn-download {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-actions .btn-download:hover {
    background: var(--bg-surface);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.history-actions .btn-delete {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-tertiary);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-actions .btn-delete:hover {
    color: var(--error);
}

.history-actions .btn-delete:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.history-actions .btn-delete:disabled:hover {
    color: var(--text-tertiary);
    background: transparent;
}

/* 分页 */
.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

.history-pagination .btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .logo, .nav-label, .stat-label {
        display: none;
    }

    .nav-item span {
        display: none;
    }

    .stats {
        flex-direction: column;
        align-items: center;
    }
}
