/* ============================================================
   oa-shell v4 外壳与工作台样式 · 《双端设计与维护规范》§2/§6
   ------------------------------------------------------------
   源自 design/oa-shell.html（单据处理台 v4），类名与原型一致。
   加载顺序在 components.css / app.css 之后，同名类以本文件为准。
   ============================================================ */
html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px; line-height: 1.5; color: var(--text-1);
  background: var(--surface); overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text-1); }
/* 裸 select 统一为设计系统外观（oa-full 页筛选/页签切换等原生下拉；
   与 components.css .select 同风格；.list-tools 内的更具体规则在下方覆盖） */
select:not(.select) {
  height: 34px; padding: 0 28px 0 10px; border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  font-size: 13px; color: var(--text-1); appearance: none; -webkit-appearance: none;
}
select:not(.select):focus { outline: none; border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
svg.ic { width: 17px; height: 17px; flex-shrink: 0; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.sk { display: inline-block; height: 12px; border-radius: 6px; background: var(--sk-1); vertical-align: middle; }
.sk.d2 { background: var(--sk-2); }

/* ================= 应用骨架 ================= */
.shell { height: 100vh; display: flex; flex-direction: column; }
.shell-body { flex: 1; display: flex; min-height: 0; }

/* ================= 顶栏 ================= */
.topbar {
  height: var(--top-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; position: relative; z-index: 60; flex-shrink: 0;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: 7px; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg); color: var(--text-1); }
.brand { display: flex; align-items: center; gap: 8px; padding-right: 8px; }
/* logo 底必须为白：logo.png 是透明底蓝色图形+文字，纯色底会把它糊成色块 */
.brand-mark {
  width: 30px; height: 30px; padding: 3px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface); flex: none;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-size: 14px; font-weight: 600; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; }
.live-dot.on { background: var(--success); }
.cmdk {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 380px; max-width: 40vw; height: 32px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text-3);
  display: flex; align-items: center; gap: 8px; padding: 0 10px; font-size: 13px;
}
.cmdk:hover { border-color: var(--border-strong); background: var(--hover); }
/* 占位文字：单行省略（min-width:0 允许在顶栏 flex 里收缩），窄屏不再折行挤出按钮 */
.cmdk .cmdk-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cmdk .kbd {
  margin-left: auto; font-size: 11px; border: 1px solid var(--border); border-radius: 4px;
  padding: 0 5px; background: var(--surface); line-height: 16px; font-family: var(--font-mono);
}
.top-spacer { flex: 1; }
.badge-dot {
  position: absolute; top: 2px; right: 2px; min-width: 14px; height: 14px; padding: 0 4px;
  background: var(--danger); color: var(--on-accent); font-size: 10px; line-height: 14px;
  border-radius: 7px; text-align: center; pointer-events: none;
}
.top-user { display: flex; align-items: center; gap: 7px; padding: 3px 6px 3px 3px; border-radius: 7px; }
.top-user:hover { background: var(--bg); }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.top-user .u-name { font-size: 13px; font-weight: 500; }

/* 用户/通知下拉 */
.pop {
  position: absolute; top: calc(var(--top-h) - 4px); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop);
  display: none; z-index: 70; overflow: hidden;
}
.pop.open { display: block; }
#popUser { right: 10px; width: 224px; padding-bottom: 6px; }
#popUser .u-head { padding: 11px 14px 9px; border-bottom: 1px solid var(--border); }
#popUser .u-head .n { font-weight: 600; font-size: 13.5px; }
#popUser .u-head .r { font-size: 12px; color: var(--text-3); }
#popUser .pop-sec { padding: 8px 14px 3px; font-size: 12px; color: var(--text-3); }
#popUser button.item { display: block; width: 100%; text-align: left; padding: 7px 14px; font-size: 13px; border-radius: 0; }
#popUser button.item:hover { background: var(--bg); }
#popUser .role-btn.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

