@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap");

/* ==========================================================================
   Splendom theme pack for MeshCentral, v2 (30-10-2026)
   The Dashboard's own design, piece by piece: see docs/DEVICES-DESIGN-SPEC.md.
   Every block names the Dashboard piece it copies. MeshCentral's own files are
   never edited: after an update, check it again (UPDATE-NOTES.md).
   ========================================================================== */

:root,
[data-bs-theme="light"] {
  --navy-50: #eef3fb;
  --navy-100: #d7e3f5;
  --navy-200: #aec6ea;
  --navy-400: #4070bf;
  --navy-500: #1a4d9c;
  --navy: #003479;
  --navy-700: #002c66;
  --navy-900: #00193c;
  --navy-950: #000f26;
  --gold-300: #ddc79a;
  --gold: #c2a36b;
  --gold-600: #a9874c;
  --paper: #faf8f4;
  --paper-200: #f1ede5;
  --ink: #16233b;
  --muted: #5a667a;
  --line: #e6e1d7;
  --ok: #1f7a54;
  --warn: #b5701a;
  --danger: #a33131;
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --lift-shadow: 0 24px 50px -28px rgba(0, 25, 60, 0.4);
  --menu-shadow: 0 24px 50px -24px rgba(0, 25, 60, 0.45);

  --bs-body-font-family: var(--body);
  --bs-body-font-size: 0.875rem;
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--ink);
  --bs-primary: var(--navy);
  --bs-primary-rgb: 0, 52, 121;
  --bs-secondary-color: var(--muted);
  --bs-link-color: var(--navy);
  --bs-link-color-rgb: 0, 52, 121;
  --bs-link-hover-color: var(--navy-700);
  --bs-link-hover-color-rgb: 0, 44, 102;
  --bs-border-color: var(--line);
  --bs-border-radius: 0.5rem;
  --bs-tertiary-bg: var(--paper-200);
  --bs-secondary-bg: var(--paper-200);
  --bs-emphasis-color: var(--ink);
  --bs-focus-ring-color: rgba(0, 52, 121, 0.12);
  --sub-menu-bg: transparent;
  --sub-menu-color: var(--muted);
}

/* ---------- Base (globals.css @layer base) ---------- */
html,
body {
  background: var(--paper) !important;
}
body,
body *:not(svg):not(svg *) {
  font-family: var(--body);
}
body {
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection {
  background: var(--navy);
  color: #fff;
}
* {
  text-shadow: none !important;
}
a,
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.sp-hbtn) {
  color: var(--navy) !important;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--navy-200);
  outline-offset: 2px;
}

/* Scroll (motion.css .scroll-thumb, and Gonzalo's rule: never the native bar, no track): with a mouse the native bar
   is hidden and theme.js draws our own navy thumb over each scrolling area. On touch, the system's own. */
@media (hover: hover) {
  * {
    scrollbar-width: none !important;
  }
  *::-webkit-scrollbar {
    display: none !important;
  }
}
.sp-thumb {
  position: fixed;
  z-index: 4000;
  width: 6px;
  border-radius: 999px;
  background: var(--navy);
  opacity: 0;
  transition: opacity 0.25s ease, width 0.15s ease, margin 0.15s ease;
  touch-action: none;
}
.sp-thumb[data-on="true"] {
  opacity: 0.45;
}
.sp-thumb:hover,
.sp-thumb[data-drag="true"] {
  opacity: 0.8;
  width: 8px;
  margin-left: -2px;
}

/* ---------- Frame: header on top, side menu on the left, paper page ---------- */
.fullscreen #container {
  grid-template-areas: "header header" "sidebar nav" "sidebar content" "sidebar footer";
  grid-template-columns: 15rem minmax(0, 1fr);
  grid-template-rows: 72px auto minmax(0, 1fr) 0;
  background: var(--paper) !important;
}
#container,
#column_l {
  background: var(--paper) !important;
  color: var(--ink);
}
/* The page scrolls in its own column, under the header and next to the side menu (Gonzalo, 31-10: nothing scrolled).
   MeshCentral's own sheet hides it with a stronger selector (.fullscreen #column_l), hence !important. */
#column_l,
.fullscreen #column_l {
  padding: 2.5rem 2rem 3rem !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
#column_l > div,
#topbar > * {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}
#footer {
  display: none !important;
}

/* Page arrival (motion.css .page-enter): every page rises in the same way. */
.sp-enter {
  animation: sp-page-in 0.45s var(--ease-out) backwards;
}
@keyframes sp-page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Header (components/AppHeader.tsx) ---------- */
#masthead {
  height: 72px;
  padding: 0 1.5rem !important;
  background: #fff !important;
  background-image: none !important;
  border-bottom: 1px solid var(--line);
}
.masthead-container {
  padding: 0 !important;
}
.masthead-left {
  gap: 0.75rem;
}
.masthead-title {
  width: 34px;
  height: 34px;
  background: url("../images/splendom-logo.png") center / contain no-repeat;
  cursor: pointer;
}
.masthead-titles-container {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
#masthead .title {
  color: var(--ink) !important;
  font-family: var(--display) !important;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
#masthead .title2 {
  color: var(--ink) !important;
  opacity: 0.7;
  font-size: 0.62rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  padding: 0 !important;
  line-height: 1;
}
/* The person menu goes: the header ends like the Dashboard's, "Dashboard" and "Sign out". */
.user-menu-container,
#notificationCount {
  display: none !important;
}
.sp-hbtns {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sp-hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 36px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--navy) !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.07s ease-out, border-color 0.07s ease-out;
}
.sp-hbtn:hover {
  border-color: var(--navy);
  background: #fff;
}
.sp-hbtn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* ---------- Side menu: the Dashboard's .menu-item, as a column ---------- */
#page_leftbar {
  width: 15rem !important;
  background: #fff !important;
  border-right: 1px solid var(--line);
  padding: 1.5rem 0.75rem !important;
  overflow-y: auto !important;
}
#page_leftbar .nav {
  gap: 0.15rem;
}
#page_leftbar .nav-link {
  display: flex !important;
  align-items: center;
  gap: 0.7rem;
  width: 100% !important;
  margin: 0 !important;
  padding: 0.55rem 0.75rem !important;
  border-radius: 0.45rem !important;
  background: transparent !important;
  color: var(--ink) !important;
  text-align: left !important;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 1 !important;
  transition: background-color 0.06s ease-out, color 0.06s ease-out;
}
#page_leftbar .nav-link > svg:not(.sp-icon),
#page_leftbar .nav-link > i {
  display: none !important;
}
#page_leftbar .nav-link .sp-icon {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
  transition: color 0.06s ease-out;
}
#page_leftbar .nav-link:hover {
  background: var(--navy-50) !important;
  color: var(--navy) !important;
}
#page_leftbar .nav-link:hover .sp-icon {
  color: var(--navy);
}
#page_leftbar .nav-link.lbbuttonsel,
#page_leftbar .nav-link.lbbuttonsel2 {
  background: var(--navy-50) !important;
  color: var(--navy) !important;
  font-weight: 600;
}
#page_leftbar .nav-link.lbbuttonsel .sp-icon,
#page_leftbar .nav-link.lbbuttonsel2 .sp-icon {
  color: var(--navy);
}
/* Gonzalo, 30-10: My account, Files and Users go. */
#page_leftbar #LeftMenuMyAccount,
#page_leftbar #LeftMenuMyFiles,
#page_leftbar #LeftMenuMyUsers,
#MainMenuMyAccount,
#MainMenuMyFiles,
#MainMenuMyUsers {
  display: none !important;
}

/* ---------- Page header (eyebrow, Fraunces title, gold rule, muted text) ---------- */
.sp-head {
  margin: 0 0 2rem;
}
.sp-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-600);
}
.sp-title {
  margin: 0.5rem 0 0;
  font-family: var(--display) !important;
  font-weight: 500;
  font-size: 2.25rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--navy-900);
}
.sp-title .sp-edit {
  margin-left: 0.75rem;
  vertical-align: middle;
  font-family: var(--body) !important;
  letter-spacing: 0;
}
.sp-edit svg {
  width: 13px;
  height: 13px;
}
.sp-rule {
  width: 3rem;
  height: 1px;
  margin-top: 1rem;
  background: var(--gold);
}
.sp-lead {
  max-width: 65ch;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
/* MeshCentral's own title row: hidden where ours stands, its controls kept. */
.sp-headed > .fs-4.fw-bold {
  display: none !important;
}
#column_l [id$="title"] {
  margin: 0 !important;
}
.sp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  padding: 0 0.85rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy) !important;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  transition: background-color 0.07s ease-out, border-color 0.07s ease-out;
}
.sp-back:hover {
  border-color: var(--navy);
  background: #fff;
}
.sp-back svg {
  width: 14px;
  height: 14px;
}
[id$="BackButton"] {
  display: none !important;
}

/* ---------- Tabs of a computer (Leads' tabs: one ink bar that slides) ---------- */
#topbar {
  background: transparent !important;
  padding: 0 2rem;
}
#topbar table,
#topbar tbody,
#topbar tr,
#topbar td,
#topbar div {
  background: transparent !important;
  background-image: none !important;
  height: auto !important;
}
#MainMenuSpan {
  display: none !important;
}
#topbar [id$="SubMenuSpan"] {
  position: relative;
  padding-top: 2rem;
}
#topbar [id$="SubMenuSpan"] .mobile-submenu-arrow {
  display: none !important;
}
#topbar [id$="SubMenuSpan"] table.style1,
#topbar [id$="SubMenuSpan"] tbody,
#topbar [id$="SubMenuSpan"] tr {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.25rem;
  width: 100%;
}
#topbar [id$="SubMenuSpan"] table.style1 {
  border-bottom: 1px solid var(--line);
}
#topbar [id$="SubMenuSpan"] .topbar_td {
  position: relative;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  align-items: center;
  padding: 0.7rem 0.85rem !important;
  margin-bottom: -1px;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  color: var(--muted) !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.07s ease-out;
}
#topbar [id$="SubMenuSpan"] .topbar_td:hover {
  color: var(--navy) !important;
}
#topbar [id$="SubMenuSpan"] .topbar_td.style3sel,
#topbar [id$="SubMenuSpan"] .topbar_td.fullselect,
#topbar [id$="SubMenuSpan"] .topbar_td.semiselect {
  color: var(--navy-900) !important;
}
#topbar [id$="SubMenuSpan"] .topbar_td_end {
  display: none !important;
}
.sp-ink {
  position: absolute;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  pointer-events: none;
  z-index: 1;
}
.sp-ink[data-ready="true"] {
  transition: left 0.28s var(--ease-out), width 0.28s var(--ease-out), top 0.2s ease;
}
/* Gonzalo, 30-10: what stays inside a computer. */
#topbar #MainDevRegistry,
#topbar #MainDevAmt,
#topbar #MainDevConsole,
#topbar #MainDevPlugins,
#topbar #ServerConsole,
#topbar #ServerTrace,
#topbar #ServerPlugins {
  display: none !important;
}

