:root{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#17283f;background:#edf4fa}*{box-sizing:border-box}body{margin:0;padding:22px}.shell{min-height:calc(100vh - 44px);max-width:1550px;margin:auto;display:grid;grid-template-columns:235px 1fr;background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 8px 45px #45648a12}aside{border-right:1px solid #edf1f5;padding:30px 16px;position:relative}.brand{font-size:30px;display:flex;gap:13px;align-items:center;margin:0 10px 50px;color:#234d80}.brand span{font-size:17px;line-height:1.2;font-weight:750;color:#17283f}nav a{display:block;padding:14px 16px;border-radius:11px;margin:4px 0;text-decoration:none;color:#53657b;font-size:14px}nav .active,nav a:hover{background:#e8f3ff;color:#1674d4}.bottom{position:absolute;bottom:25px;left:25px;font-size:13px;color:#53749c}.bottom small{display:block;margin:7px 0;color:#92a0b1}main{min-width:0}header{height:82px;border-bottom:1px solid #f1f3f7;display:flex;align-items:center;justify-content:space-between;padding:0 30px;gap:15px}.search{border-radius:12px;background:#f5f8fb;color:#8795a7;padding:13px 20px;flex:1;max-width:700px;font-size:14px}.account{display:flex;align-items:center;gap:14px;font-size:13px}.page{padding:30px}.top{display:flex;align-items:center;justify-content:space-between;gap:15px}.top small{color:#6e9cc6}h1{font-size:27px;margin:8px 0 18px;letter-spacing:-.6px}h2{font-size:19px}.sectionhead{font-weight:650;margin:28px 0 18px;display:flex;align-items:center;justify-content:space-between}.folders{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:17px}.folder{border:1px solid #eff2f5;border-radius:12px;overflow:hidden;text-decoration:none;color:inherit;box-shadow:0 3px 13px #243d5a08}.folder-art{height:110px;display:grid;place-items:center;color:#8cb9e8}.folder strong{display:block;padding:12px 12px 3px;font-size:14px}.folder small{display:block;padding:0 12px 14px;color:#8995a3}.tablewrap{border:1px solid #edf0f4;border-radius:12px;overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px;text-align:left}th{font-weight:500;color:#8592a4;background:#fafcfe}th,td{padding:15px;border-bottom:1px solid #f0f2f6}tr:last-child td{border-bottom:0}td a{color:#1778d4;text-decoration:none}.fileicon{color:#1879df;margin-right:12px}.empty{padding:25px;color:#8a96a5}button{background:#2589ee;border:0;color:white;border-radius:9px;padding:11px 17px;cursor:pointer;font-weight:600}button.link{background:transparent;color:#2479c6;padding:5px}button.danger{background:transparent;color:#bb5361;font-size:12px;padding:5px}.inline{display:inline;margin-left:10px}dialog{border:1px solid #e5edf6;border-radius:16px;box-shadow:0 20px 70px #1e355244;padding:30px;width:min(430px,95vw)}dialog::backdrop{background:#15243b66}input,select{display:block;width:100%;border:1px solid #dce5ef;border-radius:8px;padding:12px;margin:10px 0 18px;font:inherit}label{font-size:13px}.flash{padding:12px 30px;background:#f0f7ff;color:#345c86}.muted{color:#8796a7;font-size:13px}.memberform{max-width:420px}.narrow{max-width:550px}@media(max-width:760px){body{padding:0}.shell{display:block;border-radius:0}aside{padding:14px;border-bottom:1px solid #edf1f5}.brand{margin:0 0 12px;font-size:23px}.brand span{font-size:14px}nav{display:flex;overflow:auto}nav a{white-space:nowrap;padding:10px}.bottom{display:none}header{height:auto;padding:14px}.account{flex-wrap:wrap}.page{padding:18px}.folders{grid-template-columns:repeat(2,minmax(0,1fr))}.folder-art{height:85px}}

.upload-progress{position:fixed;right:26px;bottom:25px;z-index:30;width:min(420px,calc(100vw - 36px));padding:18px;background:#fff;border:1px solid #e4edf5;border-radius:14px;box-shadow:0 12px 50px #243d5a30}.upload-progress-head{display:flex;justify-content:space-between;gap:15px;font-size:14px}.upload-progress progress{display:block;width:100%;height:10px;margin:13px 0;accent-color:#2589ee}.upload-progress .muted{overflow-wrap:anywhere;margin:0}.drop-overlay{position:fixed;inset:14px;z-index:20;pointer-events:none;border:3px dashed #2589ee;background:#e9f4ffb8;border-radius:20px;display:grid;place-items:center;color:#1769b9;font-weight:700;font-size:20px}.drop-overlay[hidden],.upload-progress[hidden]{display:none}.drop-target{outline:3px solid #2589ee;outline-offset:-3px;background:#eaf5ff!important}button:disabled{opacity:.5;cursor:wait}

/* Document preview */
.preview-name,.preview-action{border:0;background:none;color:#1877d2;cursor:pointer;padding:0;font:inherit;text-align:left}.preview-name:hover,.preview-action:hover{text-decoration:underline}
.file-preview{width:min(1100px,94vw);height:min(850px,92dvh);max-width:none;max-height:none;padding:0;border:0;border-radius:14px;box-shadow:0 20px 70px #15283b55;overflow:hidden}
.file-preview::backdrop{background:rgba(12,29,49,.7)}
.preview-toolbar{height:64px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 22px;border-bottom:1px solid #e6eaf0;background:white}
.preview-toolbar strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.preview-toolbar>div{display:flex;align-items:center;gap:20px}.preview-toolbar button{background:transparent;border:0;font-size:22px;cursor:pointer;color:#243b55}
.preview-content{height:calc(100% - 64px);display:flex;align-items:center;justify-content:center;background:#f2f5f9;overflow:auto}
.preview-content img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.preview-content iframe{width:100%;height:100%;border:0;background:white}
@media(max-width:650px){.file-preview{width:100vw;height:100dvh;border-radius:0}.preview-toolbar{padding:10px 14px}}

.folder-settings{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:18px 0 8px;color:#53677f;font-size:14px}.folder-settings button.access-edit{background:transparent;color:#1675d1;border:1px solid #d9e5f1;border-radius:8px;padding:7px 12px;cursor:pointer}.folder-settings button.access-edit:hover{background:#eef6ff}

/* Tree, search, breadcrumbs and folder operations */
header .search{display:flex;align-items:center;gap:8px;padding:5px 8px 5px 14px}.search input{margin:0;padding:9px;border:0;outline:none;background:transparent;min-width:0;flex:1}.search button{padding:9px 13px}.tree-heading{font-size:10px;letter-spacing:1.3px;color:#99a6b5;margin:23px 12px 10px}.folder-tree{max-height:55vh;overflow:auto}.tree-line{display:flex;align-items:center;border-radius:8px;min-width:0}.tree-line:hover,.tree-line.folder-move-hover,.folder-move-hover{background:#dcefff!important;outline:2px dashed #2486e7}.tree-toggle{background:none;color:#71859c;padding:5px;width:24px;flex:none;font-size:16px}.tree-link{display:block;min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;color:#52677f;font-size:12px;padding:8px 4px}.tree-link.selected{color:#137bdc;font-weight:700}.tree-children{margin-left:13px;padding-left:5px;border-left:1px solid #e5ecf4}.tree-children[hidden]{display:none}.tree-icon{width:17px;height:17px;object-fit:cover;vertical-align:middle;border-radius:4px}.breadcrumbs{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:12px;color:#90a0b0}.breadcrumbs a{color:#4e86bb;text-decoration:none}.breadcrumbs a:hover{text-decoration:underline}.folder-cover{height:100%;width:100%;object-fit:cover}.folder-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}.folder-actions button{font-size:12px;padding:8px 11px;background:#eff6fd;color:#2369a4}.folder-actions .danger{background:#fff2f2;color:#b94c55}.folder-actions form{margin:0}@media(max-width:760px){.folder-tree{max-height:200px}.tree-heading{margin:10px 12px}}

/* v0.8: compact monochrome folder UI */
.shell{grid-template-columns:270px 1fr}aside{padding:25px 16px}.brand{margin-bottom:30px;font-size:24px}.brand-mark{font-size:27px}.tree-heading{margin:18px 12px 8px}.folder-tree{max-height:calc(100vh - 350px)}.tree-line{min-height:30px;gap:2px}.tree-link{font-size:13px;padding:6px 4px;display:flex;align-items:center;gap:9px}.tree-toggle{font-size:14px;width:20px;padding:3px}.tree-children{margin-left:11px}.tree-line:hover{background:#f1f6fc!important;outline:none}.tree-link.selected{color:#116dc5}.line-icon{width:19px;height:19px;flex:none;fill:none;stroke:#536983;stroke-linejoin:round;stroke-linecap:round}.folder-art .line-icon{width:25px;height:25px}.folders{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}.folder{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #e6edf4;box-shadow:none;min-height:68px}.folder:hover{background:#f8fbff}.folder-art{height:30px;width:30px;background:transparent;font-size:20px;flex:none}.folder strong{padding:0;font-size:13px}.folder small{padding:0;font-size:11px}.folder-actions{position:relative;display:inline-flex;margin:0 0 0 10px;vertical-align:middle}.folder-actions:not(.open)>button,.folder-actions:not(.open)>form{display:none}.folder-actions.open{position:relative}.folder-actions.open>button,.folder-actions.open>form{display:block}.folder-actions.open{padding:0}.folder-actions.open>button,.folder-actions.open>form{position:relative}.folder-actions.open{background:#fff;border-radius:9px;box-shadow:0 4px 18px #193f6422}.folder-settings{margin:0 0 18px;font-size:12px}.folder-settings .access-edit{display:none}.primary-actions{display:flex;gap:10px}.primary-actions .new-folder-btn{background:#fff;border:1px solid #2589ee;color:#1674d4}.top{align-items:flex-start}.top h1{margin:12px 0 7px}.sectionhead{margin:26px 0 14px}.bottom{max-width:210px}.bottom small{font-size:11px;line-height:1.5}.folder-cover{width:30px;height:30px;border-radius:5px}.tree-icon{width:18px;height:18px}@media(max-width:760px){.folder-tree{max-height:200px}.primary-actions{flex-wrap:wrap}}

.folder-actions:before{display:none}.folder-actions .folder-settings-toggle{display:inline-flex!important;align-items:center;justify-content:center;width:34px;height:34px;padding:0;font-size:19px;background:#f6f9fc;color:#536983;border:1px solid #e3eaf2}.folder-actions.open{box-shadow:none}.folder-actions.open>button:not(.folder-settings-toggle),.folder-actions.open>form{display:block}.folder-actions.open>button:not(.folder-settings-toggle){font-size:12px}.folder-actions.open{flex-wrap:wrap}.folder-actions:not(.open)>button:not(.folder-settings-toggle){display:none}
/* v0.9: faithful compact document-workspace layout */
:root{color:#192c45;background:#eef5fa}body{padding:12px}.shell{max-width:1600px;min-height:calc(100vh - 24px);grid-template-columns:290px minmax(0,1fr);border-radius:20px;box-shadow:none}aside{padding:27px 15px}.brand{margin:0 16px 38px;font-size:0}.brand-mark{font-size:28px}.brand span:last-child{font-size:19px}nav>a{font-size:15px;padding:12px 17px;margin:3px 0}.tree-heading{font-size:11px;letter-spacing:1.2px;margin:28px 18px 13px}.folder-tree{max-height:calc(100vh - 370px);overflow:auto}.tree-line{min-height:35px}.tree-link{font-size:14px;padding:7px 5px;gap:10px}.tree-toggle{width:25px}.tree-children{margin-left:12px;padding-left:7px}.line-icon{width:20px;height:20px;stroke:#405875;stroke-width:1.8}.bottom{left:31px;bottom:28px;font-size:14px}.bottom small{font-size:12px;color:#7386a0;max-width:225px}header{height:80px;padding:0 30px}.search{max-width:750px}.search button{background:transparent;color:#59718b;font-size:12px}.page{padding:26px 30px 60px}.top{align-items:flex-start}.breadcrumbs{font-size:13px;gap:10px;margin-bottom:21px}.title-line{display:flex;align-items:center;gap:13px;position:relative}.title-icon{width:31px;height:31px;stroke-width:1.9}h1,.top h1{font-size:30px;line-height:1.2;margin:0;letter-spacing:-.7px}.folder-settings{margin:10px 0 0;font-size:13px}.primary-actions{gap:10px;padding-top:23px}.primary-actions button{padding:12px 17px}.sectionhead{font-size:17px;margin:38px 0 17px}.folders{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}.folder{min-height:76px;display:flex;align-items:center;padding:14px;gap:12px;border-color:#e1e9f2;border-radius:11px}.folder-art{width:29px;height:29px;flex:none}.folder-art .line-icon{width:28px;height:28px}.folder strong{font-size:14px;font-weight:650}.folder small{display:none}.tablewrap{border-color:#e0e8f1}.tablewrap th,.tablewrap td{padding:14px 17px}.tablewrap th{font-size:12px;background:#f8fafc}.tablewrap td{font-size:13px}.empty{margin:0;padding:24px}.fileicon{color:#587b9f}.folder-actions{display:inline-flex!important;margin:0 0 0 4px;padding:0;position:relative;vertical-align:middle;background:none!important;box-shadow:none!important}.folder-actions .folder-settings-toggle{display:grid!important;place-items:center;background:#f4f7fa;border:1px solid #e5ebf2;border-radius:9px;width:38px;height:38px}.folder-actions .folder-settings-toggle .line-icon{width:19px;height:19px}.folder-menu{display:none;position:absolute;top:44px;left:0;z-index:12;width:218px;background:#fff;border:1px solid #e0e8f1;border-radius:12px;padding:7px;box-shadow:0 12px 35px #18365322}.folder-actions.open .folder-menu{display:block}.folder-menu button,.folder-actions.open .folder-menu button{display:block!important;width:100%;text-align:left;padding:11px 13px;border-radius:7px;background:#fff;color:#273e58;font-size:13px;font-weight:500;border:0}.folder-menu button:hover{background:#f1f6fb}.folder-menu form{display:block!important;margin:0;border-top:1px solid #e9edf3;padding-top:4px}.folder-menu button.danger{color:#c33545}.folder-menu button.danger:hover{background:#fff2f2}.folder-actions:not(.open)>.folder-menu{display:none}.folder-settings .access-edit{display:none}.top .primary-actions{flex-shrink:0}
@media(max-width:900px){.shell{grid-template-columns:235px minmax(0,1fr)}.page{padding:20px}.folders{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}.top{flex-wrap:wrap}.primary-actions{padding-top:0}}
@media(max-width:650px){body{padding:0}.shell{display:block;border-radius:0}aside{padding:14px}.brand{margin:0 0 12px}.folder-tree{max-height:180px}header{height:auto;padding:12px}.page{padding:18px}.title-line{flex-wrap:wrap}.top{gap:12px}.primary-actions{width:100%}.primary-actions button{flex:1}.folders{grid-template-columns:repeat(2,minmax(0,1fr))}.bottom{display:none}}

/* v1.0: consistent member navigation and current-folder icon */
.nav-members-divider{height:1px;background:#e5ebf2;margin:23px 14px 12px}
nav>a.members-link{display:flex;align-items:center;gap:13px;padding:12px 17px}
.members-link .line-icon{width:20px;height:20px;stroke:#405875}
.current-folder-icon{width:35px;height:35px;display:inline-flex;align-items:center;justify-content:center;flex:none}
.current-folder-icon .title-icon{width:33px;height:33px}
.current-folder-emoji{font-size:30px;line-height:1}
.current-folder-image{width:34px;height:34px;object-fit:cover;border-radius:7px}
@media(max-width:760px){.nav-members-divider{display:none}}

/* v1.2: compact auto-collapsing tree and anchored members link */
@media (min-width:761px){
  .shell{height:calc(100dvh - 24px);min-height:620px;}
  aside{display:flex;flex-direction:column;min-height:0;overflow:hidden;}
  aside .brand{flex:none;}
  aside nav{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;}
  aside nav>a:not(.members-link),aside .tree-heading{flex:none;}
  .folder-tree{flex:1;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#d8e3ef transparent;}
  .nav-members-divider{flex:none;margin:10px 14px 8px;}
  nav>a.members-link{flex:none;margin:0 0 6px;}
  aside .bottom{position:static;flex:none;margin:14px 16px 0;max-width:none;}
  main{overflow:auto;min-height:0;}
}
.tree-line{min-height:27px;gap:0}
.tree-link{font-size:13px;padding:4px 3px;gap:7px;line-height:1.35}
.tree-toggle{width:20px;padding:2px;font-size:13px}
.tree-children{margin-left:9px;padding-left:5px}
.tree-icon,.tree-link .line-icon{width:17px;height:17px}
.tree-heading{margin-top:16px;margin-bottom:7px}
@media(max-width:760px){.folder-tree{max-height:210px;overflow:auto}}

/* v1.3: consistent bold chevrons and readable search icon */
.tree-toggle{display:inline-flex;align-items:center;justify-content:center;}
.tree-chevron{display:block;width:17px;height:17px;fill:none;stroke:#71859c;stroke-width:3.4;stroke-linecap:square;stroke-linejoin:miter;transition:transform .15s ease;flex:none;}
.tree-toggle.is-expanded .tree-chevron{transform:rotate(90deg);}
header .search .search-icon{width:21px;height:21px;flex:none;fill:none;stroke:#536983;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;}

/* v1.4: refined tree, document actions, and file gallery */
.tree-chevron{width:12px;height:12px;stroke-width:3;}
.tree-children{position:relative;border-left:0!important;}
.tree-children:not([hidden])::before{content:"";position:absolute;top:0;bottom:14px;left:-1px;border-left:1px solid #e5ecf4;pointer-events:none;}
.document-row[data-preview-url]{cursor:pointer}.document-row[data-preview-url]:hover{background:#f7fbff}.document-row:focus-visible{outline:2px solid #2589ee;outline-offset:-2px}
.document-name{font-weight:500}.document-table td{vertical-align:middle}.document-table .file-controls{white-space:nowrap;text-align:right;width:92px}.document-table .file-controls-heading{width:92px}.file-controls .inline{margin:0 0 0 6px}.file-icon-action,.file-controls button.file-icon-action{display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;color:#627a93;padding:7px;border-radius:7px;cursor:pointer;vertical-align:middle}.file-icon-action:hover,.file-controls button.file-icon-action:hover{background:#eaf3fc;color:#1975ce}.file-icon-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.file-controls button.delete-file{color:#d14b56}.file-controls button.delete-file:hover{background:#fff0f1;color:#bb2635}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.preview-stage{height:calc(100% - 64px);display:flex;align-items:stretch;background:#f2f5f9}.preview-stage .preview-content{height:100%;min-width:0;flex:1}.preview-arrow{flex:none;align-self:center;border-radius:50%;width:36px;height:36px;margin:8px;padding:0;font-size:30px;line-height:1;background:#fff;color:#304d6c;box-shadow:0 1px 8px #1c355522}.preview-arrow:disabled{opacity:.2;cursor:default}.preview-toolbar-actions{display:flex;align-items:center;gap:15px}#preview-counter{font-size:12px;color:#647991;white-space:nowrap}
@media(max-width:760px){.document-table{min-width:660px}.preview-arrow{width:28px;height:28px;margin:4px;font-size:23px}.preview-toolbar-actions{gap:8px}}

/* v1.5: edge-to-edge preview, with only the title bar retained */
.file-preview{overflow:hidden;padding:0!important}
.file-preview .preview-toolbar{height:64px;box-sizing:border-box}
.file-preview .preview-stage{height:calc(100% - 64px);position:relative;display:block;overflow:hidden}
.file-preview .preview-content{width:100%;height:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:center;overflow:auto;background:#17202c}
.file-preview .preview-content img,.file-preview .preview-content video{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
.file-preview .preview-content iframe{width:100%;height:100%;border:0;background:white}
.file-preview .preview-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:2;margin:0;opacity:.9}
.file-preview #preview-prev{left:12px}.file-preview #preview-next{right:12px}
.file-preview .preview-arrow:disabled{opacity:.2}
.preview-download-icon{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;color:#304d6c!important;text-decoration:none!important}
.preview-download-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.preview-document{background:white;color:#23364b;align-self:stretch;width:100%;box-sizing:border-box;overflow:auto;padding:30px 40px;white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;text-align:left}
.preview-message{color:white;padding:30px;text-align:center}

/* Bulk selection: unobtrusive and consistent with document list */
.bulk-check-cell{width:42px!important;padding-right:3px!important;text-align:center}.bulk-check-cell input{appearance:auto;width:16px;height:16px;margin:0;accent-color:#237cd4;cursor:pointer}.bulk-toolbar{display:flex;align-items:center;gap:10px;padding:10px 12px;margin:0 0 10px;background:#f1f6fb;border-radius:10px;color:#254362;font-size:13px}.bulk-toolbar[hidden]{display:none}.bulk-spacer{flex:1}.bulk-toolbar button{font-size:13px;padding:8px 11px;border-radius:7px}.bulk-toolbar .bulk-action{background:#fff;color:#365b7e;border:1px solid #d8e5f0}.bulk-toolbar .bulk-clear{background:transparent;color:#57718b;font-size:20px;padding:3px 9px}.bulk-toolbar .bulk-trash{background:transparent;color:#cb3c4b;padding:7px}.bulk-trash svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.document-row.bulk-selected{background:#f2f8ff}.bulk-move-dialog{max-width:420px}

/* v1.7: compact view switch, forgiving selection target, thumbnail grid */
.documents-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.documents-heading .sectionhead{margin:28px 0 14px}.view-switch{display:flex;gap:3px;background:#f2f6fa;border:1px solid #e5ecf3;padding:3px;border-radius:10px}.view-switch-button{display:grid;place-items:center;background:transparent;color:#62758a;padding:6px;border-radius:7px;width:35px;height:33px}.view-switch-button[aria-pressed="true"]{background:white;color:#2375c4;box-shadow:0 1px 4px #263d5418}.view-switch-button svg,.grid-download svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#documents-grid[hidden],#documents-list[hidden]{display:none!important}
.document-table .bulk-check-cell{min-width:50px;width:50px!important;padding:0!important;cursor:pointer}.document-table tbody .bulk-check-cell:hover{background:#eaf3fd}.document-table .bulk-check-cell input{width:18px;height:18px;margin:auto;pointer-events:auto;cursor:pointer}
.documents-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:14px}.document-card{border:1px solid #e1e9f1;border-radius:12px;overflow:hidden;cursor:pointer;min-width:0;background:white}.document-card:hover{border-color:#a8c7e7;box-shadow:0 3px 12px #23466b12}.document-card.bulk-selected{border-color:#4a96dd;background:#f2f8ff;box-shadow:0 0 0 1px #4a96dd}.document-card:focus-visible{outline:2px solid #237bd1;outline-offset:2px}.document-card-thumb{height:145px;background:#f4f7fa;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}.document-card-thumb>img,.document-card-thumb>video{width:100%;height:100%;object-fit:contain}.document-card-thumb>iframe{width:100%;height:100%;border:0;pointer-events:none}.document-card-thumb>svg{width:48px;height:48px;fill:none;stroke:#91a6bc;stroke-width:1.2}.card-video-symbol{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#192c4599;color:white;border-radius:50%;height:40px;width:40px;display:grid;place-items:center;font-size:15px}.document-card-footer{display:flex;align-items:center;gap:6px;padding:7px 9px;min-height:52px}.grid-check-hit{display:grid;place-items:center;flex:0 0 36px;height:40px;cursor:pointer}.grid-check{appearance:auto!important;width:17px!important;height:17px!important;margin:0!important;accent-color:#237cd4}.document-card-name{min-width:0;flex:1;font-size:12px;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.grid-download{display:grid;place-items:center;flex:0 0 30px;height:36px;color:#536e8a;text-decoration:none;border-radius:7px}.grid-download:hover{background:#e6f1fb;color:#2077c5}@media(max-width:760px){.documents-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.document-card-thumb{height:120px}}

/* v1.8 – brand, members editor */
.brand{display:flex;align-items:center;gap:10px;margin:0 10px 28px;white-space:nowrap}
.brand .brand-drive-icon{width:30px;height:30px;flex:none;color:#53749c}
.brand .brand-drive-name{font-size:23px!important;font-weight:300!important;letter-spacing:-.7px;line-height:1.2;color:#53749c!important}
.bottom{font-size:0!important}
.bottom small{font-size:12px!important}
.members-page .members-heading{margin-bottom:22px}
.members-page .members-heading h1{margin-bottom:6px}
.members-table .edit-member-cell{width:55px;text-align:right}
.edit-member-button{background:transparent;border:0;color:#59718b;padding:9px;display:inline-flex;align-items:center;justify-content:center}
.edit-member-button:hover{background:#eef5fc}
.member-dialog-actions{display:flex;justify-content:flex-end;gap:10px}
.member-dialog-actions .member-cancel{background:#edf2f7;color:#465c75}
@media(max-width:760px){.brand .brand-drive-name{font-size:21px!important}}

/* v2.0: compact, predictable document rows */
.document-table{width:100%;table-layout:fixed;border-collapse:collapse}
.document-table th,.document-table td{box-sizing:border-box;vertical-align:middle}
.document-table th:nth-child(1),.document-table td:nth-child(1){width:54px}
.document-table th:nth-child(2),.document-table td:nth-child(2){width:auto}
.document-table th:nth-child(3),.document-table td:nth-child(3){width:148px}
.document-table th:nth-child(4),.document-table td:nth-child(4){width:118px}
.document-table th:nth-child(5),.document-table td:nth-child(5){width:90px}
.document-table th:nth-child(6),.document-table td:nth-child(6){width:92px}
.document-table tbody tr{height:54px}
.document-table tbody td{height:54px;padding-top:6px!important;padding-bottom:6px!important;line-height:1.25}
.document-table tbody td:nth-child(2){overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.document-table .document-name{display:inline-block;vertical-align:middle;max-width:calc(100% - 49px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:28px}

.document-table .filetype-icon svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
.document-table .bulk-check-cell{padding-left:12px!important;padding-right:4px!important}
.brand .brand-drive-icon{width:28px;height:28px;flex:none;stroke:none}
@media(max-width:1000px){.document-table th:nth-child(4),.document-table td:nth-child(4){width:100px}.document-table th:nth-child(3),.document-table td:nth-child(3){width:125px}.document-table th:nth-child(5),.document-table td:nth-child(5){width:78px}}

/* v2.1 */
.brand .brand-cloud-image{display:block;width:37px;height:37px;flex:none;object-fit:contain}
.document-table th:nth-child(5),.document-table td:nth-child(5){white-space:nowrap;text-align:right;width:105px}
.preview-file-info{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.preview-file-info #preview-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.preview-file-info .preview-size{font-size:12px;color:#708299;white-space:nowrap}
.preview-toolbar-actions{flex:none}
@media(max-width:1000px){.document-table th:nth-child(5),.document-table td:nth-child(5){width:90px}}

/* v2.2: consistent preview toolbar */
.file-preview .preview-toolbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important;min-height:66px!important;height:auto!important;padding:10px 22px!important;text-align:left!important}
.file-preview .preview-file-info{display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;flex:1 1 auto!important;min-width:0!important;text-align:left!important;gap:3px!important;margin:0!important}
.file-preview .preview-file-info strong{display:block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;text-align:left!important;margin:0!important}
.file-preview .preview-file-info .preview-size{display:block!important;text-align:left!important;margin:0!important}
.file-preview .preview-toolbar-actions{display:flex!important;align-items:center!important;gap:18px!important;flex:0 0 auto!important;margin:0!important}

/* v2.3: structured spreadsheet and slide previews */
.structured-preview{background:#fff;align-self:stretch;width:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;color:#26384b}
.sheet-tabs{display:flex;gap:3px;padding:10px 14px 0;border-bottom:1px solid #dce4eb;flex:none;overflow-x:auto}
.sheet-tab{border:1px solid #dce4eb;border-bottom:0;background:#f4f7fa;padding:8px 16px;border-radius:7px 7px 0 0;cursor:pointer;color:#546779;white-space:nowrap}
.sheet-tab.active{background:#fff;color:#185da5;font-weight:600}
.sheet-viewport{overflow:auto;flex:1;min-height:0}
.sheet-table{border-collapse:separate;border-spacing:0;font:12px/1.5 system-ui,sans-serif;white-space:nowrap}
.sheet-table td,.sheet-table th{border-right:1px solid #e2e7ec;border-bottom:1px solid #e2e7ec;padding:6px 11px;max-width:310px;min-width:80px;overflow:hidden;text-overflow:ellipsis;text-align:left}
.sheet-table thead th{position:sticky;top:0;background:#f3f6f9;z-index:2;text-align:center;color:#5c6e80;font-weight:600}
.sheet-table tbody th{position:sticky;left:0;background:#f3f6f9;z-index:1;min-width:45px;width:45px;text-align:center;color:#718092;font-weight:500}
.sheet-table thead th:first-child{left:0;z-index:3;min-width:45px;width:45px}
.sheet-table tbody tr:first-child td{font-weight:600;background:#fbfcfd}
.preview-note{padding:8px 16px;color:#728297;font-size:11px;border-top:1px solid #e9edf1;flex:none}
.slide-controls{display:flex;align-items:center;justify-content:center;gap:20px;padding:10px;border-bottom:1px solid #e9edf1;flex:none;font-size:13px}
.slide-controls button{background:#f4f7fa;border:1px solid #e0e6ec;border-radius:6px;padding:6px 12px;cursor:pointer}
.slide-controls button:disabled{opacity:.4;cursor:default}
.slide-stage{position:relative;max-height:calc(100% - 110px);max-width:calc(100% - 36px);width:auto;min-height:0;margin:auto;overflow:hidden;background:white;border:1px solid #dce4eb;box-shadow:0 4px 18px #20354b15;flex:0 1 auto;align-self:center;object-fit:contain}
.slide-item{position:absolute;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;font:clamp(8px,1.3vw,19px)/1.25 Arial,sans-serif;color:#1d2d3d}
.slide-item.image{object-fit:contain}

/* v2.4: ensure the PowerPoint slide canvas has a real width and height.
   The previous width:auto + flex sizing could collapse the slide to 0px. */
.file-preview .structured-preview .slide-stage{
  box-sizing:border-box;
  width:min(calc(100% - 96px), calc((100dvh - 270px) * var(--slide-ratio, 1.7777778)));
  height:auto;
  aspect-ratio:var(--slide-ratio, 16 / 9);
  max-width:calc(100% - 96px);
  max-height:calc(100% - 110px);
  min-width:0;
  min-height:0;
  flex:none;
  margin:auto;
  background:#fff;
}
@media(max-width:650px){
 .file-preview .structured-preview .slide-stage{width:calc(100% - 32px);max-width:calc(100% - 32px)}
}

/* v3.0 – unified responsive navigation and secure sign-in */
.login-v3,.public-v3{min-height:100vh;background:#e5eff8;display:grid;place-items:center;padding:24px;font-family:inherit}.login-card,.public-card{background:white;width:min(100%,440px);padding:38px;border-radius:24px;box-shadow:0 16px 50px rgba(48,81,118,.13);color:#24394f}.login-card{text-align:center}.login-card>img{width:82px;height:auto;object-fit:contain}.login-card h1{font-size:25px;margin:10px 0}.login-card p{color:#73859b}.login-card form,.account-form{display:grid;gap:16px;text-align:left;margin:26px 0}.login-card label,.account-form label{display:grid;gap:6px;font-size:13px;font-weight:600}.login-card input,.account-form input{width:100%;border:1px solid #d6e0e9;border-radius:11px;padding:13px;font:inherit}.login-card button,.account-form button{border-radius:11px;padding:13px;cursor:pointer}.login-card small{color:#8997a6}.login-error{color:#a33!important}.public-card{width:min(100%,750px)}.public-card header{display:flex;align-items:center;gap:12px}.public-card header img{width:48px}.public-card header span{margin-left:auto;color:#8794a4}.public-card h1{margin:24px 0 14px}.public-items{display:grid;gap:7px}.public-items a{display:flex;align-items:center;gap:14px;padding:15px;text-decoration:none;color:#29445c;border:1px solid #e7edf3;border-radius:12px}.public-items a b{flex:1;overflow-wrap:anywhere}.public-crumbs{margin-top:22px}.public-note{color:#8997a6;font-size:13px}.share-create{margin-bottom:18px;border:1px solid #dbe5ee;border-radius:12px;padding:12px}.share-create summary{cursor:pointer;display:flex;gap:9px;align-items:center}.share-create form{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.share-create select{max-width:100%;min-width:130px}.share-output{display:flex;gap:10px}.share-output input{flex:1;min-width:0}.mobile-top,.mobile-nav{display:none}.shell aside i[data-lucide],.tree-heading i[data-lucide]{width:17px;height:17px;vertical-align:middle}.folder-access-dialog,.folder-access-toggle{display:none!important}
@media(max-width:760px){body:not(.login-v3):not(.public-v3){overflow-x:hidden}.mobile-top{height:60px;display:flex;align-items:center;gap:10px;padding:8px 16px;background:#fff;border-bottom:1px solid #e5edf5;position:sticky;top:0;z-index:70;color:#29435a}.mobile-top img{width:38px;height:38px;object-fit:contain}.mobile-top button{background:none;border:0;padding:8px;display:grid;place-items:center}.mobile-top svg{width:22px}.shell{display:block!important;width:100%!important;min-width:0!important}.shell>aside{position:fixed!important;z-index:90!important;top:60px!important;bottom:65px!important;left:0!important;width:min(85vw,320px)!important;transform:translateX(-110%);transition:transform .2s ease;overflow-y:auto;box-shadow:8px 0 25px #172d4522}.shell>aside.mobile-open{transform:translateX(0)}.shell>main{margin:0!important;width:100%!important;min-width:0!important;padding-bottom:85px!important}.shell main header{padding:10px 14px!important;flex-wrap:wrap}.search{min-width:0!important;width:100%!important}.search input{min-width:0!important;width:100%!important}.page{padding:14px!important;max-width:100%!important}.top{flex-wrap:wrap!important}.title-line{flex-wrap:wrap!important}.tablewrap{overflow-x:auto}.mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:80;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:white;border-top:1px solid #e0e9f1;padding:9px 3px max(10px,env(safe-area-inset-bottom));box-shadow:0 -3px 18px #253b5110}.mobile-nav a,.mobile-nav button{display:flex;flex-direction:column;align-items:center;gap:4px;font:inherit;font-size:10px;color:#58738b;text-decoration:none;background:none;border:0;padding:4px 0}.mobile-nav svg{width:21px;height:21px;}.document-row{min-width:0!important}.document-row .filename{overflow:hidden;text-overflow:ellipsis}.preview-modal,.preview-dialog{max-width:100vw!important}.share-create form>*{flex:1;min-width:120px}}
/* v3.1: responsive containment and per-item sharing */
.folder-share-action{display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;color:#587a9b;border-radius:9px;min-width:34px;min-height:34px;cursor:pointer;align-self:center;flex:none}
.folder-share-action svg,.share-trigger svg{width:18px;height:18px;}
.folders>.folder{min-width:0;flex:1 1 auto}
.folders{min-width:0}
.file-controls .share-trigger{display:inline-flex;align-items:center;justify-content:center}
.share-dialog{border:1px solid #dce5ee;border-radius:18px;box-shadow:0 22px 70px #1b35524d;padding:26px;width:min(440px,calc(100vw - 32px));max-width:calc(100vw - 32px);color:#29445c}
.share-dialog::backdrop{background:#172e4680}.share-dialog h2{margin:0 0 12px}.share-dialog p{overflow-wrap:anywhere}.share-dialog-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-top:24px}.share-dialog-actions button{padding:11px 14px;border-radius:10px;cursor:pointer}
#preview-share{display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;color:inherit;cursor:pointer}
@media(max-width:760px){
 html,body{max-width:100%;overflow-x:clip!important}
 .shell,.shell>main,.page,.top,.title-line,.documents-heading,.folders,.tablewrap,.document-table,.documents-grid{box-sizing:border-box;max-width:100%;min-width:0}
 .shell>main{overflow-x:clip!important}
 .page{overflow-x:clip!important}
 .tablewrap{width:100%;overflow-x:auto;overscroll-behavior-x:contain}
 .document-table{max-width:none;width:max-content;min-width:100%}
 .documents-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .document-card{min-width:0;max-width:100%;overflow:hidden}
 .document-card-footer{min-width:0}.document-card-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .mobile-nav{left:max(14px,env(safe-area-inset-left))!important;right:max(14px,env(safe-area-inset-right))!important;bottom:max(10px,env(safe-area-inset-bottom))!important;width:auto!important;box-sizing:border-box;grid-template-columns:repeat(5,minmax(0,1fr));border:1px solid #dfe8f0;border-radius:17px;padding:9px 7px!important;box-shadow:0 5px 24px #203b5429}
 .mobile-nav a,.mobile-nav button{min-width:0;overflow:hidden;font-size:10px;padding:5px 1px!important;white-space:nowrap}
 .shell>main{padding-bottom:105px!important}
 .file-preview{max-width:calc(100vw - 16px)!important}
 .preview-toolbar{padding:10px!important;gap:7px!important}.preview-toolbar-actions{gap:10px!important}
}

/* v3.2 – unified mobile navigation and left-aligned branding */
@media(max-width:760px){
 .mobile-top{justify-content:flex-start!important;text-align:left!important;width:100%;min-width:0;box-sizing:border-box;padding-inline:max(18px,env(safe-area-inset-left)) max(18px,env(safe-area-inset-right))!important}
 .mobile-top img{flex:0 0 38px;margin:0!important}
 .mobile-top b{flex:1;min-width:0;text-align:left!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:17px;font-weight:500;color:#53749c}
 .mobile-top #mobile-menu-button{margin-left:auto;flex:0 0 auto;color:#53749c}
 .mobile-nav{grid-template-columns:repeat(4,minmax(0,1fr))!important;padding-inline:12px!important;left:max(18px,env(safe-area-inset-left))!important;right:max(18px,env(safe-area-inset-right))!important}
 .mobile-nav a,.mobile-nav button{overflow:visible!important}
}

/* v3.3: mobile bottom-sheet search, no top search bar */
.mobile-search-overlay[hidden]{display:none!important}
@media(max-width:760px){
 .shell main>header .search{display:none!important}
 .shell main>header{justify-content:flex-end!important;min-height:0;padding-top:4px!important;padding-bottom:4px!important}
 body.mobile-search-open{overflow:hidden!important}
 .mobile-search-overlay{position:fixed;inset:0;z-index:300;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}
 .mobile-search-backdrop{position:absolute;inset:0;border:0;background:rgba(21,37,56,.48);width:100%;height:100%;padding:0;cursor:default}
 .mobile-search-sheet{position:relative;z-index:1;box-sizing:border-box;background:#fff;width:100%;max-width:100%;height:min(72dvh,640px);min-height:260px;border-radius:22px 22px 0 0;box-shadow:0 -8px 45px #142a4440;padding:8px max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:13px;animation:search-slide-in .2s ease-out;overflow:hidden}
 .mobile-search-grabber{width:42px;height:5px;background:#d4dfe9;border-radius:20px;align-self:center;margin:2px 0 4px;touch-action:pan-y}
 .mobile-search-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
 .mobile-search-heading h2{margin:0;font-size:21px;font-weight:600;color:#29445c}
 .mobile-search-heading button{border:0;background:#f1f5f9;border-radius:10px;display:grid;place-items:center;width:38px;height:38px;color:#58738b}
 #mobile-search-form{display:flex;align-items:center;gap:10px;background:#f0f4f8;border:1px solid #dfe8f0;border-radius:13px;padding:4px 10px;flex:none;min-height:50px;box-sizing:border-box}
 #mobile-search-form>svg{width:20px;height:20px;color:#67849e;flex:none}
 #mobile-search-input{font:inherit;font-size:16px;min-width:0;width:100%;flex:1;border:0;outline:0;background:transparent;color:#29445c;padding:8px 0;box-shadow:none}
 #mobile-search-form button{border:0;background:none;color:#53749c;display:grid;place-items:center;padding:7px}
 .mobile-search-results{min-height:0;overflow:auto;overscroll-behavior:contain;flex:1;padding-bottom:8px}
 .mobile-search-hint,.mobile-search-result-count{font-size:13px;color:#8192a3;margin:8px 3px 14px}
 .mobile-search-result{display:flex;align-items:center;gap:11px;text-decoration:none;color:#29445c;padding:11px 3px;border-bottom:1px solid #edf1f5;min-height:45px;box-sizing:border-box}
 .mobile-search-result>span:nth-child(2){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
 .mobile-search-result>svg{width:16px;height:16px;color:#a1afbc;flex:none}
 .mobile-search-result-icon{width:34px;height:34px;border-radius:9px;background:#f1f5f9;display:grid;place-items:center;flex:none}
 .mobile-search-result-icon svg{width:18px;height:18px;color:#6482a0}
 @keyframes search-slide-in{from{transform:translateY(25px);opacity:.7}to{transform:translateY(0);opacity:1}}
 @media(prefers-reduced-motion:reduce){.mobile-search-sheet{animation:none}}
}

/* v3.4 – compact actions and genuinely contained mobile layout */
.file-controls .share-trigger,.document-card .share-trigger,#preview-share{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;padding:5px!important;box-sizing:border-box!important;flex:0 0 30px!important}
.file-controls .share-trigger svg,.document-card .share-trigger svg,#preview-share svg{width:16px!important;height:16px!important;max-width:16px!important;max-height:16px!important;}
@media(max-width:760px){
 html{width:100%;max-width:100%;overflow-x:hidden!important}
 body:not(.login-v3):not(.public-v3){width:100%;max-width:100%;overflow-x:hidden!important;margin:0!important}
 .mobile-top{width:100%;max-width:100%;overflow:hidden!important}
 .mobile-top b{flex:1 1 auto!important}
 .shell{width:100%!important;max-width:100%!important;overflow:hidden!important;display:block!important}
 .shell>aside{display:none!important}
 .shell>main{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;box-sizing:border-box!important}
 .page{width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;box-sizing:border-box!important;padding-inline:16px!important}
 .page>*,.top,.title-line,.documents-heading,.folders,.documents-grid,.breadcrumbs,.primary-actions{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
 .top,.title-line,.documents-heading,.primary-actions{flex-wrap:wrap!important}
 .breadcrumbs{flex-wrap:wrap!important;overflow-wrap:anywhere}
 .folders{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}
 .folders .folder{min-width:0!important;max-width:100%!important;overflow:hidden!important}
 .folders .folder strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
 .tablewrap{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden;overscroll-behavior-x:contain!important;-webkit-overflow-scrolling:touch}
 .document-table{width:max-content!important;min-width:660px!important;max-width:none!important}
 .mobile-nav{left:max(22px,env(safe-area-inset-left))!important;right:max(22px,env(safe-area-inset-right))!important;width:auto!important;max-width:calc(100% - 44px)!important;overflow:hidden!important;box-sizing:border-box!important}
 .mobile-nav a,.mobile-nav button{min-width:0!important;max-width:100%!important}
 .mobile-search-overlay{max-width:100%!important}
}

/* v3.5: remove obsolete access UI and normalize icon alignment */
.folder-settings,#edit-access{display:none!important}
.shell aside nav>a{display:flex;align-items:center;gap:12px}
.shell aside nav>a>i,.shell aside nav>a>svg{display:block;flex:0 0 18px;width:18px;height:18px;}
.primary-actions .new-folder-btn,.primary-actions #upload-button{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.primary-actions .new-folder-btn>svg,.primary-actions #upload-button>svg{width:17px!important;height:17px!important;flex:none;display:block}
@media(max-width:760px){
 html{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
 body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;position:relative!important}
 .shell{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:clip!important}
 .shell>main{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:clip!important}
 .shell main>header,.page,.top,.documents-heading,.folders,.primary-actions{width:100%!important;max-width:100%!important;min-width:0!important}
 .page{overflow-x:clip!important}
 /* Native mobile file list: never require a desktop-width table. */
 #documents-list.tablewrap{width:100%!important;max-width:100%!important;overflow:visible!important;min-width:0!important}
 #documents-list .document-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
 #documents-list .document-table thead{display:none!important}
 #documents-list .document-table tbody{display:block!important;width:100%!important}
 #documents-list .document-table tr.document-row{display:flex!important;align-items:center;gap:8px;width:100%!important;min-width:0!important;max-width:100%!important;border-bottom:1px solid #edf1f5;padding:10px 5px}
 #documents-list .document-table tr.document-row>td{display:none!important}
 #documents-list .document-table tr.document-row>td:nth-child(1){display:flex!important;flex:0 0 23px!important;min-width:0!important;width:23px!important;padding:0!important}
 #documents-list .document-table tr.document-row>td:nth-child(2){display:flex!important;align-items:center;gap:9px;flex:1 1 0!important;min-width:0!important;width:0!important;padding:0!important;overflow:hidden!important}
 #documents-list .document-table tr.document-row>td:nth-child(2) .fileicon{flex:none}
 #documents-list .document-table tr.document-row>td:nth-child(2) .document-name{display:block;flex:1;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
 #documents-list .document-table tr.document-row>td.file-controls{display:flex!important;align-items:center;justify-content:flex-end;gap:2px;flex:0 0 auto!important;min-width:0!important;width:auto!important;max-width:112px!important;padding:0!important;white-space:nowrap}
 #documents-list .file-controls .file-icon-action{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;margin:0!important;padding:5px!important;display:inline-flex;align-items:center;justify-content:center}
 #documents-list .file-controls .inline{margin:0!important}
 .mobile-nav{max-width:calc(100vw - 44px)!important}
}

/* v3.6: route-aware navigation and consistent folder heading */
.shell aside nav .tree-heading{display:flex;align-items:center;gap:12px;font-size:15px;font-weight:400;letter-spacing:normal;text-transform:none;color:#53657b;padding:12px 17px;margin:3px 0;border-radius:11px;line-height:1.3}
.shell aside nav .tree-heading>svg{display:block;width:18px;height:18px;flex:0 0 18px;}
.shell aside nav .tree-heading.active{background:#e8f3ff;color:#1674d4}
.shell aside nav>a.active{background:#e8f3ff;color:#1674d4}
.shell aside .folder-tree .tree-link.selected{background:#e8f3ff;color:#1674d4;border-radius:7px}
.mobile-nav a.active{color:#1674d4!important;font-weight:650}

/* v3.7: One unified hover/selection surface for folder tree rows.
   The link used to paint its own selected pill inside the hovered row,
   creating a visibly doubled highlight. */
.shell aside .folder-tree .tree-line{
  border-radius:9px;
  outline:none;
  transition:background-color .12s ease;
}
.shell aside .folder-tree .tree-line:hover{
  background:#f1f6fc!important;
  outline:none!important;
}
.shell aside .folder-tree .tree-line:has(> .tree-link.selected),
.shell aside .folder-tree .tree-line:has(> .tree-link.selected):hover{
  background:#e8f3ff!important;
  outline:none!important;
}
.shell aside .folder-tree .tree-line > .tree-link.selected,
.shell aside .folder-tree .tree-line > .tree-link.selected:hover{
  background:transparent!important;
  border-radius:0;
  color:#1674d4;
}

/* v3.8: Only the row paints a highlight; the inner link never does.
   Explicit server-side class avoids relying on :has() support. */
.shell aside .folder-tree .tree-line.is-current,
.shell aside .folder-tree .tree-line.is-current:hover {background:#e8f3ff!important;outline:0!important;box-shadow:none!important}
.shell aside .folder-tree .tree-line:not(.is-current):hover {background:#f1f6fc!important;outline:0!important;box-shadow:none!important}
.shell aside .folder-tree .tree-line .tree-link,
.shell aside .folder-tree .tree-line .tree-link.selected,
.shell aside .folder-tree .tree-line .tree-link:hover,
.shell aside .folder-tree .tree-line .tree-link.selected:hover {background:none!important;background-color:transparent!important;box-shadow:none!important;outline:0!important;border-radius:0!important}
.shell aside .folder-tree .tree-line.is-current .tree-link {color:#1674d4!important;font-weight:650}

/* v3.9 unified navigation, search button, themes */
.brand,.mobile-brand{text-decoration:none!important}.brand{cursor:pointer}.mobile-brand{display:inline-flex;align-items:center;gap:10px;color:inherit;min-width:0}.mobile-brand b{white-space:nowrap}
@media(min-width:761px){header .search{display:flex;align-items:center;gap:10px}header .search input{flex:1;min-width:0;margin:0;background:transparent;border:0;box-shadow:none}header .search button{display:inline-flex!important;align-items:center;justify-content:center;background:#e4effa!important;border:1px solid #b9d5ef!important;color:#27669d!important;padding:9px 17px!important;border-radius:9px!important;font-size:13px!important;font-weight:650!important;min-width:72px}}
/* The whole folder tree is a single blue area; no individual row paint. */
.shell aside .folder-tree.tree-active{background:#e8f3ff!important;border-radius:10px;padding-top:5px;padding-bottom:5px}
.shell aside .folder-tree.tree-active .tree-line,.shell aside .folder-tree.tree-active .tree-line:hover,.shell aside .folder-tree.tree-active .tree-link,.shell aside .folder-tree.tree-active .tree-link:hover,.shell aside .folder-tree.tree-active .tree-link.selected{background:transparent!important;background-color:transparent!important;box-shadow:none!important;outline:none!important;color:#37628d!important}
.shell aside .folder-tree.tree-active .tree-line.is-current .tree-link{font-weight:750!important;color:#1d5e9c!important}
.theme-settings{display:flex;flex-wrap:wrap;gap:10px 22px;border:1px solid #e1e8f0;border-radius:12px;padding:14px 18px;max-width:520px;margin:14px 0 28px}.theme-settings label{display:flex;align-items:center;gap:7px;cursor:pointer}.theme-settings input{width:auto;margin:0;accent-color:#267cc6}
html[data-theme="dark"]{color-scheme:dark;background:#101923;color:#dce6f1}
html[data-theme="dark"] body{background:#101923;color:#dce6f1}
html[data-theme="dark"] .shell,html[data-theme="dark"] .mobile-top,html[data-theme="dark"] .mobile-nav{background:#172433;color:#dce6f1;box-shadow:0 8px 35px #0003}
html[data-theme="dark"] aside,html[data-theme="dark"] header,html[data-theme="dark"] .mobile-top,html[data-theme="dark"] .mobile-nav{border-color:#2a3b4e}
html[data-theme="dark"] .brand .brand-drive-name,html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] .mobile-top,html[data-theme="dark"] .title-line,html[data-theme="dark"] .document-name{color:#e5eef8!important}
html[data-theme="dark"] nav a,html[data-theme="dark"] .tree-heading,html[data-theme="dark"] .tree-link,html[data-theme="dark"] .mobile-nav a,html[data-theme="dark"] .mobile-nav button{color:#aabed1}
html[data-theme="dark"] nav a.active,html[data-theme="dark"] nav a:hover,html[data-theme="dark"] .tree-heading.active{background:#263e59!important;color:#9acbff!important}
html[data-theme="dark"] .folder-tree.tree-active{background:#233c57!important}
html[data-theme="dark"] .folder-tree.tree-active .tree-line,html[data-theme="dark"] .folder-tree.tree-active .tree-line:hover,html[data-theme="dark"] .folder-tree.tree-active .tree-link,html[data-theme="dark"] .folder-tree.tree-active .tree-link:hover{background:transparent!important;color:#b5d2ed!important}
html[data-theme="dark"] .folder-tree.tree-active .tree-line.is-current .tree-link{color:#e0f1ff!important}
html[data-theme="dark"] .folder,html[data-theme="dark"] .tablewrap,html[data-theme="dark"] .share-create,html[data-theme="dark"] .theme-settings{background:#1c2c3e;border-color:#35495d;color:#dce6f1}
html[data-theme="dark"] .folder-art,html[data-theme="dark"] .fileicon,html[data-theme="dark"] .mobile-search-result-icon{color:#a7d2ff}
html[data-theme="dark"] th,html[data-theme="dark"] .tablewrap th{background:#24374b;color:#b2c5d9}
html[data-theme="dark"] td,html[data-theme="dark"] th,html[data-theme="dark"] tr.document-row{border-color:#34485c!important;color:#dce6f1}
html[data-theme="dark"] a{color:#9bcaff}
html[data-theme="dark"] .muted,html[data-theme="dark"] small,html[data-theme="dark"] .breadcrumbs{color:#a1b5c9}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] .search,html[data-theme="dark"] .mobile-search-sheet,html[data-theme="dark"] .mobile-search-form{background:#22354a!important;color:#e7f0fa!important;border-color:#3a5167!important}
html[data-theme="dark"] input::placeholder{color:#a0b3c6}
html[data-theme="dark"] dialog,html[data-theme="dark"] .folder-menu,html[data-theme="dark"] .preview-modal,html[data-theme="dark"] .preview-dialog,html[data-theme="dark"] .login-card,html[data-theme="dark"] .public-card{background:#1b2b3d!important;color:#e4edf8!important;border-color:#354b60!important}
html[data-theme="dark"] .folder-menu button{background:#1b2b3d!important;color:#dce6f1!important}
html[data-theme="dark"] .folder-menu button:hover{background:#2b435c!important}
html[data-theme="dark"] .login-v3,html[data-theme="dark"] .public-v3{background:#101923!important}
html[data-theme="dark"] .login-card h1,html[data-theme="dark"] .login-card label,html[data-theme="dark"] .public-card h1{color:#e4edf8!important}
html[data-theme="dark"] .login-card p,html[data-theme="dark"] .login-card small{color:#afc1d4}
html[data-theme="dark"] .flash{background:#273f59;color:#c4e1ff}
html[data-theme="dark"] .mobile-search-result{color:#dce6f1;border-color:#354b60}
html[data-theme="dark"] header .search button{background:#304d6b!important;color:#c4e1ff!important;border-color:#476788!important}

/* v4.0: cohesive folder selection, accessible dark surfaces, compact mobile header */
@media(min-width:761px){
 .shell aside nav .tree-group{flex:0 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden;border-radius:12px}
 .shell aside nav .tree-group .tree-heading{flex:0 0 auto;margin:0!important}
 .shell aside nav .tree-group .folder-tree{flex:0 1 auto;min-height:0;max-height:min(53vh,580px);overflow-y:auto;padding:0 4px 7px}
 .shell aside nav .tree-group.tree-active{background:#e8f3ff!important}
 .shell aside nav .tree-group.tree-active .tree-heading{background:transparent!important;color:#1674d4!important}
 .shell aside nav .tree-group.tree-active .tree-line,.shell aside nav .tree-group.tree-active .tree-line:hover,.shell aside nav .tree-group.tree-active .tree-link{background:transparent!important;box-shadow:none!important;outline:none!important;color:#37628d!important}
 .shell aside nav .tree-group.tree-active .tree-line.is-current .tree-link{font-weight:750!important;color:#1674d4!important}
}
html[data-theme="dark"] .shell aside nav .tree-group.tree-active{background:#263e59!important}
html[data-theme="dark"] .shell aside nav .tree-group.tree-active .tree-heading{background:transparent!important;color:#a6d4ff!important}
html[data-theme="dark"] .shell aside nav .tree-group.tree-active .tree-line,html[data-theme="dark"] .shell aside nav .tree-group.tree-active .tree-line:hover,html[data-theme="dark"] .shell aside nav .tree-group.tree-active .tree-link{background:transparent!important;color:#bbd3ea!important}
html[data-theme="dark"] .shell aside nav .tree-group.tree-active .tree-line.is-current .tree-link{color:#e5f2ff!important}
html[data-theme="dark"] .folder:hover{background:#263c52!important}
html[data-theme="dark"] .folder-actions .folder-settings-toggle,html[data-theme="dark"] .folder-actions:before{background:#2b4158!important;border-color:#415c75!important;color:#c4dcf3!important}
html[data-theme="dark"] .primary-actions .new-folder-btn,html[data-theme="dark"] .primary-actions button:not(.danger){background:#294762!important;color:#c8e4ff!important;border-color:#456985!important}
html[data-theme="dark"] .view-toggle,html[data-theme="dark"] .view-switch,html[data-theme="dark"] .view-controls,html[data-theme="dark"] .view-buttons{background:#263d54!important;border-color:#3a556e!important;color:#c4dcf3!important}
html[data-theme="dark"] .view-toggle button,html[data-theme="dark"] .view-switch button,html[data-theme="dark"] .view-controls button{background:transparent!important;color:#a9c7e5!important}
html[data-theme="dark"] .view-toggle button.active,html[data-theme="dark"] .view-switch button.active,html[data-theme="dark"] .view-controls button.active{background:#365979!important;color:#e8f4ff!important}
html[data-theme="dark"] .document-row:hover,html[data-theme="dark"] tr.document-row:hover{background:#294057!important}
html[data-theme="dark"] .mobile-nav a.active{background:#294762!important;color:#a9d4ff!important}
html[data-theme="dark"] .theme-settings input[type="radio"]{appearance:auto!important;accent-color:#38bdf8!important;background:transparent!important;border:0!important;box-shadow:none!important;width:19px!important;height:19px!important}
@media(max-width:760px){
 .mobile-top{height:76px!important;min-height:76px!important;display:flex!important;flex-wrap:nowrap!important;justify-content:space-between!important;align-items:center!important;gap:12px!important;padding:10px max(17px,env(safe-area-inset-right)) 10px max(17px,env(safe-area-inset-left))!important}
 .mobile-brand{flex:1 1 auto!important;min-width:0!important;display:flex!important;align-items:center!important;gap:12px!important;text-decoration:none!important}
 .mobile-brand img,.mobile-top img{width:54px!important;height:54px!important;flex:0 0 54px!important;object-fit:contain!important}
 .mobile-brand b,.mobile-top b{display:block!important;flex:1 1 auto!important;min-width:0!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.13!important;font-size:19px!important;font-weight:550!important;color:#3c5d7c!important;overflow-wrap:normal!important}
 html[data-theme="dark"] .mobile-brand b{color:#e1efff!important}
 .mobile-logout{display:block!important;flex:0 0 auto!important;margin:0!important}
 .mobile-logout button{background:transparent!important;border:0!important;padding:9px 0 9px 6px!important;color:#267bd0!important;font-size:13px!important;font-weight:650!important;white-space:nowrap!important}
 .shell main>header{display:none!important}
 .shell>aside{top:76px!important}
 .mobile-nav{bottom:calc(20px + env(safe-area-inset-bottom))!important;left:max(20px,env(safe-area-inset-left))!important;right:max(20px,env(safe-area-inset-right))!important;width:auto!important;max-width:none!important;border-radius:32px!important;padding:10px 10px!important;box-shadow:0 8px 30px #0002!important;overflow:hidden!important}
 .mobile-nav a,.mobile-nav button{border-radius:22px!important;min-height:57px!important}
 .shell>main{padding-bottom:calc(128px + env(safe-area-inset-bottom))!important}
 .tree-group{display:none!important}
}

/* v4.1 – enhetlig innehållslista och sortering */
.tree-heading[href]{text-decoration:none;display:flex;align-items:center;cursor:pointer}
.mixed-folder-link{display:inline-flex;align-items:center;gap:12px;text-decoration:none;color:inherit;font-weight:600;min-width:0}
.mixed-folder-link svg,.mixed-folder-card svg{width:21px;height:21px;stroke:currentColor;stroke-width:1.8;fill:none;flex-shrink:0}
.mixed-folder-row:hover{background:var(--hover-bg,rgba(73,133,190,.09))}
.sort-column{border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;cursor:pointer;display:inline-flex;align-items:center;gap:5px;padding:5px 0;white-space:nowrap}
.sort-column .sort-arrow{width:13px;height:13px;opacity:0;transition:transform .15s}
.sort-column.selected .sort-arrow{opacity:1}.sort-column:hover{color:#378bd8}
.mixed-folder-card{text-decoration:none;color:inherit}.mixed-folder-card .document-card-thumb{display:flex;align-items:center;justify-content:center}.mixed-folder-card .document-card-thumb svg{width:46px;height:46px}
.mobile-sort-bar{display:none}
@media(max-width:760px){.mobile-sort-bar{display:flex;align-items:center;gap:8px;margin:12px 0}.mobile-sort-bar label{font-size:13px;white-space:nowrap}.mobile-sort-bar select{flex:1;min-width:0;max-width:100%;border:1px solid #59718a;border-radius:9px;padding:9px;background:transparent;color:inherit}.mobile-sort-bar button{border:1px solid #59718a;border-radius:9px;background:transparent;color:inherit;padding:9px;display:flex}.mobile-sort-bar button.descending svg{transform:rotate(180deg)}.mixed-folder-row td:not(:nth-child(2)){display:none}.mixed-folder-row td:nth-child(2){padding:14px 8px}.mixed-folder-row .mixed-folder-link{font-size:14px}}

/* v4.2: consistent Lucide iconography, anchored sidebar actions and breadcrumbs */
@media(min-width:761px){
 .shell aside nav{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}
 .shell aside nav .tree-group{flex:0 1 auto!important;min-height:0!important;max-height:calc(100% - 185px)!important;overflow:hidden!important}
 .shell aside nav .tree-group .folder-tree{flex:0 1 auto!important;min-height:0!important;overflow-y:auto!important}
 .shell aside nav .nav-bottom-links{margin-top:auto!important;flex:0 0 auto!important;display:flex!important;flex-direction:column!important;padding-top:8px!important}
 .shell aside nav .nav-bottom-links .nav-members-divider{margin:4px 14px 10px!important}
 .shell aside nav .nav-bottom-links>a{display:flex!important;align-items:center!important;gap:12px!important;padding:12px 17px!important;margin:3px 0!important;border-radius:11px!important;font-size:15px!important;white-space:nowrap!important}
 .shell aside nav .nav-bottom-links>a svg{width:18px;height:18px;flex:0 0 18px;}
}
.folder-art,.folder-art:before,.folder-art:after{background:transparent!important;background-image:none!important;box-shadow:none!important;border:0!important}
.folder-art{width:30px!important;height:30px!important;display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 30px!important}
.folder-art>svg,.folder-art>i,.folder-art .line-icon{width:25px!important;height:25px!important;display:block!important}
html[data-theme="dark"] .folder-art{background:transparent!important}
.mixed-folder-link svg,.mixed-folder-link .line-icon,.mixed-folder-card svg{}
.tree-link svg,.tree-link .line-icon,.current-folder-icon svg,.current-folder-icon .line-icon{}
.breadcrumbs svg{width:14px;height:14px;flex-shrink:0}
.breadcrumbs:empty{display:none}
.folder-settings-toggle:before,.folder-actions:before{content:none!important;display:none!important}
.folder-settings-toggle{display:inline-flex!important;align-items:center!important;justify-content:center!important}
.folder-settings-toggle svg{width:18px;height:18px;}
html[data-theme="dark"] .folder-art,html[data-theme="dark"] .mixed-folder-card .document-card-thumb{background:transparent!important}
@media(max-width:760px){.nav-bottom-links{display:none!important}}

/* v4.3 — final consistency pass */
/* Keep the tree heading readable when the tree is not active. */
.shell aside nav .tree-group:not(.tree-active) .tree-heading,
html[data-theme="dark"] .shell aside nav .tree-group:not(.tree-active) .tree-heading{color:var(--sidebar-text,#b9cadb)!important;opacity:1!important}
html[data-theme="light"] .shell aside nav .tree-group:not(.tree-active) .tree-heading{color:#53657b!important}
/* Folder tree is one unified selected region, without nested pills. */
@media(min-width:761px){
.shell aside nav .tree-group.tree-active{background:#e8f3ff!important;border-radius:13px!important;max-height:none!important;overflow:visible!important}
.shell aside nav .tree-group.tree-active .folder-tree{max-height:min(53vh,580px)!important;overflow-y:auto!important}
.shell aside nav .tree-group.tree-active .tree-heading,.shell aside nav .tree-group.tree-active .tree-line,
.shell aside nav .tree-group.tree-active .tree-line:hover,.shell aside nav .tree-group.tree-active .tree-link,
.shell aside nav .tree-group.tree-active .tree-link.selected{background:transparent!important;box-shadow:none!important;outline:none!important}
html[data-theme="dark"] .shell aside nav .tree-group.tree-active{background:#263e59!important}
}
/* Consistent thin stroke-only Lucide icons; no icon tiles. */
.folder-art,.fileicon,.document-card-thumb,.mobile-search-result-icon{box-shadow:none}
.folder-art,.mixed-folder-card .document-card-thumb{background:transparent!important;border:0!important}
.folder-art svg,.mixed-folder-link svg,.mixed-folder-card svg,.tree-link svg,.mobile-nav svg,.view-switch svg{stroke-linecap:round;stroke-linejoin:round}
/* Distinguish selected list/grid view by aria-pressed (the real JS state). */
.view-switch button[aria-pressed="true"]{background:#e8f3ff!important;color:#1473c9!important;border-radius:9px!important;box-shadow:inset 0 0 0 1px #bdd9f4!important}
.view-switch button[aria-pressed="false"]{background:transparent!important;color:#617c98!important;box-shadow:none!important}
html[data-theme="dark"] .view-switch button[aria-pressed="true"]{background:#426589!important;color:#e6f4ff!important;box-shadow:inset 0 0 0 1px #6384a4!important}
html[data-theme="dark"] .view-switch button[aria-pressed="false"]{background:transparent!important;color:#a9c7e5!important}
/* No light flash from an empty checkbox cell when hovering folder rows. */
.document-table .mixed-folder-row:hover,.document-table .mixed-folder-row:hover td,
.document-table .mixed-folder-row:hover .bulk-check-cell{background:rgba(90,151,211,.14)!important}
html[data-theme="dark"] .document-table .mixed-folder-row:hover,html[data-theme="dark"] .document-table .mixed-folder-row:hover td,
html[data-theme="dark"] .document-table .mixed-folder-row:hover .bulk-check-cell{background:#2b445e!important}
html[data-theme="dark"] .document-table tbody .bulk-check-cell:hover{background:#2b445e!important}
/* Bottom nav: slimmer selection with consistent inset and icon sizes. */
@media(max-width:760px){
.mobile-nav{padding:9px!important;border-radius:32px!important}
.mobile-nav a,.mobile-nav button{min-width:0!important;border-radius:21px!important;padding:8px 2px!important;min-height:58px!important}
.mobile-nav a.active{background:#e6f2ff!important;color:#2476bd!important}
html[data-theme="dark"] .mobile-nav a.active{background:#294762!important;color:#b6dcff!important}
.mobile-nav svg{width:23px!important;height:23px!important}
/* iOS search sheet: one seamless surface, keyboard-safe, no nested input tile. */
.mobile-search-overlay{height:100dvh!important}
.mobile-search-sheet{height:auto!important;min-height:0!important;max-height:min(64dvh,540px)!important;padding:9px 18px calc(18px + env(safe-area-inset-bottom))!important;gap:12px!important}
.mobile-search-heading button{background:#edf3f9!important;color:#58738b!important;border-radius:12px!important}
#mobile-search-form{background:#eef3f8!important;border:1px solid #cddce9!important;min-height:52px!important;border-radius:14px!important;gap:10px!important}
#mobile-search-input{background:transparent!important;border:0!important;outline:none!important;box-shadow:none!important;-webkit-appearance:none!important;appearance:none!important;padding:9px 0!important;min-height:42px!important;color:#29445c!important}
#mobile-search-input:focus{box-shadow:none!important;outline:none!important}
.mobile-search-results{max-height:27dvh!important;overflow-y:auto!important}
html[data-theme="dark"] .mobile-search-sheet{background:#203449!important;color:#e5eef8!important;border:1px solid #354b60!important;border-bottom:0!important}
html[data-theme="dark"] .mobile-search-heading h2{color:#e5eef8!important}
html[data-theme="dark"] .mobile-search-heading button{background:#30475f!important;color:#c4ddf5!important}
html[data-theme="dark"] #mobile-search-form{background:#2a4056!important;border-color:#49637c!important}
html[data-theme="dark"] #mobile-search-input{background:transparent!important;color:#e5eef8!important;border:0!important}
html[data-theme="dark"] #mobile-search-input::placeholder{color:#b0c1d3!important}
html[data-theme="dark"] #mobile-search-form button{background:transparent!important;color:#b6d7f8!important}
html[data-theme="dark"] .mobile-search-hint{color:#b2c3d4!important}
}

.password-help{display:block;color:#6a8299;font-size:13px;line-height:1.45;margin:6px 0}
html[data-theme="dark"] .password-help{color:#b4c9dc}

/* Folder multi-selection controls (unchanged). */
.mixed-folder-row .bulk-check-cell{vertical-align:middle}
.mixed-folder-row.bulk-selected,.document-row.bulk-selected{background:var(--selected-bg,rgba(63,151,240,.14))!important}
.mixed-folder-card{position:relative}
.mixed-folder-grid-link{display:block;color:inherit;text-decoration:none;min-width:0}
.folder-grid-actions{display:flex;align-items:center;justify-content:space-between;padding:0 12px 10px;gap:10px}
.folder-grid-actions a{display:inline-flex;align-items:center;justify-content:center;color:inherit;padding:6px}
.folder-grid-actions input{width:17px;height:17px}
.mixed-folder-card.bulk-selected{outline:2px solid #65a9ec;outline-offset:-2px}
/* Single local icon source: static/icons.js. No icon backgrounds. */
svg.lucide{display:inline-block;flex-shrink:0;vertical-align:middle}
.fileicon,.filetype-icon,.folder-art,.mobile-search-result-icon,.current-folder-icon{background:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important}
.fileicon,.filetype-icon{padding:0!important;border-radius:0!important;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}
.document-card-thumb:has(>svg.lucide){background:transparent!important;border:0!important;box-shadow:none!important}
.fileicon svg.lucide,.filetype-icon svg.lucide{width:21px;height:21px}
.folder-art svg.lucide,.current-folder-icon svg.lucide{width:26px;height:26px}
.document-card-thumb>svg.lucide{width:44px;height:44px}
.tree-link svg.lucide,.mixed-folder-link svg.lucide{width:19px;height:19px}
.view-switch-button svg.lucide,.file-icon-action svg.lucide,.grid-download svg.lucide,.folder-grid-actions svg.lucide{width:19px;height:19px}
.preview-arrow svg.lucide{width:25px;height:25px}
.card-video-symbol svg.lucide{width:17px;height:17px}

/* User-approved SVGs are the only icon shapes. Do not override their stroke widths. */
svg.lucide{stroke-width:revert-layer}

/* v5.1: navigation states, accessible dark preview and file actions.
   The folder tree is highlighted as a unit ONLY while browsing it. */
.shell aside nav .tree-group:not(.tree-active) .tree-line,
.shell aside nav .tree-group:not(.tree-active) .tree-line:hover,
.shell aside nav .tree-group:not(.tree-active) .tree-link,
.shell aside nav .tree-group:not(.tree-active) .tree-link:hover,
.shell aside nav .tree-group:not(.tree-active) .tree-link.selected {
  background:transparent!important;background-color:transparent!important;
  box-shadow:none!important;outline:none!important;border-radius:0!important;
}
.shell aside nav .tree-group:not(.tree-active) .tree-line .tree-link {color:inherit!important;font-weight:inherit!important}
.shell aside nav .tree-group:not(.tree-active) .tree-line:hover .tree-link {color:#1674d4!important}
html[data-theme="dark"] .shell aside nav .tree-group:not(.tree-active) .tree-line:hover .tree-link {color:#a6d4ff!important}
.shell aside nav .tree-group.tree-active .tree-line.is-current,
.shell aside nav .tree-group.tree-active .tree-line.is-current:hover {background:transparent!important;box-shadow:none!important;outline:none!important}
.shell aside nav .tree-group.tree-active .tree-line.is-current .tree-link {font-weight:750!important;color:#1674d4!important}
html[data-theme="dark"] .shell aside nav .tree-group.tree-active .tree-line.is-current .tree-link {color:#a6d4ff!important}
/* The user-provided link SVG is unchanged; only its button sizing and contrast match download. */
#documents-list .file-controls .share-trigger,
#documents-list .file-controls .file-icon-action {color:#527c9f!important}
#documents-list .file-controls .share-trigger svg.lucide,
#documents-list .file-controls .file-icon-action svg.lucide {width:20px!important;height:20px!important;max-width:none!important;max-height:none!important}
html[data-theme="dark"] #documents-list .file-controls .share-trigger,
html[data-theme="dark"] #documents-list .file-controls .file-icon-action {color:#9dcbfa!important}
html[data-theme="dark"] #documents-list .file-controls .delete-file {color:#ed919b!important}
/* The preview toolbar was hardcoded white, even in dark mode. */
.file-preview .preview-toolbar {background:#fff;color:#24394f}
.file-preview .preview-toolbar #preview-title {color:inherit!important}
html[data-theme="dark"] .file-preview .preview-toolbar {background:#1b2b3d!important;color:#e5eef8!important;border-bottom-color:#354b60!important}
html[data-theme="dark"] .file-preview .preview-toolbar #preview-title {color:#e5eef8!important}
html[data-theme="dark"] .file-preview .preview-toolbar .preview-size,
html[data-theme="dark"] .file-preview .preview-toolbar #preview-counter {color:#b4c9df!important}
html[data-theme="dark"] .file-preview .preview-toolbar button,
html[data-theme="dark"] .file-preview .preview-toolbar a {color:#a9d4ff!important}

/* v5.1 — Preview is an independent surface: avoid global dark-mode th/td rules. */
.file-preview {color:#24394f;background:#fff}
.file-preview .preview-toolbar {background:#fff!important;color:#24394f!important;border-bottom:1px solid #e0e7ef!important}
.file-preview .preview-toolbar #preview-title {color:#24394f!important}
.file-preview .preview-toolbar .preview-size,.file-preview .preview-toolbar #preview-counter {color:#526b85!important}
.file-preview .preview-toolbar button,.file-preview .preview-toolbar a {color:#315a80!important}
.file-preview .structured-preview {background:#fff!important;color:#24394f!important}
.file-preview .sheet-viewport {background:#fff!important;color:#24394f!important}
.file-preview .sheet-table td {background:#fff!important;color:#24394f!important;border-color:#d9e2eb!important}
.file-preview .sheet-table tbody tr:first-child td {background:#f7f9fc!important;color:#24394f!important}
.file-preview .sheet-table thead th,.file-preview .sheet-table tbody th {background:#edf2f7!important;color:#3d566e!important;border-color:#d9e2eb!important}
.file-preview .sheet-tabs {background:#fff!important;border-color:#d9e2eb!important}
.file-preview .sheet-tab {background:#f0f4f8!important;color:#425a72!important;border-color:#d9e2eb!important}
.file-preview .sheet-tab.active {background:#fff!important;color:#185da5!important}
html[data-theme="dark"] .file-preview {background:#19293a!important;color:#e6eef8!important}
html[data-theme="dark"] .file-preview .preview-toolbar {background:#19293a!important;color:#e6eef8!important;border-bottom-color:#354b60!important}
html[data-theme="dark"] .file-preview .preview-toolbar #preview-title {color:#e6eef8!important}
html[data-theme="dark"] .file-preview .preview-toolbar .preview-size,html[data-theme="dark"] .file-preview .preview-toolbar #preview-counter {color:#b4c9df!important}
html[data-theme="dark"] .file-preview .preview-toolbar button,html[data-theme="dark"] .file-preview .preview-toolbar a {color:#b3d8ff!important}
html[data-theme="dark"] .file-preview .preview-content,html[data-theme="dark"] .file-preview .preview-stage {background:#142334!important}
html[data-theme="dark"] .file-preview .structured-preview {background:#19293a!important;color:#e6eef8!important}
html[data-theme="dark"] .file-preview .sheet-viewport {background:#19293a!important;color:#e6eef8!important}
html[data-theme="dark"] .file-preview .sheet-table td {background:#1c2f43!important;color:#e6eef8!important;border-color:#3c536a!important}
html[data-theme="dark"] .file-preview .sheet-table tbody tr:first-child td {background:#253c52!important;color:#f1f6ff!important}
html[data-theme="dark"] .file-preview .sheet-table thead th,html[data-theme="dark"] .file-preview .sheet-table tbody th {background:#263c52!important;color:#d3e3f4!important;border-color:#3c536a!important}
html[data-theme="dark"] .file-preview .sheet-tabs {background:#19293a!important;border-color:#3c536a!important}
html[data-theme="dark"] .file-preview .sheet-tab {background:#263c52!important;color:#c1d3e6!important;border-color:#3c536a!important}
html[data-theme="dark"] .file-preview .sheet-tab.active {background:#1c2f43!important;color:#b5daff!important}
html[data-theme="dark"] .file-preview .preview-note {color:#b4c9df!important;border-color:#3c536a!important}

@media(max-width:760px){
 /* The root of Mappstruktur uses the same mixed file/folder rows as every folder. */
 #documents-list .document-table tr.mixed-folder-row{display:flex!important;align-items:center;gap:8px;width:100%!important;min-width:0!important;max-width:100%!important;border-bottom:1px solid var(--row-border,#354b60);padding:10px 5px;box-sizing:border-box}
 #documents-list .document-table tr.mixed-folder-row>td{display:none!important}
 #documents-list .document-table tr.mixed-folder-row>td:nth-child(1){display:flex!important;align-items:center;flex:0 0 23px!important;width:23px!important;min-width:0!important;padding:0!important}
 #documents-list .document-table tr.mixed-folder-row>td:nth-child(2){display:flex!important;align-items:center;flex:1 1 0!important;min-width:0!important;width:0!important;padding:0!important;overflow:hidden!important}
 #documents-list .document-table tr.mixed-folder-row .mixed-folder-link{display:flex!important;align-items:center;gap:9px;min-width:0!important;width:100%;overflow:hidden!important;text-overflow:ellipsis;white-space:nowrap}
 #documents-list .document-table tr.mixed-folder-row .mixed-folder-link svg{flex:none;width:20px;height:20px}
 #documents-list .document-table tr.mixed-folder-row .mixed-folder-link span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #documents-list .document-table tr.mixed-folder-row>td.file-controls{display:flex!important;align-items:center;justify-content:flex-end;flex:0 0 auto!important;width:auto!important;padding:0!important}
 #documents-list .document-table tr.mixed-folder-row .file-icon-action{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:5px!important}
 .mobile-search-sheet{max-height:calc(100dvh - 16px)!important}
 .mobile-search-results{max-height:none!important;min-height:0!important;flex:1!important}
}

/* v5.3 — full-screen mobile search and high-contrast floating navigation. */
@media(max-width:760px){
 .mobile-search-overlay:not([hidden]){position:fixed!important;inset:0!important;display:block!important;z-index:9999!important;width:100vw!important;max-width:none!important;height:100dvh!important;background:#f5f8fc!important;overflow:hidden!important}
 .mobile-search-backdrop{display:none!important}
 .mobile-search-sheet{position:absolute!important;inset:0!important;width:100%!important;max-width:none!important;height:100%!important;min-height:0!important;max-height:none!important;box-sizing:border-box!important;border:0!important;border-radius:0!important;box-shadow:none!important;animation:none!important;display:flex!important;flex-direction:column!important;gap:16px!important;padding:calc(18px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))!important;background:#f5f8fc!important;color:#24394f!important}
 .mobile-search-grabber{display:none!important}
 .mobile-search-heading{flex:none!important;margin:0!important}
 .mobile-search-results{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain!important}
 #mobile-search-form{flex:none!important;margin:0!important}
 body.mobile-search-open{overflow:hidden!important}
 .mobile-nav{background:#1b2b3d!important;color:#e9f3fc!important;border:1px solid #32475c!important;border-radius:999px!important;padding:8px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;box-shadow:0 9px 30px #17243335!important}
 .mobile-nav a,.mobile-nav button{color:#e9f3fc!important;background:transparent!important;border:0!important;border-radius:999px!important;min-width:0!important;min-height:66px!important;padding:10px 2px!important;box-sizing:border-box!important;justify-content:center!important}
 .mobile-nav a.active,.mobile-nav button.active{background:#395a79!important;color:#fff!important;border-radius:999px!important}
 .mobile-nav svg{color:inherit!important;stroke:currentColor!important}
 html[data-theme="dark"] .mobile-nav{background:#e8f1fa!important;color:#1b344e!important;border-color:#d0e1ef!important;box-shadow:0 10px 32px #0006!important}
 html[data-theme="dark"] .mobile-nav a,html[data-theme="dark"] .mobile-nav button{color:#1b344e!important;background:transparent!important}
 html[data-theme="dark"] .mobile-nav a.active,html[data-theme="dark"] .mobile-nav button.active{background:#bed9f0!important;color:#17334d!important;border-radius:999px!important}
 html[data-theme="dark"] .mobile-search-overlay:not([hidden]),html[data-theme="dark"] .mobile-search-sheet{background:#172535!important;color:#e8f1fb!important;border:0!important}
 html[data-theme="dark"] .mobile-search-heading button{background:#2b4157!important;color:#e8f1fb!important}
}

/* v5.4: compact, aligned mobile search and evenly inset pill navigation. */
@media (max-width:760px) {
  .mobile-search-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:44px!important;gap:12px!important}
  .mobile-search-heading h2{margin:0!important;line-height:1.2!important}
  #mobile-search-close{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important;border-radius:999px!important;line-height:1!important;flex:none!important}
  #mobile-search-close svg{display:block!important;width:21px!important;height:21px!important;margin:0!important}
  #mobile-search-form{display:flex!important;align-items:center!important;box-sizing:border-box!important;width:100%!important;height:58px!important;min-height:58px!important;max-height:58px!important;padding:0 14px!important;gap:12px!important;border-radius:15px!important}
  #mobile-search-form>svg{display:block!important;flex:0 0 22px!important;width:22px!important;height:22px!important;margin:0!important}
  #mobile-search-input{flex:1 1 auto!important;width:0!important;min-width:0!important;height:54px!important;min-height:0!important;max-height:54px!important;padding:0!important;margin:0!important;line-height:normal!important;font-size:16px!important}
  #mobile-search-form button{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 34px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:0!important;margin:0!important}
  #mobile-search-form button svg{width:20px!important;height:20px!important;margin:0!important}
  .mobile-nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:stretch!important;gap:5px!important;padding:9px!important;border-radius:9999px!important;box-sizing:border-box!important;overflow:hidden!important}
  .mobile-nav a,.mobile-nav button{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:70px!important;padding:10px 3px!important;margin:0!important;border-radius:9999px!important;font-size:clamp(10px,2.7vw,12px)!important;line-height:1.15!important;text-align:center!important;white-space:nowrap!important;letter-spacing:0!important}
  .mobile-nav svg{flex:none!important;width:23px!important;height:23px!important;margin:0!important}
  .mobile-nav a.active,.mobile-nav button.active{background:#2b4054!important;color:#e9f3fc!important;border-radius:9999px!important}
  html[data-theme="dark"] .mobile-nav a.active,html[data-theme="dark"] .mobile-nav button.active{background:#d8e7f3!important;color:#1b344e!important;border-radius:9999px!important}
}

/* v5.5: four edge-to-edge navigation segments, matching the approved sketch.
   One continuous capsule; no inset active pills, no tap-darkening. */
@media (max-width:760px) {
  .mobile-nav {
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:0!important;
    padding:0!important;
    border-radius:9999px!important;
    overflow:hidden!important;
    isolation:isolate;
    -webkit-tap-highlight-color:transparent;
  }
  .mobile-nav > a, .mobile-nav > button {
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    min-width:0!important;
    width:100%!important;
    min-height:86px!important;
    height:86px!important;
    margin:0!important;
    padding:12px 2px!important;
    border:0!important;
    border-radius:0!important;
    overflow:hidden!important;
    background:transparent!important;
    box-shadow:none!important;
    transform:none!important;
    -webkit-tap-highlight-color:transparent!important;
    transition:background-color .15s ease!important;
  }
  .mobile-nav > :first-child {border-radius:9999px 0 0 9999px!important}
  .mobile-nav > :last-child {border-radius:0 9999px 9999px 0!important}
  .mobile-nav > a.active, .mobile-nav > button.active,
  .mobile-nav > a.active:hover, .mobile-nav > button.active:hover,
  .mobile-nav > a.active:active, .mobile-nav > button.active:active,
  .mobile-nav > a.active:focus, .mobile-nav > button.active:focus {
    background:#30475d!important;
    color:#f1f7fc!important;
    box-shadow:none!important;
  }
  .mobile-nav > a:not(.active):hover, .mobile-nav > button:not(.active):hover,
  .mobile-nav > a:not(.active):active, .mobile-nav > button:not(.active):active,
  .mobile-nav > a:not(.active):focus, .mobile-nav > button:not(.active):focus {
    background:transparent!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] .mobile-nav > a.active,
  html[data-theme="dark"] .mobile-nav > button.active,
  html[data-theme="dark"] .mobile-nav > a.active:hover,
  html[data-theme="dark"] .mobile-nav > button.active:hover,
  html[data-theme="dark"] .mobile-nav > a.active:active,
  html[data-theme="dark"] .mobile-nav > button.active:active,
  html[data-theme="dark"] .mobile-nav > a.active:focus,
  html[data-theme="dark"] .mobile-nav > button.active:focus {
    background:#cbdfee!important;
    color:#1b344e!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] .mobile-nav > a:not(.active):hover,
  html[data-theme="dark"] .mobile-nav > button:not(.active):hover,
  html[data-theme="dark"] .mobile-nav > a:not(.active):active,
  html[data-theme="dark"] .mobile-nav > button:not(.active):active,
  html[data-theme="dark"] .mobile-nav > a:not(.active):focus,
  html[data-theme="dark"] .mobile-nav > button:not(.active):focus {
    background:transparent!important;
  }
}

/* v5.6: shared folder/file row rhythm; no extra divider between types. */
@media(max-width:760px){
 #documents-list .document-table tbody tr.mixed-folder-row,
 #documents-list .document-table tbody tr.document-row{display:flex!important;align-items:center!important;gap:8px!important;padding:10px 5px!important;margin:0!important;min-height:55px!important;border:0!important;border-bottom:1px solid var(--row-border,#dce5ee)!important;box-shadow:none!important;background-clip:padding-box!important}
 #documents-list .document-table tbody tr.mixed-folder-row>td.file-controls,
 #documents-list .document-table tbody tr.document-row>td.file-controls{display:flex!important;gap:2px!important;align-items:center!important;flex:0 0 auto!important;width:auto!important;max-width:none!important;padding:0!important;white-space:nowrap!important}
 #documents-list .document-table tbody tr.mixed-folder-row .file-icon-action,
 #documents-list .document-table tbody tr.document-row .file-icon-action{display:inline-flex!important;width:30px!important;height:34px!important;align-items:center!important;justify-content:center!important;padding:5px!important;box-sizing:border-box!important}
 #documents-list .document-table tbody tr.mixed-folder-row td:nth-child(2){padding:0!important}
 #documents-list .document-table tbody tr.mixed-folder-row .mixed-folder-link{font-size:13px!important}
 #documents-list .document-table tbody tr.mixed-folder-row .mixed-folder-link svg{width:20px!important;height:20px!important}
 #documents-list .document-table tbody tr.mixed-folder-row .file-controls form{display:inline-flex!important;margin:0!important}
 /* Four flush segments, quieter colors sampled from the application's palettes. */
 .mobile-nav{background:#dce8f2!important;border-color:#c7d8e6!important;color:#263f57!important}
 .mobile-nav>a,.mobile-nav>button{color:#263f57!important}
 .mobile-nav>a.active,.mobile-nav>button.active,.mobile-nav>a.active:hover,.mobile-nav>button.active:hover,.mobile-nav>a.active:active,.mobile-nav>button.active:active,.mobile-nav>a.active:focus,.mobile-nav>button.active:focus{background:#c2d8e9!important;color:#1e3d59!important}
 html[data-theme="dark"] .mobile-nav{background:#2b435a!important;border-color:#425e77!important;color:#d7e8f6!important}
 html[data-theme="dark"] .mobile-nav>a,html[data-theme="dark"] .mobile-nav>button{color:#d7e8f6!important}
 html[data-theme="dark"] .mobile-nav>a.active,html[data-theme="dark"] .mobile-nav>button.active,html[data-theme="dark"] .mobile-nav>a.active:hover,html[data-theme="dark"] .mobile-nav>button.active:hover,html[data-theme="dark"] .mobile-nav>a.active:active,html[data-theme="dark"] .mobile-nav>button.active:active,html[data-theme="dark"] .mobile-nav>a.active:focus,html[data-theme="dark"] .mobile-nav>button.active:focus{background:#405f7b!important;color:#e7f3fd!important}
}

/* v5.8: desktop-style row dividers on mobile; never paint beyond the
   rounded table edge, and never draw a separator after the final item. */
@media(max-width:760px){
  #documents-list.tablewrap {overflow:hidden!important;border-radius:12px!important}
  #documents-list .document-table tbody tr.document-row,
  #documents-list .document-table tbody tr.mixed-folder-row {
    position:relative!important;border-bottom:0!important;box-shadow:none!important;
  }
  #documents-list .document-table tbody tr.document-row:not(:last-child)::after,
  #documents-list .document-table tbody tr.mixed-folder-row:not(:last-child)::after {
    content:""!important;display:block!important;position:absolute!important;
    left:0!important;right:0!important;bottom:0!important;height:1px!important;
    background:#e5ebf1!important;pointer-events:none!important;
  }
  html[data-theme="dark"] #documents-list .document-table tbody tr.document-row:not(:last-child)::after,
  html[data-theme="dark"] #documents-list .document-table tbody tr.mixed-folder-row:not(:last-child)::after {
    background:#304256!important;
  }
  #documents-list .document-table tbody tr:last-child {border-bottom:0!important}
  #documents-list .document-table tbody tr:last-child::after {content:none!important;display:none!important}
}
@media(max-width:760px){
 /* Single outer capsule clips four full-height rectangular segments. */
 .mobile-nav{position:fixed!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;padding:0!important;border-radius:9999px!important;overflow:hidden!important;isolation:isolate!important}
 .mobile-nav>a,.mobile-nav>button{height:86px!important;min-height:86px!important;max-height:86px!important;margin:0!important;padding:10px 2px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;transform:none!important;outline-offset:-3px!important;-webkit-tap-highlight-color:transparent!important;transition:background-color .12s ease!important}
 .mobile-nav>:first-child,.mobile-nav>:last-child{border-radius:0!important}
 .mobile-nav>a.active,.mobile-nav>button.active,.mobile-nav>a.active:hover,.mobile-nav>button.active:hover,.mobile-nav>a.active:focus,.mobile-nav>button.active:focus{border-radius:0!important;box-shadow:none!important;background:#c2d8e9!important;color:#1e3d59!important}
 html[data-theme="dark"] .mobile-nav>a.active,html[data-theme="dark"] .mobile-nav>button.active,html[data-theme="dark"] .mobile-nav>a.active:hover,html[data-theme="dark"] .mobile-nav>button.active:hover,html[data-theme="dark"] .mobile-nav>a.active:focus,html[data-theme="dark"] .mobile-nav>button.active:focus{background:#405f7b!important;color:#e7f3fd!important;border-radius:0!important}
 .mobile-nav>a:active,.mobile-nav>button:active,.mobile-nav>a.nav-pending,.mobile-nav>button.nav-pending{background:#afccdf!important;color:#1b3c58!important;border-radius:0!important;box-shadow:none!important}
 html[data-theme="dark"] .mobile-nav>a:active,html[data-theme="dark"] .mobile-nav>button:active,html[data-theme="dark"] .mobile-nav>a.nav-pending,html[data-theme="dark"] .mobile-nav>button.nav-pending{background:#55738d!important;color:#f0f7ff!important;border-radius:0!important}
 .mobile-nav.nav-loading::after{content:"";position:absolute;z-index:5;left:0;top:0;height:2px;width:35%;border-radius:0;background:#328de0;animation:mobile-nav-progress 1.1s ease-in-out infinite alternate;pointer-events:none}
 @keyframes mobile-nav-progress{from{transform:translateX(0)}to{transform:translateX(185%)}}
}

/* v6.0: balanced desktop branding; original cloud artwork is unchanged. */
@media(min-width:761px){
  .shell aside .brand{display:flex!important;flex-direction:row!important;align-items:center!important;gap:11px!important;margin:0 5px 30px!important;min-width:0!important;}
  .shell aside .brand .brand-cloud-image{width:69px!important;height:69px!important;flex:0 0 69px!important;object-fit:contain!important;}
  .shell aside .brand .brand-drive-name{display:block!important;min-width:0!important;max-width:145px!important;font-size:21px!important;line-height:1.12!important;white-space:normal!important;overflow-wrap:normal!important;font-weight:500!important;letter-spacing:-.5px!important;}
}

/* v6.3: Arrow-free folder hierarchy. Every row shares the same icon
   alignment. Branch stems sit beneath the parent icon centre; square elbows
   stop 5px short of each child icon. No connectors between root siblings. */
.shell aside .folder-tree{--tree-wire:#a8b8c7;--tree-row:35px;--tree-step:25px;}
html[data-theme="dark"] .shell aside .folder-tree{--tree-wire:#566d83;}
.shell aside .folder-tree .tree-node{position:relative!important;margin:0!important;border:0!important;}
.shell aside .folder-tree .tree-line{
  display:flex!important;align-items:center!important;gap:0!important;
  min-height:var(--tree-row)!important;padding-left:25px!important;
}
.shell aside .folder-tree .tree-line > .tree-link{
  display:flex!important;align-items:center!important;gap:10px!important;
  flex:1 1 auto!important;min-width:0!important;
}
.shell aside .folder-tree .tree-toggle{display:none!important;}
.shell aside .folder-tree .tree-children{
  position:relative!important;margin:0!important;padding:0!important;
  border:0!important;background:none!important;
}
.shell aside .folder-tree .tree-children[hidden]{display:none!important;}
.shell aside .folder-tree .tree-children::before,
.shell aside .folder-tree .tree-children::after{content:none!important;display:none!important;}
.shell aside .folder-tree .tree-children > .tree-node{
  position:relative!important;padding-left:var(--tree-step)!important;
}
.shell aside .folder-tree .tree-children > .tree-node::before{
  content:""!important;display:block!important;position:absolute!important;
  left:35px!important;top:0!important;bottom:0!important;
  width:1px!important;height:auto!important;background:var(--tree-wire)!important;
  border:0!important;border-radius:0!important;pointer-events:none!important;
}
.shell aside .folder-tree .tree-children > .tree-node:last-child::before{
  bottom:auto!important;height:calc(var(--tree-row) / 2)!important;
}
.shell aside .folder-tree .tree-children > .tree-node::after{
  content:""!important;display:block!important;position:absolute!important;
  left:35px!important;top:calc(var(--tree-row) / 2)!important;
  width:10px!important;height:1px!important;background:var(--tree-wire)!important;
  border:0!important;border-radius:0!important;pointer-events:none!important;
}
.shell aside .folder-tree .tree-line::before,
.shell aside .folder-tree .tree-line::after{content:none!important;display:none!important;}
/* The connector is positioned in the parent's coordinate system:
   nested rows indent 25px; child icons remain aligned 5px past the elbow. */
.shell aside .folder-tree .tree-children > .tree-node::before,
.shell aside .folder-tree .tree-children > .tree-node::after{left:35px!important;}

/* v6.5: Grid folder cards match the application theme and compact layout. */
.documents-grid{grid-template-columns:repeat(auto-fill,minmax(175px,1fr))!important;gap:14px!important;}
.documents-grid .document-card{background:#fff;color:#203b54;border:1px solid #d8e4ef;border-radius:12px;overflow:hidden;}
html[data-theme="dark"] .documents-grid .document-card{background:#24394e!important;color:#d6e6f5!important;border-color:#3c5267!important;}
.documents-grid .document-card-thumb{height:116px!important;min-height:116px!important;}
.documents-grid .document-card-footer{min-height:46px!important;}
.documents-grid .document-card-name{color:inherit!important;font-weight:600;}
.documents-grid .folder-grid-actions{padding:3px 12px 10px!important;display:flex!important;align-items:center!important;gap:8px!important;justify-content:flex-start!important;}
.documents-grid .folder-grid-action-spacer{flex:1;}
.documents-grid .folder-grid-actions .grid-download{display:inline-flex;align-items:center;justify-content:center;border:0;background:none;color:inherit;padding:5px;min-width:26px;min-height:26px;cursor:pointer;}
.documents-grid .folder-grid-actions .grid-download svg{width:17px;height:17px;}
.documents-grid .folder-grid-actions .grid-folder-check{appearance:auto!important;-webkit-appearance:checkbox!important;width:17px!important;height:17px!important;accent-color:#3a8dd6!important;cursor:pointer;}
html[data-theme="dark"] .documents-grid .document-card.bulk-selected{background:#2b4964!important;border-color:#80b8ed!important;}
@media(max-width:760px){.documents-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.documents-grid .document-card-thumb{height:95px!important;min-height:95px!important}.documents-grid .folder-grid-actions{gap:4px!important;padding-left:7px!important;padding-right:7px!important}}

/* v6.6: grid theme and edge-to-edge media, no inherited white surfaces */
html[data-theme="dark"] #documents-grid .document-card,
html[data-theme="dark"] #documents-grid .mixed-folder-card{
 background:#23384d!important;color:#e4eff9!important;border-color:#40576e!important;
}
html[data-theme="light"] #documents-grid .document-card{background:#fff!important;color:#253e55!important;}
#documents-grid .document-card-name,
#documents-grid .mixed-folder-grid-link,
#documents-grid .document-card-footer{color:inherit!important;}
#documents-grid .document-card-name{font-size:13px!important;line-height:1.35!important;}
#documents-grid .document-card-thumb{
 position:relative!important;display:flex!important;align-items:center!important;
 justify-content:center!important;overflow:hidden!important;padding:0!important;
 background:#e8eff6!important;
}
html[data-theme="dark"] #documents-grid .document-card-thumb{background:#1a2d40!important;}
#documents-grid .document-card-thumb > img,
#documents-grid .document-card-thumb > video{
 position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 object-fit:cover!important;object-position:center!important;max-width:none!important;
}
#documents-grid .document-card-thumb > iframe{
 position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 border:0!important;pointer-events:none!important;
}
#documents-grid .document-card-thumb > svg.lucide{position:relative;flex-shrink:0;}
html[data-theme="dark"] #documents-grid .grid-download,
html[data-theme="dark"] #documents-grid .folder-grid-actions .grid-download{
 color:#b7d2eb!important;background:transparent!important;box-shadow:none!important;
}
#documents-grid .grid-download.share-trigger{
 background:transparent!important;border:0!important;box-shadow:none!important;
}
html[data-theme="dark"] #documents-grid .grid-download:hover{background:#34506a!important;}
#documents-grid input[type="checkbox"].grid-check,
#documents-grid input[type="checkbox"].grid-folder-check{
 appearance:auto!important;-webkit-appearance:checkbox!important;
 accent-color:#3688d7!important;width:17px!important;height:17px!important;
 min-width:17px!important;min-height:17px!important;
 background:transparent!important;box-shadow:none!important;border-radius:3px!important;
}
#documents-grid .folder-grid-actions form.inline{display:inline-flex!important;margin:0!important;padding:0!important;}
#documents-grid .folder-grid-actions button.grid-download{font:inherit;}
#documents-grid .mixed-folder-card .document-card-thumb > svg.lucide{width:46px!important;height:46px!important;}
@media(max-width:760px){
 #documents-grid .document-card-footer{padding:6px!important;gap:3px!important;}
 #documents-grid .grid-download{flex-basis:25px!important;min-width:25px!important;}
}

/* v6.7: selection toolbar follows the active palette, in both layouts. */
html[data-theme="dark"] .bulk-toolbar{
 background:#263e54!important;color:#dceafa!important;
 border:1px solid #405a71!important;box-shadow:none!important;
}
html[data-theme="dark"] .bulk-toolbar .bulk-action{
 background:#314d67!important;color:#e3effa!important;
 border:1px solid #55728d!important;box-shadow:none!important;
}
html[data-theme="dark"] .bulk-toolbar .bulk-action:hover{background:#3c5c78!important;}
html[data-theme="dark"] .bulk-toolbar .bulk-clear{
 background:transparent!important;color:#b6ccdf!important;
}
html[data-theme="dark"] .bulk-toolbar .bulk-trash{
 background:transparent!important;color:#f07884!important;
}
html[data-theme="dark"] .bulk-toolbar .bulk-trash:hover{background:#593c49!important;}
/* Cover thumbnails from the top, retaining original aspect ratio and cropping. */
#documents-grid .document-card-thumb > img,
#documents-grid .document-card-thumb > video{
 object-fit:cover!important;object-position:center top!important;
}
/* Denser footer: more horizontal room for names, less unused height. */
#documents-grid .document-card-footer{
 min-height:42px!important;padding:5px 7px!important;gap:4px!important;
}
#documents-grid .document-card-name{flex:1 1 auto!important;min-width:0!important;}
#documents-grid .grid-check-hit{flex-basis:27px!important;width:27px!important;height:32px!important;}
#documents-grid .grid-download{flex:0 0 26px!important;width:26px!important;height:32px!important;}

/* v7.0: high-contrast settings gear in dark and light themes */
.folder-actions .folder-settings-toggle .line-icon,
.folder-actions .folder-settings-toggle svg{
 width:21px!important;height:21px!important;stroke-width:2.25!important;
 stroke:#476783!important;color:#476783!important;opacity:1!important;
}
html[data-theme="dark"] .folder-actions .folder-settings-toggle{
 background:#2b4158!important;border-color:#7298b9!important;
}
html[data-theme="dark"] .folder-actions .folder-settings-toggle .line-icon,
html[data-theme="dark"] .folder-actions .folder-settings-toggle svg{
 stroke:#d8ebff!important;color:#d8ebff!important;opacity:1!important;
}
.folder-actions .folder-settings-toggle:hover,
.folder-actions .folder-settings-toggle[aria-expanded="true"]{
 background:#e1effc!important;border-color:#6b9bca!important;
}
html[data-theme="dark"] .folder-actions .folder-settings-toggle:hover,
html[data-theme="dark"] .folder-actions .folder-settings-toggle[aria-expanded="true"]{
 background:#385975!important;border-color:#a1c5e6!important;
}

/* v7.2: folder actions; match the open-menu specificity to override old display:block!important */
.folder-actions.open .folder-menu > button,
.folder-actions.open .folder-menu > form > button,
.folder-actions .folder-menu > button,
.folder-actions .folder-menu > form > button{
 box-sizing:border-box!important;display:flex!important;flex-direction:row!important;
 flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;
 gap:12px!important;padding:11px 13px!important;margin:0!important;
 width:100%!important;min-width:0!important;text-align:left!important;
}
.folder-actions .folder-menu > button > svg,
.folder-actions .folder-menu > form > button > svg{
 display:block!important;width:17px!important;height:17px!important;
 min-width:17px!important;flex:0 0 17px!important;
 stroke:currentColor!important;stroke-width:2!important;opacity:1!important;
}
.folder-actions .folder-menu > button > span,
.folder-actions .folder-menu > form > button > span{
 display:block!important;flex:1 1 auto!important;min-width:0!important;
}
.folder-actions .folder-menu{box-sizing:border-box!important;}
.folder-actions .folder-menu > form > button.danger{color:#c74854!important;}
html[data-theme="dark"] .folder-actions .folder-menu > form > button.danger{color:#f07b86!important;}

/* v7.3: upload progress dark theme */
html[data-theme='dark'] .upload-progress{background:#1b2b3d!important;color:#e4edf8!important;border-color:#415c75!important}
html[data-theme='dark'] .upload-progress #upload-status,html[data-theme='dark'] .upload-progress #upload-percent{color:#e4edf8!important}
html[data-theme='dark'] .upload-progress #upload-detail{color:#b6cadf!important}
html[data-theme='dark'] .upload-progress progress{background:#354b60!important}
html[data-theme='dark'] .upload-progress progress::-webkit-progress-bar{background:#354b60!important}
.folder-actions .folder-menu > form{margin-top:4px!important;padding-top:0!important}
.folder-actions .folder-menu > form > button{padding-top:7px!important;padding-bottom:11px!important}

/* v7.5 multi-folder upload chooser */
.upload-chooser{width:min(440px,calc(100vw - 32px));max-width:100%;padding:24px;border:1px solid #dce7f1;border-radius:16px;background:#fff;color:#263d56;box-shadow:0 20px 70px #10283c55}
.upload-chooser::backdrop{background:#08162588}
.upload-chooser h2{margin:0 0 8px}
.upload-chooser p{margin:8px 0 18px}
.upload-chooser-actions{display:flex;flex-wrap:wrap;gap:10px}
.upload-chooser-actions button{flex:1;min-width:145px}
.upload-chooser-footer{display:flex;gap:12px;align-items:center;justify-content:flex-end;margin-top:18px}
.upload-chooser #upload-queue-detail{margin:18px 0 0;color:#60778c}
html[data-theme="dark"] .upload-chooser{background:#1b2b3d;color:#e4edf8;border-color:#415c75}
html[data-theme="dark"] .upload-chooser #upload-queue-detail{color:#b6cadf}

.upload-queue-list{max-height:290px;overflow:auto;margin-top:12px;display:grid;gap:7px}
.upload-queue-group{border:1px solid #dce7f1;border-radius:9px;padding:7px 10px}
.upload-queue-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.upload-queue-row span{overflow-wrap:anywhere;min-width:0}
.upload-queue-remove{border:0;background:transparent;color:inherit;font-size:23px;cursor:pointer;padding:3px 8px}
.upload-queue-details{margin:5px 0 0 22px}
.upload-queue-file{font-size:12px;padding:5px 0;border-top:1px solid #dce7f1}
.upload-abort{float:right;margin-bottom:8px}

/* Upload progress close control */
.upload-progress{position:relative}
.upload-progress .upload-abort{position:absolute;top:10px;right:12px;float:none;z-index:2;background:transparent;border:0;color:inherit;font-size:26px;line-height:1;padding:4px 7px;cursor:pointer}
.upload-progress .upload-progress-head{padding-right:34px}

/* Keep transfer status anchored to the viewport, not the document flow. */
.upload-progress{position:fixed!important;right:20px!important;left:auto!important;bottom:20px!important;top:auto!important;z-index:10000!important;width:min(420px,calc(100vw - 32px))!important;max-height:calc(100dvh - 40px);overflow:auto;box-sizing:border-box}
@media(max-width:600px){.upload-progress{right:12px!important;bottom:12px!important;width:calc(100vw - 24px)!important}}

/* Dark mode: subtle hover/focus for file and folder action buttons. */
html[data-theme="dark"] #documents-list .file-controls .share-trigger:hover,
html[data-theme="dark"] #documents-list .file-controls .share-trigger:focus-visible,
html[data-theme="dark"] #documents-list .file-controls .file-icon-action:hover,
html[data-theme="dark"] #documents-list .file-controls .file-icon-action:focus-visible,
html[data-theme="dark"] .folder-share-action:hover,
html[data-theme="dark"] .folder-share-action:focus-visible {
 background:#35516a!important;color:#b4d9ff!important;box-shadow:none!important;
}

/* Desktop file manager: scroll content, keep search and table headings visible. */
@media(min-width:761px){
 html,body{height:100%;overflow:hidden}
 .shell{height:calc(100dvh - 44px);min-height:0}
 .shell>main{height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable}
 .shell>main>header{position:sticky;top:0;z-index:45}
 .document-table thead th{position:sticky;top:0;z-index:5}
 .tablewrap{overflow:visible}
}
.document-table{width:100%;table-layout:fixed}
.document-table th:nth-child(1),.document-table td:nth-child(1){width:44px;box-sizing:border-box}
.document-table th:nth-child(2),.document-table td:nth-child(2){width:auto;min-width:0;overflow-wrap:anywhere}
.document-table th:nth-child(3),.document-table td:nth-child(3){width:145px}
.document-table th:nth-child(4),.document-table td:nth-child(4){width:125px}
.document-table th:nth-child(5),.document-table td:nth-child(5){width:90px;white-space:nowrap;text-align:right}
.document-table th:nth-child(6),.document-table td:nth-child(6){width:146px;box-sizing:border-box}
.document-table td.file-controls{white-space:nowrap;padding-left:4px!important;padding-right:8px!important}
.document-table td.file-controls>*{margin-left:0!important}
.document-table td.file-controls .file-icon-action,.document-table td.file-controls .share-trigger{padding:5px!important}
@media(max-width:1100px) and (min-width:761px){
 .document-table th:nth-child(3),.document-table td:nth-child(3){width:112px}
 .document-table th:nth-child(4),.document-table td:nth-child(4){width:100px}
 .document-table th:nth-child(6),.document-table td:nth-child(6){width:138px}
}

/* Align the size column heading with its right-aligned numeric values. */
.document-table thead th:nth-child(5){text-align:right!important}

/* v9.0: compact, consistently aligned document table. */
@media(min-width:761px){
 html[data-theme="dark"] .shell>main>header{background:#172433!important}
 .document-table{min-width:700px}
 .document-table th:nth-child(3),.document-table td:nth-child(3){width:172px!important;white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important}
 .document-table th:nth-child(4),.document-table td:nth-child(4){width:112px!important}
 .document-table th:nth-child(5),.document-table td:nth-child(5){width:72px!important;padding-left:2px!important;padding-right:4px!important;text-align:right!important;white-space:nowrap!important}
 .document-table th:nth-child(6),.document-table td:nth-child(6){width:126px!important}
 .document-table th:nth-child(5) .sort-column{display:flex;justify-content:flex-end;width:100%;gap:0;text-align:right;padding-right:0}
 .document-table th:nth-child(5) .sort-arrow{width:0!important;overflow:hidden}
 .document-table th:nth-child(3) .sort-column{white-space:nowrap}
 .document-table thead th:first-child{border-top-left-radius:11px}
 .document-table thead th:last-child{border-top-right-radius:11px}
 .document-table tbody tr:last-child td:first-child{border-bottom-left-radius:11px}
 .document-table tbody tr:last-child td:last-child{border-bottom-right-radius:11px}
}
html[data-theme="dark"] .document-table .file-controls button,
html[data-theme="dark"] .document-table .file-controls .file-icon-action{color:#a9d5ff}
html[data-theme="dark"] .document-table .file-controls button:hover,
html[data-theme="dark"] .document-table .file-controls button:focus-visible{background:#35516a!important;color:#b4d9ff!important}
html[data-theme="dark"] .document-table .file-controls form button:hover,
html[data-theme="dark"] .document-table .file-controls form button:focus-visible{color:#ff7788!important}

/* v9.1: fix remaining table regressions without affecting uploads. */
@media(min-width:761px){
 html[data-theme="dark"] .shell>main>header{background:#172433!important}
 .document-table tbody td:nth-child(3){white-space:nowrap!important;overflow-wrap:normal!important;word-break:keep-all!important}
 .document-table thead th:nth-child(5){text-align:right!important}
 .document-table thead th:nth-child(5) .sort-column{margin-left:auto!important}
 .tablewrap{border-radius:12px!important}
 .document-table{border-radius:12px 12px 0 0!important}
 .document-table thead{background-clip:padding-box}
 .document-table thead tr th:first-child{border-top-left-radius:12px!important}
 .document-table thead tr th:last-child{border-top-right-radius:12px!important}
}
html[data-theme="dark"] .document-table td.file-controls .danger,
html[data-theme="dark"] .document-table td.file-controls .delete-file{color:#a9d5ff!important}
html[data-theme="dark"] .document-table td.file-controls .danger:hover,
html[data-theme="dark"] .document-table td.file-controls .delete-file:hover,
html[data-theme="dark"] .document-table td.file-controls .danger:focus-visible,
html[data-theme="dark"] .document-table td.file-controls .delete-file:focus-visible{color:#ff7788!important;background:#35516a!important}

/* v9.2: single folder toolbar, preserving the existing segmented view switch. */
@media(min-width:900px){
 .page>.top{display:flex;align-items:flex-end;gap:12px;flex-wrap:nowrap}
 .page>.top>div:first-child{min-width:0;flex:1}
 .page>.top .title-line{min-width:0}
 .page>.top .title-line h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .page>.top .primary-actions{padding-top:0;flex:none;align-items:center}
 .page>.top .view-switch{flex:none;margin-bottom:0}
 .page>.top .primary-actions button,
 .page>.top .folder-settings-toggle{height:44px!important;min-height:44px!important;box-sizing:border-box;border-radius:10px}
 .page>.top .primary-actions button{background:#294862;color:#d8eaff;border:1px solid #52748f;display:inline-flex;align-items:center;justify-content:center;gap:8px}
 .page>.top .primary-actions button:hover,.page>.top .folder-settings-toggle:hover{background:#355a79;color:#fff;border-color:#7295b4}
 .page>.top .view-switch{height:44px;box-sizing:border-box;align-items:center}
 .page>.top .view-switch-button{height:36px}
}
@media(max-width:899px){
 .page>.top{flex-wrap:wrap;align-items:center}
 .page>.top>div:first-child{flex-basis:100%}
 .page>.top .primary-actions{padding-top:0}
 .page>.top .view-switch{margin-left:auto}
}

/* v9.3: opaque sticky search header in light mode, without layout changes. */
@media(min-width:761px){
 html:not([data-theme="dark"]) .shell>main>header,
 html[data-theme="light"] .shell>main>header{background:#fff!important}
}
/* v9.4: delete icons alone turn red; hover surface matches other icon actions. */
.document-table td.file-controls button.file-icon-action:is(.danger,.delete-file){
 color:#477da8!important;background:transparent!important;
}
.document-table td.file-controls button.file-icon-action:is(.danger,.delete-file):is(:hover,:focus-visible){
 color:#d8273e!important;background:#e5f1fc!important;
}
html[data-theme="dark"] .document-table td.file-controls button.file-icon-action:is(.danger,.delete-file){
 color:#a9d5ff!important;background:transparent!important;
}
html[data-theme="dark"] .document-table td.file-controls button.file-icon-action:is(.danger,.delete-file):is(:hover,:focus-visible){
 color:#ff526c!important;background:#35516a!important;
}

/* v9.5: cached document preview thumbnails and TIFF page controls. */
.document-card-thumb .document-generated-thumb{display:block;width:100%;height:100%;object-fit:contain;background:#f1f4f7}
.document-card-thumb .thumbnail-fallback{display:none}
.document-card-thumb.thumbnail-unavailable .thumbnail-fallback{display:block}
.tiff-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;min-height:0}
.tiff-preview>img{display:block;max-width:100%;max-height:calc(100% - 46px);object-fit:contain}
.tiff-page-nav{display:flex;align-items:center;justify-content:center;gap:18px;color:inherit}
.tiff-page-nav[hidden]{display:none}
.tiff-page-nav button{min-width:38px;min-height:34px}

/* v9.6: identical compact grid layout for folders and files. */
#documents-grid .document-card{
 display:flex!important;flex-direction:column!important;min-width:0!important;
}
#documents-grid .document-card-thumb{
 height:auto!important;aspect-ratio:1.75!important;flex:none!important;
}
#documents-grid .mixed-folder-grid-link{
 display:contents!important;text-decoration:none!important;color:inherit!important;
}
#documents-grid .document-card-footer{
 min-height:0!important;height:auto!important;padding:9px 11px 3px!important;
 display:flex!important;align-items:flex-start!important;
}
#documents-grid .document-card-name{
 display:-webkit-box!important;-webkit-box-orient:vertical!important;
 -webkit-line-clamp:2!important;line-clamp:2!important;overflow:hidden!important;
 white-space:normal!important;overflow-wrap:anywhere!important;
 font-size:13px!important;line-height:1.35!important;
}
#documents-grid .folder-grid-actions{
 margin-top:auto!important;min-height:41px!important;padding:2px 9px 6px!important;
 display:flex!important;align-items:center!important;gap:5px!important;
}
#documents-grid .folder-grid-action-spacer{flex:1 1 auto!important;}
#documents-grid .folder-grid-actions .grid-download{
 flex:0 0 29px!important;width:29px!important;height:29px!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 border-radius:7px!important;
}
#documents-grid .folder-grid-actions form.inline{display:inline-flex!important;margin:0!important;padding:0!important;}
#documents-grid .folder-grid-actions .grid-check-hit{flex:0 0 28px!important;}
#documents-grid .folder-grid-actions .grid-download:hover,
#documents-grid .folder-grid-actions .grid-download:focus-visible{
 background:#e3f0fc!important;
}
html[data-theme="dark"] #documents-grid .folder-grid-actions .grid-download:hover,
html[data-theme="dark"] #documents-grid .folder-grid-actions .grid-download:focus-visible{
 background:#34506a!important;
}

/* v9.7: shared table corner fix (members, shares and future admin tables).
   Scope to non-document tables so file-list scrolling stays unchanged. */
.page > .tablewrap:has(> table:not(.document-table)){
 border-radius:12px!important;
 overflow:hidden!important;
 isolation:isolate;
 background-clip:padding-box;
}
.page > .tablewrap > table:not(.document-table){
 border-collapse:separate!important;
 border-spacing:0!important;
 width:100%;
 margin:0!important;
 border:0!important;
 border-radius:inherit;
}
.page > .tablewrap > table:not(.document-table) thead tr:first-child > th:first-child{
 border-top-left-radius:11px!important;
}
.page > .tablewrap > table:not(.document-table) thead tr:first-child > th:last-child{
 border-top-right-radius:11px!important;
}
.page > .tablewrap > table:not(.document-table) tbody tr:last-child > td:first-child{
 border-bottom-left-radius:11px!important;
}
.page > .tablewrap > table:not(.document-table) tbody tr:last-child > td:last-child{
 border-bottom-right-radius:11px!important;
}
@media(max-width:760px){
 .page > .tablewrap:has(> table:not(.document-table)){
  overflow-x:auto!important;
  overflow-y:hidden!important;
 }
}

/* v9.8: one-line filename, keep extension and give the saved row height to thumbnails. */
#documents-grid .document-card-footer{padding:8px 11px 3px!important;flex:0 0 auto!important;min-height:0!important}
#documents-grid .document-card-name.file-card-name{
 display:flex!important;align-items:baseline!important;width:100%!important;
 min-width:0!important;max-width:100%!important;white-space:nowrap!important;
 overflow:hidden!important;line-height:19px!important;height:19px!important;
}
#documents-grid .file-name-stem{
 display:block!important;flex:0 1 auto!important;min-width:0!important;
 white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
#documents-grid .file-name-extension{
 display:block!important;flex:0 0 auto!important;white-space:nowrap!important;
}
#documents-grid .document-card-thumb{
 aspect-ratio:1.55!important;
}
/* v9.9: breadcrumbs occupy the full content width, independently of folder actions. */
.page>.breadcrumbs{display:flex;width:100%;max-width:100%;min-width:0;box-sizing:border-box;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:20px;overflow-wrap:anywhere}
.page>.top{width:100%;max-width:100%}

/* v10.0: consistent compact preview controls and matching dark folder actions. */
.file-preview .preview-toolbar-actions{gap:8px!important}
.file-preview .preview-toolbar-actions #preview-counter{margin-right:12px!important}
.file-preview .preview-toolbar-actions :is(#preview-share,#preview-download,#preview-close){
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 width:38px!important;height:38px!important;min-width:38px!important;
 margin:0!important;padding:0!important;box-sizing:border-box!important;
 border-radius:10px!important;
}
.file-preview .preview-toolbar-actions :is(#preview-share,#preview-download,#preview-close) svg{
 width:21px!important;height:21px!important;stroke:currentColor!important;
}
.file-preview .preview-arrow{
 display:grid!important;place-items:center!important;
 width:42px!important;height:42px!important;padding:0!important;
}
.file-preview .preview-arrow svg{
 width:24px!important;height:24px!important;stroke:currentColor!important;
 stroke-width:2!important;fill:none!important;
}
@media(min-width:900px){
 html[data-theme="dark"] .page>.top .primary-actions button{
  background:#2b4158!important;border:1px solid #7298b9!important;
  color:#d8ebff!important;
 }
 html[data-theme="dark"] .page>.top .primary-actions button:hover{
  background:#385975!important;border-color:#a1c5e6!important;color:#fff!important;
 }
}
@media(max-width:899px){
 html[data-theme="dark"] .page>.top .primary-actions button{
  background:#2b4158!important;border-color:#7298b9!important;color:#d8ebff!important;
 }
 html[data-theme="dark"] .page>.top .primary-actions button:hover{
  background:#385975!important;border-color:#a1c5e6!important;color:#fff!important;
 }
}

/* v10.1 — Gear is the reference for toolbar styling in both themes. */
html:not([data-theme="dark"]) .page>.top .primary-actions button{
 background:#f4f7fb!important;color:#496a87!important;border:1px solid #e0eaf3!important;
 box-shadow:none!important;
}
html:not([data-theme="dark"]) .page>.top .primary-actions button:is(:hover,:focus-visible){
 background:#e1effc!important;color:#496a87!important;border-color:#6b9bca!important;
}
html[data-theme="dark"] .page>.top .primary-actions button{
 background:#2b4158!important;color:#d8ebff!important;border:1px solid #7298b9!important;
 box-shadow:none!important;
}
html[data-theme="dark"] .page>.top .primary-actions button:is(:hover,:focus-visible){
 background:#385975!important;color:#fff!important;border-color:#a1c5e6!important;
}
/* Preserve the segmented list/grid switch; apply the same hover feedback to each option. */
html:not([data-theme="dark"]) .page>.top .view-switch .view-switch-button:is(:hover,:focus-visible){
 background:#e1effc!important;color:#496a87!important;
 box-shadow:inset 0 0 0 1px #6b9bca!important;
}
html[data-theme="dark"] .page>.top .view-switch .view-switch-button:is(:hover,:focus-visible){
 background:#385975!important;color:#fff!important;
 box-shadow:inset 0 0 0 1px #a1c5e6!important;
}
/* v10.3: use the actual button classes rather than relying on data-lucide,
   which Lucide replaces with SVGs. Every hover selector is at least as
   specific as its corresponding resting selector. */
html:not([data-theme="dark"]) :is(
 #documents-list .document-table td.file-controls button.file-icon-action.danger,
 #documents-list .document-table td.file-controls button.file-icon-action.delete-file,
 #documents-grid .folder-grid-actions button.grid-download:has(.lucide-trash),
 .folder-menu button.danger:has(.lucide-trash-2),
 .bulk-toolbar button.bulk-trash
){color:#527c9e!important}
html[data-theme="dark"] :is(
 #documents-list .document-table td.file-controls button.file-icon-action.danger,
 #documents-list .document-table td.file-controls button.file-icon-action.delete-file,
 #documents-grid .folder-grid-actions button.grid-download:has(.lucide-trash),
 .folder-menu button.danger:has(.lucide-trash-2),
 .bulk-toolbar button.bulk-trash
){color:#a9d5ff!important}
html:not([data-theme="dark"]) :is(
 #documents-list .document-table td.file-controls button.file-icon-action.danger,
 #documents-list .document-table td.file-controls button.file-icon-action.delete-file,
 #documents-grid .folder-grid-actions button.grid-download:has(.lucide-trash),
 .folder-menu button.danger:has(.lucide-trash-2),
 .bulk-toolbar button.bulk-trash
):is(:hover,:focus-visible){
 color:#d8273e!important;background:#e1effc!important;
 box-shadow:inset 0 0 0 1px #6b9bca!important;
}
html[data-theme="dark"] :is(
 #documents-list .document-table td.file-controls button.file-icon-action.danger,
 #documents-list .document-table td.file-controls button.file-icon-action.delete-file,
 #documents-grid .folder-grid-actions button.grid-download:has(.lucide-trash),
 .folder-menu button.danger:has(.lucide-trash-2),
 .bulk-toolbar button.bulk-trash
):is(:hover,:focus-visible){
 color:#ff7888!important;background:#385975!important;
 box-shadow:inset 0 0 0 1px #a1c5e6!important;
}
html :is(
 #documents-list .document-table td.file-controls button.file-icon-action.danger,
 #documents-list .document-table td.file-controls button.file-icon-action.delete-file,
 #documents-grid .folder-grid-actions button.grid-download:has(.lucide-trash),
 .folder-menu button.danger:has(.lucide-trash-2),
 .bulk-toolbar button.bulk-trash
) svg{stroke:currentColor!important;color:inherit!important}

/* v10.4 — desktop sidebar/header rhythm and footer brand placement.
   Header and sidebar start from the same 16px top inset; sidebar footer
   stays in normal flex flow so a long tree scrolls independently. */
@media(min-width:761px){
 .shell>aside{padding-top:16px!important;padding-bottom:16px!important;display:flex;flex-direction:column;min-height:0}
 .shell>aside>nav{margin:0!important;padding:0!important;flex:1 1 auto;min-height:0}
 .shell>aside>nav>a:first-child{margin-top:0!important}
 .shell>aside>.bottom{position:static!important;flex:none!important;margin:0 0 0!important;padding:16px 0 0!important;max-width:none!important}
 .shell>aside>.bottom #footer-quip{display:block;margin:0 0 16px!important;line-height:1.5}
 .shell>aside>.bottom .brand{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:11px!important;margin:0!important;padding:0!important;text-decoration:none!important}
 .shell>aside>.bottom .brand .brand-cloud-image{width:69px!important;height:69px!important;flex:0 0 69px!important}
 .shell>main>header{padding-top:0!important;padding-bottom:0!important}
}

/* v10.5 — shared surface tokens and 30px desktop rhythm.
   One token controls search, selected navigation and grid cards. */
:root{
 --drive-unified-surface:#e8f3ff;
 --drive-unified-border:#d5e5f4;
}
html[data-theme="dark"]{
 --drive-unified-surface:#263f59;
 --drive-unified-border:#45617d;
}
@media(min-width:761px){
 .shell>aside{
  padding:30px!important;
 }
 .shell>aside>nav>a:first-child{
  margin:0!important;
  min-height:44px!important;
  display:flex!important;align-items:center!important;
 }
 .shell>main>header{
  height:104px!important;min-height:104px!important;
  padding:30px!important;
  box-sizing:border-box!important;
  align-items:center!important;
 }
 .shell>main>header .search{
  height:44px!important;min-height:44px!important;
  margin:0!important;box-sizing:border-box!important;
 }
 .shell>main>header .search input{margin:0!important}
 .shell>main>header .search button{
  background:#f4f7fa!important;color:#496a87!important;
  border:1px solid #e5ebf2!important;
  border-radius:9px!important;box-shadow:none!important;
  transition:background-color .15s,border-color .15s,color .15s!important;
 }
 .shell>main>header .search button:is(:hover,:focus-visible){
  background:#e1effc!important;color:#496a87!important;
  border-color:#6b9bca!important;
 }
 html[data-theme="dark"] .shell>main>header .search button{
  background:#2b4158!important;color:#d8ebff!important;
  border-color:#7298b9!important;
 }
 html[data-theme="dark"] .shell>main>header .search button:is(:hover,:focus-visible){
  background:#385975!important;color:#fff!important;
  border-color:#a1c5e6!important;
 }
}
/* Equal background in search, selected sidebar item and every grid card. */
html .shell>main>header .search,
html .shell>aside nav>a.active,
html .shell>aside nav .tree-heading.active,
html .shell>aside nav .tree-group.tree-active>.tree-heading,
html #documents-grid .document-card,
html .folders .folder{
 background:var(--drive-unified-surface)!important;
}
html #documents-grid .document-card,
html .folders .folder{
 border-color:var(--drive-unified-border)!important;
}
html[data-theme="dark"] .shell>main>header .search,
html[data-theme="dark"] .shell>aside nav>a.active,
html[data-theme="dark"] .shell>aside nav .tree-heading.active,
html[data-theme="dark"] .shell>aside nav .tree-group.tree-active>.tree-heading,
html[data-theme="dark"] #documents-grid .document-card,
html[data-theme="dark"] .folders .folder{
 background:var(--drive-unified-surface)!important;
}

/* v10.6 — fix inner search field, align header to sidebar, icon-only logout. */
@media(min-width:761px){
 .shell>aside{padding:30px!important}
 .shell>aside>nav>a:first-child{margin-top:0!important}
 .shell>main>header{
  height:104px!important;min-height:104px!important;
  padding:30px!important;align-items:center!important;
 }
 .shell>main>header form.search{
  display:flex!important;align-items:center!important;
  height:44px!important;min-height:44px!important;
  padding:4px 5px 4px 14px!important;margin:0!important;
  border-radius:12px!important;
  background:var(--drive-unified-surface)!important;
 }
 .shell>main>header form.search>input[type="search"]{
  appearance:none!important;-webkit-appearance:none!important;
  display:block!important;min-width:0!important;flex:1 1 auto!important;
  height:34px!important;min-height:0!important;
  margin:0!important;padding:0 10px!important;
  border:0!important;border-radius:0!important;
  outline:none!important;box-shadow:none!important;
  background:transparent!important;background-color:transparent!important;
  color:inherit!important;
 }
 .shell>main>header form.search>input[type="search"]:focus{
  background:transparent!important;box-shadow:none!important;
 }
 .shell>main>header form.search>button[type="submit"]{
  flex:none!important;height:34px!important;
  padding:0 14px!important;
  background:#f4f7fa!important;color:#496a87!important;
  border:1px solid #e5ebf2!important;border-radius:9px!important;
 }
 .shell>main>header form.search>button[type="submit"]:is(:hover,:focus-visible){
  background:#e1effc!important;color:#496a87!important;
  border-color:#6b9bca!important;
 }
 html[data-theme="dark"] .shell>main>header form.search>button[type="submit"]{
  background:#2b4158!important;color:#d8ebff!important;border-color:#7298b9!important;
 }
 html[data-theme="dark"] .shell>main>header form.search>button[type="submit"]:is(:hover,:focus-visible){
  background:#385975!important;color:#fff!important;border-color:#a1c5e6!important;
 }
}
.shell>main>header .account form{margin:0!important}
:is(.shell>main>header .account,.shell>aside .nav-bottom-links) .logout-icon-button{
 display:grid!important;place-items:center!important;
 width:38px!important;height:38px!important;min-width:38px!important;
 padding:0!important;border-radius:9px!important;
 background:#f4f7fa!important;color:#496a87!important;
 border:1px solid #e5ebf2!important;box-shadow:none!important;
 cursor:pointer!important;
}
:is(.shell>main>header .account,.shell>aside .nav-bottom-links) .logout-icon-button svg{
 width:19px!important;height:19px!important;
 stroke:currentColor!important;color:inherit!important;
}
:is(.shell>main>header .account,.shell>aside .nav-bottom-links) .logout-icon-button:is(:hover,:focus-visible){
 background:#e1effc!important;color:#496a87!important;
 border-color:#6b9bca!important;
}
html[data-theme="dark"] :is(.shell>main>header .account,.shell>aside .nav-bottom-links) .logout-icon-button{
 background:#2b4158!important;color:#d8ebff!important;border-color:#7298b9!important;
}
html[data-theme="dark"] :is(.shell>main>header .account,.shell>aside .nav-bottom-links) .logout-icon-button:is(:hover,:focus-visible){
 background:#385975!important;color:#fff!important;border-color:#a1c5e6!important;
}

/* v10.7 — visible label beside logout icon; retain gear-button styling. */
:is(.shell>main>header .account,.shell>aside .nav-bottom-links) .logout-icon-button{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 gap:8px!important;width:auto!important;min-width:0!important;
 height:38px!important;padding:0 12px!important;
 white-space:nowrap!important;font-size:13px!important;font-weight:600!important;
}
:is(.shell>main>header .account,.shell>aside .nav-bottom-links) .logout-icon-button svg{flex:none!important}

/* v10.8 — mobile action bar: settings, new folder, upload, existing view switch. */
.mobile-action-bar{display:none}
@media(max-width:760px){
 .page>.top{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important}
 .page>.top>div:first-child{width:100%!important;flex-basis:auto!important}
 .page>.top .title-line{margin-bottom:0!important}
 .page>.top .title-line h1{margin-bottom:0!important}
 .page>.top .mobile-action-bar{
  display:flex!important;align-items:center!important;gap:8px!important;
  width:100%!important;margin:0!important;padding:0!important;
  flex-wrap:nowrap!important;min-width:0!important;
 }
 .page>.top .mobile-action-bar .folder-actions{
  position:relative!important;flex:0 0 auto!important;
  margin:0!important;padding:0!important;
 }
 .page>.top .mobile-action-bar .folder-settings-toggle,
 .page>.top .mobile-action-bar .primary-actions button{
  display:grid!important;place-items:center!important;
  width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;
  padding:0!important;margin:0!important;box-sizing:border-box!important;
  border-radius:10px!important;
  background:#f4f7fa!important;color:#496a87!important;
  border:1px solid #e5ebf2!important;box-shadow:none!important;
 }
 .page>.top .mobile-action-bar .primary-actions{
  display:flex!important;align-items:center!important;gap:8px!important;
  width:auto!important;flex:0 0 auto!important;
  margin:0!important;padding:0!important;flex-wrap:nowrap!important;
 }
 .page>.top .mobile-action-bar .primary-actions button span{display:none!important}
 .page>.top .mobile-action-bar .primary-actions button svg,
 .page>.top .mobile-action-bar .folder-settings-toggle svg{
  width:20px!important;height:20px!important;stroke:currentColor!important;color:inherit!important;
 }
 .page>.top .mobile-action-bar .folder-settings-toggle:is(:hover,:focus-visible,:active),
 .page>.top .mobile-action-bar .primary-actions button:is(:hover,:focus-visible,:active){
  background:#e1effc!important;color:#496a87!important;border-color:#6b9bca!important;
 }
 html[data-theme="dark"] .page>.top .mobile-action-bar .folder-settings-toggle,
 html[data-theme="dark"] .page>.top .mobile-action-bar .primary-actions button{
  background:#2b4158!important;color:#d8ebff!important;border-color:#7298b9!important;
 }
 html[data-theme="dark"] .page>.top .mobile-action-bar .folder-settings-toggle:is(:hover,:focus-visible,:active),
 html[data-theme="dark"] .page>.top .mobile-action-bar .primary-actions button:is(:hover,:focus-visible,:active){
  background:#385975!important;color:#fff!important;border-color:#a1c5e6!important;
 }
 .page>.top .mobile-action-bar .view-switch{
  display:flex!important;flex:0 0 auto!important;margin:0 0 0 auto!important;
  height:44px!important;min-height:44px!important;align-items:center!important;
 }
 .page>.top .mobile-action-bar .view-switch-button{
  width:35px!important;height:35px!important;
 }
 .page>.top .mobile-action-bar .folder-menu{
  z-index:65!important;
 }
 .page .documents-heading .sectionhead{margin-top:18px!important}
 .page .mobile-sort-bar button#mobile-sort-direction{
  display:grid!important;place-items:center!important;
  flex:0 0 44px!important;width:44px!important;height:44px!important;
  padding:0!important;border-radius:10px!important;
  background:#2b4158!important;color:#d8ebff!important;
  border:1px solid #7298b9!important;box-shadow:none!important;
 }
 .page .mobile-sort-bar button#mobile-sort-direction:is(:hover,:focus-visible,:active){
  background:#385975!important;color:#fff!important;border-color:#a1c5e6!important;
 }
 html:not([data-theme="dark"]) .page .mobile-sort-bar button#mobile-sort-direction{
  background:#f4f7fa!important;color:#496a87!important;border-color:#e5ebf2!important;
 }
 html:not([data-theme="dark"]) .page .mobile-sort-bar button#mobile-sort-direction:is(:hover,:focus-visible,:active){
  background:#e1effc!important;color:#496a87!important;border-color:#6b9bca!important;
 }
 .page .mobile-sort-bar button#mobile-sort-direction svg{
  width:20px!important;height:20px!important;stroke:currentColor!important;
 }
 .page .mobile-sort-bar select{margin:0!important;min-height:44px!important}
}

/* v10.9 — mobile dialog/menu spacing and explicit sort icon visibility. */
#newfolder .newfolder-dialog-actions{
 display:flex!important;align-items:stretch!important;gap:12px!important;
 margin-top:20px!important;flex-wrap:wrap!important;
}
#newfolder .newfolder-dialog-actions>button{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 min-height:44px!important;margin:0!important;padding:10px 20px!important;
 border-radius:10px!important;font-size:14px!important;font-weight:600!important;
}
#newfolder .newfolder-dialog-actions>.newfolder-cancel{
 background:#f4f7fa!important;color:#496a87!important;
 border:1px solid #e5ebf2!important;
}
#newfolder .newfolder-dialog-actions>.newfolder-cancel:is(:hover,:focus-visible){
 background:#e1effc!important;border-color:#6b9bca!important;
}
html[data-theme="dark"] #newfolder .newfolder-dialog-actions>.newfolder-cancel{
 background:#2b4158!important;color:#d8ebff!important;border-color:#7298b9!important;
}
html[data-theme="dark"] #newfolder .newfolder-dialog-actions>.newfolder-cancel:is(:hover,:focus-visible){
 background:#385975!important;color:#fff!important;border-color:#a1c5e6!important;
}
.folder-actions .folder-menu>form:last-child{
 margin-top:18px!important;padding-top:16px!important;
 border-top:1px solid #829ab450!important;
}
.folder-actions .folder-menu>form:last-child>button{margin-top:2px!important}
.mobile-sort-bar #mobile-sort-direction svg,
.sort-column .sort-arrow{
 display:block!important;visibility:visible!important;
 stroke:currentColor!important;color:inherit!important;fill:none!important;
}
.mobile-sort-bar #mobile-sort-direction svg{width:22px!important;height:22px!important}
.sort-column.selected .sort-arrow{opacity:1!important}
@media(max-width:760px){
 .page>.top .mobile-action-bar .folder-actions .folder-menu{
  top:calc(100% + 12px)!important;margin-top:0!important;
  max-width:min(340px,calc(100vw - 44px))!important;
  left:0!important;right:auto!important;
 }
 .page>.top .mobile-action-bar .folder-menu>form:last-child{
  margin-top:20px!important;padding-top:18px!important;
 }
}

/* v11.0 — tighter delete separation and aligned, smaller grid checkboxes. */
@media(max-width:760px){
 .page>.top .mobile-action-bar .folder-menu>form:last-child{
  margin-top:12px!important;padding-top:12px!important;
 }
}
#documents-grid input[type="checkbox"].grid-check,
#documents-grid input[type="checkbox"].grid-folder-check{
 width:14px!important;height:14px!important;
 min-width:14px!important;min-height:14px!important;
 margin:0!important;vertical-align:middle!important;
}
#documents-grid .folder-grid-actions .grid-check-hit,
#documents-grid .document-card-footer .grid-check-hit{
 display:grid!important;place-items:center!important;
 flex:0 0 29px!important;width:29px!important;height:29px!important;
 min-width:29px!important;min-height:29px!important;
 margin:0!important;padding:0!important;align-self:center!important;
 cursor:pointer!important;
}
#documents-grid .folder-grid-actions,
#documents-grid .document-card-footer{
 align-items:center!important;
}
#documents-grid .folder-grid-actions .grid-check-hit input,
#documents-grid .document-card-footer .grid-check-hit input{
 position:static!important;transform:none!important;
}

/* v11.1 — list checkboxes: 13px visual square inside 40px touch target. */
#documents-list .document-table .bulk-check-cell{
 width:50px!important;min-width:50px!important;
 padding:0 5px!important;vertical-align:middle!important;
}
#documents-list .document-table .bulk-check-cell .list-check-hit{
 display:grid!important;place-items:center!important;
 width:40px!important;height:40px!important;
 min-width:40px!important;min-height:40px!important;
 margin:0 auto!important;padding:0!important;
 cursor:pointer!important;
}
#documents-list .document-table .bulk-check-cell .list-check-hit>input[type="checkbox"]{
 appearance:auto!important;-webkit-appearance:checkbox!important;
 display:block!important;position:static!important;
 width:13px!important;height:13px!important;
 min-width:13px!important;min-height:13px!important;
 max-width:13px!important;max-height:13px!important;
 margin:0!important;padding:0!important;
 transform:none!important;box-shadow:none!important;
 accent-color:#3688d7!important;cursor:pointer!important;
}

/* v11.2 — destination selection for uploads launched from Home. */
.upload-chooser .upload-target-label{
 display:flex;flex-direction:column;gap:8px;
 margin:12px 0 16px;font-weight:600;
}
.upload-chooser .upload-target-label select{
 display:block;width:100%;min-height:44px;
 padding:9px 12px;border-radius:10px;
 background:var(--drive-unified-surface, #f4f7fa);
 color:inherit;border:1px solid #7298b9;
 font:inherit;
}
.upload-chooser #upload-target-error{
 color:#d8273e;font-size:13px;margin:0 0 10px;
}
html[data-theme="dark"] .upload-chooser .upload-target-label select{
 background:#2b4158;color:#d8ebff;border-color:#7298b9;
}

/* Mobile list: reserve the full selection target width before the name. */
@media(max-width:760px){
 #documents-list .document-table tbody tr:is(.document-row,.mixed-folder-row)>td.bulk-check-cell:first-child{
  flex:0 0 40px!important;
  width:40px!important;min-width:40px!important;
  padding:0!important;
 }
}

/* Exact supplied Montebello logo; retain the existing sidebar insets. */
.shell>aside>.bottom .brand{display:block!important;width:100%!important;min-width:0!important}
.shell>aside>.bottom .brand .montebello-logo{display:block!important;width:100%!important;height:auto!important;max-width:100%!important;object-fit:contain!important}
.mobile-top .mobile-brand .montebello-logo{display:block!important;width:auto!important;height:auto!important;max-width:min(240px,100%)!important;max-height:54px!important;flex:0 1 auto!important;object-fit:contain!important}

/* Desktop sidebar: let the tree use the available height, with actions below. */
@media(min-width:761px){
 .shell>aside>nav>a:first-child{flex:0 0 auto!important}
 .shell>aside>nav .tree-group,
 .shell>aside>nav .tree-group.tree-active{
  flex:0 1 auto!important;min-height:0!important;max-height:none!important;
  overflow:hidden!important;
 }
 .shell>aside>nav .tree-group .folder-tree,
 .shell>aside>nav .tree-group.tree-active .folder-tree{
  flex:0 1 auto!important;min-height:0!important;max-height:none!important;
  overflow-y:auto!important;
 }
 .shell>aside .nav-bottom-links .sidebar-logout{
  display:block;margin:3px 0!important;width:100%;flex:0 0 auto;
 }
 .shell>aside .nav-bottom-links .sidebar-logout .logout-icon-button{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  width:100%!important;gap:12px!important;padding:0 16px!important;
  box-sizing:border-box!important;
 }
 .shell>aside .nav-bottom-links .sidebar-logout .logout-icon-button svg{
  width:18px!important;height:18px!important;flex:0 0 18px!important;
 }
 .shell>main>header .account{flex:0 1 280px;min-width:0;max-width:38%}
 .shell>main>header .account #footer-quip{
  display:block;margin:0;color:#92a0b1;font-size:13px;line-height:1.5;
  text-align:right;overflow-wrap:anywhere;
 }
 html[data-theme="dark"] .shell>main>header .account #footer-quip{color:#afc1d4}
}

/* Consistent section dividers, sidebar action height and secondary login note. */
:root{--drive-section-divider:#f1f3f7}
html[data-theme="dark"]{--drive-section-divider:#2a3b4e}
html .login-v3 .login-card>small{color:#97a3b1}
html[data-theme="dark"] .login-v3 .login-card>small{color:#7f91a4}
@media(min-width:761px){
 .shell>main>header{border-bottom:1px solid var(--drive-section-divider)!important}
 /* Extend the nav's clipping box, keeping all menu content at its existing inset. */
 .shell>aside>nav{margin-inline:-30px!important;padding-inline:30px!important}
 .shell>aside>nav .nav-bottom-links .nav-members-divider{
  flex:none!important;height:1px!important;margin:4px -30px 10px!important;
  background:none!important;border:0!important;
  border-top:1px solid var(--drive-section-divider)!important;
 }
 .shell>aside .nav-bottom-links .sidebar-logout .logout-icon-button{
  height:42px!important;min-height:42px!important;
 }
}

/* User editor: quiet outlined cancel action in both themes. */
.member-dialog-actions .member-cancel{background:transparent;color:inherit;border:1px solid #9aaec2}
.member-dialog-actions .member-cancel:hover{background:rgba(81,130,177,.08)}
html[data-theme="dark"] .member-dialog-actions .member-cancel{background:transparent;color:#e4edf8;border-color:#70879e}
html[data-theme="dark"] .member-dialog-actions .member-cancel:hover{background:rgba(164,202,240,.08)}
#edit-member-password-help{display:block;margin-bottom:20px;line-height:1.5}
#edit-member-dialog{max-height:calc(100dvh - 32px);overflow-y:auto}

/* Navigation uses the modal top layer, including when a form dialog is open. */
#drive-navigation-status{
 position:fixed;inset:0;margin:0;padding:0;border:0;border-radius:0;
 width:100%;height:100%;max-width:none;max-height:none;
 background:transparent!important;border:0!important;outline:none;
 box-shadow:none!important;overflow:hidden;cursor:wait;
}
#drive-navigation-status:not([open]){display:none}
#drive-navigation-status[open]{display:grid;place-items:center}
#drive-navigation-status::backdrop{background:transparent}
#drive-navigation-status.is-visible::backdrop{background:rgba(19,39,62,.22)}
html[data-theme="dark"] #drive-navigation-status.is-visible::backdrop{background:rgba(210,230,250,.10)}
.drive-busy-spinner{
 width:44px;height:44px;border:4px solid #adc2d5;border-top-color:#1679db;
 border-radius:50%;visibility:hidden;animation:drive-busy-spin .8s linear infinite;
}
#drive-navigation-status.is-visible .drive-busy-spinner{visibility:visible}
html[data-theme="dark"] .drive-busy-spinner{border-color:#526b84;border-top-color:#76bcff}
.drive-busy-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@keyframes drive-busy-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.drive-busy-spinner{animation:none}}
#drive-navigation-error{
 position:fixed;top:18px;left:50%;transform:translateX(-50%);z-index:10001;
 display:flex;align-items:center;flex-wrap:wrap;gap:12px;max-width:calc(100% - 32px);
 width:max-content;padding:14px 18px;background:#fff;color:#233c55;
 border:1px solid #d5e5f4;border-radius:12px;box-shadow:0 4px 24px #152a4630;
}
#drive-navigation-error[hidden]{display:none}
#drive-navigation-error button{background:transparent;color:#1674d4;border:1px solid #9aaec2}
html[data-theme="dark"] #drive-navigation-error{background:#1b2c3d;color:#e4edf8;border-color:#45617d}
html[data-theme="dark"] #drive-navigation-error button{color:#a6d2ff;border-color:#70879e}


/* Compact folder names: retain sidebar width and a single, readable path. */
.shell aside .folder-tree{--tree-step:14px;--tree-row:34px;overflow-x:hidden!important}
.shell aside .folder-tree .tree-line{padding-left:14px!important;min-height:var(--tree-row)!important}
.shell aside .folder-tree .tree-line>.tree-link{
 display:flex!important;align-items:flex-start!important;gap:7px!important;
 width:100%;min-width:0!important;max-width:100%;padding:8px 0!important;margin:0!important;
 white-space:normal!important;text-overflow:clip!important;line-height:18px!important;
}
.shell aside .folder-tree .tree-symbol{
 display:flex;align-items:center;justify-content:center;width:16px;height:18px;flex:0 0 16px;
 overflow:hidden;font-size:15px;line-height:18px;
}
.shell aside .folder-tree .tree-symbol :is(svg,img){
 width:16px!important;height:16px!important;flex:none!important;margin:0!important;
}
.shell aside .folder-tree .tree-symbol .line-icon{stroke:currentColor!important}
.shell aside .folder-tree .tree-name{
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
 min-width:0;flex:1;overflow:hidden;overflow-wrap:anywhere;white-space:normal!important;
 line-height:18px!important;max-height:36px;
}
.shell aside .folder-tree .tree-children>.tree-node::before,
.shell aside .folder-tree .tree-children>.tree-node::after{left:22px!important}
.shell aside .folder-tree .tree-children>.tree-node::after{width:5px!important}

/* Match the upper navigation rows to the lower menu, including the gap. */
@media(min-width:761px){
 .shell>aside>nav>a:first-child,
 .shell>aside>nav .tree-group>.tree-heading{
  display:flex!important;align-items:center!important;gap:12px!important;
  height:42px!important;min-height:42px!important;line-height:18px!important;
  padding:12px 17px!important;font-size:15px!important;
 }
 .shell>aside>nav>a:first-child{margin:3px 0!important}
 .shell>aside>nav .tree-group{margin:3px 0!important}
 .shell>aside>nav .tree-group>.tree-heading{margin:0!important}
 .shell>aside>nav>a:first-child svg,
 .shell>aside>nav .tree-group>.tree-heading svg{width:18px!important;height:18px!important;flex:0 0 18px!important}
 .shell>main>header .header-appearance{flex:0 0 auto!important;max-width:none!important;margin-left:auto}
}
.shell>aside nav .folder-tree[hidden],
.shell>aside nav .tree-group:not(.tree-active)>.folder-tree{display:none!important}

/* A compact two-position theme switch, using the supplied original sun/moon SVGs. */
.theme-toggle{
 position:relative;display:inline-flex;align-items:center;justify-content:space-between;gap:0;
 flex:0 0 80px;width:80px;min-width:80px;height:40px;min-height:40px;
 margin:0;padding:4px 8px;border:1px solid #d7e3ef;border-radius:22px;
 background:#edf3f9;color:#60778d;box-shadow:none;isolation:isolate;
}
.theme-toggle-thumb{
 position:absolute;left:3px;top:3px;bottom:3px;width:34px;border-radius:50%;
 background:#fff;box-shadow:0 1px 4px #29435a20;z-index:-1;
 transition:transform .16s ease;
}
.theme-toggle svg{width:20px!important;height:20px!important;flex:0 0 20px;stroke:currentColor;pointer-events:none}
.theme-toggle .theme-sun{color:#1674d4}
.theme-toggle:focus-visible{outline:2px solid #1674d4;outline-offset:3px}
html[data-theme="dark"] .theme-toggle{background:#22394f;color:#8fa7bd;border-color:#435b73}
html[data-theme="dark"] .theme-toggle-thumb{transform:translateX(38px);background:#385570;box-shadow:none}
html[data-theme="dark"] .theme-toggle .theme-sun{color:#8fa7bd}
html[data-theme="dark"] .theme-toggle .theme-moon{color:#e2f1ff}
html[data-theme="dark"] .theme-toggle:focus-visible{outline-color:#a6d4ff}
@media(max-width:760px){
 .mobile-header-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
 .mobile-top .mobile-brand{flex:1 1 auto!important;min-width:0!important}
 .mobile-top .mobile-brand .montebello-logo{max-width:100%!important;max-height:48px!important}
 .mobile-top .theme-toggle{
  display:inline-flex!important;align-items:center!important;justify-content:space-between!important;
  width:80px!important;min-width:80px!important;height:44px!important;min-height:44px!important;
  padding:6px 8px!important;border:1px solid #d7e3ef!important;border-radius:24px!important;
  background:#edf3f9!important;color:#60778d!important;
 }
 .mobile-top .theme-toggle-thumb{top:5px;bottom:5px}
 .mobile-top .mobile-logout button{
  display:grid!important;place-items:center!important;width:44px!important;height:44px!important;
  min-width:44px!important;min-height:44px!important;padding:10px!important;border-radius:9px!important;
  color:#496a87!important;background:transparent!important;
 }
 .mobile-top .mobile-logout button svg{width:21px!important;height:21px!important;stroke:currentColor}
 html[data-theme="dark"] .mobile-top .theme-toggle{background:#22394f!important;color:#8fa7bd!important;border-color:#435b73!important}
 html[data-theme="dark"] .mobile-top .mobile-logout button{color:#c9e1f6!important}
 .mobile-top .mobile-logout button:focus-visible{outline:2px solid currentColor;outline-offset:-2px}
}
@media(prefers-reduced-motion:reduce){.theme-toggle-thumb{transition:none}}
