/* Dev Studio client : workbench, tool frames and the shared components used by the tools */

:root {
	--bg: #d9dee4;
	--bg-grad: linear-gradient(180deg, #e3e7ec 0%, #d3d9e0 100%);
	--panel: #e9ecf0;
	--panel-edge: #c2c9d1;
	--panel-inner: #f6f7f9;
	--line: #cdd3da;
	--text: #232a33;
	--muted: #66717d;
	--accent: #3d6593;
	--accent-soft: #dce7f3;
	--warm: #d9792b;
	--danger: #b2402f;
	--ok: #3d8a4f;
	--radius: 10px;
	--font: "Segoe UI", system-ui, sans-serif;
	--sidebar: 260px;
	--sidebar-bg: #eef1f4;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
	font: 14.5px/1.45 var(--font);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	user-select: none;
}
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; user-select: text; }
.hidden { display: none !important; }
img.emoji { width: 1.25em; height: 1.25em; vertical-align: -0.25em; margin: 0 .05em; }
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ico svg { display: block; }

/* --- discreet scrollbars, everywhere */

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-thumb { background: #cdd2d8; border-radius: 8px; border: 4px solid transparent; background-clip: content-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background: #b7bdc4; border: 3px solid transparent; background-clip: content-box; }

/* --- shared controls */

.btn, button.primary, button.secondary, button.danger:not(.iconbtn) {
	display: inline-flex; align-items: center; gap: 6px;
	height: 31px; padding: 0 13px;
	border: 1px solid #aeb8c3; border-radius: 6px;
	background: linear-gradient(#fbfcfd, #e6eaee);
	cursor: pointer; white-space: nowrap;
}
.btn:hover, button.secondary:hover { background: linear-gradient(#ffffff, #edf0f3); }
button.primary { background: linear-gradient(#5b86b5, #3d6593); border-color: #2f5175; color: #fff; }
button.primary:hover { background: linear-gradient(#6690be, #44709f); }
button.danger:not(.iconbtn) { color: var(--danger); }
button[disabled] { opacity: .55; pointer-events: none; }
.btn.small { height: 27px; padding: 0 9px; font-size: 13px; }
.files .node .unsaveddot { width: 8px; height: 8px; border-radius: 50%; background: #e8833a; flex: none; margin-left: 4px; }
.files .node.unsaved > .name { font-style: italic; }
.files .node .vcsst { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 0 6px; color: var(--muted); }
.files .node.stM .vcsst { color: #b7791f; }
.files .node.stA .vcsst, .files .node.stU .vcsst { color: #2f855a; }
.files .node.stD .vcsst, .files .node.stC .vcsst { color: var(--danger); }
.files .saveall.hasdirty { color: #e8833a; }
.iconbtn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; color: var(--muted);
}
.iconbtn:hover { background: rgba(0,0,0,.07); color: var(--text); }
.iconbtn.danger:hover { color: var(--danger); background: #fbe9e7; }
.iconbtn .badge { position: absolute; top: -3px; right: -4px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; }
.iconbtn { position: relative; }
.iconbtn.big { width: 32px; height: 32px; }
td.actions .iconbtn + .iconbtn { margin-left: 2px; }

input[type=text], input[type=password], input[type=email], input:not([type]), select, textarea {
	height: 30px; padding: 0 9px;
	border: 1px solid #b4bec9; border-radius: 6px; background: #fff;
	outline: none;
}
textarea { height: auto; padding: 6px 9px; resize: none; }
/* the text typed : the color of the text, never the grey of the label around the field */
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], input:not([type]), select, textarea { color: var(--text); }
/* a checkbox or a radio clicked keeps no ring : the keyboard gets the one of the browser (focus-visible) */
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61,101,147,.18); }

.link { color: var(--accent); text-decoration: none; cursor: pointer; }
/* a secondary action : a link, not a grey button */
button.linkbtn { border: 0; background: none; padding: 2px 4px; color: var(--accent); cursor: pointer; font-size: 13.5px; }
button.linkbtn:hover { text-decoration: underline; }
.link:hover { text-decoration: underline; }
.error { color: var(--danger); min-height: 1em; }
/* a step on the line of the errors (the sign in in the browser) : not one */
.error.wait { color: var(--muted); }
.empty { color: var(--muted); padding: 16px; font-style: italic; }
.muted { color: var(--muted); }
.tag {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 1px 7px; border-radius: 10px; font-size: 12.5px;
	background: var(--accent-soft); color: #2c4c70;
}
.tag.warm { background: #f9e4d0; color: #8a4512; }
.tag.grey { background: #e3e6ea; color: #4c5662; }
.tag.online { background: #d7f0dc; color: #1f6b33; }
.presence { display: inline-flex; gap: 6px; align-items: center; min-width: 0; }
.presence .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- login */

#app.login { height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-grad); -webkit-app-region: drag; }
.card {
	-webkit-app-region: no-drag;
	width: 360px; padding: 24px 26px 20px;
	display: flex; flex-direction: column; gap: 11px;
	background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 14px;
	box-shadow: 0 1px 0 #fff inset, 0 12px 40px rgba(30,40,55,.18);
}
.card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.card .brand .name { font-size: 18px; font-weight: 600; }
.card .brand .sub { color: var(--muted); }
.card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.card label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.card button.primary { height: 32px; justify-content: center; margin-top: 4px; }
.card .link { text-align: center; font-size: 13px; }
/* the providers of the sign in (OAuth, spec §3.1), and the organizations of an email */
.card .providers { display: flex; flex-direction: column; gap: 8px; }
.card .providers button.provider { height: 34px; justify-content: center; gap: 10px; }
.card .providers .ico { display: inline-flex; color: var(--text); }
.card .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.card .or::before, .card .or::after { content: ''; flex: 1; border-top: 1px solid var(--panel-edge); }
.card button.orgchoice { height: 34px; justify-content: flex-start; gap: 8px; }
.card button.orgchoice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .brand .sub { overflow-wrap: anywhere; }
.card form.create { display: flex; flex-direction: column; gap: 11px; }
.card .orgchoice + form.create { border-top: 1px solid var(--panel-edge); padding-top: 11px; }
.card form.create .sub { color: var(--muted); font-size: 13px; }
/* the server out of reach : the offline mode (spec §12.2) */
.card .offline { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--panel-edge); border-radius: 8px; }
.card .offline .muted { font-size: 12.5px; color: var(--muted); }
.card .offline button.secondary { height: 32px; justify-content: center; }
/* the linked accounts of other organizations (spec §2) */
.card .accounts { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--panel-edge); padding-top: 10px; margin-top: 2px; }
.card .accounts .sub { color: var(--muted); font-size: 12.5px; }
.card .account { display: flex; align-items: center; gap: 4px; }
.card .account button.secondary { flex: 1; height: 30px; justify-content: flex-start; gap: 8px; }
/* the status page of a worker without the workbench (spec §8.5, gs.client.WorkerPage) */
.card.workerpage { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 72px); overflow: auto; }
.workerpage .wrows { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 16px; align-items: baseline; }
.workerpage .wlabel { color: var(--muted); font-size: 13px; }
.workerpage .wvalue { min-width: 0; overflow-wrap: anywhere; user-select: text; }
.workerpage .wvalue.ok::before, .workerpage .wvalue.warn::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--ok); }
.workerpage .wvalue.warn::before { background: var(--warm); }
.workerpage .wtasks { display: flex; flex-direction: column; gap: 3px; }
.workerpage .wnone { color: var(--muted); }
.workerpage .wtask { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.workerpage .wref { font-weight: 600; flex: none; }
.workerpage .wtitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workerpage .wslot { flex: none; color: var(--muted); font-size: 12.5px; }
.workerpage .waiactions { display: flex; flex-direction: column; gap: 8px; }
.workerpage .waiactions:empty { display: none; }
.workerpage .waiactions button.primary { align-self: flex-start; margin-top: 0; }
.workerpage .waiactions .link { text-align: left; }
.workerpage .whint { color: var(--muted); font-size: 13px; }
.workerpage .wcode { display: flex; gap: 6px; }
.workerpage .wcode input { flex: 1; min-width: 0; }
.workerpage .wlogtitle { color: var(--muted); font-size: 13px; border-top: 1px solid var(--panel-edge); padding-top: 10px; }
.workerpage .wlog { flex: none; height: 220px; overflow: auto; scrollbar-gutter: stable; padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-inner); font: 12px/1.5 Consolas, "Cascadia Mono", monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.workerpage .wlog:empty::before { content: attr(data-empty); color: var(--muted); }
.workerpage .wactions { display: flex; justify-content: flex-end; }
[data-theme=dark] .workerpage .wlog { background: #272727; }

/* --- workbench : header with the project and the tools, the active tool below */

body.workbench { background: #e4e8ec; overflow: hidden; }
#app.desk { height: 100%; display: flex; flex-direction: column; }

/* the header : the logo, the tool shown (its icon, its name, its own bar), its tabs in the center, the search and the project at the right */
#topbar {
	-webkit-app-region: drag;
	height: 44px; flex: none;
	display: flex; align-items: center;
	background: linear-gradient(#f4f6f8, #e3e7eb);
	border-bottom: 1px solid #b9c1ca;
}
#hleft { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; height: 100%; overflow: hidden; }
#hcenter { flex: none; display: flex; align-items: center; gap: 2px; min-width: 0; margin: 0 12px; }
#hcenter:empty { display: none; }
/* the search gives its room first to the bar of the tool (down to its min-width) */
/* its natural width : the search (420), the project (150) and the window controls ; the search shrinks down to its min-width */
#hright { flex: 0 100 718px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding-right: 140px; /* room for the window controls */ }
/* tabs in the center : the left and the right take the same room, the tabs are in the middle of the window
   (the left starts with the room of the window controls, the padding of the right) */
#topbar.centered #hleft { flex: 1 1 140px; }
#topbar.centered #hright { flex: 1 1 0; }
#topbar.centered #gsearchbox { min-width: 200px; }
#topbar.centered #hcenter { max-width: 60%; overflow: hidden; }
#topbar button, #topbar .hbtn { -webkit-app-region: no-drag; }
#topbar .sep, #rail .sep { width: 1px; height: 24px; background: #c4cbd3; margin: 0 6px; flex: none; }
/* the logo of Studio : above the rail, in its column */
#brand { width: 56px; flex: none; display: flex; align-items: center; justify-content: center; margin-right: -6px; }
#brand > .ico { width: 26px; height: 26px; display: inline-flex; }
/* the icon and the name of the tool never shrink : only what follows them (a document, a channel) is cut */
#tooltitle { display: grid; grid-auto-flow: column; grid-auto-columns: max-content; align-items: center; gap: 10px; flex: 0 1 auto; max-width: 480px; padding: 0 14px 0 8px; }
#tooltitle > .ico { width: 26px; height: 26px; flex: none; }
#tooltitle .name { font-weight: 600; font-size: 15px; white-space: nowrap; flex: none; }
/* what the tool shows : cut first when the header is short */
#tooltitle { gap: 8px; }
#tooltitle.withsub { grid-template-columns: max-content max-content max-content minmax(48px, max-content); }
#tooltitle .tsep { display: inline-flex; color: var(--muted); flex: none; margin: 0 -2px; }
#tooltitle .sub { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 14.5px; color: var(--text); }
#tooltitle .sub > .ico, #tooltitle .sub > .avatar { flex: none; }
#tooltitle .subname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#toolheader { flex: 1 0 auto; display: flex; align-items: center; gap: 4px; overflow: hidden; padding-right: 8px; }
#toolheader:not(:empty) { border-left: 1px solid #c4cbd3; padding-left: 10px; }
#toolheader .spacer { flex: 1; }
/* the project : its menu at the top right */
#project { flex: none; width: 150px; margin-left: 4px; }
/* the tasks of the views (Api.runTask) : a width of its own, its text changing as it works moves nothing */
#tasks { width: 210px; font-variant-numeric: tabular-nums; }
#tasks .taskpct { flex: none; color: var(--muted); }
#tasks .taskmore { flex: none; font-size: 11.5px; padding: 0 5px; border-radius: 8px; background: rgba(0,0,0,.07); }
#project .avatar { flex: none; }
/* a tab of a tool : the current one bold (in the room of its bold text) and underlined, the layout never moves */
.hbtn.htab { height: 44px; border-radius: 0; border: 0; box-shadow: inset 0 -2px 0 transparent; padding: 0 11px; font-size: 14px; color: #4b5561; }
.hbtn.htab:hover { background: rgba(0,0,0,.04); color: var(--text); }
.hbtn.htab.on { background: none; color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.hbtn.htab.on .blabel { font-weight: 600; }
.hbtn.dragging { opacity: .45; }
.hbtn.dropbefore { box-shadow: inset 2px 0 0 var(--accent); }
.hbtn.dropafter { box-shadow: inset -2px 0 0 var(--accent); }
.hbtn {
	height: 30px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; cursor: pointer;
	display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: #38414c; flex: none; font-size: 13px;
}
.hbtn.iconly { width: 32px; padding: 0; justify-content: center; }
.hbtn:hover { background: rgba(0,0,0,.06); }
.hbtn.on { background: #fff; border-color: #c3cad2; color: var(--accent); }
.hbtn.primary { height: 30px; padding: 0 11px; }
.hbtn .hlabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.hbtn .chev { display: inline-flex; opacity: .6; }
/* a work in progress (Api.HeaderItem.progress) : a bar at the bottom of the button, the button keeps its size */
.hbtn { position: relative; }
.hbtn .hprogress { position: absolute; left: 6px; right: 6px; bottom: 1px; height: 3px; border-radius: 2px; background: rgba(0,0,0,.08); overflow: hidden; pointer-events: none; }
.hbtn .hprogress i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; }
.hbtn .hprogress.indet i { width: 30%; animation: prepbar 1.2s linear infinite; }
/* a note below an entry (Api.HeaderItem.note) : over the page, centered on its entry */
.hnote { position: fixed; z-index: 50; transform: translateX(-50%); padding: 4px 10px; border-radius: 6px; background: #2f3640; color: #fff; font-size: 12.5px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); animation: hnotepop .18s ease-out; }
.hnote::before { content: ''; position: absolute; left: 50%; top: -4px; margin-left: -4px; border: 4px solid transparent; border-top: 0; border-bottom-color: #2f3640; }
@keyframes hnotepop { from { opacity: 0; transform: translate(-50%, -4px); } }
.hdot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
/* a text of the bar : it gives its room first when the header is short */
.htext { font-size: 13px; color: var(--muted); white-space: nowrap; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 6px; }
.htext > span:last-child { overflow: hidden; text-overflow: ellipsis; }

/* the rail : the project, the tools, the customizations, the administration and the user, as icons */
#desk { flex: 1; min-height: 0; display: flex; }
#rail {
	width: 56px; flex: none; box-sizing: border-box;
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	padding: 8px 0 10px;
	background: linear-gradient(90deg, #eceff2, #e3e7eb);
	border-right: 1px solid #b9c1ca;
}
#rail .sep { width: 28px; height: 1px; margin: 4px 0; }
.railbtn {
	width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-radius: 9px; background: transparent; cursor: pointer; color: #5b6573;
	display: inline-flex; align-items: center; justify-content: center; position: relative;
}
.railbtn:hover { background: rgba(0,0,0,.06); color: var(--text); }
#freeze { position: fixed; z-index: 40; pointer-events: none; overflow: hidden; }
#freeze img { display: block; max-width: none; }
#adminbtn.hidden, #serverbtn.hidden { display: none; }
#custobtn.on, #adminbtn.on, #serverbtn.on { background: #fff; box-shadow: inset 0 0 0 1px #c3cad2; color: var(--accent); }
#tools { display: flex; flex-direction: column; align-items: center; align-self: stretch; gap: 4px; min-height: 0; overflow: hidden auto; scrollbar-width: none; }
#tools::-webkit-scrollbar { display: none; }
#tools .addtool { flex: none; width: 32px; height: 28px; margin-top: 2px; opacity: .55; }
#tools .addtool:hover { opacity: 1; }
/* the window of a tool : no project ; its tools are there, another one opens in the main window */
body.locked #project { display: none; }
.tab.dragging { opacity: .4; }
.tab.dropbefore { box-shadow: inset 0 2px 0 var(--accent); }
.tab.dropafter { box-shadow: inset 0 -2px 0 var(--accent); }
.tab {
	width: 40px; height: 40px; flex: none; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; color: #38414c; position: relative;
}
.tab:hover { background: rgba(0,0,0,.06); }
/* the name of a tool is its title, and the header shows it : the tab is its icon */
#tools .tab > .blabel { display: none; }
/* the icon of a tab keeps its box when a theme hides its svg to draw another one (spec §8.1.1) */
#tools .tab > .ico { width: 28px; height: 28px; }
/* a count on the icon of a tab : the unread direct messages of the Chat */
.tab .tabbadge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: #d9534f; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; pointer-events: none; }
/* the tool shown : white, a bar of the accent at its left (a tool open has no mark) */
.tab.active { background: #fff; border-color: #c3cad2; box-shadow: 0 1px 2px rgba(30,40,55,.08); }
.tab.active::before { content: ""; position: absolute; left: -8px; top: 9px; width: 3px; height: 20px; border-radius: 2px; background: var(--accent); }
.spacer { flex: 1; }
/* a state never moves the layout : the label of a tab keeps the room of its bold text (Dom.label), the current one is bold in it */
.blabel { display: inline-flex; flex-direction: column; align-items: center; white-space: nowrap; }
.blabel::after { content: attr(data-text); height: 0; overflow: hidden; visibility: hidden; font-weight: 600; user-select: none; pointer-events: none; }
/* the connection : a dot at the bottom right of the avatar of the user, ringed with the color of the rail */
#userbox { position: relative; flex: none; }
#status { position: absolute; right: 4px; bottom: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px #e6e9ed; pointer-events: none; }
#status.lost { background: var(--warm); animation: workerpulse 1.6s ease-in-out infinite; }
#clock { display: none; font-variant-numeric: tabular-nums; color: #3c4450; padding: 0 6px 0 10px; }
body.fullscreen #clock { display: block; }
body.fullscreen #hright { padding-right: 12px; flex-basis: 590px; }
body.fullscreen #topbar.centered #hleft { flex-basis: 12px; }

#area { flex: 1; min-height: 0; position: relative; background: #f6f7f9; }
#area .empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-style: normal; }
/* a tool opened for the first time : its package and its page */
.toolprep { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.prepbar { width: 220px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.prepbar i { display: block; width: 30%; height: 100%; background: var(--accent); animation: prepbar 1.2s ease-in-out infinite; }
@keyframes prepbar { from { margin-left: -30%; } to { margin-left: 100%; } }

.dropdown {
	position: fixed; z-index: 100; min-width: 220px; max-height: 70vh; overflow: auto;
	padding: 4px; background: #f8f9fb; border: 1px solid #b4bdc7; border-radius: 10px;
	box-shadow: 0 10px 30px rgba(20,30,45,.22);
}
.dropdown button {
	width: 100%; display: flex; align-items: center; gap: 9px;
	min-height: 30px; padding: 3px 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer;
}
.dropdown button > span:not(.ico):not(.avatar) { flex: 1; }
.dropdown button .ico { width: 16px; color: var(--muted); }
.dropdown button .ico.check { color: var(--accent); }
.dropdown button:hover { background: var(--accent); color: #fff; }
.dropdown button:hover .ico { color: #fff; }
.dropdown button.danger { height: auto; padding: 3px 8px; border: 0; background: transparent; color: var(--danger); }
.dropdown button.danger:hover { background: var(--danger); color: #fff; }
.dropdown button.danger .ico { color: inherit; }
.dropdown .msep { height: 1px; background: var(--line); margin: 4px 6px; }
.dropdown button .ico.arrow { width: auto; margin-left: 8px; }
.dropdown .info { padding: 6px 8px 8px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* --- avatars and looks */

.avatar { display: inline-flex; flex: none; border-radius: 6px; overflow: hidden; }
.avatar.round { border-radius: 50%; }
/* a background chosen (LookStyle) draws its own shape */
.avatar.shaped { border-radius: 0; }
.avatar svg, .avatar img { display: block; object-fit: cover; }
.lookpicker { display: flex; gap: 14px; align-items: flex-start; }
.lookpicker .choices { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lookpicker.collapsed .choices { display: none; }
.lookpicker .lookedit { position: relative; flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 14px; }
.lookpicker .lookedit .editbadge { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #4b5561; box-shadow: 0 1px 4px rgba(20,30,45,.3); display: inline-flex; align-items: center; justify-content: center; }
.lookpicker .lookedit:hover .editbadge, .lookpicker:not(.collapsed) .lookedit .editbadge { background: var(--accent); color: #fff; }
.lookpicker .icons { display: flex; flex-wrap: wrap; gap: 3px; max-height: 196px; overflow: auto; padding-right: 4px; }
.lookpicker .pick { padding: 2px; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; display: flex; }
.lookpicker .pick.current { border-color: var(--accent); }
.lookpicker .colors { display: flex; flex-wrap: wrap; gap: 5px; }
.lookpicker .swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #b4bec9; cursor: pointer; padding: 0; }
.lookpicker .swatch.current { box-shadow: 0 0 0 2px var(--accent); }
/* no background (an image of the library) : a checkerboard */
.lookpicker .row { display: flex; gap: 6px; }
.profileform { display: flex; flex-direction: column; gap: 10px; }
.cols { display: flex; gap: 10px; }
.cols > * { flex: 1; }
.card .cols label, .modal .cols label { min-width: 0; }
.cols input { width: 100%; }

/* --- tool pages */

body.toolpage { background: #f6f7f9; overflow: hidden; }
#tool { position: absolute; inset: 0; user-select: text; }
.crash { padding: 24px; color: var(--danger); }

/* --- layouts shared by the tools */

.split { position: absolute; inset: 0; display: flex; }
/* the border of a side panel, dragged to resize it (ui.Splitter) : no width, its grip over the border */
.splitter { flex: none; width: 0; position: relative; z-index: 6; }
.splitter::after { content: ""; position: absolute; top: 0; bottom: 0; left: -3px; width: 6px; cursor: col-resize; }
.splitter:hover::after, .splitter.drag::after { background: var(--accent); opacity: .4; }
/* a panel hidden : its border with it */
.hidden + .splitter, .splitter:has(+ .hidden) { display: none; }
body.splitting, body.splitting * { cursor: col-resize !important; user-select: none; }
/* scrolls across when needed, without a bar (Shift and the wheel, the touchpad) : the rows as wide as the widest one */
.hscroll { display: grid; align-content: start; grid-template-columns: minmax(max-content, 1fr); overflow: auto; }
.hscroll::-webkit-scrollbar:horizontal { height: 0; }
/* the left bars of the tools : same width and style everywhere */
.sidebar {
	width: var(--sidebar); flex: none; display: flex; flex-direction: column;
	background: var(--sidebar-bg); border-right: 1px solid var(--line);
	overflow: auto; font-size: 14px;
}
.sidebar h3 {
	margin: 12px 12px 4px; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
	display: flex; align-items: center; justify-content: space-between;
}
.navitem {
	display: flex; align-items: center; gap: 9px;
	margin: 1px 8px; padding: 6px 9px; font-size: 14px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer;
}
.navitem:hover { background: rgba(0,0,0,.05); }
.navitem.current { background: var(--accent); color: #fff; }
.navitem.current .ico { color: #fff; }
.navitem .ico { color: var(--muted); }
.navitem .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.navitem.current .count { color: #dfe8f3; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.toolbar {
	flex: none; display: flex; align-items: center; gap: 8px;
	padding: 8px 12px; border-bottom: 1px solid var(--line); background: #f1f3f5;
}
.toolbar h1 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.toolbar .sub { color: var(--muted); font-size: 13px; }
/* the room of the scrollbar is kept : a page or a tab that scrolls is as wide as one that does not */
.scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; }

table.list { width: 100%; border-collapse: collapse; }
/* fixed columns : a change in a row never moves them (an access added, a longer name) */
table.list.fixed { table-layout: fixed; }
table.list.fixed td { overflow-wrap: anywhere; }
table.list th {
	position: sticky; top: 0; z-index: 1;
	text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted);
	padding: 7px 12px; background: #f1f3f5; border-bottom: 1px solid var(--line);
}
table.list td { padding: 6px 12px; border-bottom: 1px solid #e3e7eb; vertical-align: middle; }
table.list tr:hover td { background: #eef3f8; }
table.list td .cell { display: flex; align-items: center; gap: 8px; }
table.list td.actions { text-align: right; white-space: nowrap; }
table.list td.actions button + button { margin-left: 4px; }

.form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f7f8fa; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.chip {
	display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px;
	background: #fff; border: 1px solid #ccd4dc; border-radius: 12px; font-size: 13px;
}
.chip:has(> button) { padding-right: 3px; }
.chip button { width: 16px; height: 16px; border: 0; padding: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.chip button:hover { background: #e3e6ea; color: var(--danger); }
/* a warning in a line of text : a token of a service user that works from anywhere */
.warntext { color: var(--warm); }
.modal .servicemodel { display: flex; flex-direction: column; gap: 6px; }
.modal .servicemodel.needed label { color: var(--danger); font-weight: 600; }

.modal-back { position: fixed; inset: 0; z-index: 200; background: rgba(30,40,55,.25); display: flex; align-items: center; justify-content: center; }
.modal {
	width: 460px; max-width: calc(100% - 32px); max-height: calc(100% - 32px); overflow: auto; padding: 16px 18px;
	background: var(--panel-inner); border: 1px solid #a8b2bd; border-radius: 12px; box-shadow: 0 16px 40px rgba(20,30,45,.3);
	display: flex; flex-direction: column; gap: 10px;
}
.modal h3 { margin: 0; font-size: 15px; }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.modal ul { margin: 0; padding-left: 18px; }
.modal label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.modal label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
/* the confirmations (Modal.confirm) : the same in every tool */
.modal.confirm { width: 480px; gap: 12px; padding: 18px 20px 16px; }
.modal.confirm .chead { display: flex; align-items: center; gap: 12px; }
.modal.confirm .chead h3 { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.modal.confirm .cico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #e8effa; color: var(--accent); }
.modal.confirm .cico.danger { background: #fdecea; color: var(--danger); }
.modal.confirm .cico.app { background: none; }
.modal.confirm .clead { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.5; padding-left: 46px; overflow-wrap: anywhere; }
.modal.confirm .ceffects { display: flex; flex-direction: column; gap: 1px; margin-left: 46px; border-radius: 8px; overflow: hidden; background: #e7ebf0; border: 1px solid #e7ebf0; }
.modal.confirm .ceffect { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; background: #f8fafc; font-size: 13px; color: #3b4652; line-height: 1.45; overflow-wrap: anywhere; }
.modal.confirm .ceffect .ceico { flex: none; display: inline-flex; margin-top: 2px; color: #8a96a3; }
.modal.confirm .ceffect .cetext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.modal.confirm .ceffect.warn { background: #fff8e8; color: #7a5310; }
.modal.confirm .ceffect.warn .ceico { color: #d18b12; }
.modal.confirm .cchips { display: flex; flex-wrap: wrap; gap: 4px; max-height: 120px; overflow: auto; }
.modal.confirm .clead + .cchips { margin-left: 46px; }
.modal.confirm .cchip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 7px; border-radius: 5px; background: #fff; border: 1px solid #dde3ea; font: 12px ui-monospace, Consolas, monospace; color: #3b4652; }
.modal.confirm .cchip.more { font-family: inherit; color: var(--muted); border-style: dashed; }
/* a list in a confirmation : commands (code), the changes of a review (Modal.review), cards (Run : the custos) */
.modal.confirm .cfield { margin-left: 46px; }
.modal.confirm .cpicbox { margin-left: 46px; }
.modal.confirm img.cstorepic { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; border-radius: 8px; border: 1px solid #e3e8ee; background: #f0f2f5; cursor: zoom-in; }
.modal.confirm .ceffect label.check { color: inherit; }
.modal.confirm .ceffect label.check.needed { color: var(--danger); font-weight: 600; }
.modal.confirm.wide { width: 640px; max-width: calc(100vw - 32px); }
.modal.confirm .clist { margin: 0 0 0 46px; max-height: min(46vh, 380px); overflow: auto; }
.modal.confirm pre.ccode { margin: 0; padding: 8px 10px; border-radius: 8px; background: #f3f5f8; border: 1px solid #e3e8ee; font: 12.5px/1.5 ui-monospace, Consolas, monospace; color: #2b3540; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.modal.confirm pre.ccode.clist { margin-left: 46px; max-height: 200px; overflow: auto; }
.modal.confirm .ceffect pre.ccode { max-height: 160px; overflow: auto; background: #fff; }
.modal.confirm .creview { display: flex; flex-direction: column; border: 1px solid #e3e8ee; border-radius: 8px; background: #fff; }
.modal.confirm .crow { display: flex; gap: 10px; align-items: flex-start; padding: 7px 10px; border-top: 1px solid #eef1f4; font-size: 13px; line-height: 1.45; }
.modal.confirm .crow:first-child { border-top: 0; }
.modal.confirm .cop { flex: none; min-width: 58px; text-align: center; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 8px; border-radius: 10px; background: #e8effa; color: var(--accent); font-size: 11.5px; font-weight: 600; margin-top: 1px; }
.modal.confirm .cop.add { background: #e3f3e6; color: #2f7a40; }
.modal.confirm .cop.del { background: #fbe9e7; color: var(--danger); }
.modal.confirm .cchange { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.modal.confirm .cwhere { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal.confirm .cvalues { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; overflow-wrap: anywhere; min-width: 0; }
.modal.confirm .cold { color: var(--danger); text-decoration: line-through; text-decoration-color: rgba(178,64,47,.5); min-width: 0; }
.modal.confirm .cnew { color: var(--ok); min-width: 0; }
.modal.confirm .cvalues.code { flex-direction: column; align-items: stretch; font: 12px/1.45 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.modal.confirm .cvalues.code .carrow { display: none; }
.modal.confirm .carrow { display: inline-flex; color: #9aa5b1; align-self: center; }
.modal.confirm .ccards { display: flex; flex-direction: column; gap: 8px; }
.modal.confirm .ccard { display: flex; gap: 12px; padding: 10px; border: 1px solid #e3e8ee; border-radius: 10px; background: #f8fafc; }
.modal.confirm .ccard .cpic { flex: none; width: 150px; height: 94px; border-radius: 6px; object-fit: cover; object-position: top left; border: 1px solid #dde3ea; background: #fff; cursor: zoom-in; }
.modal.confirm .ccard .cbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.modal.confirm .ccard .cname { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.modal.confirm .ccard .cname .muted { font-weight: 400; font-size: 12px; }
.modal.confirm .ccard .cdesc { font-size: 12.5px; color: #4a5560; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.modal.confirm .ccard .cact { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 2px; }
.modal.confirm .ccard.off { opacity: .75; }

/* --- workbench files */

.files { position: absolute; inset: 0; display: flex; background: #f6f7f9; }
.files .browser { width: var(--sidebar); flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--sidebar-bg); }
.files .tree { flex: 1; overflow: auto; padding: 4px 0; font-size: 15.5px; }
.files .node { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; cursor: pointer; white-space: nowrap; }
.files .node:hover { background: rgba(0,0,0,.05); }
.files .node.selected { background: #dce7f3; }
.files .node.opened .name { font-weight: 600; }
.files .node.repo { height: 30px; font-weight: 600; }
.files .node.repo .muted { font-weight: 400; font-size: 12.5px; margin-left: auto; }
.files .node .name { overflow: hidden; text-overflow: ellipsis; }
.files .node.stM .name { color: #b07a10; }
.files .node.stA .name, .files .node.stU .name { color: #2e8b3d; }
.files .node.stD .name { color: var(--danger); text-decoration: line-through; }
.files .node.stC .name { color: var(--danger); font-weight: 700; }
.files .twist { width: 12px; flex: none; color: var(--muted); display: inline-flex; }
.files .fileicon { width: 22px; height: 16px; flex: none; border-radius: 3px; background: #6b8fb8; color: #fff; font-size: 8.5px; font-weight: 700; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; }
.files .fileicon.none { background: #a3adb8; }
.files .vcslog { padding: 6px 10px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); min-height: 26px; }
.files .vcslog.error { color: var(--danger); }
/* the dialog of a checkout : a row per repository, its progress and the last line of git or svn */
.checkoutlist { display: flex; flex-direction: column; gap: 12px; width: 400px; max-width: 100%; margin: 8px 0; }
.corepo .cohead { display: flex; align-items: center; gap: 8px; }
.corepo .cohead .spacer { flex: 1; }
/* before a checkout : where each repository goes */
.wherelist { display: flex; flex-direction: column; gap: 14px; width: 560px; max-width: 100%; margin: 10px 0; }
.whererepo { display: flex; flex-direction: column; gap: 6px; }
.whererepo .cohead { display: flex; align-items: center; gap: 8px; min-width: 0; }
.whererepo .cohead .spacer { flex: 1; }
.whererepo .cohead > .muted:not(.small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.whererepo .wherechoice { width: 100%; height: 32px; border: 1px solid var(--line); }
.whererepo .wherechoice .dlabel { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.corepo .costate { width: 110px; text-align: right; }
.corepo .cobar { height: 6px; border-radius: 3px; background: var(--line); margin: 6px 0 4px; overflow: hidden; }
.corepo .cobar i { display: block; height: 100%; background: #3d85c6; transition: width .2s; }
.corepo .coline { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.files .viewcol { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.files .viewer { flex: 1; position: relative; }
/* the tabs of the opened files : always there, so the viewer below never moves */
.files .ftabs { flex: none; height: 32px; display: flex; align-items: stretch; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); background: var(--sidebar-bg); scrollbar-width: thin; }
.files .ftab { flex: none; display: flex; align-items: center; gap: 6px; max-width: 220px; padding: 0 6px 0 10px; border-right: 1px solid var(--line); font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.files .ftab .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .ftab:hover { background: rgba(0,0,0,.04); }
.files .ftab.on { background: #f6f7f9; color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }
.files .ftab .tabclose { width: 18px; height: 18px; opacity: .55; }
.files .ftab .tabclose:hover { opacity: 1; }
.files .ftab.dirty .name::after { content: " ●"; color: var(--accent); }
[data-theme=dark] .files .ftab.on { background: #2a2a2a; }
/* a tab dragged : dimmed in its place, a bar shows where it goes (no width : the tabs do not move) */
.files .ftab.dragging { opacity: .35; }
.files .ftabmark { flex: none; width: 3px; margin: 4px -1.5px; border-radius: 2px; background: var(--accent); position: relative; z-index: 1; pointer-events: none; }
.files .viewer .empty { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; color: var(--muted); font-style: normal; }
.files .spacer { flex: 1; }
.dropdown.ctx button { font-size: 14.5px; }
.modal:has(.changes) { width: 620px; }
.modal .changes { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.modal .change { display: flex; align-items: center; gap: 8px; padding: 3px 6px; font-size: 13.5px; }
.modal .change:hover { background: #f1f4f7; }
/* a file of a repository read only in Studio : a lock in the room of the checkbox, never committed */
.modal .change .lockbox { width: 13px; display: inline-flex; justify-content: center; color: var(--muted); flex: none; }
.modal .change.locked .rel { color: var(--muted); cursor: default; }
.modal .change .rel { flex: 1; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal .change .st { width: 34px; text-align: center; font-size: 11.5px; font-weight: 700; border-radius: 4px; color: #fff; background: #b07a10; }
.modal .change .st.stA, .modal .change .st.stU { background: #2e8b3d; }
.modal .change .st.stD, .modal .change .st.stC { background: var(--danger); }
.modal pre.diff { margin: 0; max-height: 220px; overflow: auto; background: #fbfbfc; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12.5px; user-select: text; }
.modal pre.diff .add { color: #1a7f37; background: #e6ffec; }
.modal pre.diff .del { color: #cf222e; background: #ffebe9; }
.modal pre.diff .hunk { color: #8250df; }
.modal:has(pre.diff) { width: 720px; }
.modal pre.diff.full { max-height: 70vh; min-height: 120px; tab-size: 4; }
.modal:has(pre.diff.full) { width: min(980px, 94vw); }
.modal pre.diff .note { color: var(--muted); font-style: italic; }
.modal .change .rel { cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; background: #2b313a; color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .4s; pointer-events: none; }
.toast.out { opacity: 0; }

/* menus : group titles, search, checks after an icon ; above the dialogs */
.dropdown.gsmenu { z-index: 400; }
/* the editor of a look : the image of the clipboard, next to the + */
.lookpicker .pick.clippick { width: 34px; height: 34px; padding: 0; overflow: hidden; border: 1px dashed var(--accent); }
.lookpicker .pick.clippick img { width: 100%; height: 100%; object-fit: cover; }
/* a language in a menu (Spelling) : its code */
.gsmenu .langcode { display: inline-block; min-width: 34px; font: 11px var(--mono, monospace); color: var(--muted); }
.dropdown .mheader { padding: 8px 8px 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.dropdown .msearchbox { position: sticky; top: -6px; z-index: 2; box-shadow: 0 -8px 0 #fff; display: flex; align-items: center; gap: 6px; margin: 2px 2px 6px; padding: 0 8px; height: 32px; border: 1px solid #b4bdc7; border-radius: 7px; background: #fff; color: var(--muted); }
.dropdown .msearchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(47,111,222,.15); }
.dropdown input.msearch { flex: 1; border: 0; outline: 0; background: none; height: 28px; padding: 0; min-width: 0; }
.dropdown button .ico.el { width: auto; display: inline-flex; }
.dropdown button .ico.rcheck { width: auto; color: var(--accent); margin-left: 8px; }
.dropdown button:hover .ico.rcheck { color: #fff; }
.dropdown button .mcount { color: var(--muted); font-size: 12px; margin-left: 4px; flex: none !important; }
.dropdown button .mbox { width: 16px; height: 16px; border: 1.5px solid #9aa4ae; border-radius: 4px; margin-left: 10px; display: inline-flex; align-items: center; justify-content: center; background: #fff; flex: none; }
.dropdown button.checked .mbox { background: var(--accent); border-color: var(--accent); color: #fff; }
.droplabel { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: none; cursor: pointer; color: var(--text); font-size: 14px; }
.droplabel:hover { background: #eef1f4; border-color: #dde2e7; }
.droplabel .chev { color: var(--muted); display: inline-flex; }
.modal .droplabel { border-color: #ccd3db; background: #fff; justify-content: flex-start; }
/* the message of the tree stays in the tree, not over the viewer */
#area .files .tree .empty, .files .tree .empty { position: static; display: block; padding: 24px 16px; text-align: center; color: var(--muted); }
.dropdown button > span.mbox, .dropdown button > span.ico.rcheck { flex: none !important; }
.dropdown .msearchbox input.msearch, .dropdown .msearchbox input.msearch:focus { border: 0 !important; box-shadow: none !important; outline: 0; background: none; padding: 0; height: 28px; }
.dropdown button > span.mlabel { white-space: nowrap; }

.lookpicker .looktabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.lookpicker .looktab { border: 0; background: none; padding: 5px 10px; border-bottom: 2px solid transparent; cursor: pointer; color: var(--muted); font-size: 13.5px; }
.lookpicker .looktab.current { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.lookpicker .lookbody { display: flex; flex-direction: column; gap: 8px; width: 330px; }
.lookpicker .emojis .pick { width: 34px; height: 34px; align-items: center; justify-content: center; }
.lookpicker .pick.add { width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px dashed #b4bec9; color: var(--muted); }
.lookpicker .pick.add:hover { border-color: var(--accent); color: var(--accent); }
.lookpicker input.lsearch { height: 30px; }
.modal .lookpreview { display: flex; justify-content: center; padding: 8px; border-radius: 10px; background: repeating-conic-gradient(#eef1f4 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.modal .lookpreview img { object-fit: contain; }
.droplabel .dlabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the picker keeps its size whatever the tab */
.lookpicker .lookbody { height: 316px; }
.lookpicker .lookbody .icons { flex: 1; min-height: 0; max-height: none; align-content: flex-start; }
.lookpicker .imgpick { position: relative; }
.lookpicker .imgpick .remove { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 8px; background: #5b6573; color: #fff; display: none; align-items: center; justify-content: center; }
.lookpicker .imgpick:hover .remove { display: flex; }
.lookpicker .lookbg { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.lookpicker .shapes { display: flex; gap: 3px; }
.lookpicker .shape { width: 30px; height: 30px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lookpicker .shape.current { border-color: var(--accent); }
.lookpicker .shape.none::before { content: ""; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px #b4bec9; background: repeating-conic-gradient(#d5dbe1 0% 25%, #fff 0% 50%) 50% / 8px 8px; }
.lookpicker .shape:disabled { opacity: .35; cursor: default; }
.droplabel:disabled { opacity: .6; cursor: default; }
.droplabel.small { height: 26px; font-size: 13px; padding: 0 8px; border: 1px dashed #b4bec9; }
.droplabel.device { width: 100%; justify-content: flex-start; border-color: #ccd3db; background: #fff; }
.droplabel.device .chev, .modal .droplabel .chev { margin-left: auto; }
.aclrow .droplabel.aclevel { border-color: #dde2e7; }
.droplabel.addwho { width: 100%; border: 1px dashed #b4bec9; color: var(--muted); }

/* imports */
.modal .importlist { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: #fff; min-width: 480px; }
.modal .importlist .irow { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 6px; }
.modal .importlist .irow:hover { background: #f1f4f7; }
.modal .importlist .irow.sub { padding-left: 26px; }
.modal .importlist .irow.sub2 { padding-left: 48px; }
.modal .importlist .tag { font-size: 11.5px; padding: 0 6px; border-radius: 8px; background: #eef1f4; color: var(--muted); }
.modal .row.left { justify-content: flex-start; margin: 0; }
.modal .importlog { height: 220px; overflow: auto; font-size: 12.5px; font-family: var(--mono, monospace); background: #f6f7f9; border: 1px solid var(--line); border-radius: 8px; padding: 8px; min-width: 0; }
.modal.clickupimport { width: 560px; max-width: calc(100vw - 32px); }
/* CheckTree : a tree of checkboxes with a search (the imports) */
.checktreebox { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: #fff; min-width: 0; overflow: hidden; }
.checktreebox .ctsearchrow { display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid var(--line); color: var(--muted); }
.checktreebox .ctsearch { flex: 1; border: 0; outline: none; background: none; padding: 7px 0; min-width: 0; box-shadow: none; }
/* a fixed height : the dialog keeps its size while the list is filtered */
.checktree { height: min(42vh, 420px); overflow: auto; scrollbar-gutter: stable; display: flex; flex-direction: column; padding: 4px; }
.checktree .ctrow { display: flex; align-items: center; gap: 7px; padding-top: 3px; padding-bottom: 3px; padding-right: 6px; border-radius: 6px; cursor: pointer; min-width: 0; font-size: 13.5px; }
.checktree .ctrow:hover { background: #f1f4f7; }
.checktree .ctrow > span:not(.muted):not(.ico):not(.ctarrow), .checktree .ctrow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.checktree .ctrow .muted { flex: none; font-size: 12.5px; }
.checktree .ctrow input { margin: 0; flex: none; }
.checktree .ctrow .ico { display: inline-flex; flex: none; color: #6a7682; }
.checktree .ctarrow { display: inline-flex; width: 12px; flex: none; color: #8a96a3; transition: transform .12s; }
.checktree .ctarrow.open { transform: rotate(90deg); }
.checktree .ctmsg { padding: 8px; }
.modal .checktree label.ctrow { flex-direction: row; gap: 7px; margin: 0; color: var(--text); font-size: 13.5px; }
.modal .importstatus { font-weight: 600; }
/* an import running (ClickUp) : its step, its bar, the count and the time left, the task of now ; nothing changes its size */
.modal.importrun { width: 560px; max-width: calc(100vw - 32px); }
.modal.importrun .importstep { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal.importrun .importbar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.modal.importrun .importbar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .4s; }
.modal.importrun .importrow { display: flex; align-items: center; gap: 8px; height: 28px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.modal.importrun .importrow .spacer { flex: 1; }
.modal.importrun .importitem { height: 18px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal.importrun .importlog { height: 160px; }
.modal.slackimport { width: 640px; max-width: calc(100vw - 32px); }
.modal.slackimport .importlist { min-width: 0; }
.modal .ihead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal .iperiod { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.modal .iperiod button { border: 0; border-left: 1px solid var(--line); background: none; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.modal .iperiod button:first-child { border-left: 0; }
.modal .iperiod button.on { background: var(--accent); color: #fff; }
.modal .importlist .irow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.modal .importlist .iest { margin-left: auto; flex: none; font-size: 12.5px; white-space: nowrap; }
.modal .importtotal { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 8px; background: #f3f6fa; border: 1px solid #e3e8ee; font-size: 13px; }
.modal .importtotal .muted { font-size: 12.5px; }
.modal .importusers { max-height: 50vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; min-width: 560px; }
.modal .iurow { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 8px; }
.modal .iurow:hover { background: #f1f4f7; }
.modal .iuavatar { width: 26px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: #e3e7eb; color: var(--muted); flex: none; }
.modal .iuname { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.modal .iuname .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal .iuarrow { color: var(--muted); }
.modal .iurow.iuall { position: sticky; top: 0; z-index: 1; background: var(--panel-inner); border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 2px; }
.modal .iuchoice { width: 220px; }

/* the search of the header */
/* its width is the room of the right : up to 420 pixels */
#gsearchbox { display: flex; align-items: center; gap: 6px; width: 0; flex: 1 4 0; max-width: min(420px, 34vw); min-width: 230px; height: 30px; padding: 0 8px 0 10px; border-radius: 8px; background: rgba(255,255,255,.75); border: 1px solid #c9d0d8; color: var(--muted); -webkit-app-region: no-drag; }
#gsearchbox:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(47,111,222,.15); }
#gsearchbox input { flex: 1; min-width: 0; width: 0; border: 0 !important; background: none !important; box-shadow: none !important; outline: 0; height: 26px; padding: 0; font-size: 14px; }
#gsearchbox .kbd { font-size: 11px; color: #8a93a0; border: 1px solid #d5dbe1; border-radius: 4px; padding: 0 4px; }
#gsearchbox.disabled { opacity: .5; }
#gsearchinfo { display: flex; align-items: center; gap: 4px; margin-right: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; flex: 0 6 auto; min-width: 0; -webkit-app-region: no-drag; }
#gsearchinfo.hidden { display: none; }
#gsearchinfo .chip { height: 20px; padding: 0 7px; border: 0; border-radius: 10px; background: #e8eefc; color: #4659c9; font-size: 11.5px; cursor: pointer; flex: none; }
#gsearchinfo .chip:hover { background: #dbe4fb; }
[data-theme=dark] #gsearchinfo .chip { background: #263247; color: #9db7ee; }
[data-theme=dark] #gsearchinfo .chip:hover { background: #2f3d57; }
.files .searchres .node .path { margin-left: 6px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
button.addgrant { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; }

/* the AI : the switch of the search, and its panel beside the tool */
/* the button of the AI, beside the search : on while its panel is open */
#aibtn { color: #7c4dcc; }
#aibtn.on { color: #7c4dcc; border-color: #c9b6ee; }
#body { flex: 1; min-height: 0; display: flex; }
#body > #area { flex: 1; min-width: 0; }
#aipanel { width: 400px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #fbfaff; }
#aipanel.hidden { display: none; }
#aipanel .aihead { display: flex; align-items: center; gap: 4px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); }
#aipanel .aihead .spacer { flex: 1; }
#aipanel .aititle { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #6a3fb8; }
#aipanel .aisetup { margin: 12px; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid #e3dcf3; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
#aipanel .aisetup.hidden { display: none; }
#aipanel .aisetup .row { display: flex; gap: 6px; }
#aipanel .ailog { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
#aipanel .aiempty { margin: auto 10px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; color: var(--text); }
#aipanel .aiempty .aibig { color: #7c4dcc; }
#aipanel .aiq { align-self: flex-end; max-width: 85%; padding: 7px 11px; border-radius: 12px 12px 3px 12px; background: #7c4dcc; color: #fff; white-space: pre-wrap; }
#aipanel .aiq.aiwaiting { opacity: .55; }
#aipanel .aia { line-height: 1.5; }
#aipanel .aia p { margin: 0 0 6px; }
/* an image of Studio in an answer : its room kept while it loads (AiImages) */
#aipanel .aia img.aiimg { display: block; max-width: 100%; min-width: 48px; min-height: 32px; margin: 4px 0; border-radius: 4px; background: var(--panel-inner); }
#aipanel .aia ul, #aipanel .aia ol { margin: 4px 0; padding-left: 20px; }
#aipanel .aitool { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #8a93a0; }
#aipanel .aichangesline { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: #f4f0fb; color: #6a3fb8; font-size: 13px; }
[data-theme=dark] #aipanel .aichangesline { background: #2a2338; color: #c4a6f0; }
#aipanel .aichangesline { flex-wrap: wrap; }
#aipanel .aichangesline > .muted { flex-basis: 100%; padding-left: 19px; font-size: 12px; }
/* the changes of a worker, in the browser : the diff as text */
pre.aidiff { margin: 0; max-height: 60vh; max-width: min(900px, 80vw); overflow: auto; font-size: 12px; line-height: 1.45; white-space: pre; }
#aipanel .aithinking { font-size: 13px; color: #7c4dcc; }
#aipanel .aierror { font-size: 13px; color: var(--danger); white-space: pre-wrap; }
#aipanel a.ailink { display: inline-flex; padding: 0 6px; border-radius: 8px; background: #efe8fb; color: #6a3fb8; text-decoration: none; font-size: 12.5px; font-weight: 600; }
#aipanel a.ailink:hover { background: #e2d6f8; }
#aipanel .aifoot { display: flex; gap: 6px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); }
#aipanel .aiinput { flex: 1; resize: none; font: inherit; font-size: 14px; }
#aipanel .aisend { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #7c4dcc; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.files .node.dropinside { background: #dbe8f6; box-shadow: inset 0 0 0 2px var(--accent); }
.files .fileicon2 { display: inline-flex; flex: none; width: 18px; justify-content: center; }

/* My Files and the repositories : titles of sections in the tree */
.files .treesec { display: flex; align-items: center; gap: 6px; margin: 8px 6px 2px; padding: 2px 4px 2px 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #6b7682; border-radius: 6px; }
/* the sections of the tree (My Files, Repositories) are well apart */
.files .treesec:not(:first-child) { margin-top: 18px; padding-top: 12px; border-top: 1px solid #e1e5ea; border-radius: 0; }
.files .treesec .spacer { flex: 1; }
/* a click on the title folds the section */
.files .treesec.fold { cursor: pointer; padding-left: 4px; }
.files .treesec.fold:hover { color: var(--text); }
/* the tree scrolls across : the titles of its sections stay in the visible width, their buttons with them */
.files .tree { container-type: inline-size; }
.files .treesec { position: sticky; left: 6px; justify-self: start; width: calc(100cqw - 12px); box-sizing: border-box; }
.files .treesec .iconbtn { width: 24px; height: 24px; }
.files .treesec .iconbtn.on { color: var(--accent); }
.files .treesec.dropinside { background: #dbe8f6; box-shadow: inset 0 0 0 2px var(--accent); }
.files .treeempty { padding: 2px 16px 6px 30px; font-size: 13px; color: #9aa4ae; }
#aipanel.dropping { box-shadow: inset 0 0 0 2px #7c4dcc; }
#aipanel .aichips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px; }
#aipanel .aichips:empty { display: none; }
#aipanel .aichips .chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 10px; background: #efe8fb; color: #6a3fb8; font-size: 12.5px; }
#aipanel .aichips .chip button { border: 0; background: none; color: inherit; cursor: pointer; display: inline-flex; padding: 2px; }
#aipanel .aiattach { width: 34px; height: 34px; border: 1px dashed #b69ce6; border-radius: 8px; background: none; color: #7c4dcc; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
#aipanel .aiqfiles { margin-top: 4px; font-size: 12px; opacity: .85; }
#aipanel .aia table { border-collapse: collapse; margin: 6px 0; font-size: 13px; width: 100%; }
#aipanel .aia th, #aipanel .aia td { border: 1px solid #e0d8ef; padding: 4px 6px; text-align: left; vertical-align: top; }
#aipanel .aia th { background: #f3eefc; font-weight: 600; }
#aipanel .aia code { background: #f1edf8; padding: 0 3px; border-radius: 3px; font-size: 12.5px; }
#aipanel .aia pre { background: #f6f3fb; padding: 8px; border-radius: 6px; overflow: auto; }
#aipanel .aia h1, #aipanel .aia h2, #aipanel .aia h3 { font-size: 15px; margin: 8px 0 4px; }
/* the answers of Claude can be selected and copied */
#aipanel .ailog { user-select: text; }
.orgform .airows { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 10px; }
.orgform .airow { display: grid; grid-template-columns: 300px 260px; gap: 12px; align-items: center; }
.modal .aikeybox { display: flex; flex-direction: column; gap: 8px; }
#workerbadge { display: inline-flex; align-items: center; gap: 3px; color: #9a86c8; font-size: 12px; font-weight: 600; margin: 0 4px; }
#workerbadge.hidden { display: none; }
#workerbadge.busy { color: #7c4dcc; animation: workerpulse 1.6s ease-in-out infinite; }
@keyframes workerpulse { 50% { opacity: .45; } }
.files .node .aisetup { margin-left: 4px; width: 22px; height: 22px; color: #7c4dcc; }
#orgbanner { display: flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600; color: #fff; flex: none; }
#orgbanner.dissolve { background: #c62828; }
#orgbanner.locked { background: #d9822b; }
#gsearchbox .searchclear { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #e3e7ec; color: #5b6573; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
#gsearchbox .searchclear:hover { background: #d3d9e0; color: #1f2328; }
#gsearchbox .searchclear.hidden { display: none; }
#gsearchbox.filtering { background: #fff4e5; border-color: #e8a25b; }
#gsearchbox.filtering .searchclear { background: var(--danger); color: #fff; }
#gsearchbox.filtering .searchclear:hover { background: #b93c2c; color: #fff; }
#gsearchbox .searchclear:not(.hidden) + .kbd { display: none; }

/* the Customize panel of the header */
/* next to its button, at the bottom of the rail ; the same height for every tab (a tab never resizes it) */
.custopanel { position: fixed; left: 64px; bottom: 12px; width: 440px; height: min(640px, calc(100vh - 70px)); display: flex; flex-direction: column; background: #fff; border: 1px solid #d5dbe2; border-radius: 10px; box-shadow: 0 12px 40px rgba(20, 30, 50, 0.18); z-index: 150; font-size: 13px; }
.custopanel.hidden { display: none; }
.custopanel .chead { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.custopanel .chead .spacer, .custopanel .row .spacer { flex: 1; }
.custopanel .ctabs { display: flex; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid #e6eaef; }
.custopanel .ctab { border: 0; background: none; padding: 5px 10px; border-radius: 6px; cursor: pointer; color: #56606c; font-size: 13px; }
.custopanel .ctab.on { background: #eef3fb; color: var(--accent); font-weight: 600; }
/* the room of the scrollbar kept on the right, in place of the padding : a tab that scrolls is as wide as one that does not */
.custopanel .cbody { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; padding: 10px 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.custopanel .crow { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid #f0f2f5; }
.custopanel .crow .cinfo { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.custopanel .crow .cinfo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custopanel .crow .iconbtn.on { color: var(--accent); }
.custopanel .cfield { display: flex; align-items: center; gap: 8px; }
.custopanel .cfield > span { width: 50px; flex: none; color: #56606c; }
.custopanel .cfield select, .custopanel .cfield input, .custopanel .cfield .droplabel { flex: 1; min-width: 0; }
.custopanel .cbody > * { flex: none; }
.custopanel .cfield .droplabel { height: 30px; border: 1px solid #c8d0d9; border-radius: 6px; background: #fff; }
[data-theme=dark] .custopanel .cfield .droplabel { background: #272727; border-color: #585858; }
.custopanel textarea { width: 100%; box-sizing: border-box; border: 1px solid #c8d0d9; border-radius: 6px; padding: 6px 8px; resize: vertical; }
.custopanel textarea.cprompt { min-height: 40px; }
/* the conversation with the AI that makes a custo or a theme (kept with it) */
.custopanel .cconvo { display: flex; flex-direction: column; border: 1px solid #d5dbe2; border-radius: 8px; overflow: hidden; }
.custopanel .cthread { display: flex; flex-direction: column; gap: 6px; min-height: 90px; max-height: 300px; overflow-y: auto; padding: 8px; background: #f7f9fb; }
.custopanel .cthreadempty { color: #8a93a0; font-size: 12.5px; margin: auto 0; text-align: center; padding: 0 12px; }
.custopanel .cmsg { max-width: 85%; padding: 6px 9px; border-radius: 10px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.custopanel .cmsg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.custopanel .cmsg.ai { align-self: flex-start; background: #fff; border: 1px solid #e3e7ec; border-bottom-left-radius: 3px; }
.custopanel .cmsg.busy { color: #8a93a0; font-style: italic; display: flex; gap: 10px; align-items: baseline; }
.custopanel .cmsg.busy .cstop { font-style: normal; }
.custopanel .cmsg.error { align-self: flex-start; background: #fdecea; color: #a12a1f; }
.custopanel .ccompose { display: flex; gap: 6px; align-items: flex-end; padding: 6px; border-top: 1px solid #e3e7ec; background: #fff; }
.custopanel .ccompose textarea { flex: 1; border: 0; resize: none; padding: 4px 6px; }
.custopanel .ccompose textarea:focus { box-shadow: none; outline: none; }
.custopanel .ccompose .csend { flex: none; height: 30px; padding: 0 12px; }
.custopanel .ccompose .cattach { flex: none; height: 30px; }
.custopanel .row { display: flex; gap: 8px; align-items: center; }
.custopanel .empty { color: #8a93a0; padding: 8px 0; }
.custopanel .ckinds { display: flex; gap: 4px; padding: 2px; background: #eef1f4; border-radius: 7px; align-self: flex-start; }
.custopanel .ckind { border: 0; background: none; padding: 4px 10px; border-radius: 5px; cursor: pointer; color: #56606c; font-size: 12.5px; display: flex; align-items: center; gap: 5px; }
.custopanel .ckind.on { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.custopanel button.secondary.on { color: var(--accent); border-color: var(--accent); }
.custopanel .cthumb { width: 54px; height: 34px; object-fit: cover; flex: none; border-radius: 4px; border: 1px solid var(--line); cursor: zoom-in; }
.custopanel .cpicturebox { display: flex; align-items: flex-start; gap: 6px; }
.custopanel .cpicturebox .cpicture { flex: 1; min-width: 0; max-height: 180px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); }
.custopanel .cpicturebox .cnopicture { flex: 1; color: var(--muted); font-size: 12px; padding: 10px; border: 1px dashed var(--line); border-radius: 6px; }
.custopanel .cpicturebox .hidden { display: none; }
.modal img.cpicture { display: block; max-width: min(900px, 80vw); max-height: 70vh; border-radius: 6px; border: 1px solid var(--line); }
pre.ccode { max-height: 50vh; overflow: auto; background: #f6f8fa; padding: 8px; border-radius: 6px; font-size: 12px; }
@media (max-width: 520px) { .custopanel { left: 8px; right: 8px; width: auto; } }

/* --- the dark theme : html[data-theme=dark] (the theme of the user, or of the tool : Api.theme) */

:root[data-theme=dark] {
	color-scheme: dark;
	--bg: #222222;
	--bg-grad: linear-gradient(180deg, #2a2a2a 0%, #202020 100%);
	--panel: #323232;
	--panel-edge: #4c4c4c;
	--panel-inner: #323232;
	--line: #474747;
	--text: #e5e5e5;
	--muted: #9a9a9a;
	--accent: #6ea2dc;
	--accent-soft: #24384f;
	--warm: #e8954f;
	--danger: #e0705f;
	--ok: #5fb873;
	--sidebar-bg: #2c2c2c;
}
[data-theme=dark] ::-webkit-scrollbar-thumb { background: #525252; background-clip: content-box; }
[data-theme=dark] ::-webkit-scrollbar-thumb:hover { background: #676767; background-clip: content-box; }
[data-theme=dark] .btn, [data-theme=dark] button.secondary, [data-theme=dark] button.danger:not(.iconbtn) { background: linear-gradient(#444444, #3a3a3a); border-color: #5c5c5c; }
[data-theme=dark] .btn:hover, [data-theme=dark] button.secondary:hover { background: linear-gradient(#4d4d4d, #434343); }
[data-theme=dark] button.primary { background: linear-gradient(#4a78ab, #36618f); border-color: #2c5582; }
[data-theme=dark] .iconbtn:hover { background: rgba(255,255,255,.08); }
[data-theme=dark] .iconbtn.danger:hover { background: #4a2626; }
[data-theme=dark] input[type=text], [data-theme=dark] input[type=password], [data-theme=dark] input:not([type]), [data-theme=dark] select, [data-theme=dark] textarea, [data-theme=dark] input[type=email], [data-theme=dark] input[type=number], [data-theme=dark] input[type=search] { background: #272727; border-color: #595959; }
[data-theme=dark] input:not([type=checkbox]):not([type=radio]):focus, [data-theme=dark] select:focus, [data-theme=dark] textarea:focus { box-shadow: 0 0 0 3px rgba(110,162,220,.2); }
[data-theme=dark] .tag { color: #a9c8ec; }
[data-theme=dark] .tag.warm { background: #4a3522; color: #f0b98a; }
[data-theme=dark] .tag.grey { background: #434343; color: #c2c2c2; }
[data-theme=dark] .tag.online { background: #24452c; color: #9ed9aa; }
[data-theme=dark] .modal.confirm .cico { background: #263247; color: #9db7ee; }
[data-theme=dark] .modal.confirm .cico.danger { background: #4a2626; color: #f08a8a; }
[data-theme=dark] .modal.confirm .cico.app { background: none; }
[data-theme=dark] .modal.confirm .ceffects { background: #3a3a3a; border-color: #3a3a3a; }
[data-theme=dark] .modal.confirm .ceffect { background: #2b2b2b; color: #cfcfcf; }
[data-theme=dark] .modal.confirm .ceffect .ceico { color: #8c8c8c; }
[data-theme=dark] .modal.confirm .ceffect.warn { background: #3b3020; color: #f0c98a; }
[data-theme=dark] .modal.confirm .cchip { background: #222; border-color: #4a4a4a; color: #d0d0d0; }
[data-theme=dark] .modal.confirm pre.ccode { background: #222; border-color: #3a3a3a; color: #d6d6d6; }
[data-theme=dark] .modal.confirm .creview { background: #262626; border-color: #3a3a3a; }
[data-theme=dark] .modal.confirm .crow { border-color: #333; }
[data-theme=dark] .modal.confirm .cop { background: #263247; color: #9db7ee; }
[data-theme=dark] .modal.confirm .cop.add { background: #1f3a27; color: #8fd19e; }
[data-theme=dark] .modal.confirm .cop.del { background: #4a2626; color: #f08a8a; }
[data-theme=dark] .modal.confirm .cold { color: #f08a8a; }
[data-theme=dark] .modal.confirm .cnew { color: #8fd19e; }
[data-theme=dark] .modal.confirm .ccard { background: #2b2b2b; border-color: #3a3a3a; }
[data-theme=dark] .modal.confirm .ccard .cpic { border-color: #4a4a4a; background: #222; }
[data-theme=dark] .modal.confirm .ccard .cdesc { color: #bdbdbd; }
[data-theme=dark] .modal.confirm img.cstorepic { border-color: #4a4a4a; background: #222; }
[data-theme=dark] .card { box-shadow: 0 12px 40px rgba(0,0,0,.5); }
[data-theme=dark] body.workbench { background: #272727; }
[data-theme=dark] #topbar { background: linear-gradient(#353535, #2b2b2b); border-bottom-color: #474747; }
[data-theme=dark] #topbar .sep, [data-theme=dark] #rail .sep { background: #4c4c4c; }
[data-theme=dark] #rail { background: linear-gradient(90deg, #303030, #2b2b2b); border-right-color: #474747; }
[data-theme=dark] #status { box-shadow: 0 0 0 2px #2d2d2d; }
[data-theme=dark] #toolheader:not(:empty) { border-left-color: #4c4c4c; }
[data-theme=dark] .railbtn { color: #c2c2c2; }
[data-theme=dark] .hbtn { color: #d0d0d0; }
[data-theme=dark] .hbtn.on { background: #404040; border-color: #585858; }
[data-theme=dark] .hbtn.htab { color: #b4b4b4; }
[data-theme=dark] .hbtn.htab.on { background: none; color: var(--text); }
[data-theme=dark] .railbtn:hover, [data-theme=dark] .hbtn:hover, [data-theme=dark] .tab:hover { background: rgba(255,255,255,.07); }
[data-theme=dark] .tab { color: #c2c2c2; }
[data-theme=dark] .tab.active { background: #404040; border-color: #585858; box-shadow: none; color: var(--text); }
[data-theme=dark] #custobtn.on, [data-theme=dark] #adminbtn.on, [data-theme=dark] #serverbtn.on { background: #404040; box-shadow: inset 0 0 0 1px #585858; }
[data-theme=dark] #clock { color: #c2c2c2; }
[data-theme=dark] #area, [data-theme=dark] body.toolpage, [data-theme=dark] .files { background: #2a2a2a; }
[data-theme=dark] .dropdown { background: #353535; border-color: #585858; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
[data-theme=dark] .dropdown .msearchbox { background: #272727; border-color: #585858; box-shadow: 0 -8px 0 #353535; }
[data-theme=dark] .dropdown button .mbox { background: #272727; border-color: #757575; }
[data-theme=dark] .droplabel:hover { background: #3d3d3d; border-color: #4c4c4c; }
[data-theme=dark] .modal .droplabel, [data-theme=dark] .droplabel.device { background: #272727; border-color: #585858; }
[data-theme=dark] .lookpicker .swatch { border-color: #323232; }
[data-theme=dark] .lookpicker .lookedit .editbadge { background: #3a3a3a; color: #d0d0d0; }
[data-theme=dark] .navitem:hover, [data-theme=dark] .files .node:hover { background: rgba(255,255,255,.05); }
[data-theme=dark] .navitem.current .count { color: #cfe0f3; }
[data-theme=dark] .toolbar, [data-theme=dark] table.list th { background: #323232; }
[data-theme=dark] .form { background: #2f2f2f; }
[data-theme=dark] table.list td { border-bottom-color: #3d3d3d; }
[data-theme=dark] table.list tr:hover td { background: #373737; }
[data-theme=dark] .chip { background: #353535; border-color: #585858; }
[data-theme=dark] .chip button:hover { background: #4c4c4c; }
[data-theme=dark] .modal-back { background: rgba(0,0,0,.45); }
[data-theme=dark] .modal { border-color: #585858; box-shadow: 0 16px 40px rgba(0,0,0,.55); }
[data-theme=dark] .files .node.selected { background: #24364c; }
[data-theme=dark] .files .node.dropinside, [data-theme=dark] .files .treesec.dropinside { background: #24364c; }
[data-theme=dark] .files .treesec { color: #9a9a9a; }
[data-theme=dark] .files .treesec:not(:first-child) { border-top-color: #404040; }
[data-theme=dark] .files .node.stM .name, [data-theme=dark] .files .node.stM .vcsst { color: #e0b04c; }
[data-theme=dark] .files .node.stA .name, [data-theme=dark] .files .node.stU .name, [data-theme=dark] .files .node.stA .vcsst, [data-theme=dark] .files .node.stU .vcsst { color: #6cc77e; }
[data-theme=dark] .modal .iperiod { background: #272727; border-color: #4a4a4a; }
[data-theme=dark] .modal .iperiod button { border-color: #4a4a4a; }
[data-theme=dark] .modal .importtotal { background: #262b33; border-color: #3a3f47; }
[data-theme=dark] .checktreebox, [data-theme=dark] .modal .changes, [data-theme=dark] .modal pre.diff, [data-theme=dark] .modal .importlist, [data-theme=dark] .modal .importlog, [data-theme=dark] pre.ccode { background: #272727; }
[data-theme=dark] .checktree .ctrow:hover, [data-theme=dark] .modal .change:hover, [data-theme=dark] .modal .importlist .irow:hover, [data-theme=dark] .modal .iurow:hover { background: #3d3d3d; }
[data-theme=dark] .modal pre.diff .add { color: #7ee2a0; background: #333333; }
[data-theme=dark] .modal pre.diff .del { color: #ff9a92; background: #47211f; }
[data-theme=dark] .modal pre.diff .hunk { color: #c4a6f0; }
[data-theme=dark] .modal .importlist .tag, [data-theme=dark] .modal .iuavatar { background: #404040; }
[data-theme=dark] .modal .lookpreview { background: repeating-conic-gradient(#3a3a3a 0 25%, #2a2a2a 0 50%) 0 0 / 16px 16px; }
[data-theme=dark] .toast { background: #eaeaea; color: #2a2a2a; }
[data-theme=dark] #gsearchbox { background: rgba(0,0,0,.25); border-color: #525252; }
[data-theme=dark] #gsearchbox:focus-within { background: #272727; }
[data-theme=dark] #gsearchbox input { color: #f2f2f2; }
[data-theme=dark] #gsearchbox.filtering { background: #3d2e1e; border-color: #a8703a; }
[data-theme=dark] #gsearchbox.filtering .searchclear { background: #c4513f; color: #fff; }
[data-theme=dark] #gsearchbox .kbd { border-color: #585858; }
[data-theme=dark] #gsearchbox .searchclear { background: #474747; color: #c2c2c2; }
[data-theme=dark] #gsearchbox .searchclear:hover { background: #585858; color: #fff; }
[data-theme=dark] #gsearchbox .aimode:hover { background: #404040; }
[data-theme=dark] #gsearchbox.ai { background: #303030; border-color: #6a52a3; }
[data-theme=dark] #aipanel { background: #292929; }
[data-theme=dark] #aipanel .aititle, [data-theme=dark] #aipanel a.ailink, [data-theme=dark] #aipanel .aichips .chip { color: #c4a6f0; }
[data-theme=dark] #aipanel .aisetup { background: #323232; border-color: #4d4d4d; }
[data-theme=dark] #aipanel a.ailink, [data-theme=dark] #aipanel .aichips .chip { background: #414141; }
[data-theme=dark] #aipanel a.ailink:hover { background: #3f3458; }
[data-theme=dark] #aipanel .aia th { background: #363636; }
[data-theme=dark] #aipanel .aia th, [data-theme=dark] #aipanel .aia td { border-color: #4d4d4d; }
[data-theme=dark] #aipanel .aia code, [data-theme=dark] #aipanel .aia pre { background: #363636; }
[data-theme=dark] .custopanel { background: #323232; border-color: #4c4c4c; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
[data-theme=dark] .custopanel .ctabs { border-bottom-color: #474747; }
[data-theme=dark] .custopanel .ctab { color: #b4b4b4; }
[data-theme=dark] .custopanel .ctab.on { background: #24364c; }
[data-theme=dark] .custopanel .crow { border-bottom-color: #3d3d3d; }
[data-theme=dark] .custopanel .cfield > span { color: #b4b4b4; }
[data-theme=dark] .custopanel .ckinds { background: #272727; }
[data-theme=dark] .custopanel .ckind { color: #b4b4b4; }
[data-theme=dark] .custopanel .ckind.on { background: #404040; }
[data-theme=dark] .custopanel textarea { background: #272727; border-color: #585858; }
[data-theme=dark] .custopanel .cconvo { border-color: #4c4c4c; }
[data-theme=dark] .custopanel .cthread { background: #2a2a2a; }
[data-theme=dark] .custopanel .cmsg.ai { background: #383838; border-color: #4a4a4a; }
[data-theme=dark] .custopanel .cmsg.error { background: #4a2626; color: #f0a8a8; }
[data-theme=dark] .custopanel .ccompose { background: #272727; border-top-color: #474747; }

/* the theme chosen by a new account : two cards, a small workbench in the colors of each */
.modal .themecards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.modal .themecard { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; border: 2px solid transparent; border-radius: 10px; background: rgba(127,127,127,.08); cursor: pointer; color: inherit; font: inherit; }
.modal .themecard:hover { background: rgba(127,127,127,.14); }
.modal .themecard.on { border-color: var(--accent); }
.modal .themecard > span { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; }
.modal .themeprev { position: relative; width: 100%; height: 100px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(127,127,127,.3); }
.modal .themeprev .tbar { position: absolute; left: 0; right: 0; top: 0; height: 16px; }
.modal .themeprev .tside { position: absolute; left: 0; top: 16px; bottom: 0; width: 44px; }
.modal .themeprev .tpage { position: absolute; left: 54px; right: 10px; top: 28px; display: flex; flex-direction: column; gap: 8px; }
.modal .themeprev .tpage i { display: block; height: 7px; border-radius: 4px; width: 100%; }
.modal .themeprev .tpage i:nth-child(2) { width: 70%; }
.modal .themeprev .tpage i.acc { width: 40%; }
.modal .themeprev.light { background: #ffffff; }
.modal .themeprev.light .tbar { background: #f3f5f8; border-bottom: 1px solid #e3e7eb; }
.modal .themeprev.light .tside { background: #eef1f4; }
.modal .themeprev.light .tpage i { background: #d3d9e0; }
.modal .themeprev.light .tpage i.acc { background: #2f6fde; }
.modal .themeprev.dark { background: #1e2228; }
.modal .themeprev.dark .tbar { background: #262b33; border-bottom: 1px solid #333a44; }
.modal .themeprev.dark .tside { background: #22272e; }
.modal .themeprev.dark .tpage i { background: #3d4550; }
.modal .themeprev.dark .tpage i.acc { background: #5b9cff; }

/* a graph (gs.client.viz.VizBox, shared by the tools) : a chart, a number, a gauge, a table ; its time moved on a drag */
.vizbox { position: absolute; inset: 0; display: flex; }
.vizcontent { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; }
.vizcanvas { position: relative; flex: 1; min-width: 0; min-height: 0; }
.vizsnap { position: absolute; }
.vizcanvas.timed canvas { cursor: grab; touch-action: pan-y; }
.vizcanvas.timed.moving canvas { cursor: grabbing; }
.vizcanvas.timed.selecting canvas { cursor: col-resize; }
.vizback { position: absolute; top: 0; right: 0; z-index: 1; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-inner, #fff); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: .85; }
.vizback:hover { color: var(--accent); opacity: 1; }
.viztip { position: fixed; z-index: 1000; pointer-events: none; padding: 7px 10px; border-radius: 6px; background: rgba(20, 22, 26, .92); color: #f2f3f5; font-size: 12px; line-height: 1.5; max-width: min(420px, calc(100vw - 16px)); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.viztiptitle { font-weight: 600; margin-bottom: 2px; }
.viztipline { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viztipdot { flex: none; width: 10px; height: 10px; border-radius: 2px; border: 1px solid rgba(255, 255, 255, .5); }
.viztipfoot { margin-top: 3px; padding-top: 3px; border-top: 1px solid rgba(255, 255, 255, .2); font-weight: 600; }
.vizzone { position: absolute; pointer-events: none; background: rgba(70, 120, 210, .14); border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.vizmsg { margin: auto; padding: 8px 14px; color: var(--muted); font-size: 13px; text-align: center; max-width: 92%; max-height: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; white-space: pre-wrap; }
.vizmsg.err { color: var(--danger); }
/* over an empty graph on time : it still moves under it */
.vizmsg.vizover { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); margin: 0; pointer-events: none; }
.vizstat { flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: center; min-height: 0; }
.vizstatvalue { text-align: center; font-size: clamp(22px, 5vw, 46px); font-weight: 600; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vizspark { position: relative; height: 34%; min-height: 24px; margin-top: 6px; }
.viztable { flex: 1; overflow: auto; font-size: 13px; scrollbar-gutter: stable; }
.viztable table { border-collapse: collapse; width: 100%; }
.viztable th { position: sticky; top: 0; background: var(--panel-inner); text-align: left; font-weight: 600; padding: 5px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.viztable td { padding: 4px 8px; border-bottom: 1px solid #eef1f4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.viztable td.num { text-align: right; font-variant-numeric: tabular-nums; }
.viztable .vizmore { padding: 6px 8px; }
.vizgauge { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.vizgauge svg { width: 100%; height: 100%; max-height: calc(100% - 18px); }
.vizgauge .gtrack { stroke: #e6eaef; }
.vizgaugevalue { position: absolute; left: 0; right: 0; bottom: 26%; text-align: center; font-size: clamp(16px, 3vw, 30px); font-weight: 600; }
.vizgaugerange { display: flex; justify-content: space-between; width: 80%; font-size: 11.5px; color: var(--muted); }
[data-theme=dark] .viztable td { border-bottom-color: #3a3a3a; }
[data-theme=dark] .vizgauge .gtrack { stroke: #444; }