/* ---------- Buttons (globals.css .btn, .btn-primary, .btn-ghost) ---------- */
/* Not !important: MeshCentral hides buttons with an inline display:none, and that has to win. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 36px;
  padding: 0 1rem !important;
  border-radius: 999px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1;
  box-shadow: none;
  transition: transform 0.08s ease-out, background-color 0.07s ease-out, color 0.07s ease-out,
    box-shadow 0.1s ease-out, border-color 0.07s ease-out !important;
}
.btn-sm {
  height: 32px;
  padding: 0 0.85rem !important;
  font-size: 0.8rem !important;
}
.btn-primary,
.btn-success,
.btn-primary:focus,
.btn-success:focus {
  background: var(--navy) !important;
  border: 1px solid var(--navy) !important;
  color: #fff !important;
}
.btn-primary:hover:not(:disabled),
.btn-success:hover:not(:disabled) {
  background: var(--navy-700) !important;
  border-color: var(--navy-700) !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -12px rgba(0, 52, 121, 0.55);
}
.btn-secondary,
.btn-light,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-secondary:focus {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--navy) !important;
}
.btn-secondary:hover:not(:disabled),
.btn-light:hover:not(:disabled),
.btn-outline-primary:hover:not(:disabled),
.btn-outline-secondary:hover:not(:disabled),
.btn-outline-success:hover:not(:disabled) {
  background: #fff !important;
  border-color: var(--navy) !important;
  color: var(--navy) !important;
}
.btn-danger,
.btn-outline-danger {
  background: transparent !important;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, #fff) !important;
  color: var(--danger) !important;
}
.btn-danger:hover:not(:disabled),
.btn-outline-danger:hover:not(:disabled) {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
  transform: translateY(-1px);
}
.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-close {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--line);
  border-radius: 999px !important;
  opacity: 1;
  background-size: 10px;
  transition: border-color 0.07s ease-out, background-color 0.07s ease-out;
}
.btn-close:hover {
  border-color: var(--navy);
  background-color: #fff;
}
/* Inside a computer: one primary action (Actions), the rest as ghost pills. */
#p10html button.btn-primary:not([onclick^="deviceActionFunction"]),
#p10html input.btn-primary:not([onclick^="deviceActionFunction"]),
#p10info input.btn-primary:not([onclick^="deviceActionFunction"]) {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--navy) !important;
}
#p10html input.btn-primary:not([onclick^="deviceActionFunction"]):hover,
#p10info input.btn-primary:not([onclick^="deviceActionFunction"]):hover {
  background: #fff !important;
  border-color: var(--navy) !important;
  box-shadow: none;
  transform: none;
}
/* Gonzalo, 30-10: what goes from a computer's page. */
[onclick^="showShareDevice"],
[onclick^="writeDeviceEvent"],
[onclick^="return p20showAddMeshUserDialog"],
[onclick^="p10showNodeNetInfoDialog"],
[onclick^="p10showMeshCmdDialog"],
[onclick^="return p10showMeshCmdDialog"],
[onclick^="p10rfb"],
[onclick^="p10mstsc"],
[onclick^="p10ssh"],
#cxwebrdp,
#cxwebvnc,
#cxwebssh,
#cxrdp,
#cxconsole,
#p10html4,
#p10html3 .p10html3left,
[onclick^="inviteAgentToMesh"],
[onclick^="return inviteAgentToMesh"] {
  display: none !important;
}
#p10html3 {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
}
#p10html3 .p10html3right {
  display: flex;
  gap: 0.5rem;
  float: none !important;
}
#p10html3 a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.07s ease-out, border-color 0.07s ease-out;
}
#p10html3 a:hover {
  border-color: var(--navy);
  background: #fff;
}
#p10html3 a[onclick^="p10showDeleteNodeDialog"] {
  color: var(--danger) !important;
  border-color: color-mix(in srgb, var(--danger) 30%, #fff);
}
#p10html3 a[onclick^="p10showDeleteNodeDialog"]:hover {
  border-color: var(--danger);
}

/* ---------- Fields (.input, house Select, search, tick) ---------- */
.form-control,
.form-control-sm,
input[type="text"]:not(.sp-native),
input[type="password"],
input[type="number"],
input[type="email"],
input[type="search"],
textarea {
  min-height: 36px;
  padding: 0.45rem 0.75rem !important;
  border: 1px solid var(--line) !important;
  border-radius: 0.5rem !important;
  background-color: #fff !important;
  color: var(--ink) !important;
  font-size: 0.875rem !important;
  box-shadow: none !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--muted) !important;
  opacity: 0.7;
}
.form-control:focus,
input:focus,
textarea:focus {
  border-color: var(--navy) !important;
  box-shadow: 0 0 0 3px rgba(0, 52, 121, 0.12) !important;
  outline: none !important;
}
#SearchInput,
#KvmSearchInput {
  min-width: 16rem;
  padding-left: 2.25rem !important;
  border-radius: 999px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%235a667a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") 0.85rem center no-repeat !important;
}
/* Native selects stay in the page for MeshCentral but are never seen: theme.js puts the house Select in front. */
select.sp-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.sp-select {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}
.sp-select > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 9rem;
  height: 36px;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.sp-select > button:hover {
  border-color: var(--navy-200);
}
.sp-select > button:focus-visible {
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 52, 121, 0.1);
}
.sp-select > button svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.sp-select[data-open="true"] > button svg {
  transform: rotate(180deg);
}
.sp-menu {
  position: fixed;
  z-index: 3000;
  min-width: 12rem;
  max-height: 18rem;
  overflow: auto;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  box-shadow: var(--menu-shadow);
  animation: sp-menu-in 0.16s ease-out both;
}
@keyframes sp-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sp-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.06s ease-out, color 0.06s ease-out;
}
.sp-menu-item:hover,
.sp-menu-item[data-active="true"] {
  background: var(--navy-50);
  color: var(--navy);
}
.sp-menu-item[data-on="true"] {
  font-weight: 600;
  color: var(--navy);
}
.sp-menu-item span {
  flex: 1;
  min-width: 0;
}
.sp-menu-item svg {
  width: 14px;
  height: 14px;
  flex: none;
}
/* Bootstrap's floating labels: our Select cannot float under them, so the label sits above, as a field label. */
.form-floating > label {
  position: static !important;
  height: auto !important;
  padding: 0 0 0.375rem !important;
  transform: none !important;
  opacity: 1 !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted) !important;
  background: transparent !important;
}
.form-floating > label::after {
  display: none !important;
}
.form-floating {
  display: flex;
  flex-direction: column-reverse;
}
.form-floating > .form-control {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0.45rem 0.75rem !important;
}
.form-floating > .sp-select,
.modal .sp-select {
  display: flex;
  width: 100%;
}
.form-floating > .sp-select > button,
.modal .sp-select > button {
  width: 100%;
}
.form-floating > .sp-select {
  order: -1;
}

/* Never a check box: every one is the Dashboard's switch, its words on the left (Gonzalo, 30-10). */
input[type="checkbox"]:not(.sp-native),
.form-check-input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  position: relative;
  width: 2.6rem !important;
  height: 1.5rem !important;
  margin: 0 !important;
  flex: none;
  float: none !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--paper-200) none !important;
  vertical-align: middle;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color 0.1s ease-out, border-color 0.1s ease-out;
}
input[type="checkbox"]:not(.sp-native)::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 25, 60, 0.35);
  transition: transform 0.12s ease-out;
}
input[type="checkbox"]:not(.sp-native):checked,
#column_l input[type="checkbox"].form-check-input:checked {
  background: var(--navy) none !important;
  border-color: var(--navy) !important;
}
input[type="checkbox"]:not(.sp-native):checked::after {
  transform: translateX(1.1rem);
}
input[type="checkbox"]:not(.sp-native):disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
input[type="checkbox"]:not(.sp-native):focus-visible {
  outline: 2px solid var(--navy) !important;
  outline-offset: 2px;
}
/* Words first, switch after. */
.form-check:has(> input[type="checkbox"]),
label:has(> input[type="checkbox"]) {
  display: inline-flex; /* never !important: MeshCentral hides some of these inline */
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
  padding-left: 0 !important;
}
.modal .form-check:has(> input[type="checkbox"]),
.modal label:has(> input[type="checkbox"]) {
  display: flex;
  justify-content: space-between;
}
.form-check-label,
label {
  color: var(--ink);
}

/* ---------- Toolbars become the Activity log's filter card ---------- */
#devListToolbarSpan,
#p3title + .pTable,
#p3 > .pTable {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  padding: 1rem !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 0.75rem !important;
}
#devListToolbarSpan > div,
#p3 > .pTable td {
  background: transparent !important;
}
#devListToolbar {
  flex-wrap: wrap;
  gap: 0.5rem;
}
#devListToolbar > * {
  margin: 0 !important;
}
#devListToolbarSpan .form-check {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}
#devListToolbarSpan .form-check-input {
  float: none;
  margin: 0 0.5rem 0 0 !important;
}
/* The four list views as the Dashboard's segmented control. */
#devListToolbarViewIcons {
  display: inline-flex !important;
  gap: 0.2rem;
  padding: 0.2rem;
  background: var(--paper-200);
  border: 1px solid var(--line);
  border-radius: 999px;
}
#devListToolbarViewIcons > span {
  display: inline-grid !important;
  place-items: center;
  width: 32px;
  height: 28px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem !important;
  transition: background-color 0.08s ease-out, color 0.08s ease-out, box-shadow 0.08s ease-out;
}
#devListToolbarViewIcons > span svg {
  width: 15px !important;
  height: 15px !important;
}
#devListToolbarViewIcons > span:hover {
  color: var(--navy);
}
#devListToolbarViewIcons > .viewSelectorSel {
  background: #fff !important;
  color: var(--navy) !important;
  box-shadow: 0 1px 3px rgba(0, 25, 60, 0.18);
}
#p1title {
  justify-content: flex-end !important;
  margin-bottom: 0.75rem !important;
}

