    /* Local Tailwind fallback. The admin shell must work on intranet servers
       where CDN scripts/styles are blocked. Keep this to the utilities the
       dashboard actually uses. */
    * { box-sizing: border-box; }
    body { margin:0; font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
    table { border-collapse: collapse; }
    button, input, select, textarea { font: inherit; }
    button { cursor:pointer; }
    a { color: inherit; text-decoration: none; }

    .hidden { display:none !important; }
    .block { display:block; }
    .flex { display:flex; }
    .grid { display:grid; }
    .flex-1 { flex:1 1 0%; }
    .flex-col { flex-direction:column; }
    .flex-wrap { flex-wrap:wrap; }
    .shrink-0 { flex-shrink:0; }
    .items-start { align-items:flex-start; }
    .items-center { align-items:center; }
    .items-end { align-items:flex-end; }
    .justify-center { justify-content:center; }
    .justify-between { justify-content:space-between; }
    .justify-end { justify-content:flex-end; }
    .cursor-pointer { cursor:pointer; }
    .min-h-screen { min-height:100vh; }
    .min-w-0 { min-width:0; }
    .min-w-\[272px\] { min-width:272px; }
    .w-3 { width:12px; }
    .w-7 { width:28px; }
    .w-8 { width:32px; }
    .w-16 { width:64px; }
    .w-20 { width:80px; }
    .w-24 { width:96px; }
    .w-32 { width:128px; }
    .w-48 { width:192px; }
    .w-64 { width:256px; }
    .w-72 { width:288px; }
    .w-80 { width:320px; }
    .w-full { width:100%; }
    .w-\[34px\] { width:34px; }
    .w-\[272px\] { width:272px; }
    .h-7 { height:28px; }
    .h-8 { height:32px; }
    .h-10 { height:40px; }
    .h-\[34px\] { height:34px; }
    .h-\[44px\] { height:44px; }
    .h-\[72px\] { height:72px; }
    .h-\[360px\] { height:360px; }
    .max-h-\[360px\] { max-height:360px; }
    .max-w-\[220px\] { max-width:220px; }
    .max-w-\[260px\] { max-width:260px; }
    .max-w-\[280px\] { max-width:280px; }
    .max-w-\[300px\] { max-width:300px; }
    .max-w-\[320px\] { max-width:320px; }
    .max-w-\[340px\] { max-width:340px; }
    .max-w-\[380px\] { max-width:380px; }
    .max-w-\[420px\] { max-width:420px; }
    .max-w-\[60\%\] { max-width:60%; }
    .overflow-hidden { overflow:hidden; }
    .overflow-auto { overflow:auto; }
    .overflow-x-auto { overflow-x:auto; }
    .overflow-y-auto { overflow-y:auto; }

    .grid-cols-2 { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .grid-cols-3 { grid-template-columns:repeat(3, minmax(0, 1fr)); }
    .col-span-2 { grid-column:span 2 / span 2; }

    .gap-1 { gap:4px; }
    .gap-1\.5 { gap:6px; }
    .gap-2 { gap:8px; }
    .gap-2\.5 { gap:10px; }
    .gap-3 { gap:12px; }
    .gap-4 { gap:16px; }
    .gap-5 { gap:20px; }
    .gap-6 { gap:24px; }
    .gap-x-6 { column-gap:24px; }
    .gap-y-2 { row-gap:8px; }
    .space-y-1 > * + * { margin-top:4px; }
    .space-y-2 > * + * { margin-top:8px; }
    .space-y-2\.5 > * + * { margin-top:10px; }
    .space-y-3 > * + * { margin-top:12px; }
    .space-y-4 > * + * { margin-top:16px; }
    .space-y-5 > * + * { margin-top:20px; }

    .m-0 { margin:0; }
    .mt-0\.5 { margin-top:2px; }
    .mt-1 { margin-top:4px; }
    .mt-2 { margin-top:8px; }
    .mt-3 { margin-top:12px; }
    .mt-4 { margin-top:16px; }
    .mt-5 { margin-top:20px; }
    .mt-6 { margin-top:24px; }
    .mb-2 { margin-bottom:8px; }
    .mb-3 { margin-bottom:12px; }
    .mb-4 { margin-bottom:16px; }
    .mb-5 { margin-bottom:20px; }
    .ml-1 { margin-left:4px; }
    .ml-2 { margin-left:8px; }
    .ml-auto { margin-left:auto; }
    .mr-2 { margin-right:8px; }
    .p-0 { padding:0; }
    .p-3 { padding:12px; }
    .p-4 { padding:16px; }
    .p-5 { padding:20px; }
    .p-6 { padding:24px; }
    .p-8 { padding:32px; }
    .p-10 { padding:40px; }
    .p-\[18px\] { padding:18px; }
    .px-1 { padding-left:4px; padding-right:4px; }
    .px-2 { padding-left:8px; padding-right:8px; }
    .px-3 { padding-left:12px; padding-right:12px; }
    .px-4 { padding-left:16px; padding-right:16px; }
    .px-5 { padding-left:20px; padding-right:20px; }
    .py-0\.5 { padding-top:2px; padding-bottom:2px; }
    .py-1 { padding-top:4px; padding-bottom:4px; }
    .py-1\.5 { padding-top:6px; padding-bottom:6px; }
    .py-2 { padding-top:8px; padding-bottom:8px; }
    .py-2\.5 { padding-top:10px; padding-bottom:10px; }
    .py-3 { padding-top:12px; padding-bottom:12px; }
    .py-4 { padding-top:16px; padding-bottom:16px; }
    .pt-1 { padding-top:4px; }
    .pb-1 { padding-bottom:4px; }
    .pl-10 { padding-left:40px; }
    .pl-12 { padding-left:48px; }
    .pr-4 { padding-right:16px; }
    .pr-10 { padding-right:40px; }

    .rounded { border-radius:4px; }
    .rounded-md { border-radius:6px; }
    .rounded-lg { border-radius:8px; }
    .rounded-full { border-radius:999px; }
    .border { border:1px solid #CBD5E1; }
    .border-b { border-bottom:1px solid #D9E1EA; }
    .border-t { border-top:1px solid #E5EBF1; }
    .border-\[\#D9E1EA\] { border-color:#D9E1EA; }
    .border-\[\#E5EBF1\] { border-color:#E5EBF1; }
    .border-\[\#EEF2F7\] { border-color:#EEF2F7; }
    .border-blue-100 { border-color:#DBEAFE; }
    .border-red-200 { border-color:#FECACA; }
    .border-slate-100 { border-color:#F1F5F9; }
    .border-slate-200 { border-color:#E2E8F0; }
    .border-slate-300 { border-color:#CBD5E1; }
    .last\:border-b-0:last-child { border-bottom-width:0; }

    .bg-\[\#0F172A\] { background:#0F172A; }
    .bg-\[\#111827\] { background:#111827; }
    .bg-\[\#1D4ED8\] { background:#1D4ED8; }
    .bg-\[\#EEF2F7\] { background:#EEF2F7; }
    .bg-\[\#F3F5F8\] { background:#F3F5F8; }
    .bg-\[\#F8FAFC\] { background:#F8FAFC; }
    .bg-white { background:#FFFFFF; }
    .bg-transparent { background:transparent; }
    .bg-slate-50 { background:#F8FAFC; }
    .bg-slate-700 { background:#334155; }
    .bg-blue-50 { background:#EFF6FF; }
    .bg-emerald-600 { background:#059669; }
    .bg-red-50 { background:#FEF2F2; }
    .bg-red-50\/40 { background:rgba(254,242,242,.4); }
    .bg-amber-50\/40 { background:rgba(255,251,235,.4); }
    .hover\:bg-blue-700:hover { background:#1D4ED8; }
    .hover\:bg-emerald-700:hover { background:#047857; }
    .hover\:bg-red-50:hover { background:#FEF2F2; }
    .hover\:bg-slate-50:hover,
    .hover\:bg-slate-50\/50:hover,
    .hover\:bg-slate-50\/60:hover { background:#F8FAFC; }

    .text-left { text-align:left; }
    .text-center { text-align:center; }
    .text-right { text-align:right; }
    .text-xs { font-size:12px; line-height:16px; }
    .text-sm { font-size:14px; line-height:20px; }
    .text-2xl { font-size:24px; line-height:32px; }
    .text-4xl { font-size:36px; line-height:40px; }
    .text-\[10px\] { font-size:10px; }
    .text-\[11px\] { font-size:11px; }
    .text-\[12px\] { font-size:12px; }
    .text-\[13px\] { font-size:13px; }
    .text-\[15px\] { font-size:15px; }
    .text-\[16px\] { font-size:16px; }
    .text-\[32px\] { font-size:32px; line-height:1.1; }
    .font-medium { font-weight:500; }
    .font-semibold { font-weight:600; }
    .uppercase { text-transform:uppercase; }
    .tracking-tight { letter-spacing:0; }
    .tracking-wider { letter-spacing:.05em; }
    .leading-none { line-height:1; }
    .leading-tight { line-height:1.25; }
    .leading-snug { line-height:1.375; }
    .leading-relaxed { line-height:1.625; }
    .text-white { color:#FFFFFF; }
    .text-\[\#1D4ED8\] { color:#1D4ED8; }
    .text-slate-100 { color:#F1F5F9; }
    .text-slate-200 { color:#E2E8F0; }
    .text-slate-400 { color:#94A3B8; }
    .text-slate-500 { color:#64748B; }
    .text-slate-600 { color:#475569; }
    .text-slate-700 { color:#334155; }
    .text-slate-800 { color:#1E293B; }
    .text-slate-900 { color:#0F172A; }
    .text-amber-600 { color:#D97706; }
    .text-amber-800 { color:#92400E; }
    .text-amber-900 { color:#78350F; }
    .text-blue-900 { color:#1E3A8A; }
    .text-emerald-700 { color:#047857; }
    .text-red-500 { color:#EF4444; }
    .text-red-600 { color:#DC2626; }
    .text-red-700 { color:#B91C1C; }
    .text-red-800 { color:#991B1B; }
    .hover\:text-slate-900:hover { color:#0F172A; }
    .placeholder-slate-400::placeholder { color:#94A3B8; }

    .outline-none { outline:none; }
    .whitespace-nowrap { white-space:nowrap; }
    .truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
    /* Sidebar item states from Pencil design */
    .nav-sec { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #94A3B8; padding: 12px 10px 6px; }
    .nav-item { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:6px; color:#CBD5E1; cursor:pointer; font-size:13px; }
    .nav-item:hover { background:#1E293B; color:#F1F5F9; }
    .nav-item.active { background:#1D4ED8; color:#FFFFFF; }
    .nav-item.disabled { opacity:.45; cursor:not-allowed; }
    .nav-item.disabled:hover { background:transparent; color:#CBD5E1; }
    .lu { font-family: 'lucide' !important; font-style: normal; -webkit-font-smoothing: antialiased; }
    .nav-item .lu { width:16px; height:16px; font-size:16px; line-height:1; }
    /* Card */
    .card { background:#fff; border:1px solid #D9E1EA; border-radius:8px; }
    /* Workspace tabs */
    .worktab { display:flex; align-items:center; gap:8px; padding:8px 12px; border:1px solid #D9E1EA; border-bottom:none; border-radius:8px 8px 0 0; background:#EEF2F7; color:#475569; cursor:pointer; font-size:13px; }
    .worktab.active { background:#FFFFFF; color:#0F172A; }
    .worktab-close { color:#94A3B8; font-size:12px; cursor:pointer; }
    .worktab-close:hover { color:#0F172A; }
    /* Pill badge */
    .pill { display:inline-block; font-size:11px; padding:2px 8px; border-radius:999px; }
    .pill-green { background:#DCFCE7; color:#166534; }
    .pill-slate { background:#E2E8F0; color:#475569; }
    .pill-red { background:#FEE2E2; color:#991B1B; }
    .pill-amber { background:#FEF3C7; color:#92400E; }
    .pill-blue { background:#DBEAFE; color:#1E40AF; }
    /* Scrollbars */
    ::-webkit-scrollbar { width:8px; height:8px; }
    ::-webkit-scrollbar-thumb { background:#CBD5E1; border-radius:4px; }
    /* Toast */
    .toast { position:fixed; bottom:24px; right:24px; padding:10px 16px; border-radius:6px; color:#fff; font-size:13px; z-index:50; box-shadow:0 10px 25px rgba(15,23,42,.18); }
    .toast.ok { background:#16A34A; }
    .toast.err { background:#DC2626; }
    /* Modal (pencil bQg74 / isCUn) */
    .modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:40; display:flex; align-items:flex-start; justify-content:center; padding:48px 16px; overflow-y:auto; }
    .modal-dialog { background:#fff; border-radius:10px; box-shadow:0 25px 50px rgba(15,23,42,.25); width:100%; max-width:720px; display:flex; flex-direction:column; max-height:calc(100vh - 96px); }
    .modal-dialog.wide { max-width:960px; }
    .modal-header { display:flex; align-items:center; justify-content:space-between; padding:18px 24px; border-bottom:1px solid #E5EBF1; }
    .modal-title { font-size:15px; font-weight:600; color:#0F172A; }
    .modal-subtitle { font-size:12px; color:#64748B; margin-top:2px; }
    .modal-close { width:28px; height:28px; display:flex; align-items:center; justify-content:center; border-radius:6px; color:#64748B; cursor:pointer; font-size:16px; }
    .modal-close:hover { background:#F1F5F9; color:#0F172A; }
    .modal-body { padding:20px 24px; overflow-y:auto; flex:1; }
    .modal-footer { display:flex; justify-content:flex-end; gap:8px; padding:14px 24px; border-top:1px solid #E5EBF1; background:#F8FAFC; border-radius:0 0 10px 10px; }
    .btn-primary { background:#1D4ED8; color:#fff; font-size:13px; padding:8px 18px; border-radius:6px; }
    .btn-primary:hover { background:#1E40AF; }
    .btn-success { background:#059669; color:#fff; font-size:13px; padding:8px 18px; border-radius:6px; }
    .btn-success:hover { background:#047857; }
    .btn-ghost { background:#fff; color:#475569; font-size:13px; padding:8px 18px; border-radius:6px; border:1px solid #CBD5E1; }
    .btn-ghost:hover { background:#F1F5F9; }
    .field-label { font-size:12px; color:#475569; margin-bottom:4px; font-weight:500; }
    .field-hint { font-size:11px; color:#94A3B8; margin-top:4px; }
    .field-input { width:100%; border:1px solid #CBD5E1; border-radius:6px; padding:8px 10px; font-size:13px; background:#fff; }
    .field-input:focus { outline:none; border-color:#1D4ED8; box-shadow:0 0 0 2px rgba(29,78,216,.15); }
    /* Page banner (pencil pageHead 4w0MJ) — compact variant */
    .page-banner { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; padding:2px 0; }
    .page-banner-title { font-size:16px; font-weight:600; color:#0F172A; line-height:1.3; }
    .page-banner-sub   { font-size:12px; color:#64748B; margin-top:2px; }
    .page-banner-actions { display:flex; gap:8px; }
    .btn-outline { background:#fff; border:1px solid #CBD5E1; color:#334155; font-size:12px; padding:6px 12px; border-radius:6px; }
    .btn-outline:hover { background:#F8FAFC; }
    .page-banner .btn-primary { font-size:12px; padding:6px 14px; }
    /* Filter bar (pencil mriPh) */
    .filter-bar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:14px 20px; border-bottom:1px solid #E5EBF1; background:#FFFFFF; }
    .filter-bar input, .filter-bar select { height:34px; border:1px solid #CBD5E1; border-radius:6px; padding:0 10px; font-size:13px; background:#fff; }
    .filter-bar input:focus, .filter-bar select:focus { outline:none; border-color:#1D4ED8; box-shadow:0 0 0 2px rgba(29,78,216,.12); }
    .filter-grow { flex:1; min-width:220px; }
    /* Table footer pager (pencil iBzqw) */
    .tfoot { display:flex; align-items:center; justify-content:space-between; padding:12px 20px; border-top:1px solid #E5EBF1; background:#fff; }
    .pager { display:flex; gap:6px; align-items:center; }
    .pager button { min-width:32px; height:32px; padding:0 8px; font-size:12px; border:1px solid #CBD5E1; background:#fff; color:#334155; border-radius:6px; cursor:pointer; }
    .pager button:hover:not(:disabled) { background:#F1F5F9; }
    .pager button.active { background:#1D4ED8; border-color:#1D4ED8; color:#fff; }
    .pager button:disabled { opacity:.4; cursor:not-allowed; }
    /* Collapsible dept picker (hidden <select> backs value; tree is the UI) */
    .dept-hidden { display:none; }
    .dept-tree { position:relative; }
    .dept-tree-current { padding:8px 10px; font-size:13px; border:1px solid #CBD5E1; border-radius:6px; background:#fff; cursor:pointer; display:flex; align-items:center; gap:8px; }
    .dept-tree-current:hover { border-color:#94A3B8; }
    .dept-tree-current .clear { font-size:11px; color:#94A3B8; cursor:pointer; padding:2px 8px; border-radius:4px; }
    .dept-tree-current .clear:hover { background:#F1F5F9; color:#0F172A; }
    /* Popover panel — fixed-positioned so it escapes overflow:hidden parents
       (modal-body has overflow-y:auto). Coords computed in JS on open. */
    .dept-tree-panel { position:fixed; z-index:60;
                       border:1px solid #CBD5E1; border-radius:6px; background:#fff;
                       box-shadow:0 6px 24px rgba(15,23,42,.12); overflow:hidden; }
    .dept-tree-panel[hidden] { display:none; }
    .dept-tree-search { width:100%; border:none; border-bottom:1px solid #E5EBF1; padding:6px 10px; font-size:13px; outline:none; box-sizing:border-box; }
    .dept-tree-groups { max-height:260px; overflow-y:auto; }
    .dept-tree-groups details { border-bottom:1px solid #F1F5F9; }
    .dept-tree-groups summary { padding:6px 10px; font-size:12px; color:#475569; cursor:pointer; list-style:none; user-select:none; background:#F8FAFC; }
    .dept-tree-groups summary::-webkit-details-marker { display:none; }
    .dept-tree-groups summary::before { content:"▸  "; color:#94A3B8; font-size:10px; }
    .dept-tree-groups details[open] summary::before { content:"▾  "; }
    .dept-tree-groups summary:hover { background:#EEF2F7; }
    .dept-tree-item { padding:5px 24px; font-size:13px; cursor:pointer; color:#334155; }
    .dept-tree-item:hover { background:#F1F5F9; }
    .dept-tree-item.selected { background:#EFF6FF; color:#1D4ED8; font-weight:500; }
