:root {
  --v2-bg-0: #edf3ff;
  --v2-bg-1: #e6f7f1;
  --v2-page-bg: #edf3ff;
  --v2-surface: #ffffff;
  --v2-surface-muted: #f7f9fc;
  --v2-topbar-bg: rgba(250, 252, 255, 0.84);
  --v2-topbar-border: rgba(213, 223, 238, 0.92);
  --v2-border: #dbe4f0;
  --v2-text: #172033;
  --v2-text-muted: #61708b;
  --v2-topbar-text: #2d3f5f;
  --v2-primary: #2d66f6;
  --v2-primary-2: #4f85ff;
  --v2-accent: var(--v2-primary);
  --v2-success: #1f9d62;
  --v2-warning: #c67f19;
  --v2-danger: #cc3f3f;
  --v2-sidebar-start: #0f203a;
  --v2-sidebar-end: #1a2f4f;
  --v2-sidebar-active: rgba(113, 170, 255, 0.26);
  --v2-radius-lg: 0.86rem;
  --v2-radius-md: 0.62rem;
  --v2-control-h: 2rem;
  --v2-control-h-sm: 1.72rem;
  --v2-pad-card-x: 0.78rem;
  --v2-pad-card-y: 0.68rem;
  --v2-modal-pad-x: 0.86rem;
  --v2-modal-pad-y: 0.66rem;
  --v2-modal-gap: 0.42rem;
  --v2-modal-title-size: 0.84rem;
  --v2-shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.1);
  --v2-shadow-strong: 0 12px 24px rgba(0, 0, 0, 0.16);
  --v2-shadow-sticky: 0 0.55rem 0.75rem -0.65rem rgba(0, 0, 0, 0.22);
  --v2-sidebar-w: 10rem;
  --v2-selection-bg: rgba(45, 102, 246, 0.22);
  --v2-selection-text: inherit;

  /* Map Tabler tokens to v2 tokens so Tabler components follow `data-theme` + `data-theme-base`. */
  --tblr-body-bg: var(--v2-page-bg);
  --tblr-body-color: var(--v2-text);
  --tblr-bg-surface: var(--v2-surface-1, var(--v2-surface));
  --tblr-bg-surface-secondary: var(--v2-surface-2, var(--v2-surface-muted));
  --tblr-border-color: var(--v2-border-subtle, var(--v2-border));
  --tblr-border-color-translucent: color-mix(in srgb, var(--v2-border-subtle, var(--v2-border)) 46%, transparent);
  --tblr-muted: var(--v2-text-muted);
  --tblr-secondary: var(--v2-text-muted);
  --tblr-secondary-rgb: 97,112,139;
  --tblr-blue: var(--v2-primary);
  --tblr-blue-rgb: 45,102,246;
}

/* Tabler uses `--tblr-body-color-rgb` in `--tblr-box-shadow` and other computed colors.
   FastManager themes do not use `data-bs-theme`, so set it explicitly for after-login pages. */
body[data-page] {
  --tblr-body-color-rgb: 23,32,51;
  --tblr-box-shadow-input: 0 1px 1px rgba(0, 0, 0, 0.08);
}

html[data-theme-base="neutral"] body[data-page] {
  --tblr-body-color-rgb: 38,38,38;
}

html[data-theme-base="stone"] body[data-page] {
  --tblr-body-color-rgb: 68,64,60;
}

html[data-theme="dark"] body[data-page] {
  --tblr-body-color-rgb: 215,226,245;
  --tblr-box-shadow-input: 0 1px 1px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"][data-theme-base="neutral"] body[data-page] {
  --tblr-body-color-rgb: 212,212,212;
}

html[data-theme="dark"][data-theme-base="stone"] body[data-page] {
  --tblr-body-color-rgb: 231,229,228;
}

html[data-theme-base="neutral"] {
  --v2-bg-0: #f5f5f5;
  --v2-bg-1: #e5e5e5;
  --v2-page-bg: #f5f5f5;
  --v2-surface: #fafafa;
  --v2-surface-muted: #f5f5f5;
  --v2-primary: #525252;
  --v2-primary-2: #737373;
  --v2-accent: var(--v2-primary);
  --v2-topbar-bg: rgba(245, 245, 245, 0.84);
  --v2-topbar-border: rgba(212, 212, 212, 0.92);
  --v2-border: #d4d4d4;
  --v2-text: #262626;
  --v2-text-muted: #737373;
  --v2-topbar-text: #262626;
  --v2-sidebar-start: #27272a;
  --v2-sidebar-end: #404040;
  --v2-sidebar-active: rgba(115, 115, 115, 0.26);
  --v2-selection-bg: rgba(115, 115, 115, 0.26);
  --v2-selection-text: #09090b;

  /* Tabler theme vars (so .btn-primary/.text-primary/.link-primary follow theme-base). */
  --tblr-primary: #525252;
  --tblr-primary-rgb: 82,82,82;
  --tblr-link-color: #525252;
  --tblr-link-hover-color: #404040;
  --tblr-secondary-rgb: 115,115,115;
  --tblr-blue-rgb: 82,82,82;
  --tblr-info: var(--v2-primary);
  --tblr-info-rgb: 82,82,82;
  --tblr-azure: var(--v2-primary);
  --tblr-azure-rgb: 82,82,82;
  --tblr-indigo: var(--v2-primary);
  --tblr-indigo-rgb: 82,82,82;
}

html[data-theme-base="stone"] {
  --v2-bg-0: #fafaf9;
  --v2-bg-1: #e7e5e4;
  --v2-page-bg: #fafaf9;
  --v2-surface: #fafaf9;
  --v2-surface-muted: #f5f5f4;
  --v2-primary: #16a34a;
  --v2-primary-2: #22c55e;
  --v2-accent: var(--v2-primary);
  --v2-topbar-bg: rgba(250, 250, 249, 0.84);
  --v2-topbar-border: rgba(214, 211, 209, 0.92);
  --v2-border: #d6d3d1;
  --v2-text: #44403c;
  --v2-text-muted: #78716c;
  --v2-topbar-text: #44403c;
  --v2-sidebar-start: #2f2924;
  --v2-sidebar-end: #44403c;
  --v2-sidebar-active: rgba(22, 163, 74, 0.18);
  --v2-selection-bg: rgba(22, 163, 74, 0.22);
  --v2-selection-text: #0c0a09;

  /* Tabler theme vars (so .btn-primary/.text-primary/.link-primary follow theme-base). */
  --tblr-primary: #16a34a;
  --tblr-primary-rgb: 22,163,74;
  --tblr-link-color: #16a34a;
  --tblr-link-hover-color: #15803d;
  --tblr-secondary-rgb: 120,113,108;
  --tblr-blue-rgb: 22,163,74;
  --tblr-info: var(--v2-primary);
  --tblr-info-rgb: 22,163,74;
  --tblr-azure: var(--v2-primary);
  --tblr-azure-rgb: 22,163,74;
  --tblr-indigo: var(--v2-primary);
  --tblr-indigo-rgb: 22,163,74;
}

html[data-theme="dark"][data-theme-base="neutral"] {
  --v2-bg-0: #171717;
  --v2-bg-1: #262626;
  --v2-page-bg: #171717;
  --v2-surface: #262626;
  --v2-surface-muted: #404040;
  --v2-primary: #525252;
  --v2-primary-2: #737373;
  --v2-accent: var(--v2-primary);
  --v2-topbar-bg: color-mix(in srgb, var(--v2-surface-3) 86%, transparent);
  --v2-topbar-border: var(--v2-border-subtle, #525252);
  --v2-border: #525252;
  --v2-text: #d4d4d4;
  --v2-text-muted: #a3a3a3;
  --v2-topbar-text: var(--v2-text, #f5f5f5);
  --v2-sidebar-start: #171717;
  --v2-sidebar-end: #262626;
  --v2-sidebar-active: rgba(82, 82, 82, 0.32);
  --v2-selection-bg: rgba(115, 115, 115, 0.58);
  --v2-selection-text: #0a0a0a;

  --tblr-primary: #525252;
  --tblr-primary-rgb: 82,82,82;
  --tblr-link-color: #a3a3a3;
  --tblr-link-hover-color: #d4d4d4;
  --tblr-secondary-rgb: 163,163,163;
  --tblr-blue-rgb: 82,82,82;
  --tblr-info: var(--v2-primary);
  --tblr-info-rgb: 82,82,82;
  --tblr-azure: var(--v2-primary);
  --tblr-azure-rgb: 82,82,82;
  --tblr-indigo: var(--v2-primary);
  --tblr-indigo-rgb: 82,82,82;
}

html[data-theme="dark"][data-theme-base="stone"] {
  --v2-bg-0: #1c1917;
  --v2-bg-1: #292524;
  --v2-page-bg: #1c1917;
  --v2-surface: #292524;
  --v2-surface-muted: #44403c;
  --v2-primary: #22c55e;
  --v2-primary-2: #4ade80;
  --v2-accent: var(--v2-primary);
  --v2-topbar-bg: color-mix(in srgb, var(--v2-surface-3) 86%, transparent);
  --v2-topbar-border: var(--v2-border-subtle, #57534e);
  --v2-border: #57534e;
  --v2-text: #e7e5e4;
  --v2-text-muted: #a8a29e;
  --v2-topbar-text: var(--v2-text, #e7e5e4);
  --v2-sidebar-start: #1c1917;
  --v2-sidebar-end: #292524;
  --v2-sidebar-active: rgba(34, 197, 94, 0.22);
  --v2-selection-bg: rgba(34, 197, 94, 0.38);
  --v2-selection-text: #0c0a09;

  --tblr-primary: #22c55e;
  --tblr-primary-rgb: 34,197,94;
  --tblr-link-color: color-mix(in srgb, var(--v2-primary) 70%, var(--v2-text));
  --tblr-link-hover-color: var(--v2-primary-2);
  --tblr-secondary-rgb: 168,162,158;
  --tblr-blue-rgb: 34,197,94;
  --tblr-info: var(--v2-primary);
  --tblr-info-rgb: 34,197,94;
  --tblr-azure: var(--v2-primary);
  --tblr-azure-rgb: 34,197,94;
  --tblr-indigo: var(--v2-primary);
  --tblr-indigo-rgb: 34,197,94;
}

::selection {
  background: var(--v2-selection-bg);
  color: var(--v2-selection-text);
}

::-moz-selection {
  background: var(--v2-selection-bg);
  color: var(--v2-selection-text);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--v2-text);
  line-height: 1.45;
  background: var(--v2-page-bg);
}

.container-xl {
  max-width: none;
  width: 100%;
  padding-inline: 1rem;
}

.row.row-cards {
  --tblr-gutter-x: 0.34rem;
  --tblr-gutter-y: 0.34rem;
}

.page,
.page-wrapper,
.page-body {
  min-height: 100vh;
}

.v2-sidebar-backdrop {
  display: none;
}

.v2-sidebar {
  width: var(--v2-sidebar-w);
  min-height: 100vh;
  border-right: 1px solid color-mix(in srgb, var(--v2-border-subtle) 46%, transparent);
  background:
    linear-gradient(180deg, var(--v2-sidebar-start) 0%, var(--v2-sidebar-end) 100%),
    radial-gradient(
      800px 300px at 0% 0%,
      color-mix(in srgb, var(--v2-accent) 22%, transparent) 0%,
      transparent 80%
    );
  box-shadow: 0 18px 38px rgba(14, 25, 46, 0.22);
}

.v2-sidebar > .container-xl {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.v2-sidebar .navbar-collapse {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.v2-sidebar .navbar-nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.v2-sidebar .v2-sidebar-user {
  margin-top: auto;
  padding-top: 0.42rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.v2-sidebar .v2-sidebar-user-card {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.55rem 0.55rem 0.45rem;
  text-align: left;
}

.v2-sidebar .v2-sidebar-user-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 720;
  font-size: 0.74rem;
  line-height: 1.1;
  color: rgba(242, 247, 255, 0.92);
}

.navbar-vertical.v2-sidebar.navbar-expand-lg {
  width: var(--v2-sidebar-w);
}

.v2-sidebar.navbar-expand-lg ~ .page-wrapper {
  margin-left: var(--v2-sidebar-w);
}

.v2-sidebar .navbar-brand {
  color: #f5f9ff;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 1rem;
  margin: 0.18rem 0 0.34rem;
}

.v2-sidebar .navbar-nav {
  gap: 0.08rem;
}

.v2-sidebar .nav-link {
  border-radius: 0.56rem;
  min-height: 1.72rem;
  padding: 0.22rem 0.42rem;
  color: rgba(242, 247, 255, 0.8);
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
  position: relative;
}

.v2-sidebar .nav-link-title {
  font-size: 0.79rem;
  line-height: 1.25;
}

.v2-sidebar .nav-link-icon {
  font-size: 0.84rem;
}

.v2-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(1px);
}

.v2-sidebar .nav-link.active {
  color: #fff;
  background: var(--v2-sidebar-active);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v2-accent) 38%, transparent);
}

.v2-sidebar .nav-link.active::before {
  content: "";
  position: absolute;
  left: 0.18rem;
  top: 22%;
  width: 0.2rem;
  height: 56%;
  border-radius: 999px;
  background: var(--v2-primary-2);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  /* Lock header height early to avoid visible jumps while CSS/fonts load. */
  --v2-topbar-h: 3.1rem;
  background: var(--v2-topbar-bg);
  border-bottom: 1px solid var(--v2-topbar-border) !important;
  min-height: var(--v2-topbar-h);
  height: var(--v2-topbar-h);
  padding-block: 0;
}

.app-topbar .container-xl {
  min-height: var(--v2-topbar-h);
  height: var(--v2-topbar-h);
  display: flex;
  align-items: center;
  padding-block: 0;
  padding-inline: 1rem;
  position: relative;
}

.app-topbar-primary {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  flex-wrap: nowrap;
}

.app-topbar .navbar-text {
  font-weight: 700;
  color: var(--v2-topbar-text);
  letter-spacing: 0.06em;
  font-size: 0.66rem;
  margin-left: 0.22rem;
}

.app-topbar .navbar-nav {
  min-height: 0;
}

.app-topbar .navbar-nav.flex-row {
  align-items: center !important;
  gap: 0.28rem !important;
  min-height: 0;
  height: auto;
}

.app-topbar .navbar-nav.flex-row .btn,
.app-topbar .navbar-nav.flex-row .nav-link {
  align-self: center;
  height: auto;
}

.v2-timezone-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.2rem 0.54rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--v2-primary) 24%, var(--v2-border-subtle, var(--v2-border)));
  background: color-mix(in srgb, var(--v2-surface-2, var(--v2-surface-muted)) 76%, transparent);
  color: var(--v2-text-muted);
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
}

.v2-timezone-chip .ti {
  font-size: 0.78rem;
  color: var(--v2-primary);
}

@media (max-width: 1199.98px) {
  .v2-timezone-chip {
    padding-inline: 0.44rem;
    font-size: 0.64rem;
  }
}

.reload-btn {
  min-height: 1.57rem !important;
  height: 1.57rem !important;
  min-width: 1.76rem !important;
  padding: 0 !important;
  font-size: 0.73rem !important;
  line-height: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 0.54rem;
}

.reload-btn .ti {
  font-size: 0.94rem;
  margin: 0 !important;
}

.theme-toggle-btn {
  min-height: 1.57rem !important;
  height: 1.57rem !important;
  min-width: 1.76rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 0.54rem;
}

.theme-toggle-btn .ti {
  font-size: 0.94rem;
  margin: 0 !important;
}

.theme-base-select {
  min-height: 1.57rem !important;
  height: 1.57rem !important;
  min-width: 5.95rem;
  width: auto;
  padding-top: 0.08rem;
  padding-bottom: 0.08rem;
  border-radius: 0.54rem;
}

#logoutBtn {
  min-height: 1.57rem !important;
  height: 1.57rem !important;
  min-width: 1.76rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 0.54rem;
}

#logoutBtn .ti {
  font-size: 0.94rem;
  margin: 0 !important;
}

.page-body {
  padding-top: 1rem;
  padding-bottom: 0.34rem;
}

.card {
  border: 1px solid var(--v2-border);
  background: var(--v2-surface);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-soft);
  overflow: hidden;
}

.card .card-header {
  background: linear-gradient(
    180deg,
    var(--v2-surface-1, var(--v2-surface)) 0%,
    var(--v2-surface-2, var(--v2-surface-muted)) 100%
  );
  border-bottom: 1px solid var(--v2-border-subtle, var(--v2-border));
  padding: 0.46rem 0.54rem;
  position: relative;
}

.card .card-body {
  padding: 0.46rem 0.54rem;
}

.card .card-footer {
  padding: 0.4rem 0.54rem;
  border-top: 1px solid var(--v2-border-subtle, var(--v2-border));
  background: var(--v2-surface-1, var(--v2-surface));
}

.card .card-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  color: var(--v2-text);
  position: relative;
  padding-left: 0.5rem;
}

.card .card-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.18rem;
  height: 0.74rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--v2-primary-2) 0%, var(--v2-primary) 100%);
  opacity: 0.95;
}

.card-header.d-flex {
  gap: 0.46rem;
  flex-wrap: wrap;
}

.card-metric {
  border: 0;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--v2-primary) 12%, transparent) 0%,
      color-mix(in srgb, var(--v2-primary) 3%, transparent) 100%
    ),
    var(--v2-surface);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--v2-primary) 18%, transparent);
}

.card-metric::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--v2-primary) 16%, transparent);
  border-radius: var(--v2-radius-lg);
}

.card-metric .display-6 {
  font-weight: 800;
  color: var(--v2-primary);
  font-size: 1.46rem;
}

.card-metric .text-secondary {
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.065em;
  font-weight: 700;
  color: var(--v2-text-muted) !important;
}

.card-metric .card-body {
  padding: 0.62rem 0.64rem 0.58rem;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  border-bottom-width: 1px;
  color: var(--v2-text-dim, var(--v2-text-muted));
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.34rem 0.44rem;
  vertical-align: middle;
  background: var(--v2-surface-2, var(--v2-surface-muted));
}

.table tbody td {
  padding: 0.32rem 0.44rem;
  vertical-align: middle;
  line-height: 1.28;
  color: var(--v2-text);
}

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

.table tbody tr:hover {
  background: color-mix(in srgb, var(--v2-surface-3, var(--v2-surface-muted)) 72%, transparent);
}

.table tbody tr + tr td {
  border-top-color: var(--v2-border-subtle, var(--v2-border));
}

.v2-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
}

.v2-th-sort:hover,
.v2-th-sort:focus-visible {
  color: var(--v2-text);
  text-decoration: none;
}

.v2-th-sort span[aria-hidden="true"] {
  font-size: 0.68rem;
  color: var(--v2-text-muted);
}

.v2-th-sort.is-active span[aria-hidden="true"] {
  color: var(--v2-text);
}

#multiDeployPlanTable tbody td {
  vertical-align: top;
}

#multiDeployPlanTable th:nth-child(1),
#multiDeployPlanTable td:nth-child(1) {
  width: 18%;
}