/* ---------- Device groups and computers (tool cards + ToolMark) ---------- */
/* MeshCentral only draws the cards whose offsetTop falls inside the list's own scroll: the list is their
   offsetParent, so our page header above it never pushes them out of view. */
#xdevices {
  position: relative;
}
div.DevSt {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 0 !important;
  border: 0 !important;
  font-family: var(--display) !important;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--navy-900);
}
.DevSt > span[id^="Mx"],
.DevSt > span:not([style*="float"]) {
  font-family: var(--display) !important;
}
.DevSt > span[style*="float"] {
  order: 9;
  margin-left: auto;
  float: none !important;
}
.devHeaderx {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--navy-100);
  border-radius: 999px;
  background: var(--navy-50);
  color: var(--navy-700) !important;
  font-family: var(--body) !important;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.DevSt > svg {
  width: 15px;
  color: var(--muted);
  cursor: pointer;
}
.DevSt a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--body) !important;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.07s ease-out, border-color 0.07s ease-out;
}
.DevSt a:hover {
  border-color: var(--navy);
  background: #fff;
}
/* View 1 (cards) as tool cards. The other views (list, live desktops) keep their own sizes. */
[id^="DevxCol"]:has(> [name="xxdevice1"]) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
  padding: 1rem 0 0.5rem;
}
[name="xxdevice1"] {
  position: relative;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.08s ease-out;
}
[name="xxdevice1"]:hover {
  transform: translateY(-3px);
  border-color: var(--navy-100);
  box-shadow: var(--lift-shadow);
}
[name="xxdevice1"] > table {
  height: auto !important;
}
[name="xxdevice1"] td {
  padding: 1rem 0.5rem 1rem 0;
  background: transparent !important;
  background-image: none !important;
  vertical-align: middle;
}
[name="xxdevice1"] td:first-child {
  padding-left: 1rem;
}
[name="xxdevice1"] .i1,
[name="xxdevice1"] .i2,
[name="xxdevice1"] .i3,
[name="xxdevice1"] .i4,
[name="xxdevice1"] .i5,
[name="xxdevice1"] .i6,
[name="xxdevice1"] .i7,
[name="xxdevice1"] .i8 {
  width: 44px !important;
  height: 44px !important;
  background-size: 352px 44px !important;
}
[name="xxdevice1"] .i2 { background-position: -44px 0 !important; }
[name="xxdevice1"] .i3 { background-position: -88px 0 !important; }
[name="xxdevice1"] .i4 { background-position: -132px 0 !important; }
[name="xxdevice1"] .i5 { background-position: -176px 0 !important; }
[name="xxdevice1"] .i6 { background-position: -220px 0 !important; }
[name="xxdevice1"] .i7 { background-position: -264px 0 !important; }
[name="xxdevice1"] .i8 { background-position: -308px 0 !important; }
[name="xxdevice1"] .g1,
[name="xxdevice1"] .g2,
[name="xxdevice1"] [style*="background"] {
  background: transparent !important;
}
.deviceBatterySmall,
.deviceBatteryLarge {
  display: none !important;
}
/* The name as a tool card's title (text-lg navy-900), the state below in muted text-sm. */
[name="xxdevice1"] .e2t > div:not(.e1t),
[name="xxdevice1"] .e2t > div:not(.e1t) * {
  font-size: 0.875rem !important;
  color: var(--muted) !important;
}
[name="xxdevice1"] .e2t > .e1t {
  width: auto !important;
  margin-bottom: 0.15rem;
  font-size: 1.125rem !important;
  font-weight: 400;
  line-height: 1.3;
  color: var(--navy-900) !important;
}
[name="xxdevice1"] td.g1t,
[name="xxdevice1"] td.g2t {
  display: none;
}
[name="xxdevice3"],
[name="xxdevice4"] {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #fff;
}
[name="xxdevice2"] {
  background: #fff;
}
.g1,
.g1s,
.g1t,
.g2,
.g2s,
.g2t,
.e2,
.e2s,
.e2t,
.style10,
.style10s,
.style6,
.style14,
.auto-style1,
.h1,
.h2,
.bar,
.sbar,
.bar18 {
  background-image: none !important;
  background-color: transparent !important;
}
img.gray,
.gray {
  filter: grayscale(1) !important;
  opacity: 0.45;
}
/* "Add Device Group · MeshCmd" under the list: not here (groups are made per person). */
[onclick^="return account_createMesh"],
[onclick*="p10showMeshCmdDialog(0)"] {
  display: none !important;
}
#NoMeshesPanel {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}

/* ---------- Lists (Activity log: a card with dividers) ---------- */
#p3events,
#p16events,
[id$="events"] {
  height: auto !important;
  max-height: none !important;
}
.p3eventsTable,
#p3events table,
#p16events table {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line) !important;
  border-radius: 0.75rem;
  border-collapse: separate !important;
  border-spacing: 0;
  overflow: hidden;
}
.p3eventsTable td,
#p16events td {
  padding: 0.6rem 1rem !important;
  border-top: 1px solid var(--line) !important;
  border-bottom: 0 !important;
  background: #fff !important;
  font-size: 0.875rem;
  color: var(--ink);
}
.p3eventsTable tr:first-child td {
  border-top: 0 !important;
}
.p3eventsTable td.DevSt,
#p16events td.DevSt {
  padding: 1.25rem 1rem 0.5rem !important;
  background: var(--paper) !important;
  font-family: var(--body) !important;
  font-size: 0.875rem !important;
  font-weight: 600;
  color: var(--navy-900);
}
.p3eventsTable td.g1,
#p16events td.g1 {
  display: none;
}
.p3eventsTable td:first-child {
  width: 2.5rem !important;
  color: var(--navy-400);
}
.p3eventsTable tr[role="button"]:hover td {
  background: var(--paper) !important;
}
.table {
  --bs-table-bg: #fff;
  --bs-table-hover-bg: var(--paper);
  --bs-table-striped-bg: var(--paper);
  --bs-table-active-bg: var(--navy-50);
  --bs-table-color: var(--ink);
  border-color: var(--line) !important;
}
.table th,
thead td {
  font-size: 0.68rem !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted) !important;
  background: #fff !important;
}
.table td,
.table th {
  border-color: var(--line) !important;
  vertical-align: middle;
}

/* ---------- A computer's General page ---------- */
#p10html {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.5rem;
}
#p10html .row {
  align-items: baseline;
  padding: 0.35rem 0;
}
#p10html .row > .col:first-child,
#p10html .row > .col:first-child b {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
#MainComputerImage {
  width: 120px;
  height: 120px;
  border-radius: 1rem;
}

/* ---------- Server page ---------- */
#p6title #MainMeshImage {
  display: none !important;
}
#p2ServerActions > p,
#p6 p > strong,
#serverStats > p,
.userTableHeader {
  display: block;
  margin: 1.5rem 0 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  border: 0 !important;
}
#p2ServerActions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 !important;
}
#p2ServerActions > div > div {
  display: contents;
}
#p2ServerActions .p2AccountActions {
  display: none;
}
#p2ServerActions a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.07s ease-out, border-color 0.07s ease-out;
}
#p2ServerActions a:hover {
  border-color: var(--navy);
  background: #fff;
}
.serverStateTableCell {
  width: 15rem;
  margin: 0 0.5rem 0.5rem 0;
  background: #fff !important;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.serverStateTableCell td {
  padding: 0.75rem 1rem !important;
  background: transparent !important;
  font-size: 0.875rem;
}

/* ---------- Dialogs (motion.css .dialog) ---------- */
.modal-backdrop.show {
  background: rgba(0, 15, 38, 1);
  opacity: 0.46 !important;
}
.modal.show .modal-dialog {
  animation: sp-dialog-in 0.32s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
}
@keyframes sp-dialog-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-content {
  border: 1px solid var(--line) !important;
  border-radius: 1rem !important;
  background: #fff !important;
  box-shadow: 0 40px 90px -40px rgba(0, 25, 60, 0.6) !important;
  overflow: hidden;
  color: var(--ink);
}
.modal-header,
#dialogHeader {
  padding: 1rem 1.25rem !important;
  background: #fff !important;
  color: var(--navy-900) !important;
  border-bottom: 1px solid var(--line) !important;
  cursor: default !important;
}
.modal-title,
#dialogHeader .modal-title {
  font-family: var(--display) !important;
  font-size: 1.25rem !important;
  font-weight: 500 !important;
  letter-spacing: -0.015em;
  color: var(--navy-900) !important;
}
.modal-body {
  padding: 1.25rem !important;
}
.modal-footer {
  padding: 1rem 1.25rem !important;
  border-top: 1px solid var(--line) !important;
  background: #fff;
  gap: 0.5rem;
}

/* ---------- Menus (motion.css .menu / .menu-item) ---------- */
.contextMenu,
.dropdown-menu {
  padding: 0.35rem !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 0.65rem !important;
  box-shadow: var(--menu-shadow) !important;
  animation: sp-menu-in 0.16s ease-out both;
}
.cmtext,
.dropdown-item {
  padding: 0.5rem 0.65rem !important;
  border-radius: 0.45rem;
  color: var(--ink) !important;
  font-size: 0.88rem;
  transition: background-color 0.06s ease-out, color 0.06s ease-out;
}
.cmtext:hover,
.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--navy-50) !important;
  color: var(--navy) !important;
}

