/* CSS variables for themes */
:root {
  --sidebar-width: 248px;
  --sidebar-width-collapsed: 78px;
  --sidebar-flyout-width: 220px;
  --sidebar-motion-duration: 420ms;
  --sidebar-motion-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sidebar-content-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Dark theme tuned to match demo feel */
  --sidebar-bg: #12233a;
  --sidebar-text: #d8e6ff;
  --sidebar-hover: #1c395c;
  --sidebar-border: #2a4268;

  --sidebar-bg-light: #ffffff;
  --sidebar-text-light: #2b3a55;
  --sidebar-hover-light: #f3f5f9;
  --sidebar-border-light: #e6e9ef;

  --sidebar-bg-dark: #0b1422;
  --sidebar-text-dark: #cbd7ee;
  --sidebar-hover-dark: #132033;
  --sidebar-border-dark: #1b2a44;

  --topbar-bg: #ffffff;
  --topbar-border: #e6e9ef;
  --notification-top-offset: 76px;

  --module-color-rema: #E26D5C;
  --module-color-rmm: #4062BB;
  --module-color-itam: #FFCF00;
}

html { height: 100%; font-size: 15px; }
body { height: 100%; overflow: hidden; }
html, body { background-color: var(--bs-body-bg); }
body { background: var(--bs-body-bg); }

.app { display: flex; min-height: 100vh; height: 100vh; overflow: hidden; background: var(--bs-body-bg); }

[data-module-key="rema"] { --module-accent-color: var(--module-color-rema); }
[data-module-key="rmm"] { --module-accent-color: var(--module-color-rmm); }
[data-module-key="itam"] { --module-accent-color: var(--module-color-itam); }

.rapid-theme-tooltip {
  --bs-tooltip-max-width: 280px;
  --bs-tooltip-padding-x: 0.62rem;
  --bs-tooltip-padding-y: 0.42rem;
  --bs-tooltip-font-size: 0.76rem;
  --bs-tooltip-border-radius: 0.5rem;
  --bs-tooltip-opacity: 1;
  --bs-tooltip-bg: rgba(255, 255, 255, 0.96);
  --bs-tooltip-color: #162033;
  filter: drop-shadow(0 10px 22px rgba(15, 23, 42, 0.16));
}

.rapid-theme-tooltip .tooltip-inner {
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-weight: 650;
  letter-spacing: 0;
}

[data-bs-theme="dark"] .rapid-theme-tooltip,
.app.theme-dark ~ .tooltip.rapid-theme-tooltip,
body.theme-dark .rapid-theme-tooltip {
  --bs-tooltip-bg: rgba(15, 26, 43, 0.98);
  --bs-tooltip-color: #d8e6ff;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.34));
}

[data-bs-theme="dark"] .rapid-theme-tooltip .tooltip-inner,
body.theme-dark .rapid-theme-tooltip .tooltip-inner {
  border-color: rgba(216, 230, 255, 0.14);
}

.module-text[data-module-key] {
  color: var(--module-accent-color) !important;
  font-weight: 700;
}

.module-badge[data-module-key] {
  background: color-mix(in srgb, var(--module-accent-color) 18%, transparent) !important;
  border-color: color-mix(in srgb, var(--module-accent-color) 50%, var(--bs-border-color) 50%) !important;
  color: color-mix(in srgb, var(--module-accent-color) 78%, #1f2937 22%) !important;
  font-weight: 700;
}

[data-bs-theme="dark"] .module-badge[data-module-key] {
  background: color-mix(in srgb, var(--module-accent-color) 22%, transparent) !important;
  border-color: color-mix(in srgb, var(--module-accent-color) 56%, var(--bs-border-color) 44%) !important;
  color: color-mix(in srgb, var(--module-accent-color) 72%, #ffffff 28%) !important;
}

.module-event-code .module-prefix[data-module-key] {
  color: var(--module-accent-color);
  font-weight: 700;
}

.btn-module {
  --module-btn-color: var(--module-accent-color);
  color: var(--module-btn-color) !important;
  border-color: color-mix(in srgb, var(--module-btn-color) 58%, var(--bs-border-color) 42%) !important;
  background: color-mix(in srgb, var(--module-btn-color) 10%, transparent) !important;
}

.btn-module:hover,
.btn-module:focus {
  color: #ffffff !important;
  border-color: var(--module-btn-color) !important;
  background: var(--module-btn-color) !important;
}

[data-bs-theme="dark"] .btn-module {
  color: color-mix(in srgb, var(--module-btn-color) 72%, #ffffff 28%) !important;
  border-color: color-mix(in srgb, var(--module-btn-color) 62%, var(--bs-border-color) 38%) !important;
  background: color-mix(in srgb, var(--module-btn-color) 16%, transparent) !important;
}

select[data-module-select].module-selected-rema { color: var(--module-color-rema); font-weight: 700; }
select[data-module-select].module-selected-rmm { color: var(--module-color-rmm); font-weight: 700; }
select[data-module-select].module-selected-itam { color: #9a7b00; font-weight: 700; }
[data-bs-theme="dark"] select[data-module-select].module-selected-itam { color: var(--module-color-itam); }

select[data-module-select] option[value="rema"],
select[data-module-select] option[value="REMA"] { color: var(--module-color-rema); font-weight: 700; }
select[data-module-select] option[value="rmm"],
select[data-module-select] option[value="RMM"] { color: var(--module-color-rmm); font-weight: 700; }
select[data-module-select] option[value="itam"],
select[data-module-select] option[value="ITAM"] { color: #9a7b00; font-weight: 700; }

/* Sidebar base */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 1040;
  transition: width var(--sidebar-motion-duration) var(--sidebar-motion-ease), border-color 180ms ease, background-color 180ms ease;
  will-change: width;
}
.sidebar .brand-text { font-weight: 600; }
.sidebar .logo-icon { color: #4dd0e1; }
.sidebar .sidebar-brand button { color: inherit; border-color: var(--sidebar-border); }
.sidebar .btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 18px;
  background: transparent;
  border: 1px solid var(--sidebar-border);
  color: inherit;
}
.sidebar .btn-icon:hover { background: rgba(255,255,255,0.08); }

/* Nav */
.sidebar-nav { flex: 1 1 auto; overflow-y: hidden; }
.sidebar:hover .sidebar-nav { overflow-y: auto; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 14px; color: inherit; text-decoration: none; border-left: 3px solid transparent; transition: padding .2s ease; position: relative; }
.sidebar-nav .nav-link .material-symbols-rounded { font-size: 18px; }
.sidebar-nav .nav-link:hover { background: var(--sidebar-hover); }
.sidebar-nav .nav-link.active {
  background: var(--sidebar-hover);
  border-left-color: currentColor;
  font-weight: 600;
}

html:not(.rapid-sidebar-ready) .sidebar,
html:not(.rapid-sidebar-ready) .main,
html:not(.rapid-sidebar-ready) .sidebar .brand-text,
html:not(.rapid-sidebar-ready) .sidebar .nav-link,
html:not(.rapid-sidebar-ready) .sidebar .nav-link .nav-label {
  transition: none !important;
}

.sidebar-nav .nav-link.active[data-module-key] {
  border-left-color: var(--module-accent-color);
}

.sidebar-nav .nav-link.active[data-module-key]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--module-accent-color);
}
.sidebar-nav .nav-item { position: relative; }
.sidebar-nav .has-sub .sub-caret { margin-left: auto; }
.sub-nav { display: none; padding-left: 44px; }
.sub-nav .sub-link { display: block; padding: 5px 0; color: inherit; text-decoration: none; opacity: .9; }
.sub-nav .sub-link:hover { opacity: 1; }
.sub-nav .sub-link.active {
  opacity: 1;
  font-weight: 600;
  text-decoration: none;
}
.sub-nav .sub-link.active .sub-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sub-nav .has-sub > .sub-link { display: flex; align-items: center; gap: 8px; }
.sub-nav .has-sub > .sub-link { padding-right: 14px; }
.sub-nav .sub-link .sub-label { flex: 1 1 auto; min-width: 0; }
.sub-nav .sub-caret.sub-caret-yellow {
  color: #f6c343;
  font-size: 18px;
  transition: transform .18s ease;
}
.sub-nav .has-sub:not(.open) > .sub-link .sub-caret.sub-caret-yellow { transform: rotate(-90deg); }
.sub-nav .has-sub.open > .sub-link .sub-caret.sub-caret-yellow { transform: rotate(0deg); }
.sub-nav .has-sub > .sub-nav {
  padding-left: 16px;
  margin-left: 4px;
  border-left: 1px solid rgba(255,255,255,.16);
}
.sidebar.theme-light .sub-nav .has-sub > .sub-nav { border-left-color: rgba(43,58,85,.2); }
.sidebar.theme-dark .sub-nav .has-sub > .sub-nav { border-left-color: rgba(203,215,238,.16); }

/* Footer */
.sidebar-footer { border-top: 1px solid var(--sidebar-border); }
.sidebar-footer .theme-label { font-size: 12px; opacity: .8; }

/* Topbar */
.main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin-left: var(--sidebar-width);
  transition: margin-left var(--sidebar-motion-duration) var(--sidebar-motion-ease);
  box-sizing: border-box;
  background: var(--bs-body-bg);
  will-change: margin-left;
}
.topbar { position: sticky; top: 0; z-index: 1020; background: var(--topbar-bg); border-bottom: 1px solid var(--topbar-border); padding: 10px 16px; }
.topbar { color: var(--topbar-text); }
.topbar .page-title { font-weight: 600; }
.topbar .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

.topbar-theme-toggle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease;
}

.topbar-theme-toggle .material-symbols-rounded {
  font-size: 21px;
}

.topbar-theme-toggle:hover {
  text-decoration: none;
  color: color-mix(in srgb, var(--bs-primary) 72%, var(--topbar-text) 28%);
  transform: translateY(-1px);
}

.topbar-theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--ux-focus-ring);
  border-radius: 8px;
}

.notification-menu {
  position: relative;
}

.notification-bell {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.08));
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 0;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.notification-bell .material-symbols-rounded {
  font-size: 20px;
}

.notification-bell:hover {
  text-decoration: none;
  color: #dc3545;
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.12));
}

.notification-bell:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 91, 102, 0.18);
}

.notification-menu--open .notification-bell {
  color: #b42318;
}

.notification-bell__badge {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc3545;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.35);
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 1080;
  width: min(26rem, calc(100vw - 1.25rem));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.95rem;
  background: var(--bs-body-bg);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden;
  transition: opacity calc(var(--sidebar-motion-duration) * 0.52) ease, transform var(--sidebar-motion-duration) var(--sidebar-motion-ease), visibility var(--sidebar-motion-duration) step-end;
  will-change: transform, opacity;
}

.notification-menu--open .notification-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition: opacity calc(var(--sidebar-motion-duration) * 0.52) ease, transform var(--sidebar-motion-duration) var(--sidebar-motion-ease), visibility 0s step-start;
}

.topbar-avatar-toggle {
  transition: transform 180ms ease, box-shadow 180ms ease;
  transform-origin: center;
}

.topbar-avatar-toggle:hover {
  transform: translateY(-1px);
}

.topbar-avatar-toggle:focus-visible {
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(64, 98, 187, 0.18);
}

.topbar-profile-menu {
  display: block;
  top: calc(100% + 0.9rem);
  right: 0;
  left: auto;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-18px) scale(0.985);
  transform-origin: top center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.95rem;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
  will-change: transform, opacity;
  transition: opacity calc(var(--sidebar-motion-duration) * 0.50) ease, transform calc(var(--sidebar-motion-duration) * 0.62) var(--sidebar-motion-ease), visibility calc(var(--sidebar-motion-duration) * 0.62) step-end;
}

.topbar-profile-menu[data-bs-popper] {
  top: calc(100% + 0.9rem);
  right: 0;
  left: auto;
  margin-top: 0;
}

.topbar-profile-menu.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity calc(var(--sidebar-motion-duration) * 0.50) ease, transform calc(var(--sidebar-motion-duration) * 0.62) var(--sidebar-motion-ease), visibility 0s step-start;
}

.app.theme-dark .topbar-profile-menu {
  background: #132033;
  border-color: rgba(203, 215, 238, 0.12);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
}

@media (prefers-reduced-motion: reduce) {
  .notification-dropdown,
  .notification-menu--open .notification-dropdown,
  .topbar-avatar-toggle,
  .topbar-profile-menu,
  .topbar-profile-menu.show {
    transition: none !important;
    transform: none !important;
  }
}

.notification-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 18px;
  width: 16px;
  height: 16px;
  background: #ff5b66;
  transform: rotate(45deg);
  border-radius: 4px 0 0 0;
}

.notification-dropdown__header,
.notification-dropdown__footer {
  padding: 0.7rem 0.9rem;
}

.notification-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, #ff5b66 0%, #ff6f61 100%);
}

.notification-dropdown__header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.notification-dropdown__header .fw-semibold {
  font-size: 1rem;
  font-weight: 600 !important;
  line-height: 1.15;
}

.notification-dropdown__header .text-muted,
.notification-dropdown__header .small {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82) !important;
}

.notification-dropdown__header .btn-outline-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  padding: 0.22rem 0.58rem;
  font-size: 0.78rem;
  line-height: 1.1;
}

.notification-dropdown__header .btn-outline-secondary:hover {
  color: #ff5b66;
  background: var(--bs-body-bg);
  border-color: var(--bs-body-bg);
}