#multiDeployPlanTable th:nth-child(2),
#multiDeployPlanTable td:nth-child(2) {
  width: 12%;
}

#multiDeployPlanTable th:nth-child(3),
#multiDeployPlanTable td:nth-child(3) {
  width: 28%;
}

#multiDeployPlanTable th:nth-child(4),
#multiDeployPlanTable td:nth-child(4) {
  width: 24%;
}

#multiDeployPlanTable th:nth-child(5),
#multiDeployPlanTable td:nth-child(5) {
  width: 18%;
}

.multi-plan-fixes {
  min-width: 240px;
}

.multi-fix-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.multi-fix-preview {
  margin-top: 0.26rem;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.multi-fix-preview-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.32rem;
  align-items: center;
  border: 1px solid var(--v2-border-subtle);
  border-radius: 0.48rem;
  padding: 0.12rem 0.3rem;
  background: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
}

.multi-fix-preview-kind {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--v2-text-muted);
}

.multi-fix-preview-text {
  font-size: 0.67rem;
  color: var(--v2-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-fix-empty {
  font-size: 0.66rem;
  color: var(--v2-text-muted);
}

.multi-fixes-table .form-control,
.multi-fixes-table .form-select {
  min-width: 0;
}

.multi-fixes-table td {
  vertical-align: middle;
}

.multi-fixes-flags {
  display: grid;
  gap: 0.34rem;
  min-width: 10.5rem;
}

.multi-fix-flag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
}

.multi-fix-flag-text {
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 650;
  color: color-mix(in srgb, var(--v2-text) 88%, transparent);
  white-space: nowrap;
}

.multi-fix-flag-row .form-check-input {
  margin: 0;
  flex: 0 0 auto;
}

.multi-fixes-actions {
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.multi-fixes-actions .btn {
  min-width: 2rem;
}

#multiDeployCommonFixesTableWrap,
#multiDomainFixesTableWrap {
  position: relative;
}

#multiDeployCommonFixesTable tbody td:nth-child(1),
#multiDomainFixesTable tbody td:nth-child(1) {
  min-width: 10rem;
}

#multiDeployCommonFixesTable tbody td:nth-child(2),
#multiDomainFixesTable tbody td:nth-child(2) {
  min-width: 8rem;
}

#multiDeployCommonFixesTable tbody td:nth-child(3),
#multiDomainFixesTable tbody td:nth-child(3),
#multiDeployCommonFixesTable tbody td:nth-child(4),
#multiDomainFixesTable tbody td:nth-child(4) {
  min-width: 12rem;
}

#multiDeployCommonFixesTable tbody td:nth-child(5),
#multiDomainFixesTable tbody td:nth-child(5),
#multiDeployCommonFixesTable thead th:nth-child(5),
#multiDomainFixesTable thead th:nth-child(5) {
  min-width: 11rem;
}

.multi-plan-domain-name {
  font-weight: 760;
  color: var(--v2-text);
  line-height: 1.2;
}

.multi-plan-domain-path {
  margin-top: 0.12rem;
  font-size: 0.66rem;
  color: var(--v2-text-muted);
}

.multi-plan-server {
  color: color-mix(in srgb, var(--v2-text) 92%, transparent);
  font-weight: 620;
}

.multi-plan-body {
  min-width: 230px;
}

.multi-plan-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.multi-plan-entries {
  margin-top: 0.26rem;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}

.multi-plan-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.26rem;
  border: 1px solid var(--v2-border-subtle);
  border-radius: 0.48rem;
  padding: 0.12rem 0.3rem;
  background: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
}

.multi-plan-entry-kind {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--v2-text-muted);
}

.multi-plan-entry-name {
  font-size: 0.67rem;
  color: var(--v2-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-plan-entry-action {
  font-size: 0.62rem;
  color: var(--v2-text-muted);
}

.multi-plan-more,
.multi-plan-empty {
  font-size: 0.66rem;
  color: var(--v2-text-muted);
}

#serversTable tbody td:first-child,
#tasksTable tbody td:first-child,
#usersTable tbody td:first-child,
#filesLeftTable tbody td:nth-child(2),
#filesRightTable tbody td:nth-child(2) {
  color: var(--v2-text);
  font-weight: 650;
}

.v2-domain-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.12;
}

.v2-domain-name-row {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.v2-domain-name {
  color: var(--v2-text);
  font-weight: 650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-domain-title {
  margin-top: 0.08rem;
  font-size: 0.67rem;
  font-weight: 520;
  color: var(--v2-text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-domain-ts {
  margin-top: 0.04rem;
  font-size: 0.6rem;
  line-height: 1;
  opacity: 0.7;
}

.v2-domain-mail-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  color: var(--v2-primary);
  background: color-mix(in srgb, var(--v2-primary) 12%, transparent);
  flex: 0 0 auto;
}

.v2-domain-mail-badge.is-active {
  color: var(--v2-success, #1f8f4d);
  background: color-mix(in srgb, var(--v2-success, #1f8f4d) 18%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--v2-success, #1f8f4d) 22%, transparent);
}

.v2-domain-mail-badge.is-warning {
  color: var(--v2-warning, #c27b00);
  background: color-mix(in srgb, var(--v2-warning, #c27b00) 16%, transparent);
}

.v2-domain-cell.is-mail-active {
  padding: 0.18rem 0.38rem;
  margin: -0.18rem -0.38rem;
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--v2-success, #1f8f4d) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v2-success, #1f8f4d) 18%, transparent);
}

.v2-domain-cell.is-mail-warning {
  padding: 0.18rem 0.38rem;
  margin: -0.18rem -0.38rem;
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--v2-warning, #c27b00) 9%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v2-warning, #c27b00) 16%, transparent);
}

.v2-mail-alias-row.is-active > td {
  background: color-mix(in srgb, var(--v2-success, #1f8f4d) 10%, transparent);
}

.v2-mail-alias-row.is-stale > td {
  background: color-mix(in srgb, var(--v2-warning, #c27b00) 8%, transparent);
}

.v2-domain-cert {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.22rem;
}

.v2-domain-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.42rem;
}

.v2-domain-info-item {
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--v2-surface-2, var(--v2-surface-muted)) 88%, transparent);
  padding: 0.42rem 0.5rem;
  min-width: 0;
}

.v2-domain-info-label {
  font-size: 0.6rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--v2-text-muted);
}

.v2-domain-info-value {
  margin-top: 0.12rem;
  font-size: 0.76rem;
  font-weight: 620;
  line-height: 1.24;
  color: var(--v2-text);
  word-break: break-word;
}

.v2-status-code-table code {
  font-size: 0.72rem;
  font-weight: 700;
}

.v2-status-code-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0.08rem 0.14rem 0.08rem 0;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  background: color-mix(in srgb, var(--v2-surface-muted) 84%, transparent);
}

.v2-status-code-inline--inspectable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.v2-status-code-inline--inspectable:hover,
.v2-status-code-inline--inspectable:focus {
  border-color: color-mix(in srgb, var(--v2-primary) 55%, var(--v2-border-subtle, var(--v2-border)));
  background: color-mix(in srgb, var(--v2-primary) 14%, var(--v2-surface-muted));
  outline: none;
}

.v2-status-code-inline--inspectable.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.v2-status-code {
  font-family: var(--tblr-font-monospace, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  font-size: 0.69rem;
  font-weight: 720;
  letter-spacing: 0.02em;
  color: var(--v2-text);
}

.v2-status-count {
  font-size: 0.69rem;
  font-weight: 620;
  color: var(--v2-text-muted);
}

.v2-domain-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.4rem;
}

.v2-domain-kpi-card {
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--v2-surface-2, var(--v2-surface-muted)) 88%, transparent);
  padding: 0.35rem 0.45rem;
  min-width: 0;
}

.v2-domain-kpi-label {
  font-size: 0.58rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--v2-text-muted);
  line-height: 1.1;
}

.v2-domain-kpi-value {
  margin-top: 0.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--v2-text);
  line-height: 1.2;
  word-break: break-word;
}

.v2-domain-meta-table .v2-domain-meta-th {
  width: 1%;
  white-space: nowrap;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--v2-text-muted);
  font-weight: 700;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.v2-domain-meta-table .v2-domain-meta-td {
  font-size: 0.75rem;
  font-weight: 580;
  color: var(--v2-text);
  word-break: break-word;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.v2-cert-action {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.05;
}

.v2-cert-action small {
  font-size: 0.64rem;
}

.v2-domain-https-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-height: var(--v2-control-h-sm);
  padding: 0.08rem 0.34rem;
  border-radius: 0.62rem;
  border: 1px solid var(--v2-border);
  background: color-mix(in srgb, var(--v2-surface-muted) 92%, transparent);
  white-space: nowrap;
  user-select: none;
}

.v2-domain-https-toggle.is-pending {
  opacity: 0.78;
}

.v2-domain-https-toggle:hover {
  border-color: color-mix(in srgb, var(--v2-accent) 34%, var(--v2-border));
}

.v2-domain-https-label {
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-text-muted);
}

.v2-domain-https-toggle .form-switch {
  display: inline-flex;
  align-items: center;
  padding-left: 0;
  min-height: 0;
}

.v2-domain-https-toggle .form-check-input {
  float: none;
  margin: 0;
}

.v2-domain-https-toggle .form-check-input.v2-domain-https-switch {
  --sw-w: 2.25rem;
  --sw-h: 1.12rem;
  -webkit-appearance: none;
  appearance: none;
  width: var(--sw-w);
  min-width: var(--sw-w);
  height: var(--sw-h);
  border-radius: 999px;
  border: 1px solid var(--v2-border);
  background: color-mix(in srgb, var(--v2-text-muted) 18%, var(--v2-surface));
  background-image: none;
  box-shadow: none;
  position: relative;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.v2-domain-https-toggle .form-check-input.v2-domain-https-switch::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: calc(var(--sw-h) - 4px);
  height: calc(var(--sw-h) - 4px);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.v2-domain-https-toggle .form-check-input.v2-domain-https-switch:checked {
  background: color-mix(in srgb, var(--v2-accent) 72%, var(--v2-surface));
  border-color: color-mix(in srgb, var(--v2-accent) 52%, var(--v2-border));
}

html[data-theme-base="stone"] .v2-domain-https-toggle .form-check-input.v2-domain-https-switch:checked,
html[data-theme="dark"][data-theme-base="stone"] .v2-domain-https-toggle .form-check-input.v2-domain-https-switch:checked {
  background: color-mix(in srgb, var(--v2-accent) 84%, var(--v2-surface));
  border-color: color-mix(in srgb, var(--v2-accent) 64%, var(--v2-border));
  box-shadow:
    0 0 0 0.14rem color-mix(in srgb, var(--v2-accent) 22%, transparent),
    inset 0 0 0 0.32rem color-mix(in srgb, var(--v2-accent) 26%, transparent);
}

.v2-domain-https-toggle .form-check-input.v2-domain-https-switch:checked::after {
  transform: translateX(calc(var(--sw-w) - var(--sw-h)));
}

.v2-domain-https-toggle .form-check-input.v2-domain-https-switch:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--v2-accent) 52%, transparent);
  outline-offset: 2px;
}

.v2-domain-https-toggle .form-check-input.v2-domain-https-switch:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.multi-plan-domain .v2-domain-cell {
  margin-bottom: 0.08rem;
}

#multiDeployDomainsTable tbody td:nth-child(2),
#multiDeployDomainsTable tbody td:nth-child(3) {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#multiDeploySelectListPanel,
#deploySelectListPanel {
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  border-radius: 0.56rem;
  background: var(--v2-surface-2, var(--v2-surface-muted));
  padding: 0.42rem;
}

.multi-switch-row .form-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding-left: 0;
  min-height: 1.72rem;
}

.multi-switch-row .form-switch .form-check-input {
  float: none;
  margin: 0;
  width: 2.1rem;
  min-width: 2.1rem;
  height: 1.12rem;
  border-radius: 999px;
}

.form-control,
.form-select,
.btn,
.dropdown-menu,
.modal-content {
  border-radius: var(--v2-radius-md);
}

.form-control,
.form-select {
  border-color: #cdd8e8;
  min-height: 1.72rem;
  padding: 0.16rem 0.44rem;
  font-size: 0.76rem;
}

.form-control[type="file"] {
  padding: 0.1rem 0.28rem;
  line-height: 1.2;
}

.form-control[type="file"]::file-selector-button {
  border: 1px solid #b8cbf9;
  border-radius: 0.48rem;
  padding: 0.14rem 0.46rem;
  margin-right: 0.42rem;
  background: #ffffff;
  color: #2b5fde;
  font-weight: 620;
  cursor: pointer;
}

.form-control.form-control-sm,
.form-select.form-select-sm {
  min-height: 1.48rem;
  font-size: 0.68rem;
  padding: 0.1rem 0.34rem;
}

textarea.form-control {
  min-height: 5.4rem;
  padding-top: 0.46rem;
}

.btn {
  min-height: 1.64rem;
  padding: 0.14rem 0.46rem;
  font-weight: 650;
  font-size: 0.72rem;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.btn.btn-sm {
  min-height: 1.38rem;
  padding: 0.08rem 0.34rem;
  font-size: 0.64rem;
}

.btn-group.btn-group-sm .btn {
  min-height: 1.38rem;
  padding: 0.08rem 0.34rem;
}

.table tbody td .btn.btn-sm {
  min-height: 1.58rem;
  padding: 0.11rem 0.4rem;
  font-size: 0.73rem;
}

.table tbody td .btn.btn-sm .ti {
  font-size: 0.82rem;
}

.v2-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.v2-toolbar .form-control,
.v2-toolbar .form-select {
  min-width: 8.4rem;
}

.v2-toolbar > .btn {
  white-space: nowrap;
}

.files-global-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.44rem;
}

.files-inline-control {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.files-inline-control .form-label {
  margin: 0;
  white-space: nowrap;
}

.files-inline-control .form-select {
  min-width: 7rem;
}

.files-empty-state {
  border: 1px dashed color-mix(in srgb, var(--v2-border-subtle, var(--v2-border)) 82%, transparent);
  border-radius: 0.56rem;
  padding: 0.72rem;
  background: color-mix(in srgb, var(--v2-surface-2, var(--v2-surface-muted)) 86%, transparent);
  color: var(--v2-text-muted);
  font-size: 0.72rem;
}

.files-op-status {
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  border-radius: 0.72rem;
  padding: 0.56rem 0.62rem;
  background: color-mix(in srgb, var(--v2-surface-1, var(--v2-surface)) 92%, transparent);
  color: var(--v2-text);
  box-shadow: var(--v2-shadow-soft);
  margin-bottom: 0.75rem;
}

.files-op-status--global {
  margin: 0.62rem 0 0;
}

.files-op-status__head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.files-op-status__title {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  flex: 1 1 16rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.files-op-status__meta {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--v2-text-muted);
  flex: 1 1 100%;
  min-width: 0;
  margin-left: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.files-op-status__actions {
  margin-left: auto;
  flex: 0 0 auto;
}

.files-op-status__progress {
  margin-top: 0.48rem;
  height: 0.56rem;
}

.files-op-status.is-indeterminate .progress-bar {
  width: 55% !important;
  background-color: var(--v2-primary);
  background-image: linear-gradient(
    90deg,
    color-mix(in srgb, var(--v2-primary) 10%, transparent) 0%,
    color-mix(in srgb, var(--v2-primary) 70%, transparent) 35%,
    color-mix(in srgb, var(--v2-primary) 10%, transparent) 70%,
    color-mix(in srgb, var(--v2-primary) 10%, transparent) 100%
  );
  background-size: 200% 100%;
  animation: v2-files-indeterminate 1.1s linear infinite;
}

@keyframes v2-files-indeterminate {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.files-manager-card .files-pane {
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  border-radius: 0.56rem;
  padding: 0.56rem;
  background: var(--v2-surface-1, var(--v2-surface));
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.files-manager-card .files-pane.files-pane-active {
  border-color: color-mix(in srgb, var(--v2-primary) 52%, var(--v2-border-subtle, var(--v2-border)));
  box-shadow: 0 0 0 0.14rem color-mix(in srgb, var(--v2-primary) 18%, transparent);
}

.files-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.files-pane-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--v2-text-muted);
}

.files-owner-select {
  min-width: 11.5rem;
}

.files-tools-toggle {
  min-width: 4.2rem;
}

.files-pane-tools {
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  border-radius: 0.5rem;
  padding: 0.5rem;
  background: color-mix(in srgb, var(--v2-surface-2, var(--v2-surface-muted)) 86%, transparent);
}

.files-tools-subtitle {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--v2-text-muted);
}

.files-extract-tools {
  border: 1px dashed color-mix(in srgb, var(--v2-border-subtle, var(--v2-border)) 78%, transparent);
  border-radius: 0.5rem;
  padding: 0.42rem;
  background: color-mix(in srgb, var(--v2-surface-1, var(--v2-surface)) 72%, transparent);
}

.files-extract-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.files-extract-source-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.files-extract-source-row .form-control {
  flex: 1 1 14rem;
  min-width: 0;
}

.files-extract-dest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.4rem;
}

.files-extract-dest-row .form-control {
  min-width: 0;
}

@media (max-width: 1400px) {
  .files-extract-dest-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .files-extract-dest-row .form-check {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .files-extract-source-row {
    flex-direction: column;
    align-items: stretch;
  }

  .files-extract-source-row .btn {
    width: 100%;
  }

  .files-extract-dest-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .files-extract-dest-row .btn {
    width: 100%;
  }
}

.files-pane-table {
  max-height: 21rem;
  overflow: auto;
}

.files-pane .table tbody tr[data-drag-path] {
  cursor: grab;
}

.files-pane .table tbody tr.files-selected {
  background: color-mix(in srgb, var(--v2-primary) 10%, transparent);
}

.files-pane.files-drop-active {
  border-color: color-mix(in srgb, var(--v2-primary) 56%, var(--v2-border-subtle, var(--v2-border)));
  box-shadow: 0 0 0 0.15rem color-mix(in srgb, var(--v2-primary) 16%, transparent);
}

.files-pane .table tbody tr.files-drop-target {
  background: rgba(55, 160, 116, 0.12);
}

.files-read-viewer {
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  border-radius: 0.56rem;
  background: var(--v2-surface-1, var(--v2-surface));
  min-height: 0;
}

.files-read-viewer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.56rem;
  border-bottom: 1px solid var(--v2-border-subtle, var(--v2-border));
}

.files-read-viewer__title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--v2-text);
}

.files-dnd-menu {
  position: fixed;
  z-index: 1200;
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.4rem;
  border-radius: 0.5rem;
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  background: var(--v2-surface-1, var(--v2-surface));
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.28);
}

.table .d-flex {
  gap: 0.2rem;
}

.table-check-cell {
  width: 2.1rem;
  min-width: 2.1rem;
  text-align: center;
  vertical-align: middle;
  padding-inline: 0.34rem !important;
}

.table-check-cell .form-check-input {
  float: none;
  margin: 0 auto !important;
}

.badge {
  font-weight: 650;
  letter-spacing: 0.01em;
}