/* ---------- Chips, alerts ---------- */
.badge {
  border-radius: 999px !important;
  font-weight: 600 !important;
}
.badge.bg-danger {
  background: var(--danger) !important;
}
.alert {
  border-radius: 0.5rem;
  font-size: 0.875rem;
}
.text-danger {
  color: var(--danger) !important;
}
.text-success {
  color: var(--ok) !important;
}
.text-secondary {
  color: var(--muted) !important;
}

/* ---------- Remote desktop / terminal / files bars ---------- */
.areaHead,
.areaFoot,
#deskarea1,
#deskarea4,
#termarea1,
#termarea4,
#filesarea1 {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-radius: 0.75rem !important;
  padding: 0.6rem 0.75rem !important;
  gap: 0.5rem;
  flex-wrap: wrap !important;
}
.areaHead > .d-flex,
#p13toolbar .d-flex {
  flex-wrap: wrap !important;
  gap: 0.4rem;
}
.deskareaicon {
  color: var(--navy);
}

/* ---------- People (theme.js): the Dashboard's People cards ---------- */
.sp-people-grid {
  display: grid;
  gap: 1rem;
}
.sp-person {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  animation: sp-rise 0.5s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: box-shadow 0.12s ease-out, border-color 0.08s ease-out;
}
@keyframes sp-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sp-person[data-spot="true"] {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 52, 121, 0.12);
}
.sp-person header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.sp-face {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 999px;
  object-fit: cover;
}
.sp-initials {
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-family: var(--display) !important;
  font-size: 1.15rem;
}
.sp-who {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.sp-who b {
  font-family: var(--display) !important;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--navy-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-who small {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.sp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--navy-100);
  border-radius: 999px;
  background: var(--navy-50);
  color: var(--navy-700);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.sp-chip.sp-on {
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 8%, #fff);
  border-color: color-mix(in srgb, var(--ok) 25%, #fff);
}
.sp-chip.sp-on::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.sp-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.sp-cols section {
  min-width: 0;
  padding: 1rem 1.25rem 1.25rem;
}
.sp-cols section + section {
  border-left: 1px solid var(--line);
}
.sp-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.sp-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sp-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
}
.sp-row + .sp-row {
  border-top: 1px solid var(--line);
}
.sp-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 0.375rem;
  background: var(--navy-50);
}
.sp-logo svg {
  width: 18px;
  height: 18px;
}
.sp-what {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.sp-what b {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}
.sp-what small {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-act {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
}
.sp-ask {
  font-size: 0.8rem;
  color: var(--muted);
}
.sp-bad {
  color: var(--danger);
}
.sp-empty {
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.sp-notice {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.875rem;
  color: var(--muted);
}
.skeleton {
  height: 8rem;
  border-radius: 0.75rem;
  background: linear-gradient(90deg, var(--paper-200) 0%, #fff 50%, var(--paper-200) 100%);
  background-size: 200% 100%;
  animation: sp-shimmer 1.4s ease-in-out infinite;
}
@keyframes sp-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

/* ---------- Phone ---------- */
@media (max-width: 800px) {
  .fullscreen #container {
    grid-template-areas: "header" "sidebar" "nav" "content" "footer";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 72px auto auto minmax(0, 1fr) 0;
  }
  #page_leftbar {
    display: block !important;
    width: auto !important;
    height: auto !important;
    padding: 0.6rem 1rem !important;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto !important;
  }
  #page_leftbar .nav {
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 0.25rem;
  }
  #page_leftbar .nav-link {
    width: auto !important;
    white-space: nowrap;
    padding: 0.45rem 0.75rem !important;
  }
  #masthead {
    padding: 0 1.25rem !important;
  }
  .sp-hbtn {
    padding: 0 0.85rem;
  }
  .sp-hbtn[data-home] .sp-hbtn-label,
  .sp-hbtn[data-out] svg {
    display: none;
  }
  .sp-hbtn[data-home] {
    width: 36px;
    padding: 0;
  }
  #column_l {
    padding: 2rem 1.25rem 2.5rem !important;
  }
  #topbar {
    padding: 0 1.25rem;
  }
  .sp-title {
    font-size: 1.875rem;
  }
  #SearchInput {
    order: 9;
    flex: 1 1 100%;
    min-width: 100% !important;
  }
  .sp-cols {
    grid-template-columns: 1fr;
  }
  .sp-cols section + section {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sp-enter,
  .sp-menu,
  .sp-person,
  .contextMenu,
  .dropdown-menu,
  .modal.show .modal-dialog {
    animation: none !important;
  }
  .sp-ink[data-ready="true"] {
    transition: none;
  }
}

/* ---------- Sign-in card (never really seen: theme.js goes straight to Authentik) ---------- */
body.login,
.login #container {
  background: var(--paper) !important;
  background-image: none !important;
}
body.login:not(.sp-show) > *:not(.sp-signin) {
  visibility: hidden;
}
#loginPicture {
  display: none !important;
}
.sp-signin {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--paper);
}
.sp-signin .sp-card {
  width: min(420px, 100%);
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  text-align: center;
  animation: sp-dialog-in 0.32s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
}
.sp-signin img {
  width: 48px;
  height: 48px;
}
.sp-signin .sp-eyebrow {
  margin-top: 1rem;
}
.sp-signin h1 {
  margin: 0.5rem 0 0;
  font-family: var(--display) !important;
  font-weight: 500;
  font-size: 2rem;
  color: var(--navy-900);
}
.sp-signin .sp-rule {
  margin: 1rem auto;
}
.sp-signin p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  line-height: 1.5;
}
.sp-signin .sp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

/* ---------- Buttons: icon first, then the words (Gonzalo, 30-10; theme.js puts ours in front) ---------- */
input.sp-proxied,
[onclick^="onDevicesScroll(true)"] {
  display: none !important;
}
.sp-bicon {
  width: 14px;
  height: 14px;
  flex: none;
}
.btn.sp-labeled {
  width: auto !important;
  height: 32px !important;
  gap: 0.4rem;
}
.btn.sp-labeled > svg:not(.sp-bicon) {
  display: none !important;
}
#p10html3 a,
.DevSt a {
  gap: 0.4rem;
}
#p10html3 a .sp-bicon,
.DevSt a .sp-bicon {
  width: 13px;
  height: 13px;
}

/* The toolbar reads as the Dashboard's: search first and wide, then the filters, then the actions. */
#devListToolbar,
#kvmListToolbar {
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#devListToolbar > *,
#kvmListToolbar > * {
  order: 5;
  margin: 0 !important;
}
#devListToolbar > #SearchInput,
#devListToolbar > #SearchInputClearButton,
#kvmListToolbar > #KvmSearchInput,
#kvmListToolbar > #KvmSearchInputClearButton {
  order: 1;
  flex: 1 1 16rem;
}
#devListToolbar > .sp-select {
  order: 2;
}
#devListToolbar > .form-check {
  order: 3;
}
#kvmListToolbar > #KvmDesktopButtons {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------- A narrow side menu ---------- */
.fullscreen #container {
  transition: grid-template-columns 0.22s var(--ease-out);
}
#page_leftbar {
  display: flex !important;
  flex-direction: column;
}
#page_leftbar .sp-narrow-toggle {
  margin-top: auto !important;
  border: 0;
  color: var(--muted) !important;
  font-size: 0.85rem;
}
body.sp-narrow.fullscreen #container {
  grid-template-columns: 4.5rem minmax(0, 1fr);
}
body.sp-narrow #page_leftbar {
  width: 4.5rem !important;
  padding-left: 0.6rem !important;
  padding-right: 0.6rem !important;
}
body.sp-narrow #page_leftbar .nav-link {
  justify-content: center;
  padding: 0.6rem !important;
}
body.sp-narrow #page_leftbar .sp-navlabel {
  display: none;
}

/* ---------- Back to the top: a small arrow, only once the list has been scrolled ---------- */
.sp-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 900;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  box-shadow: var(--lift-shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.07s ease-out;
}
.sp-top[data-on="true"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.sp-top:hover {
  border-color: var(--navy);
}
.sp-top svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 800px) {
  #page_leftbar {
    flex-direction: row;
  }
  #page_leftbar .sp-narrow-toggle {
    display: none !important;
  }
}

/* One primary action per row, as in the Dashboard: Settings of the live desktops is a ghost pill. */
.sp-proxy[class*="btn-primary"]:has(+ input[onclick^="showMultiDesktopSettings"]),
input[onclick^="showMultiDesktopSettings"] + .sp-proxy {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--navy) !important;
}
input[onclick^="showMultiDesktopSettings"] + .sp-proxy:hover {
  background: #fff !important;
  border-color: var(--navy) !important;
  box-shadow: none;
  transform: none;
}

/* Actions stays the one filled button of a computer's page. */
#p10html .btn.sp-proxy.sp-main,
#p10info .btn.sp-proxy.sp-main {
  background: var(--navy) !important;
  border: 1px solid var(--navy) !important;
  color: #fff !important;
}
#p10html .btn.sp-proxy.sp-main:hover,
#p10info .btn.sp-proxy.sp-main:hover {
  background: var(--navy-700) !important;
  border-color: var(--navy-700) !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -12px rgba(0, 52, 121, 0.55);
}

