/* Flat palette for terminal chrome and tool dialogs; file exchange retains its stock light theme. */
:root { --tool-bg:#202020; --tool-panel:#252525; --tool-bar:#303030; --tool-border:#454545; --tool-text:#d4d4d4; --tool-muted:#999; color-scheme:dark; }
html, body { background:var(--tool-bg); color:var(--tool-text); font-family:Arial,'Segoe UI',sans-serif; font-size:12px; }
.terminal-pane, .terminal-window, .terminal-placeholder, .device-screen { background:var(--tool-bg); box-shadow:none; }
.pane-divider { background:var(--tool-border); width:3px; }
.pane-divider:hover, .pane-divider.dragging { background:#888; }
.command-container, .screen-heading, .joy-dialog header { background:var(--tool-bar); border-color:var(--tool-border); }
.toolbox-button, .terminal-toolbar-btn, .joy-dialog button { border-radius:0; box-shadow:none; }
.joy-dialog { background:var(--tool-panel); border-color:var(--tool-border); border-radius:0; box-shadow:none; font-family:inherit; }
.joy-dialog header { border-bottom:1px solid var(--tool-border); }
.joy-dialog select, .joy-capture { border-radius:0; box-shadow:none; }
.joy-table td, .joy-table tr:nth-child(even) td { background:var(--tool-panel); }
.joy-table th, .joy-table .joy-fallback td { background:var(--tool-bar); }


/* Keep auxiliary dialogs and connection controls in the same compact chrome. */
#share-dialog, #updates-dialog, .command-output-content, .error-modal-content {
    background:var(--tool-panel); color:var(--tool-text); border:1px solid var(--tool-border);
    border-radius:0; box-shadow:none; font-family:inherit; font-size:12px;
}
#share-dialog, #updates-dialog { padding:16px; }
#updates-dialog button, #updates-credentials input, #updates-log,
#share-dialog button, #share-dialog input, .command-output-header, .error-modal-header {
    border-radius:0; box-shadow:none;
}
#updates-dialog button, #share-dialog button { padding:4px 10px; font:inherit; }
.command-output-header, .error-modal-header { background:var(--tool-bar); border-color:var(--tool-border); }
.command-output-body { background:var(--tool-bg); }

.joy-selectors { display:flex; gap:8px; align-items:center; margin-bottom:8px; }
.joy-selectors #joy-controller { flex:1; min-width:0; }
.joy-profile-picker { position:relative; flex:0 0 145px; }
#joy-profile { display:flex; align-items:center; gap:7px; width:100%; min-height:25px; padding:2px 7px; background:#1c1c1c; }
.joy-chevron { margin-left:auto; color:#999; }
.joy-led { display:inline-block; width:7px; height:7px; border-radius:50%; flex:none; background:#70c288; box-shadow:inset 0 0 0 1px #ffffff35; }
.joy-led[data-color="blue"] { background:#77aaff; }
.joy-led[data-color="yellow"] { background:#dfc65b; }
.joy-led[data-color="pink"] { background:#e58bb4; }
#joy-profile-options { position:absolute; top:100%; left:0; min-width:100%; z-index:2; background:#252525; border:1px solid #555; padding:2px; }
#joy-profile-options button { display:flex; align-items:center; gap:7px; border:0; width:100%; text-align:left; white-space:nowrap; padding:4px 7px; }
#joy-profile-options button[aria-selected="true"] { background:#444; }
.joy-table { border:0; }
.joy-table .joy-input-column { width:26%; }
.joy-table thead td, .joy-table thead th { border:0; background:transparent; padding:2px 5px 6px; font-weight:400; color:#999; }
.joy-table thead th { text-align:center; }
.joy-modifier-controls { display:flex; align-items:center; gap:6px; }
#joy-mode-name { margin-right:auto; font-size:11px; }
.joy-modifier-controls button { font-size:11px; min-height:21px; padding:1px 7px; }
@media(max-width:450px) { .joy-profile-picker { flex-basis:108px; } }

/* Isolate the stock file explorer from the surrounding dark application theme. */
#fileexplorer, .fe_fileexplorer_popup_wrap, .fe_fileexplorer_textarea { color-scheme:light; color:#000; font:16px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,sans-serif; }
#fileexplorer { background:#fff; }