.form-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--v2-text-muted);
  margin-bottom: 0.16rem;
}

.form-check-label {
  color: var(--v2-text);
  font-size: 0.72rem;
}

.form-check-input {
  width: 0.94rem;
  height: 0.94rem;
  margin-top: 0.08rem;
  border-color: var(--v2-border-strong, var(--v2-border));
  background-color: var(--v2-surface-1, var(--v2-surface));
  box-shadow: none !important;
}

.form-check-input:focus {
  border-color: color-mix(in srgb, var(--v2-primary) 46%, var(--v2-border-subtle, var(--v2-border)));
  box-shadow: 0 0 0 0.14rem color-mix(in srgb, var(--v2-primary) 20%, transparent) !important;
}

.form-check-input:checked {
  background-color: var(--v2-primary);
  border-color: var(--v2-primary);
}

.form-check-input:indeterminate {
  background-color: var(--v2-primary);
  border-color: var(--v2-primary);
}

.form-check-input:disabled {
  border-color: var(--v2-border-subtle, var(--v2-border));
  background-color: var(--v2-surface-2, var(--v2-surface-muted));
  opacity: 0.72;
}

/* Stone theme: make switches feel clearly on/off (stronger green "track" when enabled). */
html[data-theme-base="stone"] .form-switch .form-check-input {
  border-color: color-mix(in srgb, var(--v2-border) 78%, var(--v2-text-muted));
  background-color: color-mix(in srgb, var(--v2-text-muted) 16%, var(--v2-surface));
}

html[data-theme-base="stone"] .form-switch .form-check-input:checked {
  background-color: color-mix(in srgb, var(--v2-primary) 88%, var(--v2-surface));
  border-color: color-mix(in srgb, var(--v2-primary) 70%, var(--v2-border));
  box-shadow:
    0 0 0 0.14rem color-mix(in srgb, var(--v2-primary) 22%, transparent),
    inset 0 0 0 0.32rem color-mix(in srgb, var(--v2-primary-2) 22%, transparent) !important;
}

html[data-theme="dark"][data-theme-base="stone"] .form-switch .form-check-input {
  border-color: color-mix(in srgb, var(--v2-border) 84%, var(--v2-text-muted));
  background-color: color-mix(in srgb, var(--v2-surface) 84%, var(--v2-text-muted));
}

html[data-theme="dark"][data-theme-base="stone"] .form-switch .form-check-input:checked {
  background-color: color-mix(in srgb, var(--v2-primary) 84%, var(--v2-surface));
  border-color: color-mix(in srgb, var(--v2-primary) 70%, var(--v2-border));
  box-shadow:
    0 0 0 0.14rem color-mix(in srgb, var(--v2-primary) 24%, transparent),
    inset 0 0 0 0.32rem color-mix(in srgb, var(--v2-primary-2) 24%, transparent) !important;
}

.deploy-archive-picker {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.deploy-archive-picker .deploy-file-display {
  min-width: 0;
  flex: 1 1 auto;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  cursor: pointer;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.deploy-archive-picker .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.deploy-file-input {
  cursor: pointer;
}

.deploy-file-input::file-selector-button {
  border: 1px solid #b8cbf9;
  border-radius: 0.48rem;
  padding: 0.14rem 0.46rem;
  margin-right: 0.42rem;
  background: #ffffff;
  color: #2b5fde;
  font-weight: 620;
  cursor: pointer;
}

.deploy-file-input::-webkit-file-upload-button,
.form-control[type="file"]::-webkit-file-upload-button {
  border: 1px solid #b8cbf9;
  border-radius: 0.48rem;
  padding: 0.14rem 0.46rem;
  margin-right: 0.42rem;
  background: #ffffff;
  color: #2b5fde;
  font-weight: 620;
  cursor: pointer;
}

.quick-archive-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
}

.quick-archive-checks .form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  white-space: nowrap;
}

.deploy-storage-folder-mode .form-label {
  font-size: 0.72rem;
  color: var(--v2-text-muted);
}

.deploy-storage-folder-mode .form-select {
  min-height: var(--v2-control-h);
}

.form-control:focus,
.form-select:focus {
  border-color: color-mix(in srgb, var(--v2-primary) 46%, var(--v2-border-subtle));
  box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--v2-primary) 22%, transparent);
}

.btn-primary {
  background: linear-gradient(180deg, var(--v2-primary-2) 0%, var(--v2-primary) 100%);
  border-color: color-mix(in srgb, var(--v2-primary) 86%, #000);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--v2-primary) 26%, transparent);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(180deg, var(--v2-primary-2) 0%, var(--v2-primary) 100%);
  border-color: color-mix(in srgb, var(--v2-primary) 86%, #000);
  box-shadow: 0 6px 12px color-mix(in srgb, var(--v2-primary) 28%, transparent);
  transform: translateY(-0.5px);
}

.btn-outline-primary {
  color: var(--v2-primary);
  border-color: color-mix(in srgb, var(--v2-primary) 32%, var(--v2-border-subtle));
  background: #fff;
}

.btn-outline-primary:hover {
  color: #fff;
  background: var(--v2-primary);
  border-color: var(--v2-primary);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--v2-primary) 26%, transparent);
}

.btn-outline-danger {
  border-color: #efb4b4;
  color: #b84343;
  background: #fff;
}

.btn-outline-danger:hover {
  background: #cc3f3f;
  border-color: #cc3f3f;
  color: #fff;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.92;
}

.progress {
  height: 0.74rem;
  border-radius: 999px;
  /* Avoid Tabler's inset shadow and light track bleeding through rounded corners. */
  background: var(--v2-surface-3, var(--v2-surface-muted));
  background: color-mix(in srgb, var(--v2-surface-3) 72%, transparent);
  box-shadow: none;
  overflow: hidden;
}

.progress .progress-bar {
  border-radius: inherit;
  font-size: 0.6rem;
  font-weight: 700;
  box-shadow: none;
}

.v2-global-loader {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  margin: 0;
  padding: 0.1rem 0.44rem;
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--v2-surface-1, var(--v2-surface)) 92%, transparent);
  color: var(--v2-text);
  font-size: 0.62rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  line-height: 1;
  white-space: nowrap;
}

.v2-global-loader .spinner-border {
  width: 0.72rem;
  height: 0.72rem;
  border-width: 0.11rem;
}

.v2-toast-stack {
  position: fixed;
  right: 0.8rem;
  bottom: 0.8rem;
  width: min(24rem, calc(100vw - 1rem));
  max-height: min(68vh, 34rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
  z-index: 1060;
  pointer-events: none;
}

.v2-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.44rem;
  padding: 0.5rem 0.56rem;
  border: 1px solid #d4e1f5;
  border-left-width: 0.24rem;
  border-radius: 0.66rem;
  background: rgba(255, 255, 255, 0.98);
  color: #233b61;
  box-shadow: 0 10px 20px rgba(19, 40, 74, 0.16);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.v2-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.v2-toast.is-closing {
  opacity: 0;
  transform: translateY(12px);
}

.v2-toast__text {
  flex: 1 1 auto;
  font-size: 0.72rem;
  line-height: 1.34;
}

.v2-toast__close {
  border: 0;
  background: transparent;
  color: #6f84ab;
  padding: 0.02rem;
  line-height: 1;
  border-radius: 0.32rem;
}

.v2-toast__close:hover,
.v2-toast__close:focus {
  color: #3a5789;
  background: rgba(102, 136, 199, 0.14);
}

.v2-toast--info {
  border-left-color: #567fe0;
}

.v2-toast--success {
  border-left-color: #2da36b;
}

.v2-toast--warning {
  border-left-color: #c98b2e;
}

.v2-toast--danger {
  border-left-color: #d05555;
}

.v2-preview-thumb {
  width: 72px;
  height: 44px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
}

.v2-preview-thumb-sm {
  width: 62px;
  height: 38px;
}

.preview-lightbox-dialog {
  max-width: min(1240px, 86vw);
}

.preview-lightbox-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42vh;
}

.preview-lightbox-image {
  max-width: 100%;
  max-height: min(72vh, 820px);
  object-fit: contain;
  border-radius: 0.58rem;
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  background: var(--v2-surface-2, var(--v2-surface-muted));
}

.v2-stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.v2-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  border: 1px solid color-mix(in srgb, var(--v2-border-subtle) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--v2-surface-2) 92%, transparent);
  color: color-mix(in srgb, var(--v2-text-muted) 92%, transparent);
  padding: 0.14rem 0.44rem;
  font-size: 0.7rem;
}

.v2-stat-chip strong {
  color: var(--v2-text);
}

.v2-stat-card {
  border: 1px solid var(--v2-border-subtle);
  border-radius: 0.72rem;
  background: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
  padding: 0.4rem 0.52rem;
}

.v2-stat-label {
  color: var(--v2-text-muted);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.v2-stat-value {
  color: var(--v2-text);
  font-size: 1.02rem;
  font-weight: 800;
}

.v2-log-error {
  border: 1px solid var(--v2-border-subtle, var(--v2-border));
  border-radius: 0.56rem;
  background: var(--v2-surface-1, var(--v2-surface));
  padding: 0.3rem 0.42rem;
  margin-bottom: 0.34rem;
}

.v2-log-error summary {
  cursor: pointer;
  color: #c03838;
  font-size: 0.7rem;
  font-weight: 620;
}

.v2-log-cell {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
}

.v2-log-cell__meta {
  font-size: 0.7rem;
  color: var(--v2-text-muted);
  line-height: 1.2;
}

.v2-log-badge .ti {
  font-size: 0.88em;
}

.v2-log-action {
  display: inline-block;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--v2-text) 85%, transparent);
  background: color-mix(in srgb, var(--v2-surface-2) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--v2-border-subtle) 92%, transparent);
  padding: 0.12rem 0.34rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.v2-log-summary {
  display: inline-block;
  max-width: 100%;
}

.v2-log-created {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: color-mix(in srgb, var(--v2-text) 78%, transparent);
}

.v2-log-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.7rem;
  font-weight: 650;
}

.v2-log-mini .ti {
  font-size: 0.92em;
}

body[data-page="logs"] #logsTable tbody tr.v2-log-row--error td {
  background: color-mix(in srgb, var(--v2-danger) 10%, transparent);
}

body[data-page="logs"] #logsTable tbody tr.v2-log-row--error td:first-child {
  box-shadow: inset 0.22rem 0 0 var(--v2-danger);
}

body[data-page="logs"] #logsTable tbody tr.v2-log-row--warning td {
  background: color-mix(in srgb, var(--v2-warning) 14%, transparent);
}

body[data-page="logs"] #logsTable tbody tr.v2-log-row--warning td:first-child {
  box-shadow: inset 0.22rem 0 0 var(--v2-warning);
}

body[data-page="logs"] #logsTable tbody tr.v2-log-row--info td:first-child {
  box-shadow: inset 0.22rem 0 0 color-mix(in srgb, var(--v2-primary) 70%, transparent);
}

body[data-page="logs"] #logsTable tbody tr.v2-log-row--debug {
  opacity: 0.9;
}

body[data-page="logs"] #logsTable tbody tr.v2-log-row--debug td {
  color: color-mix(in srgb, var(--v2-text-muted) 92%, transparent);
}

.nav-tabs {
  border-bottom-color: var(--v2-border-subtle);
}

.nav-tabs .nav-link {
  border-radius: 0.7rem 0.7rem 0 0;
  color: var(--v2-text-muted);
  font-weight: 660;
  border-color: transparent;
}

.nav-tabs .nav-link:hover {
  color: var(--v2-text);
  border-color: transparent;
  background: color-mix(in srgb, var(--v2-surface-2) 78%, transparent);
}

.nav-tabs .nav-link.active {
  color: var(--v2-text);
  background: var(--v2-surface-1);
  border-color: var(--v2-border-subtle) var(--v2-border-subtle) var(--v2-surface-1);
}

.card-footer small.text-secondary {
  font-weight: 620;
  color: #5e7391 !important;
}

pre {
  margin: 0;
  padding: 0.48rem;
  border-radius: 0.56rem;
  border: 1px solid var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
  color: var(--v2-text);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.68rem;
}

#logDetailsOutput,
#taskDetailsRaw,
#fileReadOutput,
#deployMultiOutput,
#domainFileContent {
  color: var(--v2-text) !important;
}

.v2-ip {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.v2-scope-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.4rem;
  align-items: center;
}

.v2-scope-list {
  border: 1px solid var(--v2-border-subtle);
  border-radius: 0.72rem;
  background: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
  padding: 0.5rem 0.55rem;
  max-height: 14rem;
  overflow: auto;
}

.v2-scope-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.25rem;
  border-radius: 0.55rem;
  cursor: pointer;
  user-select: none;
}

.v2-scope-item:hover {
  background: color-mix(in srgb, var(--v2-surface-3) 82%, transparent);
}

.v2-scope-item input[type="checkbox"] {
  margin-top: 0;
  flex: 0 0 auto;
}

.v2-scope-item__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.v2-scope-item__title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--v2-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-scope-item__meta {
  font-size: 0.72rem;
  color: var(--v2-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-scope-empty {
  padding: 0.5rem 0.2rem;
  color: var(--v2-text-muted);
  font-size: 0.8rem;
}

.v2-users-servers {
  display: inline-block;
  max-width: 18rem;
  vertical-align: bottom;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-task-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.v2-task-meta {
  border: 1px solid var(--v2-border-subtle);
  border-radius: 0.72rem;
  background: color-mix(in srgb, var(--v2-surface-2) 82%, transparent);
  padding: 0.56rem 0.6rem;
}

.v2-task-meta__title {
  font-size: 0.7rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  color: var(--v2-text);
}

.v2-task-meta__rows {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.v2-task-meta__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.v2-task-meta__key {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--v2-text-muted);
}

.v2-task-meta__value {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--v2-text);
  text-align: right;
  word-break: break-word;
}

.v2-task-meta__value code {
  font-size: 0.64rem;
  padding: 0.08rem 0.22rem;
  border-radius: 0.42rem;
  border: 1px solid var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-1) 76%, transparent);
  color: inherit;
}

.v2-task-log-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.42rem;
}

.v2-task-log-search {
  flex: 1 1 14rem;
  min-width: 12rem;
}

.v2-task-log-follow {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding-left: 0;
}

.v2-task-log-follow .form-check-input {
  float: none;
  margin-left: 0;
}

.v2-task-log-status {
  margin-left: auto;
  white-space: nowrap;
}

.v2-task-log-view {
  border: 1px solid var(--v2-border-subtle);
  border-radius: 0.72rem;
  background: color-mix(in srgb, var(--v2-surface-2) 74%, transparent);
  height: clamp(16rem, 54vh, 34rem);
  overflow: auto;
  padding: 0.5rem 0.55rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--v2-text);
  white-space: pre;
}

.v2-task-log-line {
  display: flex;
  gap: 0.6rem;
  padding: 0.12rem 0.12rem;
  border-radius: 0.46rem;
}

.v2-task-log-line:hover {
  background: color-mix(in srgb, var(--v2-surface-3) 62%, transparent);
}

.v2-task-log-idx {
  flex: 0 0 auto;
  width: 4.75rem;
  text-align: right;
  color: var(--v2-text-dim);
  font-variant-numeric: tabular-nums;
}

.v2-task-log-text {
  min-width: 0;
}

.v2-task-log-match {
  background: color-mix(in srgb, var(--v2-primary) 18%, transparent);
  border-radius: 0.26rem;
  padding: 0 0.08rem;
  color: inherit;
}

.v2-task-log-hint {
  margin-top: 0.34rem;
  min-height: 1rem;
}

/* Task details modal header includes extra actions; keep the close button in-flow.
   Tabler theme may position `.modal-header .btn-close` absolutely which causes overlap. */
#taskDetailsModal .modal-header .btn-close {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: auto !important;
  flex: 0 0 auto;
}

@media (max-width: 992px) {
  .v2-task-details-grid {
    grid-template-columns: 1fr;
  }

  .v2-task-log-status {
    width: 100%;
    margin-left: 0;
  }

  .v2-task-log-view {
    height: min(58vh, 34rem);
    white-space: pre-wrap;
  }
}

#domainFileContent {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  line-height: 1.38;
}

#domainFilesTable tbody tr {
  cursor: pointer;
}

#domainFilesModal .modal-dialog {
  width: min(1420px, 96vw);
  max-width: min(1420px, 96vw);
  margin: clamp(0.6rem, 2.6vh, 1.25rem) auto;
  height: calc(100dvh - clamp(1.2rem, 5.2vh, 2.5rem));
  display: flex;
  align-items: stretch;
}

#domainFilesModal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: none;
  height: 100%;
  overflow: hidden;
}

#domainFilesModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

#domainFilesModal .modal-body > .row.row-cards {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#domainFilesModal .modal-body > .row.row-cards > [class^="col-"],
#domainFilesModal .modal-body > .row.row-cards > [class*=" col-"] {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#domainFilesModal .modal-body > .row.row-cards > [class^="col-"] > .card,
#domainFilesModal .modal-body > .row.row-cards > [class*=" col-"] > .card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#domainFilesModal .card-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#domainFilesTableWrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#domainFilesModal #domainFileContent {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

#domainFilesModal.modal {
  overflow-y: auto !important;
}

@media (max-width: 991.98px) {
  #domainFilesModal .modal-dialog {
    width: calc(100vw - 0.8rem);
    max-width: calc(100vw - 0.8rem);
    margin: 0.4rem auto;
    height: calc(100dvh - 0.8rem);
  }

  #domainFilesModal .modal-body > .row.row-cards {
    overflow: auto;
  }

  #domainFilesModal .modal-body > .row.row-cards > [class^="col-"],
  #domainFilesModal .modal-body > .row.row-cards > [class*=" col-"] {
    height: auto;
    min-height: 42%;
    overflow: visible;
  }
}

.list-group-item {
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface-1);
  color: var(--v2-text);
}

.list-group-item.active {
  color: var(--v2-text);
  border-color: color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
  background: color-mix(in srgb, var(--v2-primary) 18%, var(--v2-surface-1));
}

.modal-content {
  border: 1px solid var(--v2-border-strong);
  border-radius: var(--v2-radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(9, 23, 50, 0.18);
}

.modal-dialog {
  margin: clamp(1rem, 5vh, 3.4rem) auto;
}

.modal-dialog.modal-lg {
  max-width: min(920px, 88vw);
}

.modal-dialog.modal-xl {
  max-width: min(1180px, 90vw);
}

.modal-dialog.modal-full-width {
  width: auto;
  max-width: min(1380px, 90vw);
}

.modal-header,
.modal-body,
.modal-footer {
  padding-inline: var(--v2-modal-pad-x);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  gap: var(--v2-modal-gap);
}

.modal-header {
  justify-content: space-between;
  min-height: calc(var(--v2-control-h) + 0.68rem);
  padding-top: var(--v2-modal-pad-y);
  padding-bottom: var(--v2-modal-pad-y);
  border-bottom-color: var(--v2-border-subtle);
  background: linear-gradient(180deg, var(--v2-surface-2) 0%, var(--v2-surface-1) 100%);
}

.modal-header .modal-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: var(--v2-modal-title-size);
  font-weight: 760;
  letter-spacing: 0.015em;
  line-height: 1.24;
}

