:root {
  --primary: #3b62d4;
  --primary-hover: #334fbf;
  --primary-tint: rgba(59,98,212,.06);
  --text: #191c3d;
  --muted: #606266;
  --canvas: #f2f3f5;
  --surface: #fff;
  --surface-muted: #f4f6fc;
  --border: #e1e6f0;
  --sidebar: #222732;
  --success: #389e0d;
  --success-bg: #e8f6e1;
  --danger: #f04438;
  --warning: #d48806;
  --motion-hover: 150ms;
  --motion-dialog: 220ms;
  --motion-toast: 250ms;
  --font: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.6 var(--font); color: var(--text); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, input, select, textarea { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
a { color: var(--primary); text-decoration: none; }
button { transition: background var(--motion-hover), border-color var(--motion-hover), color var(--motion-hover); }
button:disabled { opacity: .45; cursor: not-allowed; }
[hidden] { display: none !important; }
svg { width: 17px; height: 17px; flex: none; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shell { display: grid; grid-template-columns: 220px minmax(0,1fr); height: 100vh; overflow: hidden; }
.shell.folded { grid-template-columns: 64px minmax(0,1fr); }
.sidebar { background: var(--sidebar); color: #ffffff8c; overflow: auto; }
.brand { min-height: 64px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; color: #fff; }
.brand img { width: 32px; height: 32px; flex: none; }
.brand-name { font-weight: 700; font-size: 14px; line-height: 20px; }
.nav-section { margin-top: 8px; }
.nav-link, .nav-parent { width: 100%; border: 0; background: transparent; color: inherit; display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 20px; text-align: left; }
.nav-link:hover, .nav-parent:hover { color: #fff; background: #ffffff0d; }
.nav-link.active { background: linear-gradient(270deg,#3b62d433,#3b62d4); color: #fff; }
.nav-link.sub { padding-left: 47px; font-size: 14px; }
.nav-parent .chevron { margin-left: auto; }
.nav-spacer { height: 12px; }
.side-foot { padding: 20px; font-size: 12px; color: #ffffff66; }
.folded .brand-name,.folded .nav-text,.folded .side-foot,.folded .chevron { display:none; }
.folded .brand { padding-left: 16px; }
.folded .nav-link.sub { padding-left: 23px; }
.workspace { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.topbar { height: 44px; flex: none; background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; }
.breadcrumb,.top-actions { display: flex; align-items: center; gap: 12px; }
.breadcrumb .muted { color: #9398a8; }
.icon-button { border: 0; background: transparent; padding: 4px; color: var(--muted); line-height: 1; }
.icon-button:hover { color: var(--primary); }
.top-actions img { width: 20px; height: 20px; }
.top-actions .btn { min-height: 30px; padding: 0 9px; }
.user-button { border:0; background:none; display:flex; gap:7px; align-items:center; color:var(--text); }
.tabs { height: 45px; flex:none; background: #fff; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; padding: 7px 10px 8px; overflow-x: auto; }
.route-tab { display:flex; align-items:center; gap:10px; height:30px; padding:4px 10px; background:var(--surface-muted); color:var(--text); border-radius:2px; white-space:nowrap; }
.route-tab.active { color: #fff; background: var(--primary); }
.route-tab button { border:0; background:none; color:inherit; padding:0; font-size:16px; line-height:1; }
.tab-context-menu { position:fixed; z-index:12000; min-width:180px; padding:6px 0; background:#fff; border:1px solid var(--border); border-radius:6px; box-shadow:0 8px 24px rgba(15,23,42,.16); }
.tab-context-menu button { display:block; width:100%; border:0; background:#fff; color:var(--text); text-align:left; padding:10px 16px; font-size:14px; white-space:nowrap; }
.tab-context-menu button:hover:not(:disabled) { background:var(--surface-muted); color:var(--primary); }
.tab-context-menu button:disabled { color:#b9becb; cursor:not-allowed; background:#fff; }
main { padding: 12px; flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.panel { background: #fff; border-radius: 4px; padding: 10px; box-shadow: 0 2px 10px #00000005; min-width: 0; }
.page-title { font-size:20px; line-height:28px; margin:0 0 16px; display:flex; gap:10px; align-items:center; }
.page-title:before,.section-title:before { content:""; width:6px; height:6px; border-radius:50%; background:var(--primary); flex:none; }
.section-title { display:flex; align-items:center; gap:8px; font-size:16px; font-weight:700; margin:0 0 14px; }
.people-layout { display:grid; grid-template-columns:240px minmax(0,1fr); gap:10px; height:100%; min-height:0; }
.scope-panel { display:flex; flex-direction:column; gap:10px; overflow:hidden; }
.scope-panel .section-title { margin:6px 0 0; }
.scope-panel .org-section { overflow:auto; flex:1; min-height:0; }
.scope-panel input,.scope-panel select { width:100%; }
.scope-panel .check-row { background:var(--primary-tint); padding:10px; border-radius:2px; margin:10px 0; }
.tree-search { display:flex; margin-bottom:8px; }
.tree-search .btn { padding:0 10px; }
.tree-search input { min-width:0; }
.tree-node { border:0; background:none; width:100%; text-align:left; padding:8px; min-height:38px; display:flex; gap:6px; align-items:center; color:var(--text); }
.tree-node.child { padding-left:25px; }
.tree-node:hover,.tree-node.selected { background:var(--surface-muted); }
.tree-node.selected { color:var(--primary); font-weight:500; }
.tree-node small { color:#9499a7; margin-left:auto; }
.people-result { display:flex; flex-direction:column; min-height:0; }
.toolbar { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; margin-bottom:10px; align-items:center; }
.toolbar-left,.toolbar-right { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.toolbar input[type=search] { width:240px; }
.btn { min-height:40px; border:1px solid var(--primary); color:var(--primary); background:#fff; border-radius:2px; padding:0 15px; display:inline-flex; align-items:center; justify-content:center; gap:5px; white-space:nowrap; }
.btn:hover { background:#f4f7ff; }
.btn.primary { background:var(--primary); color:white; }
.btn.primary:hover { background:var(--primary-hover); }
.btn.danger { border-color:var(--danger); background:var(--danger); color:white; }
.btn.neutral { color:var(--muted); border-color:var(--border); }
.btn.small { min-height:32px; padding:0 10px; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { border:1px solid var(--border); border-radius:2px; color:var(--text); background:#fff; min-height:40px; padding:8px 11px; }
input::placeholder,textarea::placeholder { color:#9e9e9e; }
input:hover,select:hover,textarea:hover { border-color:#b9c1d4; }
input:focus,select:focus,textarea:focus { border-color:var(--primary); }
input[readonly], input:disabled,select:disabled { background:#f5f6fa; color:#8c8d9f; }
input[type=checkbox],input[type=radio] { accent-color:var(--primary); width:15px; height:15px; margin:0; vertical-align:middle; }
.check-row { display:flex; align-items:center; gap:7px; }
.filter-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px 24px; }
.field-inline { display:flex; align-items:center; gap:12px; min-width:0; }
.field-inline>label { white-space:nowrap; width:60px; flex:none; }
.field-inline input,.field-inline select { min-width:0; width:100%; }
.filter-bottom { display:flex; justify-content:flex-end; gap:10px; margin-top:12px; }
.filter-simple { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.filter-simple input { width:240px; }
.list-panel { display:flex; flex-direction:column; flex:1; min-height:0; }
.list-header { display:flex; justify-content:space-between; gap:10px; align-items:center; min-height:40px; margin-bottom:10px; }
.list-title { display:flex; align-items:baseline; gap:12px; }
.list-title strong { font-size:16px; }
.list-title span { color:#9499a7; }
.table-scroll { min-height:0; overflow:auto; flex:1; border-bottom:1px solid var(--border); }
table { border-collapse:separate; border-spacing:0; width:100%; font-size:14px; }
th,td { padding:12px 10px; border-bottom:1px solid var(--border); text-align:left; background:white; line-height:22px; }
th { background:var(--surface-muted); height:46px; color:var(--text); font-weight:700; position:sticky; top:0; z-index:2; white-space:nowrap; }
tbody tr:hover td { background:#f7f9fd; }
td.wrap { max-width:250px; }
.people-table { min-width:1550px; }
.people-table th:first-child { width:60px; }
.menu-table { min-width:1320px; table-layout:fixed; }
.menu-table td { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cell-ellipsis { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.actions-column { position:sticky; right:0; box-shadow:-2px 0 6px #0000000f; min-width:210px; }
th.actions-column { z-index:3; }
.actions { display:flex; gap:14px; align-items:center; white-space:nowrap; }
.link { padding:0; border:0; color:var(--primary); background:none; cursor:pointer; line-height:24px; }
.link:hover { color:var(--primary-hover); text-decoration:underline; }
.link.danger { color:var(--danger); }
.tag { display:inline-flex; align-items:center; min-height:22px; padding:0 8px; line-height:20px; border-radius:2px; border:1px solid var(--border); background:var(--surface-muted); color:var(--muted); font-size:13px; white-space:nowrap; }
.tag.success { color:var(--success); background:var(--success-bg); border-color:#389e0d26; }
.tag.warning { color:var(--warning); background:#fffbe6; border-color:#d4880626; }
.tag.blue { background:#edf2ff; color:var(--primary); border-color:#dce5ff; }
.secondary { color:#8c8d9f; font-size:12px; }
.cell-name { display:block; font-weight:500; }
.cell-stack { display:flex; flex-wrap:wrap; gap:4px; }
.empty { display:flex; align-items:center; flex-direction:column; gap:12px; padding:60px 15px; color:#8c8d9f; }
.empty img { width:80px; height:80px; object-fit:contain; }
.pagination { min-height:50px; display:flex; justify-content:center; align-items:center; gap:7px; flex-wrap:wrap; padding-top:10px; flex:none; }
.pagination button { width:30px; height:30px; border:0; background:white; color:var(--muted); }
.pagination button.active { background:var(--primary); color:white; }
.pagination select { min-height:30px; height:30px; padding:0 7px; }
.pagination input { width:48px; min-height:30px !important; height:30px; padding:0 5px !important; }
.modal { width:min(800px,calc(100vw - 40px)); max-height:calc(100vh - 60px); border:0; border-radius:12px; padding:0; color:var(--text); box-shadow:0 20px 70px #12183035; }
.modal.narrow { width:min(600px,calc(100vw - 40px)); }
.modal.wide { width:min(1020px,calc(100vw - 40px)); }
.modal::backdrop { background:#00000066; }
.modal[open] { animation:modal-in var(--motion-dialog) ease-out; }
.modal-frame { display:flex; flex-direction:column; max-height:calc(100vh - 60px); padding:24px; }
.modal-head { display:flex; justify-content:space-between; align-items:center; flex:none; margin-bottom:20px; gap:10px; }
.modal-head h2 { font-size:20px; margin:0; line-height:28px; display:flex; gap:10px; align-items:center; }
.modal-head h2:before { content:""; width:6px; height:6px; background:var(--primary); border-radius:50%; }
.modal-body { overflow:auto; min-height:0; }
.modal-foot { display:flex; justify-content:flex-end; align-items:center; gap:10px; padding-top:20px; flex:none; }
.modal-foot .btn { min-height:36px; min-width:100px; }
.modal form { display:contents; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px 20px; }
.field { display:flex; flex-direction:column; gap:5px; min-width:0; }
.field.full { grid-column:1/-1; }
.required { color:var(--danger); margin-right:4px; }
.field input,.field select,.field textarea { width:100%; }
textarea { min-height:80px; resize:vertical; }
.form-error { color:var(--danger); background:#fff2f2; padding:8px 10px; margin:0 0 14px; border-radius:3px; }
.info-grid { display:grid; grid-template-columns:120px minmax(0,1fr) 120px minmax(0,1fr); margin-bottom:20px; }
.info-label,.info-value { min-height:40px; padding:9px 10px; border-bottom:1px solid var(--border); border-right:1px solid var(--border); overflow-wrap:anywhere; }
.info-label { background:var(--surface-muted); }
.info-grid>*:nth-child(4n+1) { border-left:1px solid var(--border); }
.info-grid>*:nth-child(-n+4) { border-top:1px solid var(--border); }
.info-value.full { grid-column:span 3; }
.audit { margin-top:14px; color:#8c8d9f; font-size:12px; }
.alert { padding:10px 12px; border-radius:4px; color:#ad6800; background:#fffbe6; border:1px solid #ffe8a6; margin-bottom:15px; }
.alert.danger { color:#d83c35; background:#fff2f2; border-color:#ffc8c8; }
.dialog-tabs { display:flex; gap:20px; border-bottom:1px solid var(--border); margin-bottom:18px; }
.dialog-tabs button { border:0; border-bottom:2px solid transparent; background:none; padding:8px 2px; color:var(--muted); }
.dialog-tabs button.active { color:var(--primary); border-color:var(--primary); }
.permission-system { margin-top:16px; }
.permission-tree { border:1px solid var(--border); border-radius:4px; padding:12px; max-height:300px; overflow:auto; }
.permission-row { display:flex; gap:8px; align-items:center; min-height:34px; }
.permission-row.child { padding-left:25px; }
.role-block { border:1px solid var(--border); padding:10px 12px; border-radius:4px; margin-bottom:8px; }
.role-assignment-grid { display:block; }
.role-assignment-grid .role-block { margin-bottom:0; }
.role-assignment-table { border:1px solid var(--border); border-radius:6px; overflow:hidden; }
.role-assignment-head, .role-assignment-row { display:grid; grid-template-columns:190px 170px minmax(0,1fr); align-items:stretch; }
.role-assignment-head { background:var(--surface-muted); color:var(--muted); font-weight:600; border-bottom:1px solid var(--border); }
.role-assignment-head span, .role-assignment-row > div { padding:8px 10px; }
.role-assignment-row { border-bottom:1px solid var(--border); min-height:68px; }
.role-assignment-row:last-child { border-bottom:0; }
.role-system-name { display:flex; align-items:center; }
.role-admin-toggle { display:flex; align-items:center; border-left:1px solid var(--border); border-right:1px solid var(--border); }
.permission-switch { display:inline-flex; align-items:center; gap:8px; cursor:pointer; color:var(--muted); }
.permission-switch input { position:absolute; opacity:0; pointer-events:none; }
.permission-switch span { width:42px; height:22px; border-radius:12px; background:#c9cfd9; position:relative; transition:background .2s ease; display:block; }
.permission-switch span::after { content:""; width:18px; height:18px; border-radius:50%; background:#fff; position:absolute; top:2px; left:2px; box-shadow:0 1px 3px #0002; transition:transform .2s ease; }
.permission-switch span i { position:absolute; right:5px; top:1px; color:#fff; font-size:11px; line-height:20px; font-style:normal; }
.permission-switch input:checked + span { background:var(--success); }
.permission-switch input:checked + span::after { transform:translateX(20px); }
.permission-switch input:checked + span i { left:5px; right:auto; }
.role-assignment-roles { min-width:0; }
.role-assignment-summary { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.role-block h3 { margin:0 0 12px; font-size:15px; display:flex; justify-content:space-between; }
.role-options { display:flex; flex-wrap:wrap; gap:5px 7px; }
.role-option { display:flex; align-items:center; gap:5px; padding:4px 7px; border:1px solid var(--border); border-radius:4px; cursor:pointer; font-size:13px; line-height:20px; }
.role-option:has(input:checked) { border-color:var(--primary); background:#f4f7ff; color:var(--primary); }
.upload-zone { border:1px dashed #bac6e4; padding:24px; text-align:center; border-radius:4px; background:#fafcff; margin:15px 0; }
.upload-zone input { max-width:100%; }
.import-errors { max-height:170px; overflow:auto; color:var(--danger); margin-top:12px; }
.password { font-family:monospace; font-size:24px; letter-spacing:2px; padding:14px; background:var(--surface-muted); margin:15px 0; word-break:break-all; }
.toast { position:fixed; z-index:1000; top:20px; left:50%; transform:translateX(-50%); background:#eff9e9; border:1px solid #cdeac0; color:#2f8510; padding:10px 20px; border-radius:5px; box-shadow:0 4px 18px #0000000a; animation:toast-in var(--motion-toast); max-width:90vw; }
.toast.error { background:#fff2f2; border-color:#ffc9c9; color:var(--danger); }
.row-menu { position:fixed; z-index:50; background:white; border:1px solid var(--border); padding:5px; border-radius:4px; box-shadow:0 3px 18px #0000001a; min-width:100px; }
.row-menu button { display:block; border:0; background:none; text-align:left; width:100%; padding:7px 12px; color:var(--text); }
.row-menu button:hover { background:var(--surface-muted); }
.row-menu button.danger { color:var(--danger); }
.portal { width:min(1000px,calc(100% - 40px)); margin:60px auto; }
.portal h1 { font-size:28px; }
.portal-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.portal-card { padding:24px; background:white; border:1px solid var(--border); border-radius:8px; }
.portal-card h2 { font-size:18px; }
.portal-card p { color:var(--muted); min-height:44px; }
.portal-meta { color:#8c8d9f; margin-bottom:25px; }
.portal-footer { display:flex; gap:16px; margin-top:28px; align-items:center; }
@keyframes modal-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes toast-in { from { opacity:0; top:10px; } to { opacity:1; top:20px; } }
@media(max-width:1199px) { .filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:991px) { .shell { grid-template-columns:64px minmax(0,1fr); } .brand-name,.nav-text,.side-foot,.chevron { display:none; } .nav-link.sub { padding-left:23px; } .people-layout { grid-template-columns:200px minmax(0,1fr); } }
@media(max-width:700px) { .shell { grid-template-columns:minmax(0,1fr); } .sidebar { display:none; } .people-layout { grid-template-columns:minmax(0,1fr); height:auto; } .scope-panel { max-height:280px; } main { overflow:auto; } .people-result { min-height:480px; } .filter-grid { grid-template-columns:minmax(0,1fr); } .form-grid { grid-template-columns:minmax(0,1fr); } .info-grid { grid-template-columns:90px minmax(0,1fr); } .info-value.full { grid-column:auto; } .portal-grid { grid-template-columns:1fr; } .breadcrumb .muted { display:none; } }
@media(prefers-reduced-motion:reduce) { * { animation-duration:1ms!important; transition-duration:1ms!important; } }


.date-range { grid-column:span 2; }
@media(max-width:700px) { .date-range { grid-column:1 / -1; } }

.nav-icon { width:16px; height:16px; object-fit:contain; flex:none; }
.nav-link.active .nav-icon { filter:brightness(0) invert(1); }

.app-version { font-size:12px; color:#8c8d9f; white-space:nowrap; }
.top-link { white-space:nowrap; }
body[data-page="home"] #main { position:relative; padding:0; background:#f9fafc; }
.home-page { position:absolute; inset:0; z-index:0; overflow:hidden; }
.home-welcome { position:absolute; inset:12px; display:flex; align-items:center; justify-content:center; background:var(--surface); border-radius:4px; overflow:hidden; }
.home-welcome__group { position:relative; flex-shrink:0; width:680px; height:272px; }
.home-welcome__title { position:absolute; left:0; margin:0; font-size:32px; font-weight:700; line-height:42px; color:var(--primary); white-space:nowrap; }
.home-welcome__title--welcome { top:46px; }
.home-welcome__title--main { top:89px; }
.home-welcome__bar { position:absolute; left:0; top:150px; width:44px; height:4px; background:var(--primary); }
.home-welcome__desc { position:absolute; left:0; top:188px; margin:0; font-size:14px; font-weight:400; line-height:21.58px; color:var(--primary); white-space:nowrap; }
.home-welcome__image { position:absolute; left:226px; top:0; width:454px; height:272px; display:block; user-select:none; }
@media(max-width:760px) { .home-welcome__group { transform:scale(.85); } }
@media(max-width:560px) { .home-welcome__group { transform:scale(.6); } }
@media(max-width:430px) { .home-welcome__group { transform:scale(.45); } }
.institution-title { margin-top:20px; }
.institution-context { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:18px; }
.institution-context output { min-height:40px; padding:8px 10px; background:var(--surface-muted); border:1px solid var(--border); border-radius:4px; overflow-wrap:anywhere; }
.person-form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.gender-field { border:0; padding:0; margin:0; min-width:0; }
.gender-field legend { padding:0; margin-bottom:8px; }
.gender-options { display:flex; align-items:center; gap:16px; min-height:40px; }
.gender-options label { display:flex; gap:6px; align-items:center; }
.gender-options input,.phone-mode input { width:16px; min-height:0; height:16px; margin:0; accent-color:var(--primary); }
.phone-control { display:flex; align-items:center; gap:8px; }
.phone-control > input { width:100%; min-width:0; }
.phone-mode { display:flex; align-items:center; gap:4px; white-space:nowrap; }
.business-note { color:var(--muted); padding:12px 0 0; border-top:1px solid var(--border); margin-bottom:0; }
.choice-control { display:flex; border:1px solid var(--border); border-radius:4px; min-height:40px; background:white; }
.choice-trigger { display:flex; align-items:center; justify-content:space-between; gap:8px; background:none; border:0; padding:8px 10px; color:var(--text); min-width:0; width:100%; text-align:left; }
.choice-trigger > span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.choice-clear { background:none; border:0; padding:0 10px; color:var(--muted); }
.choice-panel { position:fixed; inset:auto; margin:0; padding:0; max-height:260px; border:1px solid var(--border); border-radius:4px; background:white; color:var(--text); box-shadow:0 4px 18px #0002; }
.choice-columns { display:flex; }
.choice-column { flex:1; min-width:0; max-height:240px; overflow:auto; border-right:1px solid var(--border); }
.choice-column:last-child { border-right:0; }
.choice-option { display:flex; justify-content:space-between; width:100%; text-align:left; padding:9px 12px; border:0; background:white; color:var(--text); }
.choice-option:hover,.choice-option.selected { color:var(--primary); background:var(--surface-muted); }
.tree-options { max-height:250px; overflow:auto; }
.tree-toggle { background:none; color:var(--text); border:0; padding:0 6px 0 0; }
@media(max-width:700px) { .person-form-grid,.institution-context { grid-template-columns:minmax(0,1fr); } }
@media(max-width:1100px) { .breadcrumb .muted { display:none; } .top-actions { gap:8px; } }
@media(max-width:700px) { .app-version { display:none; } .top-actions #switch-system { display:none; } .top-actions { gap:6px; } .top-actions .btn,.top-link { font-size:12px; } }

.tree-page { min-height: 100%; }
.tree-cell { display: flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 26px; }
.tree-leaf { width: 17px; flex: none; }
.tree-cell .icon-button { width: 20px; }
.sort-controls { display: inline-flex; align-items: center; float: left; margin-right: 5px; }
.drag-handle { cursor: grab; font-size: 20px; color: var(--muted); }
.sort-banner { padding: 10px 14px; background: #fffbe6; color: #8a6400; margin-bottom: 10px; border: 1px solid #ffe6a1; }
.detail-actions { margin-top: 16px; }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 8px 0; }
.checkbox-grid label { display: inline-flex; align-items: center; gap: 6px; }
.checkbox-grid input { width: auto; }
.dataset-scope { border: 1px solid var(--border); border-radius: 4px; padding: 14px 16px; margin: 12px 0; }
.dataset-scope h4 { margin: 0 0 10px; font-size: 14px; }
.scope-mode-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.scope-mode-row select { min-width: 150px; }
.scope-transfer { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.scope-transfer > section { border: 1px solid var(--border); padding: 12px; max-height: 350px; overflow: auto; border-radius: 4px; }
.scope-transfer h4 { margin: 0 0 12px; }
.scope-transfer input[type=search] { width: 100%; }
.scope-transfer small { color: var(--muted); margin-left: auto; }
.selected-scope { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface-muted); padding: 6px 10px; margin: 6px 0; }
.inner-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.inner-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 8px 4px; background: none; color: var(--muted); }
.inner-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.attachment-list { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 16px 0; }
.credential-field { padding: 14px 0; border-bottom: 1px solid var(--border); }
.credential-field > label { display: block; color: var(--muted); margin-bottom: 8px; }
.credential-field > div { display: flex; align-items: center; gap: 16px; }
.credential-field code { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.log-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
.log-extra-filters { display: contents; }
.log-json { background: var(--surface-muted); padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.original-placeholder { min-height: 100%; background: white; padding: 20px; }
.tag.danger { color: var(--danger); background: #fff2f2; }
.access-filters { flex: 1; min-width: 500px; }
.modal.role-assignment-wide { width:min(1080px,calc(100vw - 40px)); height:min(760px,calc(100vh - 40px)); }
.modal.role-assignment-wide .modal-frame { height:100%; max-height:none; }
.modal.role-assignment-wide .modal-body { flex:1; overflow:auto; }
@media (max-width: 1000px) { .scope-transfer { grid-template-columns: 1fr; } .access-filters { min-width: 0; } .log-filters { grid-template-columns: 1fr; } }

.field .checkbox-grid input[type=checkbox] { width:16px; min-width:16px; height:16px; flex:none; }
.checkbox-grid label { white-space:nowrap; }
label.upload-zone { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; width:100%; min-height:150px; position:relative; cursor:pointer; }
label.upload-zone input[type=file] { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
label.upload-zone small { color:var(--muted); }
label.upload-zone:focus-within { outline:2px solid var(--primary); outline-offset:2px; }
.access-apps-table { min-width:1100px; }
.access-manage-table { min-width:960px; }
.access-applications-table { min-width:1190px; }
.access-review-table { min-width:1180px; }
.institution-table { min-width:1100px; }
.tree-page table { min-width:1000px; }
@media(max-width:1000px) { .toolbar:has(.access-filters) { display:block; } .access-filters { width:100%; } .access-filters + .toolbar-right { margin-top:12px; } }
@media(max-width:700px) { .top-actions .top-link { display:none; } #current-page-label { max-width:100px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .access-filters { grid-template-columns:1fr; } .role-assignment-head, .role-assignment-row { grid-template-columns:1fr; } .role-assignment-head { display:none; } .role-admin-toggle { border-left:0; border-right:0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); } }
