:root {
  --color-primary-50: 239 246 255;
  --color-primary-100: 219 234 254;
  --color-primary-200: 191 219 254;
  --color-primary-300: 147 197 253;
  --color-primary-400: 96 165 250;
  --color-primary-500: 59 130 246;
  --color-primary-600: 37 99 235;
  --color-primary-700: 29 78 216;
  --color-primary-800: 30 64 175;
  --color-primary-900: 30 58 138;
  --color-primary-950: 23 37 84;
  --bs-primary: rgb(var(--color-primary-600));
  --bs-primary-rgb: var(--color-primary-600);
  --bs-link-color-rgb: var(--color-primary-600);
  --bs-link-hover-color-rgb: var(--color-primary-700);
  --ma-border: rgba(15, 23, 42, 0.08);
  --ma-surface-sidebar: #16181d;
  --ma-surface-base: #1d2026;
  --ma-surface-1: #22262d;
  --ma-surface-2: #272c34;
  --ma-surface-3: #2d333c;
  --ma-surface-overlay: #343b45;
}

body.theme-dark,
body.theme-light {
  --color-primary-50: 239 246 255;
  --color-primary-100: 219 234 254;
  --color-primary-200: 191 219 254;
  --color-primary-300: 147 197 253;
  --color-primary-400: 96 165 250;
  --color-primary-500: 59 130 246;
  --color-primary-600: 37 99 235;
  --color-primary-700: 29 78 216;
  --color-primary-800: 30 64 175;
  --color-primary-900: 30 58 138;
  --color-primary-950: 23 37 84;
}

body.theme-dark,
body.theme-light {
  --bs-primary: rgb(var(--color-primary-600));
  --bs-primary-rgb: var(--color-primary-600);
  --bs-link-color-rgb: var(--color-primary-600);
  --bs-link-hover-color-rgb: var(--color-primary-700);
}

body {
  font-family: "Inter", system-ui, sans-serif;
  overflow: hidden;
}

html,
body {
  height: 100%;
}

body[data-bs-theme="dark"] {
  --ma-border: rgba(255, 255, 255, 0.06);
  --ma-surface-sidebar: #191b20;
  --ma-surface-base: #21252b;
  --ma-surface-1: #242930;
  --ma-surface-2: #282e36;
  --ma-surface-3: #2c333c;
  --ma-surface-overlay: #313944;
  background:
    radial-gradient(circle at top left, rgba(var(--color-primary-700), 0.28), transparent 28%),
    linear-gradient(180deg, #171a1f 0%, #1b1f26 55%, #20252c 100%);
  color: #e5eefb;
}

body[data-bs-theme="light"] {
  --ma-border: rgba(15, 23, 42, 0.08);
  --ma-surface-sidebar: #e2e5ea;
  --ma-surface-base: #eceff3;
  --ma-surface-1: #e9ecf0;
  --ma-surface-2: #e6e9ee;
  --ma-surface-3: #e3e7ec;
  --ma-surface-overlay: #dde2e8;
  background:
    radial-gradient(circle at top left, rgba(var(--color-primary-200), 0.55), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, #f0f3f7 55%, #eaedf2 100%);
  color: #0f172a;
}

a {
  text-decoration: none;
}

.auth-card,
.node-chip,
.sidebar-status,
.hero-stat,
.stat-card,
.preview-card,
.console-output {
  border-radius: 1.25rem;
}

.auth-card {
  background: color-mix(in srgb, var(--ma-surface-overlay) 92%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid var(--ma-border);
}

body[data-bs-theme="light"] .auth-card {
  background: color-mix(in srgb, white 58%, var(--ma-surface-base));
}

.auth-shell {
  background:
    radial-gradient(circle at top center, rgba(var(--color-primary-500), 0.16), transparent 24%),
    linear-gradient(180deg, #181c22 0%, #14181e 100%);
}

body[data-bs-theme="light"] .auth-shell {
  background:
    radial-gradient(circle at top center, rgba(var(--color-primary-300), 0.28), transparent 22%),
    linear-gradient(180deg, #f4f7fb 0%, #eceff4 100%);
}

.container-tight {
  max-width: 26rem;
}

.auth-logo {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.22);
}

.auth-card-tabler {
  border-radius: 1rem;
  box-shadow: 0 1.5rem 3.5rem rgba(15, 23, 42, 0.28);
}

.auth-input {
  min-height: 2.75rem;
  border-radius: 0.85rem;
}

.auth-brand {
  background:
    radial-gradient(circle at top, rgba(var(--color-primary-600), 0.32), transparent 35%),
    linear-gradient(155deg, #111827 0%, #0f172a 70%, #172554 100%);
}

body[data-bs-theme="light"] .auth-brand {
  background:
    radial-gradient(circle at top, rgba(var(--color-primary-200), 0.55), transparent 35%),
    linear-gradient(155deg, #ffffff 0%, #eef5ff 70%, #e4ecff 100%);
}

.auth-feature {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--ma-surface-2) 88%, transparent);
  border: 1px solid rgba(var(--color-primary-500), 0.35);
  font-weight: 500;
}

body[data-bs-theme="light"] .auth-feature {
  background: color-mix(in srgb, white 55%, var(--ma-surface-1));
  border: 1px solid rgba(var(--color-primary-200), 0.7);
}

.brand-mark,
.brand-mark-lg,
.stat-icon,
.chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgb(var(--color-primary-500)), rgb(var(--color-primary-700)));
  color: #fff;
  box-shadow: 0 0.75rem 2rem rgba(var(--color-primary-700), 0.18);
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  font-size: 1.3rem;
}

.brand-mark-lg {
  width: 4rem;
  height: 4rem;
  font-size: 1.75rem;
}

.stat-icon,
.chip-icon {
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.4rem;
}

.chip-icon-plain {
  background: transparent;
  box-shadow: none;
  color: var(--bs-emphasis-color);
}

.distro-icon {
  color: var(--bs-emphasis-color);
}

.distro-icon.fl-ubuntu {
  color: #e95420;
}

.distro-icon.fl-debian {
  color: #d70a53;
}

.distro-icon.fl-archlinux {
  color: #1793d1;
}

.content {
  min-width: 0;
  min-height: 0;
  background: color-mix(in srgb, var(--ma-surface-base) 96%, transparent);
  overflow: hidden;
}

.app-header,
.app-footer {
  background: color-mix(in srgb, var(--ma-surface-2) 94%, transparent);
  backdrop-filter: blur(14px);
}

body[data-bs-theme="light"] .app-header,
body[data-bs-theme="light"] .app-footer {
  background: color-mix(in srgb, white 42%, var(--ma-surface-2));
}

.app-sidebar {
  width: 280px;
  background: color-mix(in srgb, var(--ma-surface-sidebar) 97%, transparent);
  backdrop-filter: blur(14px);
  overflow: auto;
}

body[data-bs-theme="light"] .app-sidebar {
  background: color-mix(in srgb, white 22%, var(--ma-surface-sidebar));
}

.sidebar-logo {
  width: 3rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.95rem;
  box-shadow: 0 0.75rem 2rem rgba(var(--color-primary-700), 0.18);
}

.app-sidebar-inner {
  gap: 0.9rem;
}

.sidebar-brand {
  padding: 0.35rem 0.2rem 0.55rem;
}

.sidebar-brand-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar-section-label {
  padding: 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.app-sidebar-nav {
  gap: 0.35rem;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 2.9rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.95rem;
  color: var(--bs-secondary-color);
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.app-nav-link i {
  width: 1.1rem;
  font-size: 1.05rem;
  text-align: center;
}

.app-nav-link:hover {
  color: var(--bs-emphasis-color);
  background: color-mix(in srgb, var(--ma-surface-2) 92%, transparent);
  transform: translateX(2px);
}

.app-nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(var(--color-primary-600), 0.96), rgba(var(--color-primary-700), 0.96));
  box-shadow: 0 0.9rem 2rem rgba(var(--color-primary-900), 0.2);
}

body[data-bs-theme="light"] .app-nav-link.is-active {
  color: #fff;
}

.app-header {
  box-shadow: inset 0 -1px 0 var(--ma-border);
}

.app-footer {
  box-shadow: inset 0 1px 0 var(--ma-border);
}

.min-w-0 {
  min-width: 0;
}

.app-shell {
  height: 100vh;
  overflow: hidden;
}

.container-fluid {
  min-height: 0;
}

.content > .container-fluid {
  height: 100%;
  overflow: auto;
}

.header-search {
  position: relative;
  width: min(22rem, 42vw);
}

.header-search .form-control {
  padding-left: 2.35rem;
}

.header-search-icon {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
  pointer-events: none;
}

.btn-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0.85rem;
}

.node-chip {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.node-chip:hover {
  transform: translateY(-3px);
  box-shadow: 0 1rem 2rem rgba(2, 6, 23, 0.35);
}

.dashboard-loader {
  min-height: 220px;
}

.dashboard-spinner {
  display: grid;
  place-items: center;
  min-height: 160px;
}

.kpi-card {
  overflow: hidden;
  position: relative;
}

.kpi-card-featured .card-body {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.kpi-card-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.kpi-card-featured-value {
  position: relative;
  z-index: 1;
  font-size: clamp(2.3rem, 4vw, 3.15rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--bs-emphasis-color);
  margin-top: auto;
}

.kpi-graph {
  position: absolute;
  inset: 0;
  opacity: 1;
  pointer-events: none;
}

.kpi-graph svg {
  width: 100%;
  height: 100%;
}

.kpi-card-featured .kpi-graph {
  inset: auto 0 0 0;
  height: 42%;
  opacity: 0.96;
}

.node-tile {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  min-height: 118px;
}

.node-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  border-right: 1px solid var(--ma-border);
}

.node-tile-main {
  padding: 0.7rem 0.8rem 0.7rem 0.75rem;
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
}

.node-tile-heading {
  min-width: 0;
}

.node-tile-metrics {
  display: grid;
  gap: 0.45rem;
  align-self: start;
}

.node-tile-meta {
  align-self: end;
  margin-top: 0.55rem;
}

.node-metric {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 2.4rem;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.node-metric .progress {
  --bs-progress-height: 0.35rem;
  display: flex;
  align-items: center;
  margin: 0;
}

.node-tile .chip-icon {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1rem;
}

.node-brand-icon {
  width: 100%;
  height: 82%;
  font-size: 3.2rem;
  align-self: center;
}

.node-brand-icon .distro-icon,
.node-brand-icon .node-loading-icon {
  font-size: 3.25rem;
  line-height: 1;
}

.node-loading-icon {
  animation: node-icon-spin 1s linear infinite;
}

@keyframes node-icon-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.node-tile-main .badge {
  font-size: 0.65rem;
  padding: 0.35rem 0.45rem;
}

.node-tile-main h3 {
  font-size: 0.95rem;
}

.node-tile-main .small {
  font-size: 0.74rem;
}

.node-status {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  display: inline-block;
  position: absolute;
  top: 0.75rem;
  right: 0.8rem;
}

.node-status.is-online {
  background: #22c55e;
  box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.15);
}

.node-status.is-offline {
  background: #64748b;
  box-shadow: 0 0 0 0.2rem rgba(100, 116, 139, 0.12);
}

.node-metric-label,
.node-metric-value {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

.node-metric-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  justify-self: end;
}

.system-summary-item {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}

.system-summary-icon {
  width: 3rem;
  height: 3rem;
  font-size: 1.2rem;
}

.system-summary-icon-plain {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 2.25rem;
}

.distro-icon-lg {
  font-size: 2.4rem;
}

.system-summary-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.15rem;
}

.system-summary-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bs-emphasis-color);
}

.system-summary-stats {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.system-summary-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
}

.system-summary-copy {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.9rem;
  background: transparent;
  text-align: left;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.system-summary-copy:hover {
  background: color-mix(in srgb, var(--ma-surface-base) 72%, var(--ma-surface-2));
  transform: translateX(2px);
}

.progress {
  --bs-progress-height: 0.6rem;
  background: color-mix(in srgb, black 18%, var(--ma-surface-1));
}

.card,
.list-group-item,
.form-control,
.form-select,
.btn,
.table,
.alert,
.badge,
.modal-content,
.dropdown-menu {
  border-color: var(--ma-border);
}

.card,
.list-group-item,
.table,
.modal-content,
.dropdown-menu,
.sidebar-status,
.theme-card,
.add-vm-panel,
.auth-toggle-option,
.option-check {
  background: var(--ma-surface-1);
}

.form-control,
.form-select,
.btn,
.modal-content {
  border-radius: 0.9rem;
}

.form-control,
.form-select {
  background: color-mix(in srgb, var(--ma-surface-base) 80%, var(--ma-surface-2));
}

body[data-bs-theme="light"] .form-control,
body[data-bs-theme="light"] .form-select {
  background: color-mix(in srgb, white 72%, var(--ma-surface-1));
}

.stat-card,
.node-chip,
.dashboard-loader > .card,
.preview-card.dim {
  background: var(--ma-surface-2);
}

.modal-content {
  background: var(--ma-surface-overlay);
}

body[data-bs-theme="light"] .card,
body[data-bs-theme="light"] .list-group-item,
body[data-bs-theme="light"] .table,
body[data-bs-theme="light"] .modal-content,
body[data-bs-theme="light"] .dropdown-menu,
body[data-bs-theme="light"] .sidebar-status,
body[data-bs-theme="light"] .theme-card,
body[data-bs-theme="light"] .add-vm-panel,
body[data-bs-theme="light"] .auth-toggle-option,
body[data-bs-theme="light"] .option-check {
  background: var(--ma-surface-1);
}

.add-vm-form {
  display: grid;
  gap: 1rem;
}

.add-vm-panel {
  border: 1px solid var(--ma-border);
  border-radius: 1.1rem;
  padding: 1rem;
}

body[data-bs-theme="light"] .add-vm-panel {
  background: var(--ma-surface-1);
}

.add-vm-panel-title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.9rem;
}

.auth-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.auth-toggle-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--ma-border);
  border-radius: 0.95rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

body[data-bs-theme="light"] .auth-toggle-option {
  background: var(--ma-surface-1);
}

.auth-toggle-label {
  font-weight: 600;
  color: var(--bs-emphasis-color);
}

.btn-check:checked + .auth-toggle-option {
  border-color: rgba(var(--color-primary-500), 0.7);
  background: rgba(var(--color-primary-500), 0.12);
  transform: translateY(-1px);
}

.auth-mode-panel {
  min-height: 74px;
}

.option-check {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--ma-border);
  border-radius: 0.95rem;
}

body[data-bs-theme="light"] .option-check {
  background: var(--ma-surface-1);
}

.run-pre,
.code-block,
.console-output {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.run-pre,
.code-block {
  background: #13161b;
  color: #dbeafe;
  padding: 1rem;
  border-radius: 1rem;
}

.console-output {
  min-height: 420px;
  max-height: 60vh;
  overflow: auto;
  background: #0b1220;
  color: #dbeafe;
  padding: 0;
}

.console-shell {
  position: relative;
}

.console-terminal {
  min-height: 420px;
  height: 60vh;
  overflow: hidden;
}

.console-panel {
  min-height: 100vh;
}

.console-panel .console-terminal {
  height: 100vh;
}

.console-fullscreen-shell {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: #0a0f1a;
}

.console-page {
  height: 100vh;
  width: 100vw;
  background:
    radial-gradient(circle at top, rgba(var(--color-primary-700), 0.18), transparent 22%),
    linear-gradient(180deg, #070b13 0%, #0a0f1a 100%);
}

.console-page-terminal {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.console-terminal-fullscreen {
  min-height: 100vh;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  background: transparent;
}

.console-terminal .xterm {
  height: 100%;
  background: #0b1220;
  padding: 0;
}

.console-terminal .xterm-viewport {
  background: #0b1220;
  border-radius: 0;
}

.console-terminal-fullscreen .xterm,
.console-terminal-fullscreen .xterm-screen,
.console-terminal-fullscreen .xterm-viewport,
.console-terminal-fullscreen .xterm-scroll-area {
  background: #0a0f1a;
}

.preview-card {
  min-height: 120px;
  border: 1px solid rgba(var(--color-primary-700), 0.55);
  background: linear-gradient(135deg, rgba(var(--color-primary-900), 0.95), rgba(var(--color-primary-700), 0.8));
}

.preview-card.accent {
  background: linear-gradient(135deg, rgba(var(--color-primary-500), 0.92), rgba(var(--color-primary-700), 0.92));
}

.preview-card.dim {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

body[data-bs-theme="light"] .preview-card {
  background: linear-gradient(135deg, rgba(var(--color-primary-100), 0.9), rgba(var(--color-primary-300), 0.9));
  border: 1px solid rgba(var(--color-primary-200), 0.9);
}

body[data-bs-theme="light"] .preview-card.dim {
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
}

.qr-panel img {
  width: 100%;
  height: auto;
}

.theme-card {
  padding: 1rem;
  border: 1px solid var(--ma-border);
  border-radius: 1rem;
  cursor: pointer;
}

body[data-bs-theme="light"] .theme-card {
  background: var(--ma-surface-1);
}

.theme-card strong,
.theme-card small {
  display: block;
}

.theme-card small {
  color: var(--bs-secondary-color);
}

.theme-swatch {
  display: block;
  height: 88px;
  border-radius: 0.85rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.swatch-dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.swatch-light {
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
}

.btn-check:checked + .theme-card {
  border-color: rgb(var(--color-primary-500));
  box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-500), 0.2);
}

.settings-nav-card,
.settings-section-card,
.settings-info-tile,
.otp-qr-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--ma-surface-2) 90%, transparent), var(--ma-surface-1));
}

.settings-nav-list {
  display: grid;
  gap: 0.55rem;
}

.settings-nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 2.9rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--ma-border);
  border-radius: 0.95rem;
  color: var(--bs-secondary-color);
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.settings-nav-link:hover,
.settings-nav-link.is-active {
  color: var(--bs-emphasis-color);
  background: color-mix(in srgb, rgb(var(--color-primary-500)) 8%, transparent);
  border-color: rgba(var(--color-primary-500), 0.35);
}

.settings-nav-link i {
  font-size: 1.15rem;
}

.settings-info-tile {
  min-height: 100%;
  padding: 1rem;
  border: 1px solid var(--ma-border);
  border-radius: 1rem;
}

.otp-qr-card {
  padding: 1rem;
  border: 1px solid var(--ma-border);
  border-radius: 1rem;
}

.otp-qr-card img {
  width: 100%;
  max-width: 220px;
  height: auto;
}

.updates-policy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.updates-window-fields {
  display: grid;
  gap: 0.45rem;
  min-width: 13rem;
}

.updates-window-times {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.updates-window-times span {
  font-size: 0.74rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

.updates-window-times .form-control {
  min-width: 0;
}

.updates-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.updates-day-chip {
  position: relative;
  cursor: pointer;
}

.updates-day-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.updates-day-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 1.85rem;
  padding: 0 0.45rem;
  border: 1px solid var(--ma-border);
  border-radius: 999px;
  background: var(--ma-surface-1);
  color: var(--bs-secondary-color);
  font-size: 0.72rem;
  font-weight: 700;
}

.updates-day-chip input:checked + span {
  border-color: rgb(var(--color-primary-500));
  background: color-mix(in srgb, rgb(var(--color-primary-500)) 10%, transparent);
  color: var(--bs-emphasis-color);
}

.updates-window-editor {
  display: grid;
  gap: 1rem;
}

.updates-weekdays-lg {
  gap: 0.6rem;
}

.updates-day-chip-lg span {
  min-width: 6.75rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.84rem;
}

.updates-package-list {
  display: grid;
  gap: 0.3rem;
}

.updates-package-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.3;
}

.updates-package-name {
  color: var(--bs-emphasis-color);
  font-weight: 600;
}

.updates-package-version {
  color: var(--bs-secondary-color);
  word-break: break-word;
}

.updates-details-trigger {
  padding: 0;
  font-size: 0.78rem;
  text-decoration: none;
}

.updates-details-trigger:hover,
.updates-details-trigger:focus {
  text-decoration: underline;
}

.updates-packages-table th,
.updates-packages-table td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
}

.updates-packages-table th {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.updates-packages-table td:nth-child(2),
.updates-packages-table td:nth-child(3),
.updates-packages-table td:nth-child(4) {
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 0.8rem;
}

.group-icon-field {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--ma-border);
  border-radius: 1rem;
  background: var(--ma-surface-1);
  color: inherit;
  text-align: left;
}

.group-icon-field-preview {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.95rem;
  border: 1px solid var(--ma-border);
  background: color-mix(in srgb, var(--ma-surface-base) 72%, var(--ma-surface-2));
  color: var(--bs-emphasis-color);
  font-size: 1.4rem;
  flex: 0 0 auto;
}

.group-icon-field-text {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
  flex: 1 1 auto;
}

.group-icon-field-title {
  font-weight: 700;
  color: var(--bs-emphasis-color);
}

.group-icon-field-subtitle {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.group-icon-field-arrow {
  color: var(--bs-secondary-color);
  font-size: 1rem;
}

.group-icon-search {
  position: relative;
}

.group-icon-search-icon {
  position: absolute;
  top: 50%;
  left: 0.95rem;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
  pointer-events: none;
}

.group-icon-search .form-control {
  padding-left: 2.5rem;
}

.group-icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
  max-height: 28rem;
  overflow: auto;
  padding-right: 0.2rem;
}

.group-icon-option {
  min-height: 5.25rem;
  padding: 0.8rem 0.6rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
  text-align: center;
}

.group-icon-option i {
  font-size: 1.35rem;
}

.group-icon-option span {
  font-size: 0.7rem;
  line-height: 1.2;
  word-break: break-word;
}

.group-icon-option.is-active,
.group-icon-option:hover,
.group-icon-option:focus {
  border-color: rgb(var(--color-primary-500));
  background: color-mix(in srgb, rgb(var(--color-primary-500)) 10%, transparent);
  color: var(--bs-emphasis-color);
}

.group-node-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--ma-border);
  border-radius: 0.95rem;
  background: color-mix(in srgb, var(--ma-surface-base) 72%, var(--ma-surface-2));
}

.group-node-row:hover {
  background: color-mix(in srgb, rgb(var(--color-primary-500)) 8%, transparent);
}

.logs-table th,
.logs-table td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
}

.logs-command-cell {
  min-width: 0;
  width: 100%;
}

.logs-command-button {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  text-decoration: none;
}

.logs-command-button:hover,
.logs-command-button:focus {
  color: inherit;
  text-decoration: none;
}

.logs-command-preview {
  display: -webkit-box;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.logs-modal-section + .logs-modal-section {
  margin-top: 1rem;
}

.logs-modal-label {
  margin-bottom: 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.logs-modal-pre {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--ma-border);
  border-radius: 1rem;
  background: var(--ma-surface-1);
  color: var(--bs-emphasis-color);
  white-space: pre-wrap;
  word-break: break-word;
}

.uptime-summary-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--ma-surface-2) 92%, transparent), var(--ma-surface-1));
}

.uptime-summary-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.6rem;
}

.uptime-summary-value {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--bs-emphasis-color);
}

.uptime-chart-shell {
  display: grid;
  gap: 0.75rem;
}

.uptime-line-chart {
  position: relative;
  height: 18rem;
  padding: 0.75rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ma-surface-base) 84%, var(--ma-surface-2)), color-mix(in srgb, var(--ma-surface-1) 96%, transparent));
  overflow: hidden;
  border: 1px solid var(--ma-border);
}

.uptime-line-chart-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.uptime-monitor-card {
  display: grid;
  gap: 1rem;
  height: 100%;
  padding: 1.1rem;
  border: 1px solid var(--ma-border);
  border-radius: 1.15rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ma-surface-2) 90%, transparent), var(--ma-surface-1));
}

.uptime-monitor-card.is-up {
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.uptime-monitor-card.is-down {
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.14);
}

.uptime-monitor-head,
.uptime-monitor-foot,
.uptime-monitor-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.uptime-monitor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.uptime-monitor-badge.is-up {
  color: #86efac;
  background: rgba(20, 83, 45, 0.55);
}

.uptime-monitor-badge.is-down {
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.55);
}

.uptime-monitor-badge.is-pending {
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.65);
}

.uptime-monitor-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;
}

.uptime-monitor-stat {
  padding: 0.75rem 0.85rem;
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--ma-surface-base) 74%, var(--ma-surface-2));
  font-size: 0.86rem;
}

.uptime-monitor-stat span,
.uptime-monitor-foot {
  color: var(--bs-secondary-color);
}

.uptime-monitor-stat strong {
  color: var(--bs-emphasis-color);
  font-weight: 700;
}

.uptime-check-strip {
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  min-height: 2.25rem;
  padding: 0.2rem 0;
}

.uptime-check-strip-table {
  min-width: 10rem;
  min-height: 1rem;
  gap: 0.18rem;
}

.uptime-check-pill {
  flex: 1 1 0;
  min-width: 0;
  height: 2rem;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.35);
}

.uptime-check-pill.is-up {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.45));
}

.uptime-check-pill.is-down {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.95), rgba(185, 28, 28, 0.5));
}

.uptime-check-pill.is-pending {
  background: rgba(100, 116, 139, 0.35);
}

.uptime-check-strip-table .uptime-check-pill {
  height: 0.8rem;
  min-width: 0.2rem;
}

.uptime-monitor-foot {
  font-size: 0.82rem;
}

.uptime-table th {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  border-bottom: 1px solid var(--ma-border);
  padding: 0 0.85rem 0.85rem;
  white-space: nowrap;
}

.uptime-table td {
  padding: 0.9rem 0.85rem;
  border-color: var(--ma-border);
  vertical-align: middle;
}

.uptime-table tbody tr {
  transition: background-color 0.18s ease;
}

.uptime-table tbody tr:hover {
  background: color-mix(in srgb, var(--ma-surface-base) 72%, var(--ma-surface-2));
}

.uptime-table tbody tr:last-child td {
  border-bottom-color: transparent;
}

.uptime-table-compact td,
.uptime-table-compact th {
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

.uptime-table-nodes td {
  font-size: 0.92rem;
}

body[data-bs-theme="light"] .uptime-monitor-card,
body[data-bs-theme="light"] .uptime-summary-card {
  background: linear-gradient(180deg, color-mix(in srgb, white 76%, var(--ma-surface-1)), var(--ma-surface-1));
}

body[data-bs-theme="light"] .uptime-monitor-stat {
  background: color-mix(in srgb, white 82%, var(--ma-surface-1));
}

body[data-bs-theme="light"] .uptime-line-chart {
  background: linear-gradient(180deg, color-mix(in srgb, white 86%, var(--ma-surface-1)), var(--ma-surface-1));
}

@media (max-width: 991.98px) {
  .app-shell {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
  }

  .auth-toggle {
    grid-template-columns: 1fr;
  }
}