/* ---------- Devices list, 30-10 night (Gonzalo) ---------- */
/* Gone: OS Name, Collapse all / Expand all, MeshCentral's single-choice status (ours is multiple choice). */
#devListToolbar > .form-check:has(#RealNameCheckBox),
#CollapseAllButton,
#ExpandAllButton,
#CollapseAllButton2,
#ExpandAllButton2,
#DevFilterSelect + .sp-select {
  display: none !important;
}
/* No words beside a field: they say what they are inside it. */
#devListToolbarSort,
#devListToolbarSize {
  font-size: 0 !important;
}
#devListToolbarSort .sp-select,
#devListToolbarSize .sp-select {
  font-size: 0.875rem;
}
/* Row one: the search and its actions. Row two: the filters, and the order on the right. */
#devListToolbarSpan > #devListToolbar,
#devListToolbarSpan > #kvmListToolbar,
#devListToolbarSpan > #devMapToolbar {
  order: 1;
  flex: 1 1 100% !important;
  flex-wrap: nowrap;
}
#devListToolbarSpan > #sp-filters {
  order: 2;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#devListToolbarSpan > #sp-filters[hidden] {
  display: none;
}
#devListToolbarSpan > .ms-auto {
  order: 3;
}
#devListToolbar > #SearchInput,
#kvmListToolbar > #KvmSearchInput {
  flex: 1 1 auto !important;
  min-width: 10rem;
}
/* The clear cross sits inside the search, never pushing the row. */
#SearchInputClearButton,
#KvmSearchInputClearButton {
  flex: 0 0 0 !important;
  width: 0;
  margin-left: -0.5rem !important;
}
#SearchInputClearButton > span,
#KvmSearchInputClearButton > span {
  left: -1.75rem !important;
  top: -0.6rem !important;
  color: var(--muted);
  cursor: pointer;
}
#SearchInputClearButton > span:hover,
#KvmSearchInputClearButton > span:hover {
  color: var(--navy);
}
/* A filter with a choice made reads as on. */
.sp-multi[data-set="true"] > button {
  border-color: var(--navy) !important;
  background: var(--navy-50) !important;
  color: var(--navy) !important;
  font-weight: 600;
}
.sp-menu-none {
  padding: 0.5rem 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* The views: icon, then their name; air between them and above the filters. */
#devListToolbarViewIcons {
  gap: 0.35rem !important;
  padding: 0.25rem !important;
}
#devListToolbarViewIcons > span.sp-view {
  display: inline-flex !important;
  gap: 0.45rem;
  width: auto !important;
  height: 32px !important;
  padding: 0 0.85rem;
  font-size: 0.85rem !important;
  font-weight: 600;
}
#devListToolbarViewIcons > span.sp-view > svg:not(.sp-bicon) {
  display: none !important;
}
#p1title {
  margin-bottom: 1.25rem !important;
}

/* Every check box in a card: the switch on the right of the card. */
/* The switch picks the computer for Group action: it shows on hover, or for all while any is picked. */
[name="xxdevice1"] #devs > tbody > tr > td:first-child {
  position: absolute;
  top: 50%;
  right: 1rem;
  z-index: 1;
  display: flex;
  width: auto !important;
  padding: 0 !important;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.12s ease-out;
}
[name="xxdevice1"]:hover #devs > tbody > tr > td:first-child,
[name="xxdevice1"]:focus-within #devs > tbody > tr > td:first-child,
#xdevices:has(input.DeviceCheckbox:checked) [name="xxdevice1"] #devs > tbody > tr > td:first-child {
  opacity: 1;
}
@media (hover: none) {
  [name="xxdevice1"] #devs > tbody > tr > td:first-child {
    opacity: 1;
  }
}
[name="xxdevice1"] .e2t {
  padding-right: 3.5rem !important;
}

/* Cards arrive like the Dashboard's (rise, one after another). */
.sp-arrive {
  animation: sp-rise 0.5s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

/* Nothing to show: a still card with a computer, the way to act under it. */
.sp-nothing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 30rem;
  margin: 2.5rem auto;
  padding: 2.5rem 2rem;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.sp-nothing-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 0.5rem;
  background: var(--navy-50);
  color: var(--navy);
}
.sp-nothing-mark > svg {
  width: 26px;
  height: 26px;
}
.sp-nothing-title {
  margin: 0.5rem 0 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--navy-900);
}
.sp-nothing-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}
.sp-nothing .btn {
  margin-top: 0.5rem;
}
#NoMeshesPanel {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
  .sp-arrive,
  .sp-nothing {
    animation: none !important;
  }
}

/* Disabled is paper and muted, never a washed-out blue (Gonzalo: only Splendom's blue). */
.btn:disabled,
.btn.disabled,
.btn:disabled:hover {
  opacity: 1 !important;
  background: var(--paper-200) !important;
  border-color: var(--line) !important;
  color: var(--muted) !important;
  box-shadow: none !important;
  transform: none !important;
}
#SearchInputClearButton svg,
#KvmSearchInputClearButton svg {
  color: var(--muted) !important;
}
#SearchInputClearButton svg:first-child,
#KvmSearchInputClearButton svg:first-child {
  opacity: 0;
}

/* ==========================================================================
   30-10 night, second pass (Gonzalo): every section checked one by one
   ========================================================================== */

/* ---------- Start: the page shows once it is ours, never MeshCentral's own look first ---------- */
body:not(.login):not(.sp-ready) #container {
  opacity: 0;
  animation: sp-reveal 0s 1.2s forwards; /* if theme.js ever fails, the page still shows */
}
body.sp-ready #container {
  opacity: 1;
  transition: opacity 0.2s ease-out;
}
@keyframes sp-reveal {
  to {
    opacity: 1;
  }
}

/* ---------- One header per section, the tabs right under it ---------- */
#column_l > #sp-head {
  margin-bottom: 2rem;
}
#column_l > #topbar {
  padding: 0 !important;
  margin-top: -0.5rem;
}
#column_l > #topbar [id$="SubMenuSpan"] {
  padding-top: 0;
}
#column_l > #topbar [id$="SubMenuSpan"]:not([style*="display: none"]) {
  margin-bottom: 1.75rem;
}
/* MeshCentral's own title rows: their words go (our header says it), the tools they hold stay as buttons. */
#column_l [id$="title"] > .fs-4.fw-bold,
#column_l [id$="title"] > [id$="BackButton"],
#p11KeyboardLights {
  display: none !important;
}
#column_l [id$="title"]:not(#p1title):not(:has(.sp-tool)) {
  display: none !important;
}
#column_l [id$="title"]:has(.sp-tool) {
  justify-content: flex-end;
  margin: 0 0 1rem !important;
}
#column_l [id$="title"] [id^="devListToolbarViewIcons"]:has(.sp-tool) {
  display: flex !important;
  gap: 0.5rem;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
[id^="devListToolbarViewIcons"] > svg[data-sp-tool="1"] {
  display: none !important;
}
.sp-tool {
  gap: 0.4rem;
}
.sp-head .sp-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.sp-head .sp-title .sp-edit {
  margin-left: 0;
}

/* Moving: another section rises in (page-in); a tab of the same section only fades over; the header swaps softly. */
.sp-tab-in {
  animation: sp-tab-in 0.22s ease-out backwards;
}
@keyframes sp-tab-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sp-swap {
  animation: sp-swap 0.32s var(--ease-out) backwards;
}
@keyframes sp-swap {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Devices: views ---------- */
#devViewButton3,
#devViewButton5 {
  display: none !important;
}
#devListToolbarViewIcons > span[style*="display: none"],
#devListToolbarViewIcons > span[style*="display:none"] {
  display: none !important;
}
#column_l #p1title {
  margin: 0 0 1.25rem !important;
}
#devListToolbarSpan > [data-empty] {
  display: none !important;
}
#devListToolbarSettings {
  display: none !important;
}

/* ---------- Devices: picking computers, a box at the top right of each card (on hover, or for all once one is picked) ---------- */
#column_l #xdevices input[type="checkbox"] {
  width: 1.15rem !important;
  height: 1.15rem !important;
  border: 1px solid var(--navy-200) !important;
  border-radius: 0.35rem !important;
  background: #fff no-repeat center / 12px !important;
}
#column_l #xdevices input[type="checkbox"]::after {
  content: none !important;
}
#column_l #xdevices input[type="checkbox"]:hover {
  border-color: var(--navy) !important;
}
#column_l #xdevices input[type="checkbox"]:checked {
  background-color: var(--navy) !important;
  border-color: var(--navy) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
}
[name="xxdevice1"] #devs > tbody > tr > td:first-child {
  top: 0.85rem !important;
  right: 0.85rem !important;
  transform: none !important;
}
[name="xxdevice1"] .e2t {
  padding-right: 2.25rem !important;
}
.deviceBarCheckbox {
  opacity: 0;
  transition: opacity 0.12s ease-out;
}
[name="xxdevice2"]:hover .deviceBarCheckbox,
[name="xxdevice2"]:focus-within .deviceBarCheckbox,
#xdevices:has(input:checked) .deviceBarCheckbox {
  opacity: 1;
}
@media (hover: none) {
  .deviceBarCheckbox {
    opacity: 1;
  }
}

/* ---------- Devices: what each computer is (system, Windows edition, on or off) ---------- */
[name="xxdevice1"] .e2t > div:not(.e1t):not(.sp-info),
[name="xxdevice1"] div[class^="i"],
.deviceBarIcon > div[class^="j"] {
  display: none !important;
}
.sp-osmark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 0.375rem;
  background: var(--navy-50);
}
.sp-osmark svg {
  width: 22px;
  height: 22px;
}
.deviceBarIcon .sp-osmark {
  width: 30px;
  height: 30px;
}
.deviceBarIcon .sp-osmark svg {
  width: 16px;
  height: 16px;
}
.sp-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sp-sys {
  font-size: 0.85rem;
  color: var(--muted);
}
.sp-states {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.sp-chip.sp-off {
  color: var(--muted);
  background: var(--paper);
  border-color: var(--line);
}
.sp-chip.sp-help {
  color: var(--gold-600);
  background: color-mix(in srgb, var(--gold) 10%, #fff);
  border-color: color-mix(in srgb, var(--gold) 35%, #fff);
}
.DevSt span[id^="Mx"] {
  cursor: pointer;
}

/* ---------- Devices: the list (Activity log's card with dividers) ---------- */
#xdevices > table {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  border-collapse: separate !important;
  border-spacing: 0;
  overflow: hidden;
}
#xdevices > table th {
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid var(--line);
  background: #fff !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted) !important;
  text-align: left !important;
}
#xdevices > table td {
  padding: 0.55rem 1rem !important;
  border-top: 1px solid var(--line);
  background: #fff !important;
  vertical-align: middle;
  font-size: 0.875rem;
  color: var(--ink);
}
#xdevices > table tr:nth-child(2) > td {
  border-top: 0;
}
#xdevices > table tr:has(.DevSt) > td {
  padding: 1rem 1rem 0.6rem !important;
  background: var(--paper) !important;
}
#xdevices > table .DevSt {
  margin: 0 !important;
  font-size: 1.05rem;
}
#xdevices > table tr:has(.DevSt) + tr:not([name]) > td {
  color: var(--muted);
}
[name="xxdevice2"]:hover > td {
  background: var(--paper) !important;
}
[name="xxdevice2"] .bar18 {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  height: auto !important;
  background: transparent !important;
}
[name="xxdevice2"] .deviceBarIcon,
[name="xxdevice2"] .style10 {
  cursor: pointer;
}
[name="xxdevice2"] .style10 {
  font-weight: 600;
  color: var(--navy-900) !important;
}
[name="xxdevice2"] .g1,
[name="xxdevice2"] .g2 {
  display: none !important;
}