.notification-dropdown__body {
  max-height: min(26rem, calc(100vh - 10rem));
  overflow-y: auto;
  padding: 0.35rem 0;
  background: linear-gradient(180deg, #fff 0%, #fffdfd 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 111, 97, 0.55) rgba(15, 23, 42, 0.08);
}

.notification-dropdown__body::-webkit-scrollbar {
  width: 10px;
}

.notification-dropdown__body::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.06);
}

.notification-dropdown__body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 111, 97, 0.8), rgba(255, 91, 102, 0.6));
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.75);
}

.notification-dropdown__empty {
  padding: 1rem;
  color: #64748b;
  font-size: 0.88rem;
}

.notification-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.18s ease;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.notification-dropdown-item:last-child {
  border-bottom: 0;
}

.notification-dropdown-item:hover {
  background: rgba(255, 91, 102, 0.03);
}

.notification-dropdown-item__body {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.028);
}

.notification-dropdown-item:hover .notification-dropdown-item__body {
  background: rgba(255, 91, 102, 0.055);
}

.notification-dropdown-item--read .notification-dropdown-item__body {
  background: rgba(15, 23, 42, 0.035);
}

.notification-dropdown-item--unread .notification-dropdown-item__body {
  background: rgba(255, 91, 102, 0.08);
}

.notification-dropdown-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.28rem;
}

.notification-dropdown-item__module,
.notification-dropdown-item__severity {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.13rem 0.48rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.notification-dropdown-item__module {
  background: rgba(37, 99, 235, 0.09);
  color: #2563eb;
}

.notification-dropdown-item__severity--critical {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.notification-dropdown-item__severity--warning {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.notification-dropdown-item__severity--info,
.notification-dropdown-item__severity--success,
.notification-dropdown-item__severity {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
}

.notification-dropdown-item__title {
  font-weight: 400;
  line-height: 1.3;
  font-size: 0.9rem;
  color: #1f2544;
}

.notification-dropdown-item__message {
  margin-top: 0.12rem;
  color: #7a8196;
  font-size: 0.8rem;
  line-height: 1.32;
}

.notification-dropdown-item__time {
  margin-top: 0.25rem;
  font-size: 0.74rem;
  color: #9298aa;
}

.notification-dropdown-item--unread .notification-dropdown-item__title,
.notification-dropdown-item--unread .notification-dropdown-item__message {
  color: #1c2140;
}

.notification-dropdown-item__primary-link,
.notification-dropdown-item__secondary-link {
  color: inherit;
  text-decoration: none;
}

.notification-dropdown-item__primary-link:hover,
.notification-dropdown-item__secondary-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notification-dropdown-item__actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding-top: 0.6rem;
}

.notification-dropdown-item__status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2dd4bf;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.notification-dropdown-item--unread .notification-dropdown-item__status-dot {
  opacity: 1;
  transform: scale(1);
}

.notification-dropdown-item__dismiss {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-dropdown-item__dismiss:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

.notification-dropdown-item__dismiss .material-symbols-rounded {
  font-size: 17px;
}

.notification-dropdown__footer {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: var(--bs-body-bg);
}

@media (max-width: 576px) {
  .notification-dropdown {
    position: fixed;
    top: calc(var(--notification-top-offset) - 10px);
    right: 0.625rem;
    left: 0.625rem;
    width: auto;
    transform-origin: top center;
  }

  .notification-dropdown::before {
    right: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notification-bell,
  .notification-dropdown,
  .notification-dropdown-item,
  .notification-dropdown-item__status-dot {
    transition: none;
  }
}

/* Active terminal indicator badge */
.active-terminal-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #16a34a;
  border-radius: 20px;
  padding: 3px 10px 3px 7px;
  white-space: nowrap;
  animation: terminal-pulse 1.6s ease-in-out infinite;
}
.active-terminal-indicator .terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #bbf7d0;
  flex-shrink: 0;
  animation: terminal-dot-blink 1.6s ease-in-out infinite;
}
@keyframes terminal-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); }
  50%       { box-shadow: 0 0 0 5px rgba(22,163,74,0); }
}
@keyframes terminal-dot-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

.active-remote-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #0f766e;
  border-radius: 20px;
  padding: 3px 10px 3px 7px;
  white-space: nowrap;
  animation: remote-pulse 1.8s ease-in-out infinite;
}

.active-remote-indicator .remote-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #99f6e4;
  flex-shrink: 0;
  animation: remote-dot-blink 1.8s ease-in-out infinite;
}

@keyframes remote-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15,118,110,.45); }
  50%       { box-shadow: 0 0 0 5px rgba(15,118,110,0); }
}

@keyframes remote-dot-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .28; }
}

/* Table avatars (e.g. Admin > Users list) */
.table .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* anchor toggle styling to avoid default underline/spacing */
.dropdown-toggle.d-inline-block { text-decoration: none; line-height: 0; }
.dropdown-toggle.d-inline-block:focus { outline: none; box-shadow: none; }

/* Remove default dropdown caret for avatar-only toggles */
.dropdown-toggle.d-inline-block::after { display: none !important; }

/* Keep flasher toasts above sticky/fixed topbar (app-wide), centered by flasher position config */
.fl-wrapper[data-position^="top"] {
  top: max(8px, env(safe-area-inset-top)) !important;
  z-index: 1205 !important;
}

.rapid-app-toast-container {
  top: max(var(--notification-top-offset), env(safe-area-inset-top)) !important;
  z-index: 1205;
}

.rapid-app-toast {
  min-width: min(24rem, calc(100vw - 1.5rem));
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  box-shadow: var(--ux-shadow-md, 0 1rem 2rem rgba(15, 23, 42, 0.16));
}

.ux-dialog-modal {
  --bs-modal-width: 34rem;
  --bs-modal-border-radius: var(--ux-radius-lg, 14px);
  --bs-modal-border-color: var(--ux-border, var(--bs-border-color));
  --bs-modal-bg: var(--ux-surface-1, var(--bs-body-bg));
  --bs-modal-color: var(--ux-text-1, var(--bs-body-color));
  --bs-modal-header-border-color: var(--ux-border, var(--bs-border-color));
  --bs-modal-footer-border-color: var(--ux-border, var(--bs-border-color));
}

.ux-dialog-modal .modal-content {
  box-shadow: var(--ux-shadow-md, 0 1.2rem 2.6rem rgba(15, 23, 42, 0.18));
}

.ux-dialog-modal .modal-header,
.ux-dialog-modal .modal-footer {
  background: transparent;
}

.ux-dialog-header-copy {
  display: grid;
  gap: 0.25rem;
}

.ux-dialog-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ux-text-2, var(--bs-secondary-color));
}

.ux-dialog-message {
  color: var(--ux-text-1, var(--bs-body-color));
  font-size: 0.97rem;
  line-height: 1.6;
}

.ux-dialog-input-wrap {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.ux-dialog-input-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ux-text-2, var(--bs-secondary-color));
}

.ux-dialog-modal .form-control:focus,
.ux-dialog-modal .btn:focus-visible,
.ux-dialog-modal .btn-close:focus-visible {
  box-shadow: var(--ux-focus-ring, 0 0 0 0.25rem rgba(13, 110, 253, 0.2));
}

[data-bs-theme="dark"] .rapid-app-toast {
  background: var(--ux-surface-1, var(--bs-body-bg));
  border-color: var(--ux-border, var(--bs-border-color));
}

[data-bs-theme="dark"] .ux-dialog-modal .modal-content {
  box-shadow: 0 1.2rem 2.6rem rgba(0, 0, 0, 0.38);
}

