/* DeerDrive: white surfaces with blue controls and selected states. Display/body: Manrope + native CJK.
   DESIGN_VARIANCE 5 / MOTION_INTENSITY 3 / VISUAL_DENSITY 5.
   Rounded scale: surfaces 12px, controls 8px, compact badges 4px.
   Layers: sticky header 10, toast 20; dialogs use the native top layer. */
@font-face{font-family:Manrope;src:url('/fonts/manrope-latin.woff2') format('woff2');font-style:normal;font-weight:200 800;font-display:swap}
:root{color-scheme:light;--paper:#ffffff;--surface:#ffffff;--surface-soft:#ffffff;--ink:#203c55;--muted:#526f87;--line:#cbdfee;--accent:#1763c0;--primary-bg:#1763c0;--accent-ink:#ffffff;--accent-soft:#e8f2ff;--danger:#365f89;--danger-soft:#e1edfa;--shadow:0 16px 42px #28578012;--radius:12px;font-family:Manrope,"Segoe UI","Microsoft YaHei",sans-serif;font-size:14px;line-height:1.6;color:var(--ink);background:var(--paper)}
:root[data-theme=dark]{color-scheme:dark;--paper:#142333;--surface:#1d3043;--surface-soft:#283f55;--ink:#e5f3ff;--muted:#abc3d8;--line:#3b5670;--accent:#a8d7ff;--primary-bg:#a8d7ff;--accent-ink:#17334c;--accent-soft:#294c6c;--danger:#badbff;--danger-soft:#294866;--shadow:0 16px 42px #0c1d3030}
/* Shared interaction tokens: one light grey for hovered rows and menus, plus one hue per file kind
   for the filled badges. The hues stay the same in both themes: they are deep enough for the white
   marks inside them. --control-line is the faint grey every outline uses (buttons, file cards, the
   path field, checkboxes, badges); --control-ink is the soft dark used for their text and icons.
   Only the active page tab and the upload button keep the blue fill. */
:root{--hover-surface:#f6f8fa;--control-ink:#333b44;--control-line:#d5dae0;--icon-word:#1d4ed8;--icon-excel:#15803d;--icon-powerpoint:#c2410c;--icon-pdf:#b91c1c;--icon-document:#64748b;--icon-image:#6d28d9;--icon-archive:#b45309;--icon-video:#be123c;--icon-audio:#0f766e;--icon-code:#0369a1}
:root[data-theme=dark]{--hover-surface:#2b3b4d;--control-ink:#dbe7f2;--control-line:#3a4757}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}button:disabled{opacity:.5}h1,h2,h3,p{margin:0}h1{font-size:34px;line-height:1.35;font-weight:650;letter-spacing:-1px}h2{font-size:17px;font-weight:650}h3{font-size:15px;font-weight:650}small{font-size:12px}[hidden]{display:none!important}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:4px}input:focus,select:focus{outline:2px solid var(--accent);outline-offset:1px}button:active:not(:disabled),.button:active{transform:translateY(1px)}.icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-lg{width:28px;height:28px}.brand-mark{width:44px;height:44px;fill:none;stroke:currentColor;stroke-width:1.6}.muted{color:var(--muted)}.mono{font-family:Consolas,"SFMono-Regular",monospace;font-size:12px;font-variant-numeric:tabular-nums}.nowrap{white-space:nowrap}.break-word{overflow-wrap:anywhere}.section-label{font-size:12px;color:var(--accent);display:block;margin-bottom:12px;font-weight:600}.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:42px;padding:10px 17px;border:1px solid var(--control-line);border-radius:8px;background:var(--surface);color:var(--control-ink);font-weight:600;font-size:13px;white-space:nowrap;transition:background .15s,transform .15s}.button:hover{background:var(--surface-soft)}.button-primary{background:var(--primary-bg);border-color:var(--primary-bg);color:var(--accent-ink)}.button-primary:hover{background:color-mix(in srgb,var(--primary-bg),var(--accent) 12%)}.button-quiet{background:transparent}.button-sm{min-height:34px;padding:5px 12px;font-size:12px}.button-danger{background:var(--surface);border-color:var(--control-line);color:var(--control-ink)}.button-danger:hover{background:var(--surface-soft)}.icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:7px;border:0;border-radius:8px;background:transparent;color:var(--control-ink)}.icon-button:hover{background:var(--hover-surface);color:var(--control-ink)}.danger-hover:hover{background:var(--hover-surface);color:var(--control-ink)}.text-link{display:inline-flex;align-items:center;gap:9px;color:var(--control-ink);font-size:13px;font-weight:600;background:none;border:0;padding:0}.text-link:hover{text-decoration:underline;text-underline-offset:4px}.theme-toggle .icon:last-child{display:none}[data-theme=dark] .theme-toggle .icon:first-child{display:none}[data-theme=dark] .theme-toggle .icon:last-child{display:block}
/* A disabled control is inert, not busy: cursor:wait turned the wait spinner into the hover
   feedback for every disabled button — the file actions 剪切 / 粘贴 before anything is selected,
   the folder-history steps, the log pagination — so it read as "loading" instead of "unavailable". */
button:disabled{cursor:default}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);font-size:22px;font-weight:800;letter-spacing:-1px;white-space:nowrap}.brand>.icon{width:34px;height:40px;color:var(--accent);stroke-width:1.4}.brand-context{font-size:11px!important;font-weight:500!important;letter-spacing:0!important;border-left:1px solid var(--line);padding-left:12px;margin-left:2px;color:var(--muted)}
.site-header{width:100%;height:78px;max-width:1320px;padding:0 40px;margin:auto;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:30px;border-bottom:1px solid var(--line)}.header-actions{display:flex;align-items:center;gap:12px}.client-nav{display:flex;align-items:center;gap:6px;justify-content:center;height:100%}.nav-item{display:flex;align-items:center;gap:11px;font-size:13px;font-weight:550;color:var(--control-ink);padding:11px 17px;border:0;border-radius:8px;background:transparent;white-space:nowrap}.nav-item:hover{background-color:var(--hover-surface);color:var(--ink)}.nav-item.active{color:var(--accent);background:var(--accent-soft);font-weight:700}.account{display:flex;align-items:center;gap:8px;padding:0;background:none;border:0;color:var(--control-ink);font-size:12px;font-weight:600}.avatar{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:var(--accent-soft);color:var(--accent);font-size:13px;font-weight:700;flex-shrink:0}.account-name{max-width:115px;overflow:hidden;text-overflow:ellipsis}.client-workspace{min-height:100dvh;display:flex;flex-direction:column}.client-page{width:100%;max-width:1320px;margin:0 auto;padding:44px 28px;flex:1}.catalog-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:30px}.catalog-heading h1{font-size:38px;margin-bottom:10px}.catalog-heading .muted{font-size:14px}.catalog-search{margin-bottom:34px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}.file-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:15px;padding:16px 20px}.search{display:flex;align-items:center;gap:13px;color:var(--muted);min-width:0}.search input{border:0;background:transparent;color:var(--ink);font-size:14px;width:100%;padding:6px 0;min-width:0}.search input::placeholder{color:var(--muted)}.file-toolbar select{font-size:12px;background:var(--paper);border:1px solid var(--line);border-radius:8px;color:var(--ink);padding:8px 12px;max-width:200px}.catalog-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:38px}.catalog-rail{display:flex;flex-direction:column;border-right:1px solid var(--line);padding-right:26px}.catalog-rail h2{font-size:12px;margin-bottom:16px;color:var(--muted);font-weight:600}.folder-list{display:grid;gap:5px}.folder-link{width:100%;display:flex;align-items:center;gap:9px;border:0;background:transparent;border-radius:8px;text-align:left;color:var(--muted);font-size:12px;padding:10px}.folder-link>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.folder-link .icon{width:17px;height:17px}.folder-link small{margin-left:auto;font-size:11px;font-variant-numeric:tabular-nums}.folder-link.selected{background:var(--accent-soft);color:var(--accent);font-weight:650}.folder-link:hover{background:var(--surface-soft)}.rail-bottom{margin-top:64px}.rail-bottom>p{font-size:11px;display:flex;gap:8px;color:var(--muted);line-height:1.9;margin-top:24px}.rail-bottom>p>.icon{width:15px;height:15px;margin-top:3px}.storage-note{font-size:11px;color:var(--muted)}.storage-note>div{display:flex;justify-content:space-between;gap:10px}.storage-note strong{color:var(--ink);font-size:11px;font-weight:600}.storage-note progress{margin:12px 0 9px}.storage-note small{font-size:11px}.results-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;color:var(--muted);font-size:12px}.results-header h2{font-size:14px;color:var(--ink)}.count{font-family:Manrope,sans-serif;margin-left:7px;color:var(--muted);font-size:12px;font-weight:500}.resource-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.resource-item{border:1px solid var(--line);border-radius:var(--radius);padding:22px;background:var(--surface);min-width:0;transition:border-color .15s,background .15s}.resource-item:hover{border-color:color-mix(in srgb,var(--accent) 55%,var(--line));background:color-mix(in srgb,var(--surface),var(--accent-soft) 12%)}.resource-top{display:flex;align-items:center;gap:10px;margin-bottom:21px}.resource-icon{display:grid;place-items:center;width:40px;height:44px;background:var(--surface-soft);border-radius:8px;color:var(--accent)}.resource-icon .icon{width:24px;height:24px;stroke-width:1.4}.extension{font-size:11px;letter-spacing:.5px;color:var(--muted);font-weight:650}.resource-top>.pill{margin-left:auto}.resource-item h3{font-size:16px;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.6;margin-bottom:8px}.resource-meta{display:flex;justify-content:space-between;gap:16px;color:var(--muted);font-size:12px}.resource-meta>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.resource-meta>span:last-child{white-space:nowrap}.resource-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:22px;padding-top:16px;border-top:1px solid var(--line)}.resource-byline{display:grid;font-size:11px;color:var(--muted);min-width:0}.resource-byline>span{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.resource-byline time{font-size:10px;margin-top:3px}.row-actions{display:flex;align-items:center;gap:3px;justify-content:flex-end}.download-button{display:inline-flex;align-items:center;color:var(--muted);font-size:12px;font-weight:600;white-space:nowrap;border:0;padding:4px 6px;border-radius:8px}.download-button:hover{background:var(--hover-surface);color:#14683c}
:root[data-theme=dark] .download-button:hover{color:#9fe0b8}.resource-bottom .icon-button{min-width:30px;width:30px;height:32px;padding:6px}.resource-bottom .icon-button .icon{width:18px;height:18px}.pill{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--control-line);border-radius:4px;padding:3px 6px;font-size:11px;color:var(--muted);white-space:nowrap}.pill .icon{width:12px;height:12px}.pill-enabled{border-color:transparent;background:var(--accent-soft);color:var(--accent)}.catalog-end{display:flex;justify-content:space-between;margin-top:24px;color:var(--muted);font-size:11px}.workspace-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:11px;color:var(--muted);padding:20px 40px;max-width:1320px;width:100%;margin:0 auto}.client-workspace>.workspace-footer{border-top:1px solid var(--line)}
/* Admin: a distinct navigation shell and denser, comparable data. */
.admin-workspace{display:grid;grid-template-columns:var(--sidebar-w,232px) minmax(0,1fr);min-height:100dvh;transition:grid-template-columns .2s ease}
/* Dragging must track the pointer exactly: the 200ms grid transition made the sidebar edge lag
   behind the cursor and drift out of alignment with the handle. */
body.resizing-sidebar .admin-workspace{transition:none}
.admin-workspace.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
.admin-workspace.sidebar-collapsed>.sidebar{transform:translateX(-100%);visibility:hidden;pointer-events:none}
/* Drag handle on the sidebar's inner edge; the width is the --sidebar-w custom property. */
.sidebar-resize{position:absolute;top:0;right:-3px;width:7px;height:100%;cursor:col-resize;z-index:5;touch-action:none;background:transparent}
.sidebar-resize:hover,.sidebar-resize.dragging{background:var(--accent);opacity:.35}
.sidebar-resize:focus-visible{outline:2px solid var(--accent);outline-offset:-1px}
.sidebar{transition:transform .2s ease,max-height .2s ease,padding .2s ease}
.topbar-leading{display:flex;align-items:center;gap:8px}
.sidebar-toggle .icon{transform:rotate(90deg);transition:transform .2s ease}
.sidebar-collapsed .sidebar-toggle .icon{transform:rotate(-90deg)}
body.resizing-sidebar{cursor:col-resize;user-select:none}.sidebar{position:sticky;top:0;height:100dvh;display:flex;flex-direction:column;padding:28px 18px;border-right:1px solid var(--line);background:var(--surface);min-height:560px}.sidebar .brand{padding:0 10px;margin-bottom:48px;font-size:21px;flex-wrap:wrap;gap:8px}.sidebar .brand-context{width:100%;padding:0 0 0 44px;margin-top:-8px;border:0}.sidebar nav{display:grid;gap:7px}.sidebar nav .nav-item{width:100%;text-align:left;padding:13px 16px}.sidebar .nav-item .icon{width:19px;height:19px}.sidebar-bottom{margin-top:auto;padding:36px 10px 0}.return-link{display:flex;gap:9px;align-items:center;color:var(--muted);font-size:12px;margin-bottom:26px}.return-link .icon{width:16px;height:16px}.return-link:hover{color:var(--accent)}.sidebar .storage-note{margin-bottom:24px}.account-row{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:18px}.workspace-body{display:flex;flex-direction:column;min-width:0}.admin-topbar{height:70px;display:flex;justify-content:space-between;align-items:center;padding:0 38px;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted)}.admin-topbar b{font-weight:550;color:var(--ink)}.slash{padding:0 12px;color:var(--muted)}.admin-role{font-size:11px;border-left:1px solid var(--line);padding-left:15px}.page{padding:36px 28px;flex:1;min-width:0;max-width:1480px;width:100%;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:32px}.page-heading h1{font-size:28px;margin-bottom:9px}.page-heading p{font-size:13px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:32px;padding:0 0 28px;border-bottom:1px solid var(--line)}.metrics>div{padding-left:25px;border-left:1px solid var(--line)}.metrics>div:first-child{padding-left:0;border:0}.metrics>div>span{color:var(--muted);font-size:12px}.metrics strong{display:block;font-size:29px;font-weight:600;letter-spacing:-1px;margin-top:8px;font-variant-numeric:tabular-nums;white-space:nowrap}.metrics strong small{font-size:12px;font-weight:400;margin-left:7px;color:var(--muted)}.overview-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:24px;align-items:start}.overview-column{display:grid;gap:24px;align-content:start}.overview-panel{background:var(--surface);border:1px solid var(--line);padding:27px;border-radius:var(--radius)}.panel-heading{display:flex;gap:10px;align-items:center;color:var(--ink)}.panel-heading>.icon{color:var(--accent)}.panel-heading h2{font-size:15px}.storage-figure{display:grid;gap:4px;margin:32px 0 22px}.storage-figure strong{font-size:35px;letter-spacing:-1px;font-weight:600}.storage-figure>span,.account-figure>span{font-size:12px;color:var(--muted)}.disk-legend{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:var(--muted);margin:10px 0 18px}.status-list{margin:20px 0 25px}.status-list>div{display:flex;justify-content:space-between;padding:10px 0;gap:20px;font-size:12px}.status-list dt{color:var(--muted)}.status-list dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums}.account-figure{display:flex;align-items:baseline;gap:12px;margin:24px 0 0}.account-figure strong{font-size:45px;font-weight:600;letter-spacing:-2px}.table-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.table-top{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;gap:20px}.table-top h2{font-size:15px}.table-top>.muted{font-size:12px}.table-card>.results-header{padding:5px 24px 15px;margin:0}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{font-size:11px;font-weight:550;color:var(--muted);background:var(--surface-soft);padding:13px 16px;white-space:nowrap}td{border-bottom:1px solid var(--line);padding:18px 16px;vertical-align:middle}th:first-child,td:first-child{padding-left:24px}tr:last-child td{border-bottom:0}tbody tr:hover{background:color-mix(in srgb,var(--surface),var(--surface-soft) 40%)}.table-bottom{border-top:1px solid var(--line);padding:13px 24px;color:var(--muted);font-size:11px}.user-cell{display:flex;align-items:center;gap:10px}.user-cell>.avatar{width:29px;height:29px;font-size:12px}.subtext{display:block;font-size:11px;color:var(--muted);margin-top:4px}.log-target{max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Authentication is a standalone task, with no decorative product mockup. */
.auth-page{min-height:100dvh;display:flex;flex-direction:column}.auth-header{width:100%;grid-template-columns:1fr auto}.auth-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:center;gap:70px;width:100%;max-width:1160px;margin:auto;padding:48px 40px}.auth-story{align-self:stretch;display:flex;flex-direction:column;justify-content:center;min-width:0}.auth-story h1{font-size:44px;line-height:1.5;letter-spacing:-1.5px;margin-bottom:20px}.auth-story>p{font-size:14px;color:var(--muted)}.auth-wordmark{font-size:95px;line-height:.95;letter-spacing:-7px;font-weight:800;color:var(--line);margin-top:50px;user-select:none;overflow:hidden}.auth-wordmark span{display:block}.auth-card{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:34px;box-shadow:var(--shadow)}.auth-card-title{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--accent);margin-bottom:22px}.auth-card-title>.icon{width:19px;height:19px}.auth-card h2{font-size:25px;letter-spacing:-.7px;margin-bottom:9px}.auth-card>.muted{font-size:13px}.auth-form{display:grid;gap:20px;margin-top:28px}.auth-submit{width:100%;justify-content:center;min-height:44px}.auth-card>.auth-submit{margin-top:26px}.auth-note{color:var(--muted);font-size:11px;margin-top:22px;line-height:1.8}.auth-footer{display:flex;justify-content:space-between;gap:20px;max-width:1400px;width:100%;padding:25px 40px;margin:auto;font-size:11px;color:var(--muted)}
/* Shared dialogs and states. */
.field{display:flex;flex-direction:column;gap:8px;font-size:12px;color:var(--ink)}.field>span{font-weight:550}.field input,.field select{width:100%;min-height:44px;padding:11px 12px;border:1px solid var(--line);background:var(--paper);border-radius:8px;color:var(--ink)}.field input::placeholder{color:var(--muted)}.field input:disabled{background:var(--surface-soft);color:var(--muted)}.field small{font-size:11px;line-height:1.8;color:var(--muted)}.form-error{color:var(--danger);font-size:12px}.form-error:empty{display:none}
/* Per-field live validation (duplicate username, mismatched confirmation). Only ever populated when
   something is wrong, so a valid form carries no extra text. */
