:root {
  --el-color-primary: #3b5bff;
  --el-color-primary-light-3: #6d86ff;
  --el-color-primary-light-5: #9aaaff;
  --el-color-primary-light-7: #c7cfff;
  --el-color-primary-light-8: #dde2ff;
  --el-color-primary-light-9: #eef1ff;
  --el-color-primary-dark-2: #2f49cc;
  --bg-page: #f5f7fb;
  --bg-sidebar: #1b2440;
  --bg-sidebar-active: #28335c;
  --brand-grad: linear-gradient(135deg, #3b5bff 0%, #6d3bff 100%);
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; padding: 0; }
body {
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg-page); color: #1f2733; -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9d2e3; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #aab6cf; }

.el-card { border-radius: 12px; border: none; box-shadow: 0 2px 12px rgba(31,45,80,.06); }
.el-card__header { border-bottom: 1px solid #eef1f6; font-weight: 600; }
.el-icon i.fas, .el-icon i.fa-solid { font-size: 16px; line-height: 1; }

.page-fade-enter-active, .page-fade-leave-active { transition: opacity .18s ease, transform .18s ease; }
.page-fade-enter-from { opacity: 0; transform: translateY(6px); }
.page-fade-leave-to { opacity: 0; }

/* ===== 布局 ===== */
.layout { height: 100vh; }
.aside { background: var(--bg-sidebar); transition: width .2s ease; display: flex; flex-direction: column; overflow: hidden; }
.brand { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 18px; color: #fff; font-weight: 700; font-size: 16px; background: var(--brand-grad); white-space: nowrap; }
.brand--mini { justify-content: center; padding: 0; }
.brand__logo { font-size: 22px; }
.side-menu { border-right: none; }
.side-menu .el-menu-item.is-active { background: var(--bg-sidebar-active) !important; border-left: 3px solid var(--el-color-primary); }
.side-menu .el-menu-item:hover { background: rgba(255,255,255,.06) !important; }

.header { display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #eef1f6; padding: 0 18px; box-shadow: 0 1px 4px rgba(31,45,80,.04); }
.header__left { display: flex; align-items: center; gap: 14px; }
.collapse-btn { font-size: 20px; cursor: pointer; color: #5b6b86; }
.header__right { display: flex; align-items: center; gap: 18px; }
.header__icon { font-size: 19px; cursor: pointer; color: #5b6b86; }
.header__icon:hover { color: var(--el-color-primary); }
.user { display: flex; align-items: center; gap: 8px; cursor: pointer; outline: none; }
.user__avatar { background: var(--brand-grad); color: #fff; font-weight: 700; }
.user__name { font-size: 14px; color: #2f3a4d; }
.main { background: var(--bg-page); padding: 18px; }

/* ===== 主题 ===== */
body.theme-light { --bg-page: #f0f2f5; --bg-sidebar: #ffffff; --bg-sidebar-active: #eef1ff; }
body.theme-light .aside { box-shadow: 2px 0 8px rgba(0,0,0,.04); }
body.theme-light .brand { color: #2f3a4d; }
body.theme-light .side-menu { --el-menu-text-color: #4a5870; }
body.theme-light .side-menu .el-menu-item { color: #4a5870; }
body.theme-light .side-menu .el-menu-item.is-active { color: var(--el-color-primary); }

body.theme-dark { --bg-page: #0f1422; --bg-sidebar: #11182b; --bg-sidebar-active: #1d2742; }
body.theme-dark .header { background: #161d30; border-color: #232c44; }
body.theme-dark .main { background: #0f1422; }
body.theme-dark { color: #d6deef; }
body.theme-dark .el-card { background: #161d30; color: #d6deef; }
body.theme-dark .el-card__header { border-color: #232c44; }
body.theme-dark .el-empty__description { color: #8a94a8; }

/* ===== 登录 ===== */
.login { height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(1200px 600px at 70% -10%, #e9edff 0%, #f5f7fb 55%); }
.login__card { width: 380px; background: #fff; border-radius: 16px; padding: 38px 34px; box-shadow: 0 12px 40px rgba(31,45,80,.12); }
.login__brand { text-align: center; margin-bottom: 26px; }
.login__logo { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 30px; background: var(--brand-grad); }
.login__brand h1 { margin: 0; font-size: 20px; color: #1f2733; }
.login__brand p { margin: 6px 0 0; font-size: 13px; color: #8a94a8; }
.login__btn { width: 100%; margin-top: 6px; }

/* ===== 仪表盘 ===== */
.stat { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; min-width: 0; }
.stat__icon { width: 42px; height: 42px; border-radius: 10px; flex: 0 0 42px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #3b5bff; }
.stat__meta { min-width: 0; }
.stat__value { font-size: 20px; font-weight: 700; color: #1f2733; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat__label { font-size: 12px; color: #8a94a8; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.remind-item { font-size: 13px; color: #4a5870; margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick__item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; border-radius: 12px; background: #f7f9fd; cursor: pointer; transition: all .15s; color: #4a5870; font-size: 13px; }
.quick__item:hover { background: var(--el-color-primary-light-9); color: var(--el-color-primary); transform: translateY(-2px); }
.quick__item i { font-size: 24px; }

/* 仪表盘 - 投标客户端更新记录（按日分组 · 内容纵向罗列） */
.rel__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rel__search { max-width: 380px; }
.rel__hint { font-size: 12.5px; color: #8a94a6; }
.rel__hint .el-button { margin-left: 4px; }
.rel__group { border: 1px solid #e8ecf3; border-radius: 10px; padding: 0 14px 12px; margin-bottom: 14px; background: #fff; }
.rel__group:last-child { margin-bottom: 0; }
.rel__ghead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0 10px; border-bottom: 1px dashed #e8ecf3; }
.rel__gdate { font-size: 15px; font-weight: 700; color: #1f2733; letter-spacing: .3px; }
.rel__gdate i { color: var(--el-color-primary); margin-right: 6px; }
.rel__gver { margin-right: 2px; }
.rel__grow { flex: 1 1 auto; }
.rel__gfile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0 2px; font-size: 12.5px; color: #4a5870; }
.rel__gfile i { color: var(--el-color-primary); }
.rel__gfname { font-weight: 600; color: #1f2733; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel__items { padding-top: 8px; }
.rel__item { padding: 10px 12px; border-left: 3px solid var(--el-color-primary); background: #f7f9fc; border-radius: 0 8px 8px 0; margin-bottom: 8px; }
.rel__item:last-child { margin-bottom: 0; }
.rel__ititle { font-size: 13.5px; font-weight: 600; color: #1f2733; margin-bottom: 4px; }
.rel__icontent { font-size: 13px; color: #4a5870; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.rel__imeta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
/* 下载走真实 <a> 标签走浏览器原生下载（大文件有进度条、可续传），需去掉链接下划线并保持按钮外观 */
.rel__dl { text-decoration: none; }
.rel__dl:hover, .rel__dl:focus, .rel__dl:visited { text-decoration: none; color: #fff; }
.rel__dl i { margin-right: 4px; }
body.theme-dark .rel__group { background: #1c2230; border-color: #2c3446; }
body.theme-dark .rel__ghead { border-bottom-color: #2c3446; }
body.theme-dark .rel__gdate, body.theme-dark .rel__gfname, body.theme-dark .rel__ititle { color: #e5e9f0; }
body.theme-dark .rel__icontent, body.theme-dark .rel__gfile { color: #a9b4c6; }
body.theme-dark .rel__item { background: #222a3a; }

/* ===== 资料库 ===== */
.doc-card { margin-bottom: 18px; }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.doc-title { margin: 0; font-size: 18px; color: #1f2733; }
.doc-sub { font-size: 12px; color: #8a94a8; margin-top: 2px; }
.doc-head-actions { display: flex; gap: 8px; }
.doc-tabs { margin-bottom: 8px; }
.doc-tabs .el-tabs__header { margin-bottom: 10px; }
.doc-alert-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: #fff; border: 1px solid #eef1f6; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; }
.doc-alert-bar__title { font-size: 13px; color: #8a94a8; margin-right: 4px; }
.doc-alert-bar__item { font-size: 13px; color: #4a5870; cursor: pointer; padding: 4px 10px; border-radius: 6px; background: #f7f9fd; transition: all .15s; }
.doc-alert-bar__item:hover { background: #eef1ff; }
.doc-alert-bar__item b { font-weight: 700; margin: 0 2px; }
.doc-alert-bar__item--danger { color: #f56c6c; }
.doc-alert-bar__item--danger:hover { background: #ffe9e9; }
.doc-alert-bar__item--warning { color: #e6a23c; }
.doc-alert-bar__item--warning:hover { background: #fff7e6; }
.doc-alert-bar__item--primary { color: #3b5bff; }
.doc-alert-bar__item--primary:hover { background: #e8f0ff; }
.cf-lib-item { transition: all .2s; }
.cf-lib-item:hover { background: #f5f7fa; border-color: #409eff !important; }
.cf-design-item:hover { border-color: #409eff !important; box-shadow: 0 2px 8px rgba(64,158,255,0.12); }
.cf-design-item.active { border-color: #409eff !important; background: #f0f9ff !important; box-shadow: 0 0 0 2px rgba(64,158,255,0.15); }
.cf-design-item { flex-wrap: wrap; align-items: flex-start; min-height: 44px; }
.cf-design-item > div:first-child { flex: 1 1 auto; min-width: 60px; max-width: 100%; white-space: normal; }
.cf-design-item--builtin { background: #f7f9fc !important; border-left: 3px solid #67c23a !important; }
.search-panel { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: #f7f9fd; border: 1px solid #eef1f6; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.search-input { width: 360px; max-width: 100%; }
.filter-sel { width: 130px; }
.filter-sel-sm { width: 100px; }
.preset-tags { width: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.preset-label { font-size: 12px; color: #8a94a8; }
.preset-tag { cursor: pointer; user-select: none; }
.preset-tag:hover { color: var(--el-color-primary); border-color: var(--el-color-primary); }
.batch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--el-color-primary-light-9); border: 1px solid var(--el-color-primary-light-7); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.batch-sel { width: 160px; }
.batch-sel--wide { width: 220px; }
/* 下拉选项右侧的分类地址小字（显示栏目名时仍可对照真实值） */
.opt-hint { float: right; color: #a8abb2; font-size: 12px; margin-left: 16px; }
.search-status { font-size: 13px; color: #5b6b86; margin-bottom: 10px; }
.search-status .ss-count { font-size: 18px; font-weight: 700; color: var(--el-color-primary); margin-right: 2px; }
.search-status .ss-query { color: #8a94a8; margin-left: 4px; }
.doc-table { width: 100%; }
.doc-group { margin-bottom: 18px; }
.doc-group-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #1f2733; margin: 6px 0 8px; }
.doc-group-head .muted { font-weight: 400; font-size: 12px; color: #8a94a8; }
.suggest-line { margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.suggest-line .muted { font-size: 12px; color: #8a94a8; }
.muted { color: #8a94a8; }
.pub-check { font-size: 12px; margin-top: 4px; }
.cover-prev { max-height: 80px; border-radius: 6px; margin-top: 6px; }
/* 编辑弹窗附件列表 */
.att-done { width: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 4px 0; border-bottom: 1px dashed #e2e8f0; }
.att-done:last-child { border-bottom: none; }
.att-done span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.view-meta { display: flex; gap: 8px; margin-bottom: 12px; }
.summary-box { background: #f7f9fd; border-radius: 8px; padding: 10px 12px; font-size: 13px; white-space: pre-wrap; color: #4a5870; margin: 10px 0; }
.view-desc { margin-top: 12px; }
.att-preview { margin-top: 12px; max-height: 220px; overflow: auto; background: #f7f9fd; border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #5b6b86; white-space: pre-wrap; }

/* 列表附件列：文件名截断 + 悬停显示全名 */
.att-cell { display: inline-flex; align-items: center; max-width: 100%; cursor: pointer; }
.att-name-trunc { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2563eb; }
/* 抽屉内图片预览 */
.view-img { margin: 6px 0 12px; }
.view-img-el { max-width: 100%; max-height: 320px; border: 1px solid var(--el-border-color); border-radius: 6px; cursor: zoom-in; display: block; }
/* 在线预览弹窗 */
.preview-dialog .el-dialog__body { padding: 12px 16px 16px; }
.preview-toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.preview-body { overflow: auto; background: #f1f5f9; border-radius: 6px; display: flex; align-items: center; justify-content: center; height: 60vh; }
.preview-body.max { height: 86vh; }
.preview-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-frame { width: 100%; height: 100%; border: 0; min-height: 50vh; }
.preview-loading { display: flex; align-items: center; justify-content: center; gap: 8px; height: 60vh; color: #5b6b86; }

body.theme-dark .doc-sub, body.theme-dark .search-status, body.theme-dark .preset-label, body.theme-dark .muted { color: #8a94a8; }
body.theme-dark .search-panel { background: #11182b; border-color: #232c44; }
body.theme-dark .search-status .ss-count { color: var(--el-color-primary-light-3); }
body.theme-dark .batch-bar { background: #161d30; border-color: #232c44; }
body.theme-dark .summary-box, body.theme-dark .att-preview { background: #11182b; color: #aab6cf; }

/* 投标资料包 — 资格证明文件清单 */
.bid-package-page { padding-bottom: 24px; }
.bid-main-card > .el-card__body { padding-top: 12px; }
.bid-main-tabs > .el-tabs__header { margin-bottom: 16px; }
.bid-main-tabs > .el-tabs__header .el-tabs__item { font-size: 15px; }
.print-doc { background: #fff; }
.pq-head { display: none; text-align: center; margin: 10px 0 28px; border-bottom: 2px solid #1f2733; padding-bottom: 18px; }
.pq-title { font-size: 22px; font-weight: 700; color: #1f2733; letter-spacing: 1px; }
.pq-sub { font-size: 13px; color: #5b6b86; margin-top: 6px; }
.pq-sec { margin-bottom: 18px; }
.pq-sec-title { font-size: 15px; font-weight: 600; color: #1f2733; margin: 0 0 10px; }
.pq-tbl { width: 100%; }
.pq-tbl .title-cell { font-weight: 500; }
.pq-foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid #d8deea; font-size: 13px; color: #4a5870; text-align: center; line-height: 2; }

@media print {
  .no-print, .no-print * { display: none !important; }
  .el-aside, .el-header, .page-head, .bid-pkg-tabs > .el-tabs__header, .bid-main-tabs > .el-tabs__header { display: none !important; }
  .bid-pkg-tabs, .bid-pkg-tabs .el-tabs__content, .bid-pkg-tabs .el-tab-pane { border: none !important; box-shadow: none !important; }
  .bid-pkg-tabs .el-tabs__content { padding: 0 !important; }
  .el-main { padding: 0 !important; background: #fff !important; }
  .el-card { box-shadow: none !important; border: none !important; }
  .bid-main-card > .el-card__body, .print-doc > .el-card__body { padding-top: 0; padding: 12px !important; }
  .pq-head { display: block; border-bottom-color: #000 !important; margin-bottom: 18px !important; }
  .pq-title { color: #000 !important; }
  .pq-sub, .pq-foot { color: #333 !important; }
  body { background: #fff !important; }
  .el-table__header, .el-table__body { width: 100% !important; }
}

/* 常用标签结构化编辑器（分类字段设置） */
.preset-tag-editor { border: 1px solid #dcdfe6; border-radius: 6px; padding: 10px; background: #fff; }
.preset-tag-editor .pte-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.preset-tag-editor .pte-row.pte-head { font-size: 12px; color: #8a94a8; margin-bottom: 6px; }
.preset-tag-editor .pte-label { flex: 0 0 130px; }
.preset-tag-editor .pte-sel { flex: 0 0 120px; }
.preset-tag-editor .pte-s { flex: 0 0 100px; }
.preset-tag-editor .pte-num { flex: 0 0 84px; }
.preset-tag-editor .pte-row .el-input, .preset-tag-editor .pte-row .el-select { width: 100%; }
body.theme-dark .preset-tag-editor { background: #11182b; border-color: #232c44; }
