@import url("../../fonts/fonts.css");
@import url("./meteor-tokens/primitives.css");
@import url("./meteor-tokens/light.css");
@import url("./meteor-tokens/dark.css");

:root {
  --sw-font-base: var(--font-family-body), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sw-font-display: var(--font-family-headings), ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --sw-radius-sm: var(--border-radius-xs);
  --sw-radius-md: var(--border-radius-m);
  --sw-radius-lg: var(--border-radius-card);
  --sw-radius-pill: var(--border-radius-round);

  --sw-shadow-1: 0 var(--scale-size-1) var(--scale-size-4) var(--color-elevation-shadow-default);
  --sw-shadow-2: 0 var(--scale-size-12) var(--scale-size-32) var(--color-elevation-shadow-default);

  --sw-space-1: var(--scale-size-4);
  --sw-space-2: var(--scale-size-8);
  --sw-space-3: var(--scale-size-12);
  --sw-space-4: var(--scale-size-16);
  --sw-space-5: var(--scale-size-20);
  --sw-space-6: var(--scale-size-24);
  --sw-space-7: var(--scale-size-32);
  --sw-space-8: var(--scale-size-40);

  --sw-color-brand: var(--color-interaction-primary-default);
  --sw-color-brand-hover: var(--color-interaction-primary-hover);
  --sw-color-brand-strong: var(--color-interaction-primary-pressed);
  --sw-color-accent: var(--color-icon-attention-default);
  --sw-color-success: var(--color-icon-positive-default);
  --sw-color-warning: var(--color-icon-attention-default);
  --sw-color-warning-strong: var(--color-border-attention-default);
  --sw-color-danger: var(--color-text-critical-default);
  --sw-color-danger-hover: var(--color-text-critical-hover);

  --sw-color-bg: var(--color-elevation-surface-sunken);
  --sw-color-surface: var(--color-elevation-surface-default);
  --sw-color-surface-alt: var(--color-background-tertiary-default);
  --sw-color-surface-hover: var(--color-elevation-surface-hover);
  --sw-color-border: var(--color-border-secondary-default);
  --sw-color-border-strong: var(--color-border-primary-default);

  --sw-color-text: var(--color-text-primary-default);
  --sw-color-text-muted: var(--color-text-secondary-default);
  --sw-color-text-primary: var(--color-text-primary-default);
  --sw-color-text-secondary: var(--color-text-secondary-default);

  --sw-color-sidebar: var(--color-elevation-surface-frame);
  --sw-color-sidebar-strong: var(--color-background-secondary-default);
  --sw-color-sidebar-border: var(--color-border-secondary-default);
  --sw-color-sidebar-text: var(--color-text-primary-default);
  --sw-color-sidebar-muted: var(--color-text-secondary-default);

  --sw-color-topbar: var(--color-elevation-surface-raised);
  --sw-color-topbar-border: var(--color-border-secondary-default);
  --sw-color-modal-surface: var(--color-elevation-surface-overlay);
  --sw-color-modal-border: var(--color-border-secondary-default);
  --sw-color-info-bg: var(--color-background-brand-default);
  --sw-color-success-bg: var(--color-background-positive-default);
  --sw-color-warning-bg: var(--color-background-attention-default);
  --sw-color-danger-bg: var(--color-background-critical-default);
  --sw-overlay-backdrop: var(--color-elevation-backdrop-default);
  --sw-overlay-shadow: var(--color-elevation-shadow-default);
}

html.theme-dark,
body.theme-dark {
  color-scheme: dark;
}

* {
  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);
}

html {
  scrollbar-gutter: stable;
}

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: 195px minmax(0, 1fr);
  column-gap: 21px;
  padding: var(--sw-space-3) 10px var(--sw-space-3) var(--sw-space-5);
  color: var(--sw-color-text);
  background: var(--sw-color-bg);
}

.sw-sidebar {
  background: transparent;
  color: var(--sw-color-sidebar-text);
  border-right: 0;
  display: flex;
  flex-direction: column;
  width: 195px;
  height: calc(100vh - (var(--sw-space-3) * 2));
  padding-top: 23px;
}

.sw-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - (var(--sw-space-3) * 2));
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--scale-size-12);
  overflow: clip;
}

.sw-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: var(--scale-size-80);
  padding: 0 var(--sw-space-7);
  background: var(--sw-color-topbar);
  border-bottom: 1px solid var(--sw-color-border-strong);
  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;
  height: 100%;
  position: relative;
}

.sw-topbar__actions .sw-icon-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: var(--scale-size-40);
  height: var(--scale-size-40);
  border: 1px solid var(--sw-color-border);
  color: var(--sw-color-text);
  background: var(--sw-color-surface);
  padding: 0;
  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: color-mix(in srgb, var(--sw-color-brand) 8%, transparent);
}

.sw-avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--scale-size-40);
  height: var(--scale-size-40);
  border: 0;
  border-radius: var(--sw-radius-pill);
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
}

.sw-avatar-button:hover .sw-avatar {
  box-shadow: 0 0 0 var(--scale-size-2) color-mix(in srgb, var(--sw-avatar-color) 32%, transparent);
}

.sw-avatar-button:focus-visible {
  outline: var(--scale-size-2) solid var(--sw-color-brand);
  outline-offset: var(--scale-size-2);
}

.sw-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--scale-size-32);
  height: var(--scale-size-32);
  border-radius: var(--sw-radius-pill);
  background: var(--sw-avatar-background);
  color: var(--sw-avatar-color);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-transform: uppercase;
  transition: box-shadow 0.15s ease;
}

.sw-avatar-button > .sw-avatar {
  width: var(--scale-size-40);
  height: var(--scale-size-40);
  font-size: var(--font-size-xs);
}

.sw-profile-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sw-profile-menu .sw-profile-menu__list {
  position: absolute;
  top: calc(100% + var(--sw-space-2));
  right: 0;
  width: 181px;
  min-width: 181px;
  max-height: none;
  overflow: visible;
  z-index: 30;
}

.sw-profile-menu__header {
  display: flex;
  align-items: center;
  gap: var(--sw-space-4);
  padding: var(--sw-space-5);
}

.sw-profile-menu__header .sw-avatar {
  width: var(--scale-size-48);
  height: var(--scale-size-48);
  font-size: var(--font-size-sm);
}

.sw-profile-menu__user {
  display: grid;
  min-width: 0;
}

.sw-profile-menu__name {
  color: var(--sw-color-text);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sw-profile-menu__meta {
  color: var(--sw-color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.sw-profile-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sw-space-3);
  width: 100%;
  box-sizing: border-box;
  min-height: var(--scale-size-48);
  padding: var(--sw-space-3) var(--sw-space-5);
}

.sw-profile-menu__item-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sw-space-3);
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--font-size-base);
}

.sw-profile-menu__item-label .mt-icon {
  width: var(--scale-size-20);
  height: var(--scale-size-20);
  flex: 0 0 var(--scale-size-20);
}

.sw-profile-menu__item-label .mt-icon svg {
  width: var(--scale-size-20) !important;
  height: var(--scale-size-20) !important;
}

.sw-profile-menu__item-value {
  color: var(--sw-color-text-muted);
  font-size: var(--font-size-sm);
  flex: 0 0 auto;
  margin-left: auto;
  line-height: 1.4;
}

.sw-avatar--palette-0 {
  --sw-avatar-background: var(--color-background-brand-default);
  --sw-avatar-color: var(--color-text-brand-pressed);
}

.sw-avatar--palette-1 {
  --sw-avatar-background: var(--color-background-positive-default);
  --sw-avatar-color: var(--color-text-positive-default);
}

.sw-avatar--palette-2 {
  --sw-avatar-background: var(--color-background-attention-default);
  --sw-avatar-color: var(--color-text-attention-default);
}

.sw-avatar--palette-3 {
  --sw-avatar-background: var(--color-background-critical-default);
  --sw-avatar-color: var(--color-text-critical-pressed);
}

.sw-avatar--palette-4 {
  --sw-avatar-background: var(--color-background-secondary-default);
  --sw-avatar-color: var(--color-text-secondary-default);
}

.sw-avatar--palette-5 {
  --sw-avatar-background: var(--color-interaction-primary-pressed);
  --sw-avatar-color: var(--color-text-primary-inverse);
}

html.theme-dark .sw-avatar--palette-0,
body.theme-dark .sw-avatar--palette-0,
[data-theme='dark'] .sw-avatar--palette-0 {
  --sw-avatar-color: var(--color-text-brand-default);
}

html.theme-dark .sw-avatar--palette-3,
body.theme-dark .sw-avatar--palette-3,
[data-theme='dark'] .sw-avatar--palette-3 {
  --sw-avatar-color: var(--color-text-critical-default);
}

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

.sw-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--scale-size-28);
  padding: 0;
  border-bottom: 0;
  margin-bottom: var(--sw-space-4);
}

