/* Extra Styles, Themes and options (build -425). Each extra Theme is a color palette laid over a base theme
   (html[data-palette] + html[data-theme]); each extra Style is a variation over Modern (html[data-variant]).
   Accent color, text size, corner roundness and row density work with every Layout, Style and Theme. */

/* ================= THEMES (palettes) ================= */
/* One rule per palette: the colors, then the surfaces that the Modern style paints with fixed colors. */
html[data-palette="ocean"][data-theme][data-layout] { --bg: #04141c; --panel: #082230; --row: #0b2b3d; --line: #14425a; --text: #e4f4fa; --muted: #86aebf;
  --up: #2fd7a0; --down: #ff6b66; --warn: #f4bf4f; --link: #5fd3f0; --accent: #31bfe6; --hdr-bg: linear-gradient(180deg, #0b3347, #06202d); --panel-bg: linear-gradient(180deg, #0a2838, #071d29);
  --tile-bg: #0a2736; --edge: #14425a; --input-bg: #051a25; --seg-on: #12506b; }
html[data-palette="ocean"] body { background: radial-gradient(1300px 700px at 85% -10%, #0c4a63 0%, transparent 60%), #04141c !important; }

html[data-palette="forest"][data-theme][data-layout] { --bg: #0b130e; --panel: #111c15; --row: #16241b; --line: #243a2c; --text: #e6f0e8; --muted: #8fa595;
  --up: #43d38a; --down: #ee6a5f; --warn: #dcb24a; --link: #7fd9a4; --accent: #4cc47f; --hdr-bg: #0b130e; --panel-bg: #111c15; --tile-bg: #16241b; --edge: #243a2c; --input-bg: #0d1710; --seg-on: #25402f; }
html[data-palette="forest"] body { background: radial-gradient(1200px 600px at 10% -15%, #17301f 0%, transparent 60%), #0b130e !important; }

html[data-palette="contrast"][data-theme][data-layout] { --bg: #000; --panel: #000; --row: #0a0a0a; --line: #8c8c8c; --text: #fff; --muted: #d0d0d0;
  --up: #3dff9b; --down: #ff5a52; --warn: #ffd23d; --link: #7db8ff; --accent: #ffd23d; --hdr-bg: #000; --panel-bg: #000; --tile-bg: #050505; --edge: #9a9a9a; --input-bg: #000; --seg-on: #2b2b2b; }
html[data-palette="contrast"] body { background: #000 !important; }

html[data-palette="slate"][data-theme][data-layout] { --bg: #e6eaf0; --panel: #ffffff; --row: #fbfcfd; --line: #c9d1dc; --text: #1c2531; --muted: #566274;
  --up: #14864f; --down: #c8322e; --warn: #a8660a; --link: #3a5f9a; --accent: #3a5f9a; --hdr-bg: #f3f5f8; --panel-bg: #ffffff; --tile-bg: #ffffff; --edge: #cfd6e0; --input-bg: #ffffff; --seg-on: #ffffff; }
html[data-palette="slate"] body { background: linear-gradient(180deg, #eef1f5, #dfe5ed) !important; }

/* HEDnorth: black, navy, silver, orange and white */
html[data-palette="hednorth"][data-theme][data-layout] { --bg: #07090d; --panel: #0d1730; --row: #112042; --line: #25365c; --text: #f4f6f9; --muted: #aeb8c8;
  --up: #3ed598; --down: #ff6258; --warn: #ffb02e; --link: #ff8a3d; --accent: #f26b21; --hdr-bg: linear-gradient(180deg, #0c1a3a, #070b17); --panel-bg: linear-gradient(180deg, #0f1c3a, #0b142b);
  --tile-bg: #0f1c3a; --edge: #25365c; --input-bg: #080e1e; --seg-on: #1a3166; }
html[data-palette="hednorth"] body { background: radial-gradient(1300px 650px at 90% -15%, #12285a 0%, transparent 60%), #07090d !important; }
html[data-palette="hednorthlight"][data-theme][data-layout] { --bg: #eef0f4; --panel: #ffffff; --row: #ffffff; --line: #ccd2dd; --text: #0d1730; --muted: #5a6577;
  --up: #16885a; --down: #cc3330; --warn: #b36a06; --link: #c5520f; --accent: #e65f14; --hdr-bg: #ffffff; --panel-bg: #ffffff; --tile-bg: #ffffff; --edge: #d3d9e3; --input-bg: #ffffff; --seg-on: #ffffff; }
html[data-palette="hednorthlight"] body { background: linear-gradient(180deg, #f6f7fa, #e8ebf1) !important; }
html[data-palette="hednorth"] header h1, html[data-palette="hednorth"] .clock .time { color: #fff; }
html[data-palette="hednorthlight"] header h1 { color: #0d1730; }

/* Surfaces the base styles paint with fixed colors: follow the palette instead */
html[data-palette] header { background: var(--hdr-bg) !important; border-color: var(--edge) !important; }
html[data-palette] main .panel { background: var(--panel-bg) !important; border-color: var(--edge); }
html[data-palette] .tile, html[data-palette] .ctile { background: var(--tile-bg) !important; border-color: var(--edge); }
html[data-palette] .seg { border-color: var(--edge); }
html[data-palette] input, html[data-palette] select, html[data-palette] textarea { background: var(--input-bg) !important; color: var(--text); border-color: var(--edge); }
html[data-palette] .menu, html[data-palette] .dialog, html[data-palette] .menudrop { background: var(--panel) !important; }
html[data-palette="contrast"] main .panel, html[data-palette="contrast"] .tile { border-width: 2px; }
html[data-palette="contrast"] .btn { border-color: #cfcfcf; }

/* ================= STYLES (variants of Modern) ================= */
/* Soft: big round corners, airy spacing, gentle shadows */
html[data-variant="soft"] main .panel { border-radius: 24px !important; box-shadow: 0 10px 34px var(--shadow) !important; }
html[data-variant="soft"] .tile, html[data-variant="soft"] .ctile { border-radius: 18px !important; }
html[data-variant="soft"] .btn, html[data-variant="soft"] .seg, html[data-variant="soft"] .seg button, html[data-variant="soft"] .chip, html[data-variant="soft"] input, html[data-variant="soft"] select { border-radius: 999px !important; }
html[data-variant="soft"] main .panel .phead { padding-top: 16px; padding-bottom: 12px; }
html[data-variant="soft"] .tile { padding: 2px; }
/* Flat: no shadows, no gradients, thin lines, small corners */
html[data-variant="flat"] *, html[data-variant="flat"] *::before, html[data-variant="flat"] *::after { box-shadow: none !important; text-shadow: none !important; }
html[data-variant="flat"] main .panel, html[data-variant="flat"] .tile, html[data-variant="flat"] .ctile, html[data-variant="flat"] header { background-image: none !important; border-radius: 6px !important; }
html[data-variant="flat"] .btn, html[data-variant="flat"] .seg, html[data-variant="flat"] .chip, html[data-variant="flat"] input, html[data-variant="flat"] select { border-radius: 4px !important; background-image: none !important; }
html[data-variant="flat"] body { background-image: none !important; }
/* Glass: frosted see-through windows */
html[data-variant="glass"] body { background: radial-gradient(900px 600px at 15% 10%, rgba(80,130,255,.55), transparent 60%), radial-gradient(900px 700px at 90% 90%, rgba(190,80,255,.40), transparent 60%), radial-gradient(700px 500px at 70% 10%, rgba(40,200,190,.32), transparent 60%), var(--bg) !important; }
html[data-variant="glass"] main .panel { background: color-mix(in srgb, var(--panel) 52%, transparent) !important;  border-color: color-mix(in srgb, var(--text) 18%, transparent) !important; border-radius: 20px !important; }
html[data-variant="glass"] .tile, html[data-variant="glass"] .ctile { background: color-mix(in srgb, var(--row) 45%, transparent) !important; border-radius: 14px !important; }
html[data-variant="glass"] header { background: color-mix(in srgb, var(--panel) 55%, transparent) !important; }
/* Blueprint: monospace, grid paper, thin lines, square corners */
html[data-variant="blueprint"] body { font-family: "Cascadia Mono", "Consolas", "SF Mono", ui-monospace, monospace !important; letter-spacing: .01em;
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, transparent) 1px, transparent 1px) !important; background-size: 28px 28px !important; }
html[data-variant="blueprint"] main .panel, html[data-variant="blueprint"] .tile, html[data-variant="blueprint"] .ctile, html[data-variant="blueprint"] .btn, html[data-variant="blueprint"] .seg, html[data-variant="blueprint"] .chip, html[data-variant="blueprint"] input, html[data-variant="blueprint"] select { border-radius: 2px !important; }
html[data-variant="blueprint"] main .panel { border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent) !important; box-shadow: none !important; }
html[data-variant="blueprint"] h1, html[data-variant="blueprint"] h2, html[data-variant="blueprint"] h3 { text-transform: uppercase; letter-spacing: .06em; }
/* Compact: smaller text, tighter rows, more on screen */
html[data-variant="compact"] main .panel .phead { padding-top: 7px; padding-bottom: 5px; }
html[data-variant="compact"] .tile { font-size: 12px; }
html[data-variant="compact"] .tile .btn, html[data-variant="compact"] .btn { padding-top: 2px; padding-bottom: 2px; font-size: 12px; }
html[data-variant="compact"] td, html[data-variant="compact"] th { padding-top: 3px !important; padding-bottom: 3px !important; }
html[data-variant="compact"] main .panel h2 { font-size: 14px !important; }

/* ================= OPTIONS (any Layout, Style, Theme) ================= */
/* Text size: scales the inside of every window (window sizes and positions stay as they are) */
html[data-text] main .panel > :not(.rz):not(.resize):not(.grip) { zoom: var(--txt, 1); }
/* Corner roundness */
html[data-round="square"] main .panel, html[data-round="square"] .tile, html[data-round="square"] .ctile, html[data-round="square"] .btn, html[data-round="square"] .seg, html[data-round="square"] .chip, html[data-round="square"] input, html[data-round="square"] select, html[data-round="square"] .dialog, html[data-round="square"] .menu { border-radius: 0 !important; }
html[data-round="round"] main .panel { border-radius: 22px !important; }
html[data-round="round"] .tile, html[data-round="round"] .ctile, html[data-round="round"] .dialog { border-radius: 18px !important; }
/* The header keeps its own shapes: rounding it clipped icons and labels */
html[data-round="round"] :is(.btn, .seg, .seg button, input, select):not(body > header *) { border-radius: 999px !important; }
/* Row density */
html[data-density="compact"] td, html[data-density="compact"] th { padding-top: 3px !important; padding-bottom: 3px !important; }
html[data-density="compact"] .alert, html[data-density="compact"] .rem { padding-top: 4px !important; padding-bottom: 4px !important; }
html[data-density="compact"] .tile .btn { padding-top: 2px; padding-bottom: 2px; }
html[data-density="roomy"] td, html[data-density="roomy"] th { padding-top: 11px !important; padding-bottom: 11px !important; }
html[data-density="roomy"] .alert, html[data-density="roomy"] .rem { padding-top: 12px !important; padding-bottom: 12px !important; }

/* Professional: the filled buttons and brand mark follow a chosen accent color or the HEDnorth orange */
html[data-layout="pro"][data-palette="hednorth"]:not([data-theme="daylight"]), html[data-layout="pro"][style*="--accent"]:not([data-theme="daylight"]) { --pro-blue: var(--accent); }
html[data-layout="pro"][data-palette="hednorth"] body > header h1::before, html[data-layout="pro"][style*="--accent"] body > header h1::before { background: var(--accent); }
html[data-layout="pro"][data-palette="hednorth"] body > header > #menuBtn, html[data-layout="pro"][style*="--accent"] body > header > #menuBtn { background: var(--accent); color: #fff; }

/* ================= Pop-ups are always solid and always on top (every layout, style and theme) ================= */
.sopts-menu, .monmenu, .menudrop, .dialog, #modal .dialog, .menu, dialog, .toast, .ctxmenu, #chatBox, .tip, [role="menu"], [role="dialog"] {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.sopts-menu, .monmenu, .menudrop, .ctxmenu, [role="menu"] { background: var(--panel) !important; background-image: none !important; color: var(--text) !important; opacity: 1 !important; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent) !important; box-shadow: 0 12px 36px rgba(0,0,0,.35) !important; }
.menu, #modal .dialog, .dialog, dialog { background-color: var(--panel) !important; background-image: none !important; color: var(--text); }
.sopts-menu .sopts-item, .menudrop button, .monmenu label { color: var(--text) !important; opacity: 1; }
.sopts-menu .sopts-item[disabled] { opacity: .6; }
.sopts-menu .sopts-item:hover:not([disabled]) { background: color-mix(in srgb, var(--text) 12%, var(--panel)) !important; }
.sopts-menu { z-index: 9500 !important; }

/* ================= Readability fixes ================= */
/* Quiet buttons never stay white on a dark theme */
html:not([data-theme="daylight"]):not([data-theme="classic"]) .btn.quiet { background: color-mix(in srgb, var(--text) 10%, var(--panel)) !important; color: var(--text) !important; border-color: color-mix(in srgb, var(--text) 25%, transparent) !important; }
/* The gold priority star is darker on light themes so it can be seen */
html[data-theme="daylight"] .prio { color: #9a6a00; }

/* "Other Client" sits at the right-hand end, after the system icons */
.cmarks { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.marks .sys.manual, .cmarks .sys.manual { margin-left: auto; }
.marks { display: inline-flex; align-items: center; gap: 6px; }
.dws-btns[hidden] { display: none !important; }

/* Tiles never stick out of their window: when the window is narrower than a tile's minimum width the tile shrinks to fit (all layouts) */
.wall, .wgrid { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.wall.view-compact, .wgrid.view-compact { grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }
html[data-layout="simple"] .wall, html[data-layout="simple"] .wgrid { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.wall > .tile, .wgrid > .tile { min-width: 0; max-width: 100%; }

/* DWService mark in tile headers and cards: the same size as the other system logos */
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall) :is(.marks, .cmarks) .dwsmark { gap: 3px; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall) :is(.marks, .cmarks) .dwsmark svg { width: 12px; height: 12px; filter: none; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall) :is(.marks, .cmarks) .dwsmark .dwsname { font-size: 8px; }
#tileOverlay :is(.marks, .cmarks) .dwsmark svg { width: 16px; height: 16px; filter: none; }
#tileOverlay :is(.marks, .cmarks) .dwsmark .dwsname { font-size: 12px; }
:is(.marks, .cmarks) .logo:not(.hdr):not(.xs) { padding: 1px 3px; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall) :is(.marks, .cmarks) .logo:not(.hdr):not(.xs) img { height: 8.25px; max-width: 42px; }

/* DWService mark. Beside other system marks: exactly their size (icon height = logo height, text = logo text). Alone: 25% smaller than before. */
:is(.marks, .cmarks) > .dwsmark { gap: 3px; }
:is(.marks, .cmarks) > .dwsmark:not(:only-child) svg { width: 14px !important; height: 14px !important; filter: none; }
:is(.marks, .cmarks) > .dwsmark:not(:only-child) .dwsname { font-size: 11px !important; }
:is(.marks, .cmarks) > .dwsmark:only-child svg { width: 16.5px !important; height: 16.5px !important; }
:is(.marks, .cmarks) > .dwsmark:only-child .dwsname { font-size: 8.25px !important; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall) :is(.marks, .cmarks) > .dwsmark:not(:only-child) svg { width: 8.25px !important; height: 8.25px !important; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall) :is(.marks, .cmarks) > .dwsmark:not(:only-child) .dwsname { font-size: 7.25px !important; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall) :is(.marks, .cmarks) > .dwsmark:only-child svg { width: 9px !important; height: 9px !important; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall) :is(.marks, .cmarks) > .dwsmark:only-child .dwsname { font-size: 6px !important; }
#tileOverlay :is(.marks, .cmarks) > .dwsmark:not(:only-child) svg { width: 14.3px !important; height: 14.3px !important; }
#tileOverlay :is(.marks, .cmarks) > .dwsmark:not(:only-child) .dwsname { font-size: 12.4px !important; }
#tileOverlay :is(.marks, .cmarks) > .dwsmark:only-child svg { width: 12px !important; height: 12px !important; }
#tileOverlay :is(.marks, .cmarks) > .dwsmark:only-child .dwsname { font-size: 9px !important; }

/* The real DWService logo chip: alone in a tile, 25% smaller than before */
:is(.marks, .cmarks) > .logo[data-sys="dws"]:only-child { zoom: .75; }

/* Tidy rows: equal-height parts must not stretch their contents */
.tile .tstatus > .big { align-content: flex-start; }
.al-spacer { flex: none; }

/* ---- One line each, in the same order in every tile: name, system icons, provider, status, WAN IP ---- */
.tile:not(.big) .th { flex-wrap: wrap; row-gap: 3px; }
.tile:not(.big) .th > .marks { order: 9; flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.tile:not(.big) .th > h3 { flex: 1 1 0; }
.tile .tstatus > .twan { font-size: 12px; color: var(--muted); white-space: nowrap; margin: 1px 0 3px; cursor: text; }
.tile .twan .iptag { color: var(--text); opacity: .85; }
.ctile .cisp, .ctile .cwan { margin-left: 0; max-width: 100%; }
.ctile .cwan { color: var(--muted); font-size: 11px; }
.ctile .cmarks { flex-wrap: wrap; }
/* Grid rows are tall enough for the five lines (name, icons, provider, status, WAN) */
.wall:not(.view-compact), .wgrid:not(.view-compact) { grid-auto-rows: 138px; }
/* -752: a tile that is off the screen is not laid out or painted until it scrolls into view (its size comes from the grid rows, so nothing jumps). Big estates: layout of 40,000+ elements was the slowest part of a redraw. */
.wall:not(.view-compact) > .tile:not(.big):not(.inscroll):not(:focus-within), .wgrid:not(.view-compact) > .tile:not(.big):not(.inscroll):not(:focus-within) { content-visibility: auto; contain-intrinsic-size: auto 138px; }

/* Order in every tile: name, icons, status, provider, WAN IP (the provider line now sits inside the status block) */
.tile .tstatus > .tnet { padding: 0; margin: 0 0 1px; }

/* Smooth scrolling: a grid tile's lower part only scrolls by itself after you click in the tile (see sites-wall.js) */
.wall > .tile:not(.big) .tbody, .wgrid > .tile:not(.big) .tbody { overflow-y: hidden; }
.wall > .tile:not(.big).inscroll .tbody, .wgrid > .tile:not(.big).inscroll .tbody, .wall > .tile:not(.big):focus-within .tbody { overflow-y: auto; }

/* Daylight: two small texts that were just under the readable contrast */
html[data-theme="daylight"] .linkbtn.editdev { color: #1a4fb4; }
html[data-theme="daylight"] .watchchk, html[data-theme="daylight"] .watchchk * { color: #a85a0f; }

/* DWService compact cards: everything stays inside the card, however narrow (buttons wrap, the visit line wraps and the logo drops under it) */
.ctile { overflow: hidden; }
.ctile > * { min-width: 0; max-width: 100%; }
.ctile .dws-btns { flex-wrap: wrap !important; }
/* Compact cards with one or more computers: the PC drop-down, Screen and Files are small enough to sit inside the card, Screen and Files side by side */
.ctile .dws-btns { gap: 3px !important; }
.ctile .dws-btns select { flex: 1 0 100% !important; width: 100%; height: 20px; font-size: 10px !important; padding: 0 2px !important; line-height: 1.2; }
.ctile .dws-btns .btn { flex: 1 1 0 !important; min-width: 0 !important; padding: 1px 1px !important; font-size: 8.5px !important; letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: clip; text-align: center; }
.ctile .dwscstat .cvisit { flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.ctile .dwscstat .cvisit .cdwlogo, .ctile .dwscstat .cmain .cdwlogo { flex: 0 0 auto; max-width: 100%; }
.ctile .dwscstat .cdwlogo .dwsmark, .ctile .dwscstat .cdwlogo .sys { max-width: 100%; }
.ctile .cisp, .ctile .cwan { overflow-wrap: anywhere; }

/* Combined window: an Other Client with nothing at all to monitor (no system, no DWService computer) gets a WHITE side marking. An Other Client that has a DWService computer
   (or any status) shows its real status color on the side, like every other location: Watching orange, Maintenance blue, Site visit pink, Needs attention yellow, Offline red, All good green, Muted gray, Archive purple. */
#wall .tile.mclient.nosys, #wall .ctile.mclient.nosys { box-shadow: inset 4px 0 0 #fff, inset 5px 0 0 rgba(128, 138, 155, .55) !important; }
/* The black Other Clients section lines up with the other sections: its tiles start and end exactly where theirs do */
.wsec-other { margin-left: -11px; margin-right: -11px; }

/* Compact cards: every system mark sits on ONE line, and every mark (UniFi, OvrC, DWService ...) is built the same way:
   the same chip height, the icon and the name centered on the same line, the same text size. Narrow cards let the marks shrink. */
.ctile .cmarks { flex-wrap: nowrap !important; gap: 3px 4px; overflow: hidden; min-width: 0; align-items: center; }
.ctile .cmarks > :not(.dws-btns) { flex: 0 1 auto; min-width: 0; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall, #tileOverlay) .ctile .cmarks > :is(.logo, .dwsmark) { display: inline-flex !important; align-items: center !important; justify-content: center; box-sizing: border-box; height: 11px !important; min-width: 0 !important; padding: 0 3px !important; gap: 3px !important; line-height: 1 !important; zoom: 1 !important; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall, #tileOverlay) .ctile .cmarks .logo img { height: 7px !important; width: auto; max-width: 100%; min-width: 0; margin: 0; display: block; object-fit: contain; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall, #tileOverlay) .ctile .cmarks .dwsmark svg { width: 9px !important; height: 9px !important; flex: none; margin: 0; }
:is(#panel-sites, #lwall, #cwall, #wwall, #uwall, #owall, #kwall, #dwall, #tileOverlay) .ctile .cmarks :is(.lname, .dwsname) { font-size: 7px !important; line-height: 1 !important; font-weight: 700; white-space: nowrap; margin: 0; padding: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ctile .cmarks .sys { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Large location window: every system icon in a row has the SAME height (a wider logo is simply wider). */
#tileOverlay .marks > :is(.logo, .dwsmark), #tileOverlay .cmarks > :is(.logo, .dwsmark) { display: inline-flex !important; align-items: center !important; justify-content: center; box-sizing: border-box; height: 24px !important; min-width: 0 !important; padding: 0 7px !important; gap: 5px !important; line-height: 1 !important; zoom: 1 !important; }
#tileOverlay .marks .logo img, #tileOverlay .cmarks .logo img { height: 14px !important; width: auto; max-width: 90px !important; display: block; margin: 0; }
#tileOverlay :is(.marks, .cmarks) .dwsmark svg { width: 15px !important; height: 15px !important; flex: none; margin: 0; }
#tileOverlay :is(.marks, .cmarks) :is(.lname, .dwsname) { font-size: 12.5px !important; line-height: 1 !important; margin: 0; padding: 0; }
#tileOverlay .tile.big .tbody .logo, #tileOverlay .tile.big .tbody .dwsmark { display: inline-flex !important; align-items: center !important; box-sizing: border-box; height: 20px !important; padding: 0 6px !important; gap: 4px !important; line-height: 1 !important; zoom: 1 !important; }
#tileOverlay .tile.big .tbody .logo img { height: 12px !important; width: auto; max-width: 80px !important; margin: 0; display: block; }
#tileOverlay .tile.big .tbody .dwsmark svg { width: 13px !important; height: 13px !important; margin: 0; }
#tileOverlay .tile.big .tbody :is(.lname, .dwsname) { font-size: 11px !important; line-height: 1 !important; margin: 0; }

#closeAllMonitors[hidden] { display: none !important; }
html[data-layout="pro"] #closeAllMonitors { --ico: var(--i-mon); }
html[data-layout="pro"][data-basic] #closeAllMonitors:not([hidden]) { display: flex !important; }

/* Close All Monitors icon in the app title bar, left of the window's own minimize / maximize / X (only in the installed app window) */
#titleCloseAll { display: none; }
@media (display-mode: window-controls-overlay) {
  #titleCloseAll { display: flex; align-items: center; justify-content: center; position: fixed; z-index: 2147483000; top: 0; width: 46px; height: env(titlebar-area-height, 33px);
    right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw)); padding: 0; border: 0; border-radius: 0;
    background: transparent; color: #cbd5e1; cursor: pointer; -webkit-app-region: no-drag; app-region: no-drag; }
  #titleCloseAll:hover { background: #b3261e; color: #fff; }
}

/* Hide-header icon: left of Close All Monitors in the app title bar; in a browser tab a small corner icon, only while the header is hidden */
#titleHdrHide { display: none; position: fixed; z-index: 2147483000; top: 4px; right: 6px; width: 30px; height: 28px; padding: 0; align-items: center; justify-content: center; border: 1px solid var(--line, #3a4560); border-radius: 6px; background: var(--panel, #11182b); color: var(--text, #cbd5e1); cursor: pointer; opacity: .75; }
#titleHdrHide:hover { opacity: 1; background: var(--row, #1b2540); }
#titleHdrHide.hid { display: flex; }
html.phone #titleHdrHide { display: none !important; }
@media (display-mode: window-controls-overlay) {
  #titleHdrHide, #titleHdrHide.hid { display: flex; top: 0; width: 46px; height: env(titlebar-area-height, 33px); right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw) + 46px); border: 0; border-radius: 0; background: transparent; color: #cbd5e1; opacity: 1; -webkit-app-region: no-drag; app-region: no-drag; }
  #titleHdrHide:hover { background: rgba(255, 255, 255, .14); }
}

/* "Monitor N" in the header: shown in every layout, in Basic and Advanced */
body > header .monitortag[hidden] { display: none !important; }
body > header .monitortag:not([hidden]) { display: inline-block !important; visibility: visible !important; opacity: 1 !important; background: var(--accent, #2f62e6) !important; color: #fff !important; font-weight: 700; letter-spacing: .02em; margin: 4px 8px; flex: none; }
.menudrop button[hidden] { display: none !important; }
/* Enlarged location: the system logos are links to that system's portal. */
.marks a.marklink { display: inline-flex; align-items: center; border-radius: 6px; text-decoration: none; cursor: pointer; outline-offset: 2px; transition: transform .1s, box-shadow .1s; }
.marks a.marklink:hover, .marks a.marklink:focus-visible { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--accent, #4aa3ff); }
.marks a.marklink::after { content: "↗"; font-size: 10px; margin-left: 2px; color: var(--muted); }

/* -764: Full Screen icon in the app title bar, left of the hide-header icon (in a browser tab: a small corner icon, only while the header is hidden) */
#titleFull { display: none; position: fixed; z-index: 2147483000; top: 4px; right: 42px; width: 30px; height: 28px; padding: 0; align-items: center; justify-content: center; border: 1px solid var(--line, #3a4560); border-radius: 6px; background: var(--panel, #11182b); color: var(--text, #cbd5e1); cursor: pointer; opacity: .75; }
#titleFull:hover { opacity: 1; background: var(--row, #1b2540); }
#titleFull.hid { display: flex; }
html.phone #titleFull { display: none !important; }
@media (display-mode: window-controls-overlay) {
  #titleFull, #titleFull.hid { display: flex; top: 0; width: 46px; height: env(titlebar-area-height, 33px); right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw) + 92px); border: 0; border-radius: 0; background: transparent; color: #cbd5e1; opacity: 1; -webkit-app-region: no-drag; app-region: no-drag; }
  #titleFull:hover { background: rgba(255, 255, 255, .14); }
}
#titleFull[hidden] { display: none !important; }

/* -774: this window is on a monitor that is switched off (Menu > Board Settings > Windows > Monitors > Use this monitor): no windows show here. */
html.monOffHere main#main > .panel { display: none !important; }
html.monOffHere main#main::before-disabled { content: "This monitor is switched off, so no windows show here. Tick \"Use this monitor\" in Menu \2192 Board Settings \2192 Windows \2192 Monitors to use it."; display: block; margin: 40px auto; max-width: 560px; padding: 18px 22px; text-align: center; line-height: 1.5; font-size: 15px; color: var(--muted, #9aa6b8); border: 1px dashed var(--line, #33425a); border-radius: 12px; }

/* -774: Close All Monitors (and the way out of full screen) while the window is full screen and has no title bar */
html.fsOn #titleCloseAll, html.fsOn #titleFull { display: flex; align-items: center; justify-content: center; position: fixed; z-index: 2147483000; top: 6px; width: 34px; height: 30px; padding: 0;
  border: 1px solid var(--line, #33425a); border-radius: 8px; background: var(--panel, #121a2b); color: var(--text, #e6edf7); cursor: pointer; opacity: .28; transition: opacity .15s; }
html.fsOn #titleCloseAll { right: 8px; left: auto; }
html.fsOn #titleFull { right: 48px; left: auto; }
html.fsOn #titleCloseAll:hover, html.fsOn #titleFull:hover, html.fsOn #titleCloseAll:focus-visible, html.fsOn #titleFull:focus-visible { opacity: 1; }
html.fsOn #titleCloseAll:hover { background: #b3261e; color: #fff; border-color: #b3261e; }
html.fsOn #titleFull[hidden] { display: none; }

#monOffBar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin: 24px auto; max-width: 640px; padding: 16px 20px; text-align: center; font-size: 15px; color: var(--muted, #9aa6b8); border: 1px dashed var(--line, #33425a); border-radius: 12px; }

/* -794: DWService button in the top right corner, left of Full Screen (title bar in the app; a corner icon while the header is hidden; in full screen) */
#titleDws { display: none; position: fixed; z-index: 2147483000; top: 4px; right: 78px; width: 30px; height: 28px; padding: 0; align-items: center; justify-content: center; border: 1px solid var(--line, #3a4560); border-radius: 6px; background: var(--panel, #11182b); color: var(--text, #cbd5e1); cursor: pointer; opacity: .75; }
#titleDws:hover { opacity: 1; background: var(--row, #1b2540); }
#titleDws.hid { display: flex; }
html.phone #titleDws { display: none !important; }
@media (display-mode: window-controls-overlay) {
  #titleDws, #titleDws.hid { display: flex; top: 0; width: 46px; height: env(titlebar-area-height, 33px); right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw) + 138px); border: 0; border-radius: 0; background: transparent; color: #cbd5e1; opacity: 1; -webkit-app-region: no-drag; app-region: no-drag; }
  #titleDws:hover { background: rgba(255, 255, 255, .14); }
}
html.fsOn #titleDws { display: flex; align-items: center; justify-content: center; position: fixed; z-index: 2147483000; top: 6px; right: 88px; left: auto; width: 34px; height: 30px; padding: 0; border: 1px solid var(--line, #33425a); border-radius: 8px; background: var(--panel, #121a2b); color: var(--text, #e6edf7); cursor: pointer; opacity: .28; transition: opacity .15s; }
html.fsOn #titleDws:hover, html.fsOn #titleDws:focus-visible { opacity: 1; }

#titleDws { position: fixed; }
#titleDws.off::after { content: ''; position: absolute; top: 4px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px var(--panel, #11182b); }