.modal-header .btn-close {
  margin: 0;
  padding: 0.24rem;
  border-radius: 0.42rem;
  background-size: 0.68rem;
  opacity: 0.72;
  transition: opacity 0.14s ease, transform 0.14s ease, background-color 0.14s ease;
}

.modal-header .btn-close:hover,
.modal-header .btn-close:focus {
  opacity: 1;
  background-color: color-mix(in srgb, var(--v2-primary) 12%, transparent);
  transform: scale(1.03);
}

.modal-body {
  padding-top: var(--v2-modal-pad-y);
  padding-bottom: calc(var(--v2-modal-pad-y) + 0.06rem);
}

.modal-footer {
  justify-content: flex-end;
  padding-top: calc(var(--v2-modal-pad-y) - 0.04rem);
  padding-bottom: calc(var(--v2-modal-pad-y) - 0.02rem);
  border-top-color: var(--v2-border-subtle);
  background: var(--v2-surface-2);
}

.modal-footer .btn {
  min-width: 7rem;
}

html[data-theme="dark"] {
  --v2-bg-0: #0f1628;
  --v2-bg-1: #122036;
  --v2-page-bg: #070b14;
  --v2-surface: #101a2d;
  --v2-surface-muted: #132038;
  --v2-topbar-bg: color-mix(in srgb, #0b162b 86%, transparent);
  --v2-topbar-border: var(--v2-border-subtle, #2c4466);
  --v2-border: #263754;
  --v2-text: #d7e2f5;
  --v2-text-muted: #8fa4c8;
  --v2-topbar-text: #cfddf5;
  --v2-primary: #4f82ff;
  --v2-primary-2: #6a98ff;
  --v2-sidebar-start: #090f1c;
  --v2-sidebar-end: #111d34;
  --v2-sidebar-active: rgba(99, 148, 255, 0.32);
  --v2-selection-bg: rgba(106, 152, 255, 0.58);
  --v2-selection-text: #061225;
  --v2-shadow-soft: 0 14px 28px rgba(0, 0, 0, 0.34);
  --v2-shadow-strong: 0 18px 44px rgba(0, 0, 0, 0.56);
  --v2-shadow-sticky: 0 0.55rem 0.75rem -0.65rem rgba(0, 0, 0, 0.62);

  --tblr-secondary-rgb: 162,182,214;
  --tblr-blue-rgb: 79,130,255;
  --tblr-info: var(--v2-primary);
  --tblr-info-rgb: 79,130,255;
  --tblr-azure: var(--v2-primary);
  --tblr-azure-rgb: 79,130,255;
}

html[data-theme="dark"] body {
  color: var(--v2-text);
  background: var(--v2-page-bg);
}

html[data-theme="dark"] .v2-sidebar {
  border-right-color: color-mix(in srgb, var(--v2-border-subtle) 46%, transparent);
  box-shadow: 0 22px 44px rgba(2, 6, 14, 0.58);
}

html[data-theme="dark"] .v2-sidebar .navbar-brand {
  color: var(--v2-text);
}

html[data-theme="dark"] .v2-sidebar .nav-link {
  color: color-mix(in srgb, var(--v2-text) 82%, transparent);
}

html[data-theme="dark"] .v2-sidebar .nav-link:hover {
  background: color-mix(in srgb, var(--v2-accent) 18%, transparent);
}

html[data-theme="dark"] .v2-sidebar .nav-link.active {
  background: color-mix(in srgb, var(--v2-accent) 24%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v2-accent) 46%, transparent);
}

html[data-theme="dark"] .app-topbar {
  background: var(--v2-topbar-bg);
  border-bottom-color: var(--v2-topbar-border) !important;
}

html[data-theme="dark"] .app-topbar .navbar-text,
html[data-theme="dark"] .app-topbar .nav-link {
  color: var(--v2-topbar-text) !important;
}

html[data-theme="dark"] .form-check-input {
  border-color: var(--v2-border-subtle);
  background-color: var(--v2-surface-1);
}

html[data-theme="dark"] .form-check-input:checked {
  border-color: var(--v2-primary);
  background-color: var(--v2-primary);
}

html[data-theme="dark"] .form-check-input:indeterminate {
  border-color: var(--v2-primary);
  background-color: var(--v2-primary);
}

html[data-theme="dark"] .form-check-input:focus {
  box-shadow: 0 0 0 0.14rem color-mix(in srgb, var(--v2-primary) 24%, transparent) !important;
}

html[data-theme="dark"] .form-check-input:disabled {
  border-color: #314763;
  background-color: #16253b;
  opacity: 0.66;
}

html[data-theme="dark"] .deploy-file-input::file-selector-button {
  border-color: color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
  background: var(--v2-surface-2);
  color: var(--v2-text);
}

html[data-theme="dark"] .deploy-file-input::-webkit-file-upload-button,
html[data-theme="dark"] .form-control[type="file"]::-webkit-file-upload-button {
  border-color: color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
  background: var(--v2-surface-2);
  color: var(--v2-text);
}

html[data-theme="dark"] .form-control[type="file"] {
  background: var(--v2-surface-1);
  border-color: var(--v2-border-subtle);
  color: var(--v2-text);
  color-scheme: dark;
}

html[data-theme="dark"] .form-control[type="file"]::file-selector-button {
  border-color: color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
  background: var(--v2-surface-2);
  color: var(--v2-text);
}

html[data-theme="dark"] .card {
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface-1);
  box-shadow: 0 14px 28px rgba(2, 8, 20, 0.34);
}

html[data-theme="dark"] .card .card-header {
  background: linear-gradient(180deg, var(--v2-surface-2) 0%, var(--v2-surface-1) 100%);
  border-bottom-color: var(--v2-border-subtle);
}

html[data-theme="dark"] .card .card-title {
  color: var(--v2-text);
}

html[data-theme="dark"] .card .card-footer {
  border-top-color: var(--v2-border-subtle);
  background: var(--v2-surface-2);
}

html[data-theme="dark"] .table thead th {
  background: var(--v2-surface-2);
  color: var(--v2-text-dim);
  border-bottom-color: var(--v2-border-subtle);
}

html[data-theme="dark"] .table tbody td {
  color: var(--v2-text);
}

html[data-theme="dark"] .v2-domain-name {
  color: var(--v2-text);
  font-weight: 690;
}

html[data-theme="dark"] .v2-domain-title {
  color: var(--v2-text-muted);
}

html[data-theme="dark"] #serversTable tbody td:nth-child(1),
html[data-theme="dark"] #dashboardTasksTable tbody td:nth-child(1),
html[data-theme="dark"] #tasksTable tbody td:nth-child(1),
html[data-theme="dark"] #deployRecentTasksTable tbody td:nth-child(1),
html[data-theme="dark"] #multiDeployRecentTasksTable tbody td:nth-child(1),
html[data-theme="dark"] #filesLeftTable tbody td:nth-child(2),
html[data-theme="dark"] #filesRightTable tbody td:nth-child(2),
html[data-theme="dark"] #domainFilesTable tbody td:nth-child(1),
html[data-theme="dark"] #multiSourceLocalTable tbody td:nth-child(1),
html[data-theme="dark"] #multiSourceRemoteTable tbody td:nth-child(1),
html[data-theme="dark"] #deployStoragePickerTable tbody td:nth-child(2),
html[data-theme="dark"] #usersTable tbody td:nth-child(1),
html[data-theme="dark"] #usersTable tbody td:nth-child(2) {
  color: var(--v2-primary-2);
}

html[data-theme="dark"] .table tbody tr:hover {
  background: color-mix(in srgb, var(--v2-primary) 16%, transparent);
}

html[data-theme="dark"] .files-manager-card .files-pane {
  background: rgba(27, 42, 66, 0.7);
  border-color: rgba(104, 137, 194, 0.42);
}

html[data-theme="dark"] .files-manager-card .files-pane.files-pane-active {
  border-color: color-mix(in srgb, var(--v2-primary) 46%, var(--v2-border-subtle));
  box-shadow: 0 0 0 0.15rem color-mix(in srgb, var(--v2-primary) 26%, transparent);
}

html[data-theme="dark"] .files-pane-title {
  color: #9ab4e8;
}

html[data-theme="dark"] .files-pane-tools {
  border-color: #2f4b79;
  background: rgba(16, 28, 46, 0.75);
}

html[data-theme="dark"] .files-tools-subtitle {
  color: #9ab3dd;
}

html[data-theme="dark"] .files-extract-tools {
  border-color: #36547f;
  background: rgba(13, 24, 42, 0.64);
}

html[data-theme="dark"] .files-op-status {
  border-color: #2f4b79;
  background: rgba(16, 28, 46, 0.75);
  color: #dbe7ff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .files-op-status__meta {
  color: #9ab4e8;
}

html[data-theme="dark"] .files-op-status .progress {
  background: rgba(11, 22, 39, 0.78);
}

html[data-theme="dark"] .progress {
  background: rgba(11, 22, 39, 0.72);
  background: color-mix(in srgb, var(--v2-surface-3) 72%, transparent);
}

html[data-theme="dark"] .files-empty-state {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 74%, transparent);
  color: var(--v2-text-muted);
}

html[data-theme="dark"] .files-pane .table tbody tr.files-selected {
  background: color-mix(in srgb, var(--v2-primary) 18%, transparent);
}

html[data-theme="dark"] .files-pane.files-drop-active {
  border-color: color-mix(in srgb, var(--v2-primary) 46%, var(--v2-border-subtle));
  box-shadow: 0 0 0 0.15rem color-mix(in srgb, var(--v2-primary) 24%, transparent);
}

html[data-theme="dark"] .files-pane .table tbody tr.files-drop-target {
  background: rgba(60, 168, 117, 0.2);
}

html[data-theme="dark"] .files-read-viewer {
  border-color: #2f4b79;
  background: rgba(16, 28, 46, 0.75);
}

html[data-theme="dark"] .files-read-viewer__header {
  border-bottom-color: #2f4b79;
}

html[data-theme="dark"] .files-read-viewer__title {
  color: #dbe7ff;
}

html[data-theme="dark"] .files-dnd-menu {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
  box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .table tbody tr + tr td {
  border-top-color: var(--v2-border-subtle);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background: var(--v2-surface-1);
  border-color: var(--v2-border-subtle);
  color: var(--v2-text);
}

html[data-theme="dark"] .form-control::placeholder {
  color: color-mix(in srgb, var(--v2-text-muted) 78%, transparent);
}

html[data-theme="dark"] .form-label,
html[data-theme="dark"] .form-check-label,
html[data-theme="dark"] .text-secondary,
html[data-theme="dark"] small.text-secondary {
  color: var(--v2-text-muted) !important;
}

html[data-theme="dark"] .btn-outline-primary {
  color: var(--v2-primary-2);
  border-color: color-mix(in srgb, var(--v2-primary) 32%, var(--v2-border-subtle));
  background: var(--v2-surface-1);
}

html[data-theme="dark"] .btn-outline-primary:hover {
  color: var(--v2-bg-0);
  background: var(--v2-primary);
  border-color: var(--v2-primary);
}

html[data-theme="dark"] .btn-outline-danger {
  color: color-mix(in srgb, var(--v2-danger) 82%, var(--v2-text));
  border-color: color-mix(in srgb, var(--v2-danger) 46%, var(--v2-border-subtle));
  background: color-mix(in srgb, var(--v2-danger) 8%, var(--v2-surface-2));
}

html[data-theme="dark"] .btn-outline-danger:hover {
  color: #fff;
  background: color-mix(in srgb, var(--v2-danger) 74%, #000);
  border-color: color-mix(in srgb, var(--v2-danger) 74%, #000);
}

html[data-theme="dark"] .badge.bg-success-lt.text-success {
  background: rgba(60, 180, 120, 0.2) !important;
  color: #97eac2 !important;
  border: 1px solid rgba(99, 224, 154, 0.42);
}

html[data-theme="dark"] .badge.bg-danger-lt.text-danger {
  background: rgba(var(--tblr-danger-rgb), 0.2) !important;
  border: 1px solid rgba(var(--tblr-danger-rgb), 0.42);
}

html[data-theme="dark"] .badge.bg-warning-lt.text-warning {
  background: rgba(var(--tblr-warning-rgb), 0.2) !important;
  border: 1px solid rgba(var(--tblr-warning-rgb), 0.42);
}

html[data-theme="dark"] .badge.bg-orange-lt.text-orange {
  background: rgba(var(--tblr-orange-rgb), 0.2) !important;
  border: 1px solid rgba(var(--tblr-orange-rgb), 0.42);
}

html[data-theme="dark"] .badge.bg-green-lt.text-green {
  background: rgba(var(--tblr-green-rgb), 0.2) !important;
  border: 1px solid rgba(var(--tblr-green-rgb), 0.42);
}

html[data-theme="dark"] .badge.bg-cyan-lt.text-cyan {
  background: rgba(var(--tblr-cyan-rgb), 0.2) !important;
  border: 1px solid rgba(var(--tblr-cyan-rgb), 0.42);
}

html[data-theme="dark"] .badge.bg-teal-lt.text-teal {
  background: rgba(var(--tblr-teal-rgb), 0.2) !important;
  border: 1px solid rgba(var(--tblr-teal-rgb), 0.42);
}

html[data-theme="dark"] .badge.bg-blue-lt.text-blue {
  background: rgba(var(--tblr-blue-rgb), 0.2) !important;
  border: 1px solid rgba(var(--tblr-blue-rgb), 0.42);
}

html[data-theme="dark"] .badge.bg-secondary-lt.text-secondary {
  background: color-mix(in srgb, var(--v2-surface-2) 72%, transparent) !important;
  color: var(--v2-text-muted) !important;
  border: 1px solid color-mix(in srgb, var(--v2-border-subtle) 78%, transparent);
}

html[data-theme="dark"] .badge.bg-azure-lt.text-azure {
  background: color-mix(in srgb, var(--v2-primary) 18%, transparent) !important;
  color: color-mix(in srgb, var(--v2-primary-2) 86%, var(--v2-text)) !important;
  border: 1px solid color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
}

html[data-theme="dark"] .badge.bg-indigo-lt.text-indigo {
  background: color-mix(in srgb, var(--v2-primary) 18%, transparent) !important;
  color: color-mix(in srgb, var(--v2-primary-2) 86%, var(--v2-text)) !important;
  border: 1px solid color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
}

/* Stone: keep indigo badges blue-toned (close to Slate, but less saturated). */
html[data-theme-base="stone"] .badge.bg-indigo-lt.text-indigo {
  background: rgba(76, 122, 173, 0.14) !important;
  color: #4b6f98 !important;
  border: 1px solid rgba(76, 122, 173, 0.34);
}

html[data-theme="dark"][data-theme-base="stone"] .badge.bg-indigo-lt.text-indigo {
  background: rgba(97, 138, 187, 0.22) !important;
  color: #b6d2ef !important;
  border: 1px solid rgba(122, 160, 205, 0.44);
}

html[data-theme="dark"] .v2-global-loader {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
  color: var(--v2-text);
  box-shadow: 0 6px 14px rgba(1, 8, 21, 0.4);
}

html[data-theme="dark"] .v2-toast {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
  color: var(--v2-text);
  box-shadow: 0 14px 24px rgba(1, 7, 20, 0.52);
}

html[data-theme="dark"] .v2-toast__close {
  color: var(--v2-text-muted);
}

html[data-theme="dark"] .v2-toast__close:hover,
html[data-theme="dark"] .v2-toast__close:focus {
  color: var(--v2-text);
  background: color-mix(in srgb, var(--v2-primary) 18%, transparent);
}

html[data-theme="dark"] .v2-toast--info {
  border-left-color: var(--v2-primary);
}

html[data-theme="dark"] .v2-toast--success {
  border-left-color: #51c486;
}

html[data-theme="dark"] .v2-toast--warning {
  border-left-color: #dfad56;
}

html[data-theme="dark"] .v2-toast--danger {
  border-left-color: #ee7a7a;
}

html[data-theme="dark"] .v2-stat-card {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
}

html[data-theme="dark"] .v2-stat-label {
  color: var(--v2-text-muted);
}

html[data-theme="dark"] .v2-stat-value {
  color: var(--v2-text);
}

html[data-theme="dark"] .v2-stat-chip {
  border-color: color-mix(in srgb, var(--v2-border-subtle) 78%, transparent);
  background: color-mix(in srgb, var(--v2-surface-2) 78%, transparent);
  color: color-mix(in srgb, var(--v2-text-muted) 92%, transparent);
}

html[data-theme="dark"] .v2-stat-chip strong {
  color: var(--v2-text);
}

html[data-theme="dark"] .v2-log-error {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 78%, transparent);
}

html[data-theme="dark"] .v2-log-error summary {
  color: #ff9d9d;
}

html[data-theme="dark"] pre {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
  color: var(--v2-text);
}

html[data-theme="dark"] #logDetailsOutput,
html[data-theme="dark"] #taskDetailsRaw,
html[data-theme="dark"] #fileReadOutput,
html[data-theme="dark"] #deployMultiOutput,
html[data-theme="dark"] #domainFileContent {
  color: var(--v2-text) !important;
}

html[data-theme="dark"] .v2-task-meta {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 82%, transparent);
}

html[data-theme="dark"] .v2-task-meta__key {
  color: var(--v2-text-muted);
}

html[data-theme="dark"] .v2-task-meta__value code {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-1) 76%, transparent);
}

html[data-theme="dark"] .v2-task-log-view {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 74%, transparent);
}

html[data-theme="dark"] .v2-task-log-line:hover {
  background: color-mix(in srgb, var(--v2-surface-3) 62%, transparent);
}

html[data-theme="dark"] .v2-task-log-match {
  background: color-mix(in srgb, var(--v2-primary) 22%, transparent);
}

html[data-theme="dark"] #domainFileMeta {
  color: var(--v2-text-muted) !important;
}

html[data-theme="dark"] .list-group-item {
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface-1);
  color: var(--v2-text);
}

html[data-theme="dark"] .list-group-item.active {
  color: var(--v2-text);
  border-color: color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
  background: color-mix(in srgb, var(--v2-primary) 18%, var(--v2-surface-1));
}

html[data-theme="dark"] .modal-content {
  border-color: var(--v2-border-strong);
  background: var(--v2-surface-1);
  box-shadow: 0 16px 34px rgba(2, 7, 18, 0.62);
}

html[data-theme="dark"] .modal-dialog {
  margin: clamp(1.2rem, 8vh, 4.5rem) auto;
}

html[data-theme="dark"] .modal-dialog.modal-lg {
  max-width: min(900px, 86vw);
}

html[data-theme="dark"] .modal-dialog.modal-xl {
  max-width: min(1120px, 86vw);
}

html[data-theme="dark"] .modal-dialog.modal-full-width {
  max-width: min(1260px, 84vw);
}

html[data-theme="dark"] .modal-header {
  border-bottom-color: var(--v2-border-subtle);
  background: linear-gradient(180deg, var(--v2-surface-2) 0%, var(--v2-surface-1) 100%);
}

