/* v2 试用壳自己的几条样式；设计标准本身在 vela-design/v2/vela.css */
body { margin: 0; background: var(--v-paper, #eef1f5); }
.v2-shell { min-height: 100vh; }
.v2-trial { padding: 6px 16px; font: 400 12px/18px var(--v-sans); background: color-mix(in srgb, var(--v-warn) 12%, var(--v-surface)); color: var(--v-ink-2); border-bottom: 1px solid color-mix(in srgb, var(--v-warn) 25%, transparent); }
.v2-sites { display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: rgba(255,255,255,.08); }
.v2-sites a { display: inline-flex; align-items: center; min-height: calc(var(--v-ctl) - 6px); padding: 4px 12px; border-radius: 7px; font: 500 13px/20px var(--v-sans); color: rgba(255,255,255,.78); }
.v2-sites a.is-on, .v2-sites a[aria-current] { background: rgba(255,255,255,.16); color: #fff; }
.v2-logout { display: inline-flex; align-items: center; min-height: var(--v-ctl); padding: 4px 10px; border-radius: var(--v-r-ctl); font-size: 13px; color: rgba(255,255,255,.8); }
.v2-logout:hover { background: rgba(255,255,255,.1); }
.v-side a.v-side-item { text-decoration: none; }
.v2-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--v-paper); }
.v2-login form { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 14px; background: var(--v-surface); box-shadow: var(--v-card-sh); }
.v2-json { margin: 0; white-space: pre-wrap; font: 400 12px/18px var(--v-mono); color: var(--v-ink-2); }
.v2-fills input { width: 100%; min-width: 0; border: 0; background: none; font: inherit; }
.v2-fills td { padding: 6px 10px; }
.v2-prose-card .v-prose { padding: 24px 32px 32px; }
.v2-err { color: var(--v-bad); }
.v-tabs a { padding: 8px 12px 10px; font: 500 13px/20px var(--v-sans); color: var(--v-ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.v-tabs a.is-on { color: var(--v-ink); border-bottom-color: var(--v-navy); }
a.v-row { color: inherit; }
a.v-row:hover { background: var(--v-hover); }
/* 研究稿目录：渲染器给的是嵌套 ul，去掉圆点，只露两层 */
.v-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.v-toc ul ul { padding-left: 12px; }
.v-toc ul ul ul { display: none; }
.v-toc ul ul a { font-size: 12px; padding-block: 3px; color: var(--v-ink-3); }
.v-toc a { display: block; }
.v-toc { max-height: calc(100vh - 120px); overflow-y: auto; }
/* 侧栏「审批中心」：审批、统计相关的几组收成一块，和员工自己的「我的申请」分开 */
.v2-zone { margin: 6px 0; padding: 6px 0 2px; border-radius: 10px; background: color-mix(in srgb, var(--v-navy) 5%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v-navy) 12%, transparent); }
.v2-zone .v-side-label { color: var(--v-ink-2); }
.v2-zone > .v-side-grp:first-child > .v-side-label { color: color-mix(in srgb, var(--v-accent) 80%, var(--v-ink)); font-weight: 600; }
.v2-zone-sub > .v-side-label { padding-left: 18px; }
.v2-zone-sub { margin-top: 2px; }
/* 审批中心页 */
.v2-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v2-period .v2-step { display: inline-flex; align-items: center; gap: 4px; }
.v2-period .v2-step a { display: inline-grid; place-items: center; min-width: var(--v-ctl); min-height: var(--v-ctl); border-radius: var(--v-r-ctl); color: var(--v-ink-2); font-size: 18px; }
.v2-period .v2-step a:hover { background: var(--v-hover); }
.v2-period .v2-step b { font: 600 14px/20px var(--v-sans); min-width: 9em; text-align: center; }
.v2-domain { display: grid; gap: 10px; }
.v2-domain-h { display: flex; align-items: baseline; gap: 10px; }
.v2-scope { font-size: 12px; color: var(--v-ink-3); }
.v2-dates { display: flex; flex-wrap: wrap; gap: 4px; }
.v2-dates span { font: 12px/18px var(--v-mono); padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--v-ink) 6%, transparent); white-space: nowrap; }
.v2-dates span.is-pending { background: color-mix(in srgb, var(--v-warn) 14%, transparent); }
.v2-off { color: var(--v-ok); font-weight: 600; }
.v2-hold { color: var(--v-warn); }
.v-table td.is-num, .v-table th.is-num { font-variant-numeric: tabular-nums; }
.v2-caps { display: grid; gap: 0; }
.v2-cap { display: grid; grid-template-columns: minmax(8em, 1.2fr) minmax(7em, 1fr) minmax(9em, 1.4fr) auto; gap: 10px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--v-hair); }
.v2-cap.is-head { font-size: 12px; color: var(--v-ink-3); padding-block: 6px; background: color-mix(in srgb, var(--v-ink) 3%, transparent); }
.v2-cap small { color: var(--v-ink-3); }
.v2-cap form { margin: 0; }
.v2-mod { padding: 8px 16px 2px; font: 600 13px/20px var(--v-sans); border-top: 1px solid var(--v-hair); }
.v2-matrix th, .v2-matrix td { text-align: center; }
.v2-matrix th:first-child, .v2-matrix td:first-child { text-align: left; }
@media (max-width: 720px) { .v2-cap { grid-template-columns: 1fr 1fr; } }
a.v-kpi { display: block; color: inherit; }
a.v-kpi:hover { box-shadow: var(--v-card-sh), inset 0 0 0 1px color-mix(in srgb, var(--v-accent) 40%, transparent); }
.v2-mod { background: color-mix(in srgb, var(--v-accent) 6%, transparent); }
/* 表里的编号、日期、部门不折行 */
.v-table td.v-mono, .v-table td.is-nw { white-space: nowrap; }
.v2-dates { min-width: 12em; }
/* 窄屏时侧栏变成一行横排：审批中心那一块不再单独成框，组直接排进这一行 */
@media (max-width: 860px) { .v2-zone { display: contents; } }