/* ---------- Devices: the map ---------- */
#xdevicesmap {
  height: calc(100vh - 26rem) !important;
  min-height: 26rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--paper-200);
}
#devMapToolbar {
  flex: 1 1 100% !important;
  gap: 0.5rem;
}
#devMapToolbar > * {
  margin: 0 !important;
}
#mapSearchLocation {
  flex: 1 1 auto;
  min-width: 12rem;
  padding-left: 2.25rem !important;
  border-radius: 999px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%235a667a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") 0.85rem center no-repeat !important;
}
#xdevicesmap .ol-zoom {
  top: 0.75rem;
  right: 0.75rem;
  left: auto;
  padding: 0;
  background: transparent;
}
#xdevicesmap .ol-zoom button {
  width: 34px;
  height: 34px;
  margin: 0 0 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 1.1rem;
  box-shadow: var(--menu-shadow);
  cursor: pointer;
}
#xdevicesmap .ol-zoom button:hover {
  border-color: var(--navy);
}
#xdevicesmap .ol-attribution {
  font-size: 0.65rem;
}
#xmap-info-window {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line) !important;
  border-radius: 0.65rem !important;
  background: #fff !important;
  box-shadow: var(--menu-shadow);
  color: var(--ink);
  font-size: 0.85rem;
}

/* ---------- A computer: General page ---------- */
#p10info > table {
  width: 100%;
}
#p10html .row > .col:first-child {
  flex: 0 0 11rem !important;
  max-width: 11rem !important;
  width: 11rem !important;
}
#p10html .row > .col:last-child {
  flex: 1 1 auto !important;
  max-width: none !important;
}
#p10html .row [onclick] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: -0.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: background-color 0.07s ease-out;
}
#p10html .row [onclick]:hover {
  background: var(--navy-50);
}
#p10html .row [onclick] svg {
  width: 11px !important;
  height: 11px !important;
  color: var(--navy-400);
}
#p10html > br,
#p10html > table:empty,
#p10html3 {
  display: none !important;
}
.sp-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.sp-actions-row > input,
.sp-actions-row > .btn {
  margin: 0 !important;
}
.sp-grow {
  flex: 1 1 auto;
}
.sp-sidecell {
  width: 19rem !important;
  padding-left: 1.25rem;
}
.sp-sidecell > :not(.sp-side) {
  display: none !important;
}
.sp-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sp-sidecard {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.sp-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}
.sp-status-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
.sp-status-text b {
  font-family: var(--display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--navy-900);
}
.sp-status-text small {
  font-size: 0.85rem;
  color: var(--muted);
}
.sp-status .sp-states {
  flex: 1 1 100%;
}
.sp-where .sp-label {
  margin-bottom: 0.75rem;
}
.sp-minimap {
  position: relative;
  display: block;
  width: 100%;
  height: 168px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper-200);
  cursor: pointer;
  transition: border-color 0.07s ease-out, box-shadow 0.12s ease-out;
}
.sp-minimap:hover {
  border-color: var(--navy);
  box-shadow: var(--lift-shadow);
}
.sp-tiles {
  position: absolute;
  left: 50%;
  top: 50%;
}
.sp-tiles img {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  filter: saturate(0.75);
}
.sp-minipin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 38px;
  transform: translate(-50%, -100%);
}
.sp-osm {
  position: absolute;
  right: 0.35rem;
  bottom: 0.3rem;
  padding: 0 0.3rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.62rem;
  color: var(--muted);
}
.sp-place {
  margin: 0.75rem 0 0;
  font-weight: 600;
  color: var(--ink);
}
.sp-fine {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
/* When it was on: a card, navy while on, gold while asleep (MeshCentral's own blues and greens go). */
table:has(.pwState) {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid var(--line) !important;
  border-radius: 0.75rem;
  border-collapse: separate !important;
  border-spacing: 0;
  overflow: hidden;
}
table:has(.pwState) th {
  padding: 0.75rem 1rem !important;
  background: #fff !important;
  border-bottom: 1px solid var(--line);
}
table:has(.pwState) th .float-end {
  display: none !important;
}
table:has(.pwState) td {
  padding: 0.5rem 1rem !important;
  background: #fff !important;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
table:has(.pwState) td:first-child {
  width: 8rem;
  white-space: nowrap;
}
table:has(.pwState) td:last-child > div {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-200);
}
.pwState {
  height: 0.6rem !important;
  border: 0 !important;
}
.pwsTransparent {
  background: transparent !important;
}
.pwsBlack {
  background: var(--navy) !important;
}
.pwsBlue,
.pwsBlue2,
.pwsLightblue,
.pwsBlueviolet {
  background: var(--gold) !important;
}
.pwsDarkgreen,
.pwsLightseagreen,
.pwsLightseagreen2 {
  background: var(--navy-200) !important;
}

/* ---------- A computer: Desktop, Terminal, Files ---------- */
[onclick^="drotate"],
[onclick^="toggleAspectRatio"],
#autoconnectbutton1,
#connectbutton1rspan,
#connectbutton1hspan,
#p13sizedropdown,
#p13sizedropdown + .sp-select,
#p12warning .icon2,
[cmenu="sshPortContextMenu"],
[cmenu="altPortContextMenu"],
[cmenu="rfbPortContextMenu"],
[cmenu="httpPortContextMenu"],
[cmenu="httpsPortContextMenu"] {
  display: none !important;
}
#deskarea3x,
#p13filetable {
  position: relative;
}
#deskarea3x {
  min-height: 24rem;
  background: var(--navy-950) !important;
  border-radius: 0 0 0.75rem 0.75rem;
}
.sp-idle {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 2rem;
  min-height: 16rem;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 0.75rem;
  text-align: center;
  color: var(--muted);
}
.sp-idle p {
  margin: 0;
  max-width: 34ch;
}
#p13filetable {
  min-height: 18rem;
}
#p12warning {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--warn) 30%, #fff);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--warn) 6%, #fff);
  color: var(--warn);
  font-size: 0.875rem;
  cursor: pointer;
}
#p12warning .warningbox {
  background: transparent !important;
  border: 0 !important;
  color: inherit !important;
  padding: 0 !important;
}
#p13toolbar .btn {
  height: 30px;
}

/* ---------- A computer: Software ---------- */
#p18Status {
  display: none !important;
}
#p18SearchInput {
  min-width: 16rem;
  padding-left: 2.25rem !important;
  border-radius: 999px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%235a667a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") 0.85rem center no-repeat !important;
}
#p18html h4 {
  margin: 1.75rem 0 0.75rem;
  padding: 0 !important;
  border: 0 !important;
  font-family: var(--display) !important;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--navy-900);
}
#p18html table {
  background: #fff;
  border: 1px solid var(--line) !important;
  border-radius: 0.75rem;
  border-collapse: separate !important;
  border-spacing: 0;
  overflow: hidden;
}
#p18html table td,
#p18html table th {
  padding: 0.55rem 1rem !important;
  border-width: 1px 0 0 0 !important;
  border-color: var(--line) !important;
}
#p18html table thead th {
  border-top: 0 !important;
}

/* ---------- A computer: Details ---------- */
#p17info .DevSt {
  margin: 0 0 0.35rem !important;
  font-size: 1.125rem !important;
}
#p17info img[src*="images/details/"] {
  width: 44px !important;
  height: 44px !important;
}

/* ---------- Events (both lists): no words beside the fields, a labelled export ---------- */
.pTable label[for$="filterevents"],
.pTable label[for$="limitdropdown"] {
  display: none !important;
}
.pTable td > .d-flex {
  gap: 0.5rem;
}
.sp-export {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color 0.07s ease-out, border-color 0.07s ease-out;
}
.sp-export:hover {
  border-color: var(--navy);
  background: #fff;
}
#p3events svg,
#p16events svg {
  color: var(--navy-400);
}

/* ---------- Server: numbers as Dashboard stat cards (MeshCentral's green rings go) ---------- */
#serverStats .chartViewCanvas {
  display: none !important;
}
#serverCpuChartView,
#serverMemoryChartView {
  display: inline-flex !important;
  vertical-align: top;
  min-width: 15rem;
  margin: 0 0.75rem 0.75rem 0;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
#serverStats .chartViewText > div:first-child {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
#serverStats .chartViewText b {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--navy-900);
}
#serverStats > br {
  display: none;
}
#serverStatsTable > div {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.75rem;
}
#serverStatsTable > div > .userTableHeader {
  grid-column: 1 / -1;
}
#serverStatsTable > div > .me-2 {
  margin: 0 !important;
}
#serverStatsTable .serverStateTableCell {
  width: 100% !important;
  height: 100%;
  margin: 0;
}
#serverStatsTable .serverStateTableCell td:not(:nth-child(2)) {
  display: none;
}
#serverStatsTable .serverStateTableCell td:nth-child(2) {
  display: flex !important;
  flex-direction: column-reverse;
  gap: 0.15rem;
}
#serverStatsTable .serverStateTableCell td span:first-child {
  font-size: 0.8rem;
  color: var(--muted);
}
#serverStatsTable .serverStateTableCell td span:last-child {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--navy-900);
}