/* ================= 侧栏 ================= */
.sidebar {
  width: var(--side-w); background: var(--side-bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0; z-index: 40; min-height: 0;
}
.side-scroll { flex: 1; overflow-y: auto; padding: 8px; }
.s-item {
  width: 100%; display: flex; align-items: center; gap: 9px; height: 32px;
  padding: 0 10px; border-radius: 7px; color: var(--text-2); font-size: 13.5px;
  white-space: nowrap; text-align: left; position: relative;
}
.s-item:hover { background: var(--hover); color: var(--text-1); }
.s-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.s-item .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.s-item .n-badge {
  min-width: 17px; height: 17px; padding: 0 5px; background: var(--danger); color: var(--on-accent);
  font-size: 11px; line-height: 17px; border-radius: 9px; text-align: center; flex-shrink: 0;
}
.s-group-head .chev { transition: transform .15s ease; color: var(--text-3); margin-left: auto; }
.s-group-head.open .chev { transform: rotate(90deg); }
.s-group-body { display: none; padding: 1px 0 3px; }
.s-group-body.open { display: block; }
.s-group-body .s-item { height: 30px; padding-left: 36px; font-size: 13px; }

/* ================= 工作区（列表 + 详情） ================= */
.work { flex: 1; display: flex; min-width: 0; min-height: 0; }

/* 列表栏 */
.list-col {
  width: var(--list-w); border-right: 1px solid var(--border); background: var(--surface);
  display: flex; flex-direction: column; flex-shrink: 0; min-height: 0;
}
.list-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.list-head .lh-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.list-head h1 { font-size: 16px; font-weight: 600; flex: 1; margin: 0; }
.list-head .cnt { font-size: 12px; color: var(--text-3); }
.list-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.list-tools .f-input, .list-tools select, .list-tools input[type="date"], .list-tools input[type="month"] {
  height: 30px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface);
  font-size: 12.5px; padding: 0 8px; color: var(--text-2); min-width: 0;
  /* 统一flex基底：一行超过3个控件时自动换行，避免挤窄吞字 */
  flex: 1 1 calc(33.3333% - 4px);
}
/* 日期/账期输入保持内容宽度，既不换行错位也不被压缩 */
.list-tools input[type="date"], .list-tools input[type="month"] { flex: 1 1 118px; }
/* select 右侧预留箭头空间，避免文字被下拉箭头压住（吞字） */
.list-tools select { padding-right: 22px; }
.list-tools .f-input { min-width: 120px; }
.list-tools .f-input:focus, .list-tools select:focus,
.list-tools input[type="date"]:focus, .list-tools input[type="month"]:focus { border-color: var(--accent); outline: none; }
/* 车辆台账：第二行筛选与分页都收在列表栏，不挤占详情空间。 */
.vehicle-list-filters { margin-top: 6px; }
.vehicle-list-filters .f-input { flex: 1 1 180px; min-width: 0; }
.vehicle-list-filters .btn-o { flex: 0 0 auto; }
.vehicle-list-pager { padding: 0 12px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.vehicle-list-pager .pager { justify-content: center; gap: 4px; padding-top: 10px; }
.vehicle-list-pager .pager .total { flex: 0 0 100%; text-align: center; margin: 0; }
.sys-list-pager { padding: 8px 16px 12px; border-top: 1px solid var(--border); background: var(--surface); }
.sys-list-pager .pager { justify-content: center; gap: 4px; padding: 0; }
.sys-list-pager .pager .total { flex: 0 0 100%; margin: 0; text-align: center; }
.vehicle-workbench .d-l1 { flex-wrap: wrap; }
.vehicle-workbench .d-l2 > span:last-child { flex-shrink: 0; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 基础资料检索视图（page-basecatalog，T9）：作为资料项嵌进 .reference-editor
   （自适应高度的卡片）时，.work 没有高度上下文 —— 左右两栏会被撑成内容高度、
   底部保存条落到卡片最下方还要滚动才看得见。这里在嵌卡上下文里补一个与
   .reference-editor--vehicle 同族的高度（只作用于嵌卡内，独立成页时不受影响），
   让两栏各自滚动、保存条常驻。 */
.reference-editor .base-workbench { height: max(620px, calc(100vh - 190px)); min-height: 0; }
.reference-editor .base-workbench > .list-col,
.reference-editor .base-workbench > .detail-col { min-height: 0; }
/* 系统管理页（page-system，T10）：同一个嵌卡上下文。持 base_data.*_manage 的角色
   由 router.referenceComponent 直接进本页（项目 / 仓库 / 分类 / 物资四个资料项），
   故内层工作台同样需要一个高度上下文，否则右栏表单底部的「保存 / 取消」会被裁在
   视口外（与上面 page-basecatalog 是同一处成因，选择器仍限定在 .reference-editor 内）。 */
.reference-editor .sys-workbench { height: max(620px, calc(100vh - 190px)); min-height: 0; }
.reference-editor .sys-workbench > .list-col,
.reference-editor .sys-workbench > .detail-col { min-height: 0; }
.list-scroll { flex: 1; overflow-y: auto; min-height: 0; }
/* 基础资料目录：列表栏里的分组头沿用 app.css 的 .reference-group-head 语汇，
   补上列表栏内边距与分行（18 项资料按 REFERENCE_GROUPS 分段，便于窄栏定位） */
.list-scroll .reference-group-head { padding: 12px 16px 0; }
.d-row {
  width: 100%; display: block; text-align: left; padding: 10px 16px;
  border-bottom: 1px solid var(--border); position: relative;
}
/* 危险行（委托已到期 / 已撤销的警示行）：ds-table 的 tr.row-danger 只管表格行，
   .d-row 卡片行需要同款变体（色值取既有令牌，观感与表格行一致）。
   放在 .d-row.sel 之前——同一特异度下后者胜出，保证「选中」底优先于「危险」底。 */
.d-row.row-danger { background: var(--danger-weak); box-shadow: inset 3px 0 0 var(--danger); }
.d-row.row-danger:not(.sel):hover { background: var(--danger-soft); }
.d-row:hover { background: var(--soft); }
.d-row.sel { background: var(--accent-soft); }
.d-row.sel::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
}
.d-row .d-l1 { display: flex; align-items: center; gap: 8px; }
.d-row .d-no { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--text-1); }
.d-row .d-amt { margin-left: auto; font-size: 13px; font-weight: 600; }
.d-row .d-l2 { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--text-3); }
.d-row .d-l2 .d-proj { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-row.done { opacity: .42; }
.d-row.done .d-no { text-decoration: line-through; }

/* 状态胶囊（五态，唯一状态表达） */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; border-radius: 999px;
  padding: 1px 8px; flex-shrink: 0; font-weight: 500;
}
.pill i { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.pill.p-approve { background: var(--accent-soft); color: var(--accent); } .pill.p-approve i { background: var(--accent); }
.pill.p-exec { background: var(--warning-soft); color: var(--warning); } .pill.p-exec i { background: var(--warning); }
.pill.p-doing { background: var(--info-soft); color: var(--info); } .pill.p-doing i { background: var(--info); }
.pill.p-ok { background: var(--success-soft); color: var(--success); } .pill.p-ok i { background: var(--success); }
.pill.p-abn { background: var(--danger-soft); color: var(--danger); } .pill.p-abn i { background: var(--danger); }
.pill.p-sk { background: var(--sk-1); color: var(--text-3); } .pill.p-sk i { background: var(--border-strong); }

/* 收件箱类型标签 */
.q-type { flex-shrink: 0; font-size: 11.5px; font-weight: 500; border-radius: 5px; padding: 1px 7px; }
.q-type.t-approve { background: var(--accent-soft); color: var(--accent); }
.q-type.t-exec { background: var(--success-soft); color: var(--success); }
.q-type.t-confirm { background: var(--warning-soft); color: var(--warning); }
.q-type.t-abn { background: var(--danger-soft); color: var(--danger); }

/* 详情栏 */
.detail-col { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); position: relative; }
.detail-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.detail-inner { max-width: 860px; margin: 0 auto; padding: 22px 28px 90px; width: 100%; }
.doc-back { display: none; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.doc-back:hover { color: var(--accent); }
.doc-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.doc-head .d-title { flex: 1; min-width: 0; }
/* 字体统一（用户反馈）：doc-head 标题回归正文字体。原 var(--font-mono) 为
   单号等宽设计，但全站 120+ 处 h2 实为中文面板标题/人名/品名——Consolas
   无中文字形，Windows 回退宋体产生「衬线」观感；单号等宽强调改为 B4 抛光项 */
.doc-head h2 { font-size: 19px; font-weight: 600; font-family: var(--font); letter-spacing: 0; margin: 0; }
.doc-head .d-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.doc-head .d-amount { text-align: right; flex-shrink: 0; }
.doc-head .d-amount .a-label { font-size: 11.5px; color: var(--text-3); }
.doc-head .d-amount .a-val { font-size: 20px; font-weight: 700; margin-top: 1px; }

/* 卡片 / 元信息 / 表格 */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.card-head { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 600; }
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.meta-cell { padding: 11px 16px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.meta-cell:nth-child(3n) { border-right: none; }
.meta-cell:nth-last-child(-n+3) { border-bottom: none; }
.meta-cell .m-k { font-size: 11.5px; color: var(--text-3); margin-bottom: 3px; }
.meta-cell .m-v { font-size: 13.5px; }

table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th {
  text-align: left; font-weight: 500; color: var(--text-2); background: var(--soft);
  padding: 8px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 12.5px;
}
table.grid td { padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.grid tr:last-child td { border-bottom: none; }
table.grid .num { text-align: right; }

/* 审批流节点 */
.flow { padding: 14px 16px; }
.f-node { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.f-node:last-child { padding-bottom: 2px; }
.f-node::before {
  content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1.5px; background: var(--border);
}
.f-node:last-child::before { display: none; }
.f-dot {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  background: var(--surface); flex-shrink: 0; margin-top: 2px; position: relative; z-index: 1;
}
.f-node.done .f-dot { background: var(--success); border-color: var(--success); }
.f-node.cur .f-dot { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.f-node.reject .f-dot { background: var(--danger); border-color: var(--danger); }
.f-node .f-name { font-size: 13px; font-weight: 500; }
.f-node .f-meta { font-size: 12px; color: var(--text-3); margin-top: 1px; }

/* 底部动作条 */
.action-bar {
  border-top: 1px solid var(--border); background: var(--surface); padding: 10px 28px;
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap;
}
.action-bar .ab-hint { font-size: 12px; color: var(--text-3); margin-left: auto; }
.btn-o {
  height: 32px; padding: 0 16px; border-radius: 6px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; font-weight: 500;
}
.btn-o.primary { background: var(--accent); color: var(--on-accent); }
.btn-o.primary:hover { background: var(--accent-hover); }
.btn-o.ghost { border-color: var(--border-strong); color: var(--text-2); background: var(--surface); font-weight: 400; }
.btn-o.ghost:hover { border-color: var(--text-3); color: var(--text-1); }
.btn-o.danger-ghost { border-color: var(--danger-border); color: var(--danger); background: var(--surface); font-weight: 400; }
.btn-o.danger-ghost:hover { background: var(--danger-soft); }
.btn-o.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-o:disabled { opacity: .5; cursor: not-allowed; }
.kbd-hint {
  font-size: 11px; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px;
  background: var(--bg); color: var(--text-3); line-height: 16px; font-family: var(--font-mono);
}

/* ================= 右栏直改（编辑态 / 锁定态 / 领域动作面板） ================= */
/* 锁定态用 fieldset[disabled] 做原生禁用（键盘与鼠标一并失效），
   故锁定态仍须可用的只读动作必须放在 #bar 槽（fieldset 之外）。 */
.detail-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.detail-fieldset[disabled] { opacity: .72; }
.detail-fieldset[disabled] input,
.detail-fieldset[disabled] select,
.detail-fieldset[disabled] textarea,
.detail-fieldset[disabled] button { cursor: not-allowed; }
.lock-banner {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; margin-bottom: 12px;
  border: 1px solid var(--warning-border); border-radius: 8px; background: var(--warning-soft);
  font-size: 13px;
}
.lock-banner .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--warning); }
.lock-banner .lb-title { font-weight: 500; }
.lock-banner .lb-note { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.new-banner { padding: 8px 14px; margin-bottom: 12px; border-radius: 8px; font-size: 12.5px; background: var(--accent-soft); color: var(--accent); }
.action-bar .ab-dirty {
  font-size: 12px; color: var(--warning); margin-inline-start: auto;
  flex-shrink: 0; white-space: nowrap;
}
/* 右栏领域动作面板（取代新建/编辑类弹窗；卡头标题 + 右侧取消） */
.panel-head { display: flex; align-items: center; gap: 8px; }
.panel-head .ph-cancel { margin-left: auto; }

/* 空态 */
.empty-detail { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-3); gap: 8px; }
.empty-detail .e-ico { width: 44px; height: 44px; color: var(--border-strong); }

/* 注意：操作反馈 Toast 由 Toast 服务 + components.css 的 .toast-wrap/.toast 提供，
   本层不再定义 .toast，避免后加载覆盖既有 Toast 样式。 */

/* ================= 命令面板 ================= */
.palette-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .3); z-index: 90; display: none; }
.palette-mask.open { display: block; }
.palette {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); width: 520px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-pop); z-index: 95; display: none; overflow: hidden;
}
.palette.open { display: block; }
.palette .p-input-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.palette input { flex: 1; border: none; outline: none; font-size: 14px; background: none; color: var(--text-1); }
.palette .p-list { max-height: 340px; overflow-y: auto; padding: 6px; }
.palette .p-sec { font-size: 11.5px; color: var(--text-3); padding: 8px 10px 3px; }
.palette .p-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 8px; font-size: 13.5px;
}
.palette .p-item .p-no { font-family: var(--font-mono); font-size: 12.5px; }
.palette .p-item .p-tail { margin-left: auto; font-size: 12px; color: var(--text-3); flex-shrink: 0; }
.palette .p-item.sel, .palette .p-item:hover { background: var(--accent-soft); }
.palette .p-empty { padding: 20px; text-align: center; color: var(--text-3); font-size: 13px; }

