.account-menu { position: fixed; z-index: 90; width: 340px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 20px; border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 8px 36px #0004; font-size: 12px; }
.account-menu-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.account-menu-photo { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; background: #009fff; color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 600; overflow: hidden; }
.account-menu-photo img, .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.account-menu-photo:focus-visible, .account-menu-photo:hover { outline: 2px solid #009fff; outline-offset: 3px; }
.account-menu-name { font-size: 16px; font-weight: 700; color: #87898F; overflow-wrap: anywhere; min-width: 0; }
.account-menu-storage { background: #f6f7f8; border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.account-menu-storage-label { margin-bottom: 5px; }
.account-menu-track { display: flex; overflow: hidden; height: 8px; background: #fff; border-radius: 8px; margin-bottom: 14px; }
.account-menu-track span { flex: 0 0 auto; height: 100%; }
.account-menu-files-fill { background: #009FFF; }
.account-menu-technical-fill { background: #D5D5D5; }
.account-menu-legend { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: center; margin-top: 10px; }
.account-menu-dot { width: 8px; height: 8px; border-radius: 50%; background: #009FFF; }
.account-menu-dot.technical { background: #D5D5D5; }
.account-menu-appearance { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; border-radius: 10px; background: #f6f7f8; }
.account-theme-options { display: flex; align-items: center; gap: 20px; }
.account-theme { width: 40px; height: 16px; padding: 0; border: 1px solid #87898F; border-radius: 12px; background: #fff; }
.account-theme[data-theme="dark"] { background: #87898F; }
.account-theme[data-theme="system"] { background: linear-gradient(to right,#fff 50%,#87898F 50%); }
.account-theme[aria-pressed="true"] { outline: 2px solid #009FFF; border-color: #009FFF; }
.account-theme:focus-visible { outline: 2px solid #009FFF; outline-offset: 3px; }
.account-menu-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 20px; }
.account-menu-footer button, .account-menu-manage { padding: 12px 20px; color: #87898F; border-radius: 10px; white-space: nowrap; }
.account-menu-footer button:hover:not(:disabled), .account-menu-footer button:focus-visible, .account-menu-manage:hover:not(:disabled), .account-menu-manage:focus-visible { background: #009FFF; color: #fff; outline: none; }
.account-menu-footer .account-menu-logout { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.account-menu-logout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.account-menu .account-menu-error { color: var(--danger); margin: 12px 0 0; line-height: 1.4; }
.avatar { overflow: hidden; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; }
.avatar.has-profile { background: #009FFF; }
.avatar .account-settings-icon { width: 20px; height: 20px; }
.account-password-form { display: grid; gap: 12px; }
.account-password-form label { display: grid; gap: 6px; }
.account-password-form input { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 10px; color: var(--text); background: var(--surface); }
.account-password-note { margin: 0; color: #87898F; line-height: 1.5; font-size: 12px; }
.account-password-error { margin: 0; color: var(--danger); font-size: 12px; }
.account-menu-manage { width: 100%; margin-top: 20px; text-align: left; }
.account-menu-backup { padding: 10px 20px 12px; color: #87898F; line-height: 1.4; overflow-wrap: anywhere; }
.account-menu-backup.problem { color: var(--danger); }
.account-storage-form { display: grid; gap: 18px; }
.account-storage-limit { display: grid; gap: 8px; }
.account-storage-input { display: flex; align-items: center; gap: 12px; color: #87898F; }
.account-storage-input input { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px; color: var(--text); background: var(--surface); }
.account-storage-details { margin: 0; display: grid; gap: 12px; }
.account-storage-details > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.account-storage-details dt { color: #87898F; }
.account-storage-details dd { margin: 0; white-space: nowrap; }
.account-storage-warning { padding: 12px; border: 1px solid var(--danger); border-radius: 8px; font-size: 12px; line-height: 1.5; }
.account-storage-warning p { margin: 0 0 10px; }
.account-storage-warning label { display: flex; gap: 8px; align-items: flex-start; }
.dialog .account-storage-warning input { flex: 0 0 16px; width: 16px; height: 16px; padding: 0; margin: 2px 0 0; accent-color: #009FFF; }
.dialog:has(.account-storage-form), .dialog:has(.account-storage-loading) { max-height: calc(100dvh - 40px); overflow-y: auto; }
.account-storage-form button:disabled { opacity: .45; cursor: default; }
/* Appearance only: no geometry, assets, selection or viewer behavior changes. */
:root[data-resolved-theme="light"] { color-scheme: light; }
:root[data-resolved-theme="dark"],
:root[data-resolved-theme="dark"] .public-mode {
  color-scheme: dark;
  --background: #191a1d;
  --surface: #222327;
  --text: #e8e9ed;
  --muted: #9b9da5;
  --metadata: #9b9da5;
  --border: #393b41;
  --hover: #2d2e33;
  --selection: #34363d;
  --accent: #009FFF;
  --brand: #009FFF;
  --danger: #ff7e85;
  --success: #8bd65a;
}
:root[data-resolved-theme="dark"] .tree-row .tree-arrow { color: #b6b8bf; }
:root[data-resolved-theme="dark"] :is(.breadcrumbs,.trash-heading) { color: #9b9da5; }
:root[data-resolved-theme="dark"] :is(.preview-meta,.banner-placeholder,.banner-preview-scale,.video-geometry,.upload-status-summary,.account-menu-name,.account-menu-footer button,.account-password-note) { color: #9b9da5; }
:root[data-resolved-theme="dark"] .banner-view-switch button:not([aria-pressed="true"]) { color: #9b9da5; }
:root[data-resolved-theme="dark"] :is(.account-menu-storage,.account-menu-appearance) { background: #191a1d; }
:root[data-resolved-theme="dark"] :is(.account-menu-track,.upload-file-bar) { background: #393b41; }
:root[data-resolved-theme="dark"] .account-menu-footer button:is(:hover,:focus-visible):not(:disabled) { color: #fff; }
:root[data-resolved-theme="dark"] .account-menu-backup:not(.problem) { color: #9b9da5; }
:root[data-resolved-theme="dark"] .modal-layer { background: #0006; }
:root[data-resolved-theme="dark"] :is(.context-menu,.dialog,.search-scope-menu,.account-menu) { box-shadow: 0 8px 28px #0007; }
:root[data-resolved-theme="dark"] .upload-drop-target:not(.file-row)::after { background: #222327f0; }
:root[data-resolved-theme="dark"] :is(#login-error,#access-error,#unlock-error,.account-menu-error,.account-password-error) { color: #ff7e85; }
:root[data-resolved-theme="dark"] #cloud-transfer:is([data-state="cancelled"],[data-state="error"]) #upload-status-title { color: #ff7e85; }
:root[data-resolved-theme="dark"] .file-viewer-text { background: #222327; color: #e8e9ed; }
@media (max-width: 480px) { .header .avatar { display: grid; } .account-menu { padding: 16px; } .account-theme-options { gap: 12px; } .account-theme { width: 36px; } .account-menu-appearance { padding: 16px; } }