html[data-theme="dark"] .modal-header .btn-close {
  filter: invert(1) grayscale(1) brightness(180%);
  opacity: 0.88;
}

html[data-theme="dark"] .modal-header .btn-close:hover,
html[data-theme="dark"] .modal-header .btn-close:focus {
  opacity: 1;
  background-color: color-mix(in srgb, var(--v2-primary) 18%, transparent);
}

html[data-theme="dark"] .modal-body {
  background: var(--v2-surface-1);
}

html[data-theme="dark"] .modal-footer {
  border-top-color: var(--v2-border-subtle);
  background: var(--v2-surface-2);
}

html[data-theme="dark"] .modal-footer .btn-outline-primary {
  color: var(--v2-text);
  border-color: color-mix(in srgb, var(--v2-primary) 36%, var(--v2-border-subtle));
  background: color-mix(in srgb, var(--v2-surface-2) 88%, transparent);
}

html[data-theme="dark"] .modal-footer .btn-outline-primary:hover {
  color: var(--v2-bg-0);
  background: var(--v2-text);
  border-color: var(--v2-text);
}

html[data-theme="dark"] .preview-lightbox-image {
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface-2);
}

html[data-theme="dark"] .multi-plan-entry {
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface-2);
}

html[data-theme="dark"] .multi-plan-entry-kind,
html[data-theme="dark"] .multi-plan-entry-action,
html[data-theme="dark"] .multi-plan-more,
html[data-theme="dark"] .multi-plan-empty,
html[data-theme="dark"] .multi-plan-domain-path {
  color: var(--v2-text-muted);
}

html[data-theme="dark"] .multi-plan-entry-name,
html[data-theme="dark"] .multi-plan-domain-name,
html[data-theme="dark"] .multi-plan-server {
  color: var(--v2-text);
}

html[data-theme="dark"] #multiDeploySelectListPanel,
html[data-theme="dark"] #deploySelectListPanel {
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface-2);
}

html[data-theme="dark"][data-theme-base="neutral"],
html[data-theme="dark"][data-theme-base="stone"] {
  background: var(--v2-bg-0);
}

html[data-theme="dark"][data-theme-base="neutral"] body,
html[data-theme="dark"][data-theme-base="stone"] body {
  background: var(--v2-bg-0);
}

html[data-theme="dark"][data-theme-base="neutral"] .v2-sidebar,
html[data-theme="dark"][data-theme-base="stone"] .v2-sidebar {
  background:
    linear-gradient(180deg, var(--v2-sidebar-start) 0%, var(--v2-sidebar-end) 100%),
    radial-gradient(800px 300px at 0% 0%, color-mix(in srgb, var(--v2-text) 10%, transparent) 0%, transparent 80%);
}

html[data-theme="dark"][data-theme-base="neutral"] .app-topbar,
html[data-theme="dark"][data-theme-base="stone"] .app-topbar {
  background: color-mix(in srgb, var(--v2-surface-3) 86%, transparent);
  border-bottom-color: var(--v2-border-subtle);
}

html[data-theme="dark"][data-theme-base="neutral"] .card,
html[data-theme="dark"][data-theme-base="stone"] .card {
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface);
  box-shadow: 0 14px 28px rgba(2, 8, 20, 0.34);
}

html[data-theme="dark"][data-theme-base="neutral"] .card .card-header,
html[data-theme="dark"][data-theme-base="stone"] .card .card-header {
  background: linear-gradient(180deg, var(--v2-surface-2) 0%, var(--v2-surface) 100%);
  border-bottom-color: var(--v2-border-subtle);
}

html[data-theme="dark"][data-theme-base="neutral"] .card .card-footer,
html[data-theme="dark"][data-theme-base="stone"] .card .card-footer {
  border-top-color: var(--v2-border-subtle);
  background: var(--v2-surface-2);
}

html[data-theme="dark"][data-theme-base="neutral"] .table thead th,
html[data-theme="dark"][data-theme-base="stone"] .table thead th {
  background: var(--v2-surface-2);
  color: var(--v2-text-dim);
  border-bottom-color: var(--v2-border-subtle);
}

html[data-theme="dark"][data-theme-base="neutral"] .table tbody td,
html[data-theme="dark"][data-theme-base="stone"] .table tbody td {
  color: var(--v2-text);
}

html[data-theme="dark"][data-theme-base="neutral"] .table tbody tr:hover,
html[data-theme="dark"][data-theme-base="stone"] .table tbody tr:hover {
  background: color-mix(in srgb, var(--v2-surface-3) 72%, transparent);
}

html[data-theme="dark"][data-theme-base="neutral"] .files-manager-card .files-pane,
html[data-theme="dark"][data-theme-base="stone"] .files-manager-card .files-pane {
  background: var(--v2-surface-2);
  border-color: var(--v2-border-subtle);
}

html[data-theme="dark"][data-theme-base="neutral"] .files-pane-title,
html[data-theme="dark"][data-theme-base="stone"] .files-pane-title,
html[data-theme="dark"][data-theme-base="neutral"] .files-tools-subtitle,
html[data-theme="dark"][data-theme-base="stone"] .files-tools-subtitle,
html[data-theme="dark"][data-theme-base="neutral"] .files-op-status__meta,
html[data-theme="dark"][data-theme-base="stone"] .files-op-status__meta {
  color: var(--v2-text-muted);
}

html[data-theme="dark"][data-theme-base="neutral"] .files-pane-tools,
html[data-theme="dark"][data-theme-base="stone"] .files-pane-tools {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
}

html[data-theme="dark"][data-theme-base="neutral"] .files-extract-tools,
html[data-theme="dark"][data-theme-base="stone"] .files-extract-tools {
  border-color: color-mix(in srgb, var(--v2-border-subtle) 78%, transparent);
  background: color-mix(in srgb, var(--v2-surface-1) 72%, transparent);
}

html[data-theme="dark"][data-theme-base="neutral"] .files-op-status,
html[data-theme="dark"][data-theme-base="stone"] .files-op-status {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
  color: var(--v2-text);
}

html[data-theme="dark"][data-theme-base="neutral"] .files-op-status .progress,
html[data-theme="dark"][data-theme-base="stone"] .files-op-status .progress {
  background: color-mix(in srgb, var(--v2-surface-3) 72%, transparent);
}

html[data-theme="dark"][data-theme-base="neutral"] .files-empty-state,
html[data-theme="dark"][data-theme-base="stone"] .files-empty-state {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 78%, transparent);
  color: var(--v2-text-muted);
}

html[data-theme="dark"][data-theme-base="neutral"] .files-dnd-menu,
html[data-theme="dark"][data-theme-base="stone"] .files-dnd-menu {
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface-2);
}

html[data-theme="dark"][data-theme-base="neutral"] .form-check-input,
html[data-theme="dark"][data-theme-base="stone"] .form-check-input {
  border-color: var(--v2-border-subtle);
  background-color: var(--v2-surface-2);
}

html[data-theme="dark"][data-theme-base="neutral"] .form-check-input:disabled,
html[data-theme="dark"][data-theme-base="stone"] .form-check-input:disabled {
  border-color: var(--v2-border-subtle);
  background-color: var(--v2-surface-2);
}

html[data-theme="dark"][data-theme-base="neutral"] .deploy-file-input::file-selector-button,
html[data-theme="dark"][data-theme-base="stone"] .deploy-file-input::file-selector-button,
html[data-theme="dark"][data-theme-base="neutral"] .deploy-file-input::-webkit-file-upload-button,
html[data-theme="dark"][data-theme-base="stone"] .deploy-file-input::-webkit-file-upload-button,
html[data-theme="dark"][data-theme-base="neutral"] .form-control[type="file"]::file-selector-button,
html[data-theme="dark"][data-theme-base="stone"] .form-control[type="file"]::file-selector-button,
html[data-theme="dark"][data-theme-base="neutral"] .form-control[type="file"]::-webkit-file-upload-button,
html[data-theme="dark"][data-theme-base="stone"] .form-control[type="file"]::-webkit-file-upload-button {
  border-color: color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
  background: var(--v2-surface-2);
  color: var(--v2-text);
}

html[data-theme="dark"][data-theme-base="neutral"] .form-control[type="file"],
html[data-theme="dark"][data-theme-base="stone"] .form-control[type="file"] {
  background: var(--v2-surface-1);
  border-color: var(--v2-border-subtle);
  color: var(--v2-text);
}

html[data-theme="dark"][data-theme-base="neutral"] .form-control,
html[data-theme="dark"][data-theme-base="stone"] .form-control,
html[data-theme="dark"][data-theme-base="neutral"] .form-select,
html[data-theme="dark"][data-theme-base="stone"] .form-select {
  background: var(--v2-surface-1);
  border-color: var(--v2-border-subtle);
  color: var(--v2-text);
}

html[data-theme="dark"][data-theme-base="neutral"] .btn-outline-primary,
html[data-theme="dark"][data-theme-base="stone"] .btn-outline-primary,
html[data-theme="dark"][data-theme-base="neutral"] .btn-outline-secondary,
html[data-theme="dark"][data-theme-base="stone"] .btn-outline-secondary {
  color: var(--v2-text);
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface-2);
}

html[data-theme="dark"][data-theme-base="neutral"] .btn-outline-primary:hover,
html[data-theme="dark"][data-theme-base="stone"] .btn-outline-primary:hover,
html[data-theme="dark"][data-theme-base="neutral"] .btn-outline-secondary:hover,
html[data-theme="dark"][data-theme-base="stone"] .btn-outline-secondary:hover {
  color: var(--v2-bg-0);
  background: var(--v2-text);
  border-color: var(--v2-text);
}

/* Production-grade visual baseline */
:root {
  --v2-space-1: 0.25rem;
  --v2-space-2: 0.5rem;
  --v2-space-3: 0.75rem;
  --v2-space-4: 1rem;
  --v2-space-5: 1.25rem;
  --v2-surface-1: #ffffff;
  --v2-surface-2: #f6f9ff;
  --v2-surface-3: #edf3ff;
  --v2-border-subtle: #d8e3f4;
  --v2-border-strong: #c4d3eb;
  --v2-text: #1a2a44;
  --v2-text-muted: #566987;
  --v2-text-dim: #7187a9;
  --v2-radius-md: 0.625rem;
  --v2-radius-lg: 0.75rem;
  --v2-control-h: 2.25rem;
  --v2-control-h-sm: 2rem;
  --v2-control-h-compact: 1.75rem;
  --v2-pad-card-x: 1rem;
  --v2-pad-card-y: 0.75rem;
  --v2-modal-pad-x: 1rem;
  --v2-modal-pad-y: 0.75rem;
  --v2-modal-gap: 0.5rem;
  --v2-modal-title-size: 0.95rem;
  --v2-btn-close-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath stroke='%232a3e64' stroke-linecap='round' stroke-width='2' d='M3.5 3.5l9 9m0-9l-9 9'/%3E%3C/svg%3E");
  --v2-btn-close-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath stroke='%23d9e7ff' stroke-linecap='round' stroke-width='2' d='M3.5 3.5l9 9m0-9l-9 9'/%3E%3C/svg%3E");
}

html[data-theme="dark"] {
  --v2-surface-1: #0f1a2d;
  --v2-surface-2: #13233b;
  --v2-surface-3: #182b46;
  --v2-border-subtle: #2c4466;
  --v2-border-strong: #3d5a84;
  --v2-text: #e3ecfb;
  --v2-text-muted: #a2b6d6;
  --v2-text-dim: #8ea5ca;
}

html[data-theme-base="neutral"] {
  --v2-surface-1: #fafafa;
  --v2-surface-2: #f5f5f5;
  --v2-surface-3: #e5e5e5;
  --v2-border-subtle: #d4d4d4;
  --v2-border-strong: #a3a3a3;
  --v2-text: #262626;
  --v2-text-muted: #737373;
  --v2-text-dim: #525252;
}

html[data-theme-base="stone"] {
  --v2-surface-1: #fafaf9;
  --v2-surface-2: #f5f5f4;
  --v2-surface-3: #e7e5e4;
  --v2-border-subtle: #d6d3d1;
  --v2-border-strong: #a8a29e;
  --v2-text: #44403c;
  --v2-text-muted: #78716c;
  --v2-text-dim: #57534e;
}

html[data-theme="dark"][data-theme-base="neutral"] {
  --v2-surface-1: #262626;
  --v2-surface-2: #171717;
  --v2-surface-3: #404040;
  --v2-border-subtle: #525252;
  --v2-border-strong: #737373;
  --v2-text: #f5f5f5;
  --v2-text-muted: #a3a3a3;
  --v2-text-dim: #d4d4d4;
}

html[data-theme="dark"][data-theme-base="stone"] {
  --v2-surface-1: #292524;
  --v2-surface-2: #1c1917;
  --v2-surface-3: #44403c;
  --v2-border-subtle: #57534e;
  --v2-border-strong: #78716c;
  --v2-text: #e7e5e4;
  --v2-text-muted: #a8a29e;
  --v2-text-dim: #d6d3d1;
}

body {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--v2-text);
}

small,
.small {
  font-size: 0.75rem;
  color: var(--v2-text-muted);
}

.v2-sidebar {
  z-index: 1020;
}

.app-topbar .navbar-text {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.app-topbar-primary {
  min-width: min(28rem, 56vw);
}

.v2-loader-slot {
  min-width: 8.6rem;
  max-width: 8.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 1.5rem;
}

.v2-global-loader {
  min-height: 1.5rem;
  padding: 0.14rem 0.55rem;
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-1) 88%, transparent);
  color: var(--v2-text-muted);
  font-size: 0.74rem;
}

.v2-global-loader .spinner-border {
  width: 0.74rem;
  height: 0.74rem;
}

.v2-toast-stack {
  z-index: 1048;
  right: 0.9rem;
  bottom: 0.9rem;
  width: min(25rem, calc(100vw - 1.1rem));
  max-height: min(65vh, 33rem);
}

.v2-toast {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
  color: var(--v2-text);
  border-radius: 0.72rem;
}

.card {
  border-color: var(--v2-border-subtle);
  background: var(--v2-surface-1);
  color: var(--v2-text);
}

.card .card-header {
  padding: var(--v2-pad-card-y) var(--v2-pad-card-x);
  background: linear-gradient(180deg, var(--v2-surface-2) 0%, var(--v2-surface-1) 100%);
  border-bottom-color: var(--v2-border-subtle);
}

.card .card-body {
  padding: var(--v2-pad-card-y) var(--v2-pad-card-x);
}

.card .card-footer {
  padding: calc(var(--v2-pad-card-y) - 0.125rem) var(--v2-pad-card-x);
  background: var(--v2-surface-2);
  border-top-color: var(--v2-border-subtle);
}

.card .card-title {
  font-size: 0.9rem;
  color: var(--v2-text);
}

.card-metric .card-body {
  padding: 0.78rem 0.9rem 0.72rem;
}

.card-metric .display-6 {
  font-size: 1.88rem;
}

.card-metric .text-secondary {
  color: var(--v2-text-dim) !important;
  font-size: 0.73rem;
}

.table thead th {
  font-size: 0.68rem;
  color: #4c6283;
  padding: 0.56rem 0.66rem;
  background: var(--v2-surface-2);
  border-bottom-color: var(--v2-border-subtle);
}

.table tbody td {
  padding: 0.56rem 0.66rem;
  font-size: 0.84rem;
  color: var(--v2-text);
}

.table tbody tr + tr td {
  border-top-color: var(--v2-border-subtle);
}

.table tbody tr:hover {
  background: color-mix(in srgb, var(--v2-surface-3) 76%, transparent);
}

.table td .btn.btn-sm {
  min-height: var(--v2-control-h-compact);
  font-size: 0.73rem;
  padding-inline: 0.5rem;
}

.table .d-flex {
  gap: 0.3rem;
  flex-wrap: wrap;
}

.table-responsive {
  position: relative;
}

.form-label {
  font-size: 0.69rem;
  margin-bottom: 0.24rem;
  color: #4f6686;
}

.form-check-label {
  font-size: 0.79rem;
  color: var(--v2-text-muted);
}

.form-control,
.form-select,
.btn {
  min-height: var(--v2-control-h);
  font-size: 0.875rem;
}

.form-control,
.form-select {
  border-color: var(--v2-border-strong);
  background: var(--v2-surface-1);
  color: var(--v2-text);
  padding-inline: 0.7rem;
}

.form-control::placeholder {
  color: #5e7391;
  opacity: 1;
}

.form-control.form-control-sm,
.form-select.form-select-sm,
.btn.btn-sm,
.btn-group.btn-group-sm .btn {
  min-height: var(--v2-control-h-sm);
  font-size: 0.82rem;
}

.btn {
  font-weight: 680;
}

.btn-outline-primary,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-secondary {
  background: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
}

.text-secondary,
small.text-secondary {
  --bs-text-opacity: 1;
  color: #4f6482 !important;
}

.btn-outline-warning {
  color: #7a4a00;
  border-color: #be7a17;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus {
  color: #ffffff;
  background: #9f5d00;
  border-color: #9f5d00;
}

.btn-outline-secondary {
  color: #3e5777;
  border-color: #9eb3d4;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: #ffffff;
  background: #4d688a;
  border-color: #4d688a;
}

.v2-toolbar {
  gap: var(--v2-space-2);
}

.v2-toolbar .form-control,
.v2-toolbar .form-select {
  min-width: 9.5rem;
}

.v2-toolbar-field {
  flex: 0 0 auto;
}

.v2-w-160 { width: 10rem; }
.v2-w-170 { width: 10.625rem; }
.v2-w-210 { width: 13.125rem; }
.v2-w-220 { width: 13.75rem; }
.v2-col-toggle { width: 2.75rem; min-width: 2.75rem; }

.table-check-cell .form-check-input,
.table .form-check-input {
  width: 1rem;
  height: 1rem;
  margin-top: 0;
}

.form-check-input {
  border-color: var(--v2-border-strong, var(--v2-border));
  background-color: color-mix(
    in srgb,
    var(--v2-surface-1, var(--v2-surface)) 92%,
    var(--v2-surface-3, var(--v2-surface-muted))
  );
}

.form-check-input:checked,
.form-check-input:indeterminate {
  border-color: var(--v2-primary);
  background-color: var(--v2-primary);
}

.form-check-input:disabled {
  border-color: var(--v2-border-subtle, var(--v2-border));
  background-color: var(--v2-surface-2, var(--v2-surface-muted));
  opacity: 0.72;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--v2-primary) 28%, transparent) !important;
}

.deploy-file-display {
  cursor: pointer;
}

.deploy-archive-picker .deploy-file-display:focus {
  outline: none;
}

.modal {
  z-index: 1060 !important;
}

.modal-backdrop {
  z-index: 1058 !important;
  background: #000;
}

.modal-backdrop.show {
  opacity: 0.84;
}

.modal-content {
  border-color: var(--v2-border-strong);
  background: var(--v2-surface-1);
  isolation: isolate;
}