/* 移动端遮罩：层序必须为 侧栏(65) > 遮罩(64) > 窄屏全屏详情(55/60)。
   曾为 45 且高于侧栏 40：遮罩铺满全屏把打开的侧栏整个盖住，点菜单项
   全被遮罩截走变成「关闭抽屉」——手机上侧栏完全不可选。 */
.mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 64; display: none; }
.mask.open { display: block; }

/* ================= 台账页 ================= */
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.kpi-chip {
  display: flex; flex-direction: column; align-items: flex-start;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  padding: 6px 8px; min-width: 0; text-align: left; overflow: hidden;
}
.kpi-chip:hover { border-color: var(--border-strong); background: var(--soft); }
.kpi-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.kpi-chip .k-val { font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.kpi-chip .k-label { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kpi-chip.warn .k-val { color: var(--warning); }
.kpi-chip.bad .k-val { color: var(--danger); }
.kpi-chip.on .k-label { color: var(--accent); }
.e-row .e-name { font-size: 13.5px; font-weight: 500; color: var(--text-1); }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.stat-card .s-k { font-size: 11.5px; color: var(--text-3); }
.stat-card .s-v { font-size: 18px; font-weight: 700; margin-top: 2px; }
.stat-card .s-v small { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 2px; }
.stat-card.warn .s-v { color: var(--warning); }
.stat-card.bad .s-v { color: var(--danger); }

/* ================= 密度 ================= */
body[data-density="compact"] { font-size: 13.5px; }
body[data-density="compact"] .s-item { height: 28px; font-size: 13px; }
body[data-density="compact"] .s-group-body .s-item { height: 26px; }
body[data-density="compact"] .d-row { padding: 7px 16px; }
body[data-density="compact"] .list-head { padding: 10px 16px 8px; }
body[data-density="compact"] table.grid th { padding: 6px 16px; }
body[data-density="compact"] table.grid td { padding: 7px 16px; }
body[data-density="compact"] .card-head { padding: 8px 16px; }
body[data-density="compact"] .meta-cell { padding: 8px 16px; }
body[data-density="compact"] .stat-card { padding: 8px 14px; }
body[data-density="compact"] .stat-card .s-v { font-size: 16px; }
body[data-density="compact"] .f-node { padding-bottom: 12px; }
body[data-density="compact"] .detail-inner { padding: 16px 28px 80px; }
body[data-density="compact"] .action-bar { padding: 8px 28px; }

/* ================= 响应式 ================= */
@media (min-width: 1024px) {
  /* 桌面端汉堡键 = 收起/展开侧栏（内容区自动重排）；窄屏才是抽屉+遮罩 */
  body.drawer .sidebar { display: none; }
  body.drawer .mask { display: none; }
}
@media (max-width: 1279px) {
  .list-col { width: 300px; }
  .cmdk { width: 300px; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1023px) {
  .sidebar {
    position: fixed; left: 0; top: var(--top-h); bottom: 0;
    transform: translateX(-100%); transition: transform .18s ease; background: var(--surface);
    /* 抽屉抬到遮罩(64)与全屏详情(55/60)之上：菜单可点，且窄屏停在详情全屏时
       也能经顶栏汉堡键唤出抽屉切模块 */
    z-index: 65;
  }
  body.drawer .sidebar { transform: translateX(0); }
  .cmdk { position: static; transform: none; width: auto; flex: 1; max-width: none; min-width: 0; }
  /* 触屏没有 Ctrl K；占位文字由 .cmdk-hint 单行省略，不再把顶栏挤爆 */
  .cmdk .kbd { display: none; }
  .brand-name { display: none; }
}
@media (max-width: 560px) {
  /* 极窄屏：搜索只留图标按钮（aria-label 仍在），空间让给头像与通知 */
  .cmdk .cmdk-hint { display: none; }
}
/* 窄屏（<900px）：详情全屏覆盖（规范 §6 契约）。
   分层规则：顶层工作台吃 body 级 show-detail（既有契约不变）；嵌套工作台
   （资料中心右栏内嵌的编辑器：.reference-editor > 各页 oa-workbench）吃自身根类
   .detail-open。嵌套层若也响应 body 级标记，两层 .detail-col 会同时 fixed、
   两层 .list-col 又同时被隐藏 —— 内层（无选中时是空详情）盖住外层「返回列表」，
   用户既看不到列表也无处可退（T18 巡检 P1）。
   嵌套层取 z-index 60 > 顶层 55：内层自己进详情时盖住外层，返回则回本层列表。 */
@media (max-width: 899px) {
  .list-col { width: 100%; border-right: none; }
  .detail-col { display: none; }
  body.show-detail .work:not(.work--nested) > .list-col { display: none; }
  body.show-detail .work:not(.work--nested) > .detail-col {
    display: flex; position: fixed; inset: var(--top-h) 0 0 0; z-index: 55;
  }
  /* 嵌套层：列表默认可见（内层详情不遮挡时用户仍能浏览内层列表） */
  .work--nested.detail-open > .list-col { display: none; }
  .work--nested.detail-open > .detail-col {
    display: flex; position: fixed; inset: var(--top-h) 0 0 0; z-index: 60;
  }
  .doc-back { display: inline-flex; }
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .meta-cell:nth-child(3n) { border-right: 1px solid var(--border); }
  .meta-cell:nth-child(2n) { border-right: none; }
  .meta-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .meta-cell:nth-last-child(-n+2) { border-bottom: none; }
}

/* ================= 全宽页容器（无列表栏的特殊页） ================= */
.full-col { flex: 1; min-width: 0; overflow-y: auto; background: var(--bg); display: flex; flex-direction: column; }
.full-inner { max-width: 1080px; margin: 0 auto; padding: 20px 28px 60px; width: 100%; }
/* 表格密集型页面（账号与角色/审计日志/审批流程/规则）：放宽内容上限，充分利用宽屏 */
.full-inner--wide { max-width: 1440px; }

/* ================= 全宽页通用结构（工作台/设置类页面） ================= */
.full-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.full-head .full-title { font-size: 18px; font-weight: 600; margin: 0; }
.full-head .full-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.full-head > button { margin-left: auto; flex-shrink: 0; }
.sec-block { margin-bottom: 16px; min-width: 0; }
/* 待办区块与经营概览共用同一内容宽度。 */
.sec-block--todo { width: 100%; }
.sec-h {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 14px; font-weight: 600;
}
.sec-h small { font-size: 12px; font-weight: 400; color: var(--text-3); }
.sec-h .sec-more {
  margin-left: auto; font-size: 12px; font-weight: 400;
  color: var(--accent); text-decoration: none;
}
.sec-h .sec-more:hover { text-decoration: underline; }
.win-switch { margin-left: auto; display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.win-switch button {
  padding: 3px 10px; font-size: 12px; border: none; background: var(--surface); color: var(--text-3); cursor: pointer;
}
.win-switch button + button { border-left: 1px solid var(--border); }
.win-switch button.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.full-empty { padding: 22px 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.portal-tabs { margin-left: auto; }
.portal-tabs select { min-width: 140px; }
.portal-section-head { justify-content: space-between; flex-wrap: wrap; }
.portal-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.portal-search .input { width: 190px; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; padding: 12px; }
.portal-asset { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.portal-asset-photo { height: 140px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--bg); color: var(--text-3); font-size: 12px; }
.portal-asset-photo img { width: 100%; height: 100%; object-fit: cover; }
.portal-asset-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 12px; }
.portal-asset-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.portal-asset-action { width: 100%; margin-top: auto; }
.ds-attachment-list { display: flex; flex-wrap: wrap; gap: 10px; }
.ds-attachment-item { max-width: 100%; min-width: 0; }
.ds-attachment-item > a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; overflow-wrap: anywhere; }
.ds-attachment-image { width: 88px; height: 88px; padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); cursor: zoom-in; }
.ds-attachment-image img { width: 100%; height: 100%; object-fit: cover; }
.ds-attachment-image:focus-visible, .ds-attachment-item > a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.asset-status-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) {
  .asset-status-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-tabs { margin-left: 0; }
  .portal-search, .portal-search .input { width: 100%; }
  .portal-search .input { font-size: 16px; }
}
.full-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 899px) { .full-two { grid-template-columns: 1fr; } }
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { border-color: var(--accent); }
.alert-line {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.alert-line:last-child { border-bottom: none; }
.alert-line .a-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); padding: 0; overflow: hidden; border-radius: 10px; }
.quick-grid .quick-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; background: var(--surface); border: none; font-size: 13.5px;
  color: var(--text-1); cursor: pointer; text-align: left;
}
.quick-grid .quick-link:hover { background: var(--soft); color: var(--accent); }

