/* =========================================================
   HR 智能简历过滤系统 — AdsPower 风格 UI
   ========================================================= */

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

:root {
    /* 侧栏颜色 */
    --sb-bg:          #1a1d26;
    --sb-hover:       rgba(255,255,255,.06);
    --sb-active:      rgba(99,120,255,.18);
    --sb-active-txt:  #8294ff;
    --sb-border:      rgba(255,255,255,.07);
    --sb-icon:        rgba(255,255,255,.55);
    --sb-text:        rgba(255,255,255,.65);
    --sb-brand:       #fff;
    --sb-width:       220px;
    --sb-collapsed:   56px;

    /* 主内容颜色 */
    --bg:             #f0f2f7;
    --card:           #ffffff;
    --border:         #e4e7ef;
    --text-primary:   #1e2235;
    --text-secondary: #6b7280;

    /* 品牌色 */
    --accent:         #5b72ff;
    --accent-hover:   #4a61ee;
    --green:          #10b77f;
    --green-hover:    #0ea270;

    /* 分值颜色 */
    --score9-bg:      rgba(239,68,68,.1);
    --score9-border:  #ef4444;
    --score9-badge:   #ef4444;
    --score8-bg:      rgba(249,115,22,.1);
    --score8-border:  #f97316;
    --score8-badge:   #f97316;
    --score7-bg:      rgba(234,179,8,.1);
    --score7-border:  #eab308;
    --score7-badge:   #ca8a04;

    /* 过渡 */
    --trans: .25s ease;
}

html, body { height: 100%; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif; }
body { background: var(--bg); color: var(--text-primary); font-size: 13px; }

/* ── 整体布局 ─────────────────────────────── */
.app-root {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── 侧栏 ──────────────────────────────────── */
.sidebar {
    width: var(--sb-width);
    min-width: var(--sb-width);
    background: var(--sb-bg);
    display: flex;
    flex-direction: column;
    transition: width var(--trans), min-width var(--trans);
    overflow: hidden;
    flex-shrink: 0;
    z-index: 100;
}
.sidebar.collapsed {
    width: var(--sb-collapsed);
    min-width: var(--sb-collapsed);
}

/* 品牌区 */
.sidebar-header {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 14px;
    border-bottom: 1px solid var(--sb-border);
    flex-shrink: 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    overflow: hidden;
}
.brand-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #5b72ff, #9b59f5);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(91,114,255,.4);
}
.brand-name {
    color: var(--sb-brand);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--trans);
}
.sidebar.collapsed .brand-name { opacity: 0; }

/* 折叠按钮 */
.collapse-btn {
    background: none;
    border: none;
    color: var(--sb-icon);
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    transition: color var(--trans), background var(--trans), transform var(--trans);
}
.collapse-btn:hover { color: #fff; background: var(--sb-hover); }
.sidebar.collapsed .collapse-btn { transform: rotate(180deg); }

/* 导航 */
.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

/* 一级菜单项 */
.menu-parent {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--trans);
    gap: 10px;
    position: relative;
}
.menu-parent:hover { background: var(--sb-hover); }

/* 二级子菜单 */
.menu-children {
    overflow: hidden;
    max-height: 300px;
    transition: max-height .3s ease;
    background: rgba(0,0,0,.15);
}
.menu-children.collapsed-children { max-height: 0; }
.sidebar.collapsed .menu-children { max-height: 0; }

.menu-child {
    display: flex;
    align-items: center;
    padding: 9px 14px 9px 30px;
    cursor: pointer;
    gap: 10px;
    transition: background var(--trans);
}
.menu-child:hover { background: var(--sb-hover); }
.menu-child.active { background: var(--sb-active); }
.menu-child.active .menu-icon,
.menu-child.active .menu-label { color: var(--sb-active-txt); }

.sidebar.collapsed .menu-child { padding-left: 14px; }