.modal-header,
.modal-body,
.modal-footer {
  padding-inline: var(--v2-modal-pad-x);
}

.modal-header {
  min-height: 3.15rem;
  background: linear-gradient(180deg, var(--v2-surface-2) 0%, var(--v2-surface-1) 100%);
  border-bottom-color: var(--v2-border-subtle);
}

.modal-header .modal-title {
  font-size: var(--v2-modal-title-size);
  font-weight: 760;
}

.modal-header .btn-close {
  --bs-btn-close-bg: var(--v2-btn-close-light);
  --bs-btn-close-opacity: 1;
  --bs-btn-close-hover-opacity: 1;
  background-image: var(--v2-btn-close-light) !important;
  margin: 0;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  background-size: 0.76rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background-color: transparent;
  opacity: 1 !important;
  cursor: pointer;
  transform: translateY(0);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.modal-header .btn-close:hover,
.modal-header .btn-close:focus {
  background-color: color-mix(in srgb, var(--v2-surface-3) 78%, transparent);
  border-color: var(--v2-border-subtle);
  transform: translateY(-1px);
}

.modal-header .btn-close:active {
  background-color: color-mix(in srgb, var(--v2-surface-3) 90%, transparent);
  border-color: var(--v2-border-strong);
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

.modal-header .btn-close:focus {
  outline: none;
  box-shadow: none;
}

.modal-header .btn-close:focus-visible {
  background-color: color-mix(in srgb, var(--v2-surface-3) 78%, transparent);
  border-color: var(--v2-border-subtle);
  transform: translateY(-1px);
  box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--v2-primary) 28%, transparent);
}

html[data-theme="dark"] .modal-header .btn-close {
  --bs-btn-close-bg: var(--v2-btn-close-dark);
  background-image: var(--v2-btn-close-dark) !important;
  filter: none !important;
  opacity: 1;
}

.modal-body {
  background: var(--v2-surface-1);
}

.modal-footer {
  background: var(--v2-surface-2);
  border-top-color: var(--v2-border-subtle);
  gap: var(--v2-modal-gap);
}

.modal-footer .btn {
  min-height: var(--v2-control-h-sm);
}

body.modal-open {
  overflow: hidden !important;
}

body.modal-open .page-wrapper,
body.modal-open .page-body {
  overflow: hidden !important;
}

.modal {
  overflow-y: auto;
}

.modal-dialog {
  max-height: calc(100dvh - 1.4rem);
}

.modal-content {
  max-height: calc(100dvh - 1.4rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

html[data-theme="dark"] .app-topbar {
  background: var(--v2-topbar-bg);
  border-bottom-color: var(--v2-topbar-border) !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  border-color: var(--v2-border-subtle);
}

html[data-theme="dark"] .table thead th {
  background: var(--v2-surface-2);
  color: var(--v2-text-dim);
  border-bottom-color: var(--v2-border-subtle);
}

html[data-theme="dark"] .form-check-input {
  border-color: var(--v2-border-subtle);
  background-color: var(--v2-surface-1);
}

html[data-theme="dark"] .form-check-input:disabled {
  border-color: color-mix(in srgb, var(--v2-border-subtle) 72%, transparent);
  background-color: color-mix(in srgb, var(--v2-surface-2) 88%, transparent);
  opacity: 1;
}

html[data-theme="dark"] .form-label,
html[data-theme="dark"] .text-secondary,
html[data-theme="dark"] small.text-secondary {
  --bs-text-opacity: 1;
  color: var(--v2-text-muted) !important;
}

html[data-theme="dark"] .btn-outline-secondary {
  color: var(--v2-text);
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 88%, transparent);
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus {
  color: var(--v2-text);
  background: color-mix(in srgb, var(--v2-primary) 12%, var(--v2-surface-2));
  border-color: color-mix(in srgb, var(--v2-primary) 32%, var(--v2-border-subtle));
}

html[data-theme="dark"] .btn-outline-warning {
  color: color-mix(in srgb, var(--v2-warning) 82%, var(--v2-text));
  border-color: color-mix(in srgb, var(--v2-warning) 46%, var(--v2-border-subtle));
  background: color-mix(in srgb, var(--v2-warning) 10%, var(--v2-surface-2));
}

html[data-theme="dark"] .btn-outline-warning:hover,
html[data-theme="dark"] .btn-outline-warning:focus {
  color: var(--v2-bg-0);
  background: color-mix(in srgb, var(--v2-warning) 72%, var(--v2-text));
  border-color: color-mix(in srgb, var(--v2-warning) 72%, var(--v2-text));
}

html[data-theme="dark"] .files-manager-card .files-pane {
  background: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
  border-color: var(--v2-border-subtle);
}

html[data-theme="dark"] .table tbody td {
  color: var(--v2-text-muted);
}

html[data-theme="dark"] .table tbody tr:hover {
  background: color-mix(in srgb, var(--v2-surface-3) 72%, transparent);
}

html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-feature-settings: "tnum" 1, "ss01" 1;
}

.app-topbar .navbar-nav.flex-row {
  gap: 0.36rem !important;
}

.app-topbar,
.app-topbar .container-xl {
  overflow: visible;
}

.reload-btn,
.theme-toggle-btn {
  min-width: 1.95rem !important;
  width: 1.95rem;
}

.v2-worker-indicator-wrap {
  position: relative;
}

.v2-worker-indicator {
  --v2-worker-indicator-bg: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
  --v2-worker-indicator-border: var(--v2-border-subtle, var(--v2-border));
  --v2-worker-indicator-ring: var(--v2-surface-1);
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 1.95rem;
  min-width: 1.95rem;
  height: 1.34rem;
  min-height: 1.34rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--v2-worker-indicator-border);
  background: var(--v2-worker-indicator-bg);
  color: var(--v2-text-muted);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.v2-worker-indicator:hover,
.v2-worker-indicator:focus-visible {
  color: var(--v2-text);
  border-color: color-mix(in srgb, var(--v2-accent) 38%, var(--v2-border-subtle));
}

.v2-worker-indicator__dot {
  position: absolute;
  left: 0.26rem;
  top: 0.22rem;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: var(--v2-text-dim);
  box-shadow: 0 0 0 2px var(--v2-worker-indicator-ring);
  flex: 0 0 auto;
}

.v2-worker-indicator__icon {
  font-size: 0.8rem;
  line-height: 1;
}

.v2-worker-indicator__text {
  display: none;
}

.v2-worker-indicator__count {
  position: absolute;
  top: -0.38rem;
  right: -0.38rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.12rem;
  height: 1.02rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  border: 1px solid var(--v2-worker-indicator-ring);
  background: var(--v2-selection-bg);
  background: color-mix(in srgb, var(--v2-accent) 18%, transparent);
  color: var(--v2-accent);
  font-size: 0.68rem;
  font-weight: 800;
  z-index: 2;
}

.v2-worker-indicator__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Center without `transform` because Bootstrap's `.spinner-border` animates `transform` (rotate). */
  margin-top: -0.33rem;
  margin-left: -0.33rem;
  width: 0.66rem;
  height: 0.66rem;
  border-width: 0.11rem;
}

.v2-worker-indicator__caret {
  font-size: 0.76rem;
  opacity: 0.68;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.v2-worker-indicator-wrap.is-open .v2-worker-indicator__caret {
  transform: rotate(180deg);
  opacity: 0.9;
}

.v2-worker-indicator.is-idle .v2-worker-indicator__dot {
  background: var(--v2-text-dim);
}

.v2-worker-indicator.is-active {
  border-color: color-mix(in srgb, #1aa55a 50%, var(--v2-border-subtle));
  color: #1e7a48;
}

.v2-worker-indicator.is-active .v2-worker-indicator__dot {
  background: #22a666;
  box-shadow: 0 0 0 0 rgba(34, 166, 102, 0.45);
  animation: v2-worker-pulse 1.6s ease-out infinite;
}

.v2-worker-indicator.is-error {
  border-color: color-mix(in srgb, #cb3f4b 52%, var(--v2-border-subtle));
  color: #b3333f;
}

.v2-worker-indicator.is-error .v2-worker-indicator__dot {
  background: #cf4a59;
}

.v2-worker-indicator.is-refreshing .v2-worker-indicator__spinner {
  display: inline-block !important;
}

.v2-worker-indicator.is-refreshing .v2-worker-indicator__dot {
  display: none;
}

.v2-worker-indicator.is-refreshing .v2-worker-indicator__icon {
  opacity: 0;
}

.v2-ws-channel-indicator-wrap {
  position: relative;
}

.v2-ws-channel-indicator {
  --v2-ws-indicator-bg: color-mix(in srgb, var(--v2-surface-1) 92%, transparent);
  --v2-ws-indicator-border: var(--v2-border-subtle, var(--v2-border));
  --v2-ws-indicator-ring: var(--v2-surface-1);
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  height: 1.34rem;
  min-height: 1.34rem;
  padding: 0 0.42rem 0 0.24rem;
  border-radius: 999px;
  border: 1px solid var(--v2-ws-indicator-border);
  background: var(--v2-ws-indicator-bg);
  color: var(--v2-text-muted);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  cursor: default;
  user-select: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.v2-ws-channel-indicator:hover,
.v2-ws-channel-indicator:focus-visible {
  color: var(--v2-text);
  border-color: color-mix(in srgb, var(--v2-accent) 38%, var(--v2-border-subtle));
}

.v2-ws-channel-indicator__dot {
  width: 0.36rem;
  height: 0.36rem;
  border-radius: 50%;
  background: var(--v2-text-dim);
  box-shadow: 0 0 0 2px var(--v2-ws-indicator-ring);
  flex: 0 0 auto;
}

.v2-ws-channel-indicator__label {
  letter-spacing: 0.01em;
}

.v2-ws-channel-indicator.is-live {
  border-color: color-mix(in srgb, #1aa55a 52%, var(--v2-border-subtle));
  color: #1e7a48;
}

.v2-ws-channel-indicator.is-live .v2-ws-channel-indicator__dot {
  background: #22a666;
  animation: v2-worker-pulse 1.6s ease-out infinite;
}

.v2-ws-channel-indicator.is-reconnecting {
  border-color: color-mix(in srgb, #d28d10 52%, var(--v2-border-subtle));
  color: #aa6b14;
}

.v2-ws-channel-indicator.is-reconnecting .v2-ws-channel-indicator__dot {
  background: #e7aa2f;
}

.v2-ws-channel-indicator.is-offline {
  border-color: color-mix(in srgb, #7c8ca4 50%, var(--v2-border-subtle));
  color: #6e7f98;
}

.v2-ws-channel-indicator.is-offline .v2-ws-channel-indicator__dot {
  background: #9aa8b5;
}

.v2-worker-panel {
  position: absolute;
  top: calc(100% + 0.42rem);
  right: 0;
  width: min(27rem, calc(100vw - 1rem));
  max-height: min(74vh, 34rem);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 0.78rem;
  border: 1px solid var(--v2-border-strong);
  background: var(--v2-surface-1);
  box-shadow: 0 18px 44px rgba(14, 28, 52, 0.24);
  padding: 0.64rem;
  z-index: 1050;
}

.v2-worker-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.42rem;
}

.v2-worker-panel__title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--v2-text);
}

.v2-worker-panel__updated {
  font-size: 0.66rem;
  color: var(--v2-text-muted);
  white-space: nowrap;
}

.v2-worker-panel__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem;
}

.v2-worker-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  padding: 0.24rem 0.34rem;
  border-radius: 0.58rem;
  border: 1px solid var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
  font-size: 0.64rem;
  color: var(--v2-text-muted);
}

.v2-worker-chip strong {
  color: var(--v2-text);
  font-size: 0.68rem;
}

.v2-worker-panel__section {
  margin-top: 0.56rem;
}

.v2-worker-panel__label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--v2-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.28rem;
}

.v2-worker-panel__types,
.v2-worker-panel__tasks {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.v2-worker-type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.56rem;
  border: 1px solid var(--v2-border-subtle);
  border-radius: 0.56rem;
  background: color-mix(in srgb, var(--v2-surface-2) 80%, transparent);
  padding: 0.3rem 0.4rem;
}

.v2-worker-type-row__main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.v2-worker-type-row__type {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--v2-text);
}

.v2-worker-type-row__worker {
  font-size: 0.62rem;
  color: var(--v2-text-muted);
}

.v2-worker-type-row__meta {
  white-space: nowrap;
  font-size: 0.64rem;
  color: var(--v2-text-muted);
}

.v2-worker-task-row {
  border: 1px solid var(--v2-border-subtle);
  border-radius: 0.56rem;
  background: color-mix(in srgb, var(--v2-surface-2) 74%, transparent);
  padding: 0.34rem 0.4rem;
}

.v2-worker-task-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.22rem;
}

.v2-worker-task-row__name {
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--v2-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-worker-task-row__meta {
  font-size: 0.62rem;
  color: var(--v2-text-muted);
  margin-bottom: 0.24rem;
}

.v2-worker-more,
.v2-worker-empty {
  font-size: 0.64rem;
  color: var(--v2-text-muted);
  text-align: center;
  padding: 0.26rem 0.2rem;
}

.v2-worker-panel__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.56rem;
  padding-top: 0.56rem;
  border-top: 1px solid var(--v2-border-subtle);
}

.v2-worker-panel__open {
  min-width: 8rem;
  white-space: nowrap;
}

@keyframes v2-worker-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 166, 102, 0.36);
  }
  70% {
    box-shadow: 0 0 0 0.38rem rgba(34, 166, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 166, 102, 0);
  }
}

html[data-theme="dark"] .v2-worker-indicator {
  --v2-worker-indicator-bg: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
  --v2-worker-indicator-border: var(--v2-border-subtle);
  --v2-worker-indicator-ring: var(--v2-surface-2);
  color: var(--v2-text);
}

html[data-theme="dark"] .v2-worker-indicator:hover,
html[data-theme="dark"] .v2-worker-indicator:focus-visible {
  color: var(--v2-text);
  border-color: color-mix(in srgb, var(--v2-accent) 38%, var(--v2-border-subtle));
}

html[data-theme="dark"] .v2-worker-indicator.is-active {
  border-color: #2d8c60;
  color: #80d6ab;
}

html[data-theme="dark"] .v2-worker-indicator.is-active .v2-worker-indicator__dot {
  background: #3fc985;
}

html[data-theme="dark"] .v2-worker-indicator.is-error {
  border-color: #8f3f4e;
  color: #f0aab4;
}

html[data-theme="dark"] .v2-ws-channel-indicator {
  --v2-ws-indicator-bg: color-mix(in srgb, var(--v2-surface-2) 86%, transparent);
  --v2-ws-indicator-border: var(--v2-border-subtle);
  --v2-ws-indicator-ring: var(--v2-surface-2);
  color: var(--v2-text);
}

html[data-theme="dark"] .v2-ws-channel-indicator:hover,
html[data-theme="dark"] .v2-ws-channel-indicator:focus-visible {
  color: var(--v2-text);
  border-color: color-mix(in srgb, var(--v2-accent) 38%, var(--v2-border-subtle));
}

html[data-theme="dark"] .v2-ws-channel-indicator.is-live {
  border-color: #2d8c60;
  color: #80d6ab;
}

html[data-theme="dark"] .v2-ws-channel-indicator.is-live .v2-ws-channel-indicator__dot {
  background: #3fc985;
}

html[data-theme="dark"] .v2-ws-channel-indicator.is-reconnecting {
  border-color: #8f6b25;
  color: #f1b84b;
}

html[data-theme="dark"] .v2-ws-channel-indicator.is-reconnecting .v2-ws-channel-indicator__dot {
  background: #f3bf58;
}

html[data-theme="dark"] .v2-ws-channel-indicator.is-offline .v2-ws-channel-indicator__dot {
  background: #96a2b8;
}

html[data-theme="dark"] .v2-worker-indicator__count {
  background: color-mix(in srgb, var(--v2-accent) 18%, transparent);
  color: var(--v2-accent);
}

html[data-theme="dark"] .v2-worker-panel {
  border-color: var(--v2-border-strong);
  background: var(--v2-surface-1);
  box-shadow: 0 20px 44px rgba(5, 10, 20, 0.52);
}

html[data-theme="dark"] .v2-worker-chip,
html[data-theme="dark"] .v2-worker-type-row,
html[data-theme="dark"] .v2-worker-task-row {
  border-color: var(--v2-border-subtle);
  background: color-mix(in srgb, var(--v2-surface-2) 84%, transparent);
}

html[data-theme="dark"] .v2-worker-panel__title,
html[data-theme="dark"] .v2-worker-type-row__type,
html[data-theme="dark"] .v2-worker-task-row__name,
html[data-theme="dark"] .v2-worker-chip strong {
  color: var(--v2-text);
}

html[data-theme="dark"] .v2-worker-panel__updated,
html[data-theme="dark"] .v2-worker-panel__label,
html[data-theme="dark"] .v2-worker-type-row__worker,
html[data-theme="dark"] .v2-worker-type-row__meta,
html[data-theme="dark"] .v2-worker-task-row__meta,
html[data-theme="dark"] .v2-worker-more,
html[data-theme="dark"] .v2-worker-empty,
html[data-theme="dark"] .v2-worker-chip {
  color: var(--v2-text-muted);
}

.table td .btn {
  border-radius: 0.54rem;
}

#userModal .input-group .btn {
  min-width: 2.12rem;
}

body[data-page="logs"] #logsTable tbody td:nth-child(4) {
  max-width: 23rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="deploy-multi"] #multiDeployPlanTable tbody td:nth-child(3) {
  min-width: 18rem;
}

/* Deploy multi: keep the Domain Sources modal usable on small viewports.
   On desktop we scroll only the file lists (tables), keeping headers/inputs fixed. */
@media (min-width: 992px) {
  #multiDomainSourceModal .modal-dialog {
    margin: 0.75rem auto;
  }

  #multiDomainSourceModal .modal-content {
    /* Give a definite height so nested flex children can size/scroll correctly. */
    height: calc(100vh - 1.5rem);
    height: calc(100dvh - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
  }

  #multiDomainSourceModal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  #multiDomainSourceModal .modal-body > .row.row-cards {
    flex: 1 1 auto;
    min-height: 0;
  }

  #multiDomainSourceModal .modal-body > .row.row-cards > [class^="col-"],
  #multiDomainSourceModal .modal-body > .row.row-cards > [class*=" col-"] {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  #multiDomainSourceModal .modal-body > .row.row-cards > [class^="col-"] > .card,
  #multiDomainSourceModal .modal-body > .row.row-cards > [class*=" col-"] > .card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 0;
  }

  #multiDomainSourceModal .modal-body .card.mb-3 {
    margin-bottom: 1rem !important;
  }

  #multiDomainSourceModal .modal-body > .row.row-cards > [class^="col-"] > .card > .card-body,
  #multiDomainSourceModal .modal-body > .row.row-cards > [class*=" col-"] > .card > .card-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  #multiDomainSourceModal .modal-body > .row.row-cards > [class^="col-"] > .card > .card-body > .table-responsive,
  #multiDomainSourceModal .modal-body > .row.row-cards > [class^="col-"] > .card > .table-responsive,
  #multiDomainSourceModal .modal-body > .row.row-cards > [class*=" col-"] > .card > .card-body > .table-responsive,
  #multiDomainSourceModal .modal-body > .row.row-cards > [class*=" col-"] > .card > .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }
}