[data-bs-theme="dark"] .ts-wrapper .ts-control,
[data-bs-theme="dark"] .ts-wrapper.form-select .ts-control {
  background: var(--bs-tertiary-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .ts-wrapper .ts-control input,
[data-bs-theme="dark"] .ts-wrapper .ts-control .item,
[data-bs-theme="dark"] .ts-wrapper .ts-control .placeholder {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .ts-wrapper .ts-control input {
  background: transparent;
}

[data-bs-theme="dark"] .ts-dropdown .option.selected,
[data-bs-theme="dark"] .ts-dropdown .create,
[data-bs-theme="dark"] .ts-dropdown .no-results {
  color: var(--bs-body-color);
}

.file-manager-fallback-toasts {
  top: var(--notification-top-offset) !important;
}

/* Topbar theme sync */
.app.theme-light { --topbar-bg: #ffffff; --topbar-border: #e6e9ef; --topbar-text: #2b3a55; }
.app.theme-dark { --topbar-bg: #0f1a2b; --topbar-border: #20324e; --topbar-text: #d8e6ff; }
.app.theme-dark .notification-bell {
  color: #d8e6ff;
  background: linear-gradient(180deg, rgba(203, 215, 238, 0.08), rgba(203, 215, 238, 0.12));
  border-color: rgba(203, 215, 238, 0.1);
}

.app.theme-dark .topbar-theme-toggle {
  color: #d8e6ff;
}

.app.theme-dark .topbar-theme-toggle:hover {
  color: #f6c343;
}

.app.theme-dark .notification-bell:hover {
  color: #f6c343;
}

.app.theme-dark .notification-menu--open .notification-bell {
  color: #f6c343;
}

.app.theme-dark .notification-dropdown,
.app.theme-dark .notification-dropdown__header,
.app.theme-dark .notification-dropdown__footer {
  background: #132033;
  border-color: rgba(203, 215, 238, 0.12);
  color: #d8e6ff;
}

.app.theme-dark .notification-dropdown {
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42);
}

.app.theme-dark .notification-dropdown::before {
  background: #ff6f61;
}

.app.theme-dark .notification-dropdown__body {
  background: #0f1a2b;
  scrollbar-color: rgba(79, 139, 255, 0.7) rgba(255, 255, 255, 0.07);
}

.app.theme-dark .notification-dropdown__body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.app.theme-dark .notification-dropdown__body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(79, 139, 255, 0.88), rgba(44, 92, 191, 0.78));
  border-color: rgba(15, 26, 43, 0.9);
}

.app.theme-dark .notification-dropdown__empty,
.app.theme-dark .notification-dropdown-item__message,
.app.theme-dark .notification-dropdown-item__time {
  color: #9fb4d4;
}

.app.theme-dark .notification-dropdown-item:hover {
  background: rgba(203, 215, 238, 0.05);
}

.app.theme-dark .notification-dropdown-item__body,
.app.theme-dark .notification-dropdown-item--read .notification-dropdown-item__body {
  background: rgba(203, 215, 238, 0.05);
}

.app.theme-dark .notification-dropdown-item--unread .notification-dropdown-item__body {
  background: rgba(79, 139, 255, 0.14);
}

.app.theme-dark .notification-dropdown-item--unread .notification-dropdown-item__title,
.app.theme-dark .notification-dropdown-item--unread .notification-dropdown-item__message {
  color: #e6f0ff;
}

.app.theme-dark .notification-dropdown-item__title {
  color: #dce7fb;
}

.app.theme-dark .notification-dropdown__header .btn-outline-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

.app.theme-dark .notification-dropdown__header .btn-outline-secondary:hover {
  color: #ff6f61;
  background: rgba(255, 255, 255, 0.16);
}

.app.theme-dark .notification-dropdown__footer {
  border-top-color: rgba(203, 215, 238, 0.08);
}

.app.theme-dark .notification-dropdown-item__dismiss:hover {
  background: rgba(203, 215, 238, 0.08);
  color: #e6f0ff;
}

.notification-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.notification-pill--module {
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
}

.notification-pill--severity {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.notification-card--critical .notification-pill--severity {
  background: rgba(220, 53, 69, 0.12);
  color: #b42318;
}

.notification-card--warning .notification-pill--severity {
  background: rgba(255, 193, 7, 0.18);
  color: #946200;
}

.notification-pill--status {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.notification-toolbar {
  min-width: 0;
}

.notification-toolbar__filters {
  min-width: max-content;
}

.notification-toolbar__search {
  width: 320px;
  max-width: 100%;
  flex: 0 0 auto;
}

.notification-table-badge {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.notification-table-badge.text-bg-body-tertiary,
.notification-table-badge.text-bg-warning {
  color: var(--bs-emphasis-color);
}

[data-bs-theme="dark"] .notification-table-badge.text-bg-body-tertiary {
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .notification-table-badge.text-bg-warning {
  color: #1f1600;
}

.notification-toolbar__search .form-control {
  min-width: 220px;
}

.notification-empty__icon {
  font-size: 3rem;
  color: #94a3b8;
}


.app.theme-dark .notification-filter {
  background: #132033;
  border-color: rgba(203, 215, 238, 0.12);
  color: #d8e6ff;
}

.app.theme-dark .notification-filter:hover,
.app.theme-dark .notification-filter.is-active {
  background: rgba(13, 110, 253, 0.18);
  color: #9cc3ff;
}

.app.theme-dark .notification-pill--status {
  color: #cbd7ee;
}

@media (max-width: 991.98px) {
  .notification-toolbar {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.1rem;
  }

  .notification-toolbar__search {
    width: 260px;
  }
}

/* Content placeholder */
.content-placeholder {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.content-placeholder > .container-fluid {
  flex: 1 1 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Slim (collapsed) sidebar */
.sidebar-collapsed { width: var(--sidebar-width-collapsed); }
.sidebar .brand-text {
  transition: opacity 180ms var(--sidebar-content-ease), transform 220ms var(--sidebar-content-ease);
  transform-origin: left center;
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-collapsed .brand-text {
  opacity: 0;
  transform: translateX(-8px);
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.sidebar-collapsed .sidebar-footer { display: none; }
.sidebar .nav-link .nav-label {
  transition: opacity 180ms var(--sidebar-content-ease), transform 220ms var(--sidebar-content-ease), max-width 220ms var(--sidebar-content-ease);
  transform-origin: left center;
  max-width: 170px;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-collapsed .nav-link .nav-label {
  opacity: 0;
  transform: translateX(-6px);
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.sidebar-collapsed .nav-link { justify-content: center; gap: 0; padding: 10px 0; }
.sidebar-collapsed .nav-link .material-symbols-rounded { font-size: 20px; }
.sidebar-collapsed .has-sub .sub-caret { display: none; }

/* Prevent flash on refresh: apply collapsed layout before JS runs */
html.rapid-sidebar-collapsed .sidebar { width: var(--sidebar-width-collapsed); }
html.rapid-sidebar-collapsed .sidebar .brand-text {
  opacity: 0;
  transform: translateX(-8px);
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
html.rapid-sidebar-collapsed .sidebar .sidebar-footer { display: none; }
html.rapid-sidebar-collapsed .sidebar .nav-link .nav-label {
  opacity: 0;
  transform: translateX(-6px);
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
html.rapid-sidebar-collapsed .sidebar .nav-link { justify-content: center; gap: 0; padding: 10px 0; }
html.rapid-sidebar-collapsed .sidebar .nav-link .material-symbols-rounded { font-size: 20px; }
html.rapid-sidebar-collapsed .sidebar .has-sub .sub-caret { display: none; }

html.rapid-sidebar-collapsed:not(.rapid-sidebar-ready) .sidebar .brand-text,
html.rapid-sidebar-collapsed:not(.rapid-sidebar-ready) .sidebar .nav-link .nav-label {
  opacity: 0 !important;
  transform: translateX(-6px) !important;
  max-width: 0 !important;
}

/* Symfony UX Autocomplete (Tom Select): keep a single caret + generic full-width control */
.ts-wrapper.form-select {
  display: block;
  width: 100%;
  min-height: auto;
  background-image: none !important;
  background-color: transparent !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ts-wrapper.form-select .ts-control {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: calc(1.45em + 0.75rem + 2px);
  border-radius: 10px;
  border: 1px solid var(--ux-border-strong);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: none !important;
  padding: 0.375rem 0.75rem;
  background-image: none !important;
}

.ts-wrapper.form-select.single .ts-control {
  padding-right: 2rem !important;
}

.ts-wrapper.form-select .ts-control::after {
  top: 50%;
  transform: translateY(-50%);
  right: 0.75rem;
}

.ts-wrapper.form-select.focus .ts-control {
  border-color: color-mix(in srgb, var(--bs-primary) 62%, var(--ux-border-strong) 38%);
  box-shadow: var(--ux-focus-ring);
}

.ts-wrapper.form-select .ts-control,
.ts-wrapper.form-select .ts-control input {
  font-size: 1rem;
  line-height: 1.5;
}

.ts-wrapper.form-select .ts-control .item,
.ts-wrapper.form-select .ts-control input {
  margin: 0 !important;
  padding: 0 !important;
}

.ts-wrapper.form-select.form-select-sm .ts-control,
.ts-wrapper.form-select-sm .ts-control {
  min-height: calc(1.5em + 0.5rem + 2px);
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
}

.ts-wrapper.form-select.form-select-sm.single .ts-control,
.ts-wrapper.form-select-sm.single .ts-control {
  padding-right: 1.75rem !important;
}

.ts-wrapper.form-select.form-select-sm .ts-control,
.ts-wrapper.form-select.form-select-sm .ts-control input,
.ts-wrapper.form-select-sm .ts-control,
.ts-wrapper.form-select-sm .ts-control input {
  font-size: 0.875rem;
  line-height: 1.5;
}

.ts-wrapper.form-select.form-select-sm .ts-control::after,
.ts-wrapper.form-select-sm .ts-control::after {
  right: 0.5rem;
}

/* Symfony UX Autocomplete / Tom Select dark-mode support */
[data-bs-theme="dark"] .ts-wrapper.form-select .ts-control {
  border-color: var(--ux-border-strong);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  box-shadow: none !important;
}

[data-bs-theme="dark"] .ts-wrapper .ts-control {
  border-color: var(--ux-border-strong);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  box-shadow: none !important;
}

[data-bs-theme="dark"] .ts-wrapper.form-select .ts-control input {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .ts-wrapper .ts-control input,
[data-bs-theme="dark"] .ts-wrapper .ts-control .item {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .ts-wrapper.form-select .item {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .ts-dropdown,
[data-bs-theme="dark"] .ts-dropdown .ts-dropdown-content {
  background: color-mix(in srgb, var(--bs-card-bg) 96%, var(--bs-tertiary-bg) 4%);
  color: var(--bs-body-color);
  border-color: var(--ux-border-strong);
}

.ts-dropdown,
.ts-dropdown .ts-dropdown-content {
  border-radius: 10px;
}

[data-bs-theme="dark"] .ts-dropdown .option,
[data-bs-theme="dark"] .ts-dropdown .optgroup-header {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .ts-dropdown .option.active,
[data-bs-theme="dark"] .ts-dropdown .option:hover {
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .content-placeholder .badge.bg-secondary {
  background-color: #31435f;
  color: #dbe8ff;
}
html.rapid-sidebar-collapsed .main { margin-left: var(--sidebar-width-collapsed); }

@media (max-width: 992px) {
  html.rapid-sidebar-collapsed .main { margin-left: 0; }
}

/* Expanded submenu behavior */
.sidebar-expanded .has-sub.open > .sub-nav { display: block; }

/* Theme variants */
.sidebar.theme-default { --sidebar-bg: #0f1a2b; --sidebar-text: #cfe2ff; --sidebar-hover: #18253a; --sidebar-border: #20324e; }
.sidebar.theme-light { --sidebar-bg: var(--sidebar-bg-light); --sidebar-text: var(--sidebar-text-light); --sidebar-hover: var(--sidebar-hover-light); --sidebar-border: var(--sidebar-border-light); }
.sidebar.theme-dark { --sidebar-bg: var(--sidebar-bg-dark); --sidebar-text: var(--sidebar-text-dark); --sidebar-hover: var(--sidebar-hover-dark); --sidebar-border: var(--sidebar-border-dark); }

/* Scrollbar subtle styling */
.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

/* Responsive */
@media (max-width: 992px) {
  :root {
    --notification-top-offset: 86px;
  }

  body { overflow-x: hidden; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .2s ease;
    padding-top: 72px; /* keep drawer content below fixed header */
    box-sizing: border-box;
  }
  .sidebar.show { transform: translateX(0); }
  .main { margin-left: 0; padding-top: 72px; width: 100%; }
  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    transition: transform .2s ease;
    z-index: 1100;
  }
  #sidebarToggle { display: none; }
  .app.sidebar-open { overflow-x: hidden; }
}

@media (min-width: 992px) {
  #mobileSidebarToggle { display: none; }
}

/* Flyout panel for collapsed sidebar */
.sidebar-flyout {
  position: fixed;
  left: var(--sidebar-width-collapsed);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  border: 1px solid var(--sidebar-border);
  border-left: none; /* seamless against sidebar */
  border-radius: 0 8px 8px 0; /* remove left rounding */
  width: max-content;
  min-width: var(--sidebar-flyout-width);
  max-width: min(560px, calc(100vw - var(--sidebar-width-collapsed) - 16px));
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
  z-index: 1060;
  overflow: hidden;
}
.sidebar-flyout.sidebar-flyout-nested {
  border-left: 1px solid var(--sidebar-border);
  border-radius: 8px;
}
.sidebar-flyout .flyout-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px; /* slightly slimmer */
  cursor: pointer;
  line-height: 1.25;
}
.sidebar-flyout .flyout-header:hover {
  background: var(--sidebar-hover);
}
.sidebar-flyout .flyout-header .flyout-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  width: 100%;
  white-space: nowrap;
}
.sidebar-flyout .flyout-header .flyout-link:hover {
  text-decoration: none;
}
.sidebar-flyout .flyout-header .flyout-link:focus-visible {
  outline: 2px solid rgba(255,255,255,0.4);
  outline-offset: 2px;
}
.sidebar-flyout .flyout-body {
  display: none;
  padding: 6px 16px 10px 16px; /* slimmer body */
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-flyout .flyout-body.flyout-body-static {
  display: block;
  border-top: none;
}
.sidebar-flyout.show-body .flyout-body { display: block; }
.sidebar-flyout .sub-link { display: block; padding: 6px 0; color: inherit; text-decoration: none; opacity: .9; line-height: 1.25; }
.sidebar-flyout .sub-link:hover { opacity: 1; }
.sidebar-flyout .flyout-level { list-style: none; padding-left: 0; margin: 0; }
.sidebar-flyout .flyout-level li { list-style: none; }
.sidebar-flyout .flyout-sub-link {
  display: block;
  color: inherit;
  text-decoration: none;
  opacity: .92;
  padding: 6px 0;
  line-height: 1.25;
  white-space: nowrap;
}
.sidebar-flyout .flyout-sub-link.has-children {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-flyout .flyout-sub-link .nested-arrow {
  margin-left: auto;
  font-size: 18px;
  opacity: .82;
}
.sidebar-flyout .flyout-sub-link:hover { opacity: 1; }
.sidebar-flyout .flyout-sub-link.active {
  opacity: 1;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sidebar-flyout .flyout-sub-link.depth-1 { padding-left: 12px; }
.sidebar-flyout .flyout-sub-link.depth-2 { padding-left: 24px; }
.sidebar-flyout .flyout-sub-link.depth-3 { padding-left: 36px; }
.sidebar-flyout .flyout-sub-link.depth-4 { padding-left: 48px; }

/* Remove default list bullets inside flyout body */
.sidebar-flyout .flyout-body ul { list-style: none; padding-left: 0; margin: 0; }

/* Stable terminal layout: header + viewport + controls */
.terminal-card {
  display: flex;
  flex-direction: column;
  height: 80vh;
  min-height: 560px;
  border-color: var(--terminal-shell-border);
  background: var(--bs-card-bg);
  overflow: hidden;
}

.terminal-header {
  padding: 0.5rem 0.75rem;
  background: var(--bs-card-cap-bg);
  border-bottom: 1px solid var(--terminal-shell-border);
  color: var(--bs-body-color);
}

.terminal-body {
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--terminal-shell-bg);
}

.terminal-viewport,
[data-terminal-session-target="viewport"] {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: var(--terminal-shell-bg);
  position: relative;
  padding: 0 !important;
}

.terminal-controls {
  padding: 0.75rem;
  background: var(--bs-card-cap-bg);
  border-top: 1px solid var(--terminal-shell-border);
  color: var(--bs-body-color);
}

.terminal-controls .form-label,
.terminal-header .text-muted,
.terminal-controls .text-muted {
  color: var(--bs-secondary-color) !important;
}

/* RMM devices list: compact, searchable, sortable, paginated table */
.rmm-devices-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.rmm-devices-search-host {
  margin-left: auto;
}

.rmm-devices-card .fixed-table-toolbar,
.rmm-devices-card .fixed-table-pagination {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.rmm-devices-card .search input {
  min-width: 220px;
  min-height: 30px;
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
}

.rmm-devices-search-host input {
  min-width: 220px;
  min-height: 30px;
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
}

#bulk-update-toolbar .rmm-bulk-asset-select {
  width: min(100%, 420px);
}

#bulk-update-toolbar .rmm-bulk-restart-select {
  width: min(100%, 180px);
}

.rmm-devices-card .fixed-table-toolbar {
  display: none;
}

.rmm-devices-table > :not(caption) > * > * {
  padding: 0.27rem 0.45rem;
  vertical-align: middle;
  font-size: 0.82rem;
  line-height: 1.2;
}

.rmm-devices-table tbody tr[data-href] {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.rmm-devices-table tbody tr[data-href]:hover,
.rmm-devices-table tbody tr[data-href].is-row-hover,
.rmm-devices-table tbody tr[data-href]:focus-visible {
  background-color: #f2f6ff;
}

.rmm-devices-table.table-hover > tbody > tr[data-href]:hover > *,
.rmm-devices-table.table-hover > tbody > tr[data-href].is-row-hover > *,
.rmm-devices-table.table-hover > tbody > tr[data-href]:focus-visible > * {
  --bs-table-bg-state: #f2f6ff;
  --bs-table-accent-bg: #f2f6ff;
  --bs-table-hover-bg: #f2f6ff;
  background-color: #f2f6ff !important;
  box-shadow: inset 0 0 0 9999px #f2f6ff;
}

.rmm-devices-table tbody tr[data-href]:focus-visible {
  outline: 2px solid #a8c0ff;
  outline-offset: -2px;
}

.rmm-devices-table .badge {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.2rem 0.35rem;
}

.rmm-devices-table tbody td {
  color: #334155;
}

.rmm-devices-table a.rmm-device-link,
.rmm-devices-table a.rmm-device-link:visited,
.rmm-devices-table a.rmm-device-link:hover,
.rmm-devices-table a.rmm-device-link:focus,
.rmm-devices-table a.rmm-device-link:focus-visible {
  color: #111111 !important;
}

.rmm-devices-table a.rmm-device-link--offline,
.rmm-devices-table a.rmm-device-link--offline:visited,
.rmm-devices-table a.rmm-device-link--offline:hover,
.rmm-devices-table a.rmm-device-link--offline:focus,
.rmm-devices-table a.rmm-device-link--offline:focus-visible {
  color: #9ca3af !important;
  text-decoration: none !important;
}

/* Connectivity dot indicator */
.rmm-connectivity-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rmm-connectivity-dot--online {
  background-color: #16a34a;
  animation: rmm-dot-pulse 2s ease-in-out infinite;
}

.rmm-connectivity-dot--offline {
  background-color: #94a3b8;
}

@keyframes rmm-dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
  60%  { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.app.theme-dark .rmm-connectivity-dot--online {
  background-color: #34d399;
  animation: rmm-dot-pulse-dark 2s ease-in-out infinite;
}

@keyframes rmm-dot-pulse-dark {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  60%  { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.app.theme-dark .rmm-connectivity-dot--offline {
  background-color: #4b5563;
}

/* Online device row — light green tint (light mode) */
.rmm-devices-table tbody tr.rmm-device-row--online > * {
  --bs-table-bg-state: #ecfdf5;
  --bs-table-accent-bg: #ecfdf5;
  background-color: #ecfdf5;
  box-shadow: inset 0 0 0 9999px #ecfdf5;
}

.rmm-devices-table.table-hover > tbody > tr.rmm-device-row--online:hover > *,
.rmm-devices-table.table-hover > tbody > tr.rmm-device-row--online.is-row-hover > * {
  --bs-table-bg-state: #d1fae5;
  --bs-table-accent-bg: #d1fae5;
  --bs-table-hover-bg: #d1fae5;
  background-color: #d1fae5 !important;
  box-shadow: inset 0 0 0 9999px #d1fae5;
}

/* Online device row — dark mode */
[data-bs-theme="dark"] .rmm-devices-table tbody tr.rmm-device-row--online > * {
  --bs-table-bg-state: rgba(22, 163, 74, 0.10);
  --bs-table-accent-bg: rgba(22, 163, 74, 0.10);
  background-color: rgba(22, 163, 74, 0.10);
  box-shadow: inset 0 0 0 9999px rgba(22, 163, 74, 0.10);
}

[data-bs-theme="dark"] .rmm-devices-table.table-hover > tbody > tr.rmm-device-row--online:hover > *,
[data-bs-theme="dark"] .rmm-devices-table.table-hover > tbody > tr.rmm-device-row--online.is-row-hover > * {
  --bs-table-bg-state: rgba(22, 163, 74, 0.18);
  --bs-table-accent-bg: rgba(22, 163, 74, 0.18);
  --bs-table-hover-bg: rgba(22, 163, 74, 0.18);
  background-color: rgba(22, 163, 74, 0.18) !important;
  box-shadow: inset 0 0 0 9999px rgba(22, 163, 74, 0.18);
}

.rmm-devices-table thead th {
  color: #5b6b80;
}

.rmm-devices-table code {
  color: #c2185b;
  font-weight: 600;
}

.rmm-status-badge.rmm-status-active {
  background-color: #0b6fdb;
  color: #ffffff;
}

.rmm-version-pill {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.rmm-agent-version-link.rmm-version-pill,
.rmm-agent-version-link.rmm-version-pill:visited,
.rmm-agent-version-link.rmm-version-pill:hover,
.rmm-agent-version-link.rmm-version-pill:focus,
.rmm-agent-version-link.rmm-version-pill:focus-visible {
  text-decoration: none;
}

.rmm-tag-badge {
  font-size: 0.64rem;
  font-weight: 650;
  padding: 0.2rem 0.4rem;
}

.rmm-version-tier-0,
.rmm-tag-tier-0 {
  background: #1b5e2b;
  color: #ffffff;
}
.rmm-agent-version-link.rmm-version-tier-0 { color: #ffffff !important; }

.rmm-version-tier-1,
.rmm-tag-tier-1 {
  background: #4f8538;
  color: #ffffff;
}
.rmm-agent-version-link.rmm-version-tier-1 { color: #ffffff !important; }

.rmm-version-tier-2,
.rmm-tag-tier-2 {
  background: #d9ae53;
  color: #1f1500;
}
.rmm-agent-version-link.rmm-version-tier-2 { color: #1f1500 !important; }

.rmm-version-tier-3,
.rmm-tag-tier-3 {
  background: #c94842;
  color: #ffffff;
}
.rmm-agent-version-link.rmm-version-tier-3 { color: #ffffff !important; }

.rmm-version-tier-4,
.rmm-tag-tier-4 {
  background: #a3373f;
  color: #ffffff;
}
.rmm-agent-version-link.rmm-version-tier-4 { color: #ffffff !important; }

.rmm-tag-tier-5 {
  background: #1f7a64;
  color: #ffffff;
}

.rmm-tag-tier-6 {
  background: #2e6f9e;
  color: #ffffff;
}

.rmm-tag-tier-7 {
  background: #7a5c2e;
  color: #ffffff;
}

.rmm-tag-tier-8 {
  background: #7b3f8c;
  color: #ffffff;
}

.rmm-tag-tier-9 {
  background: #8a4a3a;
  color: #ffffff;
}

.rmm-tag-tier-10 {
  background: #356b5c;
  color: #ffffff;
}

.rmm-tag-tier-11 {
  background: #4e5f8f;
  color: #ffffff;
}

.rmm-version-tier-rest {
  background: #5f6f85;
  color: #ffffff;
}
.rmm-agent-version-link.rmm-version-tier-rest { color: #ffffff !important; }

.rmm-tag-tier-rest {
  background: #60528d;
  color: #ffffff;
}

.rmm-ipinfo-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rmm-devices-card .fixed-table-pagination .page-link {
  padding: 0.18rem 0.42rem;
  font-size: 0.74rem;
}

.rmm-devices-card .fixed-table-pagination .pagination-info,
.rmm-devices-card .fixed-table-pagination .page-list {
  font-size: 0.74rem;
  line-height: 1.15;
  color: #64748b;
}

.app.theme-dark .rmm-devices-table tbody tr[data-href]:hover,
.app.theme-dark .rmm-devices-table tbody tr[data-href].is-row-hover,
.app.theme-dark .rmm-devices-table tbody tr[data-href]:focus-visible {
  background-color: #1a2b42;
}

.app.theme-dark .rmm-devices-table.table-hover > tbody > tr[data-href]:hover > *,
.app.theme-dark .rmm-devices-table.table-hover > tbody > tr[data-href].is-row-hover > *,
.app.theme-dark .rmm-devices-table.table-hover > tbody > tr[data-href]:focus-visible > * {
  --bs-table-bg-state: #1a2b42;
  --bs-table-accent-bg: #1a2b42;
  --bs-table-hover-bg: #1a2b42;
  background-color: #1a2b42 !important;
  box-shadow: inset 0 0 0 9999px #1a2b42;
}

.app.theme-dark .rmm-devices-table tbody tr[data-href]:focus-visible {
  outline-color: #4f8bff;
}

.app.theme-dark .rmm-devices-card .fixed-table-container,
.app.theme-dark .rmm-devices-card .fixed-table-body,
.app.theme-dark .rmm-devices-card .fixed-table-header,
.app.theme-dark .rmm-devices-card .table,
.app.theme-dark .rmm-devices-card .table > :not(caption) > * > * {
  background-color: var(--bs-card-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

.app.theme-dark .rmm-devices-card .table thead th,
.app.theme-dark .rmm-devices-card .fixed-table-container thead th {
  background-color: #18283d;
  color: #c0d0e7;
  border-color: var(--bs-border-color);
}

.app.theme-dark .rmm-devices-table tbody td {
  color: #d9e7ff;
}

.app.theme-dark .rmm-devices-table a.rmm-device-link,
.app.theme-dark .rmm-devices-table a.rmm-device-link:visited,
.app.theme-dark .rmm-devices-table a.rmm-device-link:hover,
.app.theme-dark .rmm-devices-table a.rmm-device-link:focus,
.app.theme-dark .rmm-devices-table a.rmm-device-link:focus-visible {
  color: #ffffff !important;
}

.app.theme-dark .rmm-devices-table a.rmm-device-link--offline,
.app.theme-dark .rmm-devices-table a.rmm-device-link--offline:visited,
.app.theme-dark .rmm-devices-table a.rmm-device-link--offline:hover,
.app.theme-dark .rmm-devices-table a.rmm-device-link--offline:focus,
.app.theme-dark .rmm-devices-table a.rmm-device-link--offline:focus-visible {
  color: #6b7280 !important;
  text-decoration: none !important;
}

.app.theme-dark .rmm-devices-table code {
  color: #ff89bc;
}

.app.theme-dark .rmm-devices-card .search input,
.app.theme-dark .rmm-devices-search-host input,
.app.theme-dark #bulk-update-toolbar .form-select,
.app.theme-dark #bulk-update-toolbar .form-control {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

.app.theme-dark .rmm-devices-card .fixed-table-pagination .pagination-info,
.app.theme-dark .rmm-devices-card .fixed-table-pagination .page-list {
  color: #9fb4d4;
}

.app.theme-dark .rmm-devices-card .fixed-table-container,
.app.theme-dark .rmm-devices-card .fixed-table-body,
.app.theme-dark .rmm-devices-card .fixed-table-body table,
.app.theme-dark .rmm-devices-card .fixed-table-header table,
.app.theme-dark .rmm-devices-card .bootstrap-table,
.app.theme-dark .rmm-devices-card .bootstrap-table .table {
  background: #132033;
}

.app.theme-dark .rmm-devices-card a:not(.btn) {
  color: #c9ddff;
}

.app.theme-dark .rmm-devices-card a:not(.btn):hover {
  color: #f8fbff;
}

.app.theme-dark .rmm-status-badge.rmm-status-active {
  background-color: #3a8fff;
  color: #ffffff;
}

.app.theme-dark .rmm-version-tier-0,
.app.theme-dark .rmm-tag-tier-0 {
  background: #2f8d46;
  color: #ffffff;
}

.app.theme-dark .rmm-version-tier-1,
.app.theme-dark .rmm-tag-tier-1 {
  background: #5e9942;
  color: #ffffff;
}

.app.theme-dark .rmm-version-tier-2,
.app.theme-dark .rmm-tag-tier-2 {
  background: #dcb25a;
  color: #1d1400;
}

.app.theme-dark .rmm-version-tier-3,
.app.theme-dark .rmm-tag-tier-3 {
  background: #d65750;
  color: #ffffff;
}

.app.theme-dark .rmm-version-tier-4,
.app.theme-dark .rmm-tag-tier-4 {
  background: #b7454d;
  color: #ffffff;
}

.app.theme-dark .rmm-tag-tier-5 {
  background: #2d9d83;
  color: #ffffff;
}

.app.theme-dark .rmm-tag-tier-6 {
  background: #3f89bf;
  color: #ffffff;
}

.app.theme-dark .rmm-tag-tier-7 {
  background: #9a7a3c;
  color: #ffffff;
}

.app.theme-dark .rmm-tag-tier-8 {
  background: #9252a5;
  color: #ffffff;
}

.app.theme-dark .rmm-tag-tier-9 {
  background: #a35f4f;
  color: #ffffff;
}

.app.theme-dark .rmm-tag-tier-10 {
  background: #458473;
  color: #ffffff;
}

.app.theme-dark .rmm-tag-tier-11 {
  background: #6176ac;
  color: #ffffff;
}

.app.theme-dark .rmm-version-tier-rest {
  background: #546b8c;
  color: #ffffff;
}

.app.theme-dark .rmm-tag-tier-rest {
  background: #5c5697;
  color: #ffffff;
}

/* Topbar user dropdown (Profile / Settings / Logout) */
.app.theme-dark .topbar .dropdown-menu {
  background-color: #132033;
  border-color: #23344d;
  color: #d8e6ff;
}

.app.theme-dark .topbar .dropdown-header {
  color: #9fb4d4;
}

.app.theme-dark .topbar .dropdown-item {
  color: #d8e6ff;
}

.app.theme-dark .topbar .dropdown-item:hover,
.app.theme-dark .topbar .dropdown-item:focus {
  background-color: #1d2f47;
  color: #f8fbff;
}

.app.theme-dark .topbar .dropdown-divider {
  border-top-color: #23344d;
}

@media (max-width: 768px) {
  .terminal-card {
    height: 74vh;
    min-height: 480px;
  }
}

/* Small UI text adjustments */
[data-terminal-session-target="hint"] {
  font-size: 0.78rem;
}

[data-terminal-session-target="statusBadge"] {
  font-size: 0.68rem;
  line-height: 1.1;
  padding: 0.2rem 0.42rem;
}

.sidebar-flyout .flyout-body li { list-style: none; }

/* Arrow indicator */
.sidebar-flyout .flyout-header .arrow { margin-left: auto; opacity: .8; }
.sidebar-flyout.show-body .flyout-header .arrow { transform: rotate(180deg); }

/* Flyout theme variants (mirror sidebar) */
.sidebar-flyout.theme-default { --sidebar-bg: #0f1a2b; --sidebar-text: #cfe2ff; --sidebar-hover: #18253a; --sidebar-border: #20324e; }
.sidebar-flyout.theme-light { --sidebar-bg: var(--sidebar-bg-light); --sidebar-text: var(--sidebar-text-light); --sidebar-hover: var(--sidebar-hover-light); --sidebar-border: var(--sidebar-border-light); }
.sidebar-flyout.theme-dark { --sidebar-bg: var(--sidebar-bg-dark); --sidebar-text: var(--sidebar-text-dark); --sidebar-hover: var(--sidebar-hover-dark); --sidebar-border: var(--sidebar-border-dark); }

@media (min-width: 1440px) {
  html { font-size: 15.5px; }
  :root {
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 80px;
    /* --sidebar-flyout-width: 228px; */
    --sidebar-flyout-width: 210px;
  }
}

@media (min-width: 1920px) {
  html { font-size: 16px; }
  :root {
    --sidebar-width: 272px;
    --sidebar-width-collapsed: 84px;
    --sidebar-flyout-width: 220px;
  }
}

.download-asset-upload {
  position: relative;
}

.download-asset-upload--busy {
  opacity: 0.96;
}

.download-asset-upload__progress {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08));
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 1rem;
}

.download-asset-upload__percent {
  min-width: 4rem;
  text-align: right;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1d4ed8;
}

.download-asset-upload__bar {
  height: 0.9rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.download-asset-upload__bar .progress-bar {
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.bootstrap-table .fixed-table-loading {
  display: none !important;
}

.download-assets-table > :not(caption) > * > * {
  padding: 0.32rem 0.45rem;
  font-size: 0.8rem;
  line-height: 1.15;
  vertical-align: middle;
}

.download-assets-table thead th {
  white-space: nowrap;
}

.download-assets-table tbody td {
  white-space: nowrap;
}

.download-assets-table tbody td:first-child {
  max-width: 18rem;
}

.download-assets-table tbody td:nth-child(6) {
  min-width: 13rem !important;
  white-space: normal;
}

.download-assets-table .badge {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 0.18rem 0.36rem;
}

.download-assets-table__actions-toggle {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-decoration: none;
  box-shadow: none !important;
  border: 0;
  background: transparent;
}

.download-assets-table__actions-toggle::after {
  display: none !important;
}

.download-assets-table__actions-toggle .material-symbols-rounded {
  font-size: 1.05rem;
  line-height: 1;
}

.download-assets-table__actions-toggle:hover {
  color: #0f172a;
}

.download-assets-table__actions-toggle:focus {
  color: #0f172a;
}

.download-assets-table .dropdown-menu {
  min-width: 10.5rem;
}

.download-assets-table .dropdown-item {
  padding: 0.34rem 0.7rem;
  font-size: 0.78rem;
  line-height: 1.15;
}

.bootstrap-table .fixed-table-pagination {
  padding-top: 0.55rem;
  margin-top: 0.1rem;
}

.bootstrap-table .fixed-table-pagination .pagination-info,
.bootstrap-table .fixed-table-pagination .page-list {
  font-size: 0.74rem;
  line-height: 1.15;
  color: #64748b;
}

.bootstrap-table .fixed-table-pagination .page-link {
  padding: 0.18rem 0.42rem;
  font-size: 0.74rem;
  line-height: 1.1;
}

.download-assets-table .js-view-notes {
  font-size: 0.78rem;
  line-height: 1.2;
}

@media (max-width: 992px) {
  .download-assets-table > :not(caption) > * > * {
    padding: 0.28rem 0.38rem;
    font-size: 0.76rem;
  }

  .download-assets-table tbody td:first-child {
    max-width: 14rem;
  }

  .download-assets-table tbody td:nth-child(6) {
    min-width: 10rem !important;
  }

  #bulk-update-toolbar .d-flex {
    align-items: stretch !important;
  }

  #bulk-update-toolbar .rmm-bulk-asset-select,
  #bulk-update-toolbar .rmm-bulk-restart-select,
  #bulk-update-toolbar #bulk-update-btn,
  #bulk-update-toolbar #bulk-deselect-btn {
    width: 100%;
    max-width: none;
    margin-left: 0 !important;
  }
}

.download-asset-upload[aria-busy="true"] .form-control,
.download-asset-upload[aria-busy="true"] .form-select {
  background-color: #f8fafc;
}

.app.theme-dark .download-asset-upload__progress {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(20, 184, 166, 0.14));
  border-color: rgba(148, 163, 184, 0.16);
}

.app.theme-dark .download-asset-upload__percent {
  color: #93c5fd;
}

.app.theme-dark .download-asset-upload__bar {
  background: rgba(148, 163, 184, 0.12);
}

@media (max-width: 576px) {
  .download-asset-upload__percent {
    min-width: 0;
    text-align: left;
  }

  .notification-toolbar,
  .notification-toolbar__filters {
    width: 100%;
    justify-content: flex-start !important;
    overflow-x: visible;
  }

  .notification-toolbar__search,
  .notification-toolbar__search .form-control {
    width: 100%;
    min-width: 0;
  }
}

/* =========================================================
   Global Light/Dark Theme Contract (App-Wide)
   Applies to all content pages inside .app
   ========================================================= */

.app.theme-light {
  color-scheme: light;

  --bs-body-bg: #f7f9fc;
  --bs-body-color: #1e293b;
  --bs-secondary-color: #64748b;
  --bs-tertiary-bg: #eef3f9;
  --bs-border-color: #d7e0eb;
  --bs-emphasis-color: #0f172a;

  --bs-card-bg: #ffffff;
  --bs-card-cap-bg: #f8fbff;
  --bs-card-border-color: #d7e0eb;

  --bs-light-bg-subtle: #f8fbff;
  --bs-secondary-bg-subtle: #eef3f9;
  --ux-scroll-track: #e8eef6;
  --ux-scroll-thumb: #9ab0cc;
  --ux-scroll-thumb-hover: #6f8fb8;

  --terminal-shell-bg: #000000;
  --terminal-shell-border: #d7e0eb;
}

.app.theme-dark {
  color-scheme: dark;

  --bs-body-bg: #0b1422;
  --bs-body-color: #d8e6ff;
  --bs-secondary-color: #9fb4d4;
  --bs-tertiary-bg: #132033;
  --bs-border-color: #23344d;
  --bs-emphasis-color: #f8fbff;

  --bs-card-bg: #132033;
  --bs-card-cap-bg: #16253a;
  --bs-card-border-color: #23344d;

  --bs-light-bg-subtle: #16253a;
  --bs-secondary-bg-subtle: #18283d;
  --ux-scroll-track: #132033;
  --ux-scroll-thumb: #4e6d99;
  --ux-scroll-thumb-hover: #6a8fc7;

  --terminal-shell-bg: #000000;
  --terminal-shell-border: #23344d;
}

.app .content-placeholder,
.app .content-placeholder .container-fluid {
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.main,
.content-placeholder,
.content-placeholder .table-responsive,
.rmm-device-tabs-scroll,
.notification-dropdown__body,
.sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: var(--ux-scroll-thumb) var(--ux-scroll-track);
}

.main::-webkit-scrollbar,
.content-placeholder::-webkit-scrollbar,
.content-placeholder .table-responsive::-webkit-scrollbar,
.rmm-device-tabs-scroll::-webkit-scrollbar,
.notification-dropdown__body::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.main::-webkit-scrollbar-track,
.content-placeholder::-webkit-scrollbar-track,
.content-placeholder .table-responsive::-webkit-scrollbar-track,
.rmm-device-tabs-scroll::-webkit-scrollbar-track,
.notification-dropdown__body::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
  background: var(--ux-scroll-track);
  border-radius: 999px;
}

.main::-webkit-scrollbar-thumb,
.content-placeholder::-webkit-scrollbar-thumb,
.content-placeholder .table-responsive::-webkit-scrollbar-thumb,
.rmm-device-tabs-scroll::-webkit-scrollbar-thumb,
.notification-dropdown__body::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--ux-scroll-thumb);
  border-radius: 999px;
  border: 2px solid var(--ux-scroll-track);
}

.main::-webkit-scrollbar-thumb:hover,
.content-placeholder::-webkit-scrollbar-thumb:hover,
.content-placeholder .table-responsive::-webkit-scrollbar-thumb:hover,
.rmm-device-tabs-scroll::-webkit-scrollbar-thumb:hover,
.notification-dropdown__body::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--ux-scroll-thumb-hover);
}

.app .content-placeholder a:not(.btn) {
  color: inherit;
}

.app .content-placeholder .text-muted,
.app .content-placeholder .text-secondary {
  color: var(--bs-secondary-color) !important;
}

.app .content-placeholder .card,
.app .content-placeholder .modal-content,
.app .content-placeholder .offcanvas,
.app .content-placeholder .dropdown-menu,
.app .content-placeholder .list-group-item {
  background-color: var(--bs-card-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

.app .content-placeholder .card-header,
.app .content-placeholder .card-footer,
.app .content-placeholder .modal-header,
.app .content-placeholder .modal-footer,
.app .content-placeholder .offcanvas-header,
.app .content-placeholder .dropdown-divider,
.app .content-placeholder hr {
  border-color: var(--bs-border-color);
}

.app .content-placeholder .card-header,
.app .content-placeholder .card-footer,
.app .content-placeholder .modal-header,
.app .content-placeholder .modal-footer,
.app .content-placeholder .offcanvas-header {
  background-color: var(--bs-card-cap-bg);
}

.app .content-placeholder .form-control,
.app .content-placeholder .form-select,
.app .content-placeholder .input-group-text {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

.app .content-placeholder .form-control:focus,
.app .content-placeholder .form-select:focus {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
}

.app.theme-dark .content-placeholder .form-control::placeholder {
  color: #88a0c4;
}

.app .content-placeholder .form-check-input {
  border-color: var(--bs-border-color);
  background-color: var(--bs-tertiary-bg);
}

.app .content-placeholder .form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m4 10 4 4 8-8'/%3e%3c/svg%3e");
}

.app .content-placeholder .form-check-input:checked[type="radio"] {
  background-image: radial-gradient(circle, #fff 0 38%, transparent 40%);
}

.app .content-placeholder .table {
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
  --bs-table-bg: transparent;
  --bs-table-color: var(--bs-body-color);
  --bs-table-border-color: var(--bs-border-color);
  --bs-table-striped-bg: color-mix(in srgb, var(--bs-card-bg) 88%, #ffffff 12%);
  --bs-table-hover-bg: color-mix(in srgb, var(--bs-card-bg) 82%, #ffffff 18%);
  --bs-table-striped-color: var(--bs-body-color);
  --bs-table-hover-color: var(--bs-body-color);
}

.app.theme-dark .content-placeholder .table {
  --bs-table-striped-bg: #18283d;
  --bs-table-hover-bg: #1d2f47;
}

.app .content-placeholder .nav-tabs,
.app .content-placeholder .nav-pills,
.app .content-placeholder .breadcrumb {
  --bs-nav-tabs-border-color: var(--bs-border-color);
  --bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-card-bg);
  --bs-nav-tabs-link-active-bg: var(--bs-card-bg);
  --bs-nav-tabs-link-active-color: var(--bs-body-color);
  --bs-breadcrumb-divider-color: var(--bs-secondary-color);
  --bs-breadcrumb-item-active-color: var(--bs-secondary-color);
}

.app .content-placeholder .pagination {
  --bs-pagination-bg: var(--bs-card-bg);
  --bs-pagination-color: var(--bs-body-color);
  --bs-pagination-border-color: var(--bs-border-color);
  --bs-pagination-hover-bg: var(--bs-tertiary-bg);
  --bs-pagination-hover-border-color: var(--bs-border-color);
  --bs-pagination-hover-color: var(--bs-body-color);
  --bs-pagination-focus-bg: var(--bs-tertiary-bg);
  --bs-pagination-focus-color: var(--bs-body-color);
  --bs-pagination-disabled-bg: var(--bs-tertiary-bg);
  --bs-pagination-disabled-color: var(--bs-secondary-color);
  --bs-pagination-disabled-border-color: var(--bs-border-color);
}

.app .content-placeholder .badge.text-bg-light {
  background: var(--bs-light-bg-subtle) !important;
  color: var(--bs-body-color) !important;
}

.app .content-placeholder .alert-light,
.app .content-placeholder .alert-secondary {
  background: var(--bs-light-bg-subtle);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

.app.theme-dark .content-placeholder .btn-outline-secondary {
  color: #cbd7ee;
  border-color: #355171;
}

.app.theme-dark .content-placeholder .btn-outline-secondary:hover {
  background: #1f3350;
  border-color: #4a6b93;
  color: #f8fbff;
}

.app.theme-dark .content-placeholder code,
.app.theme-dark .content-placeholder pre {
  background: #16253a;
  color: #d8e6ff;
  border-color: #23344d;
}

.app.theme-dark .content-placeholder .dropdown-item {
  color: var(--bs-body-color);
}

.app.theme-dark .content-placeholder .dropdown-item:hover,
.app.theme-dark .content-placeholder .dropdown-item:focus {
  background: #1d2f47;
  color: #f8fbff;
}

/* =========================================================
   Phase 1: Tables (FastBootstrap/Bootstrap 5.3 color-mode native)
   ========================================================= */
[data-bs-theme="dark"] .content-placeholder .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--bs-body-color);
  --bs-table-border-color: var(--bs-border-color);
  --bs-table-striped-bg: var(--bs-secondary-bg);
  --bs-table-striped-color: var(--bs-body-color);
  --bs-table-hover-bg: var(--bs-tertiary-bg);
  --bs-table-hover-color: var(--bs-body-color);
  color: var(--bs-table-color);
}

[data-bs-theme="dark"] .content-placeholder .table > :not(caption) > * > * {
  color: inherit;
  border-color: var(--bs-border-color);
  background-color: var(--bs-table-bg);
}

[data-bs-theme="dark"] .content-placeholder .table thead th,
[data-bs-theme="dark"] .content-placeholder thead.bg-light th,
[data-bs-theme="dark"] .content-placeholder thead.table-light th {
  --bs-table-bg: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .content-placeholder .table-light {
  --bs-table-bg: var(--bs-secondary-bg);
  --bs-table-color: var(--bs-body-color);
  --bs-table-border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .content-placeholder .table-responsive {
  background: transparent;
}

[data-bs-theme="dark"] .content-placeholder .bootstrap-table .table,
[data-bs-theme="dark"] .content-placeholder .fixed-table-container table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--bs-body-color);
  --bs-table-border-color: var(--bs-border-color);
  --bs-table-striped-bg: var(--bs-secondary-bg);
  --bs-table-striped-color: var(--bs-body-color);
  --bs-table-hover-bg: var(--bs-tertiary-bg);
  --bs-table-hover-color: var(--bs-body-color);
}

[data-bs-theme="dark"] .content-placeholder .bootstrap-table .fixed-table-container,
[data-bs-theme="dark"] .content-placeholder .bootstrap-table .fixed-table-header,
[data-bs-theme="dark"] .content-placeholder .bootstrap-table .fixed-table-body,
[data-bs-theme="dark"] .content-placeholder .bootstrap-table .fixed-table-toolbar,
[data-bs-theme="dark"] .content-placeholder .bootstrap-table .fixed-table-pagination {
  background-color: var(--bs-card-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .content-placeholder .bootstrap-table .fixed-table-pagination .pagination-info,
[data-bs-theme="dark"] .content-placeholder .bootstrap-table .fixed-table-pagination .page-list {
  color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .content-placeholder .bootstrap-table .search input {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

/* =========================================================
   Phase 2: Cards / Forms (FastBootstrap/Bootstrap 5.3 native)
   ========================================================= */
[data-bs-theme="dark"] .content-placeholder .card,
[data-bs-theme="dark"] .content-placeholder .modal-content,
[data-bs-theme="dark"] .content-placeholder .offcanvas,
[data-bs-theme="dark"] .content-placeholder .dropdown-menu,
[data-bs-theme="dark"] .content-placeholder .list-group-item {
  background-color: var(--bs-card-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .content-placeholder .card-header,
[data-bs-theme="dark"] .content-placeholder .card-footer,
[data-bs-theme="dark"] .content-placeholder .modal-header,
[data-bs-theme="dark"] .content-placeholder .modal-footer,
[data-bs-theme="dark"] .content-placeholder .offcanvas-header {
  background-color: var(--bs-card-cap-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .content-placeholder .form-control,
[data-bs-theme="dark"] .content-placeholder .form-select,
[data-bs-theme="dark"] .content-placeholder .input-group-text {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .content-placeholder .form-control::placeholder {
  color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .content-placeholder .form-control:focus,
[data-bs-theme="dark"] .content-placeholder .form-select:focus {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border-color: color-mix(in srgb, var(--bs-primary) 55%, var(--bs-border-color) 45%);
}

[data-bs-theme="dark"] .content-placeholder .form-check-input {
  background-color: var(--bs-tertiary-bg);
  border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .content-placeholder .form-check-input:checked {
  background-color: color-mix(in srgb, var(--bs-primary) 88%, #6fa4ff 12%);
  border-color: color-mix(in srgb, var(--bs-primary) 78%, #9dc1ff 22%);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23f8fbff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m4 10 4 4 8-8'/%3e%3c/svg%3e");
}

[data-bs-theme="dark"] .content-placeholder .bg-white,
[data-bs-theme="dark"] .content-placeholder .bg-light,
[data-bs-theme="dark"] .content-placeholder .bg-light-subtle {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
}

/* Core dashboard custom blocks */
.app.theme-dark .app-hero {
  border-color: rgba(203, 215, 238, 0.12);
  background:
    radial-gradient(circle at top right, rgba(25, 135, 84, 0.2), transparent 34%),
    radial-gradient(circle at bottom left, rgba(79, 139, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #132033 0%, #16253a 58%, #1a2b42 100%);
}

.app.theme-dark .app-stat-card,
.app.theme-dark .app-section-card,
.app.theme-dark .app-mini-metric,
.app.theme-dark .app-quick-link {
  border-color: rgba(203, 215, 238, 0.12);
  background: #132033;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.3);
}

.app.theme-dark .app-quick-link:hover {
  background: #1a2b42;
}

/* RMM dashboard custom blocks */
.app.theme-dark .rmm-hero {
  border-color: rgba(203, 215, 238, 0.12);
  background:
    radial-gradient(circle at top right, rgba(79, 139, 255, 0.22), transparent 35%),
    radial-gradient(circle at bottom left, rgba(220, 53, 69, 0.2), transparent 28%),
    linear-gradient(135deg, #132033 0%, #16253a 58%, #1a2b42 100%);
}

.app.theme-dark .rmm-hero::after {
  background: rgba(79, 139, 255, 0.1);
}

.app.theme-dark .rmm-stat-card,
.app.theme-dark .rmm-section-card,
.app.theme-dark .rmm-mini-metric,
.app.theme-dark .rmm-quick-link {
  border-color: rgba(203, 215, 238, 0.12);
  background: #132033;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.3);
}

.app.theme-dark .rmm-quick-link:hover {
  background: #1a2b42;
}

.app.theme-dark .rmm-status-pill {
  background: rgba(159, 180, 212, 0.16);
  color: #d8e6ff;
}

.app.theme-dark .rmm-status-pill--critical {
  background: rgba(220, 53, 69, 0.28);
  color: #ffd7dc;
}

.app.theme-dark .rmm-status-pill--warning {
  background: rgba(255, 193, 7, 0.28);
  color: #fff1bf;
}

.app.theme-dark .rmm-status-pill--success {
  background: rgba(25, 135, 84, 0.26);
  color: #c9f2dd;
}

/* RMM file manager palette overrides */
.app.theme-dark .file-manager-shell {
  --fm-bg: #0f1a2b;
  --fm-panel: #132033;
  --fm-panel-soft: rgba(19, 32, 51, 0.82);
  --fm-border: rgba(203, 215, 238, 0.14);
  --fm-text: #d8e6ff;
  --fm-muted: #9fb4d4;
  --fm-subtle: #88a0c4;
  --fm-primary: #4f8bff;
  background: radial-gradient(1200px 500px at 50% -10%, #13253d 0%, var(--fm-bg) 55%, #102038 100%);
}

.app.theme-dark .file-manager-sidebar {
  background: linear-gradient(180deg, rgba(19, 32, 51, 0.9) 0%, rgba(17, 30, 47, 0.94) 100%);
}

.app.theme-dark .file-manager-nav-button,
.app.theme-dark .file-manager-side-action,
.app.theme-dark .file-manager-view-toggle,
.app.theme-dark .file-manager-card,
.app.theme-dark .file-manager-aside,
.app.theme-dark .file-manager-table-shell,
.app.theme-dark .file-grid-item {
  background: #132033;
  border-color: rgba(203, 215, 238, 0.14);
  color: #d8e6ff;
}

.app.theme-dark .file-manager-nav-button:hover,
.app.theme-dark .file-manager-side-action:hover,
.app.theme-dark .file-grid-item:hover {
  background: #1a2b42;
  border-color: rgba(79, 139, 255, 0.36);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.app.theme-dark .file-manager-table thead th {
  background: #18283d;
  color: #9fb4d4;
  border-color: rgba(203, 215, 238, 0.14);
}

.app.theme-dark .file-manager-table tbody tr:hover {
  background: #1a2b42;
}

.app.theme-dark .file-manager-empty {
  background: rgba(24, 40, 61, 0.85);
  border-color: rgba(203, 215, 238, 0.2);
}

.app.theme-dark .file-manager-status-banner {
  background: linear-gradient(180deg, rgba(146, 64, 14, 0.24) 0%, rgba(120, 53, 15, 0.22) 100%);
  border-color: rgba(251, 146, 60, 0.28);
}

.app.theme-dark .file-manager-status-copy {
  color: #fdba74;
}

.app.theme-dark .file-manager-upload-dropzone {
  background: linear-gradient(180deg, #1a2b42 0%, #16253a 100%);
  border-color: rgba(79, 139, 255, 0.34);
  color: #9fb4d4;
}

/* ==========================================================================
   World-Class UI System (2026 refresh)
   ========================================================================== */

:root {
  --ux-font-sans: "Plus Jakarta Sans", "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  --ux-radius-sm: 10px;
  --ux-radius-md: 14px;
  --ux-radius-lg: 18px;
  --ux-gap-xs: 0.35rem;
  --ux-gap-sm: 0.55rem;
  --ux-gap-md: 0.9rem;
  --ux-gap-lg: 1.2rem;
  --ux-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.07);
  --ux-shadow-md: 0 16px 36px rgba(15, 23, 42, 0.12);
  --ux-focus-ring: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
  --ux-border-strong: color-mix(in srgb, var(--bs-border-color) 85%, #2a4365 15%);
  --ux-header-gradient: linear-gradient(135deg, rgba(62, 107, 255, 0.15), rgba(0, 171, 179, 0.1));
}

html, body, .app {
  font-family: var(--ux-font-sans);
}

.content-placeholder > .container-fluid {
  padding-top: 1.15rem;
}

.app .content-placeholder,
.app .content-placeholder .container-fluid {
  background:
    radial-gradient(1200px 520px at 104% -5%, color-mix(in srgb, var(--bs-primary) 16%, transparent), transparent 58%),
    radial-gradient(900px 420px at -10% -12%, color-mix(in srgb, #14b8a6 12%, transparent), transparent 55%),
    var(--bs-body-bg);
}

[data-bs-theme="dark"] .app .content-placeholder,
[data-bs-theme="dark"] .app .content-placeholder .container-fluid {
  background:
    radial-gradient(1200px 520px at 104% -5%, rgba(79, 139, 255, 0.13), transparent 58%),
    radial-gradient(900px 420px at -10% -12%, rgba(20, 184, 166, 0.09), transparent 55%),
    var(--bs-body-bg);
}

.topbar {
  backdrop-filter: saturate(1.35) blur(8px);
  -webkit-backdrop-filter: saturate(1.35) blur(8px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

[data-bs-theme="dark"] .topbar {
  box-shadow: 0 8px 24px rgba(2, 8, 20, 0.55);
}

.topbar .page-title {
  letter-spacing: 0.01em;
  font-size: 1.04rem;
}

.sidebar {
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar-nav .nav-link {
  border-radius: 10px;
  margin: 0.08rem 0.45rem;
  border-left: 0;
}

.sidebar-nav .nav-link.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--sidebar-hover) 86%, #5f8bff 14%), var(--sidebar-hover));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sidebar-border) 80%, #6fa4ff 20%);
}

.card,
.modal-content,
.offcanvas,
.list-group-item {
  border-radius: var(--ux-radius-md);
  border-color: var(--ux-border-strong);
  box-shadow: var(--ux-shadow-sm);
}

.card-header {
  border-top-left-radius: var(--ux-radius-md);
  border-top-right-radius: var(--ux-radius-md);
  background: var(--ux-header-gradient);
}

[data-bs-theme="dark"] .card-header {
  background: linear-gradient(135deg, rgba(79, 139, 255, 0.12), rgba(45, 212, 191, 0.08));
}

.app .content-placeholder h1,
.app .content-placeholder h2,
.app .content-placeholder h3,
.app .content-placeholder h4,
.app .content-placeholder .h1,
.app .content-placeholder .h2,
.app .content-placeholder .h3,
.app .content-placeholder .h4 {
  letter-spacing: 0.01em;
}

.app .content-placeholder h2,
.app .content-placeholder .h2 {
  font-size: 1.36rem;
  font-weight: 700;
}

.app .content-placeholder h5,
.app .content-placeholder .h5 {
  font-size: 1.03rem;
  font-weight: 650;
}

.app .content-placeholder .text-muted,
.app .content-placeholder .text-secondary {
  color: color-mix(in srgb, var(--bs-body-color) 65%, transparent);
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.14s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.ts-wrapper.form-select.focus .ts-control,
.ts-wrapper .ts-control.focus {
  box-shadow: var(--ux-focus-ring);
}

.btn-primary {
  box-shadow: 0 10px 22px color-mix(in srgb, var(--bs-primary) 22%, transparent);
}

.btn-outline-secondary {
  border-color: var(--ux-border-strong);
}

.form-control,
.form-select,
.input-group-text {
  border-radius: 10px;
  border-color: var(--ux-border-strong);
  min-height: calc(1.45em + 0.75rem + 2px);
}

.form-check-input-lg {
  width: 1.08rem;
  height: 1.08rem;
  margin-top: 0.15rem;
}

.form-control::placeholder,
.ts-wrapper .ts-control .placeholder {
  color: color-mix(in srgb, var(--bs-body-color) 55%, transparent);
}

.table-responsive,
.bootstrap-table {
  border-radius: var(--ux-radius-md);
}

.table {
  --bs-table-border-color: var(--ux-border-strong);
}

.table > :not(caption) > * > * {
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
}

.table thead th,
.bootstrap-table .table thead th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.73rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--bs-body-color) 66%, transparent);
  background: color-mix(in srgb, var(--bs-tertiary-bg) 88%, var(--bs-body-bg) 12%);
}

.table-hover > tbody > tr:hover > * {
  background: color-mix(in srgb, var(--bs-primary) 11%, var(--bs-body-bg) 89%);
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
  background: color-mix(in srgb, #4f8bff 16%, var(--bs-body-bg) 84%);
}

.bootstrap-table .fixed-table-toolbar,
.bootstrap-table .fixed-table-pagination {
  padding: 0.5rem 0.65rem;
}

.bootstrap-table .search input {
  border-radius: 10px;
  border-color: var(--ux-border-strong);
}

.pagination .page-link {
  border-radius: 8px;
  margin-inline: 0.1rem;
}

.badge {
  border-radius: 999px;
  padding: 0.33rem 0.52rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.notification-dropdown {
  border-radius: var(--ux-radius-md);
  border-color: var(--ux-border-strong);
  box-shadow: var(--ux-shadow-md);
}

.notification-dropdown__body {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bs-body-bg) 98%, #fff 2%) 0%, var(--bs-body-bg) 100%);
}

[data-bs-theme="dark"] .notification-dropdown__body {
  background: linear-gradient(180deg, color-mix(in srgb, #0f172a 82%, #132033 18%) 0%, #0f1a2b 100%);
}

.notification-dropdown-item__body {
  border-radius: 11px;
}

.fl-wrapper .fl-container {
  border-radius: 12px;
  box-shadow: var(--ux-shadow-md);
}

[data-bs-theme="dark"] .bg-body-tertiary {
  background-color: color-mix(in srgb, var(--bs-tertiary-bg) 84%, #0a1425 16%) !important;
}

@media (max-width: 991.98px) {
  .card,
  .modal-content,
  .offcanvas,
  .list-group-item {
    border-radius: 12px;
  }

  .table > :not(caption) > * > * {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .main,
  .btn,
  .notification-dropdown,
  .notification-dropdown-item,
  .card,
  .form-control,
  .form-select {
    transition: none;
  }
}

@media print {
  @page {
    margin: 12mm;
  }

  .sidebar,
  .topbar,
  .sidebar-flyout,
  .notification-dropdown,
  .app-universal-footer,
  .fl-wrapper {
    display: none !important;
  }

  form,
  button,
  input,
  select,
  textarea,
  label,
  .btn,
  .dropdown,
  [role="button"],
  .card-header {
    display: none !important;
  }

  .app,
  .main,
  .content-placeholder,
  .container-fluid {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    height: auto !important;
    background: transparent !important;
  }

  .main {
    display: block !important;
  }
}

/* ==========================================================================
   RMM Device Workspace (non-terminal / non-remote tabs)
   ========================================================================== */

.rmm-device-page {
  --rmm-device-border: color-mix(in srgb, var(--bs-border-color) 85%, #5d88c7 15%);
  --rmm-device-surface-soft: color-mix(in srgb, var(--bs-tertiary-bg) 80%, var(--bs-body-bg) 20%);
  --rmm-device-hover: color-mix(in srgb, var(--bs-primary) 12%, transparent);
}

.rmm-device-page--system .col-12 > .row.g-3,
.rmm-device-page--security .col-12 > .row.g-3 {
  align-items: stretch;
}

.rmm-device-page--system .col-12 > .row.g-3 > [class*="col-"],
.rmm-device-page--security .col-12 > .row.g-3 > [class*="col-"] {
  display: flex;
}

.rmm-device-page--system .col-12 > .row.g-3 > [class*="col-"] > .card,
.rmm-device-page--security .col-12 > .row.g-3 > [class*="col-"] > .card {
  width: 100%;
}

.rmm-hardware-grid,
.rmm-network-page-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.rmm-hardware-grid > *,
.rmm-network-page-grid > * {
  grid-column: 1 / -1;
  min-width: 0;
}

.rmm-hardware-grid > .card,
.rmm-network-page-grid > .card {
  margin-bottom: 0 !important;
}

.rmm-device-page--report .card {
  margin-bottom: 0.75rem;
}

.rmm-device-page--manage .card,
.rmm-device-page--power .card {
  margin-bottom: 0.9rem !important;
}

.rmm-manage-status-card {
  background:
    radial-gradient(900px 260px at 100% 0, color-mix(in srgb, var(--bs-primary) 14%, transparent), transparent 60%),
    radial-gradient(560px 220px at 0 100%, color-mix(in srgb, #14b8a6 10%, transparent), transparent 62%),
    var(--bs-card-bg);
}

.rmm-manage-summary {
  border: 1px solid var(--rmm-device-border);
  border-radius: 12px;
  padding: 1rem 1rem 0.95rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bs-card-bg) 90%, var(--bs-primary) 10%) 0%, var(--bs-card-bg) 100%);
}

.rmm-manage-summary__eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
  margin-bottom: 0.55rem;
}

.rmm-manage-summary__title {
  font-size: 1.1rem;
  font-weight: 720;
  line-height: 1.15;
}

.rmm-manage-summary__copy {
  color: var(--bs-secondary-color);
  line-height: 1.45;
}

.rmm-manage-kpi {
  border: 1px solid var(--rmm-device-border);
  border-radius: 12px;
  padding: 0.8rem 0.88rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bs-tertiary-bg) 78%, transparent) 0%, color-mix(in srgb, var(--bs-card-bg) 92%, transparent) 100%);
  height: 100%;
}

.rmm-manage-kpi__label {
  font-size: 0.74rem;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.18rem;
}

.rmm-manage-kpi__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bs-emphasis-color);
  line-height: 1.25;
}

.rmm-manage-card {
  overflow: hidden;
}

.rmm-manage-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.rmm-manage-card__intro {
  padding-bottom: 0.25rem;
}

.rmm-manage-panel {
  border: 1px solid var(--rmm-device-border);
  border-radius: 12px;
  padding: 0.95rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bs-tertiary-bg) 70%, transparent) 0%, color-mix(in srgb, var(--bs-card-bg) 94%, transparent) 100%);
}

.rmm-manage-panel--footer {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bs-primary) 8%, transparent) 0%, color-mix(in srgb, var(--bs-card-bg) 96%, transparent) 100%);
}

.rmm-manage-panel__title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
  margin-bottom: 0.7rem;
}

.rmm-manage-statebox {
  border: 1px solid var(--rmm-device-border);
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bs-tertiary-bg) 82%, transparent) 0%, color-mix(in srgb, var(--bs-card-bg) 95%, transparent) 100%);
  padding: 0.8rem 0.9rem;
  font-size: 0.82rem;
}

.rmm-manage-statebox--primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bs-primary) 16%, transparent) 0%, color-mix(in srgb, var(--bs-card-bg) 95%, transparent) 100%);
}

.rmm-manage-statebox--danger {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bs-danger) 12%, transparent) 0%, color-mix(in srgb, var(--bs-card-bg) 95%, transparent) 100%);
}

.rmm-manage-statebox__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.rmm-manage-statebox__label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--bs-secondary-color);
  margin-bottom: 0.18rem;
}

.rmm-manage-btn-primary {
  min-width: 11rem;
}

[data-bs-theme="dark"] .rmm-manage-kpi,
[data-bs-theme="dark"] .rmm-manage-statebox,
[data-bs-theme="dark"] .rmm-manage-summary,
[data-bs-theme="dark"] .rmm-manage-panel {
  background: color-mix(in srgb, #1a2a43 45%, var(--bs-card-bg) 55%);
}

.rmm-device-page--software .card,
.rmm-device-page--users .card,
.rmm-device-page--services .card,
.rmm-device-page--transfer .card,
.rmm-device-page--network .card,
.rmm-device-page--power .card,
.rmm-device-page--manage .card {
  max-width: none;
}

.rmm-settings-grid > [class*="col-"] {
  display: flex;
}

.rmm-settings-grid > [class*="col-"] > .card {
  width: 100%;
}

.rmm-device-page--system .rmm-system-grid > [class*="col-"],
.rmm-device-page--network .rmm-network-grid > [class*="col-"],
.rmm-device-page--power .rmm-power-grid > [class*="col-"],
.rmm-device-page--manage .rmm-manage-grid > [class*="col-"] {
  display: flex;
}

.rmm-device-page--system .rmm-system-grid > [class*="col-"] > .card,
.rmm-device-page--network .rmm-network-grid > [class*="col-"] > .card,
.rmm-device-page--power .rmm-power-grid > [class*="col-"] > .card,
.rmm-device-page--manage .rmm-manage-grid > [class*="col-"] > .card {
  width: 100%;
}

.rmm-device-page .col-12 > .card,
.rmm-device-page .col-lg-6 > .card,
.rmm-device-page .col-lg-4 > .card,
.rmm-device-page .col-md-6 > .card,
.rmm-device-page .col-xl-3 > .card {
  border-color: var(--rmm-device-border);
  border-radius: 14px;
}

.rmm-device-hero {
  border-color: var(--rmm-device-border);
  background:
    radial-gradient(900px 320px at 100% 0, color-mix(in srgb, var(--bs-primary) 15%, transparent), transparent 58%),
    radial-gradient(700px 280px at -12% -18%, color-mix(in srgb, #14b8a6 12%, transparent), transparent 50%),
    var(--bs-card-bg);
}

.rmm-device-hero__title-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.rmm-device-hero__identity {
  flex: 1 1 420px;
  min-width: 280px;
}

.rmm-device-hero__title {
  font-size: 1.12rem;
  font-weight: 760;
  letter-spacing: 0.01em;
}

.rmm-device-hero__nickname {
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
}

.rmm-device-hero__meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rmm-device-hero__agent-badge {
  color: var(--bs-emphasis-color);
  background: color-mix(in srgb, var(--bs-tertiary-bg) 88%, var(--bs-body-bg) 12%);
  border-color: var(--rmm-device-border) !important;
}

.rmm-device-hero__actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.rmm-device-hero__title-wrap .badge {
  line-height: 1;
}

@media (max-width: 767.98px) {
  .rmm-device-hero__identity {
    flex-basis: 100%;
  }

  .rmm-device-hero__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.rmm-device-tabs-shell {
  border: 1px solid var(--rmm-device-border);
  border-radius: 14px;
  background: var(--rmm-device-surface-soft);
  padding: 0.45rem;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.rmm-device-tabs-bar {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.rmm-device-tabs-scroll {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.42rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.12rem;
  padding-inline: 0;
  scroll-padding-inline: 1rem;
  scrollbar-width: thin;
}

.rmm-device-tabs-scroll::before,
.rmm-device-tabs-scroll::after {
  content: "";
  flex: 0 0 0.75rem;
}

.rmm-device-tabs-more {
  flex: 0 0 auto;
  position: relative;
}

.rmm-device-tabs-more__menu {
  min-width: 13rem;
  border-radius: 12px;
  z-index: 1200;
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  background: var(--bs-body-bg);
  border: 1px solid var(--rmm-device-border);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
  padding: 0.4rem;
  display: none;
}

.rmm-device-tabs-mobile-select {
  display: none;
}

.rmm-device-tabs-more[open] .rmm-device-tabs-more__menu,
.rmm-device-tabs-mobile-picker[open] .rmm-device-tabs-more__menu {
  display: block;
}

.rmm-device-tabs-more > summary,
.rmm-device-tabs-mobile-picker > summary {
  list-style: none;
  cursor: pointer;
}

.rmm-device-tabs-more > summary::-webkit-details-marker,
.rmm-device-tabs-mobile-picker > summary::-webkit-details-marker {
  display: none;
}

.rmm-device-tabs-more__item {
  padding: 0.48rem 0.62rem;
  border-radius: 9px;
  color: var(--bs-body-color);
  text-decoration: none;
}

.rmm-device-tabs-more__item:hover,
.rmm-device-tabs-more__item.active {
  background: color-mix(in srgb, var(--bs-primary) 14%, var(--bs-body-bg) 86%);
  color: var(--bs-emphasis-color);
}

.rmm-device-tabs-mobile-picker {
  position: relative;
}

.rmm-device-tabs-more__menu--mobile {
  left: 0;
  right: 0;
}

.rmm-device-tabs-scroll::-webkit-scrollbar {
  height: 8px;
}

.rmm-device-tabs-scroll::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.rmm-device-tabs-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--bs-primary) 35%, transparent);
  border-radius: 999px;
}

.rmm-device-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.38rem;
  padding: 0.48rem 0.72rem;
  min-height: 2.15rem;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--bs-body-color);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  font-size: 0.86rem;
  font-weight: 620;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease;
}

.rmm-device-tab__label {
  line-height: 1.15;
}

.rmm-device-tab:hover {
  border-color: var(--rmm-device-border);
  background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-body-bg) 90%);
  color: var(--bs-emphasis-color);
  transform: none;
}

.rmm-device-tab.is-active {
  border-color: color-mix(in srgb, var(--bs-primary) 60%, var(--rmm-device-border) 40%);
  background: color-mix(in srgb, var(--bs-primary) 20%, var(--bs-body-bg) 80%);
  color: var(--bs-emphasis-color);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bs-primary) 35%, transparent);
}

.rmm-device-tab__icon {
  font-size: 17px;
  line-height: 1;
}

.rmm-device-page .card-header {
  background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 14%, transparent), transparent);
  border-bottom-color: var(--rmm-device-border);
  font-weight: 650;
}

.rmm-device-page .card .card-body > h6 {
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.rmm-device-page .table-responsive {
  border: 1px solid var(--rmm-device-border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bs-card-bg) 95%, transparent);
}

.rmm-device-page .table-responsive .table {
  margin-bottom: 0;
}

.rmm-device-page .alert {
  border-radius: 12px;
}

.rmm-device-page .form-control,
.rmm-device-page .form-select,
.rmm-device-page .input-group-text {
  border-color: var(--rmm-device-border);
}

.rmm-section-header .card-title {
  font-size: 1rem;
  font-weight: 700;
}

.rmm-section-refresh-btn {
  width: 38px;
  height: 38px;
  padding: 0 !important;
  border: 1.5px solid color-mix(in srgb, var(--bs-success) 28%, transparent 72%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bs-success) 9%, var(--bs-body-bg) 91%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.12s ease;
}

.rmm-section-refresh-btn .material-symbols-rounded {
  font-size: 22px;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.rmm-section-refresh-btn:not(:disabled):hover {
  background: color-mix(in srgb, var(--bs-success) 16%, var(--bs-body-bg) 84%);
  border-color: color-mix(in srgb, var(--bs-success) 55%, transparent 45%);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--bs-success) 13%, transparent 87%);
}

.rmm-section-refresh-btn:not(:disabled):hover .material-symbols-rounded {
  transform: rotate(360deg);
}

.rmm-section-refresh-btn:not(:disabled):active {
  transform: scale(0.88);
  transition-duration: 0.08s;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bs-success) 18%, transparent 82%);
}

.rmm-section-refresh-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  border-color: var(--rmm-device-border);
  background: var(--rmm-device-surface-soft);
}

[data-bs-theme="dark"] .rmm-device-page .card,
[data-bs-theme="dark"] .rmm-device-hero,
[data-bs-theme="dark"] .rmm-device-tabs-shell {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

[data-bs-theme="dark"] .rmm-device-page .rmm-device-hero__agent-badge {
  color: #d8e6ff;
  background: rgba(159, 180, 212, 0.14);
  border-color: rgba(159, 180, 212, 0.22) !important;
}

@media (max-width: 991.98px) {
  .rmm-device-tabs-bar {
    display: none;
  }

  .rmm-device-tabs-scroll {
    display: none;
  }

  .rmm-device-tabs-mobile-select {
    display: block;
  }

  .rmm-device-hero__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .rmm-device-hero__identity {
    min-width: 100%;
  }

  .rmm-device-tab {
    padding: 0.44rem 0.64rem;
  }
}

@media (min-width: 1200px) {
  .rmm-hardware-grid > .card,
  .rmm-network-page-grid > .card {
    grid-column: span 6;
  }

  .rmm-network-page-grid > .card {
    grid-column: 1 / -1;
  }
}

.data-cleanup-page {
  --data-cleanup-hero-bg: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 10%, var(--bs-body-bg) 90%), color-mix(in srgb, var(--bs-info) 12%, var(--bs-body-bg) 88%));
  --data-cleanup-accent: color-mix(in srgb, var(--bs-primary) 72%, var(--bs-body-color) 28%);
  --data-cleanup-border: color-mix(in srgb, var(--bs-border-color) 84%, transparent);
  --data-cleanup-soft: color-mix(in srgb, var(--bs-primary) 7%, var(--bs-body-bg) 93%);
}

.data-cleanup-hero {
  background: var(--data-cleanup-hero-bg);
  border-color: var(--data-cleanup-border) !important;
}

.data-cleanup-kicker {
  color: var(--data-cleanup-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.data-cleanup-stat-label,
.data-cleanup-schedule-label {
  display: block;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.73rem;
  font-weight: 700;
  margin-bottom: 0.28rem;
}

.data-cleanup-stat-value {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 0.32rem;
  color: var(--bs-emphasis-color);
}

.data-cleanup-stat-value--small {
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
}

.data-cleanup-schedule-grid {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  width: 100%;
  padding-bottom: 0.14rem;
}

.data-cleanup-schedule-item,
.data-cleanup-last-run {
  border: 1px solid var(--data-cleanup-border);
  border-radius: 12px;
  padding: 0.52rem 0.72rem;
  background: var(--data-cleanup-soft);
}

.data-cleanup-schedule-item {
  flex: 0 0 auto;
  min-width: 170px;
}

.data-cleanup-schedule-item--command {
  min-width: 420px;
}

.data-cleanup-last-run {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.data-cleanup-table thead th,
.data-cleanup-preview-table thead th {
  color: var(--bs-secondary-color);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-cleanup-table tbody tr,
.data-cleanup-preview-table tbody tr {
  transition: background-color 160ms ease;
}

.data-cleanup-table tbody tr:hover,
.data-cleanup-preview-table tbody tr:hover {
  background: color-mix(in srgb, var(--bs-primary) 6%, var(--bs-body-bg) 94%);
}

.data-cleanup-table code,
.data-cleanup-preview-table code,
.data-cleanup-schedule-grid code {
  display: inline-block;
  color: var(--bs-emphasis-color);
  background: color-mix(in srgb, var(--bs-body-bg) 78%, var(--bs-primary) 22%);
  padding: 0.15rem 0.4rem;
  border-radius: 0.45rem;
}

.data-cleanup-schedule-item--command code {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-universal-footer {
  margin-top: auto;
  position: relative;
  padding: 1.5rem 0 0.75rem;
  color: var(--bs-secondary-color);
  font-size: 0.82rem;
  text-align: center;
}

.app-universal-footer::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  left: 0;
  right: 0;
  border-top: 1px solid var(--bs-border-color);
}

.content-placeholder > .container-fluid > :not(.app-universal-footer):last-child {
  margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .data-cleanup-page {
  --data-cleanup-hero-bg: linear-gradient(135deg, rgba(31, 52, 82, 0.92), rgba(13, 36, 58, 0.98));
  --data-cleanup-accent: #9bc1ff;
  --data-cleanup-border: rgba(153, 184, 224, 0.16);
  --data-cleanup-soft: rgba(120, 150, 192, 0.08);
}

[data-bs-theme="dark"] .data-cleanup-table tbody tr:hover,
[data-bs-theme="dark"] .data-cleanup-preview-table tbody tr:hover {
  background: rgba(122, 162, 255, 0.08);
}

[data-bs-theme="dark"] .data-cleanup-table code,
[data-bs-theme="dark"] .data-cleanup-preview-table code,
[data-bs-theme="dark"] .data-cleanup-schedule-grid code {
  color: #dce9ff;
  background: rgba(87, 122, 182, 0.22);
}

/* Settings page: Symfony UX Autocomplete / Tom Select theme-safe alignment */
.settings-page .ts-wrapper.form-select {
  width: 100%;
  min-height: calc(1.45em + 0.75rem + 2px);
}

.settings-page .ts-wrapper.form-select .ts-control {
  min-height: calc(1.45em + 0.75rem + 2px);
  border-radius: 10px;
  border: 1px solid var(--ux-border-strong);
  background: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color);
  box-shadow: none !important;
}

.settings-page .ts-wrapper.form-select .ts-control input,
.settings-page .ts-wrapper.form-select .ts-control .item,
.settings-page .ts-wrapper.form-select .ts-control .placeholder {
  color: var(--bs-body-color);
  background: transparent !important;
}

.settings-page .ts-wrapper.plugin-dropdown_input .items-placeholder,
.settings-page .ts-wrapper.plugin-dropdown_input .dropdown-input {
  background: transparent !important;
  color: var(--bs-body-color);
  border-color: var(--ux-border-strong);
  box-shadow: none !important;
}

.settings-page .ts-wrapper.plugin-dropdown_input.focus.dropdown-active .ts-control,
.settings-page .ts-wrapper.form-select.focus .ts-control {
  border-color: color-mix(in srgb, var(--bs-primary) 62%, var(--ux-border-strong) 38%) !important;
  box-shadow: var(--ux-focus-ring) !important;
}

.settings-page .ts-dropdown,
.settings-page .ts-dropdown .ts-dropdown-content {
  background: var(--bs-card-bg);
  color: var(--bs-body-color);
  border-color: var(--ux-border-strong);
}

.settings-page .ts-dropdown .option,
.settings-page .ts-dropdown .optgroup-header,
.settings-page .ts-dropdown .create,
.settings-page .ts-dropdown .no-results {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .settings-page .ts-wrapper.form-select .ts-control,
.app.theme-dark .settings-page .ts-wrapper.form-select .ts-control {
  background: var(--bs-tertiary-bg) !important;
  border-color: var(--ux-border-strong);
}

[data-bs-theme="dark"] .settings-page .ts-dropdown,
[data-bs-theme="dark"] .settings-page .ts-dropdown .ts-dropdown-content,
.app.theme-dark .settings-page .ts-dropdown,
.app.theme-dark .settings-page .ts-dropdown .ts-dropdown-content {
  background: color-mix(in srgb, var(--bs-card-bg) 96%, var(--bs-tertiary-bg) 4%);
  border-color: var(--ux-border-strong);
}

/* Universal Symfony UX Autocomplete / Tom Select theme bridge (app-wide) */
.app .content-placeholder .ts-wrapper {
  width: 100%;
}

.app .content-placeholder .ts-wrapper .ts-control,
.app .content-placeholder .ts-wrapper.form-select .ts-control {
  min-height: calc(1.45em + 0.75rem + 2px);
  border-radius: 10px;
  border: 1px solid var(--ux-border-strong);
  background: var(--bs-tertiary-bg) !important;
  color: var(--bs-body-color);
  box-shadow: none !important;
}

.app .content-placeholder .ts-wrapper .ts-control input,
.app .content-placeholder .ts-wrapper .ts-control .item,
.app .content-placeholder .ts-wrapper .ts-control .placeholder {
  color: var(--bs-body-color);
  background: transparent !important;
}

.app .content-placeholder .ts-wrapper.plugin-dropdown_input .items-placeholder,
.app .content-placeholder .ts-wrapper.plugin-dropdown_input .dropdown-input {
  background: transparent !important;
  color: var(--bs-body-color);
  border-color: var(--ux-border-strong);
  box-shadow: none !important;
}

.app .content-placeholder .ts-wrapper.plugin-dropdown_input.focus.dropdown-active .ts-control,
.app .content-placeholder .ts-wrapper.form-select.focus .ts-control,
.app .content-placeholder .ts-wrapper .ts-control.focus {
  border-color: color-mix(in srgb, var(--bs-primary) 62%, var(--ux-border-strong) 38%) !important;
  box-shadow: var(--ux-focus-ring) !important;
}

.app .content-placeholder .ts-dropdown,
.app .content-placeholder .ts-dropdown .ts-dropdown-content {
  background: var(--bs-card-bg);
  color: var(--bs-body-color);
  border-color: var(--ux-border-strong);
  border-radius: 10px;
}

.app .content-placeholder .ts-dropdown .option,
.app .content-placeholder .ts-dropdown .optgroup-header,
.app .content-placeholder .ts-dropdown .create,
.app .content-placeholder .ts-dropdown .no-results {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .app .content-placeholder .ts-wrapper .ts-control,
[data-bs-theme="dark"] .app .content-placeholder .ts-wrapper.form-select .ts-control,
.app.theme-dark .content-placeholder .ts-wrapper .ts-control,
.app.theme-dark .content-placeholder .ts-wrapper.form-select .ts-control {
  background: var(--bs-tertiary-bg) !important;
  border-color: var(--ux-border-strong);
}

[data-bs-theme="dark"] .app .content-placeholder .ts-dropdown,
[data-bs-theme="dark"] .app .content-placeholder .ts-dropdown .ts-dropdown-content,
.app.theme-dark .content-placeholder .ts-dropdown,
.app.theme-dark .content-placeholder .ts-dropdown .ts-dropdown-content {
  background: color-mix(in srgb, var(--bs-card-bg) 96%, var(--bs-tertiary-bg) 4%);
  border-color: var(--ux-border-strong);
}

/* RMM network: encrypted Wi-Fi credential blobs */
.app .rmm-encrypted-key {
  max-width: 420px;
}

.app .rmm-encrypted-key summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.app .rmm-encrypted-key summary::-webkit-details-marker {
  display: none;
}

.app .rmm-encrypted-key summary:focus-visible {
  border-radius: 0.5rem;
  outline: none;
  box-shadow: var(--ux-focus-ring);
}

.app .rmm-encrypted-key__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.app .rmm-encrypted-key__blob {
  display: block;
  max-width: min(70vw, 520px);
  max-height: 7rem;
  overflow: auto;
  margin-top: 0.4rem;
  padding: 0.5rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--bs-body-color);
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.625rem;
}

.app.theme-dark .rmm-encrypted-key__blob {
  background: color-mix(in srgb, var(--bs-card-bg) 88%, var(--bs-tertiary-bg) 12%);
  border-color: var(--ux-border-strong);
}

.app .rmm-wifi-key-result {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.625rem;
}

.app .rmm-wifi-key-result__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app .rmm-wifi-key-result__value {
  color: var(--bs-body-color);
  word-break: break-all;
}

.app.theme-dark .rmm-wifi-key-result {
  background: color-mix(in srgb, var(--bs-card-bg) 88%, var(--bs-tertiary-bg) 12%);
  border-color: var(--ux-border-strong);
}