.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: 185px;
  height: var(--scale-size-28);
  border-radius: var(--sw-radius-md);
  background: transparent;
  overflow: hidden;
}

.sw-brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: none;
}

body.theme-dark .sw-brand__mark img,
html.theme-dark .sw-brand__mark img {
  filter: brightness(0) invert(1);
}

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

.sw-nav {
  width: 195px;
  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: 18px 0 0;
  scrollbar-width: thin;
  scrollbar-color: var(--sw-color-border) transparent;
}

.sw-nav nav {
  display: grid;
  gap: 6px;
  grid-auto-rows: min-content;
  align-content: start;
  padding: 0;
}

.sw-nav-group {
  display: grid;
  gap: var(--scale-size-2);
}

.sw-nav-group--docker {
  margin-bottom: var(--scale-size-4);
}

.sw-nav-group__label {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--sw-color-sidebar-text);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
  padding: 4.5px var(--sw-space-2);
  border-radius: var(--scale-size-4);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  min-height: 29px;
  height: 29px;
  transition: background 0.2s ease;
}

.sw-nav-group__label:hover {
  background: color-mix(in srgb, var(--sw-color-brand) 8%, transparent);
}

.sw-nav-group__items {
  display: grid;
  gap: var(--scale-size-2);
}

.sw-nav-group__items .sw-nav-link {
  padding-left: 42px;
  min-height: 29px;
  height: 29px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-regular);
}

.sw-nav-group > .sw-nav-link {
  font-weight: var(--font-weight-semibold);
}

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

.sw-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4.5px var(--sw-space-2);
  border-radius: var(--scale-size-4);
  color: var(--sw-color-sidebar-text);
  transition: background 0.2s ease, color 0.2s ease;
  min-height: 29px;
  height: 29px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.4;
}

.sw-nav-link .mt-icon {
  width: var(--scale-size-20);
  height: var(--scale-size-20);
  flex: 0 0 var(--scale-size-20);
}

.sw-nav-group__label .mt-icon {
  width: var(--scale-size-20);
  height: var(--scale-size-20);
  flex: 0 0 var(--scale-size-20);
}

.sw-nav-link .mt-icon svg {
  width: var(--scale-size-20) !important;
  height: var(--scale-size-20) !important;
}

.sw-nav-group__label .mt-icon svg {
  width: var(--scale-size-20) !important;
  height: var(--scale-size-20) !important;
}

.sw-nav-link:hover {
  background: color-mix(in srgb, var(--sw-color-brand) 8%, transparent);
  color: var(--sw-color-text);
}

.sw-nav-link.active {
  background: var(--sw-color-surface-hover);
  color: var(--sw-color-text);
  border-radius: var(--scale-size-4);
}

.sw-nav-group:has(.sw-nav-link.active) > .sw-nav-group__label {
  background: var(--sw-color-surface-hover);
  color: var(--sw-color-text);
  border-radius: var(--scale-size-4);
}

.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: color-mix(in srgb, var(--sw-color-brand) 12%, transparent);
}

.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-topbar .sw-icon-button .mt-icon {
  width: var(--scale-size-16);
  height: var(--scale-size-16);
  flex: 0 0 var(--scale-size-16);
}

.sw-topbar .sw-icon-button .mt-icon svg {
  width: var(--scale-size-16) !important;
  height: var(--scale-size-16) !important;
}

.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);
}

.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: color-mix(in srgb, var(--color-static-white) 5%, transparent);
  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);
  gap: var(--sw-space-2);
  min-height: var(--scale-size-40);
  padding: 0 var(--scale-size-16);
  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: var(--color-static-white);
  box-shadow: var(--sw-shadow-1);
}

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

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

.mt-button--outline:hover {
  background: color-mix(in srgb, var(--sw-color-brand) 8%, transparent);
}

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

.mt-button--danger-outline:hover {
  background: color-mix(in srgb, var(--sw-color-danger) 8%, transparent);
  color: var(--sw-color-danger-hover);
  border-color: var(--sw-color-danger-hover);
}

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

.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);
}

a.mt-button--primary:hover {
  color: var(--color-static-white);
}

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

.mt-button--sm {
  min-height: var(--scale-size-32);
  padding: 0 var(--scale-size-12);
  font-size: 0.85rem;
}

.mt-button--default,
.mt-button--md {
  min-height: var(--scale-size-40);
  padding: 0 var(--scale-size-16);
}

.mt-button .mt-icon {
  color: currentColor;
}

.mt-button__icon,
.mt-button__icon svg {
  width: var(--scale-size-16) !important;
  height: var(--scale-size-16) !important;
  flex: 0 0 var(--scale-size-16);
}

.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: none;
}

.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-label__required {
  color: var(--sw-color-brand);
  font-weight: 600;
}

.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[type="datetime-local"],
.mt-input[type="date"] {
  cursor: pointer;
}

.mt-quota {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}

.mt-quota__bar {
  height: 6px;
  border-radius: 3px;
  background: var(--sw-color-border);
  overflow: hidden;
}

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

.mt-quota__fill.is-warning {
  background: #f0a020;
}

.mt-quota__fill.is-danger {
  background: #d9304f;
}

.mt-quota__label {
  font-size: 11px;
  color: var(--sw-color-text-muted, #6b7280);
}

.mt-input:focus {
  outline: 2px solid color-mix(in srgb, var(--sw-color-brand) 20%, transparent);
  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-input--error,
.mt-input--error:focus {
  border-color: var(--sw-color-danger);
  outline-color: color-mix(in srgb, var(--sw-color-danger) 20%, transparent);
}

.mt-field-error {
  font-size: 0.8rem;
  color: var(--sw-color-danger-hover);
}

.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: var(--sw-color-danger-bg);
  border-top: 1px solid var(--color-border-critical-default);
  bottom: 0;
  box-shadow: 0 calc(-1 * var(--scale-size-1)) var(--scale-size-4) var(--sw-overlay-shadow);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  color: var(--sw-color-danger);
}

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

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

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

  .sw-sidebar {
    position: sticky;
    top: var(--sw-space-3);
    height: calc(100vh - (var(--sw-space-3) * 2));
  }

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

@media (max-width: 959px) {
  .sw-app {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .sw-app--doc-sidebar-open {
    grid-template-columns: 1fr;
  }

  .sw-sidebar {
    width: 100%;
    height: auto;
    padding: 0;
    border-bottom: 1px solid var(--sw-color-sidebar-border);
  }

  .sw-main {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .sw-brand-row {
    min-height: var(--scale-size-64);
    padding: 0 var(--sw-space-4);
    margin-bottom: 0;
  }

  .sw-nav {
    width: 100%;
  }

  .sw-nav__scroll {
    padding: var(--sw-space-3);
  }

  .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: var(--sw-radius-pill);
}

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

.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: var(--sw-radius-pill);
  background: var(--sw-color-border-strong);
  position: relative;
  transition: background 0.2s ease;
}

.mt-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: var(--sw-radius-pill);
  background: var(--color-static-white);
  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: color-mix(in srgb, var(--sw-color-success) 40%, transparent);
  background: color-mix(in srgb, var(--sw-color-success) 8%, transparent);
}

.mt-banner--warning {
  border-color: color-mix(in srgb, var(--sw-color-warning) 40%, transparent);
  background: color-mix(in srgb, var(--sw-color-warning) 12%, transparent);
}

.mt-banner--info {
  border-color: color-mix(in srgb, var(--sw-color-brand) 35%, transparent);
  background: color-mix(in srgb, var(--sw-color-brand) 12%, transparent);
}

.mt-banner--danger {
  border-color: color-mix(in srgb, var(--sw-color-danger) 40%, transparent);
  background: color-mix(in srgb, var(--sw-color-danger) 12%, transparent);
}

.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: var(--sw-radius-pill);
  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-progress--indeterminate .mt-progress__bar {
  width: 40% !important;
  animation: mt-progress-indeterminate 1.2s ease infinite;
}

@keyframes mt-progress-indeterminate {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

.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: var(--sw-overlay-backdrop);
  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: var(--sw-radius-pill);
}

.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 color-mix(in srgb, var(--sw-color-warning) 35%, transparent);
  background: color-mix(in srgb, var(--sw-color-warning) 10%, transparent);
  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__floating {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + var(--sw-space-2));
  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-tooltip__floating.tooltip {
  color: var(--color-text-primary-inverse);
  font-family: var(--font-family-body);
  font-size: var(--font-size-2xs);
  font-weight: var(--font-weight-regular);
  line-height: var(--font-line-height-2xs);
  background: var(--color-elevation-floating-default);
  border: 0;
  border-radius: var(--border-radius-xs);
  padding: var(--scale-size-12);
  width: max-content;
  overflow-wrap: break-word;
  box-shadow: none;
}

.mt-tooltip--placement-bottom .mt-tooltip__floating {
  top: calc(100% + var(--sw-space-2));
  bottom: auto;
}

.mt-tooltip--placement-left .mt-tooltip__floating {
  top: 50%;
  right: calc(100% + var(--sw-space-2));
  bottom: auto;
  left: auto;
  transform: translateY(-50%);
}

.mt-tooltip--placement-right .mt-tooltip__floating {
  top: 50%;
  right: auto;
  bottom: auto;
  left: calc(100% + var(--sw-space-2));
  transform: translateY(-50%);
}

.mt-popover:hover .mt-popover__content,
.mt-tooltip:hover .mt-tooltip__floating,
.mt-tooltip:has(:focus-visible) .mt-tooltip__floating {
  opacity: 1;
}

.mt-tooltip__content {
  display: inline-block;
  color: inherit;
}

.mt-tooltip__arrow {
  position: absolute;
  width: var(--scale-size-8);
  height: var(--scale-size-8);
  border-radius: var(--scale-size-2);
  background: var(--color-elevation-floating-default);
  transform: rotate(45deg);
}

.mt-tooltip--placement-top .mt-tooltip__arrow {
  bottom: calc(-1 * var(--scale-size-2));
  left: calc(50% - var(--scale-size-4));
}

.mt-tooltip--placement-bottom .mt-tooltip__arrow {
  top: calc(-1 * var(--scale-size-2));
  left: calc(50% - var(--scale-size-4));
}

.mt-tooltip--placement-left .mt-tooltip__arrow {
  right: calc(-1 * var(--scale-size-2));
  top: calc(50% - var(--scale-size-4));
}

.mt-tooltip--placement-right .mt-tooltip__arrow {
  left: calc(-1 * var(--scale-size-2));
  top: calc(50% - var(--scale-size-4));
}

.mt-tooltip--icon-button .mt-tooltip__floating,
.sw-topbar__actions .mt-tooltip__floating {
  width: max-content;
  max-width: var(--scale-size-160);
  white-space: nowrap;
}

.mt-tooltip--wide .mt-tooltip__floating {
  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: color-mix(in srgb, var(--sw-color-brand) 10%, transparent);
  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-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sw-space-4);
  margin-bottom: var(--sw-space-5);
}