.field-message{font-size:11px;line-height:1.6;color:var(--danger)}
.field-message:empty{display:none}.form-grid{display:grid;gap:20px}.form-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}.modal{width:calc(100% - 32px);max-height:92dvh;padding:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}.modal::backdrop{background:#142c4670}.modal-wide{max-width:660px}.modal-compact{max-width:440px}.modal-head{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:23px 28px;border-bottom:1px solid var(--line)}.modal-head h2{font-size:20px}.modal-body{padding:26px 28px;display:grid;gap:20px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:7px}
/* One dialog, one button size. A `-sm` control next to a default one rendered visibly shorter,
   which reads as a mistake rather than as a hierarchy — the invite dialog's 复制/关闭 and the
   passkey dialog's 解绑/创建通行密钥 both had it. Normalising on .modal-body covers footers and
   in-body action rows together; keep -sm for tables and toolbars, where it is deliberate. */
.modal-body .button{min-height:42px;padding:10px 17px;font-size:13px;border-radius:8px}.modal-message{font-size:13px;line-height:1.9;overflow-wrap:anywhere}.drop-zone{border:1px dashed var(--line);border-radius:8px;padding:26px 16px;background:var(--paper);display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;cursor:pointer}.drop-zone.dragging{background:var(--accent-soft);border-color:var(--accent)}.drop-icon{color:var(--accent)}.drop-title{font-size:13px;font-weight:600}.drop-hint{font-size:11px;color:var(--muted)}.drop-zone input{font-size:11px;max-width:100%;margin-top:10px}.drop-zone input::file-selector-button{background:var(--surface);color:var(--control-ink);border:1px solid var(--control-line);border-radius:4px;padding:7px 10px;margin-right:10px;cursor:pointer}.upload-selection{color:var(--muted);font-size:12px}progress{display:block;width:100%;height:5px;border:0;background:var(--line);accent-color:var(--accent);border-radius:4px;overflow:hidden}progress::-webkit-progress-bar{background:var(--line);border-radius:4px}progress::-webkit-progress-value{background:var(--accent);border-radius:4px}.upload-queue{display:grid;gap:16px;max-height:240px;overflow:auto}.queue-item>div{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:8px;font-size:12px}.queue-item strong{font-size:12px;max-width:65%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.queue-status{font-size:11px;color:var(--muted)}.queue-done .queue-status{color:var(--accent)}.queue-error .queue-status{color:var(--danger)}.file-details{display:grid;grid-template-columns:70px minmax(0,1fr);gap:12px;font-size:12px;margin:0}.file-details dt{color:var(--muted)}.file-details dd{margin:0}.hash{font-family:Consolas,monospace;word-break:break-all;font-size:12px}.link-section{display:grid;gap:15px;border-top:1px solid var(--line);padding-top:20px}.link-section p{font-size:12px;line-height:1.9}.link-actions{display:flex;flex-wrap:wrap;gap:10px}#linkResult{display:grid;gap:10px}#linkResult:empty{display:none}#downloadLink{font-family:Consolas,monospace;font-size:12px}.toast-region{position:fixed;bottom:24px;right:24px;z-index:20;display:grid;gap:9px;max-width:calc(100vw - 48px);pointer-events:none}.toast{background:var(--ink);color:var(--surface);border-radius:8px;padding:13px 20px;font-size:12px;box-shadow:var(--shadow)}.toast-error{background:var(--danger);color:var(--surface)}body.auth-active .toast-region{top:24px;left:24px;right:auto;bottom:auto}body.auth-active .toast-error{background:#c62828;color:#fff}dialog>.toast{margin:16px 24px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;text-align:center;min-height:290px;padding:40px 20px;color:var(--muted)}.empty-state>.icon{width:45px;height:45px;stroke-width:1.15;color:var(--accent);margin-bottom:8px}.empty-state h2{font-size:18px;color:var(--ink)}.empty-state p{font-size:13px;max-width:360px}.boot-screen{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px}.boot-mark{color:var(--accent)}.boot-copy{color:var(--muted)}.loading-line{padding:30px 0;display:grid;gap:16px}.loading-line>span{display:block;min-height:55px;background:var(--surface-soft);border-radius:8px}.loading-line>span:nth-child(2){width:85%}.loading-line>span:nth-child(3){width:65%}.noscript-message{padding:30px;text-align:center}
@media(max-width:1200px){.site-header{padding:0 28px;gap:20px}.client-page{padding:36px 28px}.catalog-layout{grid-template-columns:180px minmax(0,1fr);gap:26px}.catalog-rail{padding-right:18px}.resource-item{padding:18px}.resource-bottom{flex-wrap:wrap}.resource-byline{display:none}.resource-bottom .row-actions{margin-left:auto}.admin-workspace{grid-template-columns:210px minmax(0,1fr)}.page{padding:30px 20px}.admin-topbar{padding:0 26px}.metrics>div{padding-left:18px}.metrics strong{font-size:25px}.auth-layout{gap:45px}.auth-story h1{font-size:38px}}
@media(max-width:1024px){.site-header{gap:14px}.client-nav{gap:0}.client-nav .nav-item{padding:10px 13px}.account-name{display:none}.header-actions{gap:6px}.resource-grid{gap:12px}.overview-layout{gap:16px}.overview-panel{padding:22px}.metrics strong{font-size:22px}.sidebar{padding:25px 12px}.sidebar .brand{font-size:19px}.auth-layout{gap:28px}.auth-card{padding:27px}}
@media(max-width:768px){.site-header{height:auto;min-height:72px;grid-template-columns:1fr auto;padding:17px 20px;gap:14px}.site-header .brand{font-size:21px}.client-nav{grid-row:2;grid-column:1/-1;justify-content:flex-start;gap:10px;border-top:1px solid var(--line);padding-top:12px}.client-nav .nav-item{padding:8px 14px}.client-page{padding:30px 16px}.catalog-heading{margin-bottom:24px;align-items:flex-end;gap:18px}.catalog-heading h1{font-size:31px}.catalog-heading .muted{font-size:12px;max-width:250px}.section-label{font-size:11px;margin-bottom:8px}.catalog-heading .button{padding:10px 13px;font-size:12px}.catalog-layout{display:block}.catalog-rail{display:none}.catalog-search{margin-bottom:25px}.file-toolbar{padding:13px 15px;gap:9px}.file-toolbar select{max-width:140px;font-size:11px}.search{gap:9px}.search input{font-size:12px}.resource-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.resource-item h3{font-size:14px}.resource-meta{font-size:11px}.resource-top{margin-bottom:16px}.resource-icon{width:34px;height:39px}.extension{font-size:10px}.resource-top>.pill{font-size:10px;padding:2px 4px}.resource-top>.pill>.icon{display:none}.resource-bottom{margin-top:17px;padding-top:13px}.workspace-footer{padding:20px;font-size:10px}.admin-workspace{display:block}.sidebar{position:static;height:auto;min-height:0;padding:18px 20px}.sidebar .brand{font-size:21px;margin:0 0 15px;padding:0;gap:10px;flex-wrap:nowrap}.sidebar .brand-context{width:auto;padding-left:12px;margin:0;border-left:1px solid var(--line);font-size:10px!important}.sidebar nav{display:flex;gap:5px;overflow-x:auto}.sidebar nav .nav-item{width:auto;padding:9px 12px;font-size:12px;gap:7px}.sidebar-bottom{padding:0;margin:0}.sidebar-bottom .storage-note,.sidebar-bottom .account-row{display:none}.return-link{position:absolute;top:27px;right:20px;font-size:0;margin:0}.return-link .icon{width:19px;height:19px}.sidebar .brand-context{max-width:80px}.admin-topbar{height:54px;padding:0 20px}.page{padding:26px 16px}.page-heading{margin-bottom:27px}.page-heading h1{font-size:25px}.page-heading p{font-size:12px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 0}.metrics>div:nth-child(3){border:0;padding-left:0}.metrics strong{font-size:27px}.overview-layout{grid-template-columns:1fr}.table-scroll table{min-width:670px}.table-top{padding:18px}.table-top>.muted{font-size:11px}.auth-header{grid-template-columns:1fr auto}.auth-layout{grid-template-columns:1fr;max-width:470px;padding:32px 20px;gap:25px}.auth-story{display:none}.auth-card{box-shadow:none;padding:27px}.auth-footer{padding:20px;font-size:10px}.form-grid-two{grid-template-columns:1fr}.modal-head{padding:20px}.modal-body{padding:20px}.toast-region{bottom:16px;right:16px}.brand-context{font-size:10px!important}.page-heading .button{font-size:12px;padding:9px 12px}}
@media(max-width:520px){.client-page{padding:26px 14px}.client-nav{gap:4px}.client-nav .nav-item{font-size:12px;padding:8px 12px}.catalog-heading{align-items:center}.catalog-heading h1{font-size:29px}.catalog-heading .muted{max-width:215px;font-size:12px}.catalog-heading .button{font-size:12px;padding:9px 11px;gap:6px}.catalog-heading .button>.icon{width:16px;height:16px}.resource-grid{grid-template-columns:1fr;gap:14px}.resource-item{padding:20px}.resource-top{margin-bottom:15px}.resource-item h3{font-size:16px}.resource-meta{font-size:12px}.resource-byline{display:grid}.resource-bottom{flex-wrap:nowrap}.resource-top>.pill{font-size:11px;padding:3px 6px}.resource-top>.pill>.icon{display:block}.catalog-search .file-toolbar{grid-template-columns:minmax(0,1fr) auto;gap:12px}.catalog-search .search{grid-column:1/-1;min-height:32px}.catalog-search select{justify-self:start;max-width:220px}.catalog-search .icon-button{justify-self:end}.catalog-search .file-toolbar{padding:14px 16px}.catalog-end{font-size:10px}.file-toolbar{grid-template-columns:minmax(0,1fr) auto}.file-toolbar>.search{grid-column:1/-1}.file-toolbar select{justify-self:start}.file-toolbar>.icon-button{justify-self:end}.admin-topbar .admin-role{display:none}.table-top>.muted{display:none}.account-name{display:none}.site-header .brand{font-size:20px}.header-actions{gap:4px}.header-actions>.icon-button{min-width:32px;width:32px}.brand-context{display:none}.auth-card h2{font-size:23px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

.admin-mobile-account{display:none}@media(max-width:768px){.admin-mobile-account{display:flex;align-items:center;gap:8px}}
/* Hierarchical catalog: compact controls, a persistent directory outline and list rows. */
.brand-logo{width:36px;height:36px;flex-shrink:0}
.client-page{display:flex;flex-direction:column;padding-top:28px;padding-bottom:24px}
.catalog-heading{margin-bottom:24px;align-items:center}.catalog-heading h1{font-size:30px;margin:0}
.client-page>#pageContent{display:flex;flex-direction:column;flex:1;min-height:0}
.catalog-search{border:0;background:none;margin:0;min-width:0}
.catalog-search .file-toolbar{display:flex;justify-content:flex-end;padding:0;gap:12px}
.catalog-search .search{width:320px;border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:0 12px;height:42px}
.catalog-search .search input{font-size:13px}
.file-toolbar-actions{display:flex;align-items:center;gap:8px}
.catalog-layout{flex:1;grid-template-columns:240px minmax(0,1fr);gap:28px;min-height:420px}
.catalog-rail{min-width:0;padding-right:20px;position:sticky;top:24px;height:calc(100dvh - 230px);min-height:300px;align-self:start}.catalog-rail-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:8px}.catalog-rail h2{margin:0}.catalog-total{font-size:11px;color:var(--muted)}
.folder-list{display:block;flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable}.folder-tree-row{display:flex;align-items:center;min-width:0}.folder-tree-node{min-width:0}.folder-children{margin-left:13px;padding-left:7px;border-left:1px solid var(--line)}
.folder-toggle,.folder-toggle-spacer{width:24px;min-width:24px;height:34px;display:inline-flex;align-items:center;justify-content:center}.folder-toggle{border:0;border-radius:8px;background:none;color:var(--control-ink)}.folder-toggle:hover{background:var(--surface-soft)}.folder-toggle .icon{width:14px;height:14px;transform:rotate(-90deg);transition:transform .18s ease}.folder-toggle.expanded .icon{transform:rotate(0)}
.folder-link{min-width:0;padding:9px 8px;margin:2px 0;color:var(--control-ink)}.folder-link:hover{background-color:var(--hover-surface)}.folder-link>span{white-space:pre;flex:1}.folder-root{margin-bottom:7px}
.rail-bottom{margin-top:auto;padding-top:32px}.rail-bottom>p{margin-top:18px}.storage-note>div{display:grid;gap:6px}.storage-note strong{font-size:13px;font-variant-numeric:tabular-nums}
.catalog-summary{margin-bottom:22px;color:var(--muted);font-size:13px;line-height:1}
.catalog-results{min-width:0}
/* One rounded card row per file or folder, the selection box living outside the border so the card
   stays a clean surface. Radius follows the documented scale: surfaces 12px, controls 8px. */
.resource-list{display:grid;gap:10px}
.resource-entry{min-width:0}
.resource-row,.folder-item{display:flex;align-items:center;gap:16px;flex:1;min-width:0;min-height:76px;padding:14px 20px;border:1px solid var(--control-line);border-radius:var(--radius);background:var(--surface);color:var(--ink)}
.resource-entry:hover>.resource-row,.resource-entry:hover>.folder-item{background-color:var(--hover-surface)}
/* One hue per file kind, on both the list badge and the sidebar tree glyph. */
.resource-icon[data-kind=word],.tree-file[data-kind=word] .icon{color:var(--icon-word)}
.resource-icon[data-kind=excel],.tree-file[data-kind=excel] .icon{color:var(--icon-excel)}
.resource-icon[data-kind=powerpoint],.tree-file[data-kind=powerpoint] .icon{color:var(--icon-powerpoint)}
.resource-icon[data-kind=pdf],.tree-file[data-kind=pdf] .icon{color:var(--icon-pdf)}
.resource-icon[data-kind=image],.tree-file[data-kind=image] .icon{color:var(--icon-image)}
.resource-icon[data-kind=archive],.tree-file[data-kind=archive] .icon{color:var(--icon-archive)}
.resource-icon[data-kind=video],.tree-file[data-kind=video] .icon{color:var(--icon-video)}
.resource-icon[data-kind=audio],.tree-file[data-kind=audio] .icon{color:var(--icon-audio)}
.resource-icon[data-kind=code],.tree-file[data-kind=code] .icon{color:var(--icon-code)}
.resource-icon[data-kind=document],.tree-file[data-kind=document] .icon{color:var(--icon-document)}
.folder-item-icon{display:grid;place-items:center;width:42px;height:42px;color:var(--accent);flex-shrink:0}.folder-item-copy{display:grid;min-width:0;gap:3px}.folder-item-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:pre;font-size:14px}.folder-item-copy small{color:var(--muted);font-size:12px}.folder-item-arrow{margin-left:auto;color:var(--muted)}
.resource-row .resource-icon{width:42px;height:42px;flex-shrink:0}.resource-main{flex:1;min-width:0}.resource-name-line{display:flex;align-items:center;gap:9px;min-width:0}.resource-name-line strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.resource-name-line .extension{display:none}.resource-name-line .pill{margin-left:auto}.resource-row .resource-meta{justify-content:flex-start;font-size:12px;gap:16px;margin-top:6px}.resource-path{display:flex;align-items:center;gap:4px;min-width:0;overflow-wrap:anywhere!important;white-space:pre-wrap!important}.resource-path .icon{width:12px;height:12px}.resource-size{flex-shrink:0}.resource-date{font-size:12px;color:var(--muted);white-space:nowrap}.resource-row .row-actions{flex-shrink:0}.catalog-end{gap:12px}
.footer-author{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px}.footer-author-label{color:var(--muted)}.footer-author-link{font-weight:600;color:var(--accent)}a.footer-author-link:hover{text-decoration:underline}.footer-author-description{white-space:pre-wrap;overflow-wrap:anywhere}.workspace-footer,.auth-footer{flex-wrap:wrap}
@media(prefers-reduced-motion:no-preference){html,body,.site-header,.catalog-rail,.resource-list,.resource-entry,.resource-row,.folder-item,.workspace-footer,.auth-card,.modal,.sidebar,.admin-topbar,.table-card,.overview-panel,input,select,button,a,span,strong,p,h1,h2,h3,th,td{transition:background-color .24s ease,color .24s ease,border-color .24s ease}.folder-children{animation:directory-enter .16s ease}@keyframes directory-enter{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}}
@media(max-width:1024px){.catalog-layout{grid-template-columns:210px minmax(0,1fr);gap:20px}.resource-date{display:none}.resource-row{gap:10px;padding:14px}}
@media(max-width:768px){.catalog-layout{display:flex;flex-direction:column;min-height:0;gap:24px}.catalog-rail{display:flex;border-right:0;border-bottom:1px solid var(--line);padding:0 0 20px;position:static;height:auto;min-height:0}.folder-list{max-height:240px;overflow:auto;flex:auto}.rail-bottom{padding-top:20px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}.rail-bottom>p{margin:0;align-self:end}.catalog-search .search{width:auto;flex:1}.catalog-search .file-toolbar{gap:8px}.file-toolbar-actions{gap:2px}.catalog-heading{margin-bottom:18px}.catalog-heading h1{font-size:28px}.client-page{padding-top:24px}.resource-row{flex-wrap:wrap}.resource-main{flex-basis:calc(100% - 52px)}.resource-row>.row-actions{margin-left:auto}.resource-name-line{flex-wrap:wrap;gap:5px}.resource-name-line strong{flex-basis:100%}.resource-name-line .pill{margin-left:0}.resource-row .resource-meta{flex-wrap:wrap;gap:4px 12px}.resource-path{max-width:100%}.folder-item{padding:14px}.catalog-end{font-size:10px}.catalog-search .search input{font-size:12px}.file-upload-action{padding:9px 10px;gap:5px}.file-upload-action .icon{width:16px;height:16px}}

/* Keep the application shell fixed while list panels own the scroll. */
html,body{height:100%;overflow:hidden}
#app{height:100%;min-height:0}
.client-workspace,.admin-workspace,.auth-page{height:100%;min-height:0}
.client-page,.page{min-height:0;overflow:hidden}
.client-page>#pageContent,.page>#pageContent{min-height:0;overflow:hidden}
/* Shared shell layout: admin (/admin/) and the download site (/) use the SAME structure —
   sidebar + topbar + page — so both get identical scrolling and spacing behaviour.
   Height is passed down to whichever element owns the scroll (.table-scroll or #filesResult).
   Note: no align-items:center on the page column; that used to shrink and centre the heading. */
.page,.client-page{display:flex;flex-direction:column;min-height:0;overflow:hidden;width:100%}
.page>#pageContent,.client-page>#pageContent{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;overflow:hidden}
.page>#pageContent>.table-card,.client-page>#pageContent>.table-card{display:flex;flex-direction:column;min-height:0}
.page>#pageContent>.table-card>.table-scroll,.client-page>#pageContent>.table-card>.table-scroll{flex:1;min-height:0;overflow:auto}
.page>#pageContent>.table-card>#filesResult,.client-page>#pageContent>.table-card>#filesResult{flex:1;min-height:0;overflow:auto}
.page>#pageContent>:not(.table-card),.client-page>#pageContent>:not(.table-card){min-height:0}
/* Toolbars, table headers/footers and the heading keep their natural height while the
   scrollable child absorbs the remaining space. */
.page-heading,.catalog-heading,.table-top,.table-bottom,.results-header{flex-shrink:0}
.catalog-results{display:flex;flex-direction:column;flex:1;min-height:0}
.catalog-results>#filesResult{min-height:0;flex:1;overflow:auto;scrollbar-gutter:stable}
.catalog-results>#filesResult>.resource-list{overflow:visible}
.workspace-body{height:100%;min-height:0;overflow:hidden}
.table-scroll{max-height:100%;overflow:auto}
.sidebar .folder-list{flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable}
.sidebar .storage-note{margin-bottom:22px}
.sidebar .account-row{border-top:1px solid var(--line);padding-top:16px}
/* The download site puts the page scope in the top bar, so the address row carries no page prefix. */
.client-topbar{display:grid;grid-template-columns:1fr auto 1fr;padding-inline:38px}
.client-topbar .client-nav{grid-column:2;height:auto;justify-content:center}
.client-topbar .header-actions{grid-column:3;justify-self:end}
/* Keep the scope tabs optically centred in the 70px bar (line-height:1.6 otherwise sits low). */
.client-topbar .nav-item{line-height:1;padding-top:0;padding-bottom:0;height:36px}
@media(max-width:1200px){.client-topbar{padding-inline:26px}}
/* The search + upload controls belong beside the page title, never inside the list card. */
.catalog-search{flex:1;display:flex;justify-content:flex-end;min-width:0}
.catalog-search .file-toolbar{display:flex;align-items:center;gap:10px;padding:0;flex-wrap:nowrap}
.catalog-search .search{width:clamp(200px,42vw,420px);border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:0 12px;height:42px;flex:0 1 auto}
.file-upload-action{flex-shrink:0}
@media(max-width:768px){
  .client-topbar{padding-inline:20px}
  .admin-workspace.sidebar-collapsed>.sidebar{transform:translateY(-100%);max-height:0;min-height:0;padding-top:0;padding-bottom:0;border:0}
  .sidebar-toggle .icon{transform:rotate(180deg)}
  .sidebar-collapsed .sidebar-toggle .icon{transform:rotate(0)}
  /* Stacked layout: the sidebar is no longer a column, so resizing is disabled and the
     handle becomes a horizontal grip on the bottom edge instead of a vertical one. */
  .sidebar-resize{top:auto;bottom:-3px;right:0;left:0;width:auto;height:7px;cursor:row-resize}
  .client-workspace .sidebar .folder-list{max-height:220px;flex:none}
}
.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}
.visibility-editor{display:flex;align-items:end;gap:12px}
.visibility-editor .field{flex:1}

/* Header controls share the title row; file visibility is a centered row column. */
.catalog-heading>div:first-child{flex-shrink:0}.catalog-heading .catalog-search{margin:0}
.resource-row>.pill{align-self:center;justify-content:center;min-width:64px;min-height:32px;padding:5px 9px;border-radius:8px;line-height:1;flex-shrink:0}
.tree-file{padding-left:32px}.tree-file .icon{color:var(--muted);width:15px;height:15px}
.catalog-rail-head,.rail-bottom{flex-shrink:0}
.copyright a:hover{text-decoration:underline}
.copyright{font-size:13px;font-weight:550}
@media(max-width:768px){.catalog-heading{flex-wrap:wrap}.catalog-heading .catalog-search{flex:1;min-width:270px}.rail-bottom{display:block}.resource-row>.pill{margin-left:50px}.resource-row .row-actions{margin-left:auto}}

/* White content surfaces; blue is reserved for interactive controls and selection. */
:root:not([data-theme=dark]) .nav-item.active,
:root:not([data-theme=dark]) .folder-link.selected{background:var(--primary-bg);color:var(--accent-ink)}
:root:not([data-theme=dark]) .nav-item.active:hover,
:root:not([data-theme=dark]) .folder-link.selected:hover{background:#1253a3;color:#ffffff}
:root:not([data-theme=dark]) .button-primary:hover{background:#1253a3;border-color:#1253a3}
/* Blue is reserved for the active page tab and the upload button; every other filled control drops
   to the black outline treatment. These selectors are written to outrank the accent rules above. */
:root:not([data-theme=dark]) .button-primary:not([data-action=upload]),
:root:not([data-theme=dark]) .button-primary:not([data-action=upload]):hover,
.button-primary:not([data-action=upload]),
.button-primary:not([data-action=upload]):hover{background:var(--surface);border-color:var(--control-line);color:var(--control-ink)}

/* Login page: the submit turns light green, the passkey entry light blue. */
:root:not([data-theme=dark]) .auth-form .button-primary.auth-submit:hover{background:#e7f6ec;border-color:#a9d7ba;color:#14683c}
:root[data-theme=dark] .auth-form .button-primary.auth-submit:hover{background:#1e3b2a;border-color:#3f6b52;color:#9fe0b8}
:root:not([data-theme=dark]) .passkey-login:hover{background:#e8f2ff;border-color:#a9c9ea;color:#12539f}
:root[data-theme=dark] .passkey-login:hover{background:#22384f;border-color:#3c5c7d;color:#a8d7ff}

/* Two-factor dialog: one centred column, and every button tints on hover — the confirm action
   green like the login submit, the passkey action blue like the login-page passkey entry. */
.mfa-dialog .modal-body{text-align:center}
.mfa-dialog .field>span,.mfa-dialog input{text-align:center}
.mfa-dialog .modal-actions{justify-content:center}
.mfa-dialog .mfa-submit:hover,:root:not([data-theme=dark]) .mfa-dialog .mfa-submit:hover{background:#e7f6ec;border-color:#a9d7ba;color:#14683c}
.mfa-dialog .mfa-passkey:hover,:root:not([data-theme=dark]) .mfa-dialog .mfa-passkey:hover{background:#e8f2ff;border-color:#a9c9ea;color:#12539f}
.mfa-dialog .button-quiet:hover,:root:not([data-theme=dark]) .mfa-dialog .button-quiet:hover{background:var(--hover-surface);border-color:var(--control-line);color:var(--control-ink)}

/* File detail: creating a link stays the primary blue action, revoking it is destructive red. */
:root:not([data-theme=dark]) .button[data-action=make-link]{background:var(--primary-bg);border-color:var(--primary-bg);color:var(--accent-ink)}
:root:not([data-theme=dark]) .button[data-action=make-link]:hover{background:#1253a3;border-color:#1253a3;color:var(--accent-ink)}
.button[data-action=make-link]{background:var(--primary-bg);border-color:var(--primary-bg);color:var(--accent-ink)}
.button[data-action=make-link]:hover{background:var(--primary-bg);border-color:var(--primary-bg);color:var(--accent-ink)}
.button[data-action=revoke-link],:root:not([data-theme=dark]) .button[data-action=revoke-link]{background:#cf3c4b;border-color:#cf3c4b;color:#fff}
.button[data-action=revoke-link]:hover,:root:not([data-theme=dark]) .button[data-action=revoke-link]:hover{background:#b3303e;border-color:#b3303e;color:#fff}

/* The download-site nav now lives in the top bar (not the old grid .site-header), so the
   narrow-screen rule that gave it its own bordered row must not apply. */
.client-topbar .client-nav{border:0;padding-top:0;grid-row:auto;grid-column:2;width:auto;overflow:visible}

/* Keep the public shell fixed while the file list owns the scroll. */
body[data-surface=client],body[data-surface=client] #app,.client-workspace{height:100%;min-height:0;overflow:hidden}
.client-workspace .workspace-body{height:100%;min-height:0;overflow:hidden}
.client-topbar,.client-workspace>.workspace-body>.workspace-footer{flex-shrink:0}
@media(max-width:768px){.client-workspace{display:grid;grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.client-workspace .workspace-body{height:auto}}

/* Admin log filtering and 100-row pagination. */
.log-controls,.log-pagination,.log-pagination>div{display:flex;align-items:center;gap:10px}
.log-user-filter{height:42px;min-width:160px;padding:0 34px 0 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:12px}
.log-pagination{justify-content:space-between;flex-wrap:wrap}
@media(max-width:520px){.log-controls{width:100%}.log-controls label{flex:1}.log-user-filter{width:100%;min-width:0}.log-pagination{gap:8px}.log-pagination>div{margin-left:auto}}

/* File-detail dialog: "删除文件" shares the link-action row but is pushed to the right edge,
   keeping it visually apart from the reversible link buttons. Rendered only for file managers. */
.link-actions-managed .link-delete{margin-left:auto}
/* When the row wraps on narrow screens, keep the delete button on its own right-aligned line. */
@media(max-width:520px){.link-actions-managed{row-gap:12px}}
.drop-zone{position:relative}.drop-zone input[type=file]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;pointer-events:none}.drop-zone:focus-within{outline:2px solid var(--accent);outline-offset:2px}

/* All operation feedback uses the login-page pattern: upper-right, animated, and stacked. */
.toast-region{top:24px;right:24px;bottom:auto;left:auto;display:grid;gap:10px;max-width:min(360px,calc(100vw - 48px));pointer-events:none}
.toast{border-radius:8px;padding:13px 18px;color:#fff;font-size:12px;line-height:1.5;box-shadow:0 10px 28px #14324a26;animation:toast-enter .22s ease-out both}
.toast-success{background:#168a5b}
.toast-error{background:#cf3c4b}
.toast.toast-leaving{animation:toast-leave .25s ease-in both}
@media(max-width:768px){.toast-region{top:16px;right:16px;left:auto;bottom:auto;max-width:calc(100vw - 32px)}}

/* File-manager selection and compact rows. */
/* Selection boxes are drawn from scratch. Two native behaviours caused the reported black frame:
   accent-color tinted the fill but left the theme's own dark box border, and clicking the box
   focused it, so the global input:focus outline painted a tight dark square around the 16px
   control. The check mark rides in the background so it follows --accent-ink per theme. */
.resource-checkbox,.user-select{appearance:none;-webkit-appearance:none;width:16px;height:16px;border:1px solid var(--control-line);border-radius:4px;background-color:var(--surface);cursor:pointer;flex:0 0 auto;vertical-align:middle}
.resource-checkbox{margin:0 2px 0 0}
.resource-checkbox:hover,.user-select:hover{border-color:var(--muted)}
.resource-checkbox:checked,.user-select:checked{border-color:var(--accent);background-color:var(--accent);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.6 8.6 6.7 11.6 12.4 4.9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center;background-size:12px 12px}
:root[data-theme=dark] .resource-checkbox:checked,:root[data-theme=dark] .user-select:checked{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2317334c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.6 8.6 6.7 11.6 12.4 4.9'/%3E%3C/svg%3E")}
.resource-checkbox:focus,.user-select:focus{outline:0}
.resource-checkbox:focus-visible,.user-select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.folder-item{gap:10px;min-height:58px;padding:8px 18px}
.folder-item-main{display:flex;align-items:center;gap:12px;flex:1;min-width:0;border:0;background:none;text-align:left;color:var(--ink);padding:0}
.folder-item-icon{width:34px;height:34px}
.resource-row{gap:10px;min-height:58px;padding:8px 18px}
.resource-row .resource-icon{display:grid;place-items:center;width:34px;height:34px}.resource-row .resource-icon>.icon{width:26px;height:26px}
.resource-row .resource-meta{margin-top:3px}
.path-actions{display:flex;align-items:center;gap:4px;margin-left:auto;flex-shrink:0}
.path-actions .button{min-height:32px;padding:5px 10px;gap:6px}
.path-actions .button>.icon{width:16px;height:16px}
@media(max-width:768px){.folder-item{padding:8px 14px}.resource-row{padding:8px 14px}.path-actions .nav-step{width:30px;height:30px;min-height:30px}}

/* Address row: Explorer-style 后退 / 前进 / 返回上一级 buttons, then the current folder path.
   Shared by the download site and the admin file view. */
.path-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:2px 0 12px}
.path-nav{display:flex;align-items:center;gap:4px;flex-shrink:0}
.path-nav .nav-step{width:32px;height:32px;min-height:32px;border-radius:8px}
/* A disabled step button has simply nowhere to go, so it fades a little further than the global
   button:disabled state. */
.path-nav .nav-step:disabled{opacity:.4}
.path-nav .nav-step>.icon{width:17px;height:17px}
/* The current path is an editable field: type a folder path and press Enter to jump there. */
.folder-path{flex:1;min-width:0;height:34px;padding:0 10px;border:1px solid var(--control-line);border-radius:8px;background:var(--surface);color:var(--control-ink);font-size:12px;font-variant-numeric:tabular-nums}
.folder-path::placeholder{color:var(--muted)}

@media(max-width:768px){
  .path-bar{padding:2px 0 10px;gap:8px}
  .path-nav .nav-step{width:30px;height:30px;min-height:30px}
}

/* Admin overview: one card per mounted filesystem, so a separate volume (e.g. an OSS mount
   at <DATA_DIR>/files) is visible next to the server disk. */
.mount-list{display:grid;gap:14px;margin:24px 0 4px}
.mount-card{border:1px solid var(--line);border-radius:12px;padding:15px 17px;background:var(--surface)}
.mount-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.mount-head strong{font-size:13px;font-weight:650}
.mount-roles{display:inline-flex;gap:6px;vertical-align:middle}
.mount-roles .pill{font-size:10px;padding:2px 7px}
.mount-free{font-size:13px;font-weight:650;color:var(--ink);font-variant-numeric:tabular-nums;white-space:nowrap}
.mount-note{font-size:12px;color:var(--muted)}
.mount-bar{margin:12px 0 0;height:6px}
/* Nearing capacity is worth colouring; the default bar already uses the accent colour. */
.mount-bar.mount-full{accent-color:var(--danger)}
.mount-legend{display:flex;justify-content:space-between;gap:12px;margin-top:7px;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.mount-source{display:block;margin-top:7px;font-size:11px;color:var(--muted)}
/* 运行概览 is not a table page, so no descendant owned the scroll: #pageContent is overflow:hidden
   and its children have min-height:0, so a page taller than the viewport was squeezed and clipped
   (cards cut off) instead of scrolling. Give the panel area its own scroll region, exactly like
   #filesResult on the table pages; the metrics row above stays put. */
.page>#pageContent>.overview-scroll{flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable}

/* Compact panel toggle: a small outlined sidebar glyph at the far left of the top bar. */
.sidebar-toggle{width:28px;min-width:28px;height:28px;padding:6px;border-radius:8px;flex-shrink:0}
.sidebar-toggle-glyph{position:relative;display:block;width:15px;height:13px;border:1px solid currentColor;border-radius:4px}
.sidebar-toggle-glyph:before{content:"";position:absolute;top:-1px;bottom:-1px;left:4px;border-left:1px solid currentColor}

/* Logged-out failures enter from the upper-right, stack downward, then fade away. */
body.auth-active .toast-region{top:24px;right:24px;left:auto;bottom:auto}
body.auth-active .toast{animation:toast-enter .22s ease-out both}
body.auth-active .toast.toast-leaving{animation:toast-leave .25s ease-in both}
@keyframes toast-enter{from{opacity:0;transform:translate(12px,-6px)}to{opacity:1;transform:translate(0,0)}}
@keyframes toast-leave{from{opacity:1;transform:translate(0,0)}to{opacity:0;transform:translate(10px,-4px)}}

.mfa-qr-wrap{display:grid;justify-items:center;gap:9px;padding:14px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#405a70}
.mfa-qr{display:block;width:min(220px,100%);height:auto;image-rendering:pixelated}
.account-center-actions{grid-template-columns:1fr 1fr}
.passkey-list{display:grid;gap:12px}.passkey-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.passkey-row>span{overflow-wrap:anywhere;min-width:0}.passkey-login{width:100%;margin-top:12px}
.account-center-actions .button{min-height:54px}
@media(max-width:520px){.account-center-actions{grid-template-columns:1fr}}

/* ---- Sign-up surface (account.<domain>) and the sign-in helper row it links from ----
   The row puts the recovery hint on the left and the sign-up link on the right, so the two
   affordances that used to be one sentence stay distinguishable at a glance. */
.auth-note-row{display:flex;align-items:baseline;justify-content:space-between;gap:14px}
/* The recovery hint is one flex item on purpose: as loose children of a space-between row the
   link and the plain "联系管理员" tail would be pushed to opposite ends of the card. */
.auth-note-recovery{min-width:0}
.auth-note-recovery>a{margin-right:2px}
.auth-note a{color:var(--accent);font-weight:600;border-bottom:1px solid transparent}
.auth-note a:hover{border-bottom-color:currentColor}
.signup-link{white-space:nowrap}

/* Password strength: the bar reports, the rule list explains. Four fixed segments rather than a
   percentage, because the score is a band, not a measurement. Mixed case is never required —
   the minimum is 8 characters with a letter, a digit and a special character. */
:root{--strength-weak:#b91c1c;--strength-fair:#b45309;--strength-good:#1763c0;--strength-strong:#15803d}
:root[data-theme=dark]{--strength-weak:#ff9d9d;--strength-fair:#f0c375;--strength-good:#a8d7ff;--strength-strong:#9fe0b8}
.password-strength{display:flex;align-items:center;gap:10px;margin-top:2px}
.password-meter{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;flex:1}
.meter-segment{height:5px;border-radius:3px;background:var(--line);transition:background-color .2s ease}
.strength-label{font-size:11px;color:var(--muted);min-width:74px;text-align:right}
.password-strength[data-strength="1"] .segment-on{background:var(--strength-weak)}
.password-strength[data-strength="1"] .strength-label{color:var(--strength-weak)}
.password-strength[data-strength="2"] .segment-on{background:var(--strength-fair)}
.password-strength[data-strength="2"] .strength-label{color:var(--strength-fair)}
.password-strength[data-strength="3"] .segment-on{background:var(--strength-good)}
.password-strength[data-strength="3"] .strength-label{color:var(--strength-good)}
.password-strength[data-strength="4"] .segment-on{background:var(--strength-strong)}
.password-strength[data-strength="4"] .strength-label{color:var(--strength-strong)}
@media(max-width:400px){.password-strength{flex-direction:column;align-items:stretch;gap:5px}.strength-label{text-align:left;min-width:0}}

/* ---- Invitations (admin) ----
   Each invitation is its own card and the page itself has no frame, so the scroll region must be
   owned by the list — same reason as .overview-scroll: #pageContent is overflow:hidden and its
   children have min-height:0, so a taller list would be squeezed and clipped instead of scrolling. */
.page>#pageContent>.invite-scroll{flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable}
/* The administrator's file view is a list of individual cards, so the pane draws no frame around
   them; it only has to own the scroll region, because #pageContent is overflow:hidden and its
   children have min-height:0. */
.page>#pageContent>.files-pane{display:flex;flex-direction:column;flex:1;min-height:0}
.page>#pageContent>.files-pane>#filesResult{flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable}
.invite-list{display:grid;gap:12px}
.invite-card{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;padding:16px 20px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
/* The code is plain one-line text: no box, no background, nothing drawn around it. */
.invite-code-block{display:flex;align-items:center;gap:6px;flex:1;min-width:0}
.invite-code{font-family:Consolas,"SFMono-Regular",monospace;font-size:13px;letter-spacing:.2px;overflow-wrap:anywhere}
.invite-facts{display:flex;align-items:center;gap:18px;font-size:12px;color:var(--muted);flex-shrink:0}
.invite-note{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* The ⋯ panel expands inside the card (flex-basis:100% wraps it to its own line) instead of
   floating above the row, so no overflow ancestor can ever clip it. */
.invite-menu{flex-basis:100%;display:flex;justify-content:flex-end;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
.invite-menu button{padding:8px 14px;border:1px solid var(--control-line);border-radius:8px;background:transparent;color:var(--ink);font-size:12px;font-weight:600}
.invite-menu button:hover{background:var(--hover-surface)}
.invite-menu-danger{color:var(--danger)}
.invite-code-row{display:flex;align-items:center;gap:10px}
.invite-code-row .invite-code{flex:1;min-width:0}
@media(max-width:768px){.invite-code-block{flex-basis:100%}.invite-facts{flex-wrap:wrap;gap:10px 16px}}

.onboarding{position:fixed;inset:0;z-index:2000;pointer-events:none}
.onboarding-shade{position:absolute;inset:0;width:100%;height:100%;pointer-events:auto}
.onboarding-outline{position:fixed;border:2px solid #81c8ff;border-radius:10px;box-shadow:0 0 0 3px #81c8ff44,0 0 24px #75bcff99;pointer-events:none}
.onboarding-tip{position:fixed;box-sizing:border-box;max-height:calc(100dvh - 32px);overflow:auto;padding:20px 22px;border:1px solid #bdd6eb;border-radius:8px;background:var(--surface);color:var(--ink);box-shadow:0 20px 60px #091d3555;pointer-events:auto}
.onboarding-progress{display:block;margin-bottom:7px;color:var(--accent);font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.onboarding-tip h2{margin:0 0 6px;font-size:18px;line-height:1.4}
.onboarding-tip p{margin:0;font-size:13px;line-height:1.7}
.onboarding-actions{display:flex;justify-content:space-between;gap:12px;margin-top:18px}
.onboarding-actions .button{min-width:86px}
.onboarding-actions .onboarding-prev[hidden]{display:none}
.onboarding-actions .onboarding-next{margin-left:auto}
.onboarding-error{margin-top:10px!important;color:#b33232}
@media(max-width:520px){.onboarding-tip{padding:17px 18px}.onboarding-tip h2{font-size:16px}.onboarding-tip p{font-size:12px}}