/* ============================================================
   登录页（规范 §2，自 ds-layout.css 迁入 2026-09-20）
   ------------------------------------------------------------
   白名单：网站名称 / 账号 / 密码（含显示开关）/ 登录按钮。
   保留 .login-page / .login-panel 类名与控件顺序：
   验证脚本（tools/verify-*.cjs、probe.cjs）靠
   `.login-panel input` / `.login-panel button` 定位登录控件。
   ============================================================ */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;          /* 动态视口：移动端地址栏收展仍居中 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);       /* 纯色底，无渐变 */
  overflow-y: auto;            /* 视口容不下卡片时允许纵向滚动 */
}
.login-page::before, .login-page::after { display: none; }

.login-panel {
  width: min(360px, 100%);
  margin: auto;                /* 视口过矮时配合滚动保证顶部可见 */
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);  /* 12px */
  background: var(--surface);
  box-shadow: var(--shadow-login);
  text-align: center;
}
/* 网站名称：唯一品牌行，20px/600 居中 */
.login-title {
  font-size: 20px; font-weight: 600; color: var(--text-1);
  line-height: 1.4; margin-bottom: 28px;   /* 标题到表单 28px */
  text-align: center;
}
.login-panel form { text-align: left; }
.login-panel .field { margin-bottom: 16px; }
.login-panel .input { height: 44px; padding: 0 13px; border-radius: var(--r-sm); }
/* 字段级错误：就地显示，一条清楚提示 */
.login-panel .field .err-text { display: block; margin-top: 6px; font-size: 12px; color: var(--danger); }
.login-pwd { position: relative; }
.login-pwd .input { padding-right: 48px; }
.login-pwd-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border: 0; border-radius: var(--r-sm); background: none; cursor: pointer;
  color: var(--text-3); display: inline-flex; align-items: center; justify-content: center;
}
.login-pwd-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.login-pwd-toggle svg { width: 18px; height: 18px; }
/* 登录按钮：与输入框等宽，44px，纯色主蓝 */
.login-btn {
  width: 100%; height: 44px; margin-top: 4px; /* 密码框到按钮 20px = 16(字段距)+4 */
  border-radius: var(--r-sm); font-size: 14px;
}
/* 认证失败等服务端错误：表单内一条提示 */
.login-error {
  margin-top: 12px; padding: 8px 12px;
  border: 1px solid var(--danger-soft); border-radius: var(--r-sm);
  background: var(--danger-soft); color: var(--danger);
  font-size: 13px; line-height: 1.5; text-align: left;
}
@media (max-width: 560px) {
  .login-panel { padding: 24px; }   /* 窄屏内边距 24px */
}