.mt-page-header h1 {
  margin: 0;
}

.mt-page-header p {
  margin: var(--sw-space-2) 0 0;
  color: var(--sw-color-text-muted);
}

.mt-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sw-space-3);
  padding: var(--sw-space-3);
  margin-bottom: var(--sw-space-5);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  background: var(--sw-color-surface);
}

.mt-instance-header {
  margin-bottom: var(--sw-space-5);
  flex-wrap: wrap;
}

.mt-instance-actions {
  display: flex;
  align-items: center;
  gap: var(--sw-space-3);
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: min(100%, 320px);
}

.mt-instance-actions .mt-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.mt-instance-page .mt-grid--two {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

.sw-app--doc-sidebar-open .mt-instance-header {
  align-items: flex-start;
}

.sw-app--doc-sidebar-open .mt-instance-actions {
  max-width: 100%;
}

@media (max-width: 1500px) {
  .sw-app--doc-sidebar-open .mt-instance-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .sw-app--doc-sidebar-open .mt-instance-actions {
    justify-content: flex-start;
  }
}

.mt-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--scale-size-2);
  min-height: var(--scale-size-40);
  padding: var(--scale-size-4);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--border-radius-button);
  background: var(--color-background-tertiary-default);
}

.mt-view-toggle__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--scale-size-32);
  height: var(--scale-size-32);
  padding: 0;
  border: 0;
  border-radius: var(--scale-size-4);
  background: transparent;
  color: var(--sw-color-text-muted);
  cursor: pointer;
}

.mt-view-toggle__item.is-active {
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  box-shadow: 0 1px 2px var(--color-elevation-shadow-default);
}

.mt-view-toggle__item .mt-icon,
.mt-view-toggle__item .mt-icon svg {
  width: var(--scale-size-16) !important;
  height: var(--scale-size-16) !important;
}

.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-5);
  padding: var(--sw-space-5);
  min-width: 0;
  container-type: inline-size;
}

.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;
  overflow: hidden;
}

.mt-instance-card__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

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

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

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

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

.mt-icon svg {
  display: block;
}

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

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

.mt-button .mt-icon {
  color: currentColor;
}

.mt-button__icon,
.mt-button__icon svg {
  width: var(--scale-size-16) !important;
  height: var(--scale-size-16) !important;
  flex: 0 0 var(--scale-size-16);
}

.mt-button--icon-only {
  width: var(--scale-size-32);
  min-width: var(--scale-size-32);
  padding-inline: 0;
}

.mt-button--icon-only .mt-button__icon {
  margin: 0;
}

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

.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);
  min-width: 0;
  flex-wrap: wrap;
}

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

.mt-instance-card__footer-icons {
  display: inline-flex;
  align-items: center;
  gap: var(--sw-space-3);
  margin-left: auto;
  flex-shrink: 0;
}

.mt-instance-card__node {
  color: var(--sw-color-text-muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.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,
.mt-instance-card__lock .mt-icon svg {
  display: inline-flex;
  width: 16px !important;
  height: 16px !important;
}

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

.mt-instance-card__extension-lock.is-locked {
  color: var(--sw-color-danger);
}

.mt-instance-card__extension-lock.is-unlocked {
  color: var(--sw-color-success);
}

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

.mt-instance-card__extension-lock .mt-icon,
.mt-instance-card__extension-lock .mt-icon svg {
  display: inline-flex;
  width: 16px !important;
  height: 16px !important;
}

.mt-instance-card__extension-lock .mt-icon {
  color: currentColor;
}

.mt-extension-unlock__duration {
  display: flex;
  gap: var(--sw-space-5);
  align-items: flex-end;
}

.mt-extension-unlock__duration > * {
  flex: 1;
}

/* Bulk selection toolbar */
.mt-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sw-space-4);
  flex-wrap: wrap;
  padding: var(--sw-space-3) var(--sw-space-4);
  margin-bottom: var(--sw-space-5);
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  box-shadow: var(--sw-shadow-1);
  position: sticky;
  top: var(--sw-space-3);
  z-index: 5;
}

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

.mt-bulk-bar__select-all {
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  padding: 6px 12px;
  border-radius: var(--sw-radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.mt-bulk-bar__select-all:hover:not(:disabled) {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
}

.mt-bulk-bar__select-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

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

/* Card selection */
.mt-instance-card--selectable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mt-instance-card--selectable.is-selected {
  border-color: var(--sw-color-brand);
  box-shadow: 0 0 0 2px var(--sw-color-brand) inset;
}

.mt-instance-card__select-overlay {
  position: absolute;
  inset: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 3;
  padding: 0;
  margin: 0;
}

.mt-instance-card__check {
  position: absolute;
  top: var(--sw-space-3);
  left: var(--sw-space-3);
  width: 22px;
  height: 22px;
  border-radius: var(--sw-radius-sm);
  border: 2px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-static-white);
  z-index: 4;
  pointer-events: none;
}

.mt-instance-card__check.is-checked {
  border-color: var(--sw-color-brand);
  background: var(--sw-color-brand);
}

/* Table selection */
.mt-table__th--select,
.mt-table__td--select {
  width: 36px;
  text-align: center;
}

.mt-table__row--selected {
  background: var(--sw-color-surface-alt);
}

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

@container (max-width: 460px) {
  .mt-instance-card {
    --mt-instance-card-pad: var(--sw-space-4);
    padding: var(--sw-space-4);
  }

  .mt-instance-card__header {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: var(--sw-space-3);
    align-items: start;
  }

  .mt-instance-card__logo-wrap {
    width: 56px;
    height: 56px;
  }

  .mt-instance-card__status {
    grid-column: 1 / -1;
    justify-self: start;
    justify-content: flex-start;
    margin-top: 0;
  }

  .mt-instance-card__actions {
    align-items: stretch;
  }

  .mt-instance-card__actions .mt-button:not(.mt-button--icon-only) {
    flex: 1 1 120px;
  }

  .mt-instance-card__footer {
    align-items: flex-start;
  }

  .mt-instance-card__footer-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@container (max-width: 340px) {
  .mt-instance-card__header {
    grid-template-columns: 1fr;
  }

  .mt-instance-card__actions .mt-button {
    flex: 1 1 auto;
  }
}

.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:
    linear-gradient(var(--sw-color-surface) 33%, transparent) center top,
    linear-gradient(transparent, var(--sw-color-surface) 67%) center bottom,
    radial-gradient(farthest-side at 50% 0, color-mix(in srgb, var(--color-static-black) 12%, transparent), transparent) center top,
    radial-gradient(farthest-side at 50% 100%, color-mix(in srgb, var(--color-static-black) 12%, transparent), transparent) center bottom;
  background-color: var(--sw-color-surface);
  background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
  background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll;
  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-strong) 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: var(--sw-color-danger);
}