/* Deploy multi: ellipsis helpers for long file/folder names in the sources modal. */
#multiDomainSourceModal .v2-ellipsis-row {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 0.35rem;
}

#multiDomainSourceModal .v2-ellipsis-row > i {
  flex: 0 0 auto;
}

#multiDomainSourceModal .v2-ellipsis {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  /* Allow up to 2 lines for long names/paths in the modal. */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  /* Keep a consistent typography from the first paint to avoid "font jump" when JS applies truncation. */
  font-size: 0.92em;
  line-height: 1.15;
  max-height: 2.3em;
}

#multiDomainSourceModal .v2-ellipsis-row .v2-ellipsis {
  flex: 1 1 auto;
}

#multiDomainSourceModal .v2-ellipsis.v2-ellipsis--tight {
  font-size: 0.92em;
  line-height: 1.15;
  max-height: 2.3em;
}

#multiDomainSourceModal .v2-ellipsis.v2-ellipsis--x-tight {
  font-size: 0.86em;
  line-height: 1.1;
  max-height: 2.2em;
}

#multiDomainSourceModal #multiSourceLocalTable,
#multiDomainSourceModal #multiSourceSelectedTable,
#multiDomainSourceModal #multiSourceRemoteTable {
  table-layout: fixed;
  width: 100%;
}

#multiDomainSourceModal #multiSourceLocalTable thead th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#multiDomainSourceModal #multiSourceLocalTable thead th,
#multiDomainSourceModal #multiSourceLocalTable tbody td {
  /* Extra breathing room so headers like "Name" and "Type" don't visually merge. */
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

#multiDomainSourceModal #multiSourceLocalTable thead th:not(:last-child),
#multiDomainSourceModal #multiSourceLocalTable tbody td:not(:last-child) {
  /* Subtle vertical separators to avoid "NameType" looking like one word. */
  box-shadow: inset -1px 0 0 rgba(74, 103, 150, 0.35);
}

#multiDomainSourceModal #multiSourceLocalTable th:nth-child(2),
#multiDomainSourceModal #multiSourceLocalTable td:nth-child(2) {
  width: 4.05rem;
}

#multiDomainSourceModal #multiSourceLocalTable th:nth-child(3),
#multiDomainSourceModal #multiSourceLocalTable td:nth-child(3) {
  width: 4.75rem;
}

#multiDomainSourceModal #multiSourceLocalTable th:nth-child(4),
#multiDomainSourceModal #multiSourceLocalTable td:nth-child(4) {
  width: 9.75rem;
}

#multiDomainSourceModal #multiSourceSelectedTable th:nth-child(2),
#multiDomainSourceModal #multiSourceSelectedTable td:nth-child(2) {
  width: 10.5rem;
}

#multiDomainSourceModal #multiSourceSelectedTable th:nth-child(3),
#multiDomainSourceModal #multiSourceSelectedTable td:nth-child(3) {
  width: 8.5rem;
}

#multiDomainSourceModal #multiSourceSelectedTable th:nth-child(4),
#multiDomainSourceModal #multiSourceSelectedTable td:nth-child(4) {
  width: 6.5rem;
}

#multiDomainSourceModal #multiSourceRemoteTable th:nth-child(2),
#multiDomainSourceModal #multiSourceRemoteTable td:nth-child(2) {
  width: 6.5rem;
}

#multiDomainSourceModal #multiSourceRemoteTable th:nth-child(3),
#multiDomainSourceModal #multiSourceRemoteTable td:nth-child(3) {
  width: 7rem;
}

.cron-job-selected {
  background: rgba(59, 130, 246, 0.08);
}

.modal.modal-blur .modal-content,
.modal.modal-blur .modal-header,
.modal.modal-blur .modal-body,
.modal.modal-blur .modal-footer {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background-image: none !important;
}

.modal.modal-blur .modal-content {
  opacity: 1 !important;
  background-color: var(--v2-surface-1) !important;
}

.modal.modal-blur .modal-header {
  background-color: var(--v2-surface-2) !important;
}

.modal.modal-blur .modal-body {
  background-color: var(--v2-surface-1) !important;
}

.modal.modal-blur .modal-footer {
  background-color: var(--v2-surface-2) !important;
}

/* Scroll curtain (subtle fade) for scrollable table wrappers. JS toggles
   `--v2-curtain-top` as the wrapper scrolls. */
#deployDomainsTableWrap,
#domainsTableWrap,
#domainFilesTableWrap,
#cloakerDomainsTableWrap,
#logsTableWrap,
#multiDeployDomainsTableWrap,
#multiDeployPlanTableWrap,
#multiDeployCommonFixesTableWrap,
#multiDomainFixesTableWrap {
  position: relative;
}

#deployDomainsTableWrap::before,
#domainsTableWrap::before,
#domainFilesTableWrap::before,
#cloakerDomainsTableWrap::before,
#logsTableWrap::before,
#multiDeployDomainsTableWrap::before,
#multiDeployPlanTableWrap::before,
#multiDeployCommonFixesTableWrap::before,
#multiDomainFixesTableWrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1rem;
  pointer-events: none;
  z-index: 2;
  opacity: var(--v2-curtain-top, 0);
  will-change: opacity;
  transition: opacity 0.16s ease;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--v2-surface-1) 96%, transparent) 0%,
    color-mix(in srgb, var(--v2-surface-1) 72%, transparent) 55%,
    transparent 100%
  );
}

@media (min-width: 1200px) {
  /* Deploy pages switch to side-by-side columns at xl; disable vertical gutters to avoid bottom clipping. */
  body[data-page="deploy"] .page-body > .container-xl > .row.row-cards,
  body[data-page="deploy-multi"] .page-body > .container-xl > .row.row-cards {
    --tblr-gutter-y: 0rem;
  }

  body[data-page="deploy"] .deploy-source-col { width: 34%; }
  body[data-page="deploy"] .deploy-targets-col { width: 66%; }
  body[data-page="deploy-multi"] .col-xl-3 { width: 36%; }
  body[data-page="deploy-multi"] .col-xl-9 { width: 64%; }
}

@media (min-width: 992px) {
  body[data-page="logs"] .col-lg-4 { width: 32%; }
  body[data-page="logs"] .col-lg-8 { width: 68%; }
}

@media (max-width: 1200px) {
  .container-xl {
    max-width: none;
    width: 100%;
    padding-inline: 0.74rem;
  }
}

@media (max-width: 992px) {
  body.v2-sidebar-open {
    overflow: hidden;
  }

  .app-topbar .navbar-text {
    font-size: 0.7rem;
  }

  .page-body {
    padding-top: 1rem;
    padding-bottom: 0.34rem;
  }

  .card-metric .display-6 {
    font-size: 1.24rem;
  }

  .v2-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--v2-sidebar-w);
    z-index: 1022;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }

  body.v2-sidebar-open .v2-sidebar {
    transform: translateX(0);
  }

  .v2-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1021;
    background: rgba(7, 16, 33, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  body.v2-sidebar-open .v2-sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .page-wrapper {
    min-width: 100%;
    margin-left: 0;
  }

  .v2-sidebar.navbar-expand-lg ~ .page-wrapper {
    margin-left: 0 !important;
  }

  .card .card-header {
    padding: 0.44rem 0.5rem;
  }

  .card .card-body {
    padding: 0.44rem 0.5rem;
  }

  .card .card-footer {
    padding: 0.36rem 0.5rem;
  }

  .card .card-title {
    font-size: 0.88rem;
  }

  .table-responsive {
    background-image: linear-gradient(to left, rgba(17, 33, 58, 0.2), rgba(17, 33, 58, 0));
    background-repeat: no-repeat;
    background-position: right top;
    background-size: 1.2rem 100%;
  }
}

@media (max-width: 768px) {
  .page-body {
    padding-top: 0.2rem;
    padding-bottom: 0.3rem;
  }

  .app-topbar .container-xl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.34rem;
    padding-top: 0;
    padding-bottom: 0;
  }

  .app-topbar-primary {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.34rem;
  }

  #sidebarToggleBtn {
    margin-right: 0 !important;
    min-width: 1.95rem !important;
    width: 1.95rem;
    min-height: 1.95rem;
    height: 1.95rem;
    padding: 0 !important;
  }

  .app-topbar .navbar-text {
    margin-left: 0;
    font-size: 0.68rem;
    line-height: 1.2;
    min-width: 0;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-topbar .navbar-nav.flex-row.order-md-last {
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 0.28rem !important;
  }

  .app-topbar .navbar-nav.flex-row .btn {
    min-width: 1.95rem !important;
    width: 1.95rem;
    min-height: 1.95rem !important;
    height: 1.95rem !important;
  }

  .v2-worker-indicator {
    width: 1.95rem;
    min-width: 1.95rem;
    height: 1.95rem;
    min-height: 1.95rem;
    border-radius: 10px;
  }

  .v2-ws-channel-indicator {
    width: 5.4rem;
    min-height: 1.95rem;
    padding: 0 0.34rem 0 0.22rem;
  }

  .v2-worker-indicator__count {
    top: -0.34rem;
    right: -0.34rem;
    min-width: 1.05rem;
    height: 0.98rem;
    font-size: 0.64rem;
  }

  .v2-worker-panel {
    right: 0;
    width: min(22.5rem, calc(100vw - 0.85rem));
    max-height: min(70vh, 28rem);
    padding: 0.46rem;
  }

  .app-topbar .nav-item.dropdown .nav-link {
    padding: 0 !important;
  }

  .v2-loader-slot {
    min-width: 2.45rem;
    max-width: 2.45rem;
    justify-content: flex-end;
  }

  .v2-global-loader {
    padding: 0.12rem 0.28rem;
  }

  .v2-global-loader > span:last-child {
    display: none;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-inline: 0.6rem;
  }

  .modal-header,
  .modal-footer {
    gap: 0.3rem;
  }

  .modal-footer .btn {
    min-width: 0;
    flex: 1 1 auto;
  }

  .modal-dialog,
  html[data-theme="dark"] .modal-dialog,
  html[data-theme="dark"] .modal-dialog.modal-lg,
  html[data-theme="dark"] .modal-dialog.modal-xl,
  html[data-theme="dark"] .modal-dialog.modal-full-width {
    max-width: calc(100vw - 0.85rem) !important;
    margin: 0.65rem auto !important;
  }

  .v2-toast-stack {
    right: 0.4rem;
    bottom: 0.4rem;
    width: calc(100vw - 0.8rem);
  }

  .btn,
  .form-control,
  .form-select {
    font-size: 0.84rem;
  }

  .v2-toolbar {
    width: 100%;
  }

  .v2-toolbar .form-control,
  .v2-toolbar .form-select,
  .v2-toolbar .btn {
    width: 100%;
    min-width: 0;
  }

  .v2-toolbar-field,
  .v2-w-160,
  .v2-w-170,
  .v2-w-210,
  .v2-w-220 {
    width: 100%;
  }

  .card .card-title {
    padding-left: 0.5rem;
  }

  .card .card-title::before {
    height: 0.74rem;
  }

  .table {
    font-size: 0.82rem;
  }

  .table thead th,
  .table tbody td {
    padding-inline: 0.36rem;
  }
}

@media (max-width: 430px) {
  .app-topbar .container-xl {
    padding-inline: 0.44rem;
    gap: 0.24rem;
  }

  .app-topbar-primary {
    gap: 0.24rem;
  }

  .app-topbar .navbar-text {
    font-size: 0.64rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-topbar .navbar-nav.flex-row.order-md-last {
    gap: 0.2rem !important;
  }

  .app-topbar .navbar-nav.flex-row .btn {
    min-width: 1.72rem !important;
    width: 1.72rem;
    min-height: 1.72rem !important;
    height: 1.72rem !important;
  }

  .v2-worker-indicator {
    width: 1.72rem;
    min-width: 1.72rem;
    height: 1.72rem;
    min-height: 1.72rem;
  }

  .v2-ws-channel-indicator {
    width: 4.8rem;
    min-height: 1.72rem;
    padding: 0 0.3rem 0 0.2rem;
  }

  .v2-worker-indicator__count {
    top: -0.3rem;
    right: -0.3rem;
    min-width: 0.96rem;
    height: 0.9rem;
    font-size: 0.6rem;
  }

  .v2-worker-panel {
    width: min(20rem, calc(100vw - 0.6rem));
    right: -0.1rem;
  }

  .v2-loader-slot {
    min-width: 2.1rem;
    max-width: 2.1rem;
  }
}

@media (min-width: 768px) {
  .quick-archive-checks {
    flex-wrap: nowrap;
  }
}

/* Final corner-artifact pass: unify card/table clipping on rounded edges */
.card {
  isolation: isolate;
}

.card > .card-header:first-child {
  border-top-left-radius: calc(var(--v2-radius-lg) - 1px);
  border-top-right-radius: calc(var(--v2-radius-lg) - 1px);
  background-clip: padding-box;
}

.card > .card-footer:last-child {
  border-bottom-left-radius: calc(var(--v2-radius-lg) - 1px);
  border-bottom-right-radius: calc(var(--v2-radius-lg) - 1px);
  background-clip: padding-box;
}

.card > .table-responsive {
  background: var(--v2-surface-1);
}

.card > .table-responsive:last-of-type {
  border-bottom-left-radius: calc(var(--v2-radius-lg) - 1px);
  border-bottom-right-radius: calc(var(--v2-radius-lg) - 1px);
}

/* Avoid odd rounding artifacts on sticky table headers inside cards. */
.card > .card-header + .table-responsive thead th:first-child {
  border-top-left-radius: 0 !important;
}

.card > .card-header + .table-responsive thead th:last-child {
  border-top-right-radius: 0 !important;
}

#deployDomainsTableWrap,
#domainsTableWrap,
#domainFilesTableWrap,
#cloakerDomainsTableWrap,
#logsTableWrap,
#deployRecentTasksTableWrap,
#multiDeployDomainsTableWrap,
#multiDeployPlanTableWrap,
#multiDeployRecentTasksTableWrap {
  background: var(--v2-surface-1);
}

@media (min-width: 992px) {
  #deployDomainsTableWrap thead th,
  #domainsTableWrap thead th,
  #domainFilesTableWrap thead th,
  #cloakerDomainsTableWrap thead th,
  #logsTableWrap thead th,
  #deployRecentTasksTableWrap thead th,
  #multiDeployDomainsTableWrap thead th,
  #multiDeployPlanTableWrap thead th,
  #multiDeployRecentTasksTableWrap thead th {
    box-shadow: inset 0 -1px 0 var(--v2-border-subtle);
  }
}

/* Login page polish (no topbar/sidebar) */
body.v2-login .page.page-center {
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* The login page has its own canvas animation; disable global background effects to reduce load. */
body.v2-login::before,
body.v2-login::after {
  animation: none !important;
  display: none !important;
}

body.v2-login .v2-matrix-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  filter: saturate(1.06) contrast(1.04);
}

body.v2-login .container-tight {
  position: relative;
}

body.v2-login #loginMatrixPauseBtn {
  position: fixed;
  top: 0.9rem;
  right: calc(0.9rem + 2.25rem + 0.55rem);
  z-index: 1065;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem !important;
  min-height: 2.25rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--v2-text);
  background: color-mix(in srgb, var(--v2-surface-1) 86%, transparent);
  border-color: var(--v2-border-subtle);
  box-shadow: 0 10px 26px rgba(9, 18, 34, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    background-color 0.14s ease,
    color 0.14s ease;
}

body.v2-login #loginMatrixPauseBtn .ti {
  font-size: 1rem;
  margin: 0 !important;
}

body.v2-login #loginMatrixPauseBtn:hover,
body.v2-login #loginMatrixPauseBtn:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
}

body.v2-login #loginMatrixPauseBtn:active {
  transform: translateY(0) scale(0.96);
}

body.v2-login #loginMatrixPauseBtn.is-paused {
  border-color: color-mix(in srgb, var(--v2-primary) 44%, var(--v2-border-subtle));
}

body.v2-login #loginThemeToggleBtn {
  position: fixed;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 1065;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem !important;
  min-height: 2.25rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--v2-text);
  background: color-mix(in srgb, var(--v2-surface-1) 86%, transparent);
  border-color: var(--v2-border-subtle);
  box-shadow: 0 10px 26px rgba(9, 18, 34, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    background-color 0.14s ease,
    color 0.14s ease;
}

body.v2-login #loginThemeToggleBtn .ti {
  font-size: 1rem;
  margin: 0 !important;
}

body.v2-login #loginThemeToggleBtn:hover,
body.v2-login #loginThemeToggleBtn:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--v2-primary) 34%, var(--v2-border-subtle));
}

body.v2-login #loginThemeToggleBtn:active {
  transform: translateY(0) scale(0.96);
}

body.v2-login #loginForm.card {
  box-shadow: 0 20px 44px rgba(5, 12, 26, 0.42);
}

body.v2-login .navbar-brand span {
  letter-spacing: 0.01em;
}

body.v2-login #loginForm .card-body {
  padding: calc(var(--v2-pad-card-y) + 0.25rem) calc(var(--v2-pad-card-x) + 0.1rem);
}

/* -------------------------------------------------------------------------- */
/* Fixed App Layout + Internal Scrolling (No Document Scroll)                  */
/* -------------------------------------------------------------------------- */

/* Tabler adds margin-block to .page-body (via tabler.min.css). For v2 pages we
   don't want external margins because the app uses a fixed-height shell. */
body[data-page] .page-body {
  margin-block: 0 !important;
}

/* Disable document scrolling on all v2 pages (login doesn't have data-page). */
html[data-page],
body[data-page] {
  height: 100%;
  overflow: hidden;
}

/* Fixed app shell: sidebar + topbar stay pinned, content scrolls internally. */
body[data-page] .page {
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
}

body[data-page] .page-wrapper {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* .page-body is NOT a scroll container (per requirement). */
body[data-page] .page-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Ensure consistent top spacing across pages; some older per-page rules
     (in this same stylesheet) set a smaller padding for a subset of pages. */
  padding-top: 1rem;
  padding-bottom: 0.34rem;
}

/* Primary internal scroller (used by index and multi-section pages). */
body[data-page] .page-body > .container-xl {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* Prevent bottom clipping on mobile (safe-area) and give a bit of breathing
     room so card shadows/rounded corners aren't cut by the scroll container. */
  padding-bottom: calc(0.34rem + env(safe-area-inset-bottom));
}

/* Make cards height-aware so their internal blocks can scroll. */
body[data-page] .card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body[data-page] .card-footer {
  flex: 0 0 auto;
}

/* Big lists: the table wrapper becomes the vertical scroll container. */
body[data-page] .card > .table-responsive,
body[data-page] .card > .card-body > .table-responsive {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

/* Sticky table headers for scrollable table wrappers (accordion effect). */
body[data-page] .card > .table-responsive thead th,
body[data-page] .card > .card-body > .table-responsive thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--v2-surface-2);
  box-shadow: var(--v2-shadow-sticky);
}

