[data-theme=light]{color-scheme:light}
.appearance-menu{position:relative}.appearance-menu>summary,.profile-menu-link{display:flex;justify-content:space-between;padding:12px 8px;border-radius:8px;font-size:.85rem;cursor:pointer;color:var(--ink);text-decoration:none}.appearance-menu>summary:hover,.profile-menu-link:hover{background:var(--hover,#f0f5fc)}.appearance-panel{position:absolute;right:calc(100% + 20px);top:0;width:280px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 16px 45px #0002}.theme-picker{border:0;padding:0;margin:0 0 15px}.theme-picker legend{font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:10px}.theme-picker form{display:flex;flex-wrap:wrap;gap:6px}.theme-picker button{flex:1;border:1px solid var(--line);border-radius:8px;padding:9px 7px;background:var(--surface);color:var(--ink);cursor:pointer}.theme-picker [aria-pressed=true]{background:var(--selection,#e9f1ff);border-color:var(--blue)}.theme-picker small{flex-basis:100%;font-size:.72rem;color:var(--muted)}.user-menu-panel>label{display:block;margin:14px 0 7px;font-size:.75rem;color:var(--muted)}.user-menu-panel>select{width:100%;padding:8px;border:1px solid var(--line);border-radius:7px}.appearance-panel .interaction-picker{margin:0}.user-menu-panel>.button{display:block;margin-top:10px}.appearance-panel fieldset{min-width:0}
[data-theme=dark]{--ink:#e2e9f4;--muted:#a6b4c8;--line:#334154;--line-strong:#4b5c72;--surface:#172334;--canvas:#0e1826;--blue:#79b5ff;--blue-2:#4e99f5;--hover:#213449;--selection:#253e5d;color-scheme:dark;}
[data-theme=dark] .topbar,[data-theme=dark] .public-topbar,[data-theme=dark] .user-menu-panel,[data-theme=dark] .appearance-panel,[data-theme=dark] .command-palette,[data-theme=dark] .meta-results,[data-theme=dark] .customer-table th,[data-theme=dark] .document-detail-dialog,[data-theme=dark] .document-inspector,[data-theme=dark] .document-editor,[data-theme=dark] .editor-workspace,[data-theme=dark] .customer-tabs{background:var(--surface);color:var(--ink)}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea,[data-theme=dark] .form-field input,[data-theme=dark] .form-field select,[data-theme=dark] .form-field textarea,[data-theme=dark] .customer-search input,[data-theme=dark] .command-trigger,[data-theme=dark] .command-input-wrap{background:var(--canvas);color:var(--ink);border-color:var(--line-strong)}
[data-theme=dark] .button.ghost,[data-theme=dark] .record-tabs a,[data-theme=dark] .user-menu-identity small,[data-theme=dark] .user-copy small{color:var(--muted)}
[data-theme=dark] .customer-tab,[data-theme=dark] .interaction-picker button,[data-theme=dark] .theme-picker button{background:var(--surface);color:var(--ink)}
[data-theme=dark] .customer-tab[aria-current="true"],[data-theme=dark] .interaction-picker button[aria-pressed=true],[data-theme=dark] .theme-picker button[aria-pressed=true],[data-theme=dark] .meta-results [aria-selected=true]{background:var(--selection);color:var(--ink)}
[data-theme=dark] .customer-table tr,[data-theme=dark] .customer-table td{border-color:var(--line)}
[data-theme=dark] .button.primary{background:linear-gradient(135deg,#0874e8,#287ddb);color:#fff}
@media(prefers-color-scheme:dark){[data-theme=system]{--ink:#e2e9f4;--muted:#a6b4c8;--line:#334154;--line-strong:#4b5c72;--surface:#172334;--canvas:#0e1826;--blue:#79b5ff;--blue-2:#4e99f5;--hover:#213449;--selection:#253e5d;color-scheme:dark;}
[data-theme=system] .topbar,[data-theme=system] .public-topbar,[data-theme=system] .user-menu-panel,[data-theme=system] .appearance-panel,[data-theme=system] .command-palette,[data-theme=system] .meta-results,[data-theme=system] .customer-table th,[data-theme=system] .document-detail-dialog,[data-theme=system] .document-inspector,[data-theme=system] .document-editor,[data-theme=system] .editor-workspace,[data-theme=system] .customer-tabs{background:var(--surface);color:var(--ink)}
[data-theme=system] input,[data-theme=system] select,[data-theme=system] textarea,[data-theme=system] .form-field input,[data-theme=system] .form-field select,[data-theme=system] .form-field textarea,[data-theme=system] .customer-search input,[data-theme=system] .command-trigger,[data-theme=system] .command-input-wrap{background:var(--canvas);color:var(--ink);border-color:var(--line-strong)}
[data-theme=system] .button.ghost,[data-theme=system] .record-tabs a,[data-theme=system] .user-menu-identity small,[data-theme=system] .user-copy small{color:var(--muted)}
[data-theme=system] .customer-tab,[data-theme=system] .interaction-picker button,[data-theme=system] .theme-picker button{background:var(--surface);color:var(--ink)}
[data-theme=system] .customer-tab[aria-current="true"],[data-theme=system] .interaction-picker button[aria-pressed=true],[data-theme=system] .theme-picker button[aria-pressed=true],[data-theme=system] .meta-results [aria-selected=true]{background:var(--selection);color:var(--ink)}
[data-theme=system] .customer-table tr,[data-theme=system] .customer-table td{border-color:var(--line)}
[data-theme=system] .button.primary{background:linear-gradient(135deg,#0874e8,#287ddb);color:#fff}
}
@media(max-width:800px){.appearance-panel{position:static;width:100%;box-shadow:none;margin-top:8px}.user-menu-panel{max-height:calc(100dvh - 100px);overflow:auto}}
[data-theme=dark] .customer-tab a,[data-theme=dark] .customer-tab button{color:var(--ink)}
[data-theme=dark] .customer-facts dt,[data-theme=dark] .document-help,[data-theme=dark] .document-summary small,[data-theme=dark] .document-tree span,[data-theme=dark] .document-type,[data-theme=dark] .document-size,[data-theme=dark] .document-date,[data-theme=dark] .document-path,[data-theme=dark] .file-view-head small,[data-theme=dark] .command-hint,[data-theme=dark] .command-item small{color:var(--muted)}
[data-theme=dark] .document-items--list .document-item:nth-child(even),[data-theme=dark] .document-thumbnail,[data-theme=dark] .file-view-content{background:var(--canvas)}
[data-theme=dark] .file-view,[data-theme=dark] .file-info-card,[data-theme=dark] .file-delete-confirm,[data-theme=dark] .workspace-start-menu,[data-theme=dark] .document-dialog,[data-theme=dark] .document-dialog-head{background:var(--surface);color:var(--ink)}
[data-theme=dark] .document-items .document-open.is-selected,[data-theme=dark] .document-tree a[aria-current],[data-theme=dark] .document-results a[aria-current],[data-theme=dark] .command-item[aria-selected=true]{background:var(--selection);color:var(--ink)}
@media(prefers-color-scheme:dark){
[data-theme=system] .customer-tab a,[data-theme=system] .customer-tab button{color:var(--ink)}
[data-theme=system] .customer-facts dt,[data-theme=system] .document-help,[data-theme=system] .document-summary small,[data-theme=system] .document-tree span,[data-theme=system] .document-type,[data-theme=system] .document-size,[data-theme=system] .document-date,[data-theme=system] .document-path,[data-theme=system] .file-view-head small,[data-theme=system] .command-hint,[data-theme=system] .command-item small{color:var(--muted)}
[data-theme=system] .document-items--list .document-item:nth-child(even),[data-theme=system] .document-thumbnail,[data-theme=system] .file-view-content{background:var(--canvas)}
[data-theme=system] .file-view,[data-theme=system] .file-info-card,[data-theme=system] .file-delete-confirm,[data-theme=system] .workspace-start-menu,[data-theme=system] .document-dialog,[data-theme=system] .document-dialog-head{background:var(--surface);color:var(--ink)}
[data-theme=system] .document-items .document-open.is-selected,[data-theme=system] .document-tree a[aria-current],[data-theme=system] .document-results a[aria-current],[data-theme=system] .command-item[aria-selected=true]{background:var(--selection);color:var(--ink)}
}
[data-theme=dark] .topbar-customer nav a{color:var(--muted)}[data-theme=dark] .topbar-customer nav a[aria-current]{background:var(--selection);color:var(--ink)}
@media(prefers-color-scheme:dark){[data-theme=system] .topbar-customer nav a{color:var(--muted)}[data-theme=system] .topbar-customer nav a[aria-current]{background:var(--selection);color:var(--ink)}}

/* Keep the second settings level within the same panel at intermediate widths. */
.appearance-panel .appearance-panel { position: static; width: 100%; margin: 8px 0 0; box-shadow: none; }
.appearance-panel .appearance-panel::after { display: none; }
