/* Appearance occupies a real header slot, never a floating overlay. */
.tcloud-visual-theme-switcher.tcloud-appearance-menu {
 position:relative;inset:auto;flex:0 0 40px;width:40px;height:40px;
 display:block;padding:0;border:0;border-radius:10px;background:transparent;
 color:hsl(var(--muted-foreground));box-shadow:none;backdrop-filter:none;z-index:10020;
}
.tcloud-appearance-menu > .tcloud-appearance-trigger {
 width:40px;min-width:40px;height:40px;min-height:40px;padding:0;display:flex;
 justify-content:center;align-items:center;border-radius:10px;
}
.tcloud-appearance-menu > .tcloud-appearance-trigger svg { width:20px;height:20px; }
.tcloud-appearance-trigger[aria-expanded="true"] {background:hsl(var(--primary)/.12);color:hsl(var(--primary));}
.tcloud-appearance-panel {
 position:absolute;top:calc(100% + 10px);right:0;width:244px;max-width:calc(100vw - 24px);
 padding:16px;border-radius:16px;border:1px solid hsl(var(--border));background:hsl(var(--card));
 color:hsl(var(--foreground));box-shadow:0 12px 32px #0002;
}
.tcloud-appearance-panel[hidden] {display:none;}
.tcloud-appearance-panel p {margin:0 0 12px;font:600 12px/1.4 Inter,system-ui,sans-serif;}
.tcloud-appearance-panel p.tcloud-appearance-mode-label {margin-top:16px;color:hsl(var(--muted-foreground));}
.tcloud-appearance-styles {display:flex;gap:8px;}
.tcloud-appearance-panel :is(.tcloud-appearance-styles,.tcloud-mode-options) button {
 min-width:0;flex:1;width:auto;min-height:44px;justify-content:center;padding:0 8px;
 border:1px solid hsl(var(--border));border-radius:10px;font-size:12px;
}
.tcloud-appearance-panel span {position:static;width:auto;height:auto;clip:auto;overflow:visible;}
.tcloud-appearance-panel svg {width:18px;height:18px;}
.tcloud-caption-host {overflow:visible;}
.tcloud-appearance-dock {position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;height:56px;padding:0 16px;background:hsl(var(--background));border-bottom:1px solid hsl(var(--border)/.6);z-index:10010;}
.tcloud-caption-brand {margin-right:auto;font:600 13px/1.2 Inter,system-ui,sans-serif;color:hsl(var(--foreground));}
.tcloud-caption-brand b {color:hsl(var(--primary));}
.tcd-topbar > .tcloud-appearance-menu {order:0;}
.tcd-topbar > div:not(.tcloud-appearance-menu) {order:1;}
.tcd-topbar > div > button[aria-label="Alternar tema"] {display:none;}
/* The original standalone color control is now inside Appearance. */
.tcloud-landing > header > button:is([aria-label="Tema claro"],[aria-label="Tema escuro"]) {display:none;}
@media(max-width:600px) {
 .tcloud-appearance-menu > .tcloud-appearance-trigger {width:44px;height:44px;min-height:44px;min-width:44px;}
 .tcloud-visual-theme-switcher.tcloud-appearance-menu {width:44px;height:44px;flex-basis:44px;}
 .tcloud-landing > header {gap:6px;padding-left:12px;padding-right:12px;}
}
/* Windows: one caption/header row with genuine system caption controls. */
html.tcloud-electron:not(.tcloud-electron-mac) body::before {display:none;}
html.tcloud-electron:not(.tcloud-electron-mac)[data-tcloud-caption="integrated"] body {padding-top:0;}
html.tcloud-electron:not(.tcloud-electron-mac)[data-tcloud-caption="integrated"] .min-h-screen {min-height:100dvh;}
html.tcloud-electron:not(.tcloud-electron-mac)[data-tcloud-caption="standalone"] body {padding-top:56px;}
html.tcloud-electron:not(.tcloud-electron-mac) :is(.tcloud-caption-host,.tcloud-appearance-dock) {
 min-height:56px;height:56px;max-width:none;width:100%;margin:0;padding-top:0;padding-bottom:0;
 padding-left:16px;padding-right:calc(100vw - env(titlebar-area-width, calc(100vw - 144px)) + 12px);
 background:#f7fafc;backdrop-filter:none;border-radius:0;box-shadow:none;
 -webkit-app-region:drag;app-region:drag;
}
html.dark.tcloud-electron:not(.tcloud-electron-mac) :is(.tcloud-caption-host,.tcloud-appearance-dock) {background:#08131f;}
html.tcloud-electron:not(.tcloud-electron-mac) .tcd-topbar {top:0;}
html.tcloud-electron:not(.tcloud-electron-mac) .tcloud-appearance-dock {position:fixed;top:0;left:0;}
html.tcloud-electron :is(.tcloud-caption-host,.tcloud-appearance-dock) :is(button,a,input,select,nav,.tcloud-appearance-menu) {-webkit-app-region:no-drag;app-region:no-drag;}
html.tcloud-electron .tcloud-appearance-panel {-webkit-app-region:no-drag;app-region:no-drag;}