.mt-menu__item--danger:hover {
  background: color-mix(in srgb, var(--sw-color-danger) 12%, transparent);
}

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

.mt-menu__item--hold .mt-menu__item-fill {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--sw-color-danger) 18%, transparent);
  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-menu__section {
  display: grid;
  gap: 2px;
}

.mt-menu__section + .mt-menu__section {
  border-top: 1px solid var(--sw-color-border);
  padding-top: 6px;
  margin-top: 4px;
}

.mt-menu__section-label {
  padding: 4px 10px 2px;
  color: var(--sw-color-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mt-instance-menu {
  --mt-menu-max-height: min(720px, calc(100vh - 24px));
  width: 280px;
  overflow-y: auto;
  background: var(--sw-color-surface);
  background-color: var(--sw-color-surface);
}

.mt-instance-menu .mt-menu__item {
  width: 100%;
  white-space: normal;
}

.mt-instance-menu .mt-menu__item:disabled {
  color: var(--sw-color-text-muted);
  cursor: not-allowed;
  opacity: 0.55;
}

.mt-instance-menu .mt-menu__item:disabled:hover {
  background: transparent;
}

.mt-menu__section--danger {
  padding-bottom: 2px;
}

.mt-menu__scroll-hint {
  position: sticky;
  bottom: -6px;
  z-index: 2;
  box-sizing: border-box;
  height: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: -28px -6px -6px;
  padding: 4px 0 6px;
  background: linear-gradient(transparent, var(--sw-color-surface) 70%);
  color: var(--sw-color-text-muted);
  pointer-events: none;
  border-radius: 0 0 var(--sw-radius-md) var(--sw-radius-md);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.mt-menu__scroll-hint svg {
  animation: mt-scroll-bounce 1.5s ease-in-out infinite;
}

@keyframes mt-scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(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: color-mix(in srgb, var(--sw-color-danger) 40%, transparent);
  background: color-mix(in srgb, var(--sw-color-danger) 12%, transparent);
  color: var(--sw-color-danger);
}

.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-strong);
  border-radius: var(--sw-radius-pill);
}

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

.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 color-mix(in srgb, var(--sw-color-warning) 35%, transparent);
  cursor: pointer;
}

.mt-badge--info {
  border-color: color-mix(in srgb, var(--sw-color-brand) 35%, transparent);
  background: color-mix(in srgb, var(--sw-color-brand) 12%, transparent);
  color: var(--sw-color-brand);
}

.mt-badge--success {
  border-color: color-mix(in srgb, var(--sw-color-success) 40%, transparent);
  background: color-mix(in srgb, var(--sw-color-success) 12%, transparent);
  color: var(--sw-color-success);
}

.mt-badge--warning {
  border-color: color-mix(in srgb, var(--sw-color-warning) 40%, transparent);
  background: color-mix(in srgb, var(--sw-color-warning) 12%, transparent);
  color: var(--sw-color-accent);
}

.mt-badge--danger {
  border-color: color-mix(in srgb, var(--sw-color-danger) 40%, transparent);
  background: color-mix(in srgb, var(--sw-color-danger) 12%, transparent);
  color: var(--sw-color-danger);
}

.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: var(--sw-color-bg);
}

.mt-auth__panel {
  width: min(520px, 92vw);
  display: grid;
  gap: var(--sw-space-8);
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.mt-auth__toolbar {
  display: flex;
  justify-content: flex-end;
  position: fixed;
  top: var(--sw-space-5);
  right: var(--sw-space-5);
  z-index: 20;
}

.mt-auth__theme-toggle {
  width: var(--scale-size-40);
  height: var(--scale-size-40);
  border-radius: var(--border-radius-button);
  border: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: var(--sw-shadow-1);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mt-auth__theme-toggle:hover {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
  background: color-mix(in srgb, var(--sw-color-brand) 8%, transparent);
}

.mt-auth__theme-toggle .mt-icon,
.mt-auth__theme-toggle .mt-icon svg {
  width: var(--scale-size-16) !important;
  height: var(--scale-size-16) !important;
}

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

.mt-auth .mt-field + .mt-field {
  margin-top: var(--sw-space-4);
}

.mt-auth .mt-label {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
}

.mt-auth .mt-input,
.mt-auth .mt-form-input__field {
  min-height: var(--scale-size-40);
  padding: 0 var(--scale-size-12);
  background: var(--sw-color-surface);
  border-color: var(--color-border-primary-default);
  border-radius: 4px;
}

.mt-auth__header {
  text-align: center;
  display: grid;
  gap: 0;
  justify-items: center;
}

.mt-auth__brand {
  width: 211px;
  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: none;
}

body.theme-dark .mt-auth__brand img,
html.theme-dark .mt-auth__brand img {
  filter: brightness(0) invert(1);
}

.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;
  align-content: start;
  gap: 0;
  width: 100%;
  padding: 40px;
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-lg);
  box-shadow: none;
}

.mt-auth__form--tall {
  min-height: 450px;
}

.mt-auth__form-title {
  margin-bottom: var(--sw-space-6);
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
}

.mt-auth__remember {
  margin-top: var(--sw-space-6);
  gap: var(--sw-space-2);
  font-size: 0.875rem;
}

.mt-auth__remember .mt-checkbox__input {
  width: var(--scale-size-16);
  height: var(--scale-size-16);
}

.mt-auth__actions {
  display: grid;
  gap: var(--sw-space-5);
  margin-top: var(--sw-space-6);
}

.mt-auth__primary {
  width: 100%;
  min-width: 0;
  justify-self: stretch;
}

.mt-auth__primary.mt-button--primary {
  min-height: var(--scale-size-40);
  border-radius: 4px;
}

.mt-auth__password-link:disabled {
  color: var(--color-text-primary-disabled);
  cursor: not-allowed;
}

.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: var(--sw-color-danger);
  font-size: 0.9rem;
}

.mt-auth__hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--sw-color-text-muted);
  line-height: 1.5;
}

.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 color-mix(in srgb, var(--sw-color-brand) 20%, transparent);
  border-color: var(--sw-color-brand);
}

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

.mt-form-input__error {
  color: var(--sw-color-danger);
  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: var(--sw-radius-pill);
  background: var(--sw-color-border-strong);
  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: var(--sw-radius-pill);
  background: var(--color-static-white);
  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 {
  margin-bottom: var(--sw-space-5);
}

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

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

.mt-templates-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sw-space-3);
  margin-left: auto;
}

.mt-templates-toolbar .mt-field {
  margin-bottom: 0;
}

.mt-templates-toolbar__count {
  font-size: 0.8rem;
  color: var(--sw-color-text-muted);
  white-space: nowrap;
}

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

.mt-template-card {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-3);
  min-height: 260px;
}

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

.mt-template-card__title {
  font-weight: 600;
  color: var(--sw-color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-template-card__version {
  flex-shrink: 0;
}

.mt-template-card__subtitle {
  color: var(--sw-color-text-muted);
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  margin: 0;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.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: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sw-space-2);
}

.mt-template-card__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--sw-color-text-muted);
  min-width: 0;
}

.mt-template-card__caption-sep {
  opacity: 0.6;
}

.mt-template-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sw-space-2);
  flex-shrink: 0;
}

.mt-button--danger {
  background: var(--sw-color-danger);
  border-color: var(--sw-color-danger);
  color: var(--color-static-white);
}

.mt-button--danger:hover {
  background: var(--sw-color-danger-hover);
  color: var(--color-static-white);
}

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

.mt-button--hold .mt-button__fill {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--sw-color-danger) 38%, transparent);
  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: var(--sw-color-danger);
  color: var(--sw-color-danger);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sw-color-danger) 55%, transparent);
}

.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: flex;
  flex-direction: column;
  gap: var(--sw-space-3);
  min-height: 180px;
}

.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-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mt-docker-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
  align-items: center;
  margin-top: auto;
}

.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: color-mix(in srgb, var(--sw-color-danger) 30%, transparent);
  background: color-mix(in srgb, var(--sw-color-danger) 8%, transparent);
  color: var(--sw-color-danger-hover);
}

.mt-message--info {
  border-color: color-mix(in srgb, var(--sw-color-brand) 30%, transparent);
  background: color-mix(in srgb, var(--sw-color-brand) 8%, transparent);
}

.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-5);
}

.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;
}

td.mt-table__actions,
th.mt-table__actions {
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

td.mt-table__actions > * {
  display: inline-flex;
  vertical-align: middle;
  margin-left: var(--sw-space-2);
}

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

.mt-table__actions .mt-button {
  height: 34px;
  padding-top: 0;
  padding-bottom: 0;
}


.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-5);
}