/* Full-height layout for table-heavy pages so cards/tables can consume the
   available height and scroll internally (instead of stretching the page). */
body[data-page="servers"] .page-body > .container-xl,
body[data-page="domains"] .page-body > .container-xl,
body[data-page="cloaker"] .page-body > .container-xl,
body[data-page="deploy"] .page-body > .container-xl,
body[data-page="deploy-multi"] .page-body > .container-xl,
body[data-page="files"] .page-body > .container-xl,
body[data-page="cron"] .page-body > .container-xl,
body[data-page="tasks"] .page-body > .container-xl,
body[data-page="logs"] .page-body > .container-xl,
body[data-page="users"] .page-body > .container-xl {
  display: flex;
  flex-direction: column;
}

body[data-page="servers"] .page-body > .container-xl > .row.row-cards,
body[data-page="domains"] .page-body > .container-xl > .row.row-cards,
body[data-page="cloaker"] .page-body > .container-xl > .row.row-cards,
body[data-page="deploy"] .page-body > .container-xl > .row.row-cards,
body[data-page="deploy-multi"] .page-body > .container-xl > .row.row-cards,
body[data-page="files"] .page-body > .container-xl > .row.row-cards,
body[data-page="cron"] .page-body > .container-xl > .row.row-cards,
body[data-page="logs"] .page-body > .container-xl > .row.row-cards,
body[data-page="users"] .page-body > .container-xl > .row.row-cards {
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
}

body[data-page="servers"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="servers"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="domains"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="domains"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="cloaker"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="cloaker"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="deploy"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="deploy"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="deploy-multi"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="deploy-multi"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="files"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="files"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="cron"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="cron"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="logs"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="logs"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="users"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="users"] .page-body > .container-xl > .row.row-cards > [class*=" col-"] {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Pages with a single main card should let it consume the available height. */
body[data-page="servers"] .page-body > .container-xl > .row.row-cards > .col-12 > .card,
body[data-page="users"] .page-body > .container-xl > .row.row-cards > .col-12 > .card,
body[data-page="files"] .page-body > .container-xl > .row.row-cards > .col-12 > .card {
  flex: 1 1 auto;
}

/* Domains/logs: only the main table column should stretch. */
body[data-page="domains"] .page-body .col-lg-8 > .card,
body[data-page="logs"] .page-body .col-lg-8 > .card,
body[data-page="cloaker"] .page-body .col-xl-8 > .card {
  flex: 1 1 auto;
}

/* Logs: allow the Stats card to consume remaining height and scroll its content
   (Recent errors / Raw JSON) so expanded <details> never become unreachable. */
body[data-page="logs"] .page-body .col-lg-4 > .card:last-child {
  flex: 1 1 auto;
  min-height: 0;
}

body[data-page="logs"] .page-body .col-lg-4 > .card:last-child > .card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

/* Logs: the Filters card should never collapse/clamp its controls. Keep it at its
   natural height and allow internal scroll as a fallback for very short viewports. */
body[data-page="logs"] .page-body .col-lg-4 > .card.mb-3 {
  flex: 0 0 auto;
  flex-shrink: 0;
}

body[data-page="logs"] .page-body .col-lg-4 > .card.mb-3 > .card-body {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

/* Deploy: preserve existing column intent (targets/queue should stretch). */
body[data-page="deploy"] .page-body .deploy-source-col,
body[data-page="deploy"] .page-body .deploy-targets-col,
body[data-page="deploy"] .page-body .deploy-queue-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body[data-page="deploy"] .page-body .deploy-targets-col > .card,
body[data-page="deploy"] .page-body .deploy-queue-col > .card {
  flex: 1 1 auto;
}

/* Deploy-multi: keep queue sizing behavior but ensure flex chain works on all widths. */
body[data-page="deploy-multi"] .page-body .col-xl-3,
body[data-page="deploy-multi"] .page-body .col-xl-9 {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Deploy-multi: don't let the overall content container scroll; lists/tables must
   scroll inside their own wrappers (matches "scroll only the list" behavior). */
@media (min-width: 1200px) {
  body[data-page="deploy-multi"] .page-body > .container-xl {
    overflow: hidden;
  }
}

/* Deploy-multi: make card bodies flex columns so the table wrappers can flex and
   scroll internally (instead of forcing the whole column/page to scroll). */
body[data-page="deploy-multi"] .page-body .col-xl-3 > .card > .card-body,
body[data-page="deploy-multi"] .page-body .col-xl-9 > .card:first-child > .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Deploy-multi: the big lists must take remaining height and scroll internally. */
body[data-page="deploy-multi"] #multiDeployDomainsTableWrap,
body[data-page="deploy-multi"] #multiDeployPlanTableWrap {
  flex: 1 1 auto;
  min-height: 0;
}

body[data-page="deploy-multi"] .page-body .col-xl-3 > .card {
  flex: 1 1 auto;
}

body[data-page="deploy-multi"] .page-body .col-xl-9 > .card:first-child {
  flex: 1 1 auto;
}

/* Cron: left list stretches; on the right let the last card (Recent Runs) fill. */
body[data-page="cron"] .page-body .col-lg-8 > .card {
  flex: 1 1 auto;
}

/* Cron: keep KPI card at natural height and prevent flex-shrink clipping when
   Recent Runs grows. */
body[data-page="cron"] .page-body .col-lg-4 > .card.mb-3 {
  flex: 0 0 auto;
  flex-shrink: 0;
}

body[data-page="cron"] .page-body .col-lg-4 > .card:last-child {
  flex: 1 1 auto;
  min-height: 0;
}

/* Tasks page: the main card is directly inside container-xl (no row wrapper). */
body[data-page="tasks"] .page-body > .container-xl > .card {
  flex: 1 1 auto;
  min-height: 0;
}

/* Files page: make the two-pane manager fully height-aware and scroll panes internally. */
body[data-page="files"] .files-manager-card {
  min-height: 0;
}

/* Files: the page feels a bit low compared to other views; tighten top padding. */
body[data-page="files"] .page-body {
  padding-top: 0.4rem;
}

body[data-page="files"] .files-manager-card > .card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body[data-page="files"] #filesWorkspace {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body[data-page="files"] .files-two-pane {
  flex: 1 1 auto;
  min-height: 0;
}

body[data-page="files"] .files-two-pane > [class^="col-"],
body[data-page="files"] .files-two-pane > [class*=" col-"] {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body[data-page="files"] .files-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

body[data-page="files"] .files-pane-table {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
}

/* Files: the output <pre> is empty most of the time; its Bootstrap margin (`mt-3`)
   creates a large blank strip at the bottom of the workspace. Only show it when
   there is content. */
body[data-page="files"] #filesReadViewer {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-height: min(52vh, 30rem);
  overflow: hidden;
}

body[data-page="files"] .files-read-viewer__header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--v2-surface-1, var(--v2-surface));
}

body[data-page="files"] #fileReadOutput {
  flex: 1 1 auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  max-height: none;
  min-height: 8rem;
  overflow: auto;
  overscroll-behavior: contain;
}

body[data-page="files"] #fileReadOutput:empty {
  display: none;
  margin: 0 !important;
  padding: 0 !important;
}

/* Important: to let a flex row constrain its children (so tables scroll inside
   wrappers), the columns need a definite cross-size.
   Apply carefully by breakpoint to avoid breaking stacked layouts. */

/* Single-column pages: safe on all viewports. */
body[data-page="servers"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="servers"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="users"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="users"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
body[data-page="files"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
body[data-page="files"] .page-body > .container-xl > .row.row-cards > [class*=" col-"] {
  height: 100%;
}

/* col-lg-* layouts become side-by-side at >= 992px. */
@media (min-width: 992px) {
  /* Files (two-pane): vertical gutters add extra height in a fixed layout and can
     cause subtle bottom clipping when card-body uses overflow:hidden. Keep the
     horizontal gap, remove the vertical one on desktop. */
  body[data-page="files"] .files-two-pane {
    --tblr-gutter-y: 0rem;
  }

  body[data-page="domains"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
  body[data-page="domains"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
  body[data-page="cron"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
  body[data-page="cron"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
  body[data-page="logs"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
  body[data-page="logs"] .page-body > .container-xl > .row.row-cards > [class*=" col-"] {
    height: 100%;
  }

  body[data-page="files"] .files-two-pane > [class^="col-"],
  body[data-page="files"] .files-two-pane > [class*=" col-"] {
    height: 100%;
  }
}

/* col-xl-* layouts become side-by-side at >= 1200px. */
@media (min-width: 1200px) {
  body[data-page="deploy"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
  body[data-page="deploy"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
  body[data-page="deploy-multi"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
  body[data-page="deploy-multi"] .page-body > .container-xl > .row.row-cards > [class*=" col-"],
  body[data-page="cloaker"] .page-body > .container-xl > .row.row-cards > [class^="col-"],
  body[data-page="cloaker"] .page-body > .container-xl > .row.row-cards > [class*=" col-"] {
    height: 100%;
  }

  /* Deploy: the left (Source) column can be taller than the viewport. Allow it
     to scroll internally so the bottom buttons are always reachable. */
  body[data-page="deploy"] .deploy-source-col {
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    padding-bottom: calc(0.34rem + env(safe-area-inset-bottom));
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   SPA-like navigation (seamless page swaps)
   ───────────────────────────────────────────────────────────────────────────── */

#appPageBody.v2-spa-loading {
  opacity: 0.42;
  filter: blur(0.35px);
  transform: translateY(2px);
  transition: opacity 180ms ease, filter 180ms ease, transform 180ms ease;
  pointer-events: none;
}

#appPageBody.v2-spa-enter {
  animation: v2SpaEnter 180ms ease-out both;
}

@keyframes v2SpaEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Boot warmup: briefly block sidebar navigation while priming HTML+data caches. */
body.v2-booting .v2-sidebar a.nav-link {
  pointer-events: none;
  opacity: 0.65;
  cursor: wait;
}
.v2-preview-link {
  color: var(--v2-primary);
}

.v2-preview-link:hover,
.v2-preview-link:focus {
  color: var(--v2-primary-2);
}

/* Large domain modals: keep fully inside viewport and make scrolling resilient. */
#domainInfoModal,
#domainStatusDetailsModal,
#domainFilesModal {
  overflow-y: auto !important;
}

#domainInfoModal .modal-dialog,
#domainStatusDetailsModal .modal-dialog,
#domainFilesModal .modal-dialog {
  margin: clamp(0.45rem, 1.8vh, 0.95rem) auto;
  height: calc(100dvh - clamp(0.9rem, 3.6vh, 1.9rem));
  max-height: calc(100dvh - clamp(0.9rem, 3.6vh, 1.9rem));
  display: flex;
  align-items: stretch !important;
}

#domainInfoModal .modal-content,
#domainStatusDetailsModal .modal-content,
#domainFilesModal .modal-content {
  height: 100%;
  max-height: none;
}

#domainInfoModal .modal-body,
#domainStatusDetailsModal .modal-body {
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}

#domainFilesModal .modal-body {
  min-height: 0;
  overflow: hidden !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}

#domainInfoModal #domainInfoBody {
  padding-bottom: calc(0.35rem + env(safe-area-inset-bottom));
}

#domainStatusDetailsModal #domainStatusDetailsBody {
  padding-bottom: calc(0.35rem + env(safe-area-inset-bottom));
}

/* Keep horizontal table overflow handling without trapping vertical scroll. */
#domainInfoModal .table-responsive,
#domainStatusDetailsModal .table-responsive {
  flex: 0 0 auto;
  min-height: 0;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior: auto !important;
  scrollbar-gutter: auto;
}

#domainInfoModal .v2-domain-meta-table .v2-domain-meta-td,
#domainInfoModal .v2-domain-scanner-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

#domainInfoModal .v2-domain-scanner-table td:nth-child(1) {
  width: 1%;
  white-space: nowrap;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--v2-text-muted);
}

#domainInfoModal .v2-domain-scanner-table td:nth-child(2) {
  min-width: 0;
  font-size: 0.73rem;
}

#domainInfoModal .v2-domain-scanner-table td:nth-child(3) {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  font-weight: 680;
}

#domainStatusDetailsModal .v2-status-detail-table td,
#domainStatusDetailsModal .v2-status-detail-table th {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}

#domainStatusDetailsModal .v2-status-detail-table td:nth-child(1),
#domainStatusDetailsModal .v2-status-detail-table td:nth-child(2) {
  width: 1%;
  white-space: nowrap;
}

/* Cron run details: keep the modal fully inside viewport and scroll logs safely. */
#cronRunDetailsModal {
  overflow-y: auto !important;
}

#cronRunDetailsModal .modal-dialog {
  width: min(1240px, 96vw);
  max-width: min(1240px, 96vw);
  margin: clamp(0.45rem, 1.8vh, 0.95rem) auto;
  height: calc(100dvh - clamp(0.9rem, 3.6vh, 1.9rem));
  max-height: calc(100dvh - clamp(0.9rem, 3.6vh, 1.9rem));
  display: flex;
  align-items: stretch !important;
}

#cronRunDetailsModal .modal-content {
  height: 100%;
  max-height: none;
}

#cronRunDetailsModal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  min-height: 0;
  overflow: hidden !important;
}

#cronRunDetailsOutput {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

@media (max-width: 991.98px) {
  #domainInfoModal .modal-dialog,
  #domainStatusDetailsModal .modal-dialog,
  #domainFilesModal .modal-dialog,
  #cronRunDetailsModal .modal-dialog {
    width: calc(100vw - 0.65rem);
    max-width: calc(100vw - 0.65rem);
    margin: 0.32rem auto;
    height: calc(100dvh - 0.64rem);
    max-height: calc(100dvh - 0.64rem);
  }
}

.v2-swagger-ui-wrap {
  min-height: 34rem;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-md);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.v2-swagger-ui-wrap .swagger-ui {
  font-family: "Manrope", sans-serif;
  color: #3b4151;
}

.v2-swagger-ui-wrap .swagger-ui,
.v2-swagger-ui-wrap .swagger-ui .scheme-container,
.v2-swagger-ui-wrap .swagger-ui .information-container,
.v2-swagger-ui-wrap .swagger-ui .wrapper {
  background: #fff;
}

.v2-swagger-ui-wrap .swagger-ui .scheme-container {
  box-shadow: none;
}

.v2-swagger-ui-wrap .swagger-ui input[type="text"],
.v2-swagger-ui-wrap .swagger-ui input[type="search"],
.v2-swagger-ui-wrap .swagger-ui input[type="email"],
.v2-swagger-ui-wrap .swagger-ui input[type="password"],
.v2-swagger-ui-wrap .swagger-ui textarea,
.v2-swagger-ui-wrap .swagger-ui select {
  color: #1f2937;
  background: #fff;
  border-color: #cbd5e1;
}

.v2-swagger-ui-wrap .swagger-ui .opblock.is-open {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .v2-swagger-ui-wrap {
  border-color: color-mix(in srgb, var(--v2-border) 92%, #0b0f13);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--v2-primary) 10%, transparent), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--v2-surface) 92%, #0c1117), color-mix(in srgb, var(--v2-surface-muted) 58%, #0b0f13));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.v2-swagger-ui-wrap .swagger-ui .info,
.v2-swagger-ui-wrap .swagger-ui .info p,
.v2-swagger-ui-wrap .swagger-ui .info li,
.v2-swagger-ui-wrap .swagger-ui .info .title,
.v2-swagger-ui-wrap .swagger-ui .info a,
.v2-swagger-ui-wrap .swagger-ui .opblock-tag,
.v2-swagger-ui-wrap .swagger-ui .parameter__name,
.v2-swagger-ui-wrap .swagger-ui .parameter__type,
.v2-swagger-ui-wrap .swagger-ui .response-col_status,
.v2-swagger-ui-wrap .swagger-ui .response-col_description {
  color: #3b4151;
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .scheme-container,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .information-container,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .wrapper,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock .opblock-section-header,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock .opblock-body,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .responses-inner,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .model-box,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .dialog-ux .modal-ux,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .dialog-ux .modal-ux-content {
  background: transparent;
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .info,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .info p,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .info li,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .info .title,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .info a,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .markdown p,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .markdown li,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .markdown code,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock-tag,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock-summary-description,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock-summary-path,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .parameter__name,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .parameter__type,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .parameter__deprecated,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .response-col_status,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .response-col_description,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .responses-inner h4,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .responses-inner h5,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .tab li,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui table thead tr th,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui table tbody tr td,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .model-title,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .model,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .model-toggle:after,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .prop-name,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .prop-type,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .servers-title,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui label,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .download-contents,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui section.models h4 {
  color: var(--v2-text);
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .info .base-url,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .info .title small,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .renderedMarkdown p,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .parameter__in,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock-external-docs-wrapper p,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock-description-wrapper p,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .response-col_links,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .model-box-control,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .authorization__btn span {
  color: var(--v2-text-muted);
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui a,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .link,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock-summary-path__deprecated {
  color: color-mix(in srgb, var(--v2-primary) 68%, white);
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .scheme-container,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .information-container,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .wrapper {
  background: transparent;
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .scheme-container {
  border-block: 1px solid color-mix(in srgb, var(--v2-border) 74%, transparent);
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock-tag,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui table thead tr th,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui table tbody tr td,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .responses-inner h4,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .responses-inner h5 {
  border-color: color-mix(in srgb, var(--v2-border) 74%, transparent);
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock .opblock-section-header,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .responses-table-container,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .model-box,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui section.models,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .dialog-ux .modal-ux-content {
  background: color-mix(in srgb, var(--v2-surface) 86%, #0c1117);
  border-color: color-mix(in srgb, var(--v2-border) 76%, transparent);
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .opblock.is-open {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui input[type="text"],
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui input[type="search"],
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui input[type="email"],
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui input[type="password"],
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui textarea,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui select {
  color: var(--v2-text);
  background: color-mix(in srgb, var(--v2-surface-muted) 46%, #0b0f13);
  border-color: color-mix(in srgb, var(--v2-border) 82%, transparent);
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui input::placeholder,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui textarea::placeholder {
  color: color-mix(in srgb, var(--v2-text-muted) 88%, transparent);
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .highlight-code,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui pre,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .microlight {
  background: #0b0f13 !important;
  color: #dbe7f5 !important;
}

html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .btn.authorize,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .btn.execute,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .btn.try-out__btn,
html[data-theme="dark"] .v2-swagger-ui-wrap .swagger-ui .authorization__btn {
  border-color: color-mix(in srgb, var(--v2-primary) 55%, white);
}

.v2-swagger-raw-wrap {
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-md);
  background: var(--v2-surface-muted);
  max-height: 70vh;
  overflow: auto;
}

#apiSwaggerRaw {
  margin: 0;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--v2-text);
}

/* Collapse chevron rotation for collapsible cards */
.collapse-chevron { transition: transform 0.2s ease; display: inline-block; }
[aria-expanded="true"] .collapse-chevron { transform: rotate(90deg); }