/* 菜单图标/标签/箭头 */
.menu-icon { font-size: 14px; color: var(--sb-icon); min-width: 18px; text-align: center; flex-shrink: 0; }
.menu-label { color: var(--sb-text); font-size: 13px; white-space: nowrap; opacity: 1; transition: opacity var(--trans); flex: 1; }
.menu-arrow { color: rgba(255,255,255,.3); font-size: 10px; flex-shrink: 0; transition: transform var(--trans), opacity var(--trans); }
.menu-arrow.rotated { transform: rotate(-90deg); }

.sidebar.collapsed .menu-label,
.sidebar.collapsed .menu-arrow { opacity: 0; }

/* 侧栏 tooltip（折叠态悬停） */
.sidebar.collapsed .menu-parent { position: relative; }
.sidebar.collapsed .menu-parent:hover::after,
.sidebar.collapsed .menu-child:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #2d3148;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    z-index: 999;
}

/* 侧栏底部 */
.sidebar-footer {
    border-top: 1px solid var(--sb-border);
    padding: 10px 0;
    flex-shrink: 0;
}
.version-info {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    gap: 10px;
}
.version-text { font-size: 11px; color: rgba(255,255,255,.25); white-space: nowrap; }

/* ── 垂直分隔条 ───────────────────────────── */
.v-divider {
    width: 1px;
    background: var(--border);
    flex-shrink: 0;
}