.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-doc-sidebar {
  position: sticky;
  top: var(--sw-space-3);
  z-index: 4;
  align-self: start;
  width: 100%;
  height: calc(100vh - (var(--sw-space-3) * 2));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--sw-color-surface);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--scale-size-12);
  box-shadow: var(--sw-shadow-2);
  overflow: hidden;
}

.mt-doc-sidebar__resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc((var(--sw-doc-sidebar-gap, var(--sw-space-3)) + var(--scale-size-6)) * -1);
  z-index: 5;
  display: none;
  width: calc(var(--sw-doc-sidebar-gap, var(--sw-space-3)) + var(--scale-size-12));
  border: 0;
  background: transparent;
  cursor: col-resize;
  padding: 0;
}

.mt-doc-sidebar__resize-indicator {
  position: absolute;
  top: 50%;
  left: calc((var(--sw-doc-sidebar-gap, var(--sw-space-3)) + var(--scale-size-12)) / 2);
  width: var(--scale-size-6);
  height: var(--scale-size-56);
  border-radius: var(--sw-radius-pill);
  background: color-mix(in srgb, var(--sw-color-text-muted) 48%, var(--sw-color-surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--sw-color-border) 70%, transparent);
  opacity: 0.55;
  transform: translate(-50%, -50%);
  transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.mt-doc-sidebar__resize-handle:hover .mt-doc-sidebar__resize-indicator,
.mt-doc-sidebar__resize-handle:focus-visible .mt-doc-sidebar__resize-indicator,
.is-doc-sidebar-resizing .mt-doc-sidebar__resize-indicator {
  opacity: 1;
  background: var(--sw-color-brand);
  transform: translate(-50%, -50%) scaleX(1.15);
}

.is-doc-sidebar-resizing,
.is-doc-sidebar-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.mt-doc-sidebar__scrim {
  display: none;
}

.mt-doc-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sw-space-4);
  min-height: var(--scale-size-80);
  padding: 0 var(--sw-space-6);
  border-bottom: 1px solid var(--sw-color-border);
}

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

.mt-doc-sidebar__header h2 {
  margin: 0;
  font-size: var(--font-size-xl);
  line-height: 1.2;
}

.mt-doc-sidebar__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--scale-size-40);
  height: var(--scale-size-40);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mt-doc-sidebar__action:hover {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
  background: color-mix(in srgb, var(--sw-color-brand) 8%, transparent);
}

.mt-doc-sidebar__action .mt-icon,
.mt-doc-sidebar__action .mt-icon svg {
  width: var(--scale-size-16) !important;
  height: var(--scale-size-16) !important;
}

.mt-doc-sidebar__body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.mt-doc-sidebar__body > .mt-banner {
  margin: var(--sw-space-6);
}

.mt-doc-sidebar__loading,
.mt-doc-sidebar__empty,
.mt-doc-sidebar__empty-state {
  padding: var(--sw-space-6);
}

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

.mt-doc-sidebar__nav {
  display: grid;
  gap: var(--scale-size-2);
  padding: var(--sw-space-4) var(--sw-space-4) var(--sw-space-3);
  border-bottom: 1px solid var(--sw-color-border);
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sw-color-border) transparent;
}

.mt-doc-sidebar__search {
  margin-bottom: var(--sw-space-2);
}

.mt-doc-sidebar__search .mt-search__input {
  min-height: var(--scale-size-36);
  padding: var(--sw-space-2) var(--sw-space-3);
  font-size: var(--font-size-sm);
}

.mt-doc-sidebar__nav-item {
  display: flex;
  align-items: center;
  min-height: var(--scale-size-32);
  width: 100%;
  border: 0;
  border-radius: var(--scale-size-4);
  background: transparent;
  color: var(--sw-color-text);
  cursor: pointer;
  font: inherit;
  font-size: var(--font-size-sm);
  line-height: 1.4;
  padding: var(--sw-space-2) var(--sw-space-3);
  padding-left: calc(var(--sw-space-3) + (var(--mt-doc-sidebar-depth, 0) * var(--sw-space-4)));
  text-align: left;
}

.mt-doc-sidebar__nav-item:hover {
  background: var(--sw-color-surface-hover);
}

.mt-doc-sidebar__nav-item--active {
  background: var(--sw-color-surface-hover);
  color: var(--sw-color-text);
  font-weight: var(--font-weight-semibold);
}

.mt-doc-sidebar__content {
  min-height: 0;
  overflow-y: auto;
  padding: var(--sw-space-6);
  scrollbar-width: thin;
  scrollbar-color: var(--sw-color-border) transparent;
}

.mt-doc-sidebar__article-header {
  display: grid;
  gap: var(--scale-size-4);
  margin-bottom: var(--sw-space-5);
}

.mt-doc-sidebar__article-header h3 {
  margin: 0;
  font-size: var(--font-size-lg);
  line-height: 1.3;
}

.mt-doc-sidebar__article-header span {
  color: var(--sw-color-text-muted);
  font-size: var(--font-size-xs);
}

.mt-doc-sidebar__markdown {
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.mt-doc-sidebar__footer {
  display: flex;
  justify-content: flex-end;
  padding: var(--sw-space-4) var(--sw-space-6);
  border-top: 1px solid var(--sw-color-border);
  background: var(--sw-color-surface);
}

@media (min-width: 1280px) {
  .sw-app--doc-sidebar-open {
    grid-template-columns: 195px minmax(0, 1fr) minmax(360px, var(--sw-doc-sidebar-width, 480px));
    --sw-doc-sidebar-gap: var(--sw-space-4);
    column-gap: var(--sw-doc-sidebar-gap);
  }

  .mt-doc-sidebar__resize-handle {
    display: block;
  }
}

@media (max-width: 1279px) {
  .sw-app--doc-sidebar-open {
    grid-template-columns: 195px minmax(0, 1fr);
  }

  .mt-doc-sidebar {
    position: fixed;
    top: var(--sw-space-3);
    right: var(--sw-space-3);
    bottom: var(--sw-space-3);
    z-index: 40;
    width: min(520px, calc(100vw - (var(--sw-space-3) * 2)));
    height: auto;
  }

  .mt-doc-sidebar__scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 39;
    border: 0;
    background: color-mix(in srgb, var(--color-static-black) 12%, transparent);
    cursor: default;
  }
}

.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: color-mix(in srgb, var(--sw-color-brand) 12%, transparent);
  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: var(--sw-radius-pill);
}

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

.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);
  container-type: inline-size;
}

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

.mt-dashboard__header h1 {
  margin: 0;
}

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

.mt-dashboard__refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--scale-size-40);
  height: var(--scale-size-40);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--border-radius-button);
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mt-dashboard__refresh:hover {
  border-color: var(--sw-color-brand);
  color: var(--sw-color-brand);
  background: color-mix(in srgb, var(--sw-color-brand) 8%, transparent);
}

.mt-dashboard__refresh .mt-icon,
.mt-dashboard__refresh .mt-icon svg {
  width: var(--scale-size-16) !important;
  height: var(--scale-size-16) !important;
}

.mt-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sw-space-5);
}

.mt-overview__tile {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-2);
  padding: var(--sw-space-5);
}

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

.mt-overview__value {
  font-family: var(--sw-font-display, inherit);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sw-color-text);
}

.mt-overview__bar {
  height: 8px;
  border-radius: var(--sw-radius-sm);
  background: var(--sw-color-surface-alt);
  overflow: hidden;
  margin-top: var(--sw-space-1);
}

.mt-overview__bar-fill {
  height: 100%;
  background: var(--sw-color-brand);
  border-radius: var(--sw-radius-sm);
  transition: width 0.3s ease;
}

@media (max-width: 900px) {
  .mt-overview {
    grid-template-columns: 1fr;
  }
}

.mt-export-download {
  max-width: 560px;
}

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

.mt-dashboard__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(min(100%, 360px), 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-header-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--sw-space-3);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mt-dashboard__notification-header-link {
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
  font-weight: 500;
}

.mt-dashboard__notification-header-link:hover {
  color: var(--sw-color-brand);
}

.mt-dashboard__notification-list {
  display: grid;
  gap: var(--scale-size-4);
}

.mt-dashboard__notification {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: var(--sw-space-3);
  padding: var(--sw-space-3) var(--sw-space-2);
  border-radius: var(--scale-size-4);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.mt-dashboard__notification:hover,
.mt-dashboard__notification:focus-visible {
  background: var(--color-background-tertiary-default);
  border-color: var(--sw-color-border);
  outline: none;
}

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

.mt-dashboard__notification-body {
  display: grid;
  gap: var(--scale-size-4);
  min-width: 0;
}

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

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

.mt-dashboard__notification-dot {
  width: var(--scale-size-8);
  height: var(--scale-size-8);
  border-radius: var(--sw-radius-pill);
  margin-top: var(--scale-size-8);
  background: var(--sw-color-border);
}

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

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

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

.mt-dashboard__notification-dot--info {
  background: var(--sw-color-brand);
}

.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);
  min-width: 0;
}

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

