/* ==== looks.css ==== */
/* The board's look, in two independent layers chosen in Menu -> Board Settings -> Look:
   STYLE (html[data-style]): shapes, type, edges, effects  - classic | modern | future | retro
   THEME (html[data-theme]): colors only                   - classic | midnight | graphite | daylight
   Any style works with any theme. Neither ever moves a window, button or view. */

@font-face { font-family: "Inter"; src: url("/static/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }

/* Colors every style uses; the Classic theme keeps the board's original colors. */
:root { --hdr-bg: transparent; --panel-bg: var(--panel); --tile-bg: var(--row); --edge: var(--line);
        --input-bg: var(--bg); --seg-on: var(--row); --shadow: rgba(0,0,0,.35); --accent: var(--link); }

/* ===================================== THEMES (colors) ===================================== */

html[data-theme="midnight"] { --bg: #070c18; --panel: #0d1526; --row: #111b30; --line: #1c2843; --text: #e6ecf5; --muted: #8796b0;
  --up: #2fd08f; --down: #ff5f5a; --warn: #f2b443; --link: #7ea6ff; --unk: #6c7a94;
  --hdr-bg: linear-gradient(180deg, rgba(20,34,68,.92), rgba(9,15,30,.92)); --panel-bg: linear-gradient(180deg, #111c34, #0c1426);
  --tile-bg: #101a2f; --edge: #1c2945; --input-bg: #0a1122; --seg-on: #22365f; --shadow: rgba(0,0,0,.5); --accent: #7ea6ff; }
html[data-theme="midnight"] body { background: radial-gradient(1400px 700px at 15% -20%, #142449 0%, transparent 60%), #070c18; }

html[data-theme="graphite"] { --bg: #0e1116; --panel: #13171d; --row: #181d25; --line: #242a33; --text: #e7eaee; --muted: #8a93a0;
  --up: #3fb97f; --down: #e5534b; --warn: #d6a531; --link: #79a8f5; --unk: #6b7480;
  --hdr-bg: #0e1116; --panel-bg: #13171d; --tile-bg: #181d25; --edge: #232932; --input-bg: #101419; --seg-on: #232a35;
  --shadow: rgba(0,0,0,.4); --accent: #9aa7b8; }

html[data-theme="daylight"] { --bg: #eef1f5; --panel: #ffffff; --row: #ffffff; --line: #d3dae3; --text: #18212d; --muted: #5f6b7d;
  --up: #17975c; --down: #d23b37; --warn: #b9770e; --unk: #8a94a3; --link: #2563d6; --watch: #d9701f; --archive: #7c4dd8;
  --hdr-bg: #ffffff; --panel-bg: #ffffff; --tile-bg: #ffffff; --edge: #e1e6ed; --input-bg: #ffffff; --seg-on: #ffffff;
  --shadow: rgba(16,24,40,.08); --accent: #2563d6; color-scheme: light; }
html[data-theme="daylight"] body { background: #eef1f5; }
html[data-theme="daylight"] .brand img { filter: brightness(0) saturate(100%); opacity: .85; }
html[data-theme="daylight"] .hbadge { color: #8a5a00 !important; }
html[data-theme="daylight"] .sys.crestron { color: #b03a78 !important; } html[data-theme="daylight"] .sys.unifi { color: #1d5fc9 !important; }
html[data-theme="daylight"] .sys.ovrc { color: #6b3fc9 !important; } html[data-theme="daylight"] .sys.lutron { color: #12807f !important; }
html[data-theme="daylight"] .alert { background: #fbfcfe !important; }
html[data-theme="daylight"] .seg { background: #f3f5f8; }
html[data-theme="daylight"] .seg button[aria-pressed="true"] { box-shadow: 0 1px 2px rgba(16,24,40,.12); }

/* Any theme other than Classic paints the board's surfaces with its colors. */
html[data-theme]:not([data-theme="classic"]) header { background: var(--hdr-bg); border-bottom-color: var(--edge); }
html[data-theme]:not([data-theme="classic"]) .panel { background: var(--panel-bg); border-color: var(--edge); }
html[data-theme]:not([data-theme="classic"]) .tile, html[data-theme]:not([data-theme="classic"]) .ctile { background: var(--tile-bg); }
html[data-theme]:not([data-theme="classic"]) .seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--text); }
html[data-theme]:not([data-theme="classic"]) input, html[data-theme]:not([data-theme="classic"]) select,
html[data-theme]:not([data-theme="classic"]) textarea { background: var(--input-bg); border-color: var(--edge); color: var(--text); }

/* ===================================== STYLES (look and feel) ===================================== */

/* ---- Modern: the looks first made in 2026.10.29-42, one per theme.
        Modern + Classic theme = the board exactly as it was originally. ---- */
/* Modern + midnight */
html[data-style="modern"][data-theme="midnight"] body { font-family: "Inter", "Segoe UI", system-ui, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
html[data-style="modern"][data-theme="midnight"] h1, html[data-style="modern"][data-theme="midnight"] h2, html[data-style="modern"][data-theme="midnight"] h3 { letter-spacing: -0.015em; }
html[data-style="modern"][data-theme="midnight"] .ptitle h2 { font-size: 16px; font-weight: 650; }
html[data-style="modern"][data-theme="midnight"] .clock .time, html[data-style="modern"][data-theme="midnight"] .wseccount, html[data-style="modern"][data-theme="midnight"] .tstatus .for { font-variant-numeric: tabular-nums; }
html[data-style="modern"][data-theme="midnight"] .wsechead { font-size: 11px !important; letter-spacing: .09em; font-weight: 650; }
html[data-style="modern"][data-theme="midnight"] .btn, html[data-style="modern"][data-theme="midnight"] .seg button, html[data-style="modern"][data-theme="midnight"] .chip, html[data-style="modern"][data-theme="midnight"] select, html[data-style="modern"][data-theme="midnight"] input { transition: background .15s, color .15s, border-color .15s; }
html[data-style="modern"][data-theme="midnight"] .tile, html[data-style="modern"][data-theme="midnight"] .ctile { transition: box-shadow .2s, transform .2s; }
html[data-style="modern"][data-theme="midnight"] { --bg: #070c18; --panel: #0d1526; --row: #111b30; --line: #1c2843; --text: #e6ecf5; --muted: #8796b0;
        --up: #2fd08f; --down: #ff5f5a; --warn: #f2b443; --link: #7ea6ff; --unk: #6c7a94; }
html[data-style="modern"][data-theme="midnight"] body { background: radial-gradient(1400px 700px at 15% -20%, #142449 0%, transparent 60%), #070c18; }
html[data-style="modern"][data-theme="midnight"] header { background: linear-gradient(180deg, rgba(20,34,68,.9), rgba(9,15,30,.9)); border-bottom: 1px solid #1a2746; box-shadow: 0 1px 0 rgba(126,166,255,.10), 0 8px 24px rgba(0,0,0,.35); }
html[data-style="modern"][data-theme="midnight"] h1 { font-weight: 700; letter-spacing: .01em; }
html[data-style="modern"][data-theme="midnight"] .panel { border-radius: 16px; border: 1px solid #1a2643; background: linear-gradient(180deg, rgba(17,28,52,.92), rgba(12,20,38,.95)); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
html[data-style="modern"][data-theme="midnight"] .panel.unifi, html[data-style="modern"][data-theme="midnight"] .panel.ovrc, html[data-style="modern"][data-theme="midnight"] .panel.lutron, html[data-style="modern"][data-theme="midnight"] .panel.crestron, html[data-style="modern"][data-theme="midnight"] .panel.contract, html[data-style="modern"][data-theme="midnight"] .panel.watchp, html[data-style="modern"][data-theme="midnight"] #panel-sites { border-top-width: 2px !important; }
html[data-style="modern"][data-theme="midnight"] .tile { border-radius: 14px; background: #101a2f; border: 1px solid #1c2945; }
html[data-style="modern"][data-theme="midnight"] .tile.down { background: linear-gradient(180deg, rgba(255,95,90,.10), rgba(255,95,90,.02) 45%), #101a2f; border-color: rgba(255,95,90,.35); box-shadow: 0 0 0 1px rgba(255,95,90,.08), 0 8px 28px rgba(255,95,90,.12); }
html[data-style="modern"][data-theme="midnight"] .tile.warn { background: linear-gradient(180deg, rgba(242,180,67,.09), transparent 45%), #101a2f; border-color: rgba(242,180,67,.30); }
html[data-style="modern"][data-theme="midnight"] .tile.watch { background: linear-gradient(180deg, rgba(242,146,75,.10), transparent 45%), #101a2f; border-color: rgba(242,146,75,.35); }
html[data-style="modern"][data-theme="midnight"] .tile.ok { border-color: rgba(47,208,143,.18); }
html[data-style="modern"][data-theme="midnight"] .tile .th { border-bottom-color: #1a2643 !important; }
html[data-style="modern"][data-theme="midnight"] .tstatus .big { font-size: 17px !important; }
html[data-style="modern"][data-theme="midnight"] .ctile { border-radius: 12px; background: #101a2f; border: 1px solid #1c2945; }
html[data-style="modern"][data-theme="midnight"] .seg { border-radius: 999px; border-color: #22304f; background: rgba(10,17,33,.6); }
html[data-style="modern"][data-theme="midnight"] .seg button { padding: 5px 13px; }
html[data-style="modern"][data-theme="midnight"] .seg button[aria-pressed="true"] { background: linear-gradient(180deg, #2a3f72, #1f3058); color: #fff; }
html[data-style="modern"][data-theme="midnight"] .btn { border-radius: 999px; padding: 3px 12px; }
html[data-style="modern"][data-theme="midnight"] .chip { border-color: #22304f; }
html[data-style="modern"][data-theme="midnight"] input, html[data-style="modern"][data-theme="midnight"] select { background: rgba(7,12,24,.7) !important; border-color: #22304f !important; border-radius: 999px !important; padding-left: 12px !important; }
html[data-style="modern"][data-theme="midnight"] .wsechead { text-transform: uppercase; }
/* Modern + graphite */
html[data-style="modern"][data-theme="graphite"] body { font-family: "Inter", "Segoe UI", system-ui, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
html[data-style="modern"][data-theme="graphite"] h1, html[data-style="modern"][data-theme="graphite"] h2, html[data-style="modern"][data-theme="graphite"] h3 { letter-spacing: -0.015em; }
html[data-style="modern"][data-theme="graphite"] .ptitle h2 { font-size: 16px; font-weight: 650; }
html[data-style="modern"][data-theme="graphite"] .clock .time, html[data-style="modern"][data-theme="graphite"] .wseccount, html[data-style="modern"][data-theme="graphite"] .tstatus .for { font-variant-numeric: tabular-nums; }
html[data-style="modern"][data-theme="graphite"] .wsechead { font-size: 11px !important; letter-spacing: .09em; font-weight: 650; }
html[data-style="modern"][data-theme="graphite"] .btn, html[data-style="modern"][data-theme="graphite"] .seg button, html[data-style="modern"][data-theme="graphite"] .chip, html[data-style="modern"][data-theme="graphite"] select, html[data-style="modern"][data-theme="graphite"] input { transition: background .15s, color .15s, border-color .15s; }
html[data-style="modern"][data-theme="graphite"] .tile, html[data-style="modern"][data-theme="graphite"] .ctile { transition: box-shadow .2s, transform .2s; }
html[data-style="modern"][data-theme="graphite"] { --bg: #0e1116; --panel: #13171d; --row: #181d25; --line: #242a33; --text: #e7eaee; --muted: #8a93a0;
        --up: #3fb97f; --down: #e5534b; --warn: #d6a531; --link: #79a8f5; --unk: #6b7480; }
html[data-style="modern"][data-theme="graphite"] header { background: #0e1116; border-bottom: 1px solid #1d222a; }
html[data-style="modern"][data-theme="graphite"] .panel { border-radius: 10px; border: 1px solid #20262f; box-shadow: none; }
html[data-style="modern"][data-theme="graphite"] .panel.unifi, html[data-style="modern"][data-theme="graphite"] .panel.ovrc, html[data-style="modern"][data-theme="graphite"] .panel.lutron, html[data-style="modern"][data-theme="graphite"] .panel.crestron, html[data-style="modern"][data-theme="graphite"] .panel.contract, html[data-style="modern"][data-theme="graphite"] .panel.watchp, html[data-style="modern"][data-theme="graphite"] #panel-sites { border-top-width: 2px !important; }
html[data-style="modern"][data-theme="graphite"] #panel-links, html[data-style="modern"][data-theme="graphite"] #panel-alerts, html[data-style="modern"][data-theme="graphite"] #panel-map { border-top: 1px solid #20262f !important; }
html[data-style="modern"][data-theme="graphite"] .ptitle h2 { font-size: 15px; font-weight: 600; }
html[data-style="modern"][data-theme="graphite"] .tile { border-radius: 8px; background: #181d25; border: 1px solid #222832; }
html[data-style="modern"][data-theme="graphite"] .tile.down { box-shadow: inset 3px 0 0 var(--down); }
html[data-style="modern"][data-theme="graphite"] .tile.warn { box-shadow: inset 3px 0 0 var(--warn); }
html[data-style="modern"][data-theme="graphite"] .tile.watch { box-shadow: inset 3px 0 0 var(--watch); }
html[data-style="modern"][data-theme="graphite"] .tile .th h3 { font-weight: 600; font-size: 14.5px; }
html[data-style="modern"][data-theme="graphite"] .tstatus .big { font-size: 15.5px !important; font-weight: 600 !important; }
html[data-style="modern"][data-theme="graphite"] .btn { border-radius: 6px; font-weight: 500; }
html[data-style="modern"][data-theme="graphite"] .btn:not(.quiet):not(.primary):not(.danger) { background: transparent; }
html[data-style="modern"][data-theme="graphite"] .seg { border-radius: 7px; border-color: #262c36; }
html[data-style="modern"][data-theme="graphite"] .seg button { color: #8a93a0; }
html[data-style="modern"][data-theme="graphite"] .seg button[aria-pressed="true"] { background: #222934; color: #fff; }
html[data-style="modern"][data-theme="graphite"] .chip { border-color: #2a313c; }
html[data-style="modern"][data-theme="graphite"] input, html[data-style="modern"][data-theme="graphite"] select { background: #101419 !important; border-color: #262c36 !important; border-radius: 6px !important; }
html[data-style="modern"][data-theme="graphite"] .wsechead { text-transform: uppercase; }
/* Modern + daylight */
html[data-style="modern"][data-theme="daylight"] body { font-family: "Inter", "Segoe UI", system-ui, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
html[data-style="modern"][data-theme="daylight"] h1, html[data-style="modern"][data-theme="daylight"] h2, html[data-style="modern"][data-theme="daylight"] h3 { letter-spacing: -0.015em; }
html[data-style="modern"][data-theme="daylight"] .ptitle h2 { font-size: 16px; font-weight: 650; }
html[data-style="modern"][data-theme="daylight"] .clock .time, html[data-style="modern"][data-theme="daylight"] .wseccount, html[data-style="modern"][data-theme="daylight"] .tstatus .for { font-variant-numeric: tabular-nums; }
html[data-style="modern"][data-theme="daylight"] .wsechead { font-size: 11px !important; letter-spacing: .09em; font-weight: 650; }
html[data-style="modern"][data-theme="daylight"] .btn, html[data-style="modern"][data-theme="daylight"] .seg button, html[data-style="modern"][data-theme="daylight"] .chip, html[data-style="modern"][data-theme="daylight"] select, html[data-style="modern"][data-theme="daylight"] input { transition: background .15s, color .15s, border-color .15s; }
html[data-style="modern"][data-theme="daylight"] .tile, html[data-style="modern"][data-theme="daylight"] .ctile { transition: box-shadow .2s, transform .2s; }
html[data-style="modern"][data-theme="daylight"] { --bg: #eef1f5; --panel: #ffffff; --row: #ffffff; --line: #d3dae3; --text: #18212d; --muted: #5f6b7d;
        --up: #17975c; --down: #d23b37; --warn: #b9770e; --unk: #8a94a3; --link: #2563d6; --watch: #d9701f; color-scheme: light; }
html[data-style="modern"][data-theme="daylight"] body { background: #eef1f5; }
html[data-style="modern"][data-theme="daylight"] header { background: #ffffff; border-bottom: 1px solid #e3e8ef; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
html[data-style="modern"][data-theme="daylight"] .panel { border-radius: 12px; border: 1px solid #e3e8ef; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 28px rgba(16,24,40,.06); }
html[data-style="modern"][data-theme="daylight"] .panel.unifi, html[data-style="modern"][data-theme="daylight"] .panel.ovrc, html[data-style="modern"][data-theme="daylight"] .panel.lutron, html[data-style="modern"][data-theme="daylight"] .panel.crestron, html[data-style="modern"][data-theme="daylight"] .panel.contract, html[data-style="modern"][data-theme="daylight"] .panel.watchp, html[data-style="modern"][data-theme="daylight"] #panel-sites { border-top-width: 3px !important; }
html[data-style="modern"][data-theme="daylight"] .tile, html[data-style="modern"][data-theme="daylight"] .ctile { background: #ffffff; border: 1px solid #e3e8ef; box-shadow: 0 1px 3px rgba(16,24,40,.06); border-radius: 10px; }
html[data-style="modern"][data-theme="daylight"] .tile.down { box-shadow: inset 0 3px 0 var(--down), 0 1px 3px rgba(16,24,40,.06); }
html[data-style="modern"][data-theme="daylight"] .tile.warn { box-shadow: inset 0 3px 0 var(--warn), 0 1px 3px rgba(16,24,40,.06); }
html[data-style="modern"][data-theme="daylight"] .tile.watch { box-shadow: inset 0 3px 0 var(--watch), 0 1px 3px rgba(16,24,40,.06); }
html[data-style="modern"][data-theme="daylight"] .tile.ok { box-shadow: inset 0 3px 0 var(--up), 0 1px 3px rgba(16,24,40,.06); }
html[data-style="modern"][data-theme="daylight"] .tile .th { border-bottom-color: #eef1f5 !important; }
html[data-style="modern"][data-theme="daylight"] .tile .tbody, html[data-style="modern"][data-theme="daylight"] .tile .member, html[data-style="modern"][data-theme="daylight"] .lutronalerts, html[data-style="modern"][data-theme="daylight"] .unmonnote { color: var(--text); }
html[data-style="modern"][data-theme="daylight"] .seg { background: #f3f5f8; border-color: #dde3ea; border-radius: 8px; }
html[data-style="modern"][data-theme="daylight"] .seg button[aria-pressed="true"] { background: #ffffff; box-shadow: 0 1px 2px rgba(16,24,40,.10); color: #18212d; }
html[data-style="modern"][data-theme="daylight"] .btn { border-radius: 6px; }
html[data-style="modern"][data-theme="daylight"] .btn.quiet { background: #fff; color: #3d4757; }
html[data-style="modern"][data-theme="daylight"] input, html[data-style="modern"][data-theme="daylight"] select { background: #fff !important; border-color: #dde3ea !important; color: #18212d !important; border-radius: 7px !important; }
html[data-style="modern"][data-theme="daylight"] .hbadge { color: #8a5a00 !important; }
html[data-style="modern"][data-theme="daylight"] .sys.crestron { color: #b03a78 !important; }
html[data-style="modern"][data-theme="daylight"] .sys.unifi { color: #1d5fc9 !important; }
html[data-style="modern"][data-theme="daylight"] .sys.ovrc { color: #6b3fc9 !important; }
html[data-style="modern"][data-theme="daylight"] .sys.lutron { color: #12807f !important; }
html[data-style="modern"][data-theme="daylight"] .alert { background: #fbfcfe !important; color: var(--text); }
html[data-style="modern"][data-theme="daylight"] .wsechead { text-transform: uppercase; }
html[data-style="modern"][data-theme="daylight"] .brand img { filter: brightness(0) saturate(100%); opacity: .85; }

/* ---- Future: control-room HUD. Squared edges, glowing outlines, corner brackets, wide caps ---- */
html[data-style="future"] body { font-family: "Inter", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 5%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--accent) 5%, transparent) 1px, transparent 1px);
  background-size: 32px 32px; }
html[data-style="future"] h1 { text-transform: uppercase; letter-spacing: .18em; font-weight: 600; font-size: 17px; }
html[data-style="future"] .ptitle h2 { text-transform: uppercase; letter-spacing: .14em; font-size: 13.5px; font-weight: 600; }
html[data-style="future"] .clock .time { font-family: "Cascadia Mono", "Consolas", "DejaVu Sans Mono", monospace; letter-spacing: .06em; text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 60%, transparent); }
html[data-style="future"] .wsechead { font-size: 11px !important; letter-spacing: .2em; text-transform: uppercase; }
html[data-style="future"] .panel { border-radius: 3px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--edge));
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 0 30px color-mix(in srgb, var(--accent) 10%, transparent); }
html[data-style="future"] .panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(var(--accent), var(--accent)) top left / 16px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) top left / 2px 16px no-repeat,
              linear-gradient(var(--accent), var(--accent)) bottom right / 16px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) bottom right / 2px 16px no-repeat; }
html[data-style="future"] main:not(.free) .panel { position: relative; }
html[data-style="future"] .tile { border-radius: 2px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--edge)); }
html[data-style="future"] .tile .th h3 { letter-spacing: .02em; }
html[data-style="future"] .tstatus .big { text-transform: uppercase; letter-spacing: .06em; font-size: 15px !important; }
html[data-style="future"] .tile.down { border-color: var(--down); box-shadow: 0 0 18px color-mix(in srgb, var(--down) 30%, transparent), inset 0 0 22px color-mix(in srgb, var(--down) 8%, transparent); }
html[data-style="future"] .tile.warn { border-color: color-mix(in srgb, var(--warn) 70%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--warn) 20%, transparent); }
html[data-style="future"] .tile.watch { border-color: color-mix(in srgb, var(--watch) 70%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--watch) 22%, transparent); }
html[data-style="future"] .sdot { box-shadow: 0 0 8px currentColor; }
html[data-style="future"] .ctile { border-radius: 2px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--edge)); }
html[data-style="future"] .seg, html[data-style="future"] .btn, html[data-style="future"] .chip,
html[data-style="future"] input, html[data-style="future"] select { border-radius: 2px; }
html[data-style="future"] .btn, html[data-style="future"] .seg button, html[data-style="future"] .chip { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }
html[data-style="future"] .seg button[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* ---- Retro: old-school terminal. Monospace, square, chunky borders, hard shadows, faint scanlines ---- */
html[data-style="retro"] body { font-family: "Cascadia Mono", "Consolas", "DejaVu Sans Mono", "Courier New", monospace; font-size: 14px; letter-spacing: 0; }
html[data-style="retro"] h1, html[data-style="retro"] .ptitle h2, html[data-style="retro"] .wsechead { text-transform: uppercase; letter-spacing: .06em; }
html[data-style="retro"] .panel { border-radius: 0; border: 2px solid var(--edge); box-shadow: 6px 6px 0 var(--shadow); }
html[data-style="retro"] .panel.unifi, html[data-style="retro"] .panel.ovrc, html[data-style="retro"] .panel.lutron,
html[data-style="retro"] .panel.crestron, html[data-style="retro"] .panel.contract, html[data-style="retro"] .panel.watchp { border-top-width: 6px; }
html[data-style="retro"] .tile { border-radius: 0; border: 2px solid var(--edge); box-shadow: 4px 4px 0 var(--shadow); }
html[data-style="retro"] .tile.down { border-color: var(--down); } html[data-style="retro"] .tile.warn { border-color: var(--warn); }
html[data-style="retro"] .tile.watch { border-color: var(--watch); }
html[data-style="retro"] .tstatus .big { text-transform: uppercase; font-size: 15px !important; }
html[data-style="retro"] .sdot, html[data-style="retro"] .wsecdot { border-radius: 0 !important; }
html[data-style="retro"] .ctile { border-radius: 0; border: 2px solid var(--edge); }
html[data-style="retro"] .seg, html[data-style="retro"] .btn, html[data-style="retro"] .chip, html[data-style="retro"] input,
html[data-style="retro"] select, html[data-style="retro"] textarea, html[data-style="retro"] .menubtn, html[data-style="retro"] .lbadge,
html[data-style="retro"] .hbadge, html[data-style="retro"] .sys, html[data-style="retro"] .iptag { border-radius: 0 !important; }
html[data-style="retro"] .btn, html[data-style="retro"] .menubtn { border-width: 2px; text-transform: uppercase; }
html[data-style="retro"] .btn:active { transform: translate(2px, 2px); }
html[data-style="retro"] .clock .time { letter-spacing: .04em; }
html[data-style="retro"]:not([data-theme="daylight"]) .tstatus .big, html[data-style="retro"]:not([data-theme="daylight"]) .clock .time { text-shadow: 0 0 6px currentColor; }
html[data-style="retro"] body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.07) 0 1px, transparent 1px 3px); }
html[data-style="retro"][data-theme="daylight"] body::after { background: repeating-linear-gradient(0deg, rgba(0,0,0,.025) 0 1px, transparent 1px 3px); }/* ---------- Being worked on: one color (2026.10.29-47) ----------
   Everything in the "Being worked on" section uses the section's blue, in every
   style and theme: the status text, its dot, the edge and the outline. The red is
   for problems nobody is on yet. */
.wsec-work .tile .tstatus .big, .wsec-work .loclist .lstat, .wsec-work .ctile .cstat, the edge and the outline. The red is
   for problems nobody is on yet. */
.wsec-maint .tile .tstatus .big, .wsec-maint .loclist .lstat, .wsec-maint .ctile .cstat { color: var(--link) !important; }.wsec-work .tile, .wsec-maint .tile { box-shadow: inset 4px 0 0 var(--link) !important; border-color: color-mix(in srgb, var(--link) 35%, var(--line)) !important; }.wsec-work .tile.down, .wsec-maint .tile.down { background: linear-gradient(180deg, color-mix(in srgb, var(--link) 9%, transparent), transparent 45%), var(--panel) !important; }.wsec-work .ctile, .wsec-maint .ctile { box-shadow: inset 4px 0 0 var(--link) !important; border-color: color-mix(in srgb, var(--link) 35%, var(--line)) !important; }.wsec-work .loclist .lbar, .wsec-maint .loclist .lbar { background: var(--link) !important; }html[data-style="future"] .wsec-work .tile, html[data-style="future"] .wsec-maint .tile { box-shadow: 0 0 18px color-mix(in srgb, var(--link) 25%, transparent) !important; }html[data-style="retro"] .wsec-work .tile, html[data-style="retro"] .wsec-maint .tile { box-shadow: 4px 4px 0 color-mix(in srgb, var(--link) 45%, transparent) !important; }

/* ---------- Daylight: clearer window edges (2026.10.29-48) ----------
   Every window gets a darker outline and a slightly deeper shadow, so windows stand
   apart from the light background. The colored top edge of each system window stays. */
html[data-theme="daylight"] .panel { border-left-color: #aeb9c7 !important; border-right-color: #aeb9c7 !important; border-bottom-color: #aeb9c7 !important;
  border-left-width: 1px !important; border-right-width: 1px !important; border-bottom-width: 1px !important; border-style: solid !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.10), 0 8px 24px rgba(16,24,40,.10) !important; }
html[data-theme="daylight"] .panel:not(.unifi):not(.ovrc):not(.lutron):not(.crestron):not(.watchp):not(#panel-sites) { border-top-color: #aeb9c7 !important; border-top-width: 1px !important; }
html[data-theme="daylight"] .tile, html[data-theme="daylight"] .ctile { border-color: #c3ccd8 !important; }
html[data-theme="daylight"] .phead { border-bottom-color: #d3dae3 !important; }
html[data-theme="daylight"] .filters { border-color: #c3ccd8 !important; }

/* Status Options: one drop-down for Maintenance and Watch */
.sopts { position: relative; display: inline-block; }
.sopts > summary { list-style: none; cursor: pointer; }
.sopts > summary::-webkit-details-marker { display: none; }
.sopts-menu { position: absolute; right: 0; top: 100%; margin-top: 4px; z-index: 20; min-width: 190px; display: flex; flex-direction: column;
  background: var(--panel, #fff); color: inherit; border: 1px solid var(--line, #d5dde6); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 4px; }
.sopts-item { background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 6px; cursor: pointer; font: inherit; color: inherit; }
.sopts-item:hover, .sopts-item:focus-visible { background: rgba(127,127,127,.18); }

/* Menu -> Services Status (services.js) */
.svc-wrap { padding: 10px 0; min-width: 0; }
.svc-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.svc-head h3 { margin: 0; }
.svc-when { color: var(--unk); }
.svc-sub { margin: 16px 0 6px; font-size: 0.95em; }
.svc-list { display: grid; gap: 6px; }
.svc-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 8px; background: var(--panel, rgba(127,127,127,.08)); }
.svc-main { min-width: 0; display: grid; gap: 2px; }
.svc-main small { color: var(--unk); overflow-wrap: anywhere; }
.svc-links { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.svc-link { color: var(--link); }
.svc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--unk); display: inline-block; }
.svc-dot.up { background: var(--up); }
.svc-dot.warn { background: var(--warn); }
.svc-dot.down { background: var(--down); }
.svc-dot.maint { background: #5b8fd9; }
.svc-r2 { grid-template-columns: 14px minmax(0, 1fr); }
.svc-r2 .svc-links { grid-column: 2; justify-content: flex-start; align-items: center; gap: 8px 14px; }
.svc-srcs { display: grid; gap: 3px; margin-top: 4px; }
.svc-src { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.svc-src .svc-dot { width: 9px; height: 9px; }
.svc-find { display: grid; gap: 6px; }
.svc-add { margin-top: 18px; display: grid; gap: 8px; }
.svc-addrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.svc-addrow input, .svc-addrow select { min-width: 0; max-width: 100%; }
@media (max-width: 600px) {
  .svc-row { grid-template-columns: 14px minmax(0, 1fr); }
  .svc-links { grid-column: 2; justify-content: flex-start; }
}

/* Services Status: the Section box on each row */
.svc-sect { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; }
.svc-sect select { min-height: 32px; }

/* Reminders: their own window and the Overview box (never red: a calm blue-grey badge) */
.rembadge { background: var(--chip, #e6ecf3); color: var(--ink, #1f2a37); }
.alert.reminder { border-left: 4px solid #6b8fb3; }
.remrow { margin: 4px 0; line-height: 1.5; }
.rembox .pacts { margin-top: 6px; }

.remthread { margin: 4px 0; } .remthread textarea { width: 100%; box-sizing: border-box; } .remreply { margin: 4px 0 4px 8px; padding-left: 8px; border-left: 2px solid var(--line, #8884); }

.sopts-item[disabled] { opacity: .45; cursor: not-allowed; }

/* Site Visit Required: the first section, a strong focal point */
:root { --visit: #c2185b; }
html[data-theme="dark"] { --visit: #ff6fa5; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --visit: #ff6fa5; } }
.wsec-visit .wsecdot { background: var(--visit); } .wsec-visit .wsechead { color: var(--visit); border-bottom-color: color-mix(in srgb, var(--visit) 50%, transparent); font-weight: 700; }
.wsec-visit .tile .tstatus .big, .wsec-visit .loclist .lstat, .wsec-visit .ctile .cstat { color: var(--visit) !important; }
.wsec-visit .tile, .wsec-visit .ctile { box-shadow: inset 5px 0 0 var(--visit) !important; border-color: color-mix(in srgb, var(--visit) 45%, var(--line)) !important; background: linear-gradient(180deg, color-mix(in srgb, var(--visit) 8%, transparent), transparent 50%), var(--panel) !important; }
.wsec-visit .loclist .lbar { background: var(--visit) !important; }
.s-visit { background: var(--visit); }
.visitline { color: var(--visit); }
/* Project items (Sales, Installation, QC, Termination, Finish): same look as Site Visit Required, in teal */
:root { --project: #00838f; }
html[data-theme="dark"] { --project: #4dd0e1; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --project: #4dd0e1; } }
.wsec-project .wsecdot { background: var(--project); } .wsec-project .wsechead { color: var(--project); border-bottom-color: color-mix(in srgb, var(--project) 50%, transparent); font-weight: 700; }
.wsec-project .tile .tstatus .big, .wsec-project .loclist .lstat, .wsec-project .ctile .cstat { color: var(--project) !important; }
.wsec-project .tile, .wsec-project .ctile { box-shadow: inset 5px 0 0 var(--project) !important; border-color: color-mix(in srgb, var(--project) 45%, var(--line)) !important; background: linear-gradient(180deg, color-mix(in srgb, var(--project) 8%, transparent), transparent 50%), var(--panel) !important; }
.wsec-project .loclist .lbar { background: var(--project) !important; }
.s-project { background: var(--project); }
.wsec-project .visitline { color: var(--project); }

.visitbox { border-left: 4px solid var(--visit); } .visitreport { white-space: pre-wrap; margin: 6px 0; padding: 8px 10px; background: color-mix(in srgb, var(--visit) 7%, transparent); border-radius: 6px; }

/* Site visit notes and earlier visits */
.vthread { margin-top: 8px; display: grid; gap: 6px; }
.remreply.vauto { opacity: .8; font-style: italic; }
.vhost { display: grid; gap: 8px; }
.vcard > summary { cursor: pointer; }
.vpast > summary { margin: 4px 0; }
.vthread textarea { width: 100%; box-sizing: border-box; }

/* Email signature editor */
.sigbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0; }
.sigbar select, .sigbar input[type=color] { height: 30px; }
.sigbtn { padding: 2px 8px; min-width: 32px; }
.sigpaper { background: #fff; color: #000; border: 1px solid var(--line, #8886); border-radius: 6px; padding: 10px; }
.sigedit { min-height: 110px; outline: none; font-family: Arial, sans-serif; font-size: 14px; }
.sigsrc { width: 100%; box-sizing: border-box; font-family: monospace; }

/* Calendar */
.cal-wrap { display: grid; gap: 10px; }
.calbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .calbar h3 { margin: 0 6px; } .calspacer { flex: 1; }
.calfilters { display: flex; flex-wrap: wrap; gap: 6px; } .calfilters .chip[aria-pressed="true"] { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line, #8883); border: 1px solid var(--line, #8883); border-radius: 8px; overflow: hidden; }
.calhead { background: var(--panel, #0002); padding: 4px; font-size: 12px; text-align: center; opacity: .8; }
.calcell { background: var(--bg, #111); min-height: 92px; padding: 3px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; overflow: hidden; }
.calcell.other { opacity: .5; } .calcell.today .calnum { background: var(--accent, #3b82f6); color: #fff; border-radius: 999px; padding: 0 6px; } .calcell.sel { outline: 2px solid var(--accent, #3b82f6); outline-offset: -2px; }
.calnum { font-size: 12px; align-self: flex-start; }
.calchip { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); color: inherit; font: inherit; font-size: 11px; padding: 1px 4px; border-radius: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.calmore { font-size: 11px; opacity: .7; }
.calday { border: 1px solid var(--line, #8883); border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; }
.calagenda { display: grid; gap: 8px; }
.calrow { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .caltime { min-width: 72px; font-size: 12px; opacity: .8; }
.caldot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.calpanel { border: 1px solid var(--line, #8883); border-radius: 8px; padding: 10px; display: grid; gap: 8px; }
.calsrc { display: grid; gap: 4px; padding: 6px 0; border-top: 1px solid var(--line, #8882); }
.calpanel input[type=text] { width: 100%; box-sizing: border-box; }
.caldlg { max-width: 520px; } .caldlg label { display: block; margin: 6px 0; } .caldlg input[type=text], .caldlg textarea, .caldlg select { width: 100%; box-sizing: border-box; }
.caldl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0; } .caldl dt { opacity: .7; } .caldl dd { margin: 0; }
@media (max-width: 700px) { .calcell { min-height: 64px; } .calchip small { display: none; } }
.caldlg label.chk { display: flex; gap: 8px; align-items: center; } .caldlg label.chk input { width: auto; }

/* Not installed / Move to main list: a gap after the Notes button */
.nibtn { margin-left: 14px; margin-right: 10px; }
.vfocus { outline: 2px solid var(--visit); outline-offset: 3px; border-radius: 6px; }

/* DWService Screen / Files buttons and the computers list */
.dws-btns { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dws-sel { max-width: 150px; }
.dws-list { max-height: 360px; overflow: auto; border: 1px solid var(--line, #2b3d55); border-radius: 8px; margin: 6px 0; }
.dws-row { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; padding: 7px 10px; border-bottom: 1px solid var(--line, #2b3d55); flex-wrap: wrap; }
.dws-row.gone { opacity: .65; }
.dws-name small { display: block; opacity: .7; }
.dws-where { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dws-link { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dws-link input { width: 170px; }
.dws-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7d8896; margin-right: 5px; flex: none; }
.dws-dot.on { background: var(--up, #3ccf6e); box-shadow: 0 0 0 2px color-mix(in srgb, var(--up, #3ccf6e) 25%, transparent); }
.dws-dot.off { background: var(--down, #e5534b); }
.dws-dot.warn { background: var(--warn, #f2b443); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn, #f2b443) 25%, transparent); }
.dws-dot.muted { background: transparent; box-shadow: inset 0 0 0 1px #7d8896; }
.wodot.off { background: var(--down, #e5534b); box-shadow: 0 0 0 3px color-mix(in srgb, var(--down, #e5534b) 25%, transparent); }
.tech-comp { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
/* DWService Techs page: every computer is one row with the same columns, everything lined up on the left */
.tg { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.tg-person { border: 1px solid var(--line, #2b3d55); border-radius: 8px; padding: 8px 10px; text-align: left; }
.tg-head { font-weight: 600; margin-bottom: 4px; text-align: left; }
.tg-head small { font-weight: 400; opacity: .7; }
.tg-row { display: grid; grid-template-columns: 12px minmax(120px, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 3px 0; text-align: left; }
.tg-row .dws-dot { margin: 0; justify-self: center; }
.tg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-link { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; text-align: left; }
.tg-link input { width: 180px; }
@media (max-width: 560px) { .tg-row { grid-template-columns: 12px 1fr auto; } .tg-row .linkbtn { display: none; } }
/* Header Techs: one line per tech, click for DWService Screen / Files */
/* Layouts with the header across the top: Techs sit on their own line right under the logo, left to right on one line. */
header > #techsOn { order: 6; flex: 0 0 100%; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; margin: -4px 0 0; overflow-x: auto; }
header > #techsOn .tech-chip { flex: 0 0 auto; white-space: nowrap; }
html[data-layout="ops"] header > #techsOn { order: 1; flex: none; flex-direction: column; align-items: stretch; gap: 3px; margin: 0; overflow: visible; }
#techsOn .wolabel { text-align: left; }
.tech-chip { display: flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--row); border: 1px solid var(--line); color: inherit; font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; white-space: nowrap; }
.tech-chip:hover, .tech-chip:focus-visible { border-color: var(--accent, #6cb2ff); }
.tech-chip b { font-weight: 600; }
.tech-pop { position: fixed; z-index: 9000; background: var(--panel, #12263f); border: 1px solid var(--line, #2b3d55); border-radius: 10px; padding: 10px 12px; box-shadow: 0 8px 30px #0009; min-width: 300px; max-width: 92vw; }
.tg-name.editing { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; white-space: normal; overflow: visible; }
.tg-name.editing input { flex: 1 1 140px; min-width: 120px; }
.dws-ren { opacity: .6; font-size: 11.5px; } .tg-row:hover .dws-ren, .dws-row:hover .dws-ren { opacity: 1; }

/* The DWService window */

.dwst { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.dwst-row { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 13px; }
.dwst-row .dwst-name { flex: 1 1 120px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dwst-row small { color: var(--muted, #8a97a8); }
.dwst .dws-link { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dwst .dws-dot { margin: 0; }
.sys.dws { background: #1f6f8b; color: #fff; }

.dwsmark { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.dwsmark svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.dwsmark.sm svg { width: 20px; height: 20px; }
.dwsmark .dwsname { font-size: 11px; font-weight: 700; letter-spacing: .03em; color: #7dd3fc; }
.dwsmark.sm .dwsname { font-size: 10px; }

.ctile .dws-btns { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.ctile .dws-btns .btn { padding: 1px 8px; font-size: 11px; line-height: 1.5; min-height: 0; }
.ctile .dws-btns .dws-dot { width: 7px; height: 7px; }
.tile.small .dws-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tile.small .dws-btns { flex-basis: 100%; }
.tile.small .dwsquick { margin-top: 8px; } .tile.small .dwsquick .dws-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.ctile .cmarks { flex-wrap: wrap; }
.ctile .dws-btns { flex: 1 0 100%; margin-left: 0; flex-wrap: nowrap; gap: 4px; }
.ctile .dws-btns .btn { padding: 1px 6px; font-size: 10.5px; white-space: nowrap; flex: 1 1 auto; justify-content: center; }
.ctile .dws-btns .dws-dot { display: none; }
.ctile .dws-btns select { max-width: 100%; font-size: 10.5px; padding: 0 4px; flex: 1 0 100%; }
.ctile .dws-btns { flex-wrap: wrap; }

.ctile .dws-btns { flex-wrap: wrap; gap: 3px; }
.ctile .dws-btns .btn { flex: 1 1 0; min-width: 0; font-size: 10px; padding: 1px 3px; overflow: hidden; text-overflow: ellipsis; }

.ctile .dwscstat { flex-wrap: wrap; row-gap: 3px; }
.ctile .dwscstat .cstxt { flex: 0 1 auto; min-width: 0; }
.ctile .dwscstat .cdwlogo { margin-left: auto; display: inline-flex; align-items: center; }

.ctile .dwscstat { flex-direction: column; align-items: stretch; gap: 3px; }
.ctile .dwscstat .cvisit { display: flex; align-items: center; gap: 6px; }
.ctile .dwscstat .cmain { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ctile .dwscstat .cmain .cdwlogo, .ctile .dwscstat .cvisit .cdwlogo { margin-left: auto; }
.ctile .cmarks:empty { display: none; }
.ctile .cstat.dwscstat { width: 100%; align-self: stretch; text-align: left; }
.ctile .dwscstat .cvisit, .ctile .dwscstat .cmain { justify-content: flex-start; width: 100%; }
table.loclist.dwslist { table-layout: fixed; }
.dwslist td, .dwslist th { overflow: hidden; text-overflow: ellipsis; }
.dwslist td.lact { overflow: visible; }
.dwslist td .marks { display: flex; justify-content: flex-start; }
table.loclist.dwslist { min-width: 1186px; }

.showloc { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 600; }
html[data-layout="ops"] .showloc { white-space: normal; flex-wrap: wrap; justify-content: center; gap: 4px 6px; font-size: 12px; padding-left: 6px; padding-right: 6px; }
.showlocn { background: var(--link, #4aa3ff); color: #08111f; border-radius: 10px; padding: 0 7px; font-size: 12px; line-height: 18px; }
.showpop { position: fixed; z-index: 9000; min-width: 230px; background: var(--panel, #0f1c33); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); padding: 8px; }
.showpoph { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 2px 6px 6px; }
.showpopi { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.showpopi:hover { background: color-mix(in srgb, var(--link, #4aa3ff) 16%, transparent); }
#panel-dwall .wallwrap { overflow-x: auto; }
.monhelp { display: block; margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--warn, #f2b443) 14%, transparent); }
.monhelp code { user-select: all; word-break: break-all; }
.mdiag { margin: 8px 0; }
.mdiag pre { max-height: 220px; overflow: auto; background: rgba(0,0,0,.2); padding: 6px 8px; border-radius: 6px; }

/* Header icon buttons: the icon in a fixed box, so labels line up (Search, What changed, Capture, Fill Screen, Open monitors, Full Screen). */
header .bico { display: inline-block; width: 1.25em; text-align: center; margin-right: .2em; flex: none; }
html[data-layout="ops"] body > header .tools .bico { width: 1.15em; margin-right: .15em; }

/* Tech pop-up: the small DWService logo on top, then each computer with its Screen and Files buttons underneath */
.tech-pop { min-width: 200px; }
.tg-logo { margin: 0 0 6px; display: flex; justify-content: flex-start; }
.tech-pop .tg-row.tg-row2 { display: block; padding: 5px 0; }
.tg-pc { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tg-pc .dws-dot { margin: 0; flex: none; }
.tg-btns { display: flex; gap: 6px; }
.tg-btns .btn { flex: 1 1 0; min-width: 64px; justify-content: center; }

/* The DWService icon inside the Screen / Files buttons */
.btnicon { display: inline-flex; align-items: center; margin-right: 4px; vertical-align: middle; }
.btnicon svg, .btnicon img { width: 13px; height: 13px; filter: none; }
.ctile .dws-btns .btn .btnicon { margin-right: 2px; } .ctile .dws-btns .btn .btnicon svg, .ctile .dws-btns .btn .btnicon img { width: 10px; height: 10px; }

/* ==== layouts.css ==== */
/* ==========================================================================
   Layouts (2026.10.29-53): Menu -> Look -> Layout.
   Standard (the board as it was), Ops Console, Glass, Wallboard (TV), Paper.
   A layout only changes how things look and where the header sits. Every window,
   button, count, tab, menu item and feature stays exactly the same, so all the
   board's features work in every layout. Style and Theme still apply underneath:
   the layouts take their colors from the Theme (Paper has its own paper colors).
   Nothing is ever hidden with display:none here.
   ========================================================================== */

/* ---------------------------------------------------------------- Ops Console
   The window buttons, sound, Menu and clock move to a narrow bar on the left; the
   count lines become big number tiles; windows and tiles are flat and square with
   a colored left edge. */
html[data-layout="ops"] body { flex-direction: row; }
html[data-layout="ops"] body > header { flex-direction: column; flex-wrap: nowrap; align-items: stretch; width: 112px; flex: none;
  padding: 12px 8px; gap: 10px; border-bottom: 0; border-right: 1px solid var(--line); overflow-y: auto; }
html[data-layout="ops"] body > header > * { order: 0 !important; margin-left: 0 !important; }
html[data-layout="ops"] body > header .brand { flex-direction: column; align-items: center; gap: 6px; text-align: center; order: -2 !important; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
/* The HEDnorth logo always fits the bar: as wide as the bar allows, never taller than 44px. */
html[data-layout="ops"] body > header .brand img { width: auto; height: auto; max-width: 100%; max-height: 44px; object-fit: contain; margin: 0 auto; }
html[data-layout="ops"] body > header .brand .sep { display: none; }
html[data-layout="ops"] h1 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; white-space: normal; text-align: center; color: var(--muted); }
html[data-layout="ops"] body > header .clock { order: -1 !important; text-align: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
html[data-layout="ops"] body > header .clock .time { font-size: 16px; }
html[data-layout="ops"] body > header .clock .date { font-size: 10.5px; }
html[data-layout="ops"] body > header .tools { flex-direction: column; align-items: stretch; gap: 8px; }
html[data-layout="ops"] body > header .tools .label { text-align: left; padding-left: 2px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
html[data-layout="ops"] body > header .seg { flex-direction: column; border-radius: 4px; }
html[data-layout="ops"] body > header .seg button { text-align: left; font-size: 12px; padding: 7px 9px; line-height: 1.2; }
html[data-layout="ops"] body > header .seg button + button { border-left: 0; border-top: 1px solid var(--line); }
html[data-layout="ops"] body > header .seg button[aria-pressed="true"] { box-shadow: inset 3px 0 0 var(--link); }
html[data-layout="ops"] body > header .tools > .btn { width: 100%; font-size: 12px; white-space: normal; text-align: center; justify-content: center; }
/* Sound and Menu at the bottom of the bar, always the same size (the sound text may take two lines). */
html[data-layout="ops"] body > header > #soundHint { margin-top: auto !important; width: 100%; min-width: 0; height: 52px; padding: 0 6px; font-size: 11.5px;
  line-height: 1.25; white-space: normal; text-align: center; flex: none; }
html[data-layout="ops"] body > header > #alertBell { width: 100%; justify-content: center; white-space: normal; text-align: center; height: auto; min-height: 38px; padding: 4px 6px; font-size: 12px; flex: none; }
/* Chat sits right under ON NOW (team members signed in); the Capture button is the first one in the screen buttons (above Fill Screen). */
html[data-layout="ops"] body > header:has(> #chatBtn) > #whoOn { order: 1 !important; margin-top: auto !important; }
html[data-layout="ops"] body > header > #chatBtn { order: 2 !important; margin-top: 0 !important; width: 100%; height: 38px; justify-content: center; flex: none; box-sizing: border-box; }
html[data-layout="ops"] body > header > #alertBell { order: 3 !important; }
html[data-layout="ops"] body > header:has(> #chatBtn) > #soundHint { margin-top: 0 !important; order: 4 !important; }
html[data-layout="ops"] body > header > #menuBtn { order: 5 !important; }
html[data-layout="ops"] body > header .tools #capBtn { width: 100%; }
/* Search, What changed, Capture, Fill Screen, Open monitors, Full Screen: one column, the same width and left edge as Alerts / Reminders / Map / Links. */
html[data-layout="ops"] body > header .tools .showrow, html[data-layout="ops"] body > header .tools .hgroup { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
html[data-layout="ops"] body > header .tools .hgroup > .btn, html[data-layout="ops"] body > header .tools .hgroup > * > .btn,
html[data-layout="ops"] body > header .tools #capBtn { width: 100%; box-sizing: border-box; margin: 0; text-align: left; justify-content: flex-start; font-size: 11.5px; padding: 7px 6px; line-height: 1.2; white-space: normal; }
html[data-layout="ops"] body > header > #menuBtn { width: 100%; height: 38px; justify-content: center; flex: none; }
html[data-layout="ops"] .panel { border-radius: 2px !important; box-shadow: none !important; }
html[data-layout="ops"] .phead { padding: 8px 12px; }
html[data-layout="ops"] .ptitle h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
/* Count boxes: number on top, dot and label underneath, all left-aligned and the same
   height; a row that isn't full stretches its boxes, so there are never empty gaps. */
html[data-layout="ops"] .pstats { display: flex; flex-wrap: wrap; gap: 0; margin: 8px 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
html[data-layout="ops"] .pstats > span, html[data-layout="ops"] .pstats > .statbtn, html[data-layout="ops"] .pstats > .linkbtn {
  flex: 1 1 128px; min-height: 66px; margin: 0; padding: 8px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0;
  display: grid; grid-template-columns: auto 1fr; grid-auto-rows: min-content; align-content: start; align-items: center; column-gap: 6px; text-align: left;
  font-size: 10.5px; line-height: 1.25; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--panel); }
html[data-layout="ops"] .pstats b { order: -1; grid-column: 1 / -1; font-size: 24px; line-height: 1.15; letter-spacing: 0; color: var(--text); margin-bottom: 2px; }
html[data-layout="ops"] .pstats .dot { margin: 0; }
html[data-layout="ops"] .pstats > .statbtn[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--link); color: var(--link); }
html[data-layout="ops"] .pstats > .linkbtn { display: flex; align-items: center; justify-content: center; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--link); }
html[data-layout="ops"] .tile, html[data-layout="ops"] .ctile { border-radius: 2px !important; border: 1px solid var(--line) !important; }
html[data-layout="ops"] .tile.down, html[data-layout="ops"] .ctile.down { box-shadow: inset 3px 0 0 var(--down) !important; }
html[data-layout="ops"] .tile.warn, html[data-layout="ops"] .ctile.warn { box-shadow: inset 3px 0 0 var(--warn) !important; }
html[data-layout="ops"] .tile.ok, html[data-layout="ops"] .ctile.ok { box-shadow: inset 3px 0 0 var(--up) !important; }
html[data-layout="ops"] .tile.watch, html[data-layout="ops"] .ctile.watch { box-shadow: inset 3px 0 0 var(--watch) !important; }
html[data-layout="ops"] .tile.maint, html[data-layout="ops"] .ctile.maint { box-shadow: inset 3px 0 0 #7d93b2 !important; }html[data-layout="ops"] .wsec-work .tile, html[data-layout="ops"] .wsec-work .ctile, html[data-layout="ops"] .wsec-maint .tile, html[data-layout="ops"] .wsec-maint .ctile { box-shadow: inset 3px 0 0 var(--link) !important; }
html[data-layout="ops"] .wsechead { font-size: 11px !important; letter-spacing: .14em; text-transform: uppercase; }
html[data-layout="ops"] .tile .th h3, html[data-layout="ops"] .tile .th .tname { font-size: 14px; }
html[data-layout="ops"] .iptag, html[data-layout="ops"] .tstatus .for { font-family: ui-monospace, Consolas, monospace; }
html[data-layout="ops"] .btn, html[data-layout="ops"] .chip, html[data-layout="ops"] input, html[data-layout="ops"] select, html[data-layout="ops"] .seg { border-radius: 3px !important; }

/* ---------------------------------------------------------------- Glass
   Frosted, see-through windows floating over a soft colored background (from the
   Theme's colors), rounded everything, counts as rounded tags. */
html[data-layout="glass"] body { background:
  radial-gradient(1200px 760px at 12% 8%, color-mix(in srgb, var(--link) 55%, transparent) 0, transparent 60%),
  radial-gradient(1000px 760px at 92% 85%, color-mix(in srgb, var(--archive, #a77bf3) 50%, transparent) 0, transparent 58%),
  radial-gradient(800px 600px at 60% 40%, color-mix(in srgb, var(--lutron) 18%, transparent) 0, transparent 60%), var(--bg) !important;
  background-attachment: scroll !important; }
html[data-layout="glass"] body > header { margin: 12px 12px 0; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--text) 16%, transparent) !important;
  background: color-mix(in srgb, var(--panel) 45%, transparent) !important; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
html[data-layout="glass"] .seg { border-radius: 999px !important; border-color: transparent !important; background: color-mix(in srgb, var(--text) 7%, transparent) !important; gap: 4px; padding: 3px; }
html[data-layout="glass"] .seg button { border-radius: 999px; border-left: 0 !important; }
html[data-layout="glass"] .seg button[aria-pressed="true"] { background: var(--text) !important; color: var(--bg) !important; font-weight: 600; }
html[data-layout="glass"] main.free, html[data-layout="glass"] main { background: transparent !important; }
html[data-layout="glass"] .panel { background: color-mix(in srgb, var(--panel) 42%, transparent) !important; 
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent) !important; border-radius: 22px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.22) !important; }
html[data-layout="glass"] .panel.unifi, html[data-layout="glass"] .panel.ovrc, html[data-layout="glass"] .panel.lutron,
html[data-layout="glass"] .panel.crestron, html[data-layout="glass"] .panel.contract, html[data-layout="glass"] .panel.watchp, html[data-layout="glass"] #panel-sites { border-top-width: 3px !important; }
html[data-layout="glass"] .phead { border-bottom-color: color-mix(in srgb, var(--text) 10%, transparent) !important; }
html[data-layout="glass"] .ptitle h2 { font-size: 19px; }
html[data-layout="glass"] .pstats > span, html[data-layout="glass"] .pstats > .statbtn { background: color-mix(in srgb, var(--text) 8%, transparent);
  padding: 6px 12px; border-radius: 14px; }
html[data-layout="glass"] .tile, html[data-layout="glass"] .ctile { background: color-mix(in srgb, var(--text) 7%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent) !important; border-radius: 18px !important; box-shadow: none !important; }
html[data-layout="glass"] .tile.big { background: color-mix(in srgb, var(--panel) 80%, transparent) !important; backdrop-filter: blur(24px); }
html[data-layout="glass"] .loclist tr, html[data-layout="glass"] .site, html[data-layout="glass"] .alert, html[data-layout="glass"] .member,
html[data-layout="glass"] .lutronalerts, html[data-layout="glass"] .filters { background: color-mix(in srgb, var(--text) 6%, transparent) !important; border-radius: 14px; }
html[data-layout="glass"] .btn, html[data-layout="glass"] .chip, html[data-layout="glass"] input, html[data-layout="glass"] select,
html[data-layout="glass"] #soundHint, html[data-layout="glass"] #menuBtn { border-radius: 999px !important; }
html[data-layout="glass"] input[type=search], html[data-layout="glass"] input:not([type]) { background: color-mix(in srgb, var(--text) 7%, transparent) !important; }
html[data-layout="glass"] .menu, html[data-layout="glass"] .dialog { backdrop-filter: blur(24px); border-radius: 22px; }

/* ---------------------------------------------------------------- Wallboard (TV)
   Read from across the room: black background, huge clock and numbers, and every
   location tile filled with its status color. */
html[data-layout="wall"] { --tvbg: #000; }
html[data-layout="wall"] body { background: var(--tvbg) !important; color: #fff; font-size: 16px; }
html[data-layout="wall"] body > header { background: var(--tvbg) !important; border-bottom: 2px solid #222 !important; padding: 12px 24px; }
html[data-layout="wall"] h1 { font-size: 22px; letter-spacing: .08em; text-transform: uppercase; }
html[data-layout="wall"] body > header .clock .time { font-size: 40px; font-weight: 300; letter-spacing: .02em; }
html[data-layout="wall"] body > header .clock .date { font-size: 14px; }
html[data-layout="wall"] main, html[data-layout="wall"] main.free { background: var(--tvbg) !important; }
html[data-layout="wall"] .panel { background: #0a0a0a !important; border: 2px solid #222 !important; border-radius: 4px !important; box-shadow: none !important; }
html[data-layout="wall"] .ptitle h2 { font-size: 20px; letter-spacing: .06em; text-transform: uppercase; }
html[data-layout="wall"] .pstats { gap: 6px 26px; }
html[data-layout="wall"] .pstats b { font-size: 44px; font-weight: 800; line-height: 1; }
html[data-layout="wall"] .pstats > span, html[data-layout="wall"] .pstats > .statbtn { font-size: 14px; text-transform: uppercase; letter-spacing: .1em; color: #9a9a9a; align-items: baseline; }
html[data-layout="wall"] .pstats .dot { width: 14px; height: 14px; }
html[data-layout="wall"] .wsechead { font-size: 15px !important; letter-spacing: .12em; text-transform: uppercase; }
/* Tiles filled with their status color, white writing. */
html[data-layout="wall"] .tile, html[data-layout="wall"] .ctile { border: 0 !important; border-radius: 4px !important; box-shadow: none !important; color: #fff !important; }
html[data-layout="wall"] .tile.down, html[data-layout="wall"] .ctile.down { background: #b8211d !important; }
html[data-layout="wall"] .tile.warn, html[data-layout="wall"] .ctile.warn { background: #8f6200 !important; }
html[data-layout="wall"] .tile.watch, html[data-layout="wall"] .ctile.watch { background: #ad4f14 !important; }html[data-layout="wall"] .tile.maint, html[data-layout="wall"] .ctile.maint, html[data-layout="wall"] .wsec-work .tile, html[data-layout="wall"] .wsec-work .ctile, html[data-layout="wall"] .wsec-maint .tile, html[data-layout="wall"] .wsec-maint .ctile { background: #244aa6 !important; }
html[data-layout="wall"] .tile.ok, html[data-layout="wall"] .ctile.ok { background: #0f3d25 !important; }
html[data-layout="wall"] .tile.unmon, html[data-layout="wall"] .ctile.unmon { background: #2a2f36 !important; }
html[data-layout="wall"] .tile.unmon.archive, html[data-layout="wall"] .ctile.unmon.archive { background: #43307a !important; }
html[data-layout="wall"] .tile .th { border-bottom-color: rgba(255,255,255,.18) !important; background: transparent !important; }
html[data-layout="wall"] .tile .th *, html[data-layout="wall"] .tile .tstatus .big, html[data-layout="wall"] .ctile .cstat { color: #fff !important; }
html[data-layout="wall"] .tile .tstatus .big { font-size: 22px; }
html[data-layout="wall"] .tile .sdot { background: #fff !important; }
html[data-layout="wall"] .tile .tbody, html[data-layout="wall"] .tile .ttabs { background: rgba(0,0,0,.28); }
html[data-layout="wall"] .tile .ttabs button { color: rgba(255,255,255,.75); } html[data-layout="wall"] .tile .ttabs button[aria-selected="true"] { color: #fff; border-bottom-color: #fff; }
html[data-layout="wall"] .tile a, html[data-layout="wall"] .tile .linkbtn { color: #cfe0ff; }
html[data-layout="wall"] .tile .btn { border-color: rgba(255,255,255,.5) !important; color: #fff !important; background: rgba(0,0,0,.2) !important; }
html[data-layout="wall"] .tile .muted, html[data-layout="wall"] .tile .hint, html[data-layout="wall"] .tile .for, html[data-layout="wall"] .ctile small { color: rgba(255,255,255,.75) !important; }
html[data-layout="wall"] .alert { font-size: 16px; }
html[data-layout="wall"] .loclist { font-size: 16px; }

/* ---------------------------------------------------------------- Paper
   Calm and printed: cream paper, serif headings, no boxes, locations as ruled rows
   in columns. Paper uses its own paper colors whatever the Theme. */
html[data-layout="paper"][data-theme="daylight"]:not([data-palette])[data-style] { --bg: #f6f3ec; --panel: #f6f3ec; --row: #fbf9f4; --line: #d8d0bf; --text: #1d1b17; --muted: #6b665c;
  --up: #1f7a4a; --down: #b3261e; --warn: #8a6100; --unk: #8a8478; --link: #2852b8; --watch: #b1531a; --archive: #6a3fc0; color-scheme: light; }
html[data-layout="paper"] body { background: var(--bg) !important; color: var(--text); }
html[data-layout="paper"] h1, html[data-layout="paper"] h2, html[data-layout="paper"] h3, html[data-layout="paper"] .tile .th,
html[data-layout="paper"] .ctile .cname, html[data-layout="paper"] .tstatus .big, html[data-layout="paper"] .alert .amsg { font-family: Georgia, "Times New Roman", serif !important; letter-spacing: 0 !important; text-transform: none !important; }
html[data-layout="paper"] body > header { background: var(--bg) !important; border-bottom: 2px solid var(--text) !important; box-shadow: none !important; padding: 14px 28px 8px; }
html[data-layout="paper"] h1 { font-size: 28px; font-style: italic; font-weight: 700; }
html[data-layout="paper"][data-theme="daylight"] body > header .brand img { filter: brightness(0); opacity: .85; }
html[data-layout="paper"] .seg { border: 0 !important; background: none !important; gap: 14px; }
html[data-layout="paper"] .seg button { border: 0 !important; background: none !important; box-shadow: none !important; padding: 2px 0; font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent !important; border-radius: 0 !important; }
html[data-layout="paper"] .seg button[aria-pressed="true"] { color: var(--text) !important; border-bottom-color: var(--text) !important; }
html[data-layout="paper"] main, html[data-layout="paper"] main.free { background: var(--bg) !important; }
html[data-layout="paper"] .panel { background: var(--bg) !important; border: 0 !important; border-top: 2px solid var(--text) !important; border-radius: 0 !important; box-shadow: none !important; }
html[data-layout="paper"] .panel.unifi, html[data-layout="paper"] .panel.ovrc, html[data-layout="paper"] .panel.lutron, html[data-layout="paper"] .panel.crestron, html[data-layout="paper"] .panel.contract { border-top-width: 2px !important; }
html[data-layout="paper"] .phead { border-bottom: 1px solid var(--line) !important; padding-left: 2px; padding-right: 2px; }
html[data-layout="paper"] .ptitle h2 { font-size: 22px; }
html[data-layout="paper"] .wsechead { font-size: 11px !important; letter-spacing: .16em !important; text-transform: uppercase !important; color: var(--muted) !important;
  border-bottom-color: var(--line) !important; font-family: system-ui, sans-serif !important; }
html[data-layout="paper"] .wsecdot { display: inline-block; width: 7px; height: 7px; }
/* Tiles become ruled rows: no box, a thin line under each, status in its color. */
html[data-layout="paper"] .tile, html[data-layout="paper"] .ctile { background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important; box-shadow: none !important; }
html[data-layout="paper"] .tile .th { background: transparent !important; border-bottom: 0 !important; padding-left: 2px; }
html[data-layout="paper"] .tile .th .tname, html[data-layout="paper"] .tile .th h3 { font-size: 18px; font-weight: 400; }
html[data-layout="paper"] .tile .tstatus .big { font-size: 15px; font-weight: 700; }
html[data-layout="paper"] .tile .ttabs { border-bottom-color: var(--line); }
html[data-layout="paper"] .tile.big { background: var(--row) !important; border: 1px solid var(--text) !important; }
html[data-layout="paper"] .alert, html[data-layout="paper"] .site, html[data-layout="paper"] .member, html[data-layout="paper"] .lutronalerts,
html[data-layout="paper"] .filters, html[data-layout="paper"] .menu, html[data-layout="paper"] .dialog { background: var(--row) !important; border-color: var(--line) !important; box-shadow: none !important; }
html[data-layout="paper"] .alert { border-radius: 0 !important; border-left-width: 3px !important; }
html[data-layout="paper"] .btn, html[data-layout="paper"] .chip, html[data-layout="paper"] input, html[data-layout="paper"] select,
html[data-layout="paper"] #soundHint, html[data-layout="paper"] #menuBtn { border-radius: 2px !important; background: var(--row) !important; border-color: var(--line) !important; color: var(--text) !important; }
html[data-layout="paper"] #soundHint[data-state="on"] { color: var(--up) !important; } html[data-layout="paper"] #soundHint[data-state="off"], html[data-layout="paper"] #soundHint[data-state="timed"] { color: var(--down) !important; }
html[data-layout="paper"] .pstats b { font-family: Georgia, "Times New Roman", serif; font-size: 22px; }
html[data-layout="paper"] .pstats > span:first-child b, html[data-layout="paper"] .pstats > .statbtn:first-child b { color: var(--down); }

/* Ops Console: "On now" people stacked in the left bar */
html[data-layout="ops"] body > header > #whoOn { flex-direction: column; align-items: stretch; gap: 4px; }
html[data-layout="ops"] body > header > #whoOn .whoperson { border-radius: 4px; padding: 3px 6px; flex-wrap: wrap; row-gap: 0; }
html[data-layout="ops"] body > header > #whoOn .wolabel { text-align: center; font-size: 10.5px; }
html[data-layout="paper"] .whoperson { background: var(--row) !important; border-color: var(--line) !important; }


/* ---------- Window outlines (Menu -> Board Settings -> Look -> Window outlines) ----------
   The line around every main window, in every layout, style and theme, so you can see where
   each window is when you move or resize it. Clear (default) and Bold; Soft keeps the old line.
   A window keeps its system's colored top edge. The one you point at lights up. */
html[data-edges="clear"] main .panel, html:is([data-edges="bold"], [data-edges="glass"]) main .panel {
  border-style: solid !important;
  border-left-width: var(--ow) !important; border-right-width: var(--ow) !important; border-bottom-width: var(--ow) !important;
  border-left-color: var(--oc) !important; border-right-color: var(--oc) !important; border-bottom-color: var(--oc) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bg, #000) 70%, transparent), 0 6px 18px rgba(0, 0, 0, .28) !important;
}
html[data-edges="clear"] { --ow: 1px; --oc: color-mix(in srgb, var(--text, #888) 45%, transparent); --oh: color-mix(in srgb, var(--text, #888) 60%, transparent); }
/* Bold = the Soft line made thick: same kind of line, 3px, a little stronger. Glass = a shiny edge: a thin bright line with a light sheen along the top and left, like the edge of a glass pane. */
html[data-edges="bold"] { --ow: 3px; --oc: color-mix(in srgb, var(--line, #888) 62%, var(--text, #888) 38%); --oh: color-mix(in srgb, var(--line, #888) 20%, var(--text, #888) 80%); }
html[data-edges="glass"] { --ow: 2px; --oc: color-mix(in srgb, var(--text, #888) 34%, transparent); --oh: color-mix(in srgb, var(--link, #6aa) 80%, white); }
html[data-edges="glass"] main .panel {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 2px 0 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(255, 255, 255, .16), inset -1px 0 0 rgba(255, 255, 255, .12),
    0 0 0 1px rgba(255, 255, 255, .22), 0 8px 26px rgba(0, 0, 0, .28), 0 0 18px color-mix(in srgb, var(--link, #6aa) 22%, transparent) !important;
}
/* Windows without a system color: the top edge matches the others. */
html[data-edges="clear"] main .panel:not(.unifi):not(.ovrc):not(.lutron):not(.crestron):not(.contract):not(.watchp):not(#panel-sites),
html:is([data-edges="bold"], [data-edges="glass"]) main .panel:not(.unifi):not(.ovrc):not(.lutron):not(.crestron):not(.contract):not(.watchp):not(#panel-sites) {
  border-top-style: solid !important; border-top-width: var(--ow) !important; border-top-color: var(--oc) !important;
}
/* The window under the pointer, and the one being moved, light up. */
html[data-edges="clear"] main.free .panel:hover, html:is([data-edges="bold"], [data-edges="glass"]) main.free .panel:hover,
html[data-edges] main.free .panel.dragging {
  border-left-color: var(--oh, var(--link)) !important; border-right-color: var(--oh, var(--link)) !important; border-bottom-color: var(--oh, var(--link)) !important;
}
html[data-edges] main.free .panel.dragging { box-shadow: 0 0 0 2px var(--link), 0 12px 30px rgba(0, 0, 0, .45) !important; }
/* The title bar (where you grab a window): a clear divider under it, and a visible grip. */
html[data-edges="clear"] main .panel .phead, html:is([data-edges="bold"], [data-edges="glass"]) main .panel .phead { border-bottom: 1px solid var(--oc) !important; }
html[data-edges="clear"] main.free .ptitle .grip, html:is([data-edges="bold"], [data-edges="glass"]) main.free .ptitle .grip { color: var(--text) !important; opacity: .7; }

/* ---------------------------------------------------------------- Header size (Menu -> Look)
   Size scales the whole header; Width is the Ops Console bar; Height adds room to a top header. */
body > header { zoom: var(--hdr-zoom, 1); }
html[data-layout="ops"] body > header { width: var(--hdr-w, 112px); }
html[data-hdrh]:not([data-layout="ops"]) body > header { padding-top: calc(10px + var(--hdr-h)) !important; padding-bottom: calc(10px + var(--hdr-h)) !important; }

/* The drag handle on the header's edge */
#hdrGrip { position: fixed; z-index: 60; background: transparent; touch-action: none; }
#hdrGrip.h { cursor: row-resize; } #hdrGrip.v { cursor: col-resize; }
#hdrGrip:hover, #hdrGrip.on, #hdrGrip:focus-visible { background: color-mix(in srgb, var(--link, #5b8def) 45%, transparent); outline: 0; }

/* ---------------------------------------------------------------- Auto-hide header (button beside Close All Monitors)
   The header leaves the page flow and slides off the top (or the left in Ops Console and Professional); the edge strip brings it back. */
#hdrEdge { display: none; position: fixed; z-index: 2499; background: transparent; }
html[data-hdrauto] #hdrEdge { display: block; }
#hdrEdge[data-side="top"] { left: 0; right: 0; top: 0; height: 7px; } #hdrEdge[data-side="left"] { left: 0; top: 0; bottom: 0; width: 7px; }
html[data-hdrauto] body > header { position: fixed !important; z-index: 2500 !important; pointer-events: auto; transition: transform .18s ease, box-shadow .18s ease; }
html[data-hdrauto]:not([data-layout="ops"]):not([data-layout="pro"]) body > header { top: 0; left: 0; right: 0; width: auto; margin: 0 !important; transform: translateY(-101%); }
html:is([data-layout="ops"], [data-layout="pro"])[data-hdrauto] body > header { top: 0; left: 0; bottom: 0; height: 100vh !important; transform: translateX(-101%); }
html[data-hdrauto] body > header.peek { transform: none !important; box-shadow: 0 8px 30px rgba(0, 0, 0, .45); }
html[data-hdrauto] #hdrGrip { display: none !important; }
html[data-hdrauto] body > header { background-color: var(--hdr-solid, var(--bg)) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; opacity: 1 !important; }

/* The Menu button (with Chat) stays at the bottom of the side header in the Board and in the CRM alike. "On now" is gone, so Chat takes its place as the start of the bottom group. */
html[data-layout="ops"] body > header:has(> #whoOn[hidden]) > #chatBtn { margin-top: auto !important; }
html[data-layout="ops"] body > header:not(:has(> #chatBtn:not([hidden]))) > #menuBtn { margin-top: auto !important; }

/* CRM header = Board header: Menu and the clock stay on the right (top layouts) and at the bottom (Ops) in every layout; the Time Clock button always shows in full. */
html:not([data-layout="ops"]):not([data-layout="pro"]) body.inProjects > header > #menuBtn { margin-left: auto !important; order: 4; }
html:not([data-layout="ops"]):not([data-layout="pro"]) body.inProjects > header > .clock { order: 5; }
html[data-layout="ops"] body.inProjects > header > #clockBtn { width: 100%; max-width: none; box-sizing: border-box; white-space: normal; text-align: center; line-height: 1.2; padding: 6px 4px; font-size: 12px; }

/* Professional layout (header on the left): same as Ops, Menu at the bottom in the Board and the CRM. */
html[data-layout="pro"] body > header:has(> #whoOn[hidden]) > #chatBtn { margin-top: auto !important; }
html[data-layout="pro"] body > header:not(:has(> #chatBtn:not([hidden]))) > #menuBtn { margin-top: auto !important; }

/* ==== simplified.css ==== */
/* ==========================================================================
   Layout "Simplified" (Menu -> Look -> Layout). A basic, open, easy version of the board for people new to the
   field. Same board, same data: it only hides the Pro tools (marked .pro-only by simplified.js, plus the
   header buttons below) and uses bigger text and more room. The header button "Advanced tools" brings every
   Pro tool back. Basic view (html[data-basic]) now works in every layout except Professional; only Simplified starts in it.
   ========================================================================== */
html[data-layout="simple"] body { font-size: 16px; }
html[data-layout="simple"] { --simple-gap: 18px; }

/* ---- Header: every window can still be opened (Show Locations, Problems, Reminders, Map, Links); only the screen tools are tucked away ---- */
html[data-basic] #changesBtn,
html[data-basic] #fillScreen,
html[data-basic] #openMonitors,
html[data-basic] #fullScreen { display: none !important; }
html[data-layout="simple"] body > header { padding: 14px 24px; gap: 14px; border-bottom: 1px solid var(--line); box-shadow: none; }
html[data-layout="simple"] h1 { font-size: 22px; }
html[data-layout="simple"] .btn, html[data-layout="simple"] .seg button, html[data-layout="simple"] .menubtn { font-size: 15px; padding: 9px 16px; }
#proToggle { display: none; }
html #proToggle { display: inline-flex; }
html[data-layout="simple"] #proToggle { font-size: 14px; padding: 8px 14px; }
html[data-layout="simple"]:not([data-basic]) #proToggle { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- Windows: open, calm, one soft line ---- */
html[data-layout="simple"] .panel { border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 2px 14px var(--shadow); background: var(--panel); }
html[data-layout="simple"] .panel .phead { padding: 18px 22px 10px; }
html[data-layout="simple"] .panel h2 { font-size: 22px; }
html[data-layout="simple"] .panel .grip, html[data-layout="simple"] .panel .monbtn { display: none; }
html[data-basic] .panel [id^="locfbtn"],
html[data-basic] .panel .sysall,
html[data-basic] .panel #addClientBtn,
html[data-basic] .panel .watchchk,
html[data-basic] .panel label:has(input[type="checkbox"]),
html[data-basic] .panel #wallSort,
html[data-basic] .panel .controls .seg:has(button:is([aria-label],[data-view])),
html[data-basic] .panel .viewseg { display: none !important; }
html[data-layout="simple"] .statbtn { font-size: 17px; }
html[data-layout="simple"] .wall, html[data-layout="simple"] .wgrid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--simple-gap); }

/* ---- Tiles: a big status word and the name, nothing else until you open it ---- */
html[data-layout="simple"] .tile { border-radius: 14px; border: 1px solid var(--line); box-shadow: none; padding: 4px; }
html[data-layout="simple"] .tile .thead, html[data-layout="simple"] .tile h3 { font-size: 19px; }
html[data-basic] .tile .pencil,
html[data-basic] .tile .sopts,
html[data-basic] .tile .lbadge,
html[data-basic] .tile .tabs button.pro-only { display: none !important; }
html[data-layout="simple"] .tile .headline, html[data-layout="simple"] .tile .afirst { font-size: 18px; }

/* ---- Things marked Pro-only by simplified.js (tabs, mute buttons, per-vendor reminders, speed tests...) ---- */
html[data-basic] .pro-only { display: none !important; }

/* ---- Open location window: bigger text, roomier ---- */
html[data-layout="simple"] #tileOverlay .tile.big { font-size: 16.5px; border-radius: 18px; }
html[data-layout="simple"] #tileOverlay .tabs button { font-size: 16px; padding: 12px 18px; }
html[data-layout="simple"] .alert, html[data-layout="simple"] .guide { font-size: 16px; line-height: 1.5; }
html[data-layout="simple"] .guide ol li { margin: 10px 0; }

/* ---- Flow: windows sit in one tidy column (Problems first) and never overlap, whatever positions the Pro layouts saved.
   Nothing is changed in the saved positions: pick another layout and every window is back where it was. ---- */
html[data-layout="simple"] main.free { display: flex; flex-direction: column; align-items: stretch; gap: 22px; padding: 22px 24px; max-width: 1280px; margin: 0 auto; width: 100%; box-sizing: border-box; }
html[data-layout="simple"] main.free .panel { position: static !important; left: auto !important; top: auto !important; width: auto !important; height: auto !important;
  max-height: none !important; flex: none !important; resize: none !important; z-index: auto !important; overflow: visible; }
html[data-layout="simple"] main.free #panel-alerts { order: -1; }
html[data-layout="simple"] main.free #panel-alerts .list { max-height: 40vh; overflow: auto; }
html[data-layout="simple"] main.free .panel .list.wallwrap { max-height: none !important; overflow: visible !important; flex: none !important; }
html[data-layout="simple"] .panel [class*="resize"], html[data-layout="simple"] .panel .rz { display: none; }

/* ==== polish.css ==== */
/* ==========================================================================
   Polish for the Pro layouts (Standard, Ops Console, Glass, Wallboard, Paper) and Simplified: the same finishing the
   Professional layout has (real icons instead of emoji, one button / focus / table / pop-up style, smooth hover) but
   using each layout's own colors and shapes, so every layout keeps its own look. Professional has its own file.
   ========================================================================== */
html {
  --i-loc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M21%2010c0%207-9%2013-9%2013S3%2017%203%2010a9%209%200%200%201%2018%200z%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2710%27%20r%3D%273%27%2F%3E%3C/svg%3E");
  --i-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M18%208a6%206%200%200%200-12%200c0%207-3%209-3%209h18s-3-2-3-9%27%2F%3E%3Cpath%20d%3D%27M13.7%2021a2%202%200%200%201-3.4%200%27%2F%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%2710%27%2F%3E%3Cpath%20d%3D%27M12%206v6l4%202%27%2F%3E%3C/svg%3E");
  --i-map: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M1%206v16l7-4%208%204%207-4V2l-7%204-8-4z%27%2F%3E%3Cpath%20d%3D%27M8%202v16M16%206v16%27%2F%3E%3C/svg%3E");
  --i-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M10%2013a5%205%200%200%200%207%200l3-3a5%205%200%200%200-7-7l-1%201%27%2F%3E%3Cpath%20d%3D%27M14%2011a5%205%200%200%200-7%200l-3%203a5%205%200%200%200%207%207l1-1%27%2F%3E%3C/svg%3E");
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle%20cx%3D%2711%27%20cy%3D%2711%27%20r%3D%278%27%2F%3E%3Cpath%20d%3D%27M21%2021l-4.3-4.3%27%2F%3E%3C/svg%3E");
  --i-hist: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M3%2012a9%209%200%201%200%203-6.7L3%208%27%2F%3E%3Cpath%20d%3D%27M3%203v5h5M12%207v5l3%202%27%2F%3E%3C/svg%3E");
  --i-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect%20x%3D%273%27%20y%3D%273%27%20width%3D%277%27%20height%3D%277%27%2F%3E%3Crect%20x%3D%2714%27%20y%3D%273%27%20width%3D%277%27%20height%3D%277%27%2F%3E%3Crect%20x%3D%2714%27%20y%3D%2714%27%20width%3D%277%27%20height%3D%277%27%2F%3E%3Crect%20x%3D%273%27%20y%3D%2714%27%20width%3D%277%27%20height%3D%277%27%2F%3E%3C/svg%3E");
  --i-expand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M8%203H5a2%202%200%200%200-2%202v3m18%200V5a2%202%200%200%200-2-2h-3m0%2018h3a2%202%200%200%200%202-2v-3M3%2016v3a2%202%200%200%200%202%202h3%27%2F%3E%3C/svg%3E");
  --i-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M3%2012h18M3%206h18M3%2018h18%27%2F%3E%3C/svg%3E");
  --i-mon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect%20x%3D%272%27%20y%3D%273%27%20width%3D%2720%27%20height%3D%2714%27%20rx%3D%272%27%2F%3E%3Cpath%20d%3D%27M8%2021h8M12%2017v4%27%2F%3E%3C/svg%3E");
  --i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M21%2015a2%202%200%200%201-2%202H7l-4%204V5a2%202%200%200%201%202-2h14a2%202%200%200%201%202%202z%27%2F%3E%3C/svg%3E");
  --i-sound: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M11%205L6%209H2v6h4l5%204z%27%2F%3E%3Cpath%20d%3D%27M15.5%208.5a5%205%200%200%201%200%207%27%2F%3E%3C/svg%3E");
}
/* Real icons instead of emoji in the header buttons */
html:not([data-layout="pro"]) .bico { display: inline-block; width: 16px; height: 16px; font-size: 0; vertical-align: -3px; margin-right: 4px; flex: none;
  background: currentColor; -webkit-mask: var(--ico, none) center / contain no-repeat; mask: var(--ico, none) center / contain no-repeat; }
#searchBtn .bico { --ico: var(--i-search); } #changesBtn .bico { --ico: var(--i-hist); } #fillScreen .bico { --ico: var(--i-grid); }
#openMonitors .bico { --ico: var(--i-mon); } #fullScreen .bico { --ico: var(--i-expand); }
/* One focus ring, smooth hover, rounded controls */
html:not([data-layout="pro"]) :is(button, a, select, input, summary):focus-visible { outline: 2px solid var(--accent, var(--link, #4c8dff)); outline-offset: 2px; }
html:not([data-layout="pro"]):not([data-layout="wall"]) .btn { transition: background-color .12s, border-color .12s, box-shadow .12s; }
html:not([data-layout="pro"]):not([data-layout="paper"]) .tile { transition: box-shadow .15s, border-color .15s; }
/* Tables: small quiet headings and even spacing in every layout (colors stay the layout's own) */
html:not([data-layout="pro"]) th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 650; color: var(--muted); padding-top: 9px; padding-bottom: 9px; }
html:not([data-layout="pro"]) td { padding-top: 9px; padding-bottom: 9px; }
/* Status pills and system tags: same rounded shape everywhere */
html:not([data-layout="pro"]):not([data-layout="paper"]) .lbadge { border-radius: 999px; padding: 2px 9px; }
/* Pop-ups: soft dimmed, blurred background and one shadow */
html:not([data-layout="pro"]) #tileOverlay { backdrop-filter: blur(2px); }
html:not([data-layout="pro"]) .dialog h2, html:not([data-layout="pro"]) .dialog h3 { letter-spacing: -.01em; }
/* Slim scrollbars that follow the theme */
html:not([data-layout="pro"]) ::-webkit-scrollbar { width: 10px; height: 10px; }
html:not([data-layout="pro"]) ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted, #888) 45%, transparent); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
/* Basic view button, in every layout but Professional */
html:not([data-layout="pro"]) #proToggle { white-space: nowrap; }
html[data-layout="ops"] #proToggle { width: 100%; white-space: normal; text-align: center; justify-content: center; font-size: 12px; }

/* ==== professional.css ==== */
/* ==========================================================================
   Layout "Professional" (Menu -> Look -> Layout). The same board in a polished application look: a left sidebar with
   icons, one type scale and spacing scale, soft white cards, calm colors and clear status pills. Every window, button
   and feature is the same as in the other layouts: this file only changes how things look and where the header sits.
   It always uses the light Daylight colors. Nothing is hidden here.
   ========================================================================== */
html[data-layout="pro"] {
  --i-loc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M21%2010c0%207-9%2013-9%2013S3%2017%203%2010a9%209%200%200%201%2018%200z%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2710%27%20r%3D%273%27%2F%3E%3C/svg%3E");
  --i-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M18%208a6%206%200%200%200-12%200c0%207-3%209-3%209h18s-3-2-3-9%27%2F%3E%3Cpath%20d%3D%27M13.7%2021a2%202%200%200%201-3.4%200%27%2F%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%2710%27%2F%3E%3Cpath%20d%3D%27M12%206v6l4%202%27%2F%3E%3C/svg%3E");
  --i-map: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M1%206v16l7-4%208%204%207-4V2l-7%204-8-4z%27%2F%3E%3Cpath%20d%3D%27M8%202v16M16%206v16%27%2F%3E%3C/svg%3E");
  --i-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M10%2013a5%205%200%200%200%207%200l3-3a5%205%200%200%200-7-7l-1%201%27%2F%3E%3Cpath%20d%3D%27M14%2011a5%205%200%200%200-7%200l-3%203a5%205%200%200%200%207%207l1-1%27%2F%3E%3C/svg%3E");
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle%20cx%3D%2711%27%20cy%3D%2711%27%20r%3D%278%27%2F%3E%3Cpath%20d%3D%27M21%2021l-4.3-4.3%27%2F%3E%3C/svg%3E");
  --i-hist: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M3%2012a9%209%200%201%200%203-6.7L3%208%27%2F%3E%3Cpath%20d%3D%27M3%203v5h5M12%207v5l3%202%27%2F%3E%3C/svg%3E");
  --i-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect%20x%3D%273%27%20y%3D%273%27%20width%3D%277%27%20height%3D%277%27%2F%3E%3Crect%20x%3D%2714%27%20y%3D%273%27%20width%3D%277%27%20height%3D%277%27%2F%3E%3Crect%20x%3D%2714%27%20y%3D%2714%27%20width%3D%277%27%20height%3D%277%27%2F%3E%3Crect%20x%3D%273%27%20y%3D%2714%27%20width%3D%277%27%20height%3D%277%27%2F%3E%3C/svg%3E");
  --i-expand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M8%203H5a2%202%200%200%200-2%202v3m18%200V5a2%202%200%200%200-2-2h-3m0%2018h3a2%202%200%200%200%202-2v-3M3%2016v3a2%202%200%200%200%202%202h3%27%2F%3E%3C/svg%3E");
  --i-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M3%2012h18M3%206h18M3%2018h18%27%2F%3E%3C/svg%3E");
  --i-mon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect%20x%3D%272%27%20y%3D%273%27%20width%3D%2720%27%20height%3D%2714%27%20rx%3D%272%27%2F%3E%3Cpath%20d%3D%27M8%2021h8M12%2017v4%27%2F%3E%3C/svg%3E");
  --i-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M21%2015a2%202%200%200%201-2%202H7l-4%204V5a2%202%200%200%201%202-2h14a2%202%200%200%201%202%202z%27%2F%3E%3C/svg%3E");
  --i-sound: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath%20d%3D%27M11%205L6%209H2v6h4l5%204z%27%2F%3E%3Cpath%20d%3D%27M15.5%208.5a5%205%200%200%201%200%207%27%2F%3E%3C/svg%3E");
  --pro-side: 248px; --pro-r: 12px; --pro-sp: 20px;
}
html[data-layout="pro"] body { flex-direction: row; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14.5px; background: var(--bg); letter-spacing: -.005em; }
html[data-layout="pro"] h1, html[data-layout="pro"] h2, html[data-layout="pro"] h3 { letter-spacing: -.015em; }

/* ---------------- Sidebar (the header) ---------------- */
html[data-layout="pro"] body > header { flex-direction: column; flex-wrap: nowrap; align-items: stretch; width: var(--pro-side); flex: none; height: calc(100vh / var(--hdr-zoom, 1)); box-sizing: border-box;
  padding: 18px 12px 14px; gap: 6px; background: #ffffff; border-bottom: 0; border-right: 1px solid var(--line); box-shadow: none; overflow-y: auto; }
html[data-layout="pro"] body > header > * { order: 0 !important; margin-left: 0 !important; }
html[data-layout="pro"] body > header .brand { order: -5 !important; flex-direction: column; align-items: flex-start; gap: 10px; padding: 4px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
html[data-layout="pro"] body > header .brand img { height: 30px; width: auto; max-width: 100px; object-fit: contain; }
html[data-layout="pro"] body > header .brand .sep { display: none; }
html[data-layout="pro"] h1 { font-size: 15px; font-weight: 650; color: var(--text); white-space: nowrap; }
html[data-layout="pro"] body > header .tools { order: -2 !important; display: flex; flex-direction: column; gap: 2px; }
html[data-layout="pro"] .showrow, html[data-layout="pro"] .hgroup, html[data-layout="pro"] .seg[aria-label="Panels shown"] { display: flex; flex-direction: column; align-items: stretch; gap: 2px; border: 0; background: none; box-shadow: none; margin: 0; padding: 0; }
html[data-layout="pro"] .showrow { gap: 14px; }
html[data-layout="pro"] .seg[aria-label="Panels shown"]::before { content: "WINDOWS"; }
html[data-layout="pro"] #infoGroup::before { content: "TOOLS"; }
html[data-layout="pro"] .seg[aria-label="Panels shown"]::before, html[data-layout="pro"] #infoGroup::before, html[data-layout="pro"] #screenGroup::before { font-size: 10.5px; font-weight: 650; letter-spacing: .1em; color: var(--muted); padding: 2px 10px 6px; }
html[data-layout="pro"] #screenGroup::before { content: "SCREEN"; }

/* every nav item: icon + label, quiet until hovered, blue when on */
html[data-layout="pro"] body > header .tools :is(.btn, .seg button) { display: flex; align-items: center; gap: 11px; justify-content: flex-start; width: 100%; box-sizing: border-box;
  padding: 9px 10px; font-size: 14px; font-weight: 500; color: #3b4658; background: transparent; border: 0; border-radius: 8px; box-shadow: none; text-align: left; }
html[data-layout="pro"] body > header .tools :is(.btn, .seg button):hover { background: #f1f4f9; color: var(--text); }
html[data-layout="pro"] body > header .seg button[aria-pressed="true"] { background: #e9effd; color: var(--accent); font-weight: 600; box-shadow: none; }
html[data-layout="pro"] body > header .tools .bico { display: none; }
html[data-layout="pro"] body > header .tools :is(.btn, .seg button)::before, html[data-layout="pro"] body > header > :is(#soundHint, #chatBtn, #menuBtn, #alertBell)::before {
  content: ""; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--ico, none) center / contain no-repeat; mask: var(--ico, none) center / contain no-repeat; }
html[data-layout="pro"] #showLocBtn { --ico: var(--i-loc); font-weight: 600; color: var(--text); }
html[data-layout="pro"] #showLocBtn .showlocn { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 8px; }
html[data-layout="pro"] .seg button[data-panel="alerts"] { --ico: var(--i-bell); }
html[data-layout="pro"] .seg button[data-panel="rems"] { --ico: var(--i-clock); }
html[data-layout="pro"] .seg button[data-panel="map"] { --ico: var(--i-map); }
html[data-layout="pro"] .seg button[data-panel="links"] { --ico: var(--i-link); }
html[data-layout="pro"] #searchBtn { --ico: var(--i-search); }
html[data-layout="pro"] #changesBtn { --ico: var(--i-hist); }
html[data-layout="pro"] #fillScreen { --ico: var(--i-grid); }
html[data-layout="pro"] #openMonitors { --ico: var(--i-mon); }
html[data-layout="pro"] #fullScreen { --ico: var(--i-expand); }
html[data-layout="pro"] #proToggle { --ico: var(--i-grid); }

/* bottom of the sidebar: who is on, chat, bell, sound, Menu, clock */
html[data-layout="pro"] body > header > #whoOn { order: 1 !important; margin-top: auto !important; font-size: 12px; padding: 8px 10px; border-radius: 8px; background: #f4f6fa; }
html[data-layout="pro"] body > header > :is(#chatBtn, #alertBell, #soundHint, #menuBtn) { display: flex; align-items: center; gap: 11px; width: 100%; box-sizing: border-box; height: auto; justify-content: flex-start;
  padding: 9px 10px; font-size: 14px; font-weight: 500; color: #3b4658; background: transparent; border: 0; border-radius: 8px; box-shadow: none; white-space: normal; text-align: left; }
html[data-layout="pro"] body > header > :is(#chatBtn, #alertBell, #soundHint, #menuBtn):hover { background: #f1f4f9; }
html[data-layout="pro"] body > header > #chatBtn { order: 2 !important; --ico: var(--i-chat); }
html[data-layout="pro"] body > header > #alertBell { order: 3 !important; --ico: var(--i-bell); }
html[data-layout="pro"] body > header > #soundHint { order: 4 !important; --ico: var(--i-sound); font-size: 13px; color: var(--muted); border: 1px dashed var(--line); }
html[data-layout="pro"] body > header > #menuBtn { order: 5 !important; --ico: var(--i-menu); background: var(--accent); color: #fff; justify-content: center; font-weight: 600; }
html[data-layout="pro"] body > header > #menuBtn:hover { background: #1c47b8; }
html[data-layout="pro"] body > header > .clock { order: -4 !important; text-align: left; padding: 6px 8px 12px; border-top: 0; border-bottom: 1px solid var(--line); margin: 0 0 6px; }
html[data-layout="pro"] .clock .time { font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
html[data-layout="pro"] .clock .date { font-size: 12px; color: var(--muted); }
html[data-layout="pro"] #conn { order: -1 !important; padding: 0 10px; }

/* ---------------- Content: windows are the board's own: drag by the title, resize from any side or corner ---------------- */
html[data-layout="pro"] main { flex: 1; min-width: 0; height: 100vh; box-sizing: border-box; padding: 0; background: var(--bg); }
html[data-layout="pro"] main:not(.free) { padding: 26px 30px 40px; }

/* ---------------- Cards (windows) ---------------- */
html[data-layout="pro"] .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--pro-r); box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .04); }
html[data-layout="pro"] .panel .phead { padding: 18px 22px 12px; border-bottom: 0; }
html[data-layout="pro"] .panel h2 { font-size: 17px; font-weight: 650; color: var(--text); }
html[data-layout="pro"] .panel .pmeta, html[data-layout="pro"] .panel .hint { color: var(--muted); font-size: 13px; }
html[data-layout="pro"] .panel .list, html[data-layout="pro"] .panel .links { padding: 4px 22px 18px; }
html[data-layout="pro"] .panel :is(input[type="text"], input[type="search"], input:not([type]), select) { height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 12px; font-size: 14px; box-sizing: border-box; }
html[data-layout="pro"] .panel :is(input, select):focus { outline: 2px solid #bfd0fa; border-color: var(--accent); }

/* buttons everywhere: one family */
html[data-layout="pro"] .btn { border-radius: 8px; font-weight: 550; font-size: 14px; padding: 8px 14px; border: 1px solid var(--line); background: #fff; color: #2b3647; box-shadow: 0 1px 1px rgba(16, 24, 40, .04); }
html[data-layout="pro"] .btn:hover { background: #f6f8fb; }
html[data-layout="pro"] .btn.primary, html[data-layout="pro"] .btn:not(.quiet):not(.sm):not(.showloc):not(.menubtn) { border-color: var(--line); }
html[data-layout="pro"] .btn.quiet { background: #fff; color: #3b4658; }
html[data-layout="pro"] .seg { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
html[data-layout="pro"] .seg button { font-weight: 550; }
html[data-layout="pro"] .seg button[aria-pressed="true"] { background: #e9effd; color: var(--accent); }

/* summary numbers: calm, readable */
html[data-layout="pro"] .statbtn { font-size: 15px; }
html[data-layout="pro"] .statbtn b, html[data-layout="pro"] .statbtn strong { font-weight: 700; }

/* ---------------- Locations: clean cards with a status stripe ---------------- */
html[data-layout="pro"] .wall, html[data-layout="pro"] .wgrid { gap: 16px; }
html[data-layout="pro"] .tile { border-radius: 10px; border: 1px solid var(--line); background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); transition: border-color .12s; }
html[data-layout="pro"] .tile:hover { border-color: #b9c6da; }
html[data-layout="pro"] .tile h3, html[data-layout="pro"] .tile .tname { font-size: 15.5px; font-weight: 650; color: var(--text); }
html[data-layout="pro"] .tile .headline, html[data-layout="pro"] .tile .afirst { font-weight: 600; }
html[data-layout="pro"] .wsechead { font-size: 11.5px; letter-spacing: .09em; font-weight: 650; color: var(--muted); }
html[data-layout="pro"] .tile .tabs button { font-size: 13.5px; font-weight: 550; padding: 10px 12px; }
html[data-layout="pro"] .tile .tabs button[aria-selected="true"], html[data-layout="pro"] .tile .tabs button.on { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

/* system tags and status pills */
html[data-layout="pro"] .lbadge, html[data-layout="pro"] .tag, html[data-layout="pro"] .sys, html[data-layout="pro"] .chip { border-radius: 999px; font-weight: 600; font-size: 11.5px; padding: 2px 9px; }

/* ---------------- Tables ---------------- */
html[data-layout="pro"] table { border-collapse: collapse; width: 100%; font-size: 14px; }
html[data-layout="pro"] th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfd; }
html[data-layout="pro"] td { padding: 11px 12px; border-bottom: 1px solid #eef1f6; }
html[data-layout="pro"] tr:hover td { background: #f9fafc; }

/* ---------------- Pop-ups and the location window ---------------- */
html[data-layout="pro"] #tileOverlay { background: rgba(16, 24, 40, .45); backdrop-filter: blur(3px); }
html[data-layout="pro"] #tileOverlay .tile.big, html[data-layout="pro"] .dialog { border-radius: 16px; border: 0; box-shadow: 0 24px 64px rgba(16, 24, 40, .28); }
html[data-layout="pro"] .dialog h2, html[data-layout="pro"] .dialog h3 { font-size: 18px; font-weight: 650; }
html[data-layout="pro"] ::-webkit-scrollbar { width: 10px; height: 10px; } html[data-layout="pro"] ::-webkit-scrollbar-thumb { background: #cdd5e1; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }

@media (max-width: 900px) {
  html[data-layout="pro"] body { flex-direction: column; }
  html[data-layout="pro"] body > header { width: auto; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  html[data-layout="pro"] main { height: auto; padding: 16px; }
}

/* ---- finishing ---- */
html[data-layout="pro"][data-edges] main .panel, html[data-layout="pro"][data-edges] main .panel:not(#x) { border: 1px solid var(--line) !important; outline: 0 !important; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .04) !important; }
html[data-layout="pro"] body > header > :is(#soundHint, #alertBell)::before { display: none; }
html[data-layout="pro"] #menuBtn .burger { display: none; }
html[data-layout="pro"] body > header .seg button, html[data-layout="pro"] body > header .seg button + button { border: 0 !important; box-shadow: none; }

/* ---- Who is on now (the techs signed in): stacked down the sidebar, one person per row ---- */
html[data-layout="pro"] body > header > #whoOn { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 4px; padding: 10px; background: #f4f6fa; border-radius: 10px; }
html[data-layout="pro"] body > header > #whoOn[hidden] { display: none; }
html[data-layout="pro"] #whoOn .wolabel { font-size: 10.5px; font-weight: 650; letter-spacing: .1em; color: var(--muted); margin: 0 0 2px; text-align: left; }
html[data-layout="pro"] #whoOn .whoperson { display: flex; width: 100%; box-sizing: border-box; border-radius: 8px; padding: 6px 9px; background: #fff; border: 1px solid var(--line); }
html[data-layout="pro"] #whoOn .whoperson small { margin-left: auto; }
html[data-layout="pro"] #whoOn .whomore { text-align: left; padding: 2px 4px; }

/* ---- Techs (DWService): a column in the sidebar, one tech per row, never a row of chips across ---- */
html[data-layout="pro"] header > #techsOn { order: -1 !important; flex: none; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 3px; margin: 10px 0 0; overflow: visible; padding: 0 2px; }
html[data-layout="pro"] header > #techsOn .wolabel { font-size: 10.5px; font-weight: 650; letter-spacing: .1em; color: var(--muted); padding: 2px 8px 4px; }
html[data-layout="pro"] header > #techsOn .tech-chip { flex: none; width: 100%; box-sizing: border-box; white-space: normal; border-radius: 8px; padding: 7px 10px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; text-align: left; cursor: pointer; }
html[data-layout="pro"] header > #techsOn .tech-chip:hover { background: #f6f8fb; border-color: #cfd8e6; }

/* ---- Location window: the tabs run down the left side, the page opens to their right ---- */
html[data-layout="pro"] #tileOverlay .tile.big { display: grid; grid-template-columns: 200px minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr); }
html[data-layout="pro"] #tileOverlay .tile.big > :is(header.th, .tnet, .tstatus) { grid-column: 1 / -1; }
html[data-layout="pro"] #tileOverlay .tile.big > nav.ttabs { grid-column: 1; grid-row: 4; display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px;
  padding: 12px 10px; border-right: 1px solid var(--line); border-bottom: 0; background: #fafbfd; overflow-y: auto; border-radius: 0 0 0 16px; }
html[data-layout="pro"] #tileOverlay .tile.big > nav.ttabs button { text-align: left; justify-content: flex-start; width: 100%; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 550;
  border: 0; background: transparent; color: #3b4658; box-shadow: none; white-space: normal; }
html[data-layout="pro"] #tileOverlay .tile.big > nav.ttabs button:hover { background: #eef2f8; }
html[data-layout="pro"] #tileOverlay .tile.big > nav.ttabs button:is([aria-selected="true"], [aria-pressed="true"], .on, .active, .sel) { background: #e9effd; color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
html[data-layout="pro"] #tileOverlay .tile.big > .tbody { grid-column: 2; grid-row: 4; min-height: 0; overflow: auto; }

/* ---- Sidebar: everything fits without scrolling, whatever the screen height ---- */
html[data-layout="pro"] body > header { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; justify-content: flex-start; }
html[data-layout="pro"] body > header > #whoOn { margin-top: auto !important; }
@media (max-height: 940px) {
  html[data-layout="pro"] body > header { padding: 12px 10px 10px; gap: 3px; }
  html[data-layout="pro"] body > header .brand { padding-bottom: 10px; margin-bottom: 4px; }
  html[data-layout="pro"] .showrow { gap: 8px; }
  html[data-layout="pro"] body > header .tools :is(.btn, .seg button), html[data-layout="pro"] body > header > :is(#chatBtn, #alertBell, #soundHint, #menuBtn) { padding: 6px 10px; font-size: 13.5px; }
  html[data-layout="pro"] .clock .time { font-size: 17px; }
  html[data-layout="pro"] body > header > .clock { padding-top: 8px; margin-top: 2px; }
}
@media (max-height: 820px) {
  html[data-layout="pro"] .seg[aria-label="Panels shown"]::before, html[data-layout="pro"] #infoGroup::before, html[data-layout="pro"] #screenGroup::before { display: none; }
  html[data-layout="pro"] .showrow { gap: 4px; }
  html[data-layout="pro"] body > header .tools :is(.btn, .seg button), html[data-layout="pro"] body > header > :is(#chatBtn, #alertBell, #soundHint, #menuBtn) { padding: 5px 9px; font-size: 13px; }
  html[data-layout="pro"] body > header > #soundHint { border: 0; padding: 4px 9px; }
  html[data-layout="pro"] body > header > :is(#whoOn, #techsOn) { padding: 4px 8px !important; font-size: 11.5px; }
}
@media (max-height: 700px) {
  
  html[data-layout="pro"] body > header .brand { padding: 0 4px 6px; }
  html[data-layout="pro"] body > header .tools :is(.btn, .seg button), html[data-layout="pro"] body > header > :is(#chatBtn, #alertBell, #soundHint, #menuBtn) { padding: 4px 8px; font-size: 12.5px; }
  html[data-layout="pro"] body > header .tools .bico, html[data-layout="pro"] body > header .tools :is(.btn, .seg button)::before { width: 16px; height: 16px; }
}
@media (max-height: 600px) {
  html[data-layout="pro"] #fillScreen, html[data-layout="pro"] #openMonitors, html[data-layout="pro"] #fullScreen { display: none; }
}

/* ---- Polish pass (-416) ---- */
/* Menu page tabs wrap instead of running off the edge */
html[data-layout="pro"] .mtabs { flex-wrap: wrap; max-width: 100%; }
html[data-layout="pro"] .mtabs button { white-space: nowrap; padding: 6px 10px; }
/* search boxes show their whole hint */
html[data-layout="pro"] .panel input[type="search"], html[data-layout="pro"] .panel input[type="text"] { min-width: 170px; text-overflow: clip; }
html[data-layout="pro"] .btn:disabled, html[data-layout="pro"] .btn[disabled] { opacity: .78; }
html[data-layout="pro"] .menu:not(.big) { width: min(540px, 100vw); }

/* ---- Menu (drop-down list, page tabs, section tabs, Guide search): one tidy Professional look ---- */
html[data-layout="pro"] .menudrop { padding: 8px; border-radius: 12px; box-shadow: 0 12px 36px rgba(20,30,50,.18); min-width: 300px; }
html[data-layout="pro"] .menudrop button { padding: 9px 12px; gap: 12px; align-items: center; }
html[data-layout="pro"] .menudrop .mdicon { font-size: 0; width: 34px; height: 34px; flex: none; border-radius: 9px; background: #eef2fb; display: grid; place-items: center; }
html[data-layout="pro"] .menudrop .mdicon::before { content: ""; width: 18px; height: 18px; background: var(--accent); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
html[data-layout="pro"] .menudrop button[data-tab="calendar"] { --ico: var(--i-clock); }
html[data-layout="pro"] .menudrop button[data-tab="techs"] { --ico: var(--i-mon); }
html[data-layout="pro"] .menudrop button[data-tab="services"] { --ico: var(--i-bell); }
html[data-layout="pro"] .menudrop button[data-tab="clients"] { --ico: var(--i-loc); }
html[data-layout="pro"] .menudrop button[data-tab="contracts"] { --ico: var(--i-link); }
html[data-layout="pro"] .menudrop button[data-tab="reports"] { --ico: var(--i-hist); }
html[data-layout="pro"] .menudrop button[data-tab="guide"] { --ico: var(--i-chat); }
html[data-layout="pro"] .menudrop button[data-tab="settings"] { --ico: var(--i-menu); }
html[data-layout="pro"] .menudrop b { font-size: 14.5px; color: var(--text); }
html[data-layout="pro"] .menudrop small { font-size: 12.5px; line-height: 1.35; }
/* Menu page tabs: an even grid instead of a ragged wrap */
html[data-layout="pro"] .menu .mtabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 100%; box-sizing: border-box; margin-right: 0; }
html[data-layout="pro"] .menu .mtabs button { text-align: center; padding: 8px 4px; font-size: 13.5px; white-space: normal; line-height: 1.2; }
html[data-layout="pro"] .menu.big .mtabs { display: flex; width: auto; }
html[data-layout="pro"] .menu.big .mtabs button { padding: 7px 12px; white-space: nowrap; }
/* Settings section tabs: even two-column grid */
html[data-layout="pro"] .menu:not(.big) .snav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px 0 8px; }
html[data-layout="pro"] .menu:not(.big) .snav button { justify-content: center; border-radius: 9px; padding: 8px 10px; }
/* Guide search + topic chips + inputs inside the Menu */
html[data-layout="pro"] .menu input[type="search"], html[data-layout="pro"] .menu input[type="text"], html[data-layout="pro"] .menu input[type="email"], html[data-layout="pro"] .menu input[type="password"], html[data-layout="pro"] .menu select, html[data-layout="pro"] .menu textarea {
  border: 1px solid #cfd6e4; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 14px; color: var(--text); background: #fff; box-sizing: border-box; }
html[data-layout="pro"] .menu input:focus, html[data-layout="pro"] .menu select:focus, html[data-layout="pro"] .menu textarea:focus { outline: 2px solid rgba(37,99,235,.35); border-color: var(--accent); }
html[data-layout="pro"] .menu .gsec input[type="search"], html[data-layout="pro"] .menu .gsearch { width: 100%; }
html[data-layout="pro"] .menu .mhead { padding: 18px 20px 12px; }
html[data-layout="pro"] .menu:not(.big) .mtsep { display: none; }

/* Professional's own colors apply with the Daylight theme; every other theme brings its own colors (below). */
html[data-layout="pro"][data-theme="daylight"] { --bg: #f4f6fa; --panel: #ffffff; --row: #ffffff; --line: #e3e8ef; --text: #1b2430; --muted: #667085; --accent: #2457d6; --link: #2457d6; }
html[data-layout="pro"]:not([data-theme="daylight"]) {
  --pro-surface: var(--panel); --pro-soft: var(--row); --pro-hover: rgba(127,140,170,.16); --pro-pick: rgba(80,130,255,.22); --pro-ink: var(--text);
}
html[data-layout="pro"][data-theme="daylight"] { --pro-surface: #fff; --pro-soft: #f4f6fa; --pro-hover: #f1f4f9; --pro-pick: #e9effd; --pro-ink: #2b3647; }
html[data-layout="pro"]:not([data-theme="daylight"]) :is(body > header, .tile, .btn, .btn.quiet, .seg, .panel input, .panel select, .menu input, .menu select, .menu textarea, #whoOn .whoperson, header > #techsOn .tech-chip) { background-color: var(--pro-surface); color: var(--pro-ink); border-color: var(--line); }
html[data-layout="pro"]:not([data-theme="daylight"]) :is(body > header > #whoOn, body > header > #techsOn, #tileOverlay .tile.big > nav.ttabs, th) { background: var(--pro-soft); }
html[data-layout="pro"]:not([data-theme="daylight"]) :is(.btn:hover, body > header .tools :is(.btn, .seg button):hover, body > header > :is(#chatBtn, #alertBell, #soundHint):hover, tr:hover td, #tileOverlay .tile.big > nav.ttabs button:hover, header > #techsOn .tech-chip:hover) { background: var(--pro-hover); }
html[data-layout="pro"]:not([data-theme="daylight"]) :is(.seg button[aria-pressed="true"], body > header .seg button[aria-pressed="true"], #tileOverlay .tile.big > nav.ttabs button:is([aria-selected="true"], [aria-pressed="true"], .on, .active, .sel)) { background: var(--pro-pick); color: var(--text); }
html[data-layout="pro"]:not([data-theme="daylight"]) body > header > :is(#chatBtn, #alertBell, #soundHint) { color: var(--text); }
html[data-layout="pro"]:not([data-theme="daylight"]) body > header > #menuBtn { background: var(--accent); color: #fff; }
html[data-layout="pro"]:not([data-theme="daylight"]) td { border-bottom-color: var(--line); }
html[data-layout="pro"]:not([data-theme="daylight"]) .menudrop .mdicon { background: var(--pro-hover); }
html[data-layout="pro"]:not([data-theme="daylight"]) ::-webkit-scrollbar-thumb { background: rgba(140,155,185,.5); }
html[data-layout="pro"] body > header .seg { border-radius: 10px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: stretch; }
html[data-layout="pro"] body > header .seg button { border-radius: 8px; }

/* ==== Professional: final polish (brand, depth, rhythm) ==== */
html[data-layout="pro"] { --pro-line-soft: color-mix(in srgb, var(--text) 10%, transparent); --pro-ring: color-mix(in srgb, var(--accent) 38%, transparent); }
html[data-layout="pro"] body { font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html[data-layout="pro"][data-theme="daylight"] body { background: #f3f6fb; }
html[data-layout="pro"] ::selection { background: var(--pro-ring); }
/* brand */
html[data-layout="pro"] body > header h1 { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; padding: 4px 6px 12px; }
html[data-layout="pro"] body > header h1::before { content: "N"; flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 80%, #fff) 0%, var(--accent) 55%, color-mix(in srgb, var(--accent) 70%, #000) 100%); box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
/* windows: calm depth, even header band, round corners */
html[data-layout="pro"] main .panel { border-radius: 14px; transition: none; }
html[data-layout="pro"] main .panel .phead { padding: 14px 18px 10px; }
html[data-layout="pro"] main .panel h2 { font-size: 15px; font-weight: 700; letter-spacing: -.005em; }
html[data-layout="pro"] main .panel .pmeta { font-size: 12.5px; }
/* window outlines (Menu > Look) now work in Professional: Soft = quiet hairline, Clear = visible, Bold = strong */
html[data-layout="pro"][data-edges="clear"] main .panel { border: 1px solid color-mix(in srgb, var(--text) 30%, transparent) !important; }
html[data-layout="pro"][data-edges="bold"] main .panel:not(#x):not(#y):not(#z) { border: 3px solid color-mix(in srgb, var(--line) 62%, var(--text) 38%) !important; }
html[data-layout="pro"][data-edges="glass"] main .panel:not(#x):not(#y):not(#z) { border: 2px solid color-mix(in srgb, var(--text) 30%, transparent) !important; box-shadow: inset 0 2px 0 rgba(255,255,255,.7), inset 2px 0 0 rgba(255,255,255,.3), 0 0 0 1px rgba(255,255,255,.3), 0 6px 20px rgba(20,30,50,.14) !important; }
html[data-layout="pro"][data-edges="soft"] main .panel { border: 1px solid var(--line) !important; }
/* tiles */
html[data-layout="pro"] .tile { border-radius: 12px; transition: border-color .12s; }
/* controls */
html[data-layout="pro"] .btn, html[data-layout="pro"] .seg button, html[data-layout="pro"] .chip, html[data-layout="pro"] body > header button { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease; }
html[data-layout="pro"] .btn:hover { border-color: color-mix(in srgb, var(--text) 25%, transparent); }
html[data-layout="pro"] .btn:active { transform: translateY(1px); }
html[data-layout="pro"] :is(.btn, button, input, select, textarea, summary, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
html[data-layout="pro"] .btn:focus-visible { box-shadow: 0 0 0 4px var(--pro-ring); outline-offset: 0; }
html[data-layout="pro"] input:focus, html[data-layout="pro"] select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--pro-ring); outline: 0; }
/* sidebar: group labels, clock, menu button */
html[data-layout="pro"] body > header .tools .showrow::before, html[data-layout="pro"] body > header .showlabel { letter-spacing: .1em; }
html[data-layout="pro"] body > header > #menuBtn { border-radius: 10px; box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 35%, transparent); padding: 11px 12px; }
html[data-layout="pro"] body > header > #menuBtn:hover { filter: brightness(1.06); }
html[data-layout="pro"] body > header .clock, html[data-layout="pro"] #clock { font-weight: 700; letter-spacing: -.01em; }
/* pop-ups and drop-downs */
html[data-layout="pro"] .dialog, html[data-layout="pro"] dialog { border-radius: 16px; box-shadow: 0 24px 64px rgba(10,20,40,.28); }
html[data-layout="pro"] .menu { box-shadow: -16px 0 48px rgba(10,20,40,.18); border-left: 1px solid var(--line); }
html[data-layout="pro"] .menu .mhead h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
html[data-layout="pro"] .toast { border-radius: 12px; box-shadow: 0 12px 32px rgba(10,20,40,.25); }
/* empty states read as calm, centered notes */
html[data-layout="pro"] .empty, html[data-layout="pro"] .noalerts { color: var(--muted); font-size: 14px; padding: 22px 18px; }
@media (prefers-reduced-motion: reduce) { html[data-layout="pro"] * { transition: none !important; } }

/* ---- Dark themes: same polish as Daylight (solid brand blue buttons, flat sidebar groups) ---- */
html[data-layout="pro"]:not([data-theme="daylight"]) { --pro-blue: #2f62e6; }
html[data-layout="pro"]:not([data-theme="daylight"]) body > header > #menuBtn, html[data-layout="pro"]:not([data-theme="daylight"]) #showLocBtn .showlocn { background: var(--pro-blue); color: #fff; }
html[data-layout="pro"]:not([data-theme="daylight"]) body > header h1::before { background: linear-gradient(135deg, #5b8cff 0%, #2f62e6 60%, #1f48b8 100%); }
html[data-layout="pro"]:not([data-theme="daylight"]) body > header .showrow, html[data-layout="pro"]:not([data-theme="daylight"]) body > header .seg, html[data-layout="pro"]:not([data-theme="daylight"]) body > header .tools { border-radius: 10px !important; background-image: none !important; }
html[data-layout="pro"]:not([data-theme="daylight"]) body > header .seg::after { display: none !important; }
html[data-layout="pro"]:not([data-theme="daylight"]) main .panel { background: var(--panel); box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.18) !important; }
html[data-layout="pro"]:not([data-theme="daylight"]) .btn.primary, html[data-layout="pro"]:not([data-theme="daylight"]) .btn.go { background: var(--pro-blue); border-color: var(--pro-blue); color: #fff; }

/* ---- Header (sidebar) fixes: whole brand visible, clock under it, Basic/Advanced button, scrolls only when crowded ---- */
html[data-layout="pro"] body > header .brand { padding-bottom: 4px; border-bottom: 0; margin-bottom: 0; gap: 4px; }
html[data-layout="pro"] body > header .brand img { height: 34px; max-width: 100%; }
html[data-layout="pro"] body > header h1 { white-space: normal; padding: 2px 0 0; font-size: 15px; line-height: 1.2; }
html[data-layout="pro"] body > header h1::before { display: none; }
html[data-layout="pro"] body > header .brand:not(:has(img)) h1::before { display: grid; }
html[data-layout="pro"] body > header > .clock .time { font-size: 22px; }
html[data-layout="pro"] body > header > .clock .date { white-space: normal; }
html[data-layout="pro"] body > header > #menuBtn { position: sticky; bottom: 0; z-index: 3; }
html[data-layout="pro"] #proToggle { display: flex; }

/* ---- Reminders and Open alerts: the buttons stay on top, each card fills the whole width of its window ---- */
html[data-layout="pro"] :is(#reminders, #alerts) .alert { display: flex !important; flex-direction: column; align-items: stretch; gap: 6px; width: 100%; box-sizing: border-box; padding: 12px 14px; min-width: 0; }
html[data-layout="pro"] :is(#reminders, #alerts) .alert > * { min-width: 0; max-width: 100%; }
html[data-layout="pro"] :is(#reminders, #alerts) .alert .ah { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; width: 100%; }
html[data-layout="pro"] :is(#reminders, #alerts) .alert .amsg { flex: 1 1 100%; order: 5; white-space: normal; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
html[data-layout="pro"] :is(#reminders, #alerts) .alert .row { display: flex; flex-wrap: wrap; gap: 6px; }
html[data-layout="pro"] :is(#reminders, #alerts) .alert small { display: block; white-space: normal; overflow-wrap: anywhere; }
html[data-layout="pro"] #panel-rems .phead, html[data-layout="pro"] #panel-alerts .phead { position: sticky; top: 0; z-index: 2; background: inherit; }
html[data-layout] .odbadge, html[data-layout] .lbadge.odbadge { color: #fff !important; background: #b3261e !important; }
html[data-layout="pro"] #remTabs { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--pro-surface, #fff); }
html[data-layout="pro"] #remTabs button { border: 0 !important; background: transparent; padding: 6px 12px; font-size: 13px; font-weight: 550; color: var(--muted); border-radius: 0 !important; }
html[data-layout="pro"] #remTabs button + button { border-left: 1px solid var(--line) !important; }
html[data-layout="pro"] #remTabs button[aria-selected="true"] { background: var(--pro-pick, #e9effd); color: var(--text); font-weight: 650; }

/* ---- Header: logo, NOC Board, monitor tag and clock / date all centered under the HEDnorth logo ---- */
html[data-layout="pro"] body > header .brand { align-items: center; text-align: center; }
html[data-layout="pro"] body > header .brand img { margin: 0 auto; }
html[data-layout="pro"] body > header h1 { justify-content: center; text-align: center; width: 100%; padding-left: 0; padding-right: 0; }
html[data-layout="pro"] body > header .monitortag { display: block; align-self: center; margin: 0 auto; text-align: center; }
html[data-layout="pro"] body > header > .clock { text-align: center; align-items: center; justify-content: center; }
html[data-layout="pro"] body > header > .clock .time, html[data-layout="pro"] body > header > .clock .date, html[data-layout="pro"] body > header > .clock .calLink { text-align: center; display: block; margin-left: auto; margin-right: auto; }

/* ---- Capture and Close Monitor get real icons (they showed a plain square) ---- */
html[data-layout="pro"] { --i-cam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3.2'/%3E%3C/svg%3E"); --i-xmon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M15 9l-6 6M9 9l6 6'/%3E%3C/svg%3E"); }
html[data-layout="pro"] #capBtn { --ico: var(--i-cam); }
html[data-layout="pro"] :is(#closeMonitor, #closeAllFromHere) { --ico: var(--i-xmon); }

/* ---- Open monitors stays on the Professional header, in Basic view too ---- */
html[data-layout="pro"][data-basic] #openMonitors:not([hidden]) { display: flex !important; }

/* ---- The saved-layout picker in the Professional header looks like the other buttons ---- */
html[data-layout="pro"] #layoutQuick { width: 100%; box-sizing: border-box; margin: 2px 0; padding: 9px 10px; font-size: 14px; font-weight: 500; color: inherit; border: 0 !important; border-radius: 8px; cursor: pointer; background-color: transparent; }
html[data-layout="pro"] #layoutQuick:hover { background-color: #f1f4f9; }
html[data-layout="pro"]:not([data-theme="daylight"]) #layoutQuick { background-color: var(--pro-surface); color: var(--pro-ink); }
html[data-layout="pro"]:not([data-theme="daylight"]) #layoutQuick:hover { background-color: var(--pro-hover); }

/* ---- Fit the whole header with no scrolling: everything scales with --pf (1 = full size; the board lowers it only as far as needed). Icons always stay. ---- */
html[data-layout="pro"] body > header { gap: calc(6px * var(--pf, 1)); padding-top: calc(18px * var(--pf, 1)); padding-bottom: calc(14px * var(--pf, 1)); }
html[data-layout="pro"] body > header .tools :is(.btn, .seg button), html[data-layout="pro"] body > header > :is(#chatBtn, #alertBell, #soundHint, #menuBtn) {
  padding: calc(9px * var(--pf, 1)) calc(10px * var(--pf, 1)); font-size: calc(14px * var(--pf, 1)); gap: calc(11px * var(--pf, 1)); }
html[data-layout="pro"] body > header > #soundHint { font-size: calc(13px * var(--pf, 1)); }
html[data-layout="pro"] body > header .tools :is(.btn, .seg button)::before, html[data-layout="pro"] body > header > :is(#soundHint, #chatBtn, #menuBtn, #alertBell)::before { width: calc(18px * var(--pf, 1)); height: calc(18px * var(--pf, 1)); }
html[data-layout="pro"] #layoutQuick { padding: calc(9px * var(--pf, 1)) calc(10px * var(--pf, 1)); font-size: calc(14px * var(--pf, 1)); }
html[data-layout="pro"] body > header .brand img { height: calc(34px * var(--pf, 1)); }
html[data-layout="pro"] body > header h1 { font-size: calc(15px * var(--pf, 1)); }
html[data-layout="pro"] body > header > .clock { padding-top: calc(6px * var(--pf, 1)); padding-bottom: calc(12px * var(--pf, 1)); }
html[data-layout="pro"] body > header > .clock .time { font-size: calc(22px * var(--pf, 1)); }
html[data-layout="pro"] body > header > .clock .date { font-size: calc(12px * var(--pf, 1)); }
html[data-layout="pro"] header > #techsOn { gap: calc(3px * var(--pf, 1)); margin-top: calc(10px * var(--pf, 1)); }
html[data-layout="pro"] header > #techsOn .tech-chip { padding: calc(7px * var(--pf, 1)) calc(10px * var(--pf, 1)); font-size: calc(13.5px * var(--pf, 1)); }
html[data-layout="pro"] header > #techsOn .wolabel, html[data-layout="pro"] #whoOn .wolabel { font-size: calc(10.5px * var(--pf, 1)); }
html[data-layout="pro"] body > header > #whoOn { padding: calc(10px * var(--pf, 1)); gap: calc(4px * var(--pf, 1)); font-size: calc(12px * var(--pf, 1)); }
html[data-layout="pro"] #whoOn .whoperson { padding: calc(6px * var(--pf, 1)) calc(9px * var(--pf, 1)); font-size: calc(12px * var(--pf, 1)); }
html[data-layout="pro"] body > header .showlabel, html[data-layout="pro"] body > header .tools .showrow::before { font-size: calc(10.5px * var(--pf, 1)); }

/* group labels, spacing and the brand block scale too; text never goes below 9px */
html[data-layout="pro"] .seg[aria-label="Panels shown"]::before, html[data-layout="pro"] #infoGroup::before, html[data-layout="pro"] #screenGroup::before { font-size: max(8.5px, calc(10.5px * var(--pf, 1))); padding: calc(2px * var(--pf, 1)) 10px calc(6px * var(--pf, 1)); }
html[data-layout="pro"] body > header .showrow { gap: calc(14px * var(--pf, 1)); }
html[data-layout="pro"] body > header .brand { padding-bottom: calc(4px * var(--pf, 1)); gap: calc(4px * var(--pf, 1)); }
html[data-layout="pro"] body > header .tools { gap: calc(2px * var(--pf, 1)); }
html[data-layout="pro"] body > header .tools :is(.btn, .seg button), html[data-layout="pro"] body > header > :is(#chatBtn, #alertBell, #soundHint, #menuBtn), html[data-layout="pro"] #layoutQuick { font-size: max(9.5px, calc(14px * var(--pf, 1))); }
html[data-layout="pro"] header > #techsOn .tech-chip { font-size: max(9.5px, calc(13.5px * var(--pf, 1))); }
html[data-layout="pro"] #whoOn .whoperson, html[data-layout="pro"] body > header > #whoOn { font-size: max(9.5px, calc(12px * var(--pf, 1))); }
/* Crowded: techs and people stay in one vertical list (names never sit beside each other); the header shrinks a little instead */
html[data-layout="pro"] body > header[data-pfcols] > #techsOn, html[data-layout="pro"] body > header[data-pfcols] > #whoOn { display: grid; grid-template-columns: 1fr; align-items: stretch; }
html[data-layout="pro"] body > header[data-pfcols] > #techsOn .wolabel, html[data-layout="pro"] body > header[data-pfcols] #whoOn .wolabel, html[data-layout="pro"] body > header[data-pfcols] #whoOn .whomore { grid-column: 1 / -1; }
html[data-layout="pro"] body > header[data-pfcols] > #techsOn .tech-chip, html[data-layout="pro"] body > header[data-pfcols] #whoOn .whoperson { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* -748: the time signed in stays visible when the header is crowded: the name shortens ("...") and the time keeps its place on the right */
html[data-layout="pro"] body > header[data-pfcols] #whoOn .whoperson { display: flex; align-items: center; gap: 6px; }
html[data-layout="pro"] body > header[data-pfcols] #whoOn .whoperson b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html[data-layout="pro"] body > header[data-pfcols] #whoOn .whoperson small { display: inline; flex: none; margin-left: auto; }

/* ---- Basic view in Professional: no saved-layout drop-down and no Close Monitor button ---- */
html[data-layout="pro"][data-basic] :is(#layoutQuick, #closeMonitor, #closeAllFromHere) { display: none !important; }

/* ---- Grid tiles: the same compact cards as the other layouts (fixed rows, summary only, the rest inside the tabs) ---- */
html[data-layout="pro"] .tile .btn { padding: 4px 10px; font-size: 12.5px; }
html[data-layout="pro"] .tile .tbody, html[data-layout="pro"] .tile .tfoot { font-size: 13px; }

/* The saved-layout drop-down (for example "EL - Multi - Monitor - Pro") sits centered between Monitors and Full Screen */
html[data-layout="pro"] #layoutQuick { text-align: center; text-align-last: center; -moz-text-align-last: center; padding-left: calc(10px * var(--pf, 1)); padding-right: calc(10px * var(--pf, 1)); text-overflow: ellipsis; appearance: none; -webkit-appearance: none; background-image: none; }
html[data-layout="pro"] #layoutQuick option { text-align: center; }

/* A window that is switched off (Alerts, Reminders, Map, Links, the locations windows): clearly readable, with a thin outline, so it is obvious it can be turned on */
html[data-layout="pro"] body > header .tools .seg button[aria-pressed="false"] { color: color-mix(in srgb, var(--pro-ink) 88%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pro-ink) 30%, transparent); }
html[data-layout="pro"] body > header .tools .seg button[aria-pressed="false"]:hover { background: var(--pro-hover); color: var(--pro-ink); }

/* Location tiles: a clear border all the way round, so the corners and edges are easy to see (the colored stripe on the left stays) */
html[data-layout="pro"] .wall > .tile, html[data-layout="pro"] .wgrid > .tile, html[data-layout="pro"] .ctile { border: 1.5px solid color-mix(in srgb, var(--pro-ink, var(--text)) 38%, transparent) !important; }
html[data-layout="pro"] .wall > .tile:hover, html[data-layout="pro"] .wgrid > .tile:hover, html[data-layout="pro"] .ctile:hover { border-color: color-mix(in srgb, var(--pro-ink, var(--text)) 60%, transparent) !important; }

/* Buttons inside the windows: the ones that are switched off (List / Compact, Open / Acknowledged, Dark, Overdue / All, the tile tabs, link buttons) are dark enough to read, with a thin outline */
html[data-layout="pro"] .panel .seg button:not([aria-pressed="true"]):not(.on):not(.active), html[data-layout="pro"] .panel .chip:not(.on):not([aria-pressed="true"]):not(.active) { color: color-mix(in srgb, var(--pro-ink, var(--text)) 88%, transparent) !important; opacity: 1 !important; }
html[data-layout="pro"] .panel .seg button:not([aria-pressed="true"]):not(.on):not(.active) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pro-ink, var(--text)) 28%, transparent); }
html[data-layout="pro"] .panel .seg button:disabled, html[data-layout="pro"] .panel .chip:disabled { color: color-mix(in srgb, var(--pro-ink, var(--text)) 70%, transparent) !important; }
html[data-layout="pro"] .tile nav.ttabs button:not([aria-selected="true"]):not(.on):not(.active):not(.sel) { color: color-mix(in srgb, var(--pro-ink, var(--text)) 85%, transparent); opacity: 1; }
html[data-layout="pro"] .tile .linkbtn, html[data-layout="pro"] .panel .linkbtn { color: color-mix(in srgb, var(--accent) 78%, var(--pro-ink, #000)); }
html[data-layout="pro"] .tile .sechead button, html[data-layout="pro"] .wallwrap .sechead button { color: color-mix(in srgb, var(--pro-ink, var(--text)) 85%, transparent); }

/* Every location tile (all sections, all locations windows): a colored left side that follows round the bottom-left corner, in the tile's status color, like the Site Visit Required tiles */
html[data-layout="pro"] :is(.wall, .wgrid) .tile, html[data-layout="pro"] :is(.wall, .wgrid) .ctile { --st: var(--unk); }
html[data-layout="pro"] :is(.wall, .wgrid) :is(.tile, .ctile).ok { --st: var(--up); }
html[data-layout="pro"] :is(.wall, .wgrid) :is(.tile, .ctile).warn { --st: var(--warn); }
html[data-layout="pro"] :is(.wall, .wgrid) :is(.tile, .ctile).down { --st: var(--down); }
html[data-layout="pro"] :is(.wall, .wgrid) :is(.tile, .ctile).watch { --st: var(--watch); }
html[data-layout="pro"] :is(.wsec-work, .wsec-maint) :is(.tile, .ctile):is(.tile, .ctile) { --st: var(--link); }
html[data-layout="pro"] .wsec-visit :is(.tile, .ctile):is(.tile, .ctile) { --st: var(--visit); }
html[data-layout="pro"] .wsec-project :is(.tile, .ctile):is(.tile, .ctile) { --st: var(--project); }
html[data-layout="pro"] .wsec-watch :is(.tile, .ctile):is(.tile, .ctile) { --st: var(--watch); }
html[data-layout="pro"] :is(.wsec-arch, .wsec-archive) :is(.tile, .ctile):is(.tile, .ctile) { --st: var(--archive); }
html[data-layout="pro"] :is(.wall, .wgrid) > :is(.tile, .ctile), html[data-layout="pro"] :is(.wall, .wgrid) :is(.tile, .ctile) {
  border-left: 5px solid var(--st) !important; border-color: color-mix(in srgb, var(--st) 55%, transparent) !important; border-left-color: var(--st) !important; box-shadow: 0 1px 2px rgba(16, 24, 40, .06) !important; }
html[data-layout="pro"] :is(.wall, .wgrid) :is(.tile, .ctile):hover { border-color: color-mix(in srgb, var(--st) 80%, transparent) !important; border-left-color: var(--st) !important; }

/* Combined window, Other Clients: white left side (and round the bottom-left corner), neutral outline; the status color stays in the dot and the text */
html[data-layout="pro"] #wall :is(.tile, .ctile).mclient.nosys { border-color: color-mix(in srgb, var(--pro-ink, var(--text)) 38%, transparent) !important; border-left-color: #fff !important; box-shadow: -1px 0 0 0 color-mix(in srgb, var(--pro-ink, var(--text)) 38%, transparent) !important; }
html[data-layout="pro"] #wall :is(.tile, .ctile).mclient.nosys:hover { border-color: color-mix(in srgb, var(--pro-ink, var(--text)) 60%, transparent) !important; border-left-color: #fff !important; }

/* Techs and On now: the same box, the same width, the same left edge, one name under another */
html[data-layout="pro"] body > header > #techsOn { padding: calc(10px * var(--pf, 1)); background: #f4f6fa; border-radius: 10px; gap: 4px; margin: 10px 0 0; }
html[data-layout="pro"] body > header > #techsOn .wolabel { margin: 0 0 2px; text-align: left; }
html[data-layout="pro"] body > header > #techsOn .tech-chip { display: flex; align-items: center; width: 100%; padding: calc(6px * var(--pf, 1)) calc(9px * var(--pf, 1)); font-size: max(9.5px, calc(12px * var(--pf, 1))); text-align: left; }
html[data-layout="pro"] body > header > #techsOn { font-size: max(9.5px, calc(12px * var(--pf, 1))); }
html[data-layout="pro"] body > header > :is(#techsOn, #whoOn) { width: 100%; box-sizing: border-box; }

/* The layout drop-down in the header: every option readable in the open list (own background, own text color, normal size) */
#layoutQuick option, #layoutQuick optgroup { background-color: #fff; color: #1b2230; font-size: 14px !important; font-weight: 500; text-align: left; }
#layoutQuick optgroup { font-weight: 700; font-style: normal; }
html[data-layout="pro"] #layoutQuick option, html[data-layout="pro"] #layoutQuick optgroup { text-align: left; }
html:not([data-theme="daylight"]) #layoutQuick option, html:not([data-theme="daylight"]) #layoutQuick optgroup { background-color: #1b2230; color: #eef2fa; }
html[data-layout="pro"][data-theme="daylight"] #layoutQuick option, html[data-layout="pro"][data-theme="daylight"] #layoutQuick optgroup { background-color: #fff; color: #1b2230; }
html[data-layout="paper"] #layoutQuick option, html[data-layout="paper"] #layoutQuick optgroup, html[data-layout="simple"] #layoutQuick option { background-color: #fff; color: #1b2230; }

/* Pro: every window has a light grey border all round, so its size and edges are easy to see (the "clear" and "bold" outline choices in Look keep their own). */
html[data-layout="pro"]:not([data-edges="clear"]):not([data-edges="bold"]):not([data-edges="glass"]) main .panel:not(#x):not(#y) { border: 1.5px solid #c9d1dc !important; }
html[data-layout="pro"] main .panel .phead { border-bottom: 1px solid #d9dfe7; }

/* Dark Professional themes (Graphite, Midnight, Classic...): the tabs down the left side of a location window are all easy to read, not only the selected one */
html[data-layout="pro"]:not([data-theme="daylight"]) #tileOverlay .tile.big > nav.ttabs button { color: var(--pro-ink, var(--text)); opacity: 1; font-weight: 600; }
html[data-layout="pro"]:not([data-theme="daylight"]) #tileOverlay .tile.big > nav.ttabs button:hover { background: var(--pro-hover); color: var(--pro-ink, var(--text)); }
html[data-layout="pro"]:not([data-theme="daylight"]) #tileOverlay .tile.big > nav.ttabs button:is([aria-selected="true"], [aria-pressed="true"], .on, .active, .sel) { background: var(--pro-pick); color: #fff; box-shadow: inset 3px 0 0 var(--accent, #5b8cff); }
html[data-layout="pro"]:not([data-theme="daylight"]) #tileOverlay .tile.big > nav.ttabs { background: color-mix(in srgb, var(--pro-soft) 88%, var(--pro-ink, #fff) 12%); }

/* ==== readable.css ==== */
/* ==========================================================================
   Readable text in every layout, style and theme. Some colors (white titles, bright teal / pink / yellow, pale grays) were
   chosen for dark backgrounds and become hard to read on the light looks (Daylight theme, Paper, Simplified, Professional).
   Light looks always get dark text; the wallboard's colored tiles always get light text. Nothing is hidden or moved here.
   ========================================================================== */

/* ---- Light looks ---- */
html[data-theme="daylight"] #panel-xwall h2, html[data-theme="daylight"] #panel-xwall .phead :is(.pmeta, .wseccount, span) { color: var(--text, #1b2430); }
html[data-theme="daylight"] #panel-kwall h2 { color: #8a6100; }
html[data-theme="daylight"] #panel-uwall h2, html[data-theme="daylight"] #panel-unifi h2 { color: #1d4fb8; }
html[data-theme="daylight"] #panel-owall h2, html[data-theme="daylight"] #panel-ovrc h2 { color: #6a3fc8; }
html[data-theme="daylight"] #panel-lwall h2, html[data-theme="daylight"] #panel-lutron h2 { color: #0b6e72; }
html[data-theme="daylight"] #panel-cwall h2, html[data-theme="daylight"] #panel-crestron h2 { color: #b4235f; }
html[data-theme="daylight"] .tile h3, html[data-theme="daylight"] .tile .tname { color: var(--text, #1b2430); }
html[data-theme="daylight"] .sys.manual { background: #1b2430; color: #fff; }
html[data-theme="daylight"] .lbadge:not(.cbadge), html[data-theme="daylight"] .lutronalerts b, html[data-theme="daylight"] .lutronalerts h4 { color: #0b6e72; }
html[data-theme="daylight"] .lbadge.cbadge, html[data-theme="daylight"] .crestronbox b { color: #b4235f; }
html[data-theme="daylight"] .tile .headline b, html[data-theme="daylight"] .tile .afirst b { color: inherit; }
html[data-theme="daylight"] .prio { color: #b87c00; }
html[data-theme="daylight"] .tile .big.nosys, html[data-theme="daylight"] .nosys { color: #566274; }
html[data-theme="daylight"] .sopts-item { color: var(--text, #1b2430); }
html[data-theme="daylight"] .dwsname { color: #0b6fa8; }
html[data-theme="daylight"] .showlocn { color: #fff; }
html[data-theme="daylight"] .wsec-other .linkbtn, html[data-theme="daylight"] .wsec-other .tile .linkbtn { color: #1d4fb8; }

/* ---- Disabled buttons stay readable (they are only dimmer) ---- */
.btn:disabled, .sopts-item[disabled] { opacity: .6; }

/* ---- Wallboard: tiles are filled with their status color, so their small text is light ---- */
html[data-layout="wall"] .tile { --muted: #e8eef8; }
html[data-layout="wall"] .tile :is(.hint, .hintx, .isp, .up, .muted, small, .tnet, .tnet span, td, dd, dt, .lalert) { color: #eef3fb; }
html[data-layout="wall"] .tile .lbadge { background: rgba(0, 0, 0, .35); color: #fff; }
html[data-layout="wall"] .tile :is(.bad, .down, .reason, .off, .pbad) { color: #fff; }

/* ---- Chat: dark text on colored bubbles in the light looks ---- */
html[data-theme="daylight"] #chatBox { color: #111827; }
html[data-theme="daylight"] #chatBox .cm { background: #e6ebf3; color: #111827; border: 1px solid #cdd6e4; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); }
html[data-theme="daylight"] #chatBox .cm.mine { background: #c9dcff; border-color: #a9c5fb; color: #0b1220; }
html[data-theme="daylight"] #chatBox .cm small { opacity: 1; color: #3b4658; font-size: 11px; font-weight: 600; }
html[data-theme="daylight"] #chatBox .cm .ctext, html[data-theme="daylight"] #chatBox .cm a { color: #111827; }
html[data-theme="daylight"] #chatBox .cm.cbig { background: none; border: 0; box-shadow: none; }
html[data-theme="daylight"] #chatBox .cm.cdel { background: none; color: #566274; }
html[data-theme="daylight"] #chatBox .cm .cquote { background: rgba(16, 24, 40, .07); border-left-color: #2457d6; opacity: 1; }
html[data-theme="daylight"] #chatBox .cm .cloc { background: #d3e1ff; color: #12327a; }
html[data-theme="daylight"] #chatBox .cm .crx { background: #fff; border-color: #b9c4d6; color: #111827; }
html[data-theme="daylight"] #chatBox .cm .crx.mine { background: #c9dcff; border-color: #7aa2ff; }
html[data-theme="daylight"] #chatBox .cm .cbar { background: #fff; border-color: #cdd6e4; }
html[data-theme="daylight"] #chatBox :is(input, textarea) { color: #111827; background: #fff; border: 1px solid #cdd6e4; }

/* ==== extras-looks.css ==== */
/* 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); }

/* ==== phone.css ==== */
/* Phones and small tablets (2026.10.31-123). The windows stack in one column, full width, in the
   order they sit on the board, and the header wraps. Nothing is hidden: every window, count, button
   and menu is still there, just laid out for a narrow screen. Bigger tap targets too. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 940px) {
  html, body { min-width: 0 !important; height: auto !important; min-height: 100%; }
  body { overflow-x: hidden; display: block !important; }
  /* The whole page scrolls with a finger, not one small box inside it. */
  main#main { flex: none !important; height: auto !important; min-height: 0 !important; overflow: visible !important; }
  body > header { flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; }
  main#main { display: block !important; padding: 10px 8px 28px; overflow-x: hidden; }
  main .panel {
    position: relative !important; left: auto !important; top: auto !important;
    width: auto !important; height: auto !important; max-width: 100% !important;
    min-width: 0 !important; margin: 0 0 12px !important; box-sizing: border-box;
    flex: 0 0 auto !important; max-height: none !important; min-height: 0 !important; overflow: visible !important;
  }
  main .panel .grip, main .panel .resize, main .panel [class^="rz-"] { display: none !important; }
  main > div[aria-hidden="true"] { position: static !important; height: 0 !important; }
  .wall { grid-template-columns: minmax(0, 1fr) !important; }
  .wall > * { min-width: 0; }
  .btn, .linkbtn, .menubtn { min-height: 40px; }
  .mtabs button, .segment button { min-height: 36px; }
  .tabs, .seg, .segment { flex-wrap: wrap; border-radius: 12px !important; height: auto !important; }
  .seg button, .segment button { flex: 1 1 auto; white-space: normal; text-align: center; border-radius: 0; }
  .fgroup { flex-wrap: wrap; }
  input, select, textarea { font-size: 16px; }   /* stops iPhone zooming in on focus */
  #menu, .menu { width: 100vw !important; }
  /* 2026.11.15-301: a location's window fills the phone screen, wide tables scroll sideways with a finger instead of
     squeezing, and pop-ups fit the screen. */
  #tileOverlay { padding: 0 !important; }
  #tileOverlay .tile.big { width: 100vw !important; max-width: 100vw !important; height: 100dvh !important; max-height: 100dvh !important; border-radius: 0 !important; }
  table.ports, table.loclist, table.speeds { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  table.ports td, table.ports th { white-space: nowrap; } table.ports td .lroom, table.devtable tr.devdetail td { white-space: normal; }
  table.devtable { table-layout: auto; } table.devtable th { width: auto !important; }
  table.devtable tr.devdetail > td { min-width: 86vw; display: block; }
  .tctl { flex-wrap: wrap; } .tctl input[type=search] { flex: 1 1 100%; }
  .dialog, .dialog.dlg2 { width: 96vw !important; max-width: 96vw !important; max-height: 92dvh; overflow-y: auto; }
  .olist { grid-template-columns: minmax(0, 1fr) !important; }
  .akid { padding-left: 6px; }
}

/* The CRM on a phone: the Board is not shown at all while the CRM is open (the rule above that forces the Board to display:block must not win). */
@media (max-width: 760px), (pointer: coarse) and (max-width: 940px) {
  body.inProjects main#main { display: none !important; }
  body.inProjects #projectsView { display: block !important; height: auto !important; min-height: 60vh; overflow: visible !important; padding: 0; }
  body.inProjects .crm-shell { height: auto !important; }
}

/* Phone header: the logo, the date and time, and the Time Clock button sit in the middle of the window. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 940px) {
  body > header { justify-content: center !important; text-align: center; }
  body > header > .brand { flex: 1 1 100% !important; justify-content: center !important; text-align: center; margin: 0 !important; }
  body > header > .clock { flex: 1 1 100% !important; order: 6; margin: 0 !important; text-align: center !important; display: flex; flex-direction: column; align-items: center; }
  body > header > .clock > * { text-align: center; }
  body > header > #clockBtn { margin-left: auto !important; margin-right: auto !important; }
  body > header > #menuBtn, body > header > #soundHint { margin-left: 0 !important; }
}
@media (max-width: 760px), (pointer: coarse) and (max-width: 940px) {
  /* Row by row, all centered: logo, date and time, Board/CRM switch, the CRM bell, Time Clock, who is on, then Chat / Menu. */
  body > header > * { order: 7 !important; }
  body > header > .brand { order: 1 !important; }
  body > header > .clock { order: 2 !important; flex: 1 1 100% !important; margin: 0 !important; }
  body > header > #viewSwitch { order: 3 !important; flex: 1 1 100% !important; display: flex !important; justify-content: center !important; margin: 0 !important; }
  body > header > #crmBell { order: 4 !important; flex: 0 0 auto !important; margin: 0 auto !important; align-self: center; }
  body > header > #clockBtn { order: 5 !important; flex: 0 0 220px !important; margin: 0 calc(50% - 110px) !important; justify-content: center; }
  body > header > #whoOn { order: 6 !important; flex: 1 1 100% !important; justify-content: center !important; margin: 0 !important; }
  body > header > #menuBtn, body > header > #soundHint { margin: 0 !important; }
}

/* -705: on a phone every layout (Ops Console too) uses the same header, top to bottom and centered:
   logo, date and time, Board / CRM buttons, the CRM bell, Time Clock, who is on, then Chat / Menu. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 940px) {
  html[data-layout] body { flex-direction: column !important; }
  html[data-layout] body > header { flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; justify-content: center !important; width: auto !important; max-width: 100% !important; flex: none !important;
    border-right: 0 !important; border-bottom: 1px solid var(--line); overflow: visible !important; padding: 10px 12px !important; gap: 8px 10px !important; }
  html[data-layout] body > header > * { order: 7 !important; margin-left: 0 !important; }
  html[data-layout] body > header > .brand { order: 1 !important; flex: 1 1 100% !important; flex-direction: row !important; justify-content: center !important; padding: 0 !important; border: 0 !important; margin: 0 !important; }
  html[data-layout] body > header > .clock { order: 2 !important; flex: 1 1 100% !important; padding: 0 !important; border: 0 !important; margin: 0 !important; text-align: center !important; display: flex !important; flex-direction: column; align-items: center; }
  html[data-layout] body > header > #viewSwitch { order: 3 !important; flex: 1 1 100% !important; display: flex !important; flex-direction: row !important; justify-content: center !important; margin: 0 !important; }
  html[data-layout] body > header > #viewSwitch button { text-align: center !important; }
  html[data-layout] body > header > #crmBell { order: 4 !important; flex: 0 0 auto !important; margin: 0 auto !important; align-self: center !important; }
  html[data-layout] body > header > #clockBtn { order: 5 !important; flex: 0 0 220px !important; margin: 0 calc(50% - 110px) !important; justify-content: center; }
  html[data-layout] body > header > #whoOn { order: 6 !important; flex: 1 1 100% !important; justify-content: center !important; margin: 0 !important; }
}
@media (max-width: 760px), (pointer: coarse) and (max-width: 940px) {
  html[data-layout] body > header:has(> #chatBtn) > #whoOn { order: 6 !important; margin-top: 0 !important; flex-direction: row !important; align-items: center !important; }
  html[data-layout] body > header:has(> #chatBtn) > #soundHint { order: 7 !important; margin-top: 0 !important; }
  html[data-layout] body > header > #chatBtn { order: 8 !important; margin-top: 0 !important; width: auto !important; height: auto !important; flex: 1 1 40% !important; }
  html[data-layout] body > header > #menuBtn { order: 9 !important; width: auto !important; flex: 1 1 40% !important; margin-top: 0 !important; }
  html[data-layout] body > header > #viewSwitch.seg { flex-direction: row !important; height: auto !important; }
  html[data-layout] body > header > #viewSwitch.seg { flex-wrap: nowrap !important; max-width: 320px; margin: 0 auto !important; }
  html[data-layout] body > header > #viewSwitch.seg button { flex: 1 1 0 !important; width: auto !important; min-width: 0; border-top: 0 !important; text-align: center !important; }
}

/* -717: phone header, one centered column: the logo with its name (NOC Board / CRM) centered UNDER it, then date, time and calendar,
   then the Board | CRM buttons, then the notifications bell, then the Time Clock button. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 940px) {
  html body > header > .brand, html[data-layout] body > header > .brand { flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 2px !important; text-align: center !important; }
  html body > header > .brand .sep { display: none !important; }
  html body > header > .brand img { margin: 0 auto !important; }
  html body > header > .brand h1 { text-align: center !important; width: 100%; margin: 0 !important; }
  html body > header > #viewSwitch, html[data-layout] body > header > #viewSwitch { width: 100% !important; max-width: 320px !important; margin: 0 auto !important; flex: 0 1 320px !important; justify-content: center !important; }
  html body > header > #crmBell, html[data-layout] body > header > #crmBell { flex: 0 0 44px !important; width: 44px !important; box-sizing: border-box; display: flex !important; justify-content: center !important; margin: 0 calc(50% - 22px) !important; }   /* the side margins make it fill its own row, so it sits in the middle and the Time Clock button wraps below it */
  html body > header > #clockBtn, html[data-layout] body > header > #clockBtn { flex: 0 0 220px !important; margin: 0 calc(50% - 110px) !important; justify-content: center !important; }
}

/* -718: the Board on a phone, top to bottom and centered, like the CRM:
   logo + name, date/time/calendar, Board | CRM, New alerts (when there are some), ON NOW, Show Locations... and the window buttons,
   the sound button, then Chat and Menu. The CRM bell is only for the CRM. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 940px) {
  body:not(.inProjects) > header > #crmBell { display: none !important; }
  html body > header > #alertBell, html[data-layout] body > header > #alertBell { order: 4 !important; flex: 0 0 auto !important; margin: 0 auto !important; align-self: center !important; }
  html body > header > #whoOn, html[data-layout] body > header > #whoOn, html[data-layout] body > header:has(> #chatBtn) > #whoOn { order: 6 !important; flex: 1 1 100% !important; justify-content: center !important; margin: 0 !important; }
  /* -767: Techs - DWService stays under the notifications bell and above ON NOW, in every layout (Ops/Professional used to push it above the logo). */
  html body > header > #techsOn, html[data-layout] body > header > #techsOn, html[data-layout="pro"] body > header > #techsOn, html[data-layout="ops"] body > header > #techsOn { order: 5 !important; flex: 1 1 100% !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; margin: 0 !important; overflow: visible !important; }
  html body > header > #techsOn .tech-chip { flex: 0 0 auto !important; width: auto !important; }
  html body > header > .tools, html[data-layout] body > header > .tools { order: 7 !important; flex: 1 1 100% !important; justify-content: center !important; margin: 0 !important; }
  html body > header > .tools .showrow, html body > header > .tools .hgroup { justify-content: center !important; }
  html body > header > #soundHint, html[data-layout] body > header > #soundHint, html[data-layout] body > header:has(> #chatBtn) > #soundHint { order: 8 !important; flex: 0 0 220px !important; min-width: 0 !important; width: 220px !important; margin: 0 calc(50% - 110px) !important; justify-content: center !important; }
  html body > header > #chatBtn, html[data-layout] body > header > #chatBtn { order: 9 !important; flex: 1 1 40% !important; width: auto !important; justify-content: center !important; }
  html body > header > #menuBtn, html[data-layout] body > header > #menuBtn { order: 10 !important; flex: 1 1 40% !important; width: auto !important; justify-content: center !important; }
  /* Windows, top to bottom by default: Quick links, Combined, Open alerts, Reminders, Map, then the other locations windows (they can still be turned on or off). */
  body:not(.inProjects) main#main { display: flex !important; flex-direction: column; }
  body:not(.inProjects) main#main > .panel { order: 20; }
  body:not(.inProjects) main#main > #panel-links { order: 1; } body:not(.inProjects) main#main > #panel-sites { order: 2; }
  body:not(.inProjects) main#main > #panel-alerts { order: 3; } body:not(.inProjects) main#main > #panel-rems { order: 4; } body:not(.inProjects) main#main > #panel-map { order: 5; }
}

/* ==== mobile.css ==== */
/* Phone mode (2026.11.20-518). See mobile.js. */
html.phone #fullScreen, html.phone #fillScreen, html.phone #openMonitors, html.phone #closeAllMonitors, html.phone #titleCloseAll, html.phone .monbtn, html.phone .monitortag { display: none !important; }
html.phone .menu, html.phone #menu { padding-bottom: 0; }

/* The Menu on a phone: the list opens as a sheet along the bottom (full width, scrolls), and the Menu window fills the screen with its page tabs wrapped, never cut off at the side. */
html.phone .menudrop { left: 8px !important; right: 8px !important; top: auto !important; bottom: 8px !important; width: auto !important; min-width: 0 !important; max-width: none !important; max-height: 82dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 6000; box-sizing: border-box; }
html.phone .menudrop button { min-height: 52px; }
html.phone .menu, html.phone #menu { width: 100vw !important; max-width: 100vw !important; left: 0 !important; right: 0 !important; overflow-x: hidden; box-sizing: border-box; }
html.phone .menu .mhead { flex-wrap: wrap; }
html.phone .menu .mtabs, html.phone[data-layout] .menu .mtabs { display: flex !important; flex-wrap: wrap !important; width: 100% !important; max-width: 100% !important; gap: 4px; overflow: visible !important; box-sizing: border-box; }
html.phone .menu .mtabs button { flex: 1 1 auto; white-space: normal; text-align: center; padding: 8px 10px; }
html.phone .menu .mtsep { display: none; }
html.phone .menu .mheadbtns { width: 100%; }
html.phone #menuSize { display: none; }
html.phone .menu table { max-width: 100%; }
html.phone .menu .mbody, html.phone #menuBody { overflow-x: hidden; max-width: 100%; box-sizing: border-box; }
html.phone, html.phone body { overflow-x: hidden; max-width: 100vw; }

/* ==== projects.css ==== */
/* Projects tab: the Board / Projects switch in the header, and the Projects page (tables with drop-down rows). */
:root { --pj-active: #00838f; --pj-paused: #d39a1f; --pj-closed: #8e6bd0; }
html[data-theme="dark"] { --pj-active: #4dd0e1; --pj-paused: #f2c14e; --pj-closed: #b99bf0; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --pj-active: #4dd0e1; --pj-paused: #f2c14e; --pj-closed: #b99bf0; } }
.viewsw { order: 0; }
.viewsw button[aria-pressed="true"] { background: var(--row); color: var(--text); font-weight: 700; }
body.inProjects main { display: none; }
.viewsw[hidden] { display: none; }
.pview { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.pview[hidden] { display: none; }
.pj { max-width: 1500px; margin: 0 auto; display: grid; gap: 14px; }
.pj-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pj-top h2 { margin: 0 12px 0 0; font-size: 20px; }
.pj-top .sp { flex: 1; }
.pj-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pj-filters input[type=search], .pj-filters select { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; min-width: 0; }
.pj-filters input[type=search] { width: 260px; max-width: 100%; }
.pj-sec { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; --c: var(--pj-active); }
.pj-sec.paused { --c: var(--pj-paused); } .pj-sec.closed { --c: var(--pj-closed); }
.pj-sec > .pj-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; color: var(--c); font-weight: 700; letter-spacing: .02em; border-bottom: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); background: color-mix(in srgb, var(--c) 7%, transparent); }
.pj-sec > .pj-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.pj-sec > .pj-head .n { color: var(--muted); font-weight: 400; }
.pj-sec > .pj-head .car { margin-left: auto; color: var(--muted); }
.pj-sec.folded > .pj-body { display: none; } .pj-sec.folded > .pj-head { border-bottom: 0; }
.pj-body { overflow-x: auto; }
table.pj-t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.pj-t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.pj-t td { padding: 8px 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: middle; }
table.pj-t tr.pj-row { cursor: pointer; box-shadow: inset 4px 0 0 var(--c, transparent); }
table.pj-t tr.pj-row:hover td { background: color-mix(in srgb, var(--c, var(--row)) 8%, transparent); }
table.pj-t td.car { width: 26px; color: var(--muted); padding-right: 0; }
table.pj-t td.pj-name { font-weight: 600; }
table.pj-t tr.pj-open > td { background: color-mix(in srgb, var(--c, var(--row)) 6%, transparent); }
table.pj-t tr.pj-drop > td { padding: 0; background: color-mix(in srgb, var(--bg) 40%, var(--panel)); }
.pj-detail { display: grid; gap: 14px; padding: 14px 16px 16px 40px; box-shadow: inset 4px 0 0 var(--c, transparent); }
.pj-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 18px; }
@media (max-width: 900px) { .pj-cols { grid-template-columns: 1fr; } .pj-detail { padding-left: 16px; } }
.pj-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel); min-width: 0; }
.pj-box h4 { margin: 0 0 8px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pj-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; font-size: 14px; }
.pj-kv dt { color: var(--muted); } .pj-kv dd { margin: 0; overflow-wrap: anywhere; }
.pj-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pj-pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pj-pill.st-active { color: var(--pj-active); border-color: var(--pj-active); } .pj-pill.st-paused { color: var(--pj-paused); border-color: var(--pj-paused); } .pj-pill.st-closed { color: var(--pj-closed); border-color: var(--pj-closed); }
.pj-pill.t-done { color: var(--up); border-color: var(--up); } .pj-pill.t-doing { color: var(--link); border-color: var(--link); }
.pj-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; min-width: 60px; } .pj-bar > i { display: block; height: 100%; background: var(--c, var(--pj-active)); }
.pj-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pj-log { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; max-height: 220px; overflow: auto; } .pj-log li { color: var(--muted); } .pj-log b { color: var(--text); font-weight: 600; }
.pj-empty { padding: 18px; color: var(--muted); }
.pj-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.pj-checks label { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.pj-team { display: flex; gap: 8px; flex-wrap: wrap; }
.pj-team .chip b { color: var(--text); margin-left: 4px; }
.pj-muted { color: var(--muted); } .pj-off td { opacity: .55; }
body.inProjects header .tools { display: none; }
.dialog .pj-checks label, .dialog label.pjcheck { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; }
.dialog .pj-checks input, .dialog label.pjcheck input { width: auto; flex: none; }
/* Sidebar layouts (Professional, Ops Console): the Board | Projects switch sits under the clock, full width, both buttons visible */
html[data-layout="pro"] body > header > .viewsw, html[data-layout="ops"] body > header > .viewsw { display: grid !important; width: 100%; height: auto; overflow: visible; margin: 0 !important; }
html[data-layout="pro"] body > header > .viewsw { order: -3 !important; grid-template-columns: 1fr 1fr; padding: 0 2px; }
html[data-layout="ops"] body > header > .viewsw { order: -1 !important; grid-template-columns: 1fr; }
html[data-layout="pro"] body > header > .viewsw button, html[data-layout="ops"] body > header > .viewsw button { display: block !important; width: 100%; min-width: 0; height: 36px; justify-content: center; text-align: center; padding: 0 4px; white-space: nowrap; }
html[data-layout="pro"] body > header > .viewsw[hidden], html[data-layout="ops"] body > header > .viewsw[hidden] { display: none !important; }
html[data-layout="pro"] body > header > .viewsw button::before { display: none !important; }
.dialog .pj-checks.one { grid-template-columns: 1fr; max-height: 340px; overflow: auto; }
/* equal columns everywhere */
table.pj-t { table-layout: fixed; min-width: 880px; }
table.pj-t th, table.pj-t td { overflow-wrap: anywhere; text-align: left; }
table.pj-t td select { width: 100%; max-width: 100%; }
table.pj-t td.pj-acts { display: table-cell; }
table.pj-t td.pj-acts > * { margin: 0 6px 6px 0; }
.pj-box table.pj-t { min-width: 640px; }
.pj-box { overflow-x: auto; }
/* Inventory: stages of a project's materials */
:root { --s-sales: #8a9bb0; --s-design: #6cb2ff; --s-engineering: #b18cff; --s-ordered: #f2c14e; --s-shipping: #f2924b; --s-received: #4dd0e1; --s-site: #4cc38a; }
.pj-pill.s-sales { color: var(--s-sales); border-color: var(--s-sales); } .pj-pill.s-design { color: var(--s-design); border-color: var(--s-design); } .pj-pill.s-engineering { color: var(--s-engineering); border-color: var(--s-engineering); }
.pj-pill.s-ordered { color: var(--s-ordered); border-color: var(--s-ordered); } .pj-pill.s-shipping { color: var(--s-shipping); border-color: var(--s-shipping); } .pj-pill.s-received { color: var(--s-received); border-color: var(--s-received); }
.pj-pill.s-site { color: var(--s-site); border-color: var(--s-site); } .pj-pill.s-low { color: #f0605d; border-color: #f0605d; font-weight: 700; }
.pj-sec.pjs-sales { --c: var(--s-sales); } .pj-sec.pjs-design { --c: var(--s-design); } .pj-sec.pjs-engineering { --c: var(--s-engineering); } .pj-sec.pjs-ordered { --c: var(--s-ordered); }
.pj-sec.pjs-shipping { --c: var(--s-shipping); } .pj-sec.pjs-received { --c: var(--s-received); } .pj-sec.pjs-site { --c: var(--s-site); }
.chip.pjs-sales { border-color: var(--s-sales); } .chip.pjs-design { border-color: var(--s-design); } .chip.pjs-engineering { border-color: var(--s-engineering); } .chip.pjs-ordered { border-color: var(--s-ordered); }
.chip.pjs-shipping { border-color: var(--s-shipping); } .chip.pjs-received { border-color: var(--s-received); } .chip.pjs-site { border-color: var(--s-site); }
table.pj-t input[type=checkbox] { width: auto; }
table.pj-t td .pj-acts { gap: 6px; } table.pj-t td .pj-acts .btn { padding: 4px 10px; font-size: 13px; }

/* CRM: quotes and purchase orders */
.dialog.dlg2.sd-dlg { display: block !important; width: min(1280px, 96vw) !important; max-width: 96vw !important; max-height: 92vh; overflow-y: auto; } .dialog.sd-dlg > * { grid-column: 1 / -1; }
.sd-hd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.sd-hd label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); } .sd-hd label.wide { grid-column: span 2; } .sd-hd label[hidden] { display: none; }
.sd-dlg label.wide2 { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 10px; } .sd-dlg label.wide2 textarea { width: 100%; }
.sd-grid { margin-top: 12px; } .sd-row { display: grid; gap: 6px; align-items: center; margin-bottom: 6px; } .sd-row input, .sd-row select { width: 100%; min-width: 0; box-sizing: border-box; }
.sd-h { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } .sd-tot { text-align: right; font-variant-numeric: tabular-nums; }
.sd-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0; justify-content: flex-end; } .sd-sum b { font-variant-numeric: tabular-nums; }
:root { --q-draft: #8a9bb0; --q-sent: #f2c14e; --q-accepted: #4cc38a; --q-declined: #f0605d; }
.pj-pill.qs-draft, .pj-pill.po-draft { color: var(--q-draft); border-color: var(--q-draft); } .pj-pill.qs-sent, .pj-pill.po-ordered { color: var(--q-sent); border-color: var(--q-sent); }
.pj-pill.qs-accepted, .pj-pill.po-received { color: var(--q-accepted); border-color: var(--q-accepted); } .pj-pill.qs-declined, .pj-pill.po-cancelled { color: var(--q-declined); border-color: var(--q-declined); } .pj-pill.po-partial { color: var(--s-shipping); border-color: var(--s-shipping); }
@media (max-width: 800px) { .sd-hd { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The CRM uses the whole window */
.pview { padding: 14px 18px; } .pj { max-width: none; width: 100%; }

/* CRM shell: a left menu like other CRMs (HubSpot, Zoho), then the page */
body.inProjects .pview { padding: 0; overflow: hidden; display: flex; }
.crm-shell { display: grid; grid-template-columns: var(--navw, 224px) minmax(0, 1fr); width: 100%; min-height: 0; flex: 1; }
.crm-nav { border-right: 1px solid var(--line); padding: 14px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
/* The left list always fits the screen: crmNavFit() (projects.js) steps through these sizes until nothing scrolls, then uses two columns. */
.crm-nav[data-fit="1"] .crm-ni { padding: 6px 10px; } .crm-nav[data-fit="1"] .crm-gh { margin: 8px 8px 2px; }
.crm-nav[data-fit="2"] { gap: 2px; } .crm-nav[data-fit="2"] .crm-ni { padding: 4px 10px; font-size: 13px; } .crm-nav[data-fit="2"] .crm-gh { margin: 6px 8px 2px; } .crm-nav[data-fit="2"] .crm-gs { margin-bottom: 4px; }
.crm-nav[data-fit="3"] { gap: 1px; padding-top: 8px; padding-bottom: 8px; } .crm-nav[data-fit="3"] .crm-ni { padding: 3px 10px; font-size: 12.5px; line-height: 1.2; } .crm-nav[data-fit="3"] .crm-gh { margin: 4px 8px 1px; font-size: 10px; } .crm-nav[data-fit="3"] .crm-gs { margin-bottom: 2px; }
.crm-nav[data-fit="4"] { gap: 0; padding-top: 6px; padding-bottom: 6px; } .crm-nav[data-fit="4"] .crm-ni { padding: 2px 10px; font-size: 12px; line-height: 1.15; } .crm-nav[data-fit="4"] .crm-gh { margin: 3px 8px 0; font-size: 9.5px; } .crm-nav[data-fit="4"] .crm-gs { margin-bottom: 2px; padding-top: 3px; padding-bottom: 3px; }
.crm-nav[data-fit="5"], .crm-nav[data-fit="6"] { display: block; column-count: 2; column-gap: 6px; padding: 8px 8px; }
.crm-nav[data-fit="5"] .crm-gs, .crm-nav[data-fit="6"] .crm-gs { column-span: all; margin-bottom: 4px; } .crm-nav[data-fit="5"] .crm-grp, .crm-nav[data-fit="6"] .crm-grp { break-inside: avoid; }
.crm-nav[data-fit="5"] .crm-ni { padding: 4px 8px; font-size: 12.5px; } .crm-nav[data-fit="5"] .crm-gh { margin: 6px 6px 1px; }
.crm-nav[data-fit="6"] .crm-ni { padding: 2px 8px; font-size: 12px; line-height: 1.15; } .crm-nav[data-fit="6"] .crm-gh { margin: 3px 6px 0; font-size: 9.5px; }
.crm-nav[data-fit="7"], .crm-nav[data-fit="8"] { display: block; column-count: 2; column-gap: 4px; padding: 4px 6px; }
.crm-nav[data-fit="7"] .crm-gs, .crm-nav[data-fit="8"] .crm-gs { column-span: all; margin-bottom: 2px; padding-top: 2px; padding-bottom: 2px; } .crm-nav[data-fit="7"] .crm-grp, .crm-nav[data-fit="8"] .crm-grp { break-inside: avoid; }
.crm-nav[data-fit="7"] .crm-ni, .crm-nav[data-fit="8"] .crm-ni { padding: 1px 6px; font-size: 11.5px; line-height: 1.1; } .crm-nav[data-fit="7"] .crm-gh, .crm-nav[data-fit="8"] .crm-gh { margin: 2px 4px 0; font-size: 9px; }
.crm-nav[data-fit="8"] .crm-ni b { display: none; } .crm-nav[data-fit="8"] .crm-ni { font-size: 11px; }
.crm-gs { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.crm-gh { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 8px 4px; }
.crm-ni { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.crm-ni:hover { background: color-mix(in srgb, var(--text) 8%, transparent); } .crm-ni[aria-current="true"] { background: color-mix(in srgb, var(--link) 20%, transparent); font-weight: 600; box-shadow: inset 3px 0 0 var(--link); }
.crm-ni b { font-size: 12px; font-weight: 500; color: var(--muted); }
.crm-main { overflow: auto; padding: 16px 20px 40px; min-width: 0; } .crm-main .pj { max-width: none; }
.crm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.crm-kpi { text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel, transparent); color: var(--text); font: inherit; cursor: pointer; display: grid; gap: 2px; }
.crm-kpi:hover { border-color: var(--link); } .crm-kpi small { color: var(--muted); } .crm-kpi b { font-size: 26px; font-variant-numeric: tabular-nums; } .crm-kpi span { color: var(--muted); font-size: 12px; }
.crm-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .crm-todo li { display: flex; gap: 10px; align-items: center; } .crm-todo .linkbtn { text-align: left; }
.crm-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.crm-col { flex: 0 0 230px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 8px; }
.crm-col h4 { margin: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .crm-col h4 b { font-weight: 500; color: var(--muted); } .crm-col h4 small { margin-left: auto; color: var(--muted); }
.crm-card { text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: color-mix(in srgb, var(--text) 4%, transparent); color: var(--text); font: inherit; cursor: pointer; display: grid; gap: 2px; }
.crm-card:hover { border-color: var(--link); } .crm-card span { color: var(--muted); font-size: 12px; } .crm-card em { font-style: normal; font-variant-numeric: tabular-nums; } .crm-card i { font-size: 11px; color: var(--pj-paused, #f2c14e); font-style: normal; } .crm-card.hold { opacity: .7; }
@media (max-width: 900px) { .crm-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); } .crm-nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); } .crm-grp { display: contents; } .crm-gh { display: none; } .crm-ni { width: auto; padding: 5px 9px; font-size: 13.5px; } .crm-nav { padding: 6px 8px; gap: 2px; } }

/* The auto-hide button also lives in the header itself so it is there in the CRM, where the window buttons are hidden */


/* change orders and invoices */
.pj-pill.co-draft, .pj-pill.inv-draft { color: var(--q-draft); border-color: var(--q-draft); } .pj-pill.co-sent, .pj-pill.inv-sent { color: var(--q-sent); border-color: var(--q-sent); }
.pj-pill.co-approved, .pj-pill.inv-paid { color: var(--q-accepted); border-color: var(--q-accepted); } .pj-pill.co-declined, .pj-pill.inv-void { color: var(--q-declined); border-color: var(--q-declined); }
.pj-pill.inv-partial { color: var(--s-shipping); border-color: var(--s-shipping); } .pj-pill.inv-overdue { color: #ff6b6b; border-color: #ff6b6b; font-weight: 700; }

/* customers: resizable, sortable columns and the Directory view */
.crm-main .pj, .crm-main .pj-sec { max-width: none; width: 100%; margin: 0; } .crm-main .pj-sec .pj-body { overflow-x: auto; }
.pj-t.crm-rz { table-layout: fixed; width: 100%; }
.crm-sh { position: relative; cursor: pointer; user-select: none; white-space: nowrap; } .crm-sh:hover { color: var(--fg, #fff); }
.crm-rzh { position: absolute; right: 0; top: 0; bottom: 0; width: 9px; cursor: col-resize; touch-action: none; } .crm-rzh::after { content: ''; position: absolute; right: 3px; top: 25%; bottom: 25%; width: 2px; border-radius: 1px; background: currentColor; opacity: .25; } .crm-rzh:hover::after { opacity: .8; }
.crm-views { display: flex; gap: 6px; }
.crm-jump { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; }
.crm-dsec h5 { margin: 14px 0 4px; padding: 2px 10px; font-size: 13px; letter-spacing: .08em; opacity: .75; border-bottom: 1px solid var(--line, rgba(255,255,255,.12)); }
.crm-de { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; align-items: center; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line, rgba(255,255,255,.07)); }
.crm-de:hover, .crm-de:focus-visible { background: rgba(127,127,127,.12); } .crm-de .n small { display: block; opacity: .65; font-size: 12px; } .crm-de-wrap.open > .crm-de { background: rgba(127,127,127,.1); }
.crm-de-wrap > .pj-detail { padding: 8px 12px 14px; }
.pj-t.crm-rz td { overflow-wrap: anywhere; }
.btn.hdrico { padding: 4px 9px; min-width: 0; font-size: 15px; line-height: 1; }

/* time */
.tm-u { display: flex; align-items: center; gap: 8px; } .tm-u b { min-width: 38px; font-size: 12px; }
.tm-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(127,127,127,.25); overflow: hidden; min-width: 60px; } .tm-bar i { display: block; height: 100%; background: var(--q-accepted, #3bb273); } .tm-bar.over i { background: #ff6b6b; }
.tm-over { color: #ff6b6b; font-weight: 600; }

#clockBtn { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; } body:not(.inProjects) #clockBtn { display: none; }
#clockBtn.clk-on { border-color: #2ecc71; color: #2ecc71; font-variant-numeric: tabular-nums; }
.clk-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; animation: clkp 1.4s ease-in-out infinite; } @keyframes clkp { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .clk-dot { animation: none; } }
html body.inProjects #techsOn, html body.inProjects > header > #techsOn, html[data-layout] body.inProjects > header[data-pfcols] > #techsOn { display: none !important; }   /* no DWService in the CRM */
.crmset-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; } .crmset-mod { display: flex; align-items: center; gap: 6px; }
.crmset-wrap textarea { font: inherit; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; } .fm-tile { border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--row); display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.fm-img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; display: block; } .fm-n { grid-column: span 2; } .fm-note { white-space: pre-wrap; font-size: 13px; } .fm-by { font-size: 11px; } .fm-acts { display: flex; justify-content: space-between; align-items: center; gap: 6px; } .fm-share { font-size: 11px; cursor: pointer; }
.wr-active { background: #1f7a3d33; color: #2ecc71; } .wr-ending { background: #b7791f33; color: #f0b429; } .wr-expired { background: #c0392b33; color: #ff6b5b; }
.cp-list { margin: 4px 0 0; padding-left: 18px; } .cp-list li { margin: 3px 0; }
.abilbox{max-height:60vh;overflow:auto}.abilbox h4{margin:10px 0 4px}.abil{display:grid!important;grid-template-columns:22px 1fr auto;gap:10px;align-items:center;padding:5px 0;border-bottom:1px solid var(--line)}.abil span{text-align:left}.abil small{white-space:nowrap;opacity:.8}.abil input{width:18px;height:18px;margin:0}
/* CRM header: no screen tag, no window buttons (Screens are in the CRM menu) */
body.inProjects > header .monitortag:not([hidden]), body.inProjects > header #monitorTag { display: none !important; }
html body.inProjects > header .tools, html[data-layout] body.inProjects > header .tools { display: none !important; }
/* CRM Setup (Menu): sub-menus on the left, the page on the right */
.crmsetup { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.csu-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; }
.csu-ni { text-align: left; background: none; border: 1px solid transparent; border-radius: 8px; padding: 9px 12px; color: var(--text); cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.csu-ni small { color: var(--muted); font-size: 11.5px; }
.csu-ni:hover { background: var(--row); }
/* the left column fits the window by itself: it tightens in steps, and grows back when there is room (csuFit in crmsetup.js) */
.csu-nav { max-height: var(--csu-max, none); box-sizing: border-box; }
.csu-nav[data-fit="1"] .csu-ni small { display: none; }
.csu-nav[data-fit="2"] .csu-ni, .csu-nav[data-fit="3"] .csu-ni { padding: 6px 10px; }
.csu-nav[data-fit="2"] .csu-ni small, .csu-nav[data-fit="3"] .csu-ni small, .csu-nav[data-fit="4"] .csu-ni small { display: none; }
.csu-nav[data-fit="2"] { gap: 2px; }
.csu-nav[data-fit="3"] { gap: 1px; } .csu-nav[data-fit="3"] .csu-ni { padding: 4px 8px; font-size: 13px; }
.csu-nav[data-fit="5"] .csu-ni small { display: none; } .csu-nav[data-fit="5"] { gap: 0; overflow-y: auto; } .csu-nav[data-fit="5"] .csu-ni { padding: 1px 6px; font-size: 12px; line-height: 1.15; }
.csu-nav[data-fit="4"] { gap: 0; } .csu-nav[data-fit="4"] .csu-ni { padding: 3px 8px; font-size: 12.5px; }

.csu-ni[aria-current=true] { background: var(--row); border-color: var(--link, #5b8def); }
.csu-page { min-width: 0; }
.csu-page .mrow input, .csu-page table input { max-width: 100%; }
@media (max-width: 760px) { .crmsetup { grid-template-columns: 1fr; } .csu-nav { position: static; flex-direction: row; flex-wrap: wrap; } .csu-ni small { display: none; } }
/* No alerts in the CRM: no bell, no sound button, no hide button in the header */
body.inProjects #alertBell, body.inProjects .alertbell, body.inProjects #alertCount, body.inProjects > header #hdrHide2, body.inProjects #panel-alerts, body.inProjects #alertToast { display: none !important; }
/* Project page (D-Tools style) */
.pp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; } .pp-head h3 { margin: 0; font-size: 20px; }
.pp-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.pp-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.pp-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent, #4a7bff); } .pp-tab:hover { color: var(--text); }
.pp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pp-tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--row); display: flex; flex-direction: column; gap: 2px; }
.pp-tile small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; } .pp-tile b { font-size: 20px; } .pp-tile span { color: var(--muted); font-size: 12px; }
/* Timeline (Gantt) and punch list */
.gt { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gt-row { display: grid; grid-template-columns: 240px 1fr; border-bottom: 1px solid var(--line); cursor: pointer; } .gt-row:last-child { border-bottom: 0; } .gt-row:hover:not(.gt-head) { background: var(--row); }
.gt-head { cursor: default; background: var(--row); font-size: 11.5px; color: var(--muted); } .gt-name { padding: 6px 10px; display: flex; flex-direction: column; min-width: 0; } .gt-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gt-name small { color: var(--muted); font-size: 11.5px; }
.gt-bars { position: relative; min-height: 38px; border-left: 1px solid var(--line); } .gt-head .gt-bars { min-height: 28px; }
.gt-wk { position: absolute; top: 6px; transform: translateX(-2px); padding-left: 4px; border-left: 1px dashed var(--line); height: 100%; font-size: 11px; }
.gt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #e5484d; opacity: .7; }
.gt-bar { position: absolute; top: 11px; height: 16px; border-radius: 4px; background: #4a7bff; min-width: 6px; } .gt-bar.st-done { background: #2ecc71; } .gt-bar.st-todo { background: #7d8aa6; } .gt-bar.st-doing { background: #4a7bff; } .gt-bar.gt-late { background: #e5484d; }
.gt-ms { position: absolute; top: 11px; width: 16px; height: 16px; background: #f5a524; transform: translateX(-8px) rotate(45deg) scale(.8); border-radius: 2px; } .gt-ms.st-done { background: #2ecc71; }
.pun-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); } .pun-row.done .pun-t { text-decoration: line-through; color: var(--muted); } .pun-t { flex: 1; } .pun-row small { white-space: nowrap; }
/* Installed stage and the budget bars (build 580) */
:root { --s-installed: #2e9e6b; }
.pj-pill.s-installed { color: var(--s-installed); border-color: var(--s-installed); font-weight: 700; }
.pj-sec.pjs-installed { --c: var(--s-installed); } .chip.pjs-installed { border-color: var(--s-installed); }
.pp-bar { width: 140px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; } .pp-bar i { display: block; height: 100%; background: var(--s-site); } .pp-bar i.over { background: #f0605d; }
td.bad { color: #f0605d; font-weight: 700; }
/* Build 583: tables with no set column widths size themselves to their content, long words wrap instead of running into the next column. */
table.pj-t:not(:has(colgroup)) { table-layout: auto; }
table.pj-t td, table.pj-t th { overflow-wrap: anywhere; }
table.pj-t th { white-space: normal; }
table.pj-t td { white-space: normal; vertical-align: top; }
table.pj-t td .pj-pill { white-space: normal; display: inline-block; }
.crm-wgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 8px; column-gap: 12px; row-gap: 0; align-items: start; position: relative; } .crm-wgrid.measuring { visibility: hidden; }
.crm-wgrid.editing { background-image: linear-gradient(to right, color-mix(in srgb, var(--link, #58f) 10%, transparent) 1px, transparent 1px); background-size: calc((100% + 12px) / 12) 100%; }
.crm-wghost { position: absolute; z-index: 5; pointer-events: none; border: 2px dashed var(--link, #58f); border-radius: 12px; background: color-mix(in srgb, var(--link, #58f) 14%, transparent); }
.crm-w { grid-column: var(--c, auto) / span var(--span, 3); grid-row: var(--r, auto) / span var(--rs, 1); margin-bottom: 12px; min-width: 0; position: relative; } .crm-w.hset { overflow: auto; } .crm-w.hset > .pj-box, .crm-w.hset > .crm-kpi { min-height: 100%; box-sizing: border-box; }
.crm-w.dragging { opacity: .85; } .crm-w.over { outline: 2px solid var(--link); outline-offset: 2px; } .crm-w.editing { cursor: grab; }
.crm-wgrip { position: absolute; right: 2px; bottom: 0; z-index: 3; cursor: nwse-resize; touch-action: none; padding: 0 4px; font-size: 14px; line-height: 14px; color: var(--link); background: var(--panel, #222); border-radius: 6px; user-select: none; }
.crm-w .crm-kpi { width: 100%; } .crm-w .pj-box { margin: 0; }
.crm-w.editing { outline: 2px dashed var(--link); outline-offset: 2px; border-radius: 12px; }
.crm-wctl { position: absolute; top: 4px; right: 4px; z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; gap: 2px; background: var(--panel, #222); border-radius: 8px; padding: 2px; } .crm-wctl .btn { padding: 2px 7px; min-height: 0; }
/* -714: on the Dashboard the bar sits ABOVE the widget in its own strip, with the widget's name on it, so it never covers the title */
.crm-w > .crm-wctl { position: static; display: block; max-width: none; background: color-mix(in srgb, var(--link, #58f) 14%, var(--panel, #222)); border: 1px solid color-mix(in srgb, var(--link, #58f) 45%, transparent); border-radius: 8px; padding: 4px 6px; margin: 0 0 6px; }
.crm-w > .crm-wctl .crm-wdrag { display: block; padding: 0 2px 3px; font-size: 12px; cursor: grab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; touch-action: none; color: var(--text, inherit); }
.crm-w > .crm-wctl .crm-wdrag b { font-weight: 700; }
.crm-wbtns { display: flex; flex-wrap: wrap; gap: 3px; }
.crm-wbtns .btn { padding: 1px 6px; min-height: 0; font-size: 12px; line-height: 18px; min-width: 26px; text-align: center; }
.crm-w.editing.hset > .pj-box, .crm-w.editing.hset > .crm-kpi { min-height: 0; }
.crm-w.dragging { box-shadow: 0 10px 28px rgba(0,0,0,.45); pointer-events: none; }
.crm-dashbar { justify-content: flex-end; gap: 8px; }
@media (max-width: 1100px) { .crm-w { grid-column: auto / span 6 !important; grid-row: auto / span var(--rs, 1) !important; } .crm-w.wide { grid-column: auto / span 12 !important; } }
@media (max-width: 700px) { .crm-w, .crm-w.wide { grid-column: auto / span 12 !important; } }

.gtable{border-collapse:collapse;width:100%;font-size:.92em;margin:.5em 0}.gtable th,.gtable td{border:1px solid var(--line,#ccd);padding:.4em .6em;text-align:left;vertical-align:top}.gtable th{background:rgba(127,127,160,.15)}

.viewsw.single button{pointer-events:none;cursor:default}
.viewsw.single button[data-view="myday"]{pointer-events:auto;cursor:pointer}   /* -734: every account can open My Day */
.viewsw button[hidden]{display:none!important}
html[data-layout="pro"] body > header > .viewsw.single, html[data-layout="ops"] body > header > .viewsw.single{grid-template-columns:none;grid-auto-flow:column}

.crm-notepad{width:100%;box-sizing:border-box;resize:vertical;min-height:140px;font:inherit}

/* Pipeline: every stage fits on one screen. The columns share the width; a column with many cards scrolls inside itself. */
.crm-board { display: grid; grid-template-columns: repeat(var(--cols, 10), minmax(0, 1fr)); gap: 6px; overflow-x: visible; padding-bottom: 4px; align-items: start; }
.crm-board .crm-col { min-width: 0; padding: 6px; gap: 5px; border-radius: 10px; max-height: calc(100vh - 190px); overflow-y: auto; align-content: start; }
.crm-board .crm-col h4 { font-size: 11.5px; line-height: 1.2; gap: 4px; flex-direction: column; align-items: flex-start; position: sticky; top: -6px; background: var(--card, var(--bg, #fff)); padding-bottom: 3px; z-index: 1; overflow-wrap: anywhere; }
.crm-board .crm-col h4 small { margin-left: 0; font-size: 10.5px; }
.crm-board .crm-card { padding: 5px 6px; border-radius: 7px; font-size: 11.5px; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; }
.crm-board .crm-card span { font-size: 10.5px; }

.crm-card.dragging{opacity:.45}.crm-col.over{outline:2px dashed var(--link);outline-offset:-2px}.crm-col.editing .crm-wctl{display:flex;flex-wrap:wrap;gap:2px}
.crm-card[draggable=true]{cursor:grab}
.crm-col .crm-wctl{position:static;padding:0;background:none;margin-bottom:2px}

/* Pipeline snake layout */
.crm-flow { display: grid; gap: 26px; }
.crm-flowrow { display: grid; gap: 26px; }
.crm-flow .crm-col { position: relative; max-height: var(--rowh, 60vh); font-size: 14px; padding: 10px; gap: 8px; }
.crm-flow .crm-col h4 { font-size: 14px; flex-direction: row; flex-wrap: wrap; }
.crm-flow .crm-card { font-size: 13.5px; padding: 8px 10px; }
.crm-flow .crm-card span { font-size: 12px; }
.flow-arrow { position: absolute; color: var(--link); font-size: 18px; line-height: 1; pointer-events: none; }
.flow-arrow.r { right: -22px; top: 14px; } .flow-arrow.l { left: -22px; top: 14px; } .flow-arrow.d { bottom: -24px; left: calc(50% - 8px); }
.crm-flowrow.rtl { direction: rtl; } .crm-flowrow.rtl > * { direction: ltr; }

.crm-flow .crm-col { height: var(--rowh, 200px); max-height: none; font-size: var(--fs, 14px); box-sizing: border-box; }
.crm-flow .crm-col h4 { font-size: calc(var(--fs, 14px) * 1.05); }
.crm-flow .crm-card { font-size: var(--fs, 13.5px); padding: .5em .65em; }
.crm-flow .crm-card span { font-size: calc(var(--fs, 13.5px) * .88); }

/* Pipeline: clearer and bolder (Text: normal / bold / extra bold) */
.crm-flow.wt-bold .crm-col { border-width: 2px; border-color: color-mix(in srgb, var(--text) 38%, transparent); }
.crm-flow.wt-bold .crm-col h4 { font-weight: 800; } .crm-flow.wt-bold .crm-col h4 b { color: var(--text); font-weight: 800; }
.crm-flow.wt-bold .crm-card { font-weight: 600; border-width: 2px; border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.crm-flow.wt-bold .crm-card b { font-weight: 800; } .crm-flow.wt-bold .crm-card span { color: var(--text); font-weight: 600; opacity: .85; } .crm-flow.wt-bold .crm-card em { font-weight: 800; }
.crm-flow.wt-xbold .crm-col { border-width: 3px; border-color: color-mix(in srgb, var(--text) 55%, transparent); }
.crm-flow.wt-xbold .crm-col h4 { font-weight: 900; text-transform: uppercase; letter-spacing: .02em; } .crm-flow.wt-xbold .crm-col h4 b { color: var(--text); font-weight: 900; }
.crm-flow.wt-xbold .crm-card { font-weight: 700; border-width: 2px; border-color: color-mix(in srgb, var(--text) 45%, transparent); background: color-mix(in srgb, var(--text) 8%, transparent); }
.crm-flow.wt-xbold .crm-card b { font-weight: 900; } .crm-flow.wt-xbold .crm-card span { color: var(--text); font-weight: 700; } .crm-flow.wt-xbold .crm-card em { font-weight: 900; }
.crm-flow.wt-bold .flow-arrow, .crm-flow.wt-xbold .flow-arrow { font-size: 22px; }

/* Pipeline: every stage box and every card always has a visible outline, in every layout, style and theme (Professional, Glass ...). */
.crm-flow .crm-col, .crm-board .crm-col { border-style: solid !important; border-width: 2px !important; border-color: color-mix(in srgb, var(--text) 42%, transparent) !important; }
.crm-flow .crm-card, .crm-board .crm-card { border-style: solid !important; border-width: 2px !important; border-color: color-mix(in srgb, var(--text) 34%, transparent) !important; }
.crm-flow.wt-xbold .crm-col { border-width: 3px !important; border-color: color-mix(in srgb, var(--text) 60%, transparent) !important; }
.crm-flow .crm-card:hover, .crm-board .crm-card:hover { border-color: var(--link) !important; }

/* Pipeline: every tile always has a visible border, whatever the Layout, Style or Theme */
html body .crm-flow .crm-col, html body .crm-board .crm-col { border-style: solid !important; border-width: 2px !important; border-color: color-mix(in srgb, var(--text) 45%, transparent) !important; }
html body .crm-flow .crm-card, html body .crm-board .crm-card { border-style: solid !important; border-width: 2px !important; border-color: color-mix(in srgb, var(--text) 38%, transparent) !important; }
html body .crm-flow.wt-bold .crm-col { border-color: color-mix(in srgb, var(--text) 55%, transparent) !important; }
html body .crm-flow.wt-xbold .crm-col { border-width: 3px !important; border-color: color-mix(in srgb, var(--text) 70%, transparent) !important; }
html body .crm-flow.wt-bold .crm-card { border-color: color-mix(in srgb, var(--text) 48%, transparent) !important; }
html body .crm-flow.wt-xbold .crm-card { border-color: color-mix(in srgb, var(--text) 62%, transparent) !important; }
html body .crm-flow .crm-card:hover, html body .crm-board .crm-card:hover { border-color: var(--link) !important; }

/* Every button in the CRM has a visible border, in every layout, style and theme (build -696). A button never looks like plain text. */
body.inProjects :is(#projectsView, #menu, #modal, #crmNotes, .crmprint) :is(.btn, .linkbtn, .chip, .pj-btn, button.quiet):not(.switch):not(.crm-ni):not(.csu-ni):not(.knob) {
  border: 1px solid color-mix(in srgb, var(--text, #888) 42%, transparent) !important;
  border-radius: 5px !important;
}
/* -748: buttons inside a switch group (Me | Whole company, list/grid and so on) must not get their own box: the group draws the one outline and the thin dividers (the doubled borders looked like dark vertical stripes through the buttons) */
html body.inProjects :is(#projectsView, #menu, #modal, #crmNotes, .crmprint) .seg > :is(.btn, .linkbtn, .chip, .pj-btn, button.quiet):not(.switch):not(.crm-ni):not(.csu-ni):not(.knob) {
  border: 0 !important; border-radius: 0 !important;
}
html body.inProjects :is(#projectsView, #menu, #modal, #crmNotes, .crmprint) .seg > :is(.btn, .linkbtn, .chip, .pj-btn, button.quiet):not(.switch):not(.crm-ni):not(.csu-ni):not(.knob) + :is(.btn, .linkbtn, .chip, .pj-btn, button.quiet) {
  border-left: 1px solid color-mix(in srgb, var(--text, #888) 42%, transparent) !important;
}
body.inProjects :is(#projectsView, #menu, #modal) .linkbtn:not(.switch) {
  padding: 3px 10px !important; text-decoration: none !important; background: color-mix(in srgb, var(--row, transparent) 80%, transparent) !important; color: var(--text) !important; font-size: 12.5px;
}
body.inProjects :is(#projectsView, #menu, #modal) .linkbtn.danger { color: var(--down, #c0392b) !important; border-color: color-mix(in srgb, var(--down, #c0392b) 60%, transparent) !important; }
body.inProjects :is(#projectsView, #menu, #modal) :is(.btn, .chip):hover { border-color: var(--text, #888) !important; }
body.inProjects :is(#projectsView, #menu, #modal) .btn.primary { border-color: var(--link, #4aa3ff) !important; }
.pj-pill.urg-urgent { background: color-mix(in srgb, #e5484d 22%, transparent); color: #e5484d; border-color: #e5484d; font-weight: 700; }
.pj-pill.urg-high { background: color-mix(in srgb, #f5a524 22%, transparent); color: #f5a524; border-color: #f5a524; }
.pj-pill.urg-low { opacity: .75; }
/* while arranging, the widget itself is the drag handle: clicks go to the widget, not to the buttons and links inside it */
.crm-w.editing > :not(.crm-wctl):not(.crm-wgrip) { pointer-events: none; user-select: none; }
.crm-w.editing { cursor: grab; } .crm-w.editing.dragging { cursor: grabbing; }
.crm-wdrag { user-select: none; }
/* -704: Dashboard widgets always have a clearly visible border and a soft lift, in every layout and in dark colors */
body.inProjects .crm-w > .pj-box, body.inProjects .crm-w > .crm-kpi, body.inProjects .crm-w > .pj-sec {
  border: 2px solid color-mix(in srgb, var(--text, #888) 38%, transparent) !important; border-radius: 12px !important;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--text, #fff) 14%, transparent) inset, 0 3px 10px rgba(0, 0, 0, .28);
}
body.inProjects .crm-w > .pj-box:hover, body.inProjects .crm-w > .crm-kpi:hover { border-color: color-mix(in srgb, var(--link, #58f) 70%, var(--text, #888)) !important; }
body.inProjects .crm-w > .pj-box > h4:first-child { padding-bottom: 6px; border-bottom: 1px solid color-mix(in srgb, var(--text, #888) 24%, transparent); }
