*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%;margin:0}
body{font:14px/1.45 "Segoe UI",Inter,system-ui,sans-serif;color:#18181b;background:#f6f6f7;display:flex;flex-direction:column}
a{color:#1d4ed8}a:hover{color:#1e3a8a}
button{font:inherit}
.btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:6px;border:1px solid #d4d4d8;background:#fff;font-size:13px;font-weight:500;color:#18181b;cursor:pointer}
.btn:hover{background:#f4f4f5}
.btn.primary{background:#1d4ed8;border-color:#1d4ed8;color:#fff}.btn.primary:hover{background:#1e40af}
.btn:disabled{opacity:.5;cursor:default}

.top{display:flex;align-items:center;gap:20px;padding:10px 18px;background:#1e293b;color:#fff;flex:0 0 auto}
.brand{font-weight:700;font-size:16px;white-space:nowrap}.brand .sub{font-weight:400;font-size:12px;color:#cbd5e1;margin-left:6px}
.search{flex:1;max-width:720px}
.search input{width:100%;height:36px;border-radius:8px;border:0;padding:0 12px;font-size:14px}
.who{margin-left:auto;font-size:12.5px;color:#e2e8f0;white-space:nowrap}.who a{color:#93c5fd;margin-left:8px}

.layout{flex:1;min-height:0;display:flex}
.nav{flex:0 0 290px;overflow:auto;background:#fff;border-right:1px solid #e4e4e7;padding:10px 0 30px}
.nav .loading,.nav .note{padding:8px 16px;color:#63636b;font-size:12.5px}
.grp{margin-top:6px}
.grp-h{display:flex;align-items:center;justify-content:space-between;width:100%;padding:8px 16px 4px;border:0;background:none;text-align:left;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#52525b;cursor:pointer}
.grp-h .lock{font-weight:500;text-transform:none;letter-spacing:0;color:#9f1239;font-size:11px}
.sec{padding:6px 16px 2px 22px;font-size:11px;color:#71717a}
.arch{display:flex;justify-content:space-between;gap:8px;width:100%;padding:5px 16px 5px 22px;border:0;background:none;text-align:left;font-size:13px;color:#27272a;cursor:pointer}
.arch:hover{background:#f4f4f5}.arch.on{background:#e0e7ff;color:#1e3a8a;font-weight:600}
.arch .n{color:#71717a;font-size:12px;font-variant-numeric:tabular-nums;font-weight:400}
.arch .lvl{color:#a1a1aa}
.allbtn{margin:0 12px 6px;width:calc(100% - 24px)}
.noaccess{padding:2px 16px 6px 22px;font-size:12px;color:#a1a1aa}

.main{flex:1;min-width:0;display:flex;flex-direction:column;padding:14px 18px 0}
.crumb{font-size:18px;font-weight:700;margin-bottom:8px}
.crumb .meta{font-size:12px;font-weight:400;color:#63636b;margin-left:8px}
.filters{display:flex;flex-wrap:wrap;gap:8px 10px;margin-bottom:8px}
.filters label{display:flex;flex-direction:column;font-size:11px;color:#52525b;gap:2px}
.filters input{height:30px;width:170px;border:1px solid #d4d4d8;border-radius:6px;padding:0 8px;font:inherit;font-size:13px}
.filters .clear{align-self:flex-end;height:30px}
.resultbar{display:flex;gap:12px;font-size:12.5px;color:#52525b;margin-bottom:6px}
.busy{color:#1d4ed8}
.tablewrap{flex:1;min-height:0;overflow:auto;background:#fff;border:1px solid #e4e4e7;border-radius:8px 8px 0 0}
table.results{border-collapse:collapse;width:100%;font-size:13px}
.results th{position:sticky;top:0;background:#fafafa;border-bottom:1px solid #e4e4e7;text-align:left;font-weight:600;font-size:12px;color:#3f3f46;padding:8px 10px;white-space:nowrap;cursor:pointer;user-select:none}
.results th .s{color:#1d4ed8}
.results td{border-bottom:1px solid #f4f4f5;padding:7px 10px;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.results tbody tr{cursor:pointer}.results tbody tr:hover{background:#f8fafc}.results tbody tr.on{background:#e0e7ff}
.results td.arc{color:#63636b;font-size:12px}
.chip{display:inline-block;font-size:10.5px;font-weight:600;padding:1px 6px;border-radius:999px;background:#fef3c7;color:#92400e;margin-left:6px}
.more{padding:10px;text-align:center}
.empty{padding:40px;text-align:center;color:#63636b}

.preview{flex:0 0 480px;overflow:auto;background:#fff;border-left:1px solid #e4e4e7;padding:14px 16px 30px}
.pv-head{display:flex;justify-content:space-between;gap:10px}
.pv-arch{font-size:11.5px;color:#63636b}
.preview h2{margin:2px 0 10px;font-size:16px;word-break:break-word}
.x{border:0;background:none;font-size:22px;line-height:1;cursor:pointer;color:#52525b}
.pv-actions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.pv-frame{height:520px;border:1px solid #e4e4e7;border-radius:6px;background:#f4f4f5;overflow:hidden}
.pv-frame iframe{width:100%;height:100%;border:0}
.pv-frame img{max-width:100%}
.pv-msg{padding:20px;color:#63636b;font-size:13px}
.preview h3{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#52525b;margin:16px 0 6px}
.notes,.files{list-style:none;margin:0;padding:0;font-size:13px}
.notes li{padding:6px 8px;border-left:3px solid #f59e0b;background:#fffbeb;margin-bottom:4px;border-radius:0 4px 4px 0}
.notes li.redact{border-color:#18181b;background:#f4f4f5}
.notes .pg{font-size:11px;color:#92400e;font-weight:600;margin-right:6px}
.files li{padding:3px 0}
.fields{display:grid;grid-template-columns:minmax(120px,40%) 1fr;gap:4px 10px;margin:0;font-size:13px}
.fields dt{color:#63636b}.fields dd{margin:0;word-break:break-word}

.fatal{position:fixed;inset:0;background:#f6f6f7;display:flex;align-items:center;justify-content:center;padding:40px;text-align:center;font-size:15px}
.fatal div{max-width:560px;background:#fff;border:1px solid #e4e4e7;border-radius:10px;padding:24px}
.grp-h .tw{display:inline-block;width:12px;margin-right:4px;transition:transform .12s}.grp.open .grp-h .tw{transform:rotate(90deg)}
.grp-h:hover{color:#18181b}.grp-h .n{font-weight:400;letter-spacing:0;color:#a1a1aa}
.pv-frame{display:flex;flex-direction:column}.pv-frame iframe{flex:1}
.pv-text{flex:1;margin:0;padding:10px 12px;overflow:auto;background:#fff;font:12px/1.45 ui-monospace,Consolas,monospace;white-space:pre}
.pv-csv{flex:1;overflow:auto;background:#fff}.pv-csv table{border-collapse:collapse;font-size:12px}.pv-csv th,.pv-csv td{border:1px solid #e4e4e7;padding:3px 7px;white-space:nowrap;text-align:left}.pv-csv th{position:sticky;top:0;background:#f4f4f5;font-weight:600}
.pv-note{padding:6px 10px;font-size:12px;color:#92400e;background:#fef3c7}
.top .brand{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none}.top .brand:hover .brand-t{text-decoration:underline}
.brand .dm-logo{height:26px;width:auto;display:block}.brand-sep{width:1px;height:24px;background:#475569}
#help{width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 48px);border:1px solid #e4e4e7;border-radius:10px;padding:16px 20px 20px;color:#18181b}
#help::backdrop{background:rgba(0,0,0,.35)}
#help .help-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
#help h2{margin:0;font-size:18px}#help .hint{color:#52525b;margin:6px 0 12px}
#help details{border-top:1px solid #e4e4e7}#help details:last-of-type{border-bottom:1px solid #e4e4e7}
#help summary{cursor:pointer;font-weight:600;padding:10px 2px}
#help .help-body{padding:0 4px 12px 18px;line-height:1.5}#help .help-body p{margin:0 0 8px}#help .help-body ul{margin:0 0 8px;padding-left:18px}#help li{margin-bottom:4px}
#help code{background:#f4f4f5;padding:1px 5px;border-radius:4px;font-size:12.5px}
