/* Shared single-select controls: keep native focus, keyboard and change events. */
html body input[type="checkbox"] {
  appearance:none;box-sizing:border-box;display:inline-block;vertical-align:middle;
  width:15px;height:15px;min-width:15px;min-height:15px;padding:0;
  border:1px solid var(--line2,#aeb4bc);border-radius:3px;background:var(--card,#fff);
  box-shadow:none;cursor:pointer;
}
html body input[type="checkbox"]:checked,
html body input[type="checkbox"]:indeterminate {
  border-color:var(--green,#10b981);background-color:var(--green,#10b981);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8 3 3 6-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position:center;background-size:100% 100%;background-repeat:no-repeat;
}
html body input[type="checkbox"]:indeterminate {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")}
html body input[type="checkbox"]:focus-visible{outline:2px solid var(--green,#10b981);outline-offset:2px}
html body input[type="checkbox"]:disabled{opacity:.45;cursor:default}
.os-dialog :is(input[type="text"],input[type="email"],input[type="search"],input[type="number"],input[type="password"]) {
  box-sizing:border-box;min-width:0;min-height:34px;padding:7px 10px;
  border:1px solid var(--line2,#dce0e3);border-radius:6px;
  background:var(--card,#fff);color:var(--fg,#1e232c);font:inherit;box-shadow:none;
}
.os-dialog input[type="checkbox"] {width:15px;height:15px;accent-color:var(--green,#10b981);cursor:pointer}
html body select:not([multiple]):not([size]),
html body select[size="1"] {
  border-radius:6px;
  border-color:var(--line2,#dce0e3);
  background-color:var(--control-bg,var(--card,#fff));
  color:var(--fg,#1e232c);
  box-shadow:none;
}
@supports (appearance:base-select) {
  html body select:not([multiple]):not([size]),
  html body select[size="1"],
  html body select:not([multiple]):not([size])::picker(select),
  html body select[size="1"]::picker(select) { appearance:base-select; }
  html body select:not([multiple]):not([size]),
  html body select[size="1"] {
    align-items:center;
    gap:8px;
    background-image:none;
    padding-inline:10px;
    cursor:pointer;
  }
  html body select::picker-icon {color:var(--fg3,#81878e);margin-inline-start:auto;flex-shrink:0}
  html body select::picker(select) {
    box-sizing:border-box;
    max-width:calc(100vw - 24px);
    max-height:min(360px,60vh);
    margin-block:4px;
    padding:4px;
    border:1px solid var(--line2,#dce0e3);
    border-radius:8px;
    background:var(--card,#fff);
    color:var(--fg,#1e232c);
    box-shadow:none;
    font-family:inherit;
    font-size:12px;
    line-height:1.5;
    overflow:auto;
  }
  html body select option {
    min-height:32px;
    padding:7px 10px;
    gap:8px;
    border-radius:4px;
    white-space:normal;
    overflow-wrap:anywhere;
    cursor:pointer;
  }
  html body select option:hover,
  html body select option:focus-visible {background:var(--bg,#f5f6f7);outline:none}
  html body select option:checked {background:#e9f7f1;color:var(--green-ink,#087c58)}
  html body select option::checkmark {color:#fff;background:var(--green,#10b981);border-radius:3px;padding:0 2px;line-height:15px}
  html body select option:disabled {opacity:.45;cursor:default}
  html body select:disabled {cursor:default}
}

/* Native-select-shaped filled caret for disclosure controls beside native selects. */
.select-caret::after{content:'▾';display:inline-block;flex:none;margin-inline-start:8px;color:var(--fg3,#81878e);font-size:12px;line-height:1}

/* 公共取值下拉，Excel兼容类名；共享DOM与规则。 */
/* 单元格取值下拉（有值域清单的列：审查状态／申请类型／是否结案）。
   浮层用 **fixed** 定位到视口 —— 与 .excel-dropdown-menu 同一套理由：
   工作区 main 是 overflow:auto，absolute 浮层会被裁掉下半截。
   位置由 JS 按那一格的**视口坐标**算（默认贴在格子下方，下方不够就翻到上方）。 */
.excel-value-dropdown {
  position: fixed; top: 0; left: 0; z-index: 40;
  max-width: 320px; padding: 6px;
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  background: var(--card); box-shadow: var(--pop);
  display: flex; flex-direction: column; gap: 6px;
}
.excel-value-dropdown-search {
  width: 100%; height: 30px; padding: 0 8px;
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  background: var(--bg-alt); color: var(--fg); font: inherit; font-size: 13px;
}
.excel-value-dropdown-search:focus-visible { outline: 2px solid color-mix(in srgb, var(--green) 45%, transparent); outline-offset: 1px; }
.excel-value-dropdown-list { display: flex; flex-direction: column; gap: 1px; max-height: 260px; overflow: auto; }
.excel-value-dropdown-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 6px 10px; border: none; border-radius: var(--r-sm);
  background: transparent; color: var(--fg);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer; white-space: nowrap;
}
.excel-value-dropdown-item:hover { background: var(--bg-alt); color: var(--green-ink); }
.excel-value-dropdown-item[aria-selected="true"] { background: color-mix(in srgb, var(--green) 10%, var(--card)); color: var(--green-ink); }
.excel-value-dropdown-item:focus-visible { outline: 2px solid color-mix(in srgb, var(--green) 45%, transparent); outline-offset: -2px; }
/* 清单以外的值：单独占一行、标成「自定义」（**不推断**成任一标准项）。 */
.excel-value-dropdown-item.is-custom { color: var(--fg2); font-style: italic; }
/* 「自己填一个」那个口（清单下面那一条）。 */
.excel-value-dropdown-item.is-own {
  margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--green-ink);
}
.excel-value-dropdown-check { flex: 0 0 14px; margin-left: auto; color: var(--green-ink); font-size: 12px; }
.excel-value-dropdown-empty { padding: 8px 10px; color: var(--fg3); font-size: 12px; }
.excel-value-dropdown-editor { display: flex; gap: 6px; }
.excel-value-dropdown-editor[hidden] { display: none; }
/* ⚠️ **清单的 `hidden` 也得显式写一条**（用户 2026-11-02「这个框有点丑」）：
   `.excel-value-dropdown-list` 是 `display:flex` ⇒ **压过浏览器默认的 `[hidden]{display:none}`**
   ⇒ 点了「其他（自行填写）」以后，JS 虽然已经把 `hidden` 标上了，整张清单**还是亮着**
   （连那条绿字「其他（自行填写）」都还在输入框正上方，面板一下撑到 310px 高）。
   同一个坑本文件已经踩过两回（`.excel-inline-edit[hidden]`、`.chat-layer[hidden]`）⇒ 这里照旧写法补齐。 */
.excel-value-dropdown-list[hidden] { display: none; }
.excel-value-dropdown-search[hidden] { display: none; }
/* 输入框：**白底** ＋ 1px 淡描边（同本域列头筛选面板 `.excel-column-filter-criteria input` 那一套）。
   聚焦时**不要**全站那道 2px 绿圈（`deepseek.css` 的全局 focus 规则）⇒ 换成 1px 绿描边，
   跟同域的 `.excel-column-filter-criteria input:focus` 同一个口径。 */
.excel-value-dropdown-input {
  flex: 1 1 auto; min-width: 0; height: 30px; padding: 0 8px;
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  background: var(--card); color: var(--fg); font: inherit; font-size: 13px;
}
.excel-value-dropdown-input:focus, .excel-value-dropdown-input:focus-visible {
  outline: none; border-color: var(--green);
}
/* 「确定」＝面板里唯一的主行动 ⇒ **绿底白字**（同 `.btn-pri` ＋ 本域列头筛选面板的主按钮）。 */
.excel-value-dropdown-ok {
  flex: 0 0 auto; height: 30px; padding: 0 12px;
  border: 1px solid var(--green); border-radius: var(--r-sm);
  background: var(--green); color: #fff; font: inherit; font-size: 13px; cursor: pointer;
}
.excel-value-dropdown-ok:hover { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }

