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

:root {
  --sw-font-base: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sw-font-display: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --sw-radius-sm: 6px;
  --sw-radius-md: 10px;
  --sw-radius-lg: 16px;
  --sw-radius-pill: 999px;

  --sw-shadow-1: 0 1px 2px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.08);
  --sw-shadow-2: 0 8px 24px rgba(15, 23, 42, 0.12);

  --sw-space-1: 4px;
  --sw-space-2: 8px;
  --sw-space-3: 12px;
  --sw-space-4: 16px;
  --sw-space-5: 20px;
  --sw-space-6: 24px;
  --sw-space-7: 32px;
  --sw-space-8: 40px;

  --sw-color-brand: #0870ff;
  --sw-color-brand-strong: #0b5ad1;
  --sw-color-accent: #f88138;
  --sw-color-success: #0ea35b;
  --sw-color-warning: #f88138;
  --sw-color-warning-strong: #c05723;

  --sw-color-bg: #f7f9fc;
  --sw-color-surface: #ffffff;
  --sw-color-surface-alt: #eef2f8;
  --sw-color-border: #e2e8f0;
  --sw-color-border-strong: #cbd5e1;

  --sw-color-text: #0f172a;
  --sw-color-text-muted: #475569;

  --sw-color-sidebar: #f2f4fb;
  --sw-color-sidebar-strong: #e7ecf7;
  --sw-color-sidebar-border: #d6deed;
  --sw-color-sidebar-text: #0f172a;
  --sw-color-sidebar-muted: #475569;

  --sw-color-topbar: #ffffff;
  --sw-color-topbar-border: #e2e8f0;
}

html.theme-dark,
body.theme-dark {
  --sw-color-bg: #0b0f17;
  --sw-color-surface: #0f1623;
  --sw-color-surface-alt: #131c2b;
  --sw-color-border: #22324f;
  --sw-color-border-strong: #334562;

  --sw-color-text: #e2e8f0;
  --sw-color-text-muted: #9aa6bd;

  --sw-color-sidebar: #0a101b;
  --sw-color-sidebar-strong: #0b1425;
  --sw-color-sidebar-border: #1d2a44;
  --sw-color-sidebar-text: #e2e8f0;
  --sw-color-sidebar-muted: #93a1ba;

  --sw-color-topbar: #0f1623;
  --sw-color-topbar-border: #1f2c46;

  --sw-color-modal-surface: #151f30;
  --sw-color-modal-border: #2a3b57;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--sw-font-base);
  height: 100%;
  min-height: 100%;
  background: var(--sw-color-bg);
}

body {
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--sw-color-brand);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--sw-space-4);
  font-family: var(--sw-font-display);
  color: var(--sw-color-text);
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 var(--sw-space-4);
  color: var(--sw-color-text-muted);
}

.sw-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  color: var(--sw-color-text);
  background: radial-gradient(1200px 800px at 10% -10%, rgba(8, 112, 255, 0.08), transparent 45%),
    var(--sw-color-bg);
}

.sw-sidebar {
  background: linear-gradient(180deg, var(--sw-color-sidebar), var(--sw-color-sidebar-strong));
  color: var(--sw-color-sidebar-text);
  border-right: 1px solid var(--sw-color-sidebar-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.sw-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(1200px 800px at 10% -10%, rgba(8, 112, 255, 0.08), transparent 45%),
    var(--sw-color-bg);
}

.sw-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--sw-space-3) var(--sw-space-6);
  background: var(--sw-color-topbar);
  border-bottom: 1px solid var(--sw-color-topbar-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.sw-topbar__brand {
  display: flex;
  align-items: center;
}

.sw-topbar__brand img {
  width: 260px;
  height: 120px;
  object-fit: contain;
  filter: invert(1);
}

body.theme-dark .sw-topbar__brand img,
html.theme-dark .sw-topbar__brand img {
  filter: none;
}

.sw-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--sw-space-2);
  margin-left: auto;
}

.sw-topbar__actions .sw-icon-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sw-color-border);
  color: var(--sw-color-text);
  background: var(--sw-color-surface);
  padding: 8px 10px;
  border-radius: var(--sw-radius-md);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sw-topbar__actions .sw-icon-button:hover {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
  background: rgba(8, 112, 255, 0.08);
}

.sw-content {
  padding: var(--sw-space-6);
  max-width: none;
  width: 100%;
}

.sw-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sw-space-2) var(--sw-space-2);
  border-bottom: 1px solid var(--sw-color-sidebar-border);
}

.sw-brand-row--compact {
  justify-content: flex-end;
  padding: var(--sw-space-3) var(--sw-space-4);
}

.sw-brand {
  display: flex;
  align-items: center;
  gap: var(--sw-space-3);
  font-weight: 600;
  color: var(--sw-color-sidebar-text);
}

.sw-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 60px;
  border-radius: var(--sw-radius-md);
  background: transparent;
  overflow: hidden;
}

.sw-brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: invert(1);
}

body.theme-dark .sw-brand__mark img,
html.theme-dark .sw-brand__mark img {
  filter: none;
}

.sw-brand__text {
  font-size: 1rem;
}

.sw-nav {
  width: 260px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.sw-nav__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--sw-space-3);
  scrollbar-width: thin;
  scrollbar-color: var(--sw-color-border) transparent;
}

.sw-nav nav {
  display: grid;
  gap: var(--sw-space-2);
  grid-auto-rows: min-content;
  align-content: start;
  padding: 0;
}

.sw-nav-group {
  display: grid;
  gap: var(--sw-space-1);
}

.sw-nav-group__label {
  display: inline-flex;
  gap: var(--sw-space-2);
  align-items: center;
  color: var(--sw-color-sidebar-muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: var(--sw-space-1) var(--sw-space-2);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.sw-nav-group__chevron {
  margin-left: auto;
}

.sw-nav-group__items {
  display: grid;
  gap: var(--sw-space-1);
}

.sw-nav-group__items.is-closed {
  display: none;
}

.sw-nav-link {
  display: flex;
  align-items: center;
  gap: var(--sw-space-3);
  padding: var(--sw-space-3) var(--sw-space-4);
  border-radius: var(--sw-radius-md);
  color: var(--sw-color-sidebar-text);
  transition: background 0.2s ease, color 0.2s ease;
  min-height: 44px;
  height: 44px;
}

.sw-nav-link.active,
.sw-nav-link:hover {
  background: rgba(8, 112, 255, 0.12);
  color: var(--sw-color-text);
}

.sw-nav-link--action {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  line-height: inherit;
}

.sw-nav-link--action:hover {
  background: rgba(8, 112, 255, 0.12);
}

.sw-icon-button {
  border: 1px solid var(--sw-color-sidebar-border);
  background: transparent;
  color: var(--sw-color-sidebar-text);
  padding: 6px 10px;
  border-radius: var(--sw-radius-sm);
}

.sw-topbar .sw-icon-button {
  border-color: var(--sw-color-border);
  color: var(--sw-color-text);
}

.sw-nav__scroll::-webkit-scrollbar {
  width: 8px;
}

.sw-nav__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sw-nav__scroll::-webkit-scrollbar-thumb {
  background: var(--sw-color-border);
  border-radius: var(--sw-radius-pill);
}

.sw-nav__scroll::-webkit-scrollbar-thumb:hover {
  background: var(--sw-color-border-strong);
}

.mt-button .mt-icon:not(:last-child) {
  margin-right: var(--sw-space-2);
}

.sw-user-panel {
  border-top: 1px solid var(--sw-color-sidebar-border);
  margin-top: 0;
  padding: var(--sw-space-3);
  display: grid;
  gap: var(--sw-space-3);
  background: linear-gradient(180deg, var(--sw-color-sidebar), var(--sw-color-sidebar-strong));
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.sw-user-panel__top {
  display: flex;
  gap: var(--sw-space-2);
  align-items: center;
  color: var(--sw-color-sidebar-text);
}

.sw-user-panel__meta {
  display: grid;
  gap: 2px;
}

.sw-user-panel__name {
  font-weight: 700;
}

.sw-user-panel__id {
  color: var(--sw-color-sidebar-muted);
  font-size: 0.75rem;
}

.sw-user-panel__actions {
  display: flex;
  gap: var(--sw-space-2);
  flex-wrap: wrap;
}

.sw-collapse-toggle {
  border: 1px solid var(--sw-color-sidebar-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--sw-color-sidebar-text);
  padding: 8px;
  border-radius: var(--sw-radius-md);
  margin: var(--sw-space-3) auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sw-burger {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.sw-burger::before,
.sw-burger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.sw-burger::before {
  top: -6px;
}

.sw-burger::after {
  top: 6px;
}

.mt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--sw-radius-md);
  padding: 10px 18px;
  font-weight: 600;
  font-family: var(--sw-font-base);
  line-height: 1.1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mt-button--primary {
  background: var(--sw-color-brand);
  color: #ffffff;
  box-shadow: var(--sw-shadow-1);
}

.mt-button--primary:hover {
  background: var(--sw-color-brand-strong);
}

.mt-button--outline {
  background: transparent;
  color: var(--sw-color-brand);
  border-color: var(--sw-color-brand);
  box-shadow: none;
}

.mt-button--outline:hover {
  background: rgba(8, 112, 255, 0.08);
}

.mt-button--danger-outline {
  background: transparent;
  color: #dc2626;
  border-color: #dc2626;
  box-shadow: none;
}

.mt-button--danger-outline:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border-color: #b91c1c;
}

.mt-button--ghost {
  background: transparent;
  color: var(--sw-color-text);
  border-color: var(--sw-color-border);
}

.mt-button--ghost:hover {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
}

.mt-button--secondary {
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  border-color: var(--sw-color-border);
}

.mt-button--secondary:hover {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
}

.mt-button--sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.mt-button--md {
  padding: 10px 18px;
}

.mt-card {
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-lg);
  padding: var(--sw-space-6);
  box-shadow: var(--sw-shadow-1);
}

.mt-card__header {
  font-weight: 600;
  margin-bottom: var(--sw-space-3);
  color: var(--sw-color-text);
}

.mt-card__header--split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sw-space-3);
}

.mt-card__body {
  color: var(--sw-color-text-muted);
}

.mt-field {
  display: grid;
  gap: var(--sw-space-2);
  margin-bottom: var(--sw-space-4);
}

.mt-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-input {
  padding: 10px 14px;
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  font-family: var(--sw-font-base);
}

.mt-input:focus {
  outline: 2px solid rgba(8, 112, 255, 0.2);
  border-color: var(--sw-color-brand);
}

.mt-help {
  font-size: 0.8rem;
  color: var(--sw-color-text-muted);
}

.mt-field + .mt-help {
  margin-top: calc(-1 * var(--sw-space-3));
}

.mt-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--sw-color-surface);
  border-radius: var(--sw-radius-lg);
  overflow: hidden;
  border: 1px solid var(--sw-color-border);
}

.mt-table th,
.mt-table td {
  padding: var(--sw-space-3) var(--sw-space-4);
  text-align: left;
  border-bottom: 1px solid var(--sw-color-border);
}

.mt-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sw-color-text-muted);
  background: var(--sw-color-surface-alt);
}

.mt-table__th--right {
  text-align: right;
}

.mt-table__td--right {
  text-align: right;
}

.mt-table--groups th.mt-table__th--right,
.mt-table--groups th:last-child {
  text-align: right;
}

.mt-table--groups td.mt-table__td--right,
.mt-table--groups td:last-child {
  text-align: right;
}

.mt-table tbody tr:hover {
  background: var(--sw-color-surface-alt);
}

.mt-table__row--inactive {
  opacity: 0.6;
}

.mt-table-wrapper {
  overflow-x: auto;
}

.mt-table__pagination {
  margin-top: var(--sw-space-3);
  display: flex;
  justify-content: flex-end;
}

.mt-table__empty {
  margin-top: var(--sw-space-4);
}

.mt-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-3);
  margin-top: var(--sw-space-4);
}

.loading-progress {
  position: relative;
  display: block;
  width: 8rem;
  height: 8rem;
  margin: 20vh auto 1rem auto;
}

.loading-progress circle {
  fill: none;
  stroke: var(--sw-color-border);
  stroke-width: 0.6rem;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
}

.loading-progress circle:last-child {
  stroke: var(--sw-color-brand);
  stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
  transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
  position: absolute;
  text-align: center;
  font-weight: 600;
  inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
  color: var(--sw-color-text-muted);
}

.loading-progress-text::after {
  content: var(--blazor-load-percentage-text, "Loading");
}

#blazor-error-ui {
  background: #fef2f2;
  border-top: 1px solid #fecaca;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.1);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  color: #7f1d1d;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

@media (min-width: 960px) {
  .sw-app {
    grid-template-columns: 260px 1fr;
  }

  .sw-app.sw-app--mini {
    grid-template-columns: 76px 1fr;
  }

  .sw-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .sw-icon-button {
    display: none;
  }
}

@media (max-width: 959px) {
  .sw-topbar {
    padding: var(--sw-space-3) var(--sw-space-4);
  }

  .sw-content {
    padding: var(--sw-space-4);
  }

  .sw-nav.is-collapsed {
    display: none;
  }

  .mt-grid--two {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

.mt-select,
.mt-textarea,
.mt-input {
  width: 100%;
}

.mt-select {
  padding: 10px 14px;
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  font-family: var(--sw-font-base);
}

.mt-textarea {
  padding: 10px 14px;
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  font-family: var(--sw-font-base);
  resize: vertical;
  min-height: 120px;
}

.mt-textarea::-webkit-scrollbar {
  width: 10px;
}

.mt-textarea::-webkit-scrollbar-track {
  background: var(--sw-color-surface);
  border-radius: 999px;
}

.mt-textarea::-webkit-scrollbar-thumb {
  background: var(--sw-color-border);
  border-radius: 999px;
}

.mt-textarea {
  scrollbar-color: var(--sw-color-border) var(--sw-color-surface);
  scrollbar-width: thin;
}

.mt-checkbox,
.mt-switch {
  display: flex;
  align-items: center;
  gap: var(--sw-space-3);
  font-size: 0.95rem;
  color: var(--sw-color-text);
}

.mt-checkbox__input {
  width: 16px;
  height: 16px;
  accent-color: var(--sw-color-brand);
}

.mt-checkbox__label {
  cursor: pointer;
}

.mt-switch {
  gap: var(--sw-space-3);
}

.mt-switch__input {
  position: absolute;
  opacity: 0;
}

.mt-switch__track {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: var(--sw-color-border);
  position: relative;
  transition: background 0.2s ease;
}

.mt-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sw-color-surface);
  box-shadow: var(--sw-shadow-1);
  transition: transform 0.2s ease;
}

.mt-switch__input:checked + .mt-switch__track {
  background: var(--sw-color-brand);
}

.mt-switch__input:checked + .mt-switch__track::after {
  transform: translateX(20px);
}

.mt-switch__label {
  cursor: pointer;
}

.mt-color {
  width: 52px;
  height: 36px;
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-sm);
  background: var(--sw-color-surface);
  padding: 0;
}

.mt-slider {
  width: 100%;
  accent-color: var(--sw-color-brand);
}

.mt-slider__value {
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
  margin-top: 6px;
}

.mt-banner {
  display: flex;
  justify-content: space-between;
  gap: var(--sw-space-4);
  padding: var(--sw-space-4);
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface-alt);
  color: var(--sw-color-text);
  margin-bottom: var(--sw-space-4);
}

.mt-banner__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.mt-banner__text {
  color: var(--sw-color-text-muted);
}

.mt-banner--neutral {
  border-color: var(--sw-color-border);
  background: var(--sw-color-surface-alt);
}

.mt-banner--success {
  border-color: rgba(14, 163, 91, 0.4);
  background: rgba(14, 163, 91, 0.08);
}

.mt-banner--warning {
  border-color: rgba(248, 129, 56, 0.4);
  background: rgba(248, 129, 56, 0.12);
}

.mt-banner--info {
  border-color: rgba(8, 112, 255, 0.35);
  background: rgba(8, 112, 255, 0.12);
}

.mt-banner--danger {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.12);
}

.mt-banner__close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.mt-loader {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.mt-loader__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sw-color-brand);
  animation: mt-loader-bounce 0.9s infinite ease-in-out;
}

.mt-loader__dot:nth-child(2) {
  animation-delay: 0.15s;
}

.mt-loader__dot:nth-child(3) {
  animation-delay: 0.3s;
}

.mt-loader--sm .mt-loader__dot {
  width: 6px;
  height: 6px;
}

.mt-loader--lg .mt-loader__dot {
  width: 10px;
  height: 10px;
}

@keyframes mt-loader-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.6; }
  40% { transform: scale(1); opacity: 1; }
}

.mt-progress {
  width: 100%;
  background: var(--sw-color-border);
  border-radius: var(--sw-radius-pill);
  height: 10px;
  overflow: hidden;
}

.mt-progress__bar {
  height: 100%;
  background: var(--sw-color-brand);
  transition: width 0.3s ease;
}

.mt-skeleton {
  border-radius: var(--sw-radius-pill);
  background: linear-gradient(90deg, var(--sw-color-surface-alt), var(--sw-color-border), var(--sw-color-surface-alt));
  background-size: 200% 100%;
  animation: mt-skeleton 1.4s ease infinite;
}

@keyframes mt-skeleton {
  0% { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}

.mt-text {
  color: var(--sw-color-text);
}

.mt-text--sm {
  font-size: 0.85rem;
}

.mt-text--lg {
  font-size: 1.1rem;
}

.mt-link {
  color: var(--sw-color-brand);
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.mt-link--secondary {
  color: var(--sw-color-text);
}

.mt-button.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.mt-search {
  position: relative;
}

.mt-search__input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
}

.mt-segmented {
  display: inline-flex;
  background: var(--sw-color-surface-alt);
  padding: 4px;
  border-radius: var(--sw-radius-pill);
  gap: 4px;
}

.mt-segmented__item {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: var(--sw-radius-pill);
  cursor: pointer;
  color: var(--sw-color-text-muted);
  font-weight: 600;
}

.mt-segmented__item.is-active {
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  box-shadow: var(--sw-shadow-1);
}

.mt-tabs__list {
  display: flex;
  gap: var(--sw-space-3);
  border-bottom: 1px solid var(--sw-color-border);
  margin-bottom: var(--sw-space-4);
}

.mt-tabs__tab {
  border: none;
  background: transparent;
  padding: var(--sw-space-2) var(--sw-space-1);
  font-weight: 600;
  color: var(--sw-color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.mt-tabs__tab.is-active {
  color: var(--sw-color-text);
  border-color: var(--sw-color-brand);
}

.mt-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--sw-space-5);
  overscroll-behavior: contain;
}

.mt-modal {
  background: var(--sw-color-modal-surface, var(--sw-color-surface));
  border-radius: var(--sw-radius-lg);
  width: min(560px, 92vw);
  box-shadow: var(--sw-shadow-2);
  overflow: hidden;
  max-height: calc(100vh - 2 * var(--sw-space-5));
  display: flex;
  flex-direction: column;
}

.mt-modal.modal-lg {
  width: min(720px, 92vw);
}

.mt-modal.modal-xl {
  width: min(980px, 92vw);
}

.mt-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sw-space-3) var(--sw-space-5);
  border-bottom: 1px solid var(--sw-color-modal-border, var(--sw-color-border));
  flex: 0 0 auto;
}

.mt-modal__title {
  font-weight: 600;
  line-height: 1;
  margin: 0;
}

.mt-modal__body {
  padding: var(--sw-space-5);
  color: var(--sw-color-text-muted);
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.mt-modal__footer {
  padding: var(--sw-space-4) var(--sw-space-5);
  border-top: 1px solid var(--sw-color-modal-border, var(--sw-color-border));
  display: flex;
  justify-content: flex-end;
  gap: var(--sw-space-3);
  flex: 0 0 auto;
}

.mt-modal__close {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--sw-color-text-muted);
  padding: 0;
}

.mt-modal__body::-webkit-scrollbar {
  width: 8px;
}

.mt-modal__body::-webkit-scrollbar-track {
  background: transparent;
}

.mt-modal__body::-webkit-scrollbar-thumb {
  background: var(--sw-color-border);
  border-radius: 999px;
}

.mt-modal__body::-webkit-scrollbar-thumb:hover {
  background: var(--sw-color-border-strong);
}

.mt-modal__alert {
  padding: var(--sw-space-3);
  border-radius: var(--sw-radius-md);
  border: 1px solid rgba(248, 129, 56, 0.35);
  background: rgba(248, 129, 56, 0.1);
  color: var(--sw-color-text);
}

.mt-modal__alert--spaced {
  margin-top: var(--sw-space-3);
  margin-bottom: var(--sw-space-3);
}

.mt-popover,
.mt-tooltip {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.mt-popover__trigger,
.mt-tooltip__trigger {
  display: inline-flex;
  align-items: center;
  line-height: normal;
}

.mt-popover__content,
.mt-tooltip__content {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 8px);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  padding: 8px 12px;
  white-space: normal;
  box-shadow: var(--sw-shadow-1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.mt-popover:hover .mt-popover__content,
.mt-tooltip:hover .mt-tooltip__content {
  opacity: 1;
}

.mt-tooltip__content {
  font-size: 0.8rem;
}

.mt-tooltip--wide .mt-tooltip__content {
  width: max-content;
  max-width: 360px;
}

 .mt-group-row__popover {
  display: block;
}

.mt-group-row__popover .mt-popover__content {
  min-width: 260px;
  max-width: 520px;
}

.mt-group-row__popover.mt-popover--disabled .mt-popover__content {
  display: none;
}

.mt-pagination {
  display: flex;
  align-items: center;
  gap: var(--sw-space-3);
}

.mt-pagination--center {
  justify-content: center;
  margin-top: var(--sw-space-5);
}

.mt-pagination__nav,
.mt-pagination__page {
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  padding: 6px 12px;
  border-radius: var(--sw-radius-sm);
  cursor: pointer;
  color: var(--sw-color-text);
}

.mt-pagination__page.is-active {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
}

.mt-pagination__pages {
  display: flex;
  gap: 6px;
}

.mt-empty {
  display: flex;
  gap: var(--sw-space-5);
  align-items: center;
  padding: var(--sw-space-5);
  border: 1px dashed var(--sw-color-border);
  border-radius: var(--sw-radius-lg);
  background: var(--sw-color-surface);
}

.mt-empty__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--sw-radius-lg);
  background: rgba(8, 112, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sw-color-brand);
  font-weight: 700;
}

.mt-empty__title {
  font-weight: 600;
  margin-bottom: 4px;
}

.mt-empty__text {
  color: var(--sw-color-text-muted);
  margin-bottom: var(--sw-space-3);
}

.mt-empty__actions {
  display: flex;
  gap: var(--sw-space-3);
}

.mt-grid {
  display: grid;
  gap: var(--sw-space-5);
  align-items: stretch;
}

.mt-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mt-instance-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sw-space-4);
  margin-bottom: var(--sw-space-6);
}

.mt-instance-actions {
  display: flex;
  align-items: center;
  gap: var(--sw-space-3);
}

.mt-view-toggle {
  display: inline-flex;
  gap: var(--sw-space-1);
}

.mt-instance-loading {
  display: flex;
  justify-content: center;
  padding: var(--sw-space-6) 0;
}

.mt-instance-card {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-4);
  position: relative;
  --mt-instance-card-pad: var(--sw-space-6);
  padding: var(--sw-space-6) var(--sw-space-6) var(--sw-space-3);
}

.mt-instance-card .mt-card__body {
  color: var(--sw-color-text);
}

.mt-instance-table .mt-table__actions {
  display: inline-flex;
  gap: var(--sw-space-2);
}

.mt-instance-card__header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: var(--sw-space-4);
  align-items: center;
}

.mt-instance-card__logo-wrap {
  width: 72px;
  height: 72px;
  border-radius: var(--sw-radius-md);
  background: var(--sw-color-surface-alt);
  display: grid;
  place-items: center;
}

.mt-instance-card__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.mt-instance-card__title {
  min-width: 0;
}

.mt-instance-card__name {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-instance-card__meta {
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-instance-card__status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: var(--sw-space-2);
  align-self: start;
  margin-top: 2px;
}

.mt-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sw-color-text);
}

.mt-icon svg {
  display: block;
}

.mt-icon svg [fill] {
  fill: currentColor !important;
}

.mt-icon svg [stroke] {
  stroke: currentColor !important;
}

.mt-instance-card__actions {
  display: flex;
  gap: var(--sw-space-3);
  flex-wrap: wrap;
  margin-top: auto;
}

.mt-instance-card__actions .mt-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mt-instance-card__icons {
  display: flex;
  gap: var(--sw-space-2);
  align-items: center;
}

.mt-icon-button {
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  width: 34px;
  height: 34px;
  border-radius: var(--sw-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sw-color-text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  position: relative;
}

.mt-icon-button:hover {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
}

.mt-icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mt-icon-button__tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  color: var(--sw-color-text);
  padding: 6px 10px;
  border-radius: var(--sw-radius-sm);
  box-shadow: var(--sw-shadow-2);
  white-space: nowrap;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}

.mt-icon-button:hover .mt-icon-button__tooltip {
  opacity: 1;
  transform: translate(-50%, -2px);
}

.mt-instance-card__footer-wrap {
  border-top: 1px solid var(--sw-color-border);
  padding-top: 6px;
  padding-bottom: 4px;
  margin-top: var(--sw-space-2);
}

.mt-instance-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sw-space-3);
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-instance-card__footer-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--sw-space-3);
}

.mt-instance-card__node {
  color: var(--sw-color-text-muted);
}

.mt-instance-card__deletion {
  border: none;
  background: none;
  color: var(--sw-color-warning);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.mt-instance-card__deletion:hover {
  color: var(--sw-color-warning-strong);
}

.mt-instance-card__lock {
  border-radius: var(--sw-radius-sm);
  padding: 2px;
  cursor: pointer;
  line-height: 1;
  color: var(--sw-color-text);
}

.mt-instance-card__lock:hover {
  color: var(--sw-color-brand);
}

.mt-instance-card__lock mt-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.mt-instance-card__chips {
  display: flex;
  gap: var(--sw-space-2);
  flex-wrap: wrap;
}

.mt-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-menu {
  position: relative;
}

.mt-menu__button {
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  width: 28px;
  height: 28px;
  border-radius: var(--sw-radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.mt-menu__list {
  --mt-menu-max-height: 300px;
  position: absolute;
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  box-shadow: var(--sw-shadow-2);
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 10;
  width: max-content;
  white-space: nowrap;
  max-height: var(--mt-menu-max-height);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sw-color-border) transparent;
}

.mt-menu__item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--sw-radius-sm);
  cursor: pointer;
  color: var(--sw-color-text);
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.3;
}

.mt-menu__item:hover {
  background: var(--sw-color-surface-alt);
}

.mt-menu__item--danger {
  color: #dc2626;
}

.mt-menu__item--danger:hover {
  background: rgba(220, 38, 38, 0.12);
}

.mt-menu__item--hold {
  position: relative;
  overflow: hidden;
}

.mt-menu__item--hold .mt-menu__item-fill {
  position: absolute;
  inset: 0;
  background: rgba(220, 38, 38, 0.18);
  width: 100%;
  z-index: 0;
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
  transition: transform 0.05s linear;
}

.mt-menu__item--hold .mt-menu__item-text {
  position: relative;
  z-index: 1;
}

.mt-menu__divider {
  height: 1px;
  background: var(--sw-color-border);
  margin: 4px 2px;
}

.mt-chip {
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  padding: 6px 10px;
  border-radius: var(--sw-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.mt-chip:hover {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
}

.mt-chip--muted {
  color: var(--sw-color-text-muted);
}

.mt-chip--danger {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.mt-tag-grid {
  display: grid;
  gap: var(--sw-space-2);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mt-tag-row {
  display: flex;
  align-items: center;
  gap: var(--sw-space-2);
  padding: 6px;
  border-radius: var(--sw-radius-md);
  background: var(--sw-color-surface-alt);
}

.mt-tag-row__input {
  accent-color: var(--sw-color-brand);
}

.mt-context-menu__list {
  position: fixed;
  z-index: 20;
  --mt-menu-offset-x: 0px;
  left: var(--mt-menu-left, 0px);
  top: var(--mt-menu-top, 0px);
  transform: translateX(var(--mt-menu-offset-x)) translateY(calc(-1 * max(0px, calc(var(--mt-menu-top, 0px) + var(--mt-menu-max-height) - 100vh + 8px))));
}

.mt-context-menu__list--align-right {
  --mt-menu-offset-x: calc(-100% - 8px);
}


.mt-menu__list::-webkit-scrollbar {
  width: 8px;
}

.mt-menu__list::-webkit-scrollbar-track {
  background: transparent;
}

.mt-menu__list::-webkit-scrollbar-thumb {
  background: var(--sw-color-border);
  border-radius: 999px;
}

.mt-menu__list::-webkit-scrollbar-thumb:hover {
  background: var(--sw-color-border-strong);
}

.mt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--sw-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: var(--sw-color-surface-alt);
  color: var(--sw-color-text);
}

.mt-badge--action {
  border: 1px solid rgba(248, 129, 56, 0.35);
  cursor: pointer;
}

.mt-badge--info {
  border-color: rgba(8, 112, 255, 0.35);
  background: rgba(8, 112, 255, 0.12);
  color: var(--sw-color-brand);
}

.mt-badge--success {
  border-color: rgba(14, 163, 91, 0.4);
  background: rgba(14, 163, 91, 0.12);
  color: var(--sw-color-success);
}

.mt-badge--warning {
  border-color: rgba(248, 129, 56, 0.4);
  background: rgba(248, 129, 56, 0.12);
  color: var(--sw-color-accent);
}

.mt-badge--danger {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.mt-badge--neutral {
  border-color: var(--sw-color-border);
}

.mt-stack {
  display: grid;
  gap: var(--sw-space-4);
}

.mt-section {
  display: grid;
  gap: var(--sw-space-4);
  margin-bottom: var(--sw-space-7);
}

.mt-space-top-xs {
  margin-top: var(--sw-space-1);
}

.mt-space-top-sm {
  margin-top: var(--sw-space-2);
}

.mt-space-top-lg {
  margin-top: var(--sw-space-5);
}

.mt-space-bottom-lg {
  margin-bottom: var(--sw-space-5);
}

.mt-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--sw-space-6);
  background: radial-gradient(800px 500px at 20% 0%, rgba(8, 112, 255, 0.12), transparent 50%),
    var(--sw-color-bg);
}

.mt-auth__panel {
  width: min(480px, 92vw);
  display: grid;
  gap: var(--sw-space-5);
  padding: var(--sw-space-6);
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-lg);
  box-shadow: var(--sw-shadow-2);
}

.mt-auth__toolbar {
  display: flex;
  justify-content: flex-end;
}

.mt-auth .mt-form-input__field {
  background: var(--sw-color-surface-alt);
}

.mt-auth__header {
  text-align: center;
  display: grid;
  gap: var(--sw-space-2);
}

.mt-auth__brand {
  width: 320px;
  max-width: 90%;
  height: auto;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mt-auth__brand img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: invert(1);
}

body.theme-dark .mt-auth__brand img,
html.theme-dark .mt-auth__brand img {
  filter: none;
}

.mt-auth__title {
  font-family: var(--sw-font-display);
  font-size: 1.6rem;
  color: var(--sw-color-text);
}

.mt-auth__subtitle {
  color: var(--sw-color-text-muted);
}

.mt-auth__form {
  display: grid;
  gap: var(--sw-space-4);
}

.mt-auth__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sw-space-3);
  flex-wrap: wrap;
}

.mt-auth__primary {
  margin-left: auto;
  min-width: 120px;
}

.mt-auth__primary.is-loading .mt-loader__dot {
  background: currentColor;
}

.mt-auth__loading {
  display: flex;
  justify-content: center;
  padding-top: var(--sw-space-3);
}

.mt-auth__error {
  color: #dc2626;
  font-size: 0.9rem;
}

.mt-form-input {
  display: grid;
  gap: var(--sw-space-2);
}

.mt-form-input__field {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  font-family: var(--sw-font-base);
}

.mt-form-input__field:focus {
  outline: 2px solid rgba(8, 112, 255, 0.2);
  border-color: var(--sw-color-brand);
}

.mt-form-input__icon {
  display: none;
}

.mt-form-input__error {
  color: #dc2626;
  font-size: 0.85rem;
}

.mt-form-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--sw-space-3);
  font-size: 0.9rem;
  color: var(--sw-color-text);
  position: relative;
}

.mt-form-switch__input {
  position: absolute;
  opacity: 0;
}

.mt-form-switch__track {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: var(--sw-color-border);
  position: relative;
  transition: background 0.2s ease;
}

.mt-form-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sw-color-surface);
  box-shadow: var(--sw-shadow-1);
  transition: transform 0.2s ease;
}

.mt-form-switch__input:checked + .mt-form-switch__track {
  background: var(--sw-color-brand);
}

.mt-form-switch__input:checked + .mt-form-switch__track::after {
  transform: translateX(20px);
}

.mt-toast-container {
  position: fixed;
  bottom: var(--sw-space-5);
  right: var(--sw-space-5);
  display: grid;
  gap: var(--sw-space-2);
  z-index: 300;
}

.mt-toast {
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  padding: 10px 14px;
  box-shadow: var(--sw-shadow-1);
  color: var(--sw-color-text);
}

.mt-templates-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sw-space-4);
  margin-bottom: var(--sw-space-6);
}

.mt-templates-search {
  width: min(360px, 100%);
}

.mt-grid--templates {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.mt-template-card {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-4);
}

.mt-template-card__title {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-template-card__subtitle {
  color: var(--sw-color-text-muted);
  margin-top: 4px;
}

.mt-template-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-template-card__footer {
  margin-top: auto;
  border-top: 1px solid var(--sw-color-border);
  padding-top: var(--sw-space-3);
  display: grid;
  gap: var(--sw-space-2);
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-template-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-template-card__info p {
  margin: 0;
}

.mt-button--danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.mt-button--danger:hover {
  background: #b91c1c;
  color: #ffffff;
}

.mt-button--hold {
  position: relative;
  overflow: hidden;
}

.mt-button--hold .mt-button__fill {
  position: absolute;
  inset: 0;
  background: rgba(220, 38, 38, 0.38);
  width: 100%;
  z-index: 0;
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
  transition: transform 0.05s linear;
}

.mt-button--hold .mt-button__text {
  position: relative;
  z-index: 1;
}

.mt-button--hold.is-holding {
  background: transparent;
  border-color: #dc2626;
  color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.55);
}

.mt-modal__section {
  display: grid;
  gap: var(--sw-space-3);
}

.mt-qr {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--sw-space-3);
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface-alt);
}

.mt-qr img {
  width: min(140px, 50vw);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.mt-docker-grid {
  display: grid;
  gap: var(--sw-space-4);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.mt-docker-card {
  display: grid;
  gap: var(--sw-space-3);
}

.mt-docker-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sw-space-3);
}

.mt-docker-card__title {
  display: flex;
  gap: var(--sw-space-3);
  align-items: center;
}

.mt-docker-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--sw-radius-md);
  background: var(--sw-color-surface-alt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sw-color-brand);
}

.mt-docker-card__name {
  font-weight: 700;
  color: var(--sw-color-text);
}

.mt-docker-card__meta {
  color: var(--sw-color-text-muted);
  font-size: 0.9rem;
}

.mt-docker-card__description {
  margin: 0;
  color: var(--sw-color-text);
}

.mt-docker-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-docker-card__ports {
  display: grid;
  gap: var(--sw-space-2);
}

.mt-docker-card__ports-title {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-table--compact th,
.mt-table--compact td {
  padding: var(--sw-space-2) var(--sw-space-2);
  font-size: 0.95rem;
}

.mt-docker-modal__info {
  display: flex;
  gap: var(--sw-space-2);
  align-items: baseline;
  color: var(--sw-color-text);
}

.mt-docker-modal__label {
  font-weight: 600;
  color: var(--sw-color-text-muted);
}

.mt-docker-modal__value {
  font-weight: 600;
}

.mt-inline-field .mt-field {
  margin-bottom: 0;
}

.mt-inline-field {
  display: flex;
  align-items: flex-end;
  gap: var(--sw-space-2);
  flex-wrap: wrap;
}

.mt-inline-field__input {
  flex: 1 1 240px;
}

.mt-inline-form {
  display: grid;
  gap: var(--sw-space-2);
}

.mt-inline-form__row {
  display: flex;
  align-items: center;
  gap: var(--sw-space-2);
}

.mt-inline-form__row .mt-select,
.mt-inline-form__row .mt-input {
  flex: 1 1 240px;
}

.mt-field--grow {
  flex: 1 1 240px;
}

.mt-list {
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  overflow: hidden;
}

.mt-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sw-space-3);
  padding: 8px 12px;
  border-bottom: 1px solid var(--sw-color-border);
  color: var(--sw-color-text);
}

.mt-list__item:last-child {
  border-bottom: none;
}

.mt-list__item-actions {
  display: inline-flex;
  gap: var(--sw-space-2);
}

.mt-message {
  padding: 8px 12px;
  border-radius: var(--sw-radius-sm);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface-alt);
  color: var(--sw-color-text);
}

.mt-message--error {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

.mt-message--info {
  border-color: rgba(8, 112, 255, 0.3);
  background: rgba(8, 112, 255, 0.08);
}

.mt-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
  margin-bottom: var(--sw-space-2);
}

.mt-breadcrumb a {
  color: var(--sw-color-text-muted);
  text-decoration: none;
}

.mt-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sw-space-4);
  margin-bottom: var(--sw-space-6);
}

.mt-group-list {
  display: grid;
  gap: var(--sw-space-3);
}

.mt-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--sw-space-4);
  padding: var(--sw-space-3);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  background: var(--sw-color-surface);
}

.mt-group-row__main {
  display: grid;
  gap: 2px;
}

.mt-group-row__name {
  display: flex;
  align-items: center;
  gap: var(--sw-space-2);
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-group-row__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
  justify-content: flex-end;
}


.mt-table__group {
  display: flex;
  align-items: center;
  gap: var(--sw-space-2);
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-table__group-name {
  white-space: nowrap;
}

.mt-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
  justify-content: flex-end;
  width: 100%;
}


.mt-user-list {
  padding: var(--sw-space-4);
}

.mt-user-list__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-3);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sw-space-3);
}

.mt-user-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--sw-space-4);
  padding: var(--sw-space-3);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
}

.mt-user-row__main {
  display: grid;
  gap: 2px;
}

.mt-user-row__name {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-user-row__meta {
  color: var(--sw-color-text-muted);
  font-size: 0.9rem;
}

.mt-user-row__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
  justify-content: flex-end;
}

.mt-invoice-card {
  margin-bottom: var(--sw-space-5);
}

.mt-invoice-banner {
  margin-bottom: var(--sw-space-5);
  margin-top: var(--sw-space-4);
}

.mt-invoice-summary {
  display: grid;
  gap: var(--sw-space-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: center;
}

.mt-invoice-summary__item {
  display: grid;
  gap: 4px;
}

.mt-invoice-summary__item--right {
  text-align: right;
}

.mt-invoice-summary__label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--sw-color-text-muted);
}

.mt-invoice-summary__value {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-invoice-summary__meta {
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-table__cell-title {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-table__cell-meta {
  font-size: 0.8rem;
  color: var(--sw-color-text-muted);
}

.mt-modal-grid {
  display: grid;
  gap: var(--sw-space-4);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: center;
  margin-bottom: var(--sw-space-4);
}

.mt-modal-grid--filters {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: center;
}

.mt-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
  align-self: center;
  align-items: center;
  height: 100%;
  margin-top: 21px;
}

.mt-modal-actions__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

@media (max-width: 720px) {
  .mt-modal-grid--filters {
    grid-template-columns: 1fr;
  }
}

.mt-modal-date {
  display: flex;
  align-items: center;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.mt-modal-date__label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sw-color-text-muted);
}

.mt-docs-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sw-space-4);
  margin-bottom: var(--sw-space-6);
}

.mt-docs-meta {
  color: var(--sw-color-text-muted);
  font-size: 0.9rem;
}

.mt-docs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
  align-items: center;
}

.mt-docs-actions .mt-button {
  height: 34px;
}

.mt-docs-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: var(--sw-space-6);
}

.mt-docs-tree {
  display: grid;
}

.mt-docs-tree__item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  color: var(--sw-color-text);
  display: flex;
  justify-content: space-between;
  gap: var(--sw-space-2);
  cursor: pointer;
  border-radius: var(--sw-radius-md);
}

.mt-docs-tree__item:hover {
  background: var(--sw-color-surface-alt);
}

.mt-docs-tree__item--active {
  background: rgba(8, 112, 255, 0.12);
  color: var(--sw-color-brand);
}

.mt-docs-empty {
  padding: var(--sw-space-4);
  color: var(--sw-color-text-muted);
}

.mt-docs-editor {
  display: grid;
  gap: var(--sw-space-3);
}

.mt-docs-editor__textarea textarea {
  min-height: 360px;
}

.mt-docs-editor__footer {
  display: flex;
  gap: var(--sw-space-2);
  justify-content: flex-end;
  padding: var(--sw-space-4) var(--sw-space-6);
  border-top: 1px solid var(--sw-color-border);
}

.mt-docs-manage {
  margin-top: var(--sw-space-6);
}

.mt-docs-manage__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sw-space-4);
  font-weight: 600;
}

.mt-docs-table__title {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-docs-table__meta {
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-docs-table__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
  justify-content: flex-end;
}

.mt-docs-table__actions .mt-button {
  min-width: 120px;
}

.documentation-markdown {
  display: grid;
  gap: var(--sw-space-3);
  color: var(--sw-color-text);
}

.documentation-markdown h1,
.documentation-markdown h2,
.documentation-markdown h3,
.documentation-markdown h4,
.documentation-markdown h5 {
  margin: 0;
}

.documentation-markdown p {
  margin: 0;
  color: var(--sw-color-text);
}

.documentation-markdown pre {
  background: var(--sw-color-surface-alt);
  padding: var(--sw-space-3);
  border-radius: var(--sw-radius-md);
  overflow: auto;
}

.documentation-markdown pre::-webkit-scrollbar {
  height: 10px;
}

.documentation-markdown pre::-webkit-scrollbar-track {
  background: var(--sw-color-surface);
  border-radius: 999px;
}

.documentation-markdown pre::-webkit-scrollbar-thumb {
  background: var(--sw-color-border);
  border-radius: 999px;
}

.documentation-markdown pre {
  scrollbar-color: var(--sw-color-border) var(--sw-color-surface);
  scrollbar-width: thin;
}

.documentation-markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: var(--sw-color-surface-alt);
  padding: 2px 6px;
  border-radius: 6px;
}

.documentation-markdown blockquote {
  border-left: 3px solid var(--sw-color-border);
  padding-left: var(--sw-space-3);
  color: var(--sw-color-text-muted);
  margin: 0;
}

.documentation-markdown ul,
.documentation-markdown ol {
  margin: 0;
  padding-left: 1.25rem;
}

.mt-table--markdown th,
.mt-table--markdown td {
  padding: var(--sw-space-2) var(--sw-space-3);
}

.mt-doc-image-link {
  display: inline-block;
}

.mt-doc-image {
  max-width: 100%;
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
}

.mt-doc-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.mt-doc-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--sw-radius-md);
}

.mt-doc-video {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sw-space-2);
}

.mt-doc-video__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-banner--doc {
  justify-content: flex-start;
}

.mt-doc-upload {
  display: grid;
  gap: var(--sw-space-2);
  margin-bottom: var(--sw-space-4);
}

.mt-doc-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sw-space-4);
}

.mt-doc-image-card {
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  background: var(--sw-color-surface);
  overflow: hidden;
  display: grid;
}

.mt-doc-image-card__preview {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--sw-color-border);
}

.mt-doc-image-card__body {
  padding: var(--sw-space-3);
  display: grid;
  gap: var(--sw-space-2);
}

.mt-doc-image-card__title {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-doc-image-card__meta {
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-doc-image-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-doc-image-preview {
  display: grid;
  justify-items: center;
  gap: var(--sw-space-2);
}

.mt-doc-image-preview img {
  max-width: 100%;
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
}

.mt-doc-history {
  display: grid;
  gap: var(--sw-space-3);
}

.mt-doc-history__item {
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  padding: var(--sw-space-3);
  display: grid;
  gap: var(--sw-space-2);
  background: var(--sw-color-surface);
}

.mt-doc-history__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sw-space-2);
}

.mt-doc-history__title {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-doc-history__meta {
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-doc-history__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
  align-items: center;
}

.mt-doc-history__preview {
  font-size: 0.9rem;
  color: var(--sw-color-text-muted);
}

.mt-doc-history__render {
  border-top: 1px solid var(--sw-color-border);
  padding-top: var(--sw-space-3);
}

.mt-doc-help {
  display: grid;
  gap: var(--sw-space-3);
}

.mt-doc-help__title {
  font-weight: 600;
  margin-bottom: 6px;
}

.mt-dashboard {
  display: grid;
  gap: var(--sw-space-6);
}

.mt-dashboard__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sw-space-4);
  align-items: center;
}

.mt-dashboard__header p {
  color: var(--sw-color-text-muted);
  margin: 0;
}

.mt-dashboard__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--sw-space-6);
}

.mt-dashboard__right {
  display: grid;
  gap: var(--sw-space-4);
}

.mt-dashboard__notifications {
  min-height: 240px;
}

.mt-dashboard__notification-list {
  display: grid;
  gap: var(--sw-space-3);
}

.mt-dashboard__notification {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: var(--sw-space-3);
  padding: var(--sw-space-3);
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
}

.mt-dashboard__notification-body {
  display: grid;
  gap: var(--sw-space-2);
}

.mt-dashboard__notification-top {
  display: flex;
  justify-content: space-between;
  gap: var(--sw-space-3);
  flex-wrap: wrap;
  align-items: center;
}

.mt-dashboard__notification-actions {
  display: flex;
  gap: var(--sw-space-2);
  flex-wrap: wrap;
}

.mt-dashboard__notification-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  background: var(--sw-color-border);
}

.mt-dashboard__notification-dot--success {
  background: #0ea35b;
}

.mt-dashboard__notification-dot--warning {
  background: #f88138;
}

.mt-dashboard__notification-dot--danger {
  background: #dc2626;
}

.mt-dashboard__notification-dot--info {
  background: #0870ff;
}

.mt-dashboard__notification-dot--neutral {
  background: var(--sw-color-border);
}

.mt-dashboard__notification-dot--blink {
  animation: mt-dot-blink 1.2s ease-in-out infinite;
}

.mt-dashboard__notification-title {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-dashboard__notification-meta {
  display: flex;
  gap: var(--sw-space-2);
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-dashboard__notification-text {
  color: var(--sw-color-text);
  margin-top: 4px;
}

.mt-notification-detail__meta {
  display: flex;
  gap: var(--sw-space-2);
  margin-bottom: var(--sw-space-2);
  color: var(--sw-color-text);
}

.mt-notification-detail__label {
  color: var(--sw-color-text-muted);
}

.mt-notification-detail__message {
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  padding: var(--sw-space-3);
  background: var(--sw-color-surface-alt);
  white-space: pre-wrap;
}

.mt-table--dashboard th,
.mt-table--dashboard td {
  padding: var(--sw-space-2) var(--sw-space-3);
}

@keyframes mt-dot-blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
  100% {
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .mt-docs-layout {
    grid-template-columns: 1fr;
  }

  .mt-docs-table__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mt-docs-table__actions .mt-button {
    width: 100%;
  }

  .mt-dashboard__grid {
    grid-template-columns: 1fr;
  }
}

.mt-table__user {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-1);
}

.mt-table__user-name {
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-table__user-meta {
  color: var(--sw-color-text-muted);
  font-size: 0.9rem;
}

.mt-checklist {
  display: grid;
  gap: var(--sw-space-2);
}

.mt-checklist__item {
  display: flex;
  align-items: center;
  gap: var(--sw-space-2);
  padding: 8px 10px;
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  background: var(--sw-color-surface-alt);
}

.mt-permission-list {
  display: grid;
  gap: var(--sw-space-2);
}

@media (max-width: 959px) {
  .mt-group-row {
    grid-template-columns: 1fr;
  }

  .mt-user-row {
    grid-template-columns: 1fr;
  }

  .mt-group-row__actions,
  .mt-user-row__actions {
    justify-content: flex-start;
  }
}

.mt-tabs {
  display: inline-flex;
  gap: 6px;
  background: var(--sw-color-surface-alt);
  border-radius: var(--sw-radius-pill);
  padding: 4px;
  border: 1px solid var(--sw-color-border);
  margin-bottom: var(--sw-space-4);
}

.mt-tabs__tab {
  border: none;
  background: transparent;
  color: var(--sw-color-text-muted);
  padding: 6px 14px;
  border-radius: var(--sw-radius-pill);
  font-weight: 600;
  cursor: pointer;
}

.mt-tabs__tab.is-active {
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  box-shadow: var(--sw-shadow-1);
}

.mt-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--sw-radius-pill);
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.mt-pill--warning {
  background: rgba(248, 129, 56, 0.18);
  color: #c05723;
}

.mt-pill--info {
  background: rgba(8, 112, 255, 0.16);
  color: #0b5ad1;
}

.mt-pill--success {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.mt-pill--danger {
  background: rgba(220, 38, 38, 0.18);
  color: #b91c1c;
}

.mt-pill--primary {
  background: rgba(8, 112, 255, 0.18);
  color: #0b5ad1;
}

.mt-pill--secondary {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
}

.mt-pill--light {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.mt-pill--dark {
  background: rgba(15, 23, 42, 0.2);
  color: #0f172a;
}

.mt-pill--neutral {
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
}

.mt-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sw-space-3);
}

.mt-admin-toolbar .mt-button .mt-icon:not(:last-child) {
  margin-right: var(--sw-space-3);
}

.mt-admin-summary {
  margin-bottom: var(--sw-space-3);
}

.mt-admin-upload {
  margin-top: var(--sw-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-2);
  max-width: 360px;
}

.mt-form-grid {
  display: grid;
  gap: var(--sw-space-3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mt-user-state {
  display: inline-flex;
  align-items: center;
  gap: var(--sw-space-2);
}

.mt-user-select {
  margin-top: var(--sw-space-4);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  padding: var(--sw-space-3);
  background: var(--sw-color-surface);
  display: grid;
  gap: var(--sw-space-2);
}

.mt-user-select__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.mt-user-select__list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: var(--sw-space-2);
  padding-right: var(--sw-space-1);
}

.mt-text-success {
  color: #15803d;
}

.mt-text-danger {
  color: #b91c1c;
}

.mt-message--warning {
  border-color: rgba(248, 129, 56, 0.3);
  background: rgba(248, 129, 56, 0.12);
  color: #c05723;
}

.mt-message--danger {
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.mt-card__title {
  font-weight: 600;
}

.mt-card__footer {
  padding: var(--sw-space-3) var(--sw-space-4);
  border-top: 1px solid var(--sw-color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sw-space-3);
}

.mt-node-title {
  display: inline-flex;
  align-items: center;
  gap: var(--sw-space-2);
  font-weight: 600;
}

.mt-node-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sw-color-border);
}

.mt-node-status.is-online {
  background: #22c55e;
}

.mt-node-status.is-offline {
  background: #64748b;
}

.mt-node-meta {
  display: grid;
  gap: var(--sw-space-1);
  margin-bottom: var(--sw-space-3);
}

.mt-node-stats {
  display: grid;
  gap: var(--sw-space-3);
}

.mt-node-stat {
  display: grid;
  gap: 6px;
}

.mt-node-stat__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sw-color-text-muted);
}

