/* ============================================================
   分子管理与上传平台 · 浅色「Soybean 紫」主题
   设计语言取自参考项目（国内库苯环分子-文献苯环反应展示）：
   浅灰底 + 白色圆角卡 + 紫色主色渐变 + 柔和阴影 + hover 上浮。
   全站手写 CSS，不依赖 Tailwind / Material Symbols。
   ============================================================ */
:root {
    --primary: #8b5cf6;
    --primary-2: #6366f1;
    --primary-grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --bg: #f5f5f5;
    --card: #ffffff;
    --border: #e5e7eb;
    --border-hover: #c4b5fd;
    --text: #1f2937;
    --text-muted: #6b7280;
    --text-faint: #9ca3af;
    --danger: #ef4444;
    --success: #10b981;
    --warn: #f59e0b;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 24px rgba(139, 92, 246, 0.12);
    --mono: 'SFMono-Regular', 'Courier New', ui-monospace, Menlo, Consolas, monospace;
    --sans: 'Segoe UI', Tahoma, Geneva, Verdana, system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

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

html, body { height: 100%; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }
svg { display: block; }

/* ===================== 整体布局 ===================== */
.app-shell { display: flex; min-height: 100vh; }

/* ---- 侧边栏 ---- */
.sidebar {
    width: 210px;
    flex-shrink: 0;
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
    z-index: 50;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-img { width: 32px; height: 32px; flex-shrink: 0; color: var(--primary); }
.sidebar-logo .logo-title {
    font-size: 13.5px; font-weight: 800; line-height: 1.3; color: var(--primary);
    letter-spacing: .2px;
}
.sidebar-logo .logo-sub { font-size: 10px; color: var(--text-faint); font-family: var(--mono); margin-top: 2px; }

.sidebar-nav {
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
/* 一级菜单项：图标在上、文本在下（对标参考项目 Soybean first-level-menu） */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 4px;
    border-radius: 10px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
    border: none;
    background: transparent;
    font-family: inherit;
    width: 100%;
    transition: all .25s ease;
}
.nav-item:hover { background: rgba(0, 0, 0, 0.05); }
.nav-item:active { transform: scale(0.97); }
.nav-item .nav-icon { display: flex; align-items: center; justify-content: center; color: inherit; }
.nav-item .nav-label { font-size: 12.5px; line-height: 1.25; color: inherit; text-align: center; }
.nav-item.active { background: rgba(139, 92, 246, 0.1); color: var(--primary); }
.nav-item.active .nav-label { font-weight: 700; }

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-faint);
    text-align: center;
    line-height: 1.5;
}

/* 左下角「账户中心」入口 */
.sidebar-footer-area { padding: 10px; border-top: 1px solid var(--border); }
.sidebar-account-btn {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 11px 12px; border-radius: 10px; border: none; background: transparent;
    color: #4b5563; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .22s ease;
}
.sidebar-account-btn:hover { background: rgba(139, 92, 246, .1); color: var(--primary); }
.sidebar-account-btn.active { background: rgba(139, 92, 246, .1); color: var(--primary); }
.sidebar-account-btn .sa-icon {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary-grad); color: #fff; display: flex; align-items: center; justify-content: center;
}
.sidebar-account-btn .sa-icon svg { width: 17px; height: 17px; }
.sidebar-account-btn .sa-label { flex: 1; text-align: left; }
.sidebar-account-btn .sa-chevron { width: 16px; height: 16px; color: var(--text-faint); }