/* ---------- Dialogs: the close button top right, rows aligned, never taller than the window ---------- */
.modal-header {
  display: flex !important;
  align-items: center;
  gap: 1rem;
}
.modal-header .btn-close {
  flex: none;
  margin: 0 0 0 auto !important;
}
.modal-body {
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
}
.modal #dialog2 > label:has(> input[type="checkbox"]),
.modal .modal-body > label:has(> input[type="checkbox"]) {
  display: flex !important;
  flex-direction: row-reverse !important;
  justify-content: space-between !important;
  align-items: center;
  width: 100%;
  margin: 0 !important;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.modal #dialog2 > label:has(> input[type="checkbox"]):last-of-type {
  border-bottom: 0;
}
.modal #dialog2 > br {
  display: none;
}
input[type="file"] {
  max-width: 100%;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 0.85rem;
  color: var(--muted);
}
input[type="file"]::file-selector-button {
  height: 32px;
  margin-right: 0.75rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.07s ease-out;
}
input[type="file"]::file-selector-button:hover {
  border-color: var(--navy);
}

/* ---------- Scroll thumbs: sideways too; an invisible thumb never catches a click (bug-hunter) ---------- */
.sp-thumb:not([data-on]):not([data-drag]) {
  pointer-events: none;
}
.sp-thumb-x {
  height: 6px;
}
.sp-thumb-x:hover,
.sp-thumb-x[data-drag="true"] {
  width: auto;
  height: 8px;
  margin-left: 0;
  margin-top: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .sp-tab-in,
  .sp-swap,
  .sp-idle,
  body.sp-ready #container {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 800px) {
  .sp-sidecell {
    display: block;
    width: auto !important;
    padding: 1rem 0 0;
  }
  #p10info > table,
  #p10info > table > tbody,
  #p10info > table > tbody > tr,
  #p10info > table > tbody > tr > td {
    display: block;
    width: 100% !important;
  }
}

/* MeshCentral pins its dialog switches to the left with absolute positioning: they follow the row here. */
.modal-content label:has(> input[type="checkbox"]) {
  padding-left: 0 !important;
}
.modal-content label > input[type="checkbox"] {
  position: relative !important;
  top: auto !important;
  left: auto !important;
}
.modal-content input[type="checkbox"]::after {
  display: block !important;
  content: "" !important;
}
#devListToolbarViewIcons > #devViewButton3,
#devListToolbarViewIcons > #devViewButton5 {
  display: none !important;
}
/* The list fits its card: MeshCentral's fixed column widths go, the name takes what is left. */
#xdevices > table {
  table-layout: auto;
}
#xdevices > table th,
#xdevices > table td {
  width: auto !important;
  white-space: nowrap;
}
#xdevices > table th:first-child {
  width: 50% !important;
}
#xdevices > table th {
  letter-spacing: 0.1em !important;
}

/* A computer's header: its moves (group, delete) on the right of the title, on every tab. */
.sp-head-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
  font-family: var(--body) !important;
  letter-spacing: 0;
}
.sp-head-actions .btn {
  font-family: var(--body) !important;
}
/* One filled button per toolbar: Connect. Actions and Settings beside it are ghost pills. */
.areaHead .btn-primary:not([id^="connectbutton"]):not(#p13Connect),
.areaHead .sp-proxy.btn-primary {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--navy) !important;
}
.areaHead .btn-primary:not([id^="connectbutton"]):not(#p13Connect):hover,
.areaHead .sp-proxy.btn-primary:hover {
  background: #fff !important;
  border-color: var(--navy) !important;
  box-shadow: none !important;
  transform: none !important;
}
[onclick^="cmsshportaction"],
[onclick^="cmaltportaction"],
[onclick^="cmrfbportaction"],
[onclick^="cmhttpportaction"],
[onclick^="cmhttpsportaction"],
.pTable [data-sp-export] {
  display: none !important;
}
#termarea3x {
  position: relative;
  min-height: 24rem;
  background: var(--navy-950) !important;
}
/* Files: the file buttons only while connected; Connect itself always stays. */
#p13:has(.sp-idle) #p13toolbar .areaHead2,
#p13:has(.sp-idle) #p13toolbar .areaHead3 {
  display: none !important;
}
#p13toolbar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}
#p13toolbar .areaHead2,
#p13toolbar .areaHead3 {
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 0.75rem;
}
#p18html td:nth-child(2),
#p18html td:nth-child(4),
#p18html td:nth-child(5) {
  white-space: nowrap;
}

#p17info .DevSt b {
  font-family: var(--display) !important;
  font-weight: 500;
  color: var(--navy-900);
}

/* Server: the stats-over-time tab goes (six colours that are not Splendom's, nothing to act on). */
#topbar #ServerStats {
  display: none !important;
}
#p6info > strong {
  display: block;
  margin: 1.5rem 0 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

/* Terminal and file editor keep a monospace grid (our Inter on everything broke the terminal's letters). */
#termarea3x,
#termarea3x *,
.xterm,
.xterm *,
#d4editorarea,
#d4editorarea *,
textarea[id$="Console"],
pre,
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace !important;
  letter-spacing: 0 !important;
}

/* ---------- Files, connected: ghost buttons, a list card, a box to pick each file, Lucide folder and file marks ---------- */
#p13toolbar .areaHead2 .btn-primary,
#p13toolbar .areaHead2 .sp-proxy {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  color: var(--navy) !important;
}
#p13toolbar .areaHead2 .btn-primary:hover:not(:disabled),
#p13toolbar .areaHead2 .sp-proxy:hover:not(:disabled) {
  background: #fff !important;
  border-color: var(--navy) !important;
  box-shadow: none !important;
  transform: none !important;
}
#p13toolbar .areaHead2 .btn:disabled {
  background: transparent !important;
  opacity: 0.45 !important;
}
#p13filetable:has(.filelist) {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.filelist {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 0.875rem;
  color: var(--ink);
  transition: background-color 0.06s ease-out;
}
.filelist:last-child {
  border-bottom: 0;
}
.filelist:hover {
  background: var(--paper);
}
.filelist > input {
  order: 1;
}
.filelist > span:last-child {
  order: 2;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.filelist > span:not(.fsize):not(:last-child) {
  order: 3;
  width: 6rem;
  text-align: right;
  color: var(--muted);
}
.filelist > .fsize {
  order: 4;
  width: 12rem;
  text-align: right;
  color: var(--muted);
  font-size: 0.8rem;
}
.filelist a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink) !important;
  font-weight: 500;
  text-decoration: none !important;
}
.filelist a:hover {
  color: var(--navy) !important;
  text-decoration: underline !important;
}
.filelist [class^="fileIcon"] {
  flex: none;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234070bf' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3C/svg%3E") center / 18px no-repeat !important;
}
.filelist .fileIcon2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23eef3fb' stroke='%23003479' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z'/%3E%3C/svg%3E") !important;
  cursor: pointer;
}
#column_l #p13files input[type="checkbox"] {
  width: 1.15rem !important;
  height: 1.15rem !important;
  border: 1px solid var(--navy-200) !important;
  border-radius: 0.35rem !important;
  background: #fff no-repeat center / 12px !important;
}
#column_l #p13files input[type="checkbox"]::after {
  content: none !important;
}
#column_l #p13files input[type="checkbox"]:checked {
  background-color: var(--navy) !important;
  border-color: var(--navy) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
}

/* ---------- Moving between pages: a crossfade, never a blank frame (View Transitions; theme.js) ---------- */
#masthead {
  view-transition-name: sp-top;
}
#page_leftbar {
  view-transition-name: sp-menu;
}
#column_l {
  view-transition-name: sp-main;
}
#sp-head {
  view-transition-name: sp-head;
}
#column_l > #topbar {
  view-transition-name: sp-tabs;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}
::view-transition-group(sp-main),
::view-transition-group(sp-head),
::view-transition-group(sp-tabs) {
  animation-duration: 0.28s;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}
::view-transition-old(sp-main) {
  animation: sp-vt-out 0.14s ease-out both;
}
::view-transition-new(sp-main) {
  animation: sp-vt-in 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
html[data-sp-move="tab"]::view-transition-new(sp-main) {
  animation: sp-vt-tab 0.22s ease-out both;
}
@keyframes sp-vt-out {
  to {
    opacity: 0;
  }
}
@keyframes sp-vt-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes sp-vt-tab {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* With nothing connected the screen and terminal areas are paper from the first frame (no dark flash). */
#deskarea3x:has(.sp-idle),
#termarea3x:has(.sp-idle) {
  background: var(--paper) !important;
}
#deskarea3x:has(.sp-idle) > :not(.sp-idle),
#termarea3x:has(.sp-idle) > :not(.sp-idle) {
  visibility: hidden;
}

/* ---------- Phone: the device list's search on its own row; a computer's page in one column ---------- */
@media (max-width: 800px) {
  #devListToolbar,
  #devListToolbarSpan > #devListToolbar {
    flex-wrap: wrap !important;
  }
  #devListToolbar > #SearchInput {
    order: 1 !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
  #p10info tr:has(#p10html) {
    display: flex !important;
    flex-direction: column;
  }
  #p10info tr:has(#p10html) > td:not([style*="display:none"]):not([style*="display: none"]) {
    display: block !important;
    width: 100% !important;
    padding-left: 0 !important;
  }
  #p10info tr:has(#p10html) > td:empty,
  #p10info tr:has(#p10html) > td[style*="width:20px"] {
    display: none !important;
  }
  #p10html .row > .col:first-child {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .sp-head-actions {
    margin-left: 0;
  }
}

/* A scrolled page crossfades as one piece, so its header is never drawn over the masthead (bug-hunter). */
html.sp-vt-flat #sp-head,
html.sp-vt-flat #column_l > #topbar {
  view-transition-name: none;
}
/* A click during a crossfade reaches the page underneath instead of being lost (bug-hunter). */
::view-transition {
  pointer-events: none;
}

/* No computer at all: no search, filters or Columns to show, only the empty state. */
#p1:has(#NoMeshesPanel:not([style*="display: none"]):not([style*="display:none"])) #devListToolbarSpan,
#p1:has(#NoMeshesPanel:not([style*="display: none"]):not([style*="display:none"])) #xdevices {
  display: none !important;
}

/* Pages flow in the one scrolling column: MeshCentral's own fixed-height inner scroll areas go (no scroll inside a
   scroll). The device list keeps its own, which MeshCentral needs to draw cards lazily. */