.mt-node-stat__value {
  font-weight: 600;
}

.mt-node-metrics {
  display: flex;
  gap: var(--sw-space-3);
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-node-footer {
  border-top: 1px solid var(--sw-color-border);
}

.mt-node-charts {
  margin-top: var(--sw-space-4);
}

.mt-logs-filter {
  margin-bottom: var(--sw-space-5);
}

.mt-log-status {
  margin-top: var(--sw-space-3);
}

.mt-log-status__title {
  font-weight: 600;
  margin-bottom: var(--sw-space-2);
  display: block;
}

.mt-log-status__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sw-space-2);
}

.mt-log-row--highlight {
  animation: mt-log-highlight 5s ease-out;
}

.mt-table__meta {
  margin-top: var(--sw-space-3);
  color: var(--sw-color-text-muted);
}

.mt-log-detail {
  display: grid;
  gap: var(--sw-space-2);
}

.mt-log-detail__pre pre {
  background: var(--sw-color-surface-alt);
  padding: var(--sw-space-3);
  border-radius: var(--sw-radius-md);
  max-height: 300px;
  overflow: auto;
}

.mt-code-block {
  background: var(--sw-color-surface-alt);
  padding: var(--sw-space-4);
  border-radius: var(--sw-radius-lg);
  overflow: auto;
  max-height: 60vh;
}

.mt-alert-editor {
  margin-bottom: var(--sw-space-6);
}

.mt-alert-recipients {
  margin-top: var(--sw-space-4);
  display: grid;
  gap: var(--sw-space-2);
}

.mt-alert-recipients__title {
  font-weight: 600;
}

.mt-alert-recipient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--sw-space-2);
  align-items: center;
}

.mt-alert-node {
  margin-top: var(--sw-space-4);
}

@keyframes mt-log-highlight {
  0% {
    background: rgba(8, 112, 255, 0.2);
  }
  100% {
    background: transparent;
  }
}

.mt-list__item.is-pending {
  background: var(--sw-color-surface-alt);
}

@media (min-width: 2000px) {
  .mt-grid--two {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 2400px) {
  .mt-grid--two {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.mt-monitoring-grid {
  display: grid;
  gap: var(--sw-space-3);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: var(--sw-space-4);
}

.mt-monitoring-stat {
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  padding: var(--sw-space-3);
  display: grid;
  gap: 6px;
}

.mt-monitoring-stat__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sw-color-text-muted);
}

.mt-monitoring-stat__value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sw-color-text);
}

.mt-monitoring-stat--success {
  border-left: 4px solid #22c55e;
}

.mt-monitoring-stat--danger {
  border-left: 4px solid #ef4444;
}

.mt-monitoring-stat--warning {
  border-left: 4px solid #f59e0b;
}

.mt-monitoring-stat--info {
  border-left: 4px solid #38bdf8;
}

.mt-monitoring-filters {
  margin-bottom: var(--sw-space-4);
}

.mt-monitoring-cards {
  display: grid;
  gap: var(--sw-space-3);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mt-alert-card {
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-lg);
  padding: var(--sw-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-3);
  min-height: 220px;
}

.mt-alert-card__header {
  display: flex;
  justify-content: flex-start;
}

.mt-alert-card__body {
  display: grid;
  gap: var(--sw-space-2);
}

.mt-alert-card--danger {
  border-color: rgba(239, 68, 68, 0.4);
}

.mt-alert-card--warning {
  border-color: rgba(245, 158, 11, 0.4);
}

.mt-alert-card--info {
  border-color: rgba(56, 189, 248, 0.4);
}

.mt-alert-card--success {
  border-color: rgba(34, 197, 94, 0.4);
}

.mt-alert-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-alert-card__title {
  font-weight: 600;
}

.mt-alert-card__alerts {
  margin-top: var(--sw-space-3);
  display: grid;
  gap: var(--sw-space-2);
}

.mt-alert-card__alert-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-alert-card__footer {
  margin-top: auto;
}

.mt-monitoring-card {
  margin-top: var(--sw-space-4);
}

.mt-service-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-service-badge {
  font-weight: 600;
}

.mt-monitoring-gauges {
  display: grid;
  gap: var(--sw-space-4);
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.mt-gauge {
  display: grid;
  justify-items: center;
  gap: var(--sw-space-2);
  text-align: center;
}

.mt-gauge__label {
  font-weight: 600;
  color: var(--sw-color-text);
  font-size: 0.9rem;
}

.mt-gauge__wrap {
  position: relative;
  width: 120px;
  height: 120px;
}

.mt-gauge__svg {
  width: 120px;
  height: 120px;
}

.mt-gauge__value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--sw-color-text);
}

.mt-monitoring-charts {
  display: grid;
  gap: var(--sw-space-4);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--sw-space-4);
}

.mt-monitoring-chart {
  min-height: 420px;
}

.mt-monitoring-chart .mt-card__body {
  height: 360px;
}

.mt-monitoring-chart canvas {
  height: 100% !important;
}

@media (max-width: 1400px) {
  .mt-monitoring-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .mt-monitoring-charts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Terminal (xterm.js) scrollbar */
.xterm-viewport {
  scrollbar-width: thin;
  scrollbar-color: rgba(205, 214, 244, 0.25) transparent;
}

.xterm-viewport::-webkit-scrollbar {
  width: 6px;
}

.xterm-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.xterm-viewport::-webkit-scrollbar-thumb {
  background: rgba(205, 214, 244, 0.25);
  border-radius: 3px;
}

.xterm-viewport::-webkit-scrollbar-thumb:hover {
  background: rgba(205, 214, 244, 0.4);
}

.mt-terminal-actions {
  display: flex;
  gap: 6px;
  padding: 0 0 8px;
  flex-wrap: wrap;
}

.mt-terminal-actions__btn {
  background: var(--sw-color-bg-secondary, #f0f2f5);
  color: var(--sw-color-text, #1a1a1a);
  border: 1px solid var(--sw-color-border, #d1d5db);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.mt-terminal-actions__btn:hover {
  background: var(--sw-color-border, #d1d5db);
}

.theme-dark .mt-terminal-actions__btn {
  background: #313244;
  color: #cdd6f4;
  border-color: #45475a;
}

.theme-dark .mt-terminal-actions__btn:hover {
  background: #45475a;
}