.mt-dashboard__notification-text {
  color: var(--sw-color-text-muted);
  margin-top: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.mt-dashboard__notification-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--scale-size-28);
  height: var(--scale-size-28);
  padding: 0;
  border: 0;
  border-radius: var(--scale-size-4);
  background: transparent;
  color: var(--sw-color-text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mt-dashboard__notification:hover .mt-dashboard__notification-menu-button,
.mt-dashboard__notification:focus-within .mt-dashboard__notification-menu-button {
  opacity: 1;
}

.mt-dashboard__notification-menu-button:hover {
  background: var(--sw-color-surface);
  color: var(--sw-color-text);
}

.mt-dashboard__notification-menu-button .mt-icon,
.mt-dashboard__notification-menu-button .mt-icon svg {
  width: var(--scale-size-16) !important;
  height: var(--scale-size-16) !important;
}

.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;
  }
}

@container (max-width: 1100px) {
  .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: color-mix(in srgb, var(--sw-color-warning) 18%, transparent);
  color: var(--sw-color-warning-strong);
}

.mt-pill--info {
  background: color-mix(in srgb, var(--sw-color-brand) 16%, transparent);
  color: var(--sw-color-brand-hover);
}

.mt-pill--success {
  background: color-mix(in srgb, var(--sw-color-success) 18%, transparent);
  color: var(--color-text-positive-default);
}

.mt-pill--danger {
  background: color-mix(in srgb, var(--sw-color-danger) 18%, transparent);
  color: var(--sw-color-danger-hover);
}

.mt-pill--primary {
  background: color-mix(in srgb, var(--sw-color-brand) 18%, transparent);
  color: var(--sw-color-brand-hover);
}

.mt-pill--secondary {
  background: color-mix(in srgb, var(--sw-color-text-muted) 16%, transparent);
  color: var(--sw-color-text-muted);
}

.mt-pill--light {
  background: color-mix(in srgb, var(--sw-color-border-strong) 16%, transparent);
  color: var(--sw-color-text-muted);
}

.mt-pill--dark {
  background: color-mix(in srgb, var(--sw-color-text) 20%, transparent);
  color: var(--sw-color-text);
}

.mt-pill--neutral {
  background: color-mix(in srgb, var(--sw-color-border-strong) 16%, transparent);
  color: var(--sw-color-text-muted);
}

.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-form-grid--six {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.mt-stats-chart-row {
  display: grid;
  gap: var(--sw-space-3);
  grid-template-columns: 1fr 1fr;
}

.mt-stats-chart-row > * {
  min-width: 0;
}

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

.mt-stats-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sw-space-3);
  color: var(--sw-color-text-muted);
  font-size: 0.9rem;
}

.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: var(--color-text-positive-default);
}

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

.mt-message--warning {
  border-color: color-mix(in srgb, var(--sw-color-warning) 30%, transparent);
  background: color-mix(in srgb, var(--sw-color-warning) 12%, transparent);
  color: var(--sw-color-warning-strong);
}

.mt-message--danger {
  border-color: color-mix(in srgb, var(--sw-color-danger) 30%, transparent);
  background: color-mix(in srgb, var(--sw-color-danger) 12%, transparent);
  color: var(--sw-color-danger-hover);
}

.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: var(--sw-radius-pill);
  background: var(--sw-color-border);
}

.mt-node-status.is-online {
  background: var(--sw-color-success);
}

.mt-node-status.is-offline {
  background: var(--sw-color-text-muted);
}

.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: color-mix(in srgb, var(--sw-color-brand) 20%, transparent);
  }
  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 var(--sw-color-success);
}

.mt-monitoring-stat--danger {
  border-left: 4px solid var(--sw-color-danger);
}

.mt-monitoring-stat--warning {
  border-left: 4px solid var(--sw-color-warning);
}

.mt-monitoring-stat--info {
  border-left: 4px solid var(--color-icon-brand-default);
}

.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: color-mix(in srgb, var(--sw-color-danger) 40%, transparent);
}

.mt-alert-card--warning {
  border-color: color-mix(in srgb, var(--sw-color-warning) 40%, transparent);
}

.mt-alert-card--info {
  border-color: color-mix(in srgb, var(--sw-color-brand) 40%, transparent);
}

.mt-alert-card--success {
  border-color: color-mix(in srgb, var(--sw-color-success) 40%, transparent);
}

.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: color-mix(in srgb, var(--color-icon-secondary-inverse) 25%, transparent) transparent;
}

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

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

.xterm-viewport::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--color-icon-secondary-inverse) 25%, transparent);
  border-radius: var(--border-radius-xs);
}

.xterm-viewport::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--color-icon-secondary-inverse) 40%, transparent);
}

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

.mt-terminal-actions__btn {
  background: var(--sw-color-surface-alt);
  color: var(--sw-color-text);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--border-radius-button);
  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);
}

.theme-dark .mt-terminal-actions__btn {
  background: var(--color-elevation-surface-overlay);
  color: var(--color-text-secondary-inverse);
  border-color: var(--color-border-primary-default);
}

.theme-dark .mt-terminal-actions__btn:hover {
  background: var(--color-elevation-surface-hover);
}

/* Mailbox */
.mt-mailbox__unread {
  background: var(--sw-color-surface-alt);
}

.mt-mailbox__subject--bold {
  font-weight: 600;
}

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

.mt-table tbody tr {
  cursor: pointer;
}

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

.theme-dark .mt-mailbox__unread {
  background: color-mix(in srgb, var(--sw-color-surface-hover) 60%, transparent);
}

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

/* Email detail modal */
.mt-email-detail__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sw-color-border);
  margin-bottom: 12px;
}

.mt-email-detail__row {
  display: flex;
  gap: 8px;
  font-size: 14px;
}

.mt-email-detail__label {
  font-weight: 600;
  min-width: 50px;
  color: var(--sw-color-text-muted);
}

.mt-email-detail__attachments {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sw-color-border);
  margin-bottom: 12px;
}

.mt-email-detail__attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mt-email-detail__body {
  margin-top: 8px;
}

.mt-email-detail__iframe {
  width: 100%;
  min-height: 400px;
  border: 1px solid var(--sw-color-border);
  border-radius: var(--border-radius-overlay);
  background: var(--color-static-white);
}

.mt-email-detail__text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
  padding: 12px;
  background: var(--sw-color-surface-alt);
  border-radius: var(--border-radius-overlay);
}

.mt-email-detail__tabs {
  display: flex;
  flex-direction: column;
}

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

.mt-email-detail__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-email-detail__tab.is-active {
  color: var(--sw-color-text);
  border-color: var(--sw-color-brand);
}

.mt-email-detail__panel {
  margin-top: 4px;
}

.mt-email-detail__source {
  font-family: var(--sw-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12.5px;
  max-height: 480px;
  overflow: auto;
}

.mt-field__toggle {
  cursor: pointer;
  user-select: none;
}

.mt-field__toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.sw-nav-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Node specs & availability badges */
.mt-node-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--sw-radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.mt-node-badge--online {
  background: var(--sw-color-success-bg);
  color: var(--color-text-positive-default);
}

.mt-node-badge--offline {
  background: var(--sw-color-danger-bg);
  color: var(--sw-color-danger-hover);
}

.mt-node-specs {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.mt-node-spec {
  display: inline-block;
  padding: 2px 8px;
  background: var(--sw-color-surface-alt);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sw-color-text-muted);
}

.mt-node-servertype-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.mt-node-servertype-option .specs {
  font-size: 12px;
  color: var(--sw-color-text-muted);
}

.mt-node-servertype-unavailable {
  opacity: 0.45;
  pointer-events: none;
}

/* ============ Labels feature ============ */
.mt-label-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--sw-radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.mt-label-pill__remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 2px;
  margin-left: 2px;
  opacity: 0.75;
}
.mt-label-pill__remove:hover {
  opacity: 1;
}

.mt-instance-card__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 var(--sw-space-4) var(--sw-space-2);
}

.mt-table__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 320px;
}