/* ================= 页级页签条（IA 合并 B1） ================= */
/* page-merged 根容器（终审修复）：.shell-body 是行向 flex，合并页根节点必须
   占满剩余宽度且自身为列向 flex，页签条才能横贯工作区上方、工作区纵向填充
   （min-width/min-height 双 0 与 .work 同口径；不得用 display:contents，
   那会让 pg-tabs-bar 直接成为 .shell-body 的行向 flex 项） */
.merged-page { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pg-tabs-bar {
  display: flex; align-items: stretch; gap: 2px; padding: 0 14px;
  background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0;
  overflow-x: auto; height: 38px; scrollbar-width: none;
}
.pg-tabs-bar::-webkit-scrollbar { display: none; }
/* B3.6：左端面包屑「入口 · 页签」（数据源 merged.js crumb prop，签随切实时） */
.pg-tabs-bar .tb-crumb {
  align-self: center; font-size: 12px; color: var(--text-3);
  padding: 2px 10px 2px 0; margin-right: 6px; border-right: 1px solid var(--border);
  white-space: nowrap; flex-shrink: 0;
}
.pg-tabs-bar .pg-tab {
  font: inherit; font-size: 13px; height: auto; align-self: flex-end; padding: 4px 12px 6px; margin-bottom: -1px;
  color: var(--text-2); border: none; border-bottom: 2px solid transparent;
  border-radius: 0; background: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
}
.pg-tabs-bar .pg-tab:hover { background: none; color: var(--text-1); }
.pg-tabs-bar .pg-tab.on { background: none; color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.pg-tabs-bar .tb-sp { flex: 1; }
.pg-tabs-bar .tabbar-note {
  align-self: center; font-size: 11px; color: var(--text-3);
  display: inline-flex; align-items: center; white-space: nowrap; margin-left: 8px;
}
.pg-tabs-bar .tb-n {
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--sk-1); color: var(--text-3);
  font-size: 10.5px; line-height: 15px; text-align: center;
}
.pg-tabs-bar .pg-tab.on .tb-n { background: var(--accent-soft); color: var(--accent); }
.pg-tabs-bar .tb-n.hot { background: var(--danger-soft); color: var(--danger); }
body[data-density="compact"] .pg-tabs-bar { height: 34px; }
body[data-density="compact"] .pg-tabs-bar .pg-tab { font-size: 12.5px; }
/* 窄屏：页签条占位 39px，全屏详情覆盖层随之下移（顶层与嵌套层各一条，
   选择器与既有窄屏覆盖层规则同形、仅加 body.has-tabs 前缀） */
@media (max-width: 899px) {
  body.has-tabs.show-detail .work:not(.work--nested) > .detail-col { inset: calc(var(--top-h) + 39px) 0 0 0; }
  body.has-tabs .work--nested.detail-open > .detail-col { inset: calc(var(--top-h) + 39px) 0 0 0; }
}

/* ============================================================
   工作台待办合并列表（approval-queue，IA 合并 B2 追加）
   原型口径：两级筛选后直接一张跨域列表，无第三行域名分类签。
   仅新增规则，不改动上方任何既有选择器。
   队列内容随卡片满宽，与下方经营概览共用右缘；
   窄窗口（≤900px）动作换行到文本下方，任何宽度都完整可见。
   ============================================================ */
.q-rows { display: flex; flex-direction: column; gap: 8px; }
.q-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px;
}
.q-row:hover { border-color: var(--accent); }
.q-row.q-row-warn { border-color: var(--warning-soft); background: var(--warning-soft); }
.q-row.q-row-focus { border-color: var(--accent); background: var(--accent-soft); }
.q-main { flex: 1; min-width: 0; cursor: pointer; }
.q-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.q-no { flex-shrink: 0; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text-1); }
.q-title { font-size: 13px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-l2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.q-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-date { flex-shrink: 0; }
.q-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.q-issues { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.q-issue {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--danger-soft); color: var(--danger); border-radius: 8px;
  padding: 8px 12px; font-size: 12.5px;
}
.q-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.q-jumps { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.q-jump {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px dashed var(--border); border-radius: 10px;
  padding: 10px 14px;
}
.q-jt { font-weight: 600; font-size: 13px; color: var(--text-1); flex-shrink: 0; }
.q-jd { flex: 1; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .q-row { flex-direction: column; align-items: stretch; }
  .q-main { cursor: pointer; }
  .q-acts { justify-content: flex-start; }
}

/* ============================================================
   基础资料内嵌编辑器铺满资料页右栏（用户反馈：第三栏按内容宽 804px
   居中、两侧各留 ~300px 空白）。成因：外层与内嵌工作台各自的
   .detail-inner 860px 文档限宽——内嵌的是整套工作台而非单文档，
   限宽语义不适用。命中内嵌编辑器时放开两层限宽，编辑器横向撑满；
   普通单文档详情不受影响。仅新增规则。
   ============================================================ */
.detail-inner:has(.reference-editor) { max-width: none; }
.reference-editor .detail-inner { max-width: none; }

/* 基础资料内嵌工作台统一高度上下文（与上方 base-workbench / sys-workbench 两条例
   同一成因：无高度上下文时左右两栏按内容收缩成小卡片、右栏直改底部落到卡片外）。
   规则从逐页类升级为通用 .work，覆盖供应商/承运等全部 18 项资料的内嵌工作台。
   贴边版式（用户反馈「还是卡片式，要侧栏贴边」）：内嵌编辑器去掉自带边框/圆角/
   内边距，外层 detail-inner 归零内边距，编辑器高度=视口-顶栏，整体与资料列表
   无缝拼接成多栏工作面，不再有「浮卡+四周留白」。 */
.detail-inner:has(.reference-editor) { max-width: none; padding: 0; }
.reference-editor { border: 0; border-radius: 0; padding: 0; height: calc(100vh - 48px); }
.reference-editor .work { height: 100%; min-height: 0; }
.reference-editor .work > .list-col,
.reference-editor .work > .detail-col { min-height: 0; }

/* P2 修复（2026-09-27）：窄屏/内容挤压时列表头标题被压成竖排、动作按钮硬换行。
   标题整体不换行（宽度不够时整块下移一行），按钮组允许换行。新增规则，不改既有。 */
.list-head .lh-top { flex-wrap: wrap; row-gap: 8px; }
.list-head .lh-top h1 { white-space: nowrap; flex: 1 1 auto; }
.list-head .lh-top .cnt { white-space: nowrap; }
.list-head .lh-check { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; cursor: pointer; }

/* 分管部门配置：窄屏保存/取消保持完整，说明在剩余空间换行。 */
.sys-workbench--scope .action-bar > .btn-o { flex-shrink: 0; white-space: nowrap; }

/* 角色分配：先汇总已选，再按类型在可用宽度内排列。 */
.sys-workbench--users .action-bar { flex-wrap: wrap; }
.sys-workbench--users .action-bar > .btn-o,
.sys-workbench--users .action-bar > .ab-dirty { flex-shrink: 0; white-space: nowrap; }
.role-picker { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.role-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.role-picker-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.role-picker > .hint { margin: 6px 0 12px; }
.role-picker-selected { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; margin-bottom: 16px; }
.role-picker-tag { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 32px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-1); text-align: start; cursor: pointer; }
.role-picker-tag span:first-child { overflow-wrap: anywhere; }
.role-picker-tag span:last-child { font-size: 18px; flex-shrink: 0; color: var(--text-3); }
.role-picker-tag:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.role-picker-tools { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.role-picker-search { flex: 1 1 200px; min-width: 0; display: grid; gap: 6px; font-size: 12px; color: var(--text-2); }
.role-picker-only { min-height: 38px; white-space: nowrap; }
.role-picker-group + .role-picker-group { margin-top: 20px; }
.role-picker-group h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.role-picker-group h4 > span { color: var(--text-3); font-weight: 400; }
.role-picker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 6px 10px; }
.role-picker-option { display: flex; align-items: center; gap: 9px; min-height: 42px; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; font-size: 13px; line-height: 1.5; }
.role-picker-option input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.role-picker-option > span { overflow-wrap: anywhere; }
.role-picker-option:hover { border-color: var(--accent); }
.role-picker-option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.role-picker-option:has(input:disabled), .role-picker-tag:disabled { cursor: default; opacity: .65; }
.role-picker-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 24px 12px; color: var(--text-3); font-size: 13px; background: var(--bg); border-radius: 6px; }
@media (max-width: 599px) {
  .role-picker-grid { grid-template-columns: 1fr; }
  .role-picker-option { min-height: 44px; font-size: 16px; }
  .role-picker-search input { font-size: 16px; }
  .role-picker-tag { min-height: 36px; }
}
