:root {
  color-scheme: light;
  --bg: #fff4e8; --sidebar: #281a2b; --surface: #fffcf8; --raised: #faebdc;
  --hover: #f8e8db; --selected: #fbe0d2; --line: #e8d8cb;
  --text: #281a2b; --muted: #604c5b; --quiet: #735e68;
  --accent: #e85c43; --accent-hover: #f0785e; --accent-text: #a43d2c; --success: #27664f; --danger: #a23840;
  font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, .file-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent-text); }
[hidden] { display: none !important; }
.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; }
svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.app { display: grid; grid-template-columns: 236px minmax(0,1fr); min-height: 100vh; }
.sidebar { --text: #fff4e8; --muted: #e4ced4; --quiet: #c6aeb9; --line: #5b4658; --hover: #423044; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: linear-gradient(165deg,#332039,#281a2b 70%); border-right: 1px solid var(--line); padding: 22px 14px 16px; }
.brand { display: flex; align-items: center; min-height: 52px; margin: 0 5px 27px; }
.brand img { display: block; width: 195px; height: auto; max-width: 100%; }
.nav { display: grid; gap: 4px; }
.nav-item { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 14px; color: var(--muted); border: 1px solid transparent; border-radius: 9px; background: transparent; text-align: left; transition: color .16s,background .16s,border-color .16s; }
.nav-item:hover { color: var(--text); background: var(--hover); }
.nav-item.active { color: #fff4e8; background: #563344; border-left: 3px solid var(--accent); padding-left: 12px; }
.nav-icon { display: grid; place-items: center; }
.nav-icon svg { width: 19px; height: 19px; }
.sidebar-bottom { margin-top: auto; }
.storage-summary { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #3a283b; }
.section-label, .eyebrow { color: var(--quiet); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.storage-summary strong { display: block; margin-top: 7px; font-size: 19px; }
.usage-note { color: var(--quiet); font-size: 11px; }
.node-summary { display: flex; align-items: center; gap: 8px; margin: 19px 9px; color: var(--muted); font-size: 12px; }
.indicator { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); }
.account-button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 4px; color: var(--text); border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.account-button:hover { background: var(--hover); }
.account-button strong, .account-button small { display: block; max-width: 114px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-button small { color: var(--quiet); font-size: 11px; }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #513446; color: #ffae8e; }
.account-avatar svg { width: 16px; height: 16px; }
.account-chevron { margin-left: auto; color: var(--quiet); }
.main-shell { min-width: 0; background: var(--surface); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 74px; padding: 0 22px; border-bottom: 1px solid var(--line); background: rgba(255,250,244,.96); backdrop-filter: blur(12px); }
.topbar-left, .topbar-right { display: flex; align-items: center; min-width: 0; gap: 17px; }
.topbar-right { gap: 12px; flex-shrink: 0; }
.breadcrumb { display: flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; white-space: nowrap; }
.breadcrumb button { min-width: 0; max-width: 170px; overflow: hidden; text-overflow: ellipsis; padding: 6px 8px; color: var(--muted); border: 0; border-radius: 6px; background: transparent; }
.breadcrumb button:hover { color: var(--text); background: var(--hover); }
.breadcrumb button:last-child { color: var(--text); }
.breadcrumb .separator { color: var(--quiet); }
.search-box { display: flex; align-items: center; gap: 8px; width: min(380px,29vw); height: 41px; padding: 0 12px; color: var(--quiet); border: 1px solid #d9c4ba; border-radius: 8px; background: #fffaf4; }
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { width: 17px; height: 17px; flex: none; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-box input::placeholder { color: var(--quiet); }
.search-box kbd { flex: none; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; font: 11px/1.4 inherit; color: var(--quiet); }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 0 16px; border-radius: 8px; font-weight: 650; transition: background .16s,border-color .16s,color .16s; }
.primary-button { color: #281a2b; border: 1px solid var(--accent); background: var(--accent); }
.primary-button:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.secondary-button { color: var(--text); border: 1px solid #d8bfb6; background: #fffaf4; }
.secondary-button:hover { background: #f8e8db; border-color: #a57774; }
.danger-button { color: #8d2639; border: 1px solid #d9abb0; background: #fff1ef; }
.danger-button:hover { background: #f9dcd9; }
.primary-button svg, .secondary-button svg { width: 17px; height: 17px; }
.icon-button { display: inline-grid; place-items: center; width: 35px; height: 35px; flex: none; color: var(--muted); border: 1px solid transparent; border-radius: 7px; background: transparent; }
.icon-button:hover { color: var(--text); border-color: var(--line); background: var(--hover); }
.icon-button svg { width: 18px; height: 18px; }
.mobile-menu, .sidebar-close { display: none; }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) 336px; min-height: calc(100vh - 74px); }
.file-area { min-width: 0; display: flex; flex-direction: column; }
.content-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 25px 26px 19px; }
h1 { margin: 2px 0 1px; font-size: 24px; line-height: 1.3; letter-spacing: -.02em; }
.content-header p { margin: 0; color: var(--quiet); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.count-badge { padding: 4px 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; white-space: nowrap; }
.filter-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff4e8; color: var(--quiet); font-size: 12px; }
#listStatus { text-align: right; }
.table-scroll { overflow-x: auto; }
.file-table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
.file-table th { height: 40px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--quiet); font-size: 12px; font-weight: 500; }
.file-table td { height: 53px; padding: 4px 10px; border-bottom: 1px solid #efe2d6; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-table th:first-child, .file-table td:first-child { padding-left: 26px; width: 35%; }
.file-table th:nth-child(2) { width: 12%; }.file-table th:nth-child(3) { width: 20%; }.file-table th:nth-child(4) { width: 14%; }.file-table th:nth-child(5) { width: 12%; }.file-table th:last-child { width: 7%; position: relative; }
.file-row { cursor: pointer; }
.file-row:hover { background: #fff6ef; }
.file-row.selected { background: var(--selected); }
.file-row.selected:hover { background: #f7d7c6; }
.filename { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); }
.filename .name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-icon { display: grid; place-items: center; width: 30px; height: 33px; flex: none; color: #845b83; }
.file-icon.folder { color: #c67c31; }.file-icon.image { color: #9a6d84; }.file-icon.archive { color: #ac6940; }.file-icon.pdf { color: #bd615c; }
.file-icon svg { width: 25px; height: 25px; }
.node-badge { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 7px; border: 1px solid #e5c9b9; border-radius: 5px; color: #694c57; background: #fff2e5; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.ready-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 12px; }.ready-badge:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.file-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding: 16px 26px; color: var(--quiet); font-size: 12px; border-top: 1px solid var(--line); }
.empty-state { margin: auto; text-align: center; padding: 40px 24px 100px; color: var(--quiet); }.empty-state strong { display: block; margin-top: 12px; color: var(--text); }.empty-state p { margin: 5px 0 0; }.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); }.empty-icon svg { width: 25px; height: 25px; }
.details { min-width: 0; border-left: 1px solid var(--line); background: #fff8f0; }
.details-header { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 19px; border-bottom: 1px solid var(--line); font-size: 14px; }
.details-content { padding: 19px; overflow-wrap: anywhere; }.detail-placeholder { display: grid; justify-items: center; align-content: center; min-height: 58vh; color: var(--quiet); text-align: center; }.detail-placeholder svg { width: 48px; height: 48px; color: #bc9389; }.detail-placeholder strong { color: var(--muted); margin: 15px 0 3px; }.detail-placeholder p { max-width: 220px; margin: 0; font-size: 12px; }
.preview-card { padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fffcf8; }
.preview-illustration { display: grid; place-items: center; height: 140px; margin-bottom: 15px; border: 1px solid #ebd9ca; border-radius: 6px; color: #936f83; background: #fff4e8; }.preview-illustration svg { width: 65px; height: 65px; stroke-width: 1.1; }
.preview-illustration img { width: 100%; height: 100%; object-fit: contain; } .text-preview { width: 100%; height: 100%; overflow: hidden; margin: 0; padding: 12px; color: var(--text); text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }.preview-card strong { display: block; font-size: 16px; }
.preview-card small { color: var(--quiet); }.detail-tabs { display: flex; gap: 18px; margin: 19px 0 14px; border-bottom: 1px solid var(--line); }.detail-tabs button { padding: 0 3px 10px; border: 0; border-bottom: 2px solid transparent; color: var(--quiet); background: transparent; }.detail-tabs button:hover, .detail-tabs button.active { color: var(--accent-text); border-color: var(--accent); }
.meta-list { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 11px 6px; margin: 0; font-size: 12px; }.meta-list dt { color: var(--quiet); }.meta-list dd { min-width: 0; margin: 0; color: var(--text); overflow-wrap: anywhere; }
.detail-divider { height: 1px; margin: 20px 0; background: var(--line); }.detail-actions { display: grid; gap: 8px; }.detail-actions button { width: 100%; }.detail-actions .split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.subheading { margin: 19px 0 7px; font-size: 12px; font-weight: 700; color: var(--muted); }.detail-help { margin: 0; color: var(--quiet); font-size: 12px; }.share-item { padding: 11px 0; border-bottom: 1px solid var(--line); }.share-item small { display: block; margin-top: 3px; color: var(--quiet); }.share-item .secondary-button { min-height: 30px; padding: 0 9px; margin-top: 8px; font-size: 11px; }
.row-menu { position: fixed; z-index: 30; width: 146px; max-height: calc(100vh - 16px); overflow-y: auto; padding: 5px; border: 1px solid #dfc8ba; border-radius: 8px; background: #fffcf8; box-shadow: 0 12px 28px #281a2b2e; }.row-menu button { display: block; width: 100%; padding: 8px; border: 0; border-radius: 5px; text-align: left; color: var(--text); background: transparent; }.row-menu button:hover { background: var(--hover); }.row-menu button.danger-text { color: var(--danger); }
.toast { position: fixed; z-index: 40; right: 24px; bottom: 24px; max-width: min(480px,calc(100vw - 48px)); padding: 12px 16px; border: 1px solid #d5aaa0; border-radius: 8px; color: var(--text); background: #fff7f0; box-shadow: 0 12px 32px #281a2b30; overflow-wrap: anywhere; }.toast.error { border-color: #c88488; background: #fff0ef; }
.modal-root { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; }.modal-backdrop { position: absolute; inset: 0; background: #281a2b91; backdrop-filter: blur(5px); }.modal { position: relative; width: min(480px,100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 22px; border: 1px solid #dfc8ba; border-radius: 12px; background: #fffcf8; box-shadow: 0 20px 70px #281a2b59; }.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }.modal h2 { margin: 3px 0 0; font-size: 21px; }.modal-description { margin: 9px 0 17px; color: var(--muted); font-size: 13px; }.modal label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 12px; }.modal input, .modal select { width: 100%; min-height: 41px; padding: 0 11px; border: 1px solid #d9c4ba; border-radius: 7px; background: #fffaf4; color: var(--text); }.modal input[type=checkbox] { width: 16px; min-height: 16px; accent-color: var(--accent); }.modal .checkbox-label { display: flex; gap: 8px; align-items: center; }.modal .hint { margin: 8px 0 0; font-size: 11px; color: var(--quiet); }.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 23px; }.modal .file-picker { display: grid; place-items: center; min-height: 100px; border: 1px dashed #ba9187; border-radius: 8px; cursor: pointer; background: #fff4e8; text-align: center; }.modal .file-picker:hover { border-color: var(--accent); }.modal .file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }.modal progress { display: block; width: 100%; margin-top: 12px; accent-color: var(--accent); }.modal progress[hidden] { display: none !important; }.modal .result-link { display: block; overflow-wrap: anywhere; margin-top: 12px; padding: 10px; border: 1px solid #e5c9b9; border-radius: 6px; background: #fff4e8; font-size: 12px; }
@media(max-width:1150px) { .workspace { grid-template-columns: minmax(0,1fr) 295px; }.file-table th:first-child { width: 39%; }.file-table th:nth-child(3) { width: 17%; } }
@media(max-width:980px) { .workspace { display: block; }.details { display: none; position: fixed; z-index: 20; right: 0; top: 74px; bottom: 0; width: min(390px,100vw); overflow-y: auto; box-shadow: -15px 0 40px #281a2b40; }.details.open { display: block; }.file-table { min-width: 700px; } }
@media(max-width:690px) { .app { grid-template-columns: 1fr; }.sidebar { display: none; position: fixed; z-index: 30; width: 236px; box-shadow: 15px 0 30px #281a2b59; }.sidebar.open { display: flex; }.mobile-menu, .sidebar-close { display: inline-grid; }.sidebar-close { position: absolute; top: 17px; right: 12px; color: #fff4e8; }.brand img { width: 155px; }.topbar { height: 62px; padding: 0 12px; gap: 8px; }.topbar-left { gap: 5px; }.topbar-right { gap: 8px; }.breadcrumb button { max-width: 72px; padding: 5px; font-size: 12px; }.search-box { width: 39px; padding: 0 10px; }.search-box:focus-within { position: absolute; z-index: 4; left: 50px; right: 120px; width: auto; background: #fffaf4; }.search-box:not(:focus-within) input { width: 0; opacity: 0; }.search-box kbd { display: none; }.primary-button { padding: 0 10px; }.workspace { min-height: calc(100vh - 62px); }.content-header { padding: 20px 15px 14px; }.content-header p { max-width: 210px; }.filter-row { padding: 9px 15px; }.file-footer { padding: 13px 15px; }.file-footer span:last-child { display: none; }.details { top: 62px; } }
@media(prefers-reduced-motion:reduce) { *, *:before, *:after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* First-run and sign-in screen shares the file manager's cun palette. */
.auth-shell { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 30px; padding: 26px; background: radial-gradient(circle at 15% 10%, #503048 0, transparent 42%), linear-gradient(150deg,#281a2b,#3b293a); }
.auth-brand { display: grid; justify-items: center; gap: 13px; color: #e4ced4; text-align: center; font-size: 13px; }
.auth-brand img { width: 195px; height: auto; }
.auth-card { width: min(440px,calc(100vw - 32px)); padding: 34px; border: 1px solid #dec6b9; border-radius: 16px; background: #fffcf8; box-shadow: 0 24px 65px #140e1b65; }
.auth-card .eyebrow { color: var(--accent-text); }
.auth-card h1 { margin: 9px 0 7px; }
.auth-card p { margin: 0 0 23px; color: var(--muted); font-size: 13px; }
.auth-card form { display: grid; gap: 8px; }
.auth-card label { color: var(--muted); font-size: 12px; font-weight: 650; }
.auth-card input { width: 100%; height: 43px; margin-bottom: 8px; padding: 0 12px; border: 1px solid #d9c4ba; border-radius: 8px; background: #fffaf4; color: var(--text); }
.auth-card input:focus { border-color: var(--accent); outline: 2px solid #e85c4344; }
.auth-card small { color: var(--quiet); font-size: 11px; }
.auth-card button { width: 100%; margin-top: 13px; }
.auth-divider { margin: 20px 0 2px; color: var(--quiet); text-align: center; font-size: 12px; }
@media(max-width:690px) { .auth-card { padding: 25px; } }