/* 右上角切换身份（只给超级管理员） */
.v2-switch { position: relative; }
.v2-switch > summary { list-style: none; cursor: pointer; }
.v2-switch > summary::-webkit-details-marker { display: none; }
.v2-switch > summary small { margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--v-warn); color: #fff; font-size: 11px; line-height: 16px; }
.v2-switch-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; max-height: 70vh; overflow-y: auto;
  background: var(--v-surface); color: var(--v-ink); border-radius: 10px; box-shadow: var(--v-card-sh), 0 12px 32px rgba(12, 28, 46, .18); padding: 6px; }
.v2-switch-h { padding: 6px 10px 8px; font: 600 13px/18px var(--v-sans); border-bottom: 1px solid var(--v-hair); margin-bottom: 4px; }
.v2-switch-h small { display: block; font-weight: 400; color: var(--v-ink-3); }
.v2-switch-menu form { display: flex; flex-direction: column; gap: 1px; margin: 0; }
.v2-switch-menu button { appearance: none; border: 0; background: none; text-align: left; min-height: var(--v-ctl); padding: 7px 10px; border-radius: 6px; font: 13px/18px var(--v-sans); color: var(--v-ink); cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.v2-switch-menu button:hover { background: var(--v-hover); }
.v2-switch-menu button.is-on { font-weight: 600; background: color-mix(in srgb, var(--v-accent) 10%, transparent); }
.v2-switch-menu button small { color: var(--v-ink-3); }
.v2-switch-menu button.is-back { margin-top: 4px; border-top: 1px solid var(--v-hair); border-radius: 0 0 6px 6px; color: var(--v-accent); }
.v2-switch-f { display: flex; align-items: center; min-height: var(--v-ctl); padding: 7px 10px; border-top: 1px solid var(--v-hair); margin-top: 4px; font-size: 13px; color: var(--v-ink-2); }
.v2-acting { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 16px; background: var(--v-warn); color: #fff; font-size: 13px; }
.v2-acting form { margin: 0 0 0 auto; }
.v2-acting button { appearance: none; border: 1px solid rgba(255,255,255,.6); background: transparent; color: #fff; border-radius: 6px; padding: 2px 10px; font: 500 12px/18px var(--v-sans); cursor: pointer; }
.v2-caret { margin-left: 4px; font-size: 11px; opacity: .7; }
/* 待审批队列：整行可点，悬停有底色，右边按钮 */
.v2-queue tr.v2-click { cursor: pointer; transition: background-color .12s; }
.v2-queue tr.v2-click:hover { background: color-mix(in srgb, var(--v-accent) 7%, transparent); }
.v2-queue tr.v2-click:hover .v2-queue-title { color: var(--v-accent); text-decoration: underline; text-underline-offset: 3px; }
.v2-queue tr.is-overdue { box-shadow: inset 3px 0 0 var(--v-bad); }
.v2-queue-title { font-weight: 600; color: var(--v-ink); }
.v2-queue-sub { display: block; margin-top: 2px; color: var(--v-ink-3); font-size: 12px; }
.v2-queue td:last-child { width: 1%; white-space: nowrap; }

/* 研究阅读页：目录的中英两套 */
.v2-toc-set { display: contents; }
.v2-toc-set[hidden] { display: none; }
.v2-xq-card .v-prose { font-size: 14px; }
.v-stock .v2-stock-sub { color: var(--v-ink-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v-reader.v2-no-toc { grid-template-columns: minmax(0, 1fr); }

/* 宽度：页面跟着窗口铺开（超宽屏封顶 2400px），正文不再卡 68 字宽。
   个人设置「阅读宽度」选「适中」时回到设计稿的阅读宽度。 */
.v-page.is-wide { max-width: min(100%, 2400px); }
.v-prose p, .v-prose li { max-width: none; }
.v-prose { padding: 28px clamp(20px, 3vw, 56px) 40px; }
@media (min-width: 1800px) { .v-reader { grid-template-columns: 260px minmax(0, 1fr); } }


/* 页头右侧的小弹层（生成研究） */
.v2-pop { position: relative; }
.v2-pop > summary { list-style: none; }
.v2-pop > summary::-webkit-details-marker { display: none; }
.v2-pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(360px, 92vw); padding: 16px;
  border-radius: var(--v-r-card); background: var(--v-surface); box-shadow: var(--v-pop-sh); }

/* ---- 个人设置：左侧分栏、右侧表单（参考 GitLab / Nextcloud / Zulip 的布局） ---- */
.v2-me { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--v-s6); align-items: start; }
.v2-me-nav { position: sticky; top: var(--v-s4); display: flex; flex-direction: column; gap: 2px; }
.v2-me-nav a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; color: var(--v-ink-2); text-decoration: none; }
.v2-me-nav a:hover { background: var(--v-hover); color: var(--v-ink); }
.v2-me-nav a.is-on { background: var(--v-surface); color: var(--v-ink); box-shadow: var(--v-card-sh); }
.v2-me-nav a .v-ico { flex: none; margin-top: 2px; }
.v2-me-nav b { display: block; font-weight: 600; font-size: 13px; line-height: 20px; }
.v2-me-nav small { display: block; font-size: 12px; line-height: 16px; color: var(--v-ink-3); }
.v2-me-body { max-width: 980px; min-width: 0; }
.v2-me-id { display: flex; gap: 14px; align-items: center; }
.v2-me-avatar { width: 48px; height: 48px; font-size: 18px; flex: none; }
.v2-watch { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; padding: 0 16px 12px; max-height: 360px; overflow: auto; }
.v2-watch label { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.v2-watch label:hover { background: var(--v-hover); }
.v2-watch small { margin-left: auto; color: var(--v-ink-3); font-size: 11px; }
.v-table td.is-c, .v-table th.is-c { text-align: center; }
@media (max-width: 860px) {
  .v2-me { grid-template-columns: minmax(0, 1fr); }
  /* 手机上八个分栏排成两列网格，一眼都看得到（不做横向滚动） */
  .v2-me-nav { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .v2-me-nav a { align-items: center; min-height: var(--v-ctl-touch); background: var(--v-surface); box-shadow: var(--v-card-sh); }
  .v2-me-nav small { display: none; }
}

/* ---- 偏好：密度与字号 ---- */


/* 深色模式的色板在设计标准 css/tokens.css（同一套品牌主题的暗版），这里不再重复 */
.v2-me .v2-save { display: flex; flex-direction: row; justify-content: flex-end; align-items: center; gap: 8px; }
.v2-me .v2-save .v-btn { width: auto; }

/* 标题里的链接（公告、快报头条）：可点区域至少 24px */
.v-board-lead a, .v-card-b > h3 a { display: inline-block; min-height: 24px; }

/* ---- 个人设置「偏好」：宽度、密度、字号全站生效 ---- */
/* 阅读宽度「适中」：所有页面收到 1080px 居中，正文一行约 68 字 */
html[data-width="fit"] .v-page, html[data-width="fit"] .v-page.is-wide { max-width: var(--v-page-w); }
html[data-width="fit"] .v-prose p, html[data-width="fit"] .v-prose li { max-width: 68ch; }
/* 列表密度「紧凑」：一屏多看几行。控件降到 34px（仍 ≥ 32）；手指操作时不收紧 */
@media (pointer: fine) {
  html[data-density="compact"] { --v-ctl: 34px; --v-ctl-sm: 32px; }
}
html[data-density="compact"] .v-main { padding-top: 16px; padding-bottom: 40px; }
html[data-density="compact"] .v-page, html[data-density="compact"] .v-stack { gap: 10px; }
html[data-density="compact"] .v-card-h { padding: 10px 14px 6px; }
html[data-density="compact"] .v-card-b { padding: 2px 14px 10px; }
html[data-density="compact"] .v-card-f { padding: 7px 14px; }
html[data-density="compact"] .v-row { padding: 6px 14px; }
html[data-density="compact"] .v-table th { padding: 6px 12px; }
html[data-density="compact"] .v-table td { padding: 5px 12px; }
html[data-density="compact"] .v-kpi { padding: 8px 12px; }
html[data-density="compact"] .v-kpi dd { font-size: 18px; line-height: 24px; }
html[data-density="compact"] .v-form { gap: 10px 14px; padding: 12px 14px; }
html[data-density="compact"] .v-side { gap: 8px; }
html[data-density="compact"] .v-side-grp { gap: 0; }
/* 正文字号「大一号」：整站等比放大约 12%（表格、按钮、导航一起），研究稿正文 18px */
html[data-font="large"] .v2-shell, html[data-font="large"] .v-palette-back { zoom: 1.12; }
html[data-font="large"] .v-prose p, html[data-font="large"] .v-prose li { font-size: 17px; line-height: 30px; }

/* ---- 正式版管理页：一次性密码 / 二维码、行内管理菜单、新增表单 ---- */
.v2-once { border: 1px solid var(--v-warn-line, var(--v-hair)); }
.v2-once-b { display: flex; flex-wrap: wrap; gap: var(--v-s6); align-items: flex-start; }
.v2-secret { font-size: 18px; line-height: 28px; letter-spacing: .04em; user-select: all; word-break: break-all; }
.v2-qr { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.v2-qr-img { width: 176px; height: 176px; padding: 8px; background: #fff; border-radius: 8px; border: 1px solid var(--v-hair); }
.v2-qr-img > svg, .v2-qr-img > img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.v2-qr { min-width: 0; }
.v2-qr > div:last-child { min-width: 0; flex: 1 1 220px; }
.v2-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.v-form-f { display: flex; gap: 8px; justify-content: flex-end; }
.v2-add > summary { list-style: none; cursor: pointer; }
.v2-add > summary::-webkit-details-marker { display: none; }
.v2-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; }
.v2-inline > label { grid-column: 1 / -1; }
.v2-inline.is-danger { padding-top: 10px; border-top: 1px solid var(--v-hair); }
.v2-manage { display: flex; flex-direction: column; gap: 16px; padding: 4px 16px 16px; }
.v2-manage .v2-inline { grid-template-columns: minmax(0, 360px) auto; justify-content: start; }
.v2-manage .v2-inline .v-help { grid-column: 1 / -1; }
.v2-acts { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; }
.v2-acts form { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 240px; }
.v-table tr.is-sel td { background: var(--v-accent-soft, var(--v-surface-2)); }
.v-table tr.is-muted td { color: var(--v-ink-3); }
.v-input.is-sm { height: var(--v-ctl-sm); }
fieldset.v-field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.v-field > legend { padding: 0; margin-bottom: 6px; font-weight: 500; }

/* ---- 研究编辑器 ---- */
.v2-md { width: 100%; min-height: 60vh; resize: vertical; padding: 12px 14px; border: 1px solid var(--v-hair-2); border-radius: 8px;
  background: var(--v-surface); color: var(--v-ink); font: 14px/24px "IBM Plex Mono", ui-monospace, Consolas, monospace; tab-size: 2; }
.v2-md:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 1px; }
.v2-md-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.v2-md-bar > label { font-weight: 500; }
.v2-md-bar .is-end { margin-left: auto; }

/* ---- 文档中心：更多条件、行内操作；BCP 步骤 ---- */
.v2-rec-filter { flex-wrap: wrap; }
.v2-more > summary { list-style: none; }
.v2-more > summary::-webkit-details-marker { display: none; }
.v2-more-b { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; width: 100%; }
.v2-more-b .v-input { flex: 1 1 140px; }
.v2-more[open] { flex-basis: 100%; }
.v2-rec-acts { white-space: nowrap; }
.v2-rec-acts form { display: inline; }
.v2-steps { margin: 0; padding: 4px 16px 12px 36px; display: flex; flex-direction: column; gap: 6px; color: var(--v-ink-2); }
.v2-rec-table { min-width: 820px; }
.v2-rec-table td:nth-child(3) { min-width: 220px; }