/* ---- 主区 ---- */
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 40;
}
.topbar-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar-titles h1 { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: .3px; }
.topbar-titles p { font-size: 12.5px; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.pill-btn {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 8px 16px; background: #faf5ff; color: var(--primary);
    border: 1px solid var(--border-hover); border-radius: 20px; cursor: pointer;
    font-size: 13px; font-weight: 600; font-family: inherit; transition: all .2s ease;
}
.pill-btn:hover { background: var(--primary-grad); color: #fff; border-color: transparent; text-decoration: none; }
.pill-btn svg { width: 16px; height: 16px; }

.user-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px;
    background: #faf5ff; border: 1px solid var(--border-hover); border-radius: 22px;
    cursor: pointer; transition: all .2s ease; font-family: inherit;
}
.user-chip:hover { box-shadow: var(--shadow-hover); }
.user-chip .avatar {
    width: 26px; height: 26px; border-radius: 50%; background: var(--primary-grad);
    color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-chip .avatar svg { width: 16px; height: 16px; }
.user-chip .uname { font-size: 13px; font-weight: 600; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%; background: #faf5ff;
    border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; transition: all .2s ease;
}
.icon-btn:hover { color: var(--danger); border-color: #fecaca; background: #fef2f2; }
.icon-btn svg { width: 18px; height: 18px; }

.content { padding: 24px 28px 48px; flex: 1; width: 100%; max-width: 1500px; margin: 0 auto; }

/* ===================== 页面内通用 ===================== */
.page-content { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.page-title { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: .3px; }
.page-sub { margin-top: 6px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px 24px; }

/* ---- 按钮 ---- */
.btn {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    padding: 9px 18px; border-radius: 10px; cursor: pointer; font-size: 13px;
    font-weight: 600; font-family: inherit; border: 1px solid transparent; transition: all .22s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 4px 14px rgba(139, 92, 246, .28); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(139, 92, 246, .4); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-secondary { background: #faf5ff; color: var(--primary); border-color: var(--border-hover); }
.btn-secondary:hover:not(:disabled) { background: rgba(139, 92, 246, .12); transform: translateY(-1px); }
.btn-ghost { background: var(--card); color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { color: var(--primary); border-color: var(--border-hover); background: #faf5ff; }
.btn-danger { background: #dc2626; color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(220, 38, 38, .25); }
.btn-danger:hover:not(:disabled) { background: #b91c1c; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(220, 38, 38, .35); }
.btn-danger:active:not(:disabled) { transform: translateY(0); }
.btn-block { width: 100%; justify-content: center; }
.btn.loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== 上传区 ===================== */
.drop-zone {
    border: 2px dashed var(--border-hover);
    border-radius: 16px;
    background: #fafaff;
    padding: 40px 24px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    cursor: pointer; transition: all .25s ease;
}
.drop-zone:hover { border-color: var(--primary); background: #f5f3ff; }
.drop-zone.drag-over { border-color: var(--primary); background: #ede9fe; transform: scale(1.005); }
.drop-zone .dz-icon { color: var(--primary); opacity: .8; }
.drop-zone .dz-icon svg { width: 44px; height: 44px; }
.drop-zone .dz-main { font-size: 15px; font-weight: 700; color: var(--text); }
.drop-zone .dz-exts { font-size: 12px; color: var(--text-faint); font-family: var(--mono); }
.dz-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.dz-chip { font-size: 11px; font-family: var(--mono); color: var(--text-muted); padding: 3px 10px; border: 1px solid var(--border); border-radius: 20px; background: #fff; }

.lib-status {
    margin-top: 16px; padding: 11px 16px; border-radius: 10px; font-size: 13px; font-family: var(--mono);
}
.lib-status-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.lib-status-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.lib-status-loading { background: #faf5ff; color: var(--primary); border: 1px solid var(--border-hover); }

/* ===================== 分子卡网格 ===================== */
.lib-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
@media (max-width: 1280px) { .lib-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 920px)  { .lib-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .lib-grid { grid-template-columns: 1fr; } }

.lib-card {
    position: relative;
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    padding: 14px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
    transition: all .28s ease;
}
.lib-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-2, #6366f1) inset, var(--shadow-sm); }
.lib-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.lib-card-svg-box {
    width: 100%; height: 170px; display: flex; align-items: center; justify-content: center;
    background: #fafafa; border: 1px solid var(--border); border-radius: 12px;
    margin-bottom: 12px; overflow: hidden; transition: all .28s ease;
}
.lib-card:hover .lib-card-svg-box { border-color: var(--border-hover); }
.lib-card-svg-box img { max-width: 100%; max-height: 100%; padding: 6px; }
.lib-card-svg-empty { font-size: 12px; color: var(--text-faint); font-family: var(--mono); }
.lib-card-info { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.lib-card-row { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.lib-card-key { flex-shrink: 0; width: 46px; color: var(--text-faint); font-weight: 600; }
.lib-card-val { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-card-smiles {
    font-family: var(--mono); font-size: 11.5px; color: #4338ca; background: #eef2ff;
    border: 1px solid #c7d2fe; border-radius: 7px; padding: 3px 8px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.lib-card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.lib-card-detail-btn, .lib-card-eval-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 7px 10px; border-radius: 9px; font-size: 12px; font-weight: 600; font-family: inherit;
    cursor: pointer; border: 1px solid var(--border); background: #faf5ff; color: var(--primary); transition: all .2s ease;
}
.lib-card-detail-btn:hover, .lib-card-eval-btn:hover { background: var(--primary-grad); color: #fff; border-color: transparent; }
.lib-card-detail-btn svg, .lib-card-eval-btn svg { width: 14px; height: 14px; }
/* 删除按钮（图标按钮，危险色） */
.lib-card-del-btn {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 34px; padding: 7px 0; border-radius: 9px; cursor: pointer;
    border: 1px solid var(--border); background: #fff; color: var(--text-faint); transition: all .2s ease;
}
.lib-card-del-btn:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.lib-card-del-btn svg { width: 15px; height: 15px; }
/* 卡片左上角多选框（仅作选中状态指示，点击整张卡片即可选中 → 自身不接收事件） */
.lib-card-check {
    position: absolute; top: 10px; left: 10px; z-index: 3;
    width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.92); border: 1px solid var(--border); border-radius: 8px;
    box-shadow: var(--shadow-sm); pointer-events: none;
}
.lib-card.selected .lib-card-check { border-color: var(--primary); }
.lib-card-check-input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; pointer-events: none; }
/* 待提交评估分子库网格：整张分子卡可点击选中 */
#libAllGrid .lib-card { cursor: pointer; }

/* 已提交过评估的分子：「重新提交」按钮（琥珀色，提示会覆盖原记录） */
.lib-card-eval-btn.resubmit { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.lib-card-eval-btn.resubmit:hover { background: #fef3c7; color: #b45309; border-color: #fcd34d; }

/* ===================== 分页 ===================== */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.pager-btn {
    min-width: 34px; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border);
    background: var(--card); color: var(--text-muted); font-size: 13px; font-family: var(--mono);
    cursor: pointer; transition: all .2s ease;
}
.pager-btn:hover:not(:disabled) { border-color: var(--border-hover); color: var(--primary); background: #faf5ff; }
.pager-btn.active { background: var(--primary-grad); color: #fff; border-color: transparent; font-weight: 700; }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-ellipsis { color: var(--text-faint); padding: 0 2px; font-family: var(--mono); }
.pager-info { margin-left: 8px; font-size: 12px; color: var(--text-faint); font-family: var(--mono); }

/* ===================== 信息补全面板 ===================== */
.complete-panel { padding: 18px 20px; margin-bottom: 22px; }
.complete-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.complete-head-left { display: flex; align-items: center; gap: 8px; }
.complete-head-left .ttl { font-size: 14px; font-weight: 700; color: var(--text); }
.complete-head-left .sm { font-size: 12px; font-family: var(--mono); color: var(--text-faint); }
.complete-head .complete-icon { color: var(--primary); }
.complete-head .complete-icon svg { width: 18px; height: 18px; }
.progress-track { height: 7px; background: #ede9fe; border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary-grad); width: 0; transition: width .2s ease; }
.complete-log {
    max-height: 200px; overflow-y: auto; margin-top: 12px;
    display: flex; flex-direction: column; gap: 3px;
    font-family: var(--mono); font-size: 12px;
    background: #fafafa; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.log-line { line-height: 1.5; }
.log-info { color: var(--text-muted); }
.log-success { color: #047857; }
.log-error { color: #b91c1c; }
.log-warn { color: #b45309; }

/* ===================== 占位页 ===================== */
.placeholder-page {
    min-height: 52vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 14px; color: var(--text-muted);
}
.placeholder-page .ph-icon {
    width: 72px; height: 72px; border-radius: 20px; background: #faf5ff; border: 1px solid var(--border-hover);
    display: flex; align-items: center; justify-content: center; color: var(--primary);
}
.placeholder-page .ph-icon svg { width: 36px; height: 36px; }
.placeholder-page .ph-title { font-size: 20px; font-weight: 800; color: var(--text); }
.placeholder-page .ph-hint { font-size: 13.5px; color: var(--text-muted); line-height: 1.7; max-width: 440px; }

/* ===================== 弹窗 ===================== */
.lib-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lib-modal-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .45); backdrop-filter: blur(3px); }
.lib-modal-panel {
    position: relative; width: min(640px, 100%); max-height: 88vh; overflow: auto;
    background: var(--card); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    animation: modalpop .2s ease;
}
@keyframes modalpop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.lib-modal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.lib-modal-head h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.lib-modal-head .head-left { display: flex; align-items: center; gap: 8px; }
.lib-modal-head .head-left svg { width: 18px; height: 18px; color: var(--primary); }
.lib-modal-close {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    border-radius: 9px; border: none; background: transparent; color: var(--text-faint); cursor: pointer; transition: all .2s ease;
}
.lib-modal-close:hover { background: #f3f4f6; color: var(--text); }
.lib-modal-close svg { width: 18px; height: 18px; }
.lib-modal-body { padding: 22px; display: grid; grid-template-columns: 220px 1fr; gap: 22px; }
@media (max-width: 560px) { .lib-modal-body { grid-template-columns: 1fr; } }
.lib-modal-svg {
    width: 100%; aspect-ratio: 1; background: #fafafa; border: 1px solid var(--border);
    border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.lib-modal-svg img { max-width: 100%; max-height: 100%; padding: 8px; }
.lib-modal-fields { display: flex; flex-direction: column; }
.lib-modal-field { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.lib-modal-field:last-child { border-bottom: none; }
.lib-modal-field dt { color: var(--text-faint); font-weight: 600; }
.lib-modal-field dd { color: var(--text); word-break: break-word; }
.lib-modal-field dd.is-smiles { font-family: var(--mono); color: #4338ca; font-size: 12px; }
.modal-pad { padding: 22px; }
.modal-confirm-row { display: flex; align-items: flex-start; gap: 12px; }
.modal-confirm-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: #faf5ff; border: 1px solid var(--border-hover); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.modal-confirm-icon.danger { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.modal-confirm-icon svg { width: 20px; height: 20px; }
.modal-confirm-row p { font-size: 14px; color: var(--text); line-height: 1.6; }
.modal-confirm-row .sm { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; font-family: var(--mono); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* 删除确认弹窗：批量删除时的分子预览列表 */
.lib-del-list { margin-top: 14px; max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: #fafafa; padding: 6px; }
.lib-del-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 13px; }
.lib-del-item:nth-child(odd) { background: #fff; }
.lib-del-item-name { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-del-item-cas { flex-shrink: 0; font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }
.lib-del-more { padding: 8px 10px; font-size: 12.5px; color: var(--text-muted); text-align: center; }

/* ===================== Toast ===================== */
.toast {
    position: fixed; top: 22px; right: 22px; z-index: 2000;
    display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-size: 13.5px; font-weight: 600;
    animation: toastin .25s ease;
}
@keyframes toastin { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.toast-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ===================== 表单控件（登录 / 账户中心共用）===================== */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input-icon { position: absolute; left: 12px; color: var(--text-faint); pointer-events: none; }
.input-wrap .input-icon svg { width: 17px; height: 17px; }
.input {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
    background: #fff; color: var(--text); font-size: 14px; font-family: inherit; transition: all .2s ease;
}
.input-wrap .input { padding-left: 40px; }
.input::placeholder { color: var(--text-faint); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, .12); }
.input-eye { position: absolute; right: 10px; background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 4px; display: flex; }
.input-eye:hover { color: var(--primary); }
.input-eye svg { width: 17px; height: 17px; }
.input-eye .icon-eye-off { display: none; }
.input-eye.off .icon-eye-on { display: none; }
.input-eye.off .icon-eye-off { display: block; }

/* 状态徽标（已绑定 / 已设置 / 未设置） */
.status-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.status-pill.ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.status-pill.warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.acct-badge.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.acct-badge.warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.verified-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #f9fafb; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.verified-row .vr-text { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.verified-row .vr-ok { color: var(--success); display: flex; }
.verified-row .vr-ok svg { width: 17px; height: 17px; }
.select {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
    background: #fff; color: var(--text); font-size: 14px; font-family: inherit; cursor: pointer;
}
.select:focus { outline: none; border-color: var(--primary); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.6; }

.field-error {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px;
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 13px;
}
.field-error svg { width: 16px; height: 16px; flex-shrink: 0; }

/* 段标签按钮组（手机号/邮箱、tab 等） */
.seg { display: flex; gap: 6px; background: #f3f4f6; border-radius: 12px; padding: 4px; }
.seg-btn {
    flex: 1; padding: 9px 12px; border-radius: 9px; border: none; background: transparent;
    color: var(--text-muted); font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all .2s ease;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }

.send-code-btn {
    flex-shrink: 0; padding: 11px 16px; border-radius: 10px; border: 1px solid var(--border-hover);
    background: #faf5ff; color: var(--primary); font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; white-space: nowrap; transition: all .2s ease;
}
.send-code-btn:hover:not(:disabled) { background: rgba(139, 92, 246, .12); }
.send-code-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===================== 登录页 ===================== */
.login-bg {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
    background:
        radial-gradient(900px 460px at 50% -10%, rgba(139, 92, 246, .14), transparent 70%),
        var(--bg);
}
.login-lang {
    position: fixed; top: 18px; right: 18px; z-index: 50;
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 20px;
    background: var(--card); border: 1px solid var(--border); color: var(--text-muted);
    font-size: 12px; font-family: var(--mono); cursor: pointer; transition: all .2s ease;
}
.login-lang:hover { color: var(--primary); border-color: var(--border-hover); }
.login-lang svg { width: 15px; height: 15px; }
.login-wrap { width: 100%; max-width: 430px; }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand .row { display: inline-flex; align-items: center; gap: 12px; }
.login-brand img { width: 42px; height: 42px; }
.login-brand h1 { font-size: 26px; font-weight: 800; color: var(--primary); letter-spacing: .5px; }
.login-brand .en { margin-top: 8px; font-size: 11px; color: var(--text-faint); font-family: var(--mono); letter-spacing: 2px; text-transform: uppercase; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 16px 48px rgba(99, 102, 241, .1); overflow: hidden; }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.login-tab {
    padding: 16px; background: transparent; border: none; border-bottom: 2px solid transparent;
    color: var(--text-faint); font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; transition: all .2s ease;
}
.login-tab:hover { color: var(--text-muted); }
.login-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.login-body { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.login-foot-note { font-size: 11px; color: var(--text-faint); text-align: center; }
.login-row { display: flex; align-items: center; justify-content: space-between; }
.login-link { background: none; border: none; color: var(--text-muted); font-size: 12px; font-family: inherit; cursor: pointer; }
.login-link:hover { color: var(--primary); }
.invite-hint { font-size: 11px; color: var(--primary); margin-top: 4px; }
.login-disclaimer { text-align: center; font-size: 11px; color: var(--text-faint); margin-top: 20px; }

/* ===================== 验证码弹窗 ===================== */
.captcha-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(17,24,39,.5); backdrop-filter: blur(3px); }
.captcha-box { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; width: 342px; max-width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.captcha-box-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.captcha-box-head h3 { font-size: 14px; font-weight: 700; color: var(--text); }
.captcha-box-head button { background: none; border: none; color: var(--text-faint); cursor: pointer; display: flex; }
.captcha-box-head button:hover { color: var(--text); }
.captcha-box-head button svg { width: 18px; height: 18px; }
.captcha-host { overflow: hidden; border-radius: 10px; }
.captcha-tip { margin-top: 12px; font-size: 11px; color: var(--text-faint); text-align: center; }

/* ===================== 账户中心 ===================== */
.acct-grid { display: grid; grid-template-columns: 270px 1fr; gap: 22px; align-items: start; }
@media (max-width: 880px) { .acct-grid { grid-template-columns: 1fr; } }
.acct-side { display: flex; flex-direction: column; gap: 18px; }
.acct-profile-card { padding: 24px 20px; text-align: center; }
.acct-avatar {
    width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; background: var(--primary-grad);
    color: #fff; display: flex; align-items: center; justify-content: center;
}
.acct-avatar svg { width: 38px; height: 38px; }
.acct-name { font-size: 18px; font-weight: 800; color: var(--text); }
.acct-badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.acct-badge { font-size: 11px; padding: 3px 10px; border-radius: 20px; background: #faf5ff; border: 1px solid var(--border-hover); color: var(--primary); font-weight: 600; }
.acct-badge.super { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #92400e; border-color: #fcd34d; }
.acct-meta { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.acct-meta-row { display: flex; align-items: center; gap: 8px; color: var(--text-muted); justify-content: center; font-family: var(--mono); }

.acct-nav { padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.acct-nav-item {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px;
    background: transparent; border: none; color: var(--text-muted); font-size: 13.5px; font-weight: 600;
    font-family: inherit; cursor: pointer; text-align: left; width: 100%; transition: all .2s ease;
}
.acct-nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.acct-nav-item:hover { background: #f3f4f6; color: var(--text); }
.acct-nav-item.active { background: rgba(139, 92, 246, .1); color: var(--primary); }

.acct-panel { display: none; }
.acct-panel.active { display: block; animation: fadein .2s ease; }
.acct-section { padding: 24px; }
.acct-section + .acct-section { margin-top: 18px; }
.acct-section-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.acct-section-title svg { width: 17px; height: 17px; color: var(--primary); }
.acct-section-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 18px; line-height: 1.6; }
.acct-form { display: flex; flex-direction: column; gap: 16px; }
.acct-form-row { display: flex; gap: 10px; align-items: flex-end; }
.acct-form-row .field { flex: 1; }
.acct-readonly { font-family: var(--mono); font-size: 13px; color: var(--text-muted); background: #f9fafb; border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; }
.acct-step-tip { font-size: 12px; color: var(--primary); font-weight: 600; background: #faf5ff; border: 1px solid var(--border-hover); border-radius: 8px; padding: 8px 12px; }
.acct-invite-code { font-family: var(--mono); font-size: 22px; font-weight: 800; letter-spacing: 4px; color: var(--primary); background: #faf5ff; border: 1px dashed var(--border-hover); border-radius: 12px; padding: 16px; text-align: center; }
.acct-resume-drop { border: 2px dashed var(--border-hover); border-radius: 12px; padding: 26px; text-align: center; background: #fafaff; cursor: pointer; transition: all .2s ease; }
.acct-resume-drop:hover { border-color: var(--primary); background: #f5f3ff; }
.acct-resume-drop.drag-over { border-color: var(--primary); background: #ede9fe; }
.acct-resume-drop svg { width: 32px; height: 32px; color: var(--primary); opacity: .8; margin: 0 auto 8px; }
.text-faint { color: var(--text-faint); }
.text-mono { font-family: var(--mono); }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; }

/* ===================== 本地库存：检索条 + 表格 ===================== */
.inv-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.inv-search-wrap { flex: 1; max-width: 460px; min-width: 240px; }
.inv-search-count { font-size: 12px; color: var(--text-faint); font-family: var(--mono); white-space: nowrap; }

.inv-table-wrap {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: auto;
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 280px);
}
.inv-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.inv-table thead th {
    position: sticky; top: 0; z-index: 2;
    background: #faf5ff;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12px;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
}
.inv-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    color: var(--text);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 每行 / 表头最后一列不画竖线，避免与表格外框重叠 */
.inv-table thead th:last-child,
.inv-table tbody td:last-child { border-right: none; }
.inv-table tbody tr:hover td { background: #faf5ff; }
.inv-table tbody tr:last-child td { border-bottom: none; }
.inv-col-idx { color: var(--text-faint); font-family: var(--mono); width: 52px; text-align: center; }
.inv-empty-row { text-align: center; color: var(--text-faint); padding: 40px 14px !important; font-style: italic; }

/* 操作列：行内按钮排成两排（上 3 下 2）—— 3 列等宽网格 */
.inv-col-act { width: 180px; }
.inv-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.inv-act-btn {
    font-size: 12px; padding: 4px 6px; border-radius: 7px; border: 1px solid var(--border);
    background: #fff; color: var(--text-muted); cursor: pointer; font-family: inherit;
    transition: all .15s ease; white-space: nowrap; text-align: center;
}
.inv-act-btn:hover { transform: translateY(-1px); }
.inv-act-btn.in  { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.inv-act-btn.in:hover  { background: #d1fae5; }
.inv-act-btn.out { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.inv-act-btn.out:hover { background: #fef3c7; }
.inv-act-btn.edit { color: var(--primary); border-color: var(--border-hover); background: #faf5ff; }
.inv-act-btn.edit:hover { background: rgba(139, 92, 246, .14); }
.inv-act-btn.del { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.inv-act-btn.del:hover { background: #fee2e2; }
.inv-act-btn.log { color: var(--primary); border-color: var(--border-hover); background: #faf5ff; }
.inv-qty-cell { font-family: var(--mono); font-weight: 700; color: var(--text); }

/* 临期 / 已到期行高亮 + 角标 */
.inv-table tbody tr.inv-row-expired td { background: #fef2f2; }
.inv-table tbody tr.inv-row-expired:hover td { background: #fee2e2; }
.inv-table tbody tr.inv-row-soon td { background: #fffbeb; }
.inv-table tbody tr.inv-row-soon:hover td { background: #fef3c7; }
.inv-exp-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 20px; margin-left: 4px; }
.inv-exp-badge.expired { color: #dc2626; background: #fee2e2; }
.inv-exp-badge.soon { color: #b45309; background: #fef3c7; }

/* 新增/修改：库存量数字 + 单位下拉 */
.inv-qty-input { display: flex; gap: 8px; }
.inv-qty-input input { flex: 1; min-width: 0; }
.inv-unit-select { flex: 0 0 88px; width: 88px; }

/* 删除库存确认：目标条目 */
.inv-del-target { font-size: 13px; font-weight: 700; color: var(--text); margin-top: 4px; word-break: break-word; }

/* 操作流水：类型筛选工具条 */
.inv-log-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.inv-log-toolbar label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.inv-log-toolbar select { width: auto; min-width: 110px; }

/* 临期筛选开关按钮 激活态 */
.btn.active { background: var(--primary-grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(139, 92, 246, .28); }

/* 操作流水：类型标签 */
.inv-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; }
.inv-tag.in     { color: #047857; background: #d1fae5; }
.inv-tag.out    { color: #b45309; background: #fef3c7; }
.inv-tag.add    { color: #1d4ed8; background: #dbeafe; }
.inv-tag.import { color: #6d28d9; background: #ede9fe; }
.inv-tag.edit   { color: #0369a1; background: #e0f2fe; }
.inv-tag.delete { color: #dc2626; background: #fee2e2; }

/* 新增单条：表单网格 */
.inv-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 16px; }
.inv-field { display: flex; flex-direction: column; gap: 6px; }
.inv-field label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }

/* 出入库弹窗 */
.inv-move-item { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; word-break: break-word; }
.inv-move-cur { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.inv-move-cur strong { font-family: var(--mono); color: var(--primary); font-size: 15px; }

/* 待提交评估分子库：详情可编辑输入 + 弹窗 footer 提示 */
.lib-detail-input { padding: 7px 10px; font-size: 12.5px; }
.lib-detail-hint { margin-right: auto; font-size: 12px; color: var(--text-faint); align-self: center; }

/* 需要登录提示弹层 */
.login-req-msg { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 4px; }

/* 提交评估弹层 */
.eval-snapshot { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #faf5ff; margin-bottom: 14px; }
.eval-snap-svg { width: 96px; height: 96px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.eval-snap-svg img { max-width: 100%; max-height: 100%; padding: 6px; }
.eval-snap-meta { flex: 1; min-width: 0; }
.eval-snap-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; word-break: break-word; }
.eval-snap-row { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 8px; padding: 2px 0; }
.eval-snap-row span { color: var(--text-faint); width: 52px; flex-shrink: 0; }
.eval-snap-row b { color: var(--text); font-weight: 600; word-break: break-all; }
.eval-tip { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.eval-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
@media (max-width: 720px) { .eval-form-grid { grid-template-columns: 1fr; } }

/* ===================== 待提交评估分子库：搜索栏 / 多选条 ===================== */
.lib-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.lib-search { position: relative; flex: 1; min-width: 240px; max-width: 520px; }
.lib-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); pointer-events: none; }
.lib-search .input { width: 100%; padding-left: 36px; }
.lib-select-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 16px; border: 1px solid #c7d2fe; border-radius: 12px;
    background: #eef2ff;
}
.lib-select-info { font-size: 13.5px; font-weight: 700; color: var(--primary); }
.lib-select-actions { display: flex; gap: 8px; }
.lib-select-actions .btn { padding: 8px 14px; }

/* 多选评估列表 */
.eval-multi { margin-bottom: 14px; }
.eval-multi-head { font-size: 13px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.eval-multi-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; padding-right: 4px; }
.eval-multi-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: #faf5ff; }
.eval-multi-thumb { width: 48px; height: 48px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.eval-multi-thumb img { max-width: 100%; max-height: 100%; padding: 3px; }
.eval-multi-meta { flex: 1; min-width: 0; }
.eval-multi-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eval-multi-cas { font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); margin-top: 2px; }

/* ===================== 上传分子：全页拖拽提示层 ===================== */
.page-drop-overlay {
    position: fixed; inset: 0; z-index: 1200; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
    background: rgba(139, 92, 246, .10); backdrop-filter: blur(2px);
}
.page-drop-inner {
    text-align: center; padding: 38px 56px; border-radius: 18px;
    background: #fff; border: 2.5px dashed var(--primary); box-shadow: var(--shadow-hover);
}
.page-drop-inner svg { width: 52px; height: 52px; color: var(--primary); }
.page-drop-inner p { font-size: 17px; font-weight: 700; color: var(--text); margin-top: 10px; }
.page-drop-inner .sm { font-size: 12px; font-weight: 500; color: var(--text-faint); font-family: var(--mono); margin-top: 4px; }

/* 移动端：侧栏退化为顶部条（简化处理，主用桌面端） */
@media (max-width: 720px) {
    .inv-form-grid { grid-template-columns: 1fr 1fr; }
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; flex-direction: row; align-items: center; overflow-x: auto; }
    .sidebar-logo { border-bottom: none; border-right: 1px solid var(--border); white-space: nowrap; }
    .sidebar-nav { flex-direction: row; }
    .sidebar-footer { display: none; }
    .nav-item { flex-direction: row; gap: 6px; padding: 10px 12px; white-space: nowrap; }
    .content { padding: 18px 14px 40px; }
    .topbar { padding: 12px 16px; }
}

/* ===================== 上传分子(图片/pdf)：媒体网格 ===================== */
.media-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media (max-width: 1280px) { .media-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 920px)  { .media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .media-grid { grid-template-columns: 1fr; } }

.media-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: .18s;
}
.media-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.media-thumb {
    height: 140px; display: flex; align-items: center; justify-content: center;
    background: var(--surface-2, #f7f7fb); border-bottom: 1px solid var(--border); overflow: hidden;
}
.media-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.media-thumb.pdf-thumb svg { width: 52px; height: 52px; color: #dc2626; opacity: .85; }
.media-thumb-ph { font-size: 12px; color: var(--text-faint); font-family: var(--mono); }
.media-meta { padding: 10px 12px 6px; flex: 1; min-width: 0; }
.media-name {
    font-size: 13px; font-weight: 600; color: var(--text);
    display: flex; align-items: center; gap: 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.media-sub { font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); margin-top: 4px; }
.media-tag {
    flex-shrink: 0; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 20px;
}
.media-tag.image { color: #047857; background: #d1fae5; }
.media-tag.pdf   { color: #dc2626; background: #fee2e2; }
.media-acts { display: flex; gap: 8px; padding: 8px 12px 12px; }
.media-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    font-size: 12.5px; font-weight: 600; padding: 7px 10px; border-radius: 9px;
    border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; transition: .15s;
}
.media-btn svg { width: 14px; height: 14px; }
.media-btn.view { flex: 1; }
.media-btn.view:hover { background: var(--primary-grad); color: #fff; border-color: transparent; }
.media-btn.del { color: #b91c1c; }
.media-btn.del:hover { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

/* ===================== 上传图片pdf：Slogan 横幅 ===================== */
.media-slogan {
    display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
    padding: 14px 18px; border-radius: 14px; color: #fff;
    background: var(--primary-grad); box-shadow: 0 8px 22px rgba(99, 102, 241, .28);
}
.media-slogan-icon { flex-shrink: 0; display: flex; }
.media-slogan-icon svg { width: 26px; height: 26px; }
.media-slogan-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.media-slogan-text b { font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.media-slogan-text span { font-size: 13px; opacity: .92; }

/* 已标框徽标 + 卡片「标框」按钮 */
.media-tag.boxed { color: #b45309; background: #fef3c7; }
.media-btn.anno:hover { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }

/* ===================== 评估库：分类切换（标准文件 / 图片PDF） ===================== */
.lib-cat-tabs {
    display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px;
    background: var(--surface-2, #f1f1f7); border: 1px solid var(--border); border-radius: 12px;
}
.lib-cat-tab {
    appearance: none; border: 0; background: transparent; cursor: pointer;
    font-size: 13.5px; font-weight: 700; color: var(--text-faint);
    padding: 7px 20px; border-radius: 9px; transition: .15s;
}
.lib-cat-tab:hover { color: var(--text); }
.lib-cat-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

/* 评估库·图片PDF：卡片可勾选 + 提交评估按钮 */
.media-card.sel { cursor: pointer; position: relative; }
.media-card.sel.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(99, 102, 241, .28); }
.media-check {
    position: absolute; top: 8px; left: 8px; z-index: 2; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .92); border: 1px solid var(--border); border-radius: 7px; box-shadow: var(--shadow-sm);
}
.media-card.sel.selected .media-check { border-color: var(--primary); }
.media-check-input { width: 15px; height: 15px; accent-color: var(--primary); margin: 0; pointer-events: none; }
/* 评估库·图片PDF 卡片底部按钮分两行：①框选 | 查看  ②提交评估(撑满) | 删除(右侧) */
.media-card.sel .media-acts { flex-wrap: wrap; }
.media-card.sel .media-btn.anno,
.media-card.sel .media-btn.view { flex: 1 1 calc(50% - 4px); }
.media-card.sel .media-btn.eval { flex: 1 1 auto; color: var(--primary); border-color: #c7d2fe; }
.media-card.sel .media-btn.eval:hover { background: var(--primary-grad); color: #fff; border-color: transparent; }
.media-card.sel .media-btn.eval.resubmit { color: #b45309; border-color: #fde68a; }
.media-card.sel .media-btn.eval.resubmit:hover { background: #f59e0b; color: #fff; border-color: transparent; }
.media-card.sel .media-btn.del { flex: 0 0 auto; }

/* 提交评估弹窗：媒体多选用图标缩略图 */
.eval-multi-icon svg { width: 26px; height: 26px; color: var(--text-faint); }

/* ===================== 矩形框标注弹窗 ===================== */
.anno-panel { width: min(980px, 96vw); max-height: 94vh; display: flex; flex-direction: column; padding: 0; }
.anno-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; flex-wrap: wrap; border-top: 1px solid var(--border);
}
.anno-hint { font-size: 12.5px; color: var(--text-muted); }
.anno-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.anno-pagenav { display: flex; align-items: center; gap: 8px; }
.anno-pageinfo { font-size: 12.5px; font-family: var(--mono); color: var(--text); min-width: 50px; text-align: center; }
.anno-tools .btn { padding: 6px 12px; }

.anno-stage {
    position: relative; overflow: auto; max-height: 64vh; padding: 14px;
    background: #f4f4f8; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    display: flex; justify-content: center; align-items: flex-start;
}
.anno-canvas-wrap { position: relative; display: inline-block; line-height: 0; box-shadow: var(--shadow-sm); }
#annoBaseCanvas { display: block; background: #fff; }
#annoDrawCanvas { position: absolute; top: 0; left: 0; cursor: crosshair; touch-action: none; }
.anno-loading {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .72); font-size: 13px; color: var(--text-muted); font-family: var(--mono);
}
.anno-loading.hidden { display: none; }
.anno-actions { padding: 12px 16px; }
.anno-status { font-size: 12.5px; color: var(--text-muted); margin-right: auto; }