/* ── 右侧内容根 ───────────────────────────── */
.content-root {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* 顶部栏 */
.page-topbar {
    height: 44px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    flex-shrink: 0;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}
.breadcrumb i { font-size: 12px; }
.sep { color: #d1d5db; }
.crumb-active { color: var(--text-primary); font-weight: 500; }
.topbar-right { margin-left: auto; }
.model-badge {
    background: rgba(91,114,255,.1);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ── Tab 标签 ─────────────────────────────── */
.tab-bar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    flex-shrink: 0;
}
.tabs { display: flex; gap: 2px; }
.tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all var(--trans);
    white-space: nowrap;
}
.tab-btn i { font-size: 12px; }
.tab-btn:hover { color: var(--accent); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.tab-count {
    min-width: 20px;
    height: 18px;
    background: #e8eaef;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tab-count.done { background: rgba(16,183,127,.15); color: var(--green); }

/* ── 工具栏 ───────────────────────────────── */
.toolbar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 20px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--trans);
    font-family: inherit;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-load  { background: var(--accent); color: #fff; }
.btn-load:hover:not(:disabled)  { background: var(--accent-hover); }
.btn-ghost { background: #f3f4f8; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: #e8eaef; }
.btn-jd { background: #f0f4ff; color: var(--accent); border: 1px solid rgba(91,114,255,.3); }
.btn-jd:hover { background: #e4eaff; }
.btn-filter { background: var(--green); color: #fff; }
.btn-filter:hover:not(:disabled) { background: var(--green-hover); }

/* JD 岗位画像区 */
.jd-area { flex: 1; min-width: 0; }
.jd-header {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}
.jd-textarea {
    width: 100%;
    height: 82px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: #fafbfd;
    resize: vertical;
    transition: border-color var(--trans), box-shadow var(--trans);
    line-height: 1.55;
}
.jd-textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(91,114,255,.1);
}
.jd-textarea::placeholder { color: #b0b8c8; line-height: 1.6; }
.toolbar-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}
.toolbar-btn-row {
    display: flex;
    gap: 6px;
}

/* 过滤行 */
.filter-row th {
    padding: 5px 6px;
    background: #f0f2f9;
    border-bottom: 1px solid #e4e7ef;
}
.col-filter {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #d1d5e0;
    border-radius: 5px;
    font-size: 12px;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color var(--trans);
}
.col-filter:hover { border-color: var(--accent); }
.col-filter:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91,114,255,.12); }

/* ── 面板区 ───────────────────────────────── */
.panels { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.panel { display: none; flex: 1; overflow: hidden; flex-direction: column; }
.panel.active { display: flex; }

/* 滚动容器 */
.grid-scroll {
    flex: 1;
    overflow: auto;
    margin: 16px 20px;
    background: var(--card);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border: 1px solid var(--border);
}
.grid-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.grid-scroll::-webkit-scrollbar-thumb { background: #cdd0da; border-radius: 3px; }
.grid-scroll::-webkit-scrollbar-track { background: transparent; }

/* ── DataGrid ──────────────────────────────── */
.resume-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.resume-grid thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8f9fc;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #5a6282;
    border-bottom: 2px solid #eaecf5;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: .02em;
}
.resume-grid thead th:first-child { border-radius: 10px 0 0 0; }
.resume-grid thead th:last-child  { border-radius: 0 10px 0 0; }

.resume-grid tbody tr {
    border-bottom: 1px solid #f3f4f8;
    transition: background var(--trans);
}
.resume-grid tbody tr:last-child { border-bottom: none; }
.resume-grid tbody tr:hover { background: #f7f8fc !important; }
.resume-grid tbody td {
    padding: 10px 14px;
    vertical-align: middle;
    white-space: nowrap;
}

/* 列宽 */
.col-id     { width: 55px; }
.col-name   { width: 80px; }
.col-pos    { min-width: 120px; }
.col-gender { width: 52px; }
.col-age    { width: 52px; }
.col-major  { min-width: 120px; }
.col-edu    { width: 70px; }
.col-file   { min-width: 150px; }
.col-score  { width: 80px; text-align: center; }
.col-reason { min-width: 180px; }

/* 分值行颜色 */
.score-row-9 { background: var(--score9-bg) !important; border-left: 3px solid var(--score9-border); }
.score-row-8 { background: var(--score8-bg) !important; border-left: 3px solid var(--score8-border); }
.score-row-7 { background: var(--score7-bg) !important; border-left: 3px solid var(--score7-border); }

/* 分值徽章 */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
}
.badge-9 { background: var(--score9-badge); color: #fff; box-shadow: 0 2px 6px rgba(239,68,68,.35); }
.badge-8 { background: var(--score8-badge); color: #fff; box-shadow: 0 2px 6px rgba(249,115,22,.35); }
.badge-7 { background: var(--score7-badge); color: #fff; box-shadow: 0 2px 6px rgba(202,138,4,.35); }
.badge-0 { background: #eaecf0; color: #9ca3af; font-size: 16px; }

/* 文件链接 */
.file-cell { display: flex; align-items: center; gap: 5px; color: var(--accent); font-size: 12px; max-width: 160px; text-decoration: none; }
.file-cell:hover .file-name { text-decoration: underline; }
.file-cell i { flex-shrink: 0; font-size: 13px; }
.file-name { overflow: hidden; text-overflow: ellipsis; }

/* 匹配说明 */
.reason-cell { color: var(--text-secondary); font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

/* 姓名 */
.name-cell { font-weight: 600; color: var(--text-primary); }

/* ── 已完成分组 ────────────────────────────── */
.completed-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.completed-scroll::-webkit-scrollbar { width: 6px; }
.completed-scroll::-webkit-scrollbar-thumb { background: #cdd0da; border-radius: 3px; }

.session-card {
    background: var(--card);
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
}
.session-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: #f8f9fc;
    flex-wrap: wrap;
}
.session-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.session-meta { color: var(--text-secondary); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.session-tag {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.tag-matched   { background: rgba(16,183,127,.12); color: var(--green); }
.tag-unmatched { background: #f3f4f8; color: #9ca3af; }
.session-toggle {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 5px;
    transition: background var(--trans);
}
.session-toggle:hover { background: #eaecf0; }
.session-card-body { overflow: auto; }
.session-card-body::-webkit-scrollbar { height: 5px; }
.session-card-body::-webkit-scrollbar-thumb { background: #cdd0da; border-radius: 3px; }
.session-card-body.collapsed-body { display: none; }

.session-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.session-grid thead th {
    padding: 9px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    background: #f8f9fc;
    border-bottom: 1px solid #eaecf5;
    white-space: nowrap;
}
.session-grid tbody tr { border-bottom: 1px solid #f3f4f8; transition: background var(--trans); }
.session-grid tbody tr:last-child { border-bottom: none; }
.session-grid tbody tr:hover { background: #f7f8fc !important; }
.session-grid tbody td { padding: 9px 14px; vertical-align: middle; white-space: nowrap; }

/* ── 空状态 ───────────────────────────────── */
.empty-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    color: #c5cad8;
}
.empty-icon { font-size: 56px; margin-bottom: 6px; }
.empty-title { font-size: 15px; font-weight: 600; color: #9ca3af; }
.empty-hint { font-size: 13px; text-align: center; line-height: 1.6; }
.empty-hint strong { color: var(--accent); }

/* ── 简历预览弹窗 ─────────────────────────── */
.rv-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,17,30,.55);
    z-index: 8000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    padding: 24px;
}
.rv-overlay.show { display: flex; }

.rv-card {
    background: #fff;
    border-radius: 14px;
    width: 760px;
    max-width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.22);
    overflow: hidden;
}

.rv-card-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: #f8f9fc;
    flex-shrink: 0;
    gap: 12px;
}
.rv-card-title { font-weight: 600; font-size: 14px; color: var(--text-primary); display: flex; align-items: center; gap: 7px; }
.rv-card-title i { color: #2b7cd3; }
.rv-card-actions { display: flex; align-items: center; gap: 8px; }
/* 姓名行 + 内嵌分值 */
.rv-name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 4px;
}
.rv-name-row h1.rv-doc-h1 {
    margin-bottom: 0;
    flex: 1;
}
/* 教师批改风格分值 */
.rv-score-stamp {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    margin-top: 2px;
    padding: 0 8px;
}
.rv-stamp-num {
    font-size: 58px;
    font-weight: 900;
    color: #d92020;
    line-height: 1;
    letter-spacing: -3px;
    font-family: Georgia, "Times New Roman", serif;
}
.rv-stamp-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 58px;
    margin-top: 7px;
}
.rv-stamp-line {
    display: block;
    height: 2.5px;
    background: #d92020;
    border-radius: 2px;
    transform: rotate(-10deg);
    opacity: 0.85;
}
.rv-stamp-label {
    font-size: 11px;
    color: #d92020;
    opacity: 0.6;
    margin-top: 6px;
    letter-spacing: .05em;
}
.rv-close-btn {
    width: 30px; height: 30px;
    border: none; background: none; cursor: pointer;
    color: var(--text-secondary); font-size: 15px;
    border-radius: 6px; display: flex; align-items: center; justify-content: center;
    transition: background var(--trans), color var(--trans);
}
.rv-close-btn:hover { background: #eaecf0; color: var(--text-primary); }

.rv-card-body {
    flex: 1;
    overflow-y: auto;
    padding: 36px 48px;
}
.rv-card-body::-webkit-scrollbar { width: 6px; }
.rv-card-body::-webkit-scrollbar-thumb { background: #cdd0da; border-radius: 3px; }

/* 简历内容样式 */
.rv-name {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1d26;
    letter-spacing: .02em;
    margin-bottom: 6px;
}
.rv-pos {
    text-align: center;
    font-size: 15px;
    color: var(--accent);
    margin-bottom: 20px;
}
.rv-divider {
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #9b59f5);
    border-radius: 2px;
    margin-bottom: 24px;
}
.rv-section {
    margin-bottom: 22px;
}
.rv-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.rv-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.rv-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
}
.rv-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: #f8f9fc;
    border-radius: 7px;
    border: 1px solid var(--border);
}
.rv-label {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 52px;
}
.rv-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.rv-score-block {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: #f8f9fc;
    border-radius: 9px;
    border: 1px solid var(--border);
    margin-bottom: 10px;
}
.rv-score-circle {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.rv-score-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.rv-score-reason { font-size: 13px; color: var(--text-primary); line-height: 1.6; }
.rv-file-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--accent);
}
.rv-footer-note {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: #c5cad8;
    text-align: center;
}

/* ── AI 加载蒙层 ───────────────────────────── */
.ai-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,17,30,.6);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}
.ai-loading.show { display: flex; }
.ai-loading-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 48px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    min-width: 320px;
}
.ai-pulse {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pulse-ring {
    position: absolute;
    border-radius: 50%;
    background: rgba(91,114,255,.15);
    animation: pulse-expand 2s ease-out infinite;
}
.r1 { width: 72px; height: 72px; animation-delay: 0s; }
.r2 { width: 72px; height: 72px; animation-delay: .5s; }
.r3 { width: 72px; height: 72px; animation-delay: 1s; }
@keyframes pulse-expand {
    0%   { transform: scale(.5); opacity: .8; }
    100% { transform: scale(1.6); opacity: 0; }
}
.ai-stars-icon {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}
.ai-star {
    color: #fbbf24;
    animation: star-pop 1.6s ease-in-out infinite;
}
.ai-star.s1 { font-size: 14px; animation-delay: 0s; }
.ai-star.s2 { font-size: 22px; animation-delay: 0.22s; }
.ai-star.s3 { font-size: 14px; animation-delay: 0.44s; }
@keyframes star-pop {
    0%,100% { transform: scale(1) rotate(0deg);   text-shadow: 0 0 4px rgba(251,191,36,.4); }
    35%     { transform: scale(1.4) rotate(20deg); text-shadow: 0 0 18px rgba(251,191,36,1), 0 0 36px rgba(251,191,36,.5); }
    70%     { transform: scale(0.85) rotate(-10deg); text-shadow: 0 0 6px rgba(251,191,36,.6); }
}
.ai-loading-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.ai-loading-sub   { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.ai-progress-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}
.ai-progress-label { font-size: 12px; color: var(--text-secondary); }
.ai-pct-num {
    font-size: 26px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -1px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    min-width: 52px;
    text-align: right;
}
.ai-progress { height: 6px; background: #eaecf0; border-radius: 3px; overflow: hidden; }
.ai-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--green));
    border-radius: 3px;
    width: 0%;
    transition: width 0.25s ease;
    position: relative;
    overflow: hidden;
}
.ai-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 50%, transparent 100%);
    animation: shimmer-bounce 1.3s ease-in-out infinite alternate;
}
@keyframes shimmer-bounce {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ── Toast 通知 ───────────────────────────── */
#toastBox {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,.2);
    animation: toast-in .3s ease;
    pointer-events: all;
    max-width: 360px;
}
@keyframes toast-in { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-success { background: #10b77f; }
.toast-error   { background: #ef4444; }
.toast-info    { background: var(--accent); }
.toast-warn    { background: #f59e0b; }
.toast-fade { animation: toast-out .3s ease forwards; }
@keyframes toast-out { to { transform: translateX(120%); opacity: 0; } }

/* ── 简历预览：教育经历 ───────────────────── */
.rv-edu-card {
    padding: 12px 16px;
    background: #f8f9fc;
    border-radius: 8px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
}
.rv-edu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    gap: 8px;
}
.rv-edu-school { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.rv-edu-period { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.rv-edu-detail { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.rv-dot { color: #d1d5db; }

/* ── 简历预览：工作经历 ───────────────────── */
.rv-work-list { display: flex; flex-direction: column; gap: 10px; }
.rv-work-item {
    padding: 12px 16px;
    background: #f8f9fc;
    border-radius: 8px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
}
.rv-work-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.rv-work-title  { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.rv-work-company { font-size: 12px; color: var(--accent); font-weight: 500; }
.rv-work-period { font-size: 12px; color: var(--text-secondary); margin-left: auto; white-space: nowrap; }
.rv-work-desc   { font-size: 12px; color: var(--text-secondary); line-height: 1.65; }

/* ── 右侧智能助手工具条 ───────────────────── */
.assistant-bar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    background: var(--card);
    border-radius: 12px 0 0 12px;
    box-shadow: -3px 0 20px rgba(91,114,255,.1), -1px 0 0 var(--border);
    z-index: 800;
}
.assistant-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 10px;
    transition: background var(--trans), transform var(--trans);
}
.assistant-btn:hover { background: rgba(91,114,255,.09); transform: scale(1.06); }
.assistant-btn.active { background: rgba(91,114,255,.14); }
.yiyi-avatar-svg { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: block; }
.kefu-img { width: 100%; height: 100%; object-fit: cover; display: block; transform: rotate(-15deg) scale(1.22); }

/* 统一所有云助手头像尺寸 */
.assistant-label { font-size: 10px; font-weight: 700; color: #5b72ff; letter-spacing: .03em; }

/* ── YiYi 对话框 ──────────────────────────── */
.yiyi-chat {
    position: fixed;
    right: 72px;
    bottom: 28px;
    width: 380px;
    height: 520px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(91,114,255,.18), 0 2px 12px rgba(0,0,0,.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 801;
    border: 1px solid var(--border);
}
.yiyi-chat.show {
    display: flex;
    animation: chat-pop .25s ease;
}
@keyframes chat-pop {
    from { opacity: 0; transform: translateY(16px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.yiyi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #2d1b69 0%, #4338ca 50%, #6366f1 100%);
    flex-shrink: 0;
}
.yiyi-header-left { display: flex; align-items: center; gap: 10px; }
.yiyi-avatar-sm {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.4);
    flex-shrink: 0;
    overflow: hidden;
}
.yiyi-name { font-size: 13px; font-weight: 700; color: #fff; }
.yiyi-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,.78);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
}
.yiyi-subtitle::before {
    content: '';
    width: 6px; height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: online-blink 2.2s ease infinite;
}
@keyframes online-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}
.yiyi-close {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    cursor: pointer;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    transition: background var(--trans);
    flex-shrink: 0;
}
.yiyi-close:hover { background: rgba(255,255,255,.3); }

.yiyi-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f4f6fc;
}
.yiyi-messages::-webkit-scrollbar { width: 4px; }
.yiyi-messages::-webkit-scrollbar-thumb { background: #cdd0da; border-radius: 2px; }

.yiyi-msg { display: flex; gap: 8px; align-items: flex-end; }
.yiyi-msg.user { flex-direction: row-reverse; }

.yiyi-msg-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.yiyi-user-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}
.yiyi-user-avatar svg { width: 100%; height: 100%; display: block; }

.yiyi-bubble {
    max-width: 272px;
    padding: 10px 13px;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}
.yiyi-msg.bot .yiyi-bubble {
    background: var(--card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 4px 14px 14px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.yiyi-msg.user .yiyi-bubble {
    background: #5b72ff;
    color: #fff;
    border-radius: 14px 4px 14px 14px;
}

.yiyi-thinking-bubble { display: flex; align-items: center; gap: 10px; }
.yiyi-thinking-text {
    font-size: 12px; color: #6b7280;
    animation: thinking-fade 1.4s ease-in-out infinite;
}
@keyframes thinking-fade {
    0%, 100% { opacity: .45; }
    50% { opacity: 1; }
}
.yiyi-typing { display: flex; align-items: center; gap: 5px; padding: 2px 0; flex-shrink: 0; }
.yiyi-dot {
    width: 7px; height: 7px;
    background: #5b72ff;
    border-radius: 50%;
    animation: dot-wave .9s ease-in-out infinite;
}
.yiyi-dot:nth-child(2) { animation-delay: .18s; }
.yiyi-dot:nth-child(3) { animation-delay: .36s; }
@keyframes dot-wave {
    0%, 60%, 100% { transform: translateY(0) scale(1); opacity: .35; }
    30% { transform: translateY(-5px) scale(1.2); opacity: 1; }
}
/* Markdown 内容样式 */
.yiyi-bubble.yiyi-md { max-width: 300px; }
.yiyi-md p { margin: 0 0 6px; }
.yiyi-md p:last-child { margin-bottom: 0; }
.yiyi-md h1,.yiyi-md h2,.yiyi-md h3,.yiyi-md h4 {
    font-size: 13px; font-weight: 700; margin: 8px 0 4px; color: #1e2235;
}
.yiyi-md ul,.yiyi-md ol { margin: 4px 0 6px; padding-left: 18px; }
.yiyi-md li { margin-bottom: 3px; line-height: 1.55; }
.yiyi-md code {
    background: #f0f1f5; border-radius: 3px;
    padding: 1px 5px; font-size: 12px; font-family: 'Menlo','Consolas',monospace;
}
.yiyi-md pre {
    background: #f0f1f5; border-radius: 6px;
    padding: 10px 12px; margin: 6px 0;
    overflow-x: auto; font-size: 12px; line-height: 1.6;
}
.yiyi-md pre code { background: none; padding: 0; }
.yiyi-md hr { border: none; border-top: 1px solid #e5e7eb; margin: 8px 0; }
.yiyi-md strong { color: #1e2235; }
.yiyi-md blockquote {
    border-left: 3px solid #5b72ff; margin: 6px 0;
    padding: 4px 10px; color: #6b7280; font-style: italic;
}

.yiyi-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--card);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.yiyi-input {
    flex: 1;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: #f8f9fc;
    transition: border-color var(--trans), box-shadow var(--trans);
}
.yiyi-input:focus { border-color: #5b72ff; background: #fff; box-shadow: 0 0 0 2px rgba(91,114,255,.15); }
.yiyi-send {
    width: 34px; height: 34px;
    background: #5b72ff;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: background var(--trans), transform var(--trans);
}
.yiyi-send:hover:not(:disabled) { background: #4a61ee; transform: scale(1.1); }
.yiyi-send:disabled { opacity: .45; cursor: not-allowed; }

/* ── Word 内容在线预览 ───────────────────────── */
.rv-loading {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 14px; padding: 60px 20px;
    color: var(--text-secondary); font-size: 14px;
}
.rv-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(91,114,255,.15);
    border-top-color: #5b72ff;
    border-radius: 50%;
    animation: rv-spin 0.8s linear infinite;
}
@keyframes rv-spin { to { transform: rotate(360deg); } }
.rv-error {
    display: flex; align-items: center; gap: 10px;
    padding: 40px 24px; color: #ef4444; font-size: 14px;
}
.rv-error i { font-size: 20px; flex-shrink: 0; }
.rv-word-content {
    padding: 28px 36px;
    font-size: 14px; line-height: 1.9; color: #374151;
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
}
.rv-word-content h1.rv-doc-h1 {
    font-size: 22px; font-weight: 700; color: #1e2235;
    text-align: center; margin: 0 0 8px;
}
.rv-word-content p.rv-doc-subtitle {
    font-size: 13px; color: #5b72ff; text-align: center;
    margin: 0 0 18px; letter-spacing: .03em;
}
.rv-word-content h2.rv-doc-h2 {
    font-size: 15px; font-weight: 600; color: #5b72ff;
    margin: 22px 0 10px;
    padding: 0 0 6px;
    border-bottom: 1px solid #e8eaff;
}
.rv-word-content p {
    margin: 0 0 5px;
}
.rv-word-content strong { color: #1e2235; }
.rv-word-content table {
    width: 100%; border-collapse: collapse; margin: 10px 0;
    font-size: 13px;
}
.rv-word-content table td, .rv-word-content table th {
    border: 1px solid #e4e7ef; padding: 6px 10px;
}
.rv-word-content table th { background: #f0f4ff; font-weight: 600; }

/* ── AI 评审结果卡片 ─────────────────────── */
.rv-ai-review {
    margin: 0 36px 28px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #3b82f6;
    background: #fff;
}
.rv-ai-review-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px 9px 15px;
    background: #dbeafe;
    border-bottom: 1px solid #bfdbfe;
}
.rv-ai-review-icon {
    font-size: 13px;
    color: #2563eb;
    flex-shrink: 0;
}
.rv-ai-review-title {
    font-size: 11px;
    font-weight: 600;
    color: #1d4ed8;
    letter-spacing: .07em;
    text-transform: uppercase;
    flex: 1;
}
.rv-ai-score-pill {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}
.rv-ai-review-body {
    padding: 13px 15px;
    font-size: 13px;
    line-height: 1.85;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── 滚动条全局 ───────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #cdd0da; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b8bcc8; }
::-webkit-scrollbar-track { background: transparent; }