#column_l > div[id^="p"] > [id$="info"] {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
#serverStats {
  margin-left: 0 !important;
}
/* Server has one tab left (General): no tab row for a single tab. */
#topbar #ServerSubMenuSpan {
  display: none !important;
}

/* No computer at all: the empty state alone (views, toolbar, list and map go). */
body.sp-none #p1title,
body.sp-none #devListToolbarSpan,
body.sp-none #xdevices,
body.sp-none #xdevicesmap {
  display: none !important;
}
body.sp-none #NoMeshesPanel {
  display: block !important;
}

/* Server statistics: the CPU and memory cards in the same grid as the state cards, all one size, and figures
   of fixed width, so a number that changes every few seconds never resizes a card (Gonzalo, 30-10). */
#serverStats {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.75rem;
}
#serverStats > #serverCpuChartView,
#serverStats > #serverMemoryChartView {
  display: flex !important;
  min-width: 0;
  margin: 0 !important;
}
#serverStats > #serverStatsTable {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
}
#serverStats .chartViewText b,
#serverStatsTable .serverStateTableCell td span:last-child {
  font-variant-numeric: tabular-nums;
}
/* ... and the same card as the state ones: number on top, label under it, one height for all. */
#p6info > br {
  display: none;
}
#serverStats > #serverCpuChartView,
#serverStats > #serverMemoryChartView {
  padding: 0.75rem 1rem !important;
}
#serverStats > #serverCpuChartView,
#serverStats > #serverMemoryChartView,
#serverStatsTable .serverStateTableCell {
  box-sizing: border-box;
  min-height: 7rem;
}
#serverStats .chartViewText {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.15rem;
}
#serverStats .chartViewText > div:first-child {
  font-size: 0.8rem !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  font-weight: 400 !important;
  color: var(--muted);
}
#serverStats .chartViewText b {
  font-size: 1.5rem;
  line-height: 1.2;
}
#serverStatsTable .serverStateTableCell td:nth-child(2) {
  justify-content: flex-end;
}

/* ==========================================================================
   Phase 2 (30-10): our own dialog, the Apps page, a Windows computer's set-up card
   ========================================================================== */
.sp-dialog-back {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 15, 38, 0.46);
  animation: sp-fade-in 0.2s ease both;
}
.sp-dialog-back[data-leaving="true"] {
  animation: sp-fade-out 0.18s ease both;
}
@keyframes sp-fade-in {
  from {
    opacity: 0;
  }
}
@keyframes sp-fade-out {
  to {
    opacity: 0;
  }
}
.sp-dialog {
  display: flex;
  flex-direction: column;
  width: min(32rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 40px 90px -40px rgba(0, 25, 60, 0.6);
  animation: sp-dialog-in 0.32s cubic-bezier(0.2, 0.9, 0.25, 1.05) both;
}
.sp-dialog.sp-wide {
  width: min(40rem, 100%);
}
.sp-dialog > header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.sp-dialog > header h2 {
  flex: 1;
  margin: 0;
  font-family: var(--display) !important;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--navy-900);
}
.sp-x {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.07s ease-out, background-color 0.07s ease-out;
}
.sp-x:hover {
  border-color: var(--navy);
  background: #fff;
}
.sp-x svg {
  width: 14px;
  height: 14px;
}
.sp-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  overflow-y: auto;
  font-size: 0.875rem;
  color: var(--ink);
}
.sp-dialog-body p {
  margin: 0;
  line-height: 1.55;
}
.sp-dialog > footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
}
.sp-dialog-note {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--paper);
  color: var(--ink);
}
.sp-dialog-note:empty {
  display: none;
}
.sp-dialog-note.sp-bad {
  border-color: color-mix(in srgb, var(--danger) 30%, #fff);
  background: color-mix(in srgb, var(--danger) 5%, #fff);
  color: var(--danger);
}
.sp-busy {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}
.sp-spin {
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid var(--navy-100);
  border-top-color: var(--navy);
  border-radius: 999px;
  animation: sp-spin 0.9s linear infinite;
}
@keyframes sp-spin {
  to {
    transform: rotate(360deg);
  }
}
.sp-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sp-dialog .sp-label {
  margin: 0.25rem 0 0;
}
.sp-dialog .sp-select,
.sp-dialog .sp-select > button {
  width: 100%;
}
.sp-bullets,
.sp-steps {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
}
.sp-steps li + li {
  margin-top: 0.4rem;
}
.sp-chosen,
.sp-results,
.sp-accounts {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  overflow: hidden;
}
.sp-chosen > li,
.sp-results > li,
.sp-accounts > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid var(--line);
}
.sp-chosen > li:first-child,
.sp-results > li:first-child,
.sp-accounts > li:first-child {
  border-top: 0;
}
.sp-chosen > li > span,
.sp-results > li > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.sp-chosen small {
  margin-left: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.sp-chosen .sp-x {
  width: 26px;
  height: 26px;
}
.sp-chosen .sp-x svg {
  width: 12px;
  height: 12px;
}
.sp-accounts label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between !important;
  width: 100%;
  gap: 0.75rem;
  margin: 0;
  cursor: pointer;
}
.sp-accounts label > span {
  display: flex;
  flex-direction: column;
}
.sp-accounts small {
  color: var(--muted);
  font-size: 0.8rem;
}
.sp-catalog {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sp-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 30px;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.07s ease-out, background-color 0.07s ease-out;
}
.sp-pick:hover {
  border-color: var(--navy);
}
.sp-pick[data-on="true"] {
  background: var(--navy-50);
  border-color: var(--navy-100);
}
.sp-other {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sp-other .form-control {
  flex: 1 1 10rem;
  min-width: 0;
}

/* Apps: one card per profile, the Dashboard's tool cards */
.sp-apps-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}
.sp-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1rem;
}
.sp-profile {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  animation: sp-rise 0.5s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.sp-profile > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem 0.75rem;
}
.sp-profile h3 {
  margin: 0;
  font-family: var(--display) !important;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--navy-900);
}
.sp-profile-apps {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.4rem;
  padding: 0 1.25rem 1rem;
}
.sp-app {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink);
}
.sp-app svg {
  color: var(--navy-400);
}
.sp-profile > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--line);
}

/* A Windows computer's set-up card */
.sp-setup-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sp-setup-list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}
.sp-setup-list > li:first-child {
  border-top: 0;
  padding-top: 0;
}
.sp-setup-list > li > span {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.5rem;
  align-items: center;
  min-width: 0;
}
.sp-setup-list > li > span > svg {
  grid-row: span 2;
  width: 16px;
  height: 16px;
  color: var(--navy-400);
}
.sp-setup-list b {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.sp-setup-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--muted);
}
.sp-setup-list .btn {
  flex: none;
}
@media (prefers-reduced-motion: reduce) {
  .sp-dialog-back,
  .sp-dialog,
  .sp-profile,
  .sp-spin {
    animation: none !important;
  }
}

/* ---------- Remote control, Fill window and Full screen (Gonzalo, 31-10) ----------
   Only the remote screen and its two toolbars, the whole window: our frame (header, side menu, section header, the
   page's padding and its scroll) steps aside, as MeshCentral's own sheet expects. "Back to normal" shows only then. */
body.fulldesk #masthead,
body.fulldesk #page_leftbar,
body.fulldesk #sp-head,
body.fulldesk #topbar {
  display: none !important;
}
body.fulldesk #container,
body.fulldesk.fullscreen #container {
  display: block !important;
  height: 100vh !important;
  max-height: none !important;
}
body.fulldesk #column_l,
body.fulldesk.fullscreen #column_l {
  padding: 0 !important;
  overflow: hidden !important;
  height: 100vh !important;
  max-height: none !important;
}
body.fulldesk #column_l > div {
  max-width: none !important;
}
body.fulldesk #p11,
body.fulldesk #p12 {
  height: 100% !important;
}
.sp-exitfull {
  display: none !important;
}
body.fulldesk .sp-exitfull {
  display: inline-flex !important;
}
body.fulldesk #idx_deskFullBtn2,
body.fulldesk #idx_termFullBtn2 {
  display: none !important; /* our "Back to normal" instead of MeshCentral's lone cross */
}

/* ---------- Remote control's tools: one menu instead of a row of small icons (Gonzalo, 31-10) ----------
   MeshCentral's icons, its Tools button and the latency stay in the page (the menu clicks them), out of sight. */
#deskarea4Icons > span[id^="Desk"]:not(#DeskMonitorSelectionSpan):not(#DeskTimer),
#DeskToolsButton {
  display: none !important;
}
#deskarea4Icons {
  gap: 0.5rem;
}
#DeskTimer {
  width: auto !important;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sp-desktools .sp-chev {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}
.sp-desktools[data-open="true"] .sp-chev {
  transform: rotate(180deg);
}
.sp-menu.sp-actions {
  min-width: 17rem;
  max-height: min(34rem, calc(100vh - 6rem));
}
.sp-actions .sp-menu-item:focus {
  outline: none;
  background: var(--navy-50);
  color: var(--navy);
}
.sp-actions .sp-menu-item:focus-visible {
  box-shadow: inset 0 0 0 2px var(--navy);
}
.sp-actions .sp-menu-item svg {
  width: 16px;
  height: 16px;
  color: var(--navy);
}
.sp-menu-group {
  padding: 0.6rem 0.65rem 0.25rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sp-menu-group:first-child {
  padding-top: 0.3rem;
}

/* ---------- Remote control on a locked computer: how to get past it, over its screen (Gonzalo, 31-10) ---------- */
.sp-locked {
  /* Centred by its margins: the entrance animation ends on transform: none, which would undo a translate. */
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0.6rem 0.7rem 0.6rem 0.9rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: var(--menu-shadow);
  font-size: 0.85rem;
  line-height: 1.35;
  text-align: left;
  animation: sp-menu-in 0.16s ease-out both;
}
.sp-locked[hidden] {
  display: none !important;
}
.sp-locked > svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--navy);
}
.sp-locked strong {
  display: block;
  color: var(--navy);
}
.sp-locked .btn {
  flex: none;
  white-space: nowrap;
}

/* ---------- People in Devices: a device signed out leaves its list (Gonzalo, 31-10) ---------- */
.sp-row.sp-leaving {
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}
