/* 新功能共用样式，范围限定在 ld-* 与独立员工页。 */
.ld-toolbar, .ld-pager { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:14px 0; }
.ld-field { display:grid; gap:7px; min-width:180px; font-size:13px; }
.ld-field input, .ld-field textarea, .ld-field select, .ld-toolbar select {
  padding:9px; border:1px solid #adb4c4; border-radius:8px; font:inherit;
  background:var(--ld-input,#fff); color:inherit;
}
.ld-field textarea { min-height:100px; }
.ld-message { min-height:24px; white-space:pre-wrap; color:inherit; }
.ld-message.error { color:#c74444; }
.ld-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:16px; }
.ld-card { border:1px solid #c9ced8; border-radius:14px; padding:20px; margin:16px 0; overflow-wrap:anywhere; }
.ld-card h2, .ld-card h3 { margin:0 0 12px; }
.ld-card p { line-height:1.7; }
.ld-card button { padding:9px 14px; border:1px solid #8b96af; border-radius:8px; background:#564be8; color:#fff; cursor:pointer; }
.ld-card button:disabled { opacity:.45; cursor:not-allowed; }
.ld-card select { padding:8px; }
.ld-card pre { white-space:pre-wrap; }
.ld-table { width:100%; border-collapse:collapse; }
.ld-table th, .ld-table td { text-align:left; padding:10px; border-bottom:1px solid #d7dce6; vertical-align:top; }
.ld-table-wrap { overflow-x:auto; }
.ld-dark { --ld-input:#171720; color:#ededf3; padding:28px 24px 70px; }
.ld-dark .ld-card { background:#101017; border-color:#343443; }
.ld-dark .ld-field input, .ld-dark .ld-field textarea { color:#ededf3; }
.ld-dark a { color:#b6b1ff; text-decoration:underline; text-underline-offset:3px; }
.ld-dark a:hover { color:#ddd9ff; }
.ld-dark a:focus-visible { outline:2px solid #b6b1ff; outline-offset:4px; border-radius:2px; }
.ld-modal { position:fixed; inset:0; z-index:150; background:#0009; display:grid; place-items:center; padding:20px; }
.ld-modal > .ld-card { background:#fff; max-width:900px; max-height:88vh; overflow:auto; width:100%; }
@media(max-width:650px) {
  .ld-dark { padding:18px 12px 50px; }
  .ld-field { min-width:0; width:100%; }
  .ld-toolbar > * { max-width:100%; }
  .ld-pager { justify-content:center; }
}
@media(prefers-reduced-motion:reduce) { .ld-card * { scroll-behavior:auto!important; } }
/* 后台模型选项独立布局，勾选框固定在左，名称与编号分行显示。 */
.tab-content[id^="tab-ld-"] .ld-model-choices, .ld-modal .ld-model-choices {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px;
  min-width:0; margin:16px 0; padding:14px; border:1px solid #d7dce6; border-radius:10px;
}
.ld-model-choices > legend { padding:0 6px; color:#354052; font-size:13px; font-weight:600; }
.ld-model-choices > .ld-model-choice {
  display:grid; grid-template-columns:18px minmax(0,1fr); align-items:start; gap:10px;
  min-width:0; margin:0; padding:10px; border:1px solid #d7dce6; border-radius:8px;
  background:#fff; color:#354052; cursor:pointer;
}
.ld-model-choice:hover { border-color:#8b96d8; background:#f7f8ff; }
.ld-model-choice:has(input:checked) { border-color:#8b96d8; background:#f1f3ff; }
.ld-model-choice:focus-within { outline:2px solid #667eea; outline-offset:2px; }
.ld-model-choice-copy { display:block; min-width:0; line-height:1.5; overflow-wrap:anywhere; }
.ld-model-choice-name { display:block; font-size:13px; font-weight:600; }
.ld-model-choice-id { display:block; margin-top:3px; color:#657087; font:11px/1.5 ui-monospace,Consolas,monospace; overflow-wrap:anywhere; }
.tab-content[id^="tab-ld-"] .ld-check-field, .ld-modal .ld-check-field {
  display:flex; align-items:center; gap:10px; min-width:0; cursor:pointer;
}
.ld-model-choices input[type="checkbox"],
.tab-content[id^="tab-ld-"] .ld-check-field input[type="checkbox"],
.ld-modal .ld-check-field input[type="checkbox"] {
  appearance:auto; width:18px; height:18px; min-width:18px; min-height:18px;
  flex:0 0 18px; margin:0; padding:0; border:0; border-radius:0; accent-color:#667eea; cursor:pointer;
}
.ld-model-choices input[type="checkbox"] { margin-top:2px; }
@media(max-width:650px) {
  .tab-content[id^="tab-ld-"] .ld-model-choices, .ld-modal .ld-model-choices { grid-template-columns:minmax(0,1fr); padding:10px; }
  .ld-modal .ld-grid { grid-template-columns:minmax(0,1fr); }
  .ld-modal > .ld-card { min-width:0; }
}

/* 专供池在窄屏保持表格可读，允许横向滚动查看。 */
#tab-ld-key-pool .ld-table { min-width:760px; }
#tab-ld-key-pool .ld-toolbar { align-items:flex-end; }
#tab-ld-key-pool .ld-transfer-action { white-space:nowrap; }