.mt-instance-filter {
  display: flex;
  align-items: center;
  gap: var(--sw-space-3);
  flex-wrap: wrap;
  padding: var(--sw-space-3) 0;
  margin-bottom: var(--sw-space-3);
  border-bottom: 1px solid var(--sw-color-border);
}
.mt-instance-filter__label {
  font-size: 0.8rem;
  color: var(--sw-color-text-secondary, var(--sw-color-text-muted));
}
.mt-instance-filter__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mt-instance-filter__pill {
  appearance: none;
  border: 1px solid var(--sw-color-border-strong);
  background: transparent;
  border-radius: var(--sw-radius-pill);
  padding: 4px 10px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: inherit;
}
.mt-instance-filter__pill:hover {
  background: var(--sw-color-surface-hover);
}
.mt-instance-filter__pill--active {
  background: var(--mt-label-color, var(--sw-color-brand));
  border-color: var(--mt-label-color, var(--sw-color-brand));
  color: var(--color-static-white);
}
.mt-instance-filter__pill--active .mt-instance-filter__dot {
  background: color-mix(in srgb, var(--color-static-white) 85%, transparent) !important;
}
.mt-instance-filter__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--sw-radius-pill);
  display: inline-block;
}
.mt-instance-filter__clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--sw-color-text-secondary, var(--sw-color-text-muted));
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.78rem;
  padding: 4px 8px;
}
.mt-instance-filter__clear:hover {
  color: var(--sw-color-text-primary, var(--sw-color-text));
}

.mt-label-manage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sw-space-4);
}
@media (max-width: 720px) {
  .mt-label-manage {
    grid-template-columns: 1fr;
  }
}
.mt-label-manage__editor {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-2);
  padding: var(--sw-space-3);
  background: var(--sw-color-surface-alt);
  border-radius: var(--sw-radius-md, 10px);
}
.mt-label-manage__heading {
  margin: 0 0 var(--sw-space-2);
  font-size: 0.9rem;
}
.mt-label-manage__preview {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--sw-color-text-secondary, var(--sw-color-text-muted));
}
.mt-label-manage__preview-label {
  font-weight: 500;
}
.mt-label-manage__error {
  font-size: 0.78rem;
  color: var(--sw-color-danger-hover);
  margin-top: var(--sw-space-1);
}
.mt-label-manage__actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: var(--sw-space-2);
}
.mt-label-manage__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}
.mt-label-manage__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--sw-radius-sm, 6px);
}
.mt-label-manage__row:hover {
  background: var(--sw-color-surface-hover);
}
.mt-label-manage__row-desc {
  font-size: 0.78rem;
  color: var(--sw-color-text-secondary, var(--sw-color-text-muted));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt-label-manage__row-actions {
  display: flex;
  gap: 4px;
}

.mt-label-assign {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 360px;
  overflow-y: auto;
}
.mt-label-assign__row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--sw-radius-sm, 6px);
}
.mt-label-assign__row:hover {
  background: var(--sw-color-surface-hover);
}
.mt-label-assign__row-desc {
  font-size: 0.78rem;
  color: var(--sw-color-text-secondary, var(--sw-color-text-muted));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt-label-assign__manage-link {
  margin-top: var(--sw-space-2);
  text-align: right;
}
.mt-label-assign__manage-anchor {
  font-size: 0.8rem;
  color: var(--sw-color-text-secondary, var(--sw-color-text-muted));
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mt-label-assign__manage-anchor:hover {
  color: var(--sw-color-text-primary, var(--sw-color-text));
}
.mt-label-assign__check {
  display: inline-flex;
  align-items: center;
}
.mt-label-manage__list {
  min-height: 220px;
}

/* Color picker row */
.mt-color__row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
input.mt-color {
  width: 44px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--sw-color-border-strong);
  border-radius: var(--sw-radius-sm, 6px);
  background: transparent;
  cursor: pointer;
}
input.mt-color::-webkit-color-swatch-wrapper { padding: 2px; }
input.mt-color::-webkit-color-swatch { border: 0; border-radius: 4px; }
.mt-color__hex {
  font-family: var(--sw-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.78rem;
  color: var(--sw-color-text-secondary, var(--sw-color-text-muted));
  letter-spacing: 0.02em;
}

/* Color preset palette */
.mt-label-manage__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.mt-label-manage__preset {
  appearance: none;
  border: 2px solid transparent;
  width: 22px;
  height: 22px;
  border-radius: var(--sw-radius-pill);
  cursor: pointer;
  padding: 0;
  outline: none;
  box-shadow: 0 0 0 var(--scale-size-1) color-mix(in srgb, var(--color-static-black) 12%, transparent) inset;
}
.mt-label-manage__preset:hover {
  transform: scale(1.08);
}
.mt-label-manage__preset--active {
  border-color: var(--sw-color-text-primary, var(--sw-color-text));
}

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

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

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

.mt-cron__log {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--sw-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12.5px;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  background: var(--sw-color-surface-alt);
  border-radius: var(--sw-radius-md);
}

.mt-cron__guide summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sw-color-text);
}

.mt-cron__guide code {
  font-size: 0.8rem;
}

.mt-cron__guide-body {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-2);
  margin-top: var(--sw-space-2);
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
  line-height: 1.5;
}

.mt-cron__guide-body p {
  margin: 0;
}

.mt-cron__guide-body ol {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mt-template-card__thumb {
  display: block;
  width: 100%;
  height: 150px;
  padding: 0;
  border: none;
  border-radius: var(--sw-radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--sw-color-surface-alt);
}

.mt-template-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mt-template-card__thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--sw-font-display, inherit);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--sw-color-text-muted);
}

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

.mt-slider__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sw-color-surface-alt);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  min-height: 240px;
  max-height: 460px;
  overflow: hidden;
}

.mt-slider__image {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
}

.mt-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: var(--sw-radius-pill);
  border: none;
  background: var(--sw-overlay-backdrop);
  color: var(--color-static-white);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.mt-slider__nav--prev {
  left: 8px;
}

.mt-slider__nav--next {
  right: 8px;
}

.mt-slider__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.mt-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--sw-radius-pill);
  border: none;
  padding: 0;
  background: var(--sw-color-text-muted);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.mt-slider__dot:hover {
  opacity: 0.8;
}

.mt-slider__dot.is-active {
  background: var(--sw-color-brand);
  opacity: 1;
}

.mt-tpl-details {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-5);
}

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

.mt-tpl-details__badges,
.mt-tpl-details__editactions {
  display: flex;
  gap: var(--sw-space-2);
}

.mt-tpl-details__id {
  display: flex;
  align-items: center;
  gap: var(--sw-space-2);
  color: var(--sw-color-text-muted);
}

.mt-tpl-details__id code {
  font-size: 0.85em;
}

.mt-tpl-details__section {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-2);
}

.mt-tpl-details__section-title {
  font-weight: 600;
  margin-bottom: var(--sw-space-2);
}

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

.mt-tpl-details__deploy,
.mt-tpl-details__comments {
  border-top: 1px solid var(--sw-color-border);
  padding-top: var(--sw-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-3);
}

.mt-tpl-details__preview img {
  max-width: 240px;
  max-height: 160px;
  border-radius: var(--sw-radius-md);
  border: 1px solid var(--sw-color-border);
  display: block;
  margin-bottom: var(--sw-space-2);
}

.mt-tpl-details__fields {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-3);
}

.mt-tpl-details__fields .mt-field,
.mt-tpl-details__addcomment .mt-field {
  margin-bottom: 0;
}

.mt-tpl-details__deploy-btn {
  align-self: flex-start;
}

.mt-tpl-details__addcomment {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-2);
}

.mt-tpl-details__addcomment .mt-button {
  align-self: flex-start;
}

.mt-markdown-body {
  line-height: 1.6;
  word-break: break-word;
}

.mt-markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--sw-radius-md);
}

.mt-markdown-body h1,
.mt-markdown-body h2,
.mt-markdown-body h3 {
  margin: var(--sw-space-3) 0 var(--sw-space-2);
}

.mt-markdown-body p {
  margin: 0 0 var(--sw-space-2);
}

.mt-tpl-imggrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sw-space-3);
}

.mt-tpl-imggrid__item {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-2);
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  padding: var(--sw-space-2);
}

.mt-tpl-imggrid__item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: var(--sw-radius-sm, 6px);
}

.mt-tpl-imggrid__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mt-tpl-comments {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-3);
}

.mt-tpl-comment {
  border: 1px solid var(--sw-color-border);
  border-radius: var(--sw-radius-md);
  padding: var(--sw-space-3);
}

.mt-tpl-comment__head {
  display: flex;
  align-items: center;
  gap: var(--sw-space-2);
  font-size: 0.8rem;
  color: var(--sw-color-text-muted);
  margin-bottom: 4px;
}

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

.mt-tpl-comment__delete {
  margin-left: auto;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--sw-color-text-muted);
  font-size: 1.1rem;
  line-height: 1;
}

.mt-tpl-comment__body {
  white-space: pre-wrap;
  word-break: break-word;
}

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

.mt-node-costs .mt-card__header .mt-help {
  display: block;
  margin-top: 2px;
}

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

.mt-node-cost-tile {
  border: 1px solid var(--sw-color-border-strong);
  border-radius: var(--sw-radius-md);
  padding: var(--sw-space-3);
}

.mt-node-cost-tile__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sw-color-text-muted);
  margin-bottom: 4px;
}

.mt-node-cost-tile__value {
  font-size: 1.15rem;
  font-weight: 600;
}

