/* v2.77 refinements of the approved navy/light/blue system. */
body.ned-shell #shellTools #shellModes button{display:inline-flex;align-items:center;gap:7px;background:#f7f9fc!important;color:#294967!important}
body.ned-shell #shellTools #shellModes button[aria-pressed=true]{background:#2679c9!important;color:#fff!important;border-color:#1965ac!important}
body.ned-shell #shellTools #shellModes svg{stroke:currentColor!important;width:20px;height:20px;flex:none}
body.ned-shell>main:not(.catalogMode),body.ned-shell>main.projectMode:not(.catalogMode){grid-template-columns:280px minmax(0,1fr) 280px!important}
body.ned-shell .documentTree summary{display:flex;align-items:center;gap:2px;padding:0 2px}
body.ned-shell .documentTree summary::before{content:'▸';flex:none;font-size:12px;width:12px;cursor:pointer}
body.ned-shell .documentTree summary::marker{content:''}
body.ned-shell .documentTree details[open]>summary::before{content:'▾'}
body.ned-shell .documentTree .treeItem{min-width:0;flex:1;overflow:hidden;min-height:32px}
body.ned-shell .documentTree .treeItem span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;min-width:0;flex:1}
body.ned-shell .documentTree li,body.ned-shell .documentTree details{min-width:0}
body.ned-shell .documentTree ul{padding-left:10px;margin-left:5px}
body.ned-shell #outlineHeading{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ned-shell #documentOverview{display:grid;grid-template-columns:1fr;gap:3px;margin:4px 12px 16px}
body.ned-shell #documentOverview dt{font-size:11px;color:var(--nd-muted);margin-top:8px}
body.ned-shell #documentOverview dd{margin:0;overflow-wrap:anywhere;font-size:13px;font-weight:600;color:var(--nd-text)}
body.ned-shell #shellTools .toolIcons,body.ned-shell #shellTools .rotateTools,body.ned-shell #shellTools .historyTools,body.ned-shell #shellTools #viewControlsDock{border-left:1px solid var(--nd-border)!important;padding-left:6px!important}
body.ned-shell #shellTools :is(#toolsPanel,#projectTools) button:not([hidden]),body.ned-shell #shellTools :is(.historyTools,#viewControlsDock) button{width:40px!important;min-width:40px!important;max-width:40px!important;height:40px!important;min-height:40px!important;padding:9px!important}
body.ned-shell #shellTools :is(.toolIcons,#projectTools,.historyTools,#viewControlsDock) svg.actionSvg{width:20px!important;height:20px!important;stroke-width:2!important;filter:none!important;stroke:currentColor!important}
body.ned-shell #shellTools #nedDimensionsToggle{font-size:10px!important;padding:2px!important}
body.ned-shell .nedConfirmPanel,body.ned-shell .nedPromptPanel{font:inherit;border-radius:8px!important;padding:20px!important}
body.ned-shell .nedConfirmPanel h3{font-size:16px;color:var(--nd-text)}
body.ned-shell .nedConfirmPanel p{font-size:13px;line-height:1.5}
body.ned-shell .nedConfirmActions button{font-size:13px;min-height:36px}
body.ned-shell #draftRecoveryDialog .dialogFoot{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:6px;margin-top:16px;padding:10px 0 0}
body.ned-shell #draftRecoveryBar[hidden]{display:none!important}
body.ned-shell #draftRecoveryBar:not([hidden]){display:flex;align-items:center;gap:10px;padding:6px 12px;background:#fff3da!important;color:#684d13!important;font-size:12px}
body.ned-shell #draftRecoveryBar button{margin-left:auto}
body.ned-shell #fileMenu hr{width:100%;border:0;border-top:1px solid var(--nd-border);margin:4px 0}
@media(max-width:1100px) and (min-width:901px){body.ned-shell>main:not(.catalogMode),body.ned-shell>main.projectMode:not(.catalogMode){grid-template-columns:230px minmax(0,1fr) 250px!important}}
@media(max-width:900px){body.ned-shell .documentTree .treeItem{min-height:44px}body.ned-shell #shellTools :is(#toolsPanel,#projectTools) button:not([hidden]),body.ned-shell #shellTools .historyTools button{width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important}body.ned-shell #shellTools svg.actionSvg{width:20px!important;height:20px!important}}
body.ned-shell #shellTools button svg.actionSvg{width:20px!important;min-width:20px!important;max-width:20px!important;height:20px!important;min-height:20px!important;max-height:20px!important;flex:0 0 20px!important;stroke-width:2!important}
@media(max-width:900px){body.ned-shell #shellMenus{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:thin;min-height:40px}body.ned-shell #shellMenus>*{flex:none}}
body.ned-shell dialog.nedConfirmOverlay{position:fixed;inset:0;margin:auto;width:min(440px,calc(100vw - 24px));height:fit-content;max-height:90dvh;overflow:auto;display:flex;padding:0!important;background:transparent!important;border:0!important;border-radius:8px!important;box-shadow:0 16px 50px #18365340!important}
body.ned-shell dialog.nedConfirmOverlay .nedConfirmPanel{width:100%;max-width:100%;margin:0;box-shadow:none!important}
body.ned-shell button:is(.iconOnly,.iconWithText)>svg.actionSvg{width:20px!important;min-width:20px!important;max-width:20px!important;height:20px!important;min-height:20px!important;max-height:20px!important;stroke-width:2!important}
body.ned-shell #shellMenus details>summary{list-style:none}
body.ned-shell #shellMenus details>summary::marker{content:''}
body.ned-shell #shellMenus details>summary::after{content:'▾';font-size:10px;margin-left:5px}
/* v2.78 menu reference: editing above, history and views below the workspace. */
body.ned-shell #mainNavigation[hidden]{display:none!important}
body.ned-shell #shellBottomTools{display:flex;align-items:center;gap:10px;flex:none;padding:4px 8px;background:#e9eff7;border-top:1px solid var(--nd-border);overflow-x:auto;min-height:52px}
body.ned-shell #shellBottomTools .historyTools{display:flex;flex:none;gap:4px;margin:0;padding:0}
body.ned-shell #shellBottomTools #viewControlsDock{position:static!important;display:flex!important;flex:none;align-items:center;flex-wrap:nowrap!important;transform:none!important;gap:4px;padding:0 0 0 8px!important;margin:0!important;width:max-content!important;max-width:none!important;background:transparent!important;border:0!important;border-left:1px solid var(--nd-border)!important;box-shadow:none!important}
body.ned-shell #shellBottomTools button{display:inline-flex!important;align-items:center;justify-content:center;flex:none!important;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:9px!important;background:#f8fafd!important;color:#294967!important;border:1px solid #b5c6dc!important;border-radius:4px!important}
body.ned-shell #shellBottomTools button.active{background:#cee3ff!important;color:#125ba9!important}
body.ned-shell #shellBottomTools button:disabled{opacity:.4;cursor:default}
body.ned-shell #shellBottomTools button:hover:not(:disabled){background:#dbe8f8!important}
body.ned-shell #shellBottomTools #nedDimensionsToggle{font-size:11px!important;padding:2px!important}
body.ned-shell #shellBottomTools svg.actionSvg{width:20px!important;height:20px!important;stroke-width:2!important}
body.ned-shell #shellBottomTools #shellViewTools{padding:0;border:0;overflow:visible}
body.ned-shell #shellMenus{overflow:visible}
body.ned-shell #shellTools :is(#quickSave,#quickOpen,#projectQuickSave,#projectQuickOpen,#projectRoomSettings){display:none!important}
body.ned-shell:has(main.catalogMode) #shellBottomTools{display:none}
@media(max-width:900px){body.ned-shell #shellMenus{flex-wrap:wrap!important;overflow:visible!important}body.ned-shell #shellBottomTools{gap:5px;padding:3px 4px}body.ned-shell #shellBottomTools #viewControlsDock{padding-left:4px!important}}
body.ned-shell #shellBottomTools{flex-direction:row!important;flex-wrap:nowrap!important}
body.ned-shell #shellBottomTools .historyTools{flex-direction:row!important;flex-wrap:nowrap!important;width:auto!important;max-width:none!important}
@media(max-width:900px){body.ned-shell #shellBottomTools #shellViewTools{display:block!important;flex:1 1 0!important;min-width:0;overflow-x:auto}}
body.ned-shell #headerRight #cloudLogout{display:none!important}
body.ned-shell #generalViewSettings{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
body.ned-shell #generalViewSettings h3{flex-basis:100%;margin:0 0 4px}
body.ned-shell #generalViewSettings button[aria-pressed=true]{background:#cee3ff!important;color:#125ba9!important}

body.ned-shell #shellTools #projectQuickAdd{display:none!important}
.folderRow{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:8px 0;border-bottom:1px solid var(--nd-border)}
.folderRow input{flex:1 1 180px;min-width:0}.folderRow select{flex:1 1 180px;min-width:0}
.libraryDialog{width:min(900px,96vw)!important;max-width:96vw!important;max-height:90dvh;overflow:auto}
.libraryDialogItems{display:flex;flex-direction:column;gap:10px;margin:12px 0;max-height:60dvh;overflow:auto}
.libraryDialog input[type=search]{width:100%;min-height:40px;padding:8px;border:1px solid var(--nd-border);border-radius:4px}
@media(max-width:420px){.libraryDialog .libraryCard{flex-direction:column}.libraryDialog .libraryCardBody{min-width:0}.folderRow button{min-height:44px}}

.folderRow>label{flex:1 1 180px;min-width:0;margin:0;font-size:11px}

body.ned-shell dialog .nedDialogClose {
 position:absolute;
 top:4px;
 right:4px;
 z-index:2;
 box-sizing:border-box;
 width:44px;
 min-width:44px;
 height:44px;
 min-height:44px;
 padding:10px;
}
body.ned-shell dialog:has(> .nedDialogClose) :is(h2,h3):first-of-type,
body.ned-shell .nedConfirmPanel:has(> .nedDialogClose) h3 {
 padding-right:44px;
}
body.ned-shell .nedConfirmPanel {position:relative}
body.ned-shell #fileDialogFolderLabel:not([hidden]) {display:block}
body.ned-shell #fileDialogFolder {display:block;width:100%}

body.ned-shell dialog.nedMovableDialog {
 position:fixed!important;
 inset:0!important;
 margin:auto!important;
 max-inline-size:calc(100vw - 12px);
 max-block-size:calc(100dvh - 12px);
 transform:translate(var(--dialog-x, 0px),var(--dialog-y, 0px))!important;
}
body.ned-shell dialog .nedDialogHandle {
 position:sticky;
 top:0;
 z-index:3;
 box-sizing:border-box;
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:8px;
 min-height:48px;
 padding:4px 10px;
 cursor:move;
 touch-action:none;
 user-select:none;
}
body.ned-shell dialog .nedDialogHandle :is(h1,h2,h3) {margin:0;padding:0}
body.ned-shell dialog .nedDialogHandle > .nedDialogClose {
 position:static;
 flex:none;
 cursor:pointer;
}
