/* Reference layout, scoped to authenticated screens. */
body:has(.reference-shell){background:#fff;color:#37434b}
.reference-shell{grid-template-columns:240px minmax(0,1fr);padding-top:50px;min-height:100vh}
.reference-shell .topbar{height:50px;min-height:50px;background:#0078ce;padding:0 12px;box-shadow:none;gap:10px}
.reference-shell .sidebar-toggle{border:0;border-radius:2px;background:#0066ad;font-size:22px!important;padding:3px 8px!important;min-width:36px;min-height:36px}
.reference-shell .topbar-brand{gap:14px}.reference-shell .topbar-brand>b{font-size:17px;color:#fff;white-space:nowrap}.reference-shell .topbar-brand .brand-logo{width:27px;height:27px;border:0;background:transparent}.reference-shell .topbar-company{font-size:12px;display:flex;align-items:center;gap:7px;opacity:.95}
.reference-shell .topbar-user{font-size:12px;gap:7px;flex-wrap:nowrap}.reference-shell .topbar-user button{font-size:11px;padding:6px 8px}.reference-shell .sync-indicator{font-size:10px}
.reference-shell .sidebar{top:50px;height:calc(100dvh - 50px);background:#303c45;padding:0;gap:0;border:0;overflow:hidden;display:flex;flex-direction:column}
.reference-shell .sidebar>.brand,.reference-shell .sidebar>.nav-quick,.reference-shell .sidebar>footer{display:none}
.reference-shell .sidebar .tree-nav{order:1;flex:1;min-height:0;max-height:none;overflow-y:auto;padding:0;display:block;scrollbar-width:thin;scrollbar-color:#64747e #303c45}
.reference-shell .sidebar .menu-search{order:2;flex:none;width:calc(100% - 16px);min-width:0;margin:8px;padding:8px;font-size:12px;border-radius:4px}
.reference-shell .tree-branch{margin:0}.reference-shell .tree-branch>summary{display:grid;grid-template-columns:23px minmax(0,1fr) 12px;gap:9px;align-items:center;border-radius:0;padding:12px 11px;min-height:45px;border-bottom:1px solid #ffffff10;font-size:14px}
.reference-shell .tree-branch>summary>b{grid-column:2;font-weight:500}.reference-shell .tree-branch>summary>span:not(.branch-arrow){grid-column:1;grid-row:1}.reference-shell .branch-arrow{grid-column:3;grid-row:1;font-size:23px;line-height:1;transition:transform .15s}.reference-shell details[open]>summary .branch-arrow{transform:rotate(-90deg)}
.reference-shell .tree-branch>div{margin:0;padding-inline-start:10px;border-inline-start:1px solid #ffffff13}
.reference-shell .tree-leaf-row{position:relative;border-bottom:1px solid #ffffff0c}.reference-shell .tree-leaf{border-radius:0;min-height:43px;display:flex;align-items:center;gap:9px;padding:10px 11px;font-size:13px;width:100%;color:#d9e2e7;text-align:right}.reference-shell .tree-leaf b{font-weight:500}.reference-shell .tree-leaf-row .tree-leaf.active{background:#222b32;border-inline-start:3px solid #29a3ed}
.reference-shell .tree-leaf>span,.reference-shell summary>span:not(.branch-arrow){display:inline-flex;width:23px;flex-shrink:0}.reference-shell .sidebar svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.reference-shell .favorite-star{position:absolute;inset-inline-end:3px;top:9px;opacity:0;background:#303c45!important}.reference-shell .tree-leaf-row:hover .favorite-star,.reference-shell .favorite-star:focus-visible,.reference-shell .favorite-star.active{opacity:1}
.reference-shell .workspace{max-width:none;padding:16px 30px 30px}.reference-shell .main:has(.home-catalog)>.workspace-tabs{display:none}.reference-shell .home-welcome{display:flex;align-items:center;gap:16px;padding:0 0 18px;margin:0 0 25px;border-bottom:1px solid #e6e8e6;min-height:90px}.reference-shell .home-welcome h1{font-size:30px;margin:0 0 5px;line-height:1.4;color:#333}.reference-shell .home-welcome p{font-size:14px;color:#777;margin:0}.reference-shell .home-emblem{display:flex;flex:none;align-items:center;justify-content:center;width:64px;height:64px;background:#0078ce;border-radius:3px}.reference-shell .home-emblem svg{width:36px;height:36px;padding:0;background:none;float:none;margin:0;stroke:#fff;fill:none;stroke-width:1.5;box-sizing:border-box}
.reference-shell .home-section-heading{margin:0 0 18px;min-height:35px}.reference-shell .home-section-heading h2{font-size:15px;margin:0;font-weight:600}.reference-shell .home-screen-search{width:245px;max-width:100%;font-size:12px}.reference-shell .home-screen-search input{padding:7px 10px;font-size:12px;min-width:0}
.reference-shell .home-module-section{margin-bottom:28px}.reference-shell .home-module-section>h2{font-size:14px;margin:0 0 10px;gap:7px;color:#3c4650}.reference-shell .home-check{width:16px;height:16px;font-size:11px;background:#338dce}
.reference-shell .home-screen-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.reference-shell .home-screen-card{min-height:186px;padding:20px 18px;gap:18px;border:1px solid #acd2b5;border-radius:14px;background:linear-gradient(155deg,#f0f8f3,#fff 85%);box-shadow:0 1px 2px #00000008;align-items:flex-start;justify-content:flex-start}.reference-shell .home-screen-card:hover{background:#edf8f0;border-color:#6ab681;transform:translateY(-2px)}.reference-shell .home-card-icon{width:55px;height:55px;background:#dcf0e1;border-radius:17px;display:flex;align-items:center;justify-content:center}.reference-shell .home-card-icon svg{width:27px;height:27px;stroke:#4d9e60;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;padding:0;margin:0;background:none;border-radius:0;box-sizing:border-box}.reference-shell .home-screen-card strong{font-size:14px;line-height:1.65;font-weight:600}.reference-shell .home-screen-card small{font-size:11px;line-height:1.8;color:#88968d;font-weight:400;margin-top:auto}
.reference-shell .home-metrics{margin-top:40px;border-radius:10px}.reference-shell button:focus-visible,.reference-shell summary:focus-visible{outline:3px solid #44a9ef;outline-offset:-3px}.nav-collapsed .reference-shell{grid-template-columns:minmax(0,1fr)}
@media(max-width:1349px){.reference-shell .home-screen-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1099px){.reference-shell{grid-template-columns:220px minmax(0,1fr)}.reference-shell .home-screen-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.reference-shell .workspace{padding:18px}.reference-shell .topbar-company,.reference-shell .sync-indicator{display:none}}
@media(max-width:800px){.reference-shell{display:block;padding-top:54px}.reference-shell .topbar{height:54px;min-height:54px;padding:0 7px;gap:7px}.reference-shell .topbar-brand>b{font-size:14px}.reference-shell .topbar-user{font-size:10px;gap:3px}.reference-shell .topbar-user button{font-size:10px;padding:6px}.reference-shell .sidebar{position:fixed;top:54px;inset-inline-start:0;z-index:19;width:260px;height:calc(100dvh - 54px);box-shadow:-5px 0 20px #0002}.reference-shell .home-screen-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-shell .home-welcome h1{font-size:24px}.reference-shell .home-welcome p{font-size:12px}.reference-shell .home-section-heading{display:flex;flex-wrap:wrap;gap:12px}.reference-shell .home-screen-search{width:100%}.reference-shell .home-screen-card{min-height:180px;padding:18px 14px}.reference-shell .home-screen-card strong{font-size:13px}}
@media(max-width:420px){.reference-shell .workspace{padding:16px 12px}.reference-shell .home-screen-grid{grid-template-columns:1fr}.reference-shell .home-welcome{gap:12px}.reference-shell .home-emblem{width:50px;height:50px}.reference-shell .home-welcome h1{font-size:22px}}
@media print{.reference-shell{display:none!important}}
.nav-collapsed .reference-shell .sidebar{display:none}
.reference-shell .sidebar .tree-leaf-row .tree-leaf.active{border-radius:0;background:#222b32;color:#fff}
.reference-shell .branch-arrow{border:0;background:none;padding:0;width:auto;height:auto;border-radius:0}
.permission-workspace{margin-bottom:20px}.permission-workspace-title{border-bottom:1px solid #dce6e3;margin-bottom:18px}.permission-workspace-title h2{margin:0 0 8px}.permission-workspace-title p,.permission-workspace-guide p{font-size:13px;color:#61716b;line-height:1.8}.permission-workspace-filters{display:grid;grid-template-columns:1fr 1fr;gap:18px}.permission-workspace-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.permission-workspace-tabs button{background:#eaf5ee;color:#166345;border-color:#b7d5c3;min-height:44px}.permission-user-summary{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:18px}.permission-user-summary span{font-size:13px;color:#65766e}.permission-workspace-guide{padding:14px;background:#f6faf8;border:1px solid #e0eae4;border-radius:8px}.permission-protected{padding:14px;background:#f6f8fc;border:1px solid #dce3f1;border-radius:7px}
dialog:has(table.permissions){width:calc(100vw - 34px);max-width:1700px;max-height:calc(100dvh - 34px);padding:22px}dialog:has(table.permissions) .permissions th:first-child{position:sticky;inset-inline-start:0;z-index:2;background:#f1f7f3;min-width:150px}dialog:has(table.permissions) .permissions tr:first-child th{position:sticky;top:0;z-index:3}dialog:has(table.permissions) .permissions tr:first-child th:first-child{z-index:4}.permission-bulk-toolbar{position:sticky;top:0;z-index:6;background:#fff;padding:10px;border:1px solid #dce8df}.permission-inline-tools{display:inline-flex;gap:3px;margin-inline-start:5px}.permission-context-menu{position:fixed;z-index:10000;width:230px;padding:5px;background:#fff;border:1px solid #c6d4cc;border-radius:7px;box-shadow:0 8px 28px #0003;display:flex;flex-direction:column;direction:rtl}.permission-context-menu button{border:0;background:#fff;color:#263f33;text-align:right;padding:10px 12px;border-radius:3px;font-size:14px}.permission-context-menu button:hover,.permission-context-menu button:focus-visible{background:#e6f3eb}.permission-context-menu button:nth-child(2),.permission-context-menu button:nth-child(4){border-bottom:1px solid #e0e8e3}.permission-context-menu button:disabled{opacity:.4}
@media(max-width:700px){.permission-workspace-filters{grid-template-columns:1fr}.permission-workspace-tabs{display:grid;grid-template-columns:1fr 1fr}.permission-workspace-tabs button{font-size:12px;padding:10px}dialog:has(table.permissions){width:calc(100vw - 12px);padding:12px}}
.permission-screen-search{margin-bottom:8px;max-width:420px}.permission-screen-search input{padding:8px 10px}dialog:has(table.permissions) .tablewrap:has(>table.permissions){max-height:46dvh;overflow:auto;border:1px solid #dce8df}dialog:has(table.permissions) .permissions{min-width:100%;width:max-content}dialog:has(table.permissions) .permissions th,dialog:has(table.permissions) .permissions td{padding:7px 9px;white-space:nowrap;font-size:13px;line-height:1.5;border-bottom:1px solid #e0e8e3}dialog:has(table.permissions) .permissions td{text-align:center;min-width:75px}dialog:has(table.permissions) .permission-inline-tools{display:inline-flex;vertical-align:middle;margin-top:0;gap:3px}dialog:has(table.permissions) .permission-inline-tools button{padding:3px 7px;min-height:26px;font-size:12px}dialog:has(table.permissions) .permissions input[type=checkbox]{padding:0;margin:0;width:18px;height:18px;min-height:18px;max-height:18px;vertical-align:middle}
.source-reference .reportfilters{margin:18px 0;gap:12px}.source-reference .source-value{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.source-detail-value{white-space:pre-wrap;overflow-wrap:anywhere;max-width:65vw}.source-column-picker>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:9px;max-height:220px;overflow:auto;padding:12px}.source-column-picker label{display:flex;align-items:center;gap:7px}.source-date-note{background:#f2f8f4;padding:12px;border-inline-start:3px solid #188455}.source-reference .toolbar{margin-top:15px}

dialog:has(table.permissions) .permissions th:first-child{width:220px;max-width:220px;white-space:normal;overflow-wrap:anywhere}

dialog:has(table.permissions) .input-rights-table th:first-child{width:95px;min-width:95px;max-width:95px}

/* Main and sub-section screen catalog, matching the supplied menu reference. */
.reference-shell .main:has(.branch-catalog)>.workspace-tabs,.reference-shell .workspace:has(.branch-catalog)>.pagehead{display:none}
.reference-shell .workspace:has(.branch-catalog){padding:16px;background:#fafbfc;min-height:calc(100dvh - 50px)}
.branch-catalog{background:#fff;border:1px solid #e2e5e8;min-height:245px}.branch-catalog-heading{padding:15px 18px;border-bottom:1px solid #eef0f2}.branch-catalog-heading h1{font-size:15px;margin:4px 0 0;color:#38454e}.branch-catalog-heading nav{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:11px}.branch-catalog-heading nav a{color:#64727d;text-decoration:none}.branch-catalog-heading nav a:hover{text-decoration:underline}.branch-catalog-body{padding:24px 18px 32px}.branch-screen-search{display:flex;align-items:center;gap:10px;width:460px;max-width:100%;margin-bottom:18px;flex-direction:row-reverse}.branch-screen-search input{width:100%;min-width:0;border:1px solid #dedfe2;border-radius:13px;background:#fff;padding:11px 14px;font-size:13px}.branch-screen-search svg{width:20px;height:20px;stroke:#a4afb7;fill:none;stroke-width:1.5;flex-shrink:0}.branch-screen-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:810px}.branch-screen-card{display:flex;align-items:center;gap:12px;min-height:76px;border:1px solid #e7e9ec;box-shadow:0 1px 2px #00000005;border-radius:15px;background:#fff;text-align:right;padding:12px 16px;color:#35424b;min-width:0}.branch-screen-card:hover{border-color:#91bde0;background:#f7fbff}.branch-card-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex-shrink:0;border-radius:12px;background:#eaf3fb;color:#5c94c7}.branch-card-icon svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.5}.branch-screen-card>span:last-child{display:flex;flex-direction:column;gap:5px;min-width:0}.branch-screen-card strong{font-size:13px;line-height:1.6;overflow-wrap:anywhere}.branch-screen-card small{color:#89939c;font-size:11px;direction:ltr;text-align:right}.branch-subsections{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.branch-subsections a{padding:7px 11px;border:1px solid #e6e9ed;background:#fbfcfd;color:#576772;text-decoration:none;border-radius:6px;font-size:12px}.reference-shell .tree-branch>summary.branch-selected{outline:1px solid #147cca;outline-offset:-1px;background:#20282e;color:#fff}.reference-shell .tree-branch>div{background:#20272d}.branch-screen-card[hidden]{display:none}
@media(max-width:1000px){.branch-screen-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.branch-screen-grid{grid-template-columns:1fr}.branch-catalog-body{padding:16px 12px}.reference-shell .workspace:has(.branch-catalog){padding:12px 8px}.branch-screen-search{width:100%}.branch-screen-card{min-height:76px}}