.mt-node-costs__table-wrap {
  overflow-x: auto;
  margin-bottom: var(--sw-space-3);
}

.mt-node-costs__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.mt-node-costs__table th,
.mt-node-costs__table td {
  text-align: left;
  padding: var(--sw-space-2) var(--sw-space-3);
  border-bottom: 1px solid var(--sw-color-border-strong);
  white-space: nowrap;
}

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

.mt-node-costs__table tbody tr:last-child td {
  border-bottom: none;
}

.mt-node-cost {
  display: grid;
  gap: 4px;
  margin-bottom: var(--sw-space-3);
  padding: var(--sw-space-3);
  border: 1px solid var(--sw-color-border-strong);
  border-radius: var(--sw-radius-md);
  font-size: 0.9rem;
}

.mt-node-cost__row {
  display: flex;
  justify-content: space-between;
  gap: var(--sw-space-3);
}

.mt-node-cost__row span:last-child {
  font-weight: 600;
  white-space: nowrap;
}

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

.mt-node-cost__row--muted span:last-child {
  font-weight: 500;
}

.mt-node-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--sw-space-3);
}

.mt-node-tag-filter {
  margin-bottom: 0;
  min-width: 160px;
}

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

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

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

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

.mt-node-tags__manage-anchor {
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-node-cost__warning {
  color: var(--sw-color-text-brand-default, inherit);
  font-weight: 600;
}

.mt-node-price__list {
  display: flex;
  justify-content: space-between;
  gap: var(--sw-space-3);
  padding: var(--sw-space-3);
  margin-bottom: var(--sw-space-4);
  border: 1px solid var(--sw-color-border-strong);
  border-radius: var(--sw-radius-md);
  font-size: 0.9rem;
}

.mt-node-price__list span:last-child {
  font-weight: 600;
}

.mt-node-price__error {
  margin-top: var(--sw-space-3);
  font-size: 0.9rem;
  color: var(--sw-color-text-critical-default, inherit);
  font-weight: 600;
}

.mt-node-price__derived {
  margin-top: var(--sw-space-3);
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
}

.mt-node-hardening {
  margin-right: auto;
  font-size: 0.85rem;
}

.mt-container-runtime {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-2);
}

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

.mt-container-tile {
  border: 1px solid var(--sw-color-border-strong);
  border-radius: var(--sw-radius-md);
  padding: var(--sw-space-3);
}

.mt-container-tile__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sw-color-text-muted);
  margin-bottom: 4px;
}

.mt-container-tile__value {
  font-size: 1.15rem;
  font-weight: 600;
}

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

.mt-container-batch {
  display: flex;
  align-items: center;
  gap: var(--sw-space-2);
  margin-right: auto;
}

.mt-container-table {
  display: block;
  max-height: 420px;
  overflow-y: auto;
}

.mt-container-table .mt-table__th--tight,
.mt-container-table .mt-table__td--tight {
  width: 1%;
  white-space: nowrap;
}

.mt-container-table .mt-help {
  margin-left: var(--sw-space-2);
}

.mt-container-memory {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-3);
  padding: var(--sw-space-3);
  border-top: 1px solid var(--sw-color-border-strong);
}

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

.mt-container-memory__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mt-container-memory__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sw-space-2);
}

.mt-modal--wide {
  width: min(880px, 96vw);
}

.mt-container-table .mt-table__td--right,
.mt-container-table .mt-table__th--right {
  white-space: nowrap;
}

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

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

.mt-asset-sets-toolbar__search {
  width: min(320px, 100%);
}

.mt-asset-sets-toolbar .mt-field {
  margin-bottom: 0;
}

.mt-asset-sets-toolbar__count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--sw-color-text-muted);
  white-space: nowrap;
}

.mt-grid--asset-sets {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.mt-asset-set-card {
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-3);
  min-width: 0;
}

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

.mt-asset-set-card__title {
  font-weight: 600;
  color: var(--sw-color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.mt-asset-set-card__host {
  font-size: 0.8rem;
  color: var(--sw-color-text-muted);
  word-break: break-all;
}

.mt-asset-set-card__description {
  margin: 0;
  font-size: 0.85rem;
  color: var(--sw-color-text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mt-asset-set-card__counts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-asset-set-card__count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--sw-radius-pill);
  border: 1px solid var(--sw-color-border-strong);
  font-size: 0.75rem;
  color: var(--sw-color-text-muted);
}

.mt-asset-set-card__count strong {
  color: var(--sw-color-text);
}

.mt-asset-set-card__extensions {
  display: grid;
  gap: var(--sw-space-1);
}

.mt-asset-set-card__extensions-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sw-color-text-muted);
}

.mt-asset-set-card__extension-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sw-space-1);
}

.mt-asset-set-card__more {
  font-size: 0.75rem;
}

.mt-asset-set-card__footer {
  margin-top: auto;
  border-top: 1px solid var(--sw-color-border-strong);
  padding-top: var(--sw-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--sw-space-2);
}

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

.mt-asset-set-card__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--sw-color-text-muted);
}

.mt-asset-set-card__caption-sep {
  opacity: 0.6;
}

.mt-asset-set-jobs td {
  vertical-align: middle;
}

.mt-asset-set-jobs__dry-run {
  margin-left: var(--sw-space-1);
}

.mt-button.mt-asset-set-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mt-asset-set-mode {
  justify-self: start;
}

.mt-segmented--danger .mt-segmented__item.is-active {
  background: var(--sw-color-danger);
  color: var(--color-static-white);
}

.mt-asset-set-job__summary {
  display: grid;
  gap: var(--sw-space-3);
  margin-bottom: var(--sw-space-4);
}

.mt-asset-set-job__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-2);
}

.mt-asset-set-job__facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--sw-space-3);
  margin: 0;
}

.mt-asset-set-job__facts dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sw-color-text-muted);
}

.mt-asset-set-job__facts dd {
  margin: 0;
  color: var(--sw-color-text);
  word-break: break-word;
}

.mt-asset-set-job__log-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sw-space-3);
  margin-bottom: var(--sw-space-2);
}

.mt-asset-set-job__log-toolbar .mt-group-header {
  margin-bottom: 0;
}

.mt-asset-set-job__log-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sw-space-4);
}

.mt-asset-set-job__log {
  font-family: var(--sw-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.8rem;
  line-height: 1.5;
  background: var(--sw-color-surface-alt);
  border: 1px solid var(--sw-color-border-strong);
  border-radius: var(--sw-radius-md);
  padding: var(--sw-space-3);
  height: 320px;
  overflow: auto;
  margin-bottom: var(--sw-space-4);
}

.mt-asset-set-job__log-empty {
  color: var(--sw-color-text-muted);
}

.mt-asset-set-job__line {
  display: flex;
  gap: var(--sw-space-3);
  color: var(--sw-color-text);
}

.mt-asset-set-job__time {
  flex: 0 0 auto;
  color: var(--sw-color-text-muted);
}

.mt-asset-set-job__text {
  white-space: pre-wrap;
  word-break: break-word;
}

.mt-asset-set-job__line--success .mt-asset-set-job__text {
  color: var(--sw-color-success);
}

.mt-asset-set-job__line--warning .mt-asset-set-job__text {
  color: var(--sw-color-accent);
}

.mt-asset-set-job__line--error .mt-asset-set-job__text {
  color: var(--sw-color-danger);
}

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

.mt-asset-set-job__report .mt-group-header {
  margin-bottom: 0;
  margin-top: var(--sw-space-2);
}

.mt-asset-set-job__cell-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.mt-asset-set-job__warnings,
.mt-asset-set-job__domains {
  margin: 0;
  padding-left: var(--sw-space-5);
  color: var(--sw-color-text);
}

.mt-asset-set-load__facts {
  margin-bottom: var(--sw-space-3);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sw-space-3);
}

.mt-asset-set-load__facts > div {
  display: grid;
  gap: 2px;
  color: var(--sw-color-text);
}

.mt-asset-set-load__extensions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-1);
}

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

.mt-store-licenses {
  border-color: var(--sw-color-border-strong);
}

.mt-store-licenses__item {
  align-items: flex-start;
  border-bottom-color: var(--sw-color-border-strong);
}

.mt-store-licenses__main {
  display: grid;
  gap: var(--sw-space-1);
  min-width: 0;
  flex: 1 1 auto;
}

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

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

.mt-store-licenses__details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sw-space-3);
  font-size: 0.78rem;
  color: var(--sw-color-text-muted);
  word-break: break-all;
}

.mt-store-licenses__confirm {
  font-size: 0.85rem;
  color: var(--sw-color-danger);
  align-self: center;
}

.mt-deploy-advanced,
.mt-add-instance__asset-set {
  margin-top: var(--sw-space-3);
}

.mt-deploy-advanced .mt-group-header,
.mt-add-instance__asset-set .mt-group-header {
  margin-bottom: 0;
}
