:root {
  --dashboard-sidebar-width: 280px;
  --dashboard-sidebar-collapsed-width: 88px;
  --dashboard-topbar-height: 74px;
  --dashboard-footer-height: 72px;
  --dashboard-footer-safe-space: calc(
    var(--dashboard-footer-height) + var(--dashboard-content-gutter-bottom) + 16px
  );
  --dashboard-content-gutter-x: 28px;
  --dashboard-content-gutter-y: 24px;
  --dashboard-content-gutter-bottom: 20px;
  --dashboard-portal-accent-rgb: var(--bs-primary-rgb);
  --dashboard-shell-bg: #191e26;
  --dashboard-shell-start: #11151b;
  --dashboard-shell-end: #191e26;
  --dashboard-sidebar-bg:
    linear-gradient(180deg, rgba(9, 12, 16, 0.98), rgba(14, 18, 24, 0.98)),
    radial-gradient(circle at top left, rgba(var(--dashboard-portal-accent-rgb), 0.14), transparent 42%);
  --dashboard-topbar-bg:
    linear-gradient(180deg, rgba(24, 30, 38, 0.74), rgba(18, 23, 30, 0.58)),
    linear-gradient(90deg, rgba(var(--dashboard-portal-accent-rgb), 0.11), transparent 28%);
  --dashboard-panel-bg: rgba(24, 29, 36, 0.96);
  --dashboard-panel-bg-soft: rgba(255, 255, 255, 0.03);
  --dashboard-surface-gradient-start: rgba(29, 35, 43, 0.97);
  --dashboard-surface-gradient-end: rgba(22, 27, 34, 0.98);
  --dashboard-surface-elevated: #171c23;
  --dashboard-surface-deep: #10151b;
  --dashboard-page-wrapper-bg:
    radial-gradient(circle at top right, rgba(var(--dashboard-portal-accent-rgb), 0.14), transparent 24%),
    radial-gradient(circle at 18% 18%, rgba(73, 190, 255, 0.08), transparent 28%),
    linear-gradient(135deg, rgba(17, 22, 31, 0.99), rgba(23, 30, 41, 0.98) 48%, rgba(15, 20, 28, 0.99));
  --dashboard-body-pane-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008) 42%, rgba(255, 255, 255, 0));
  --dashboard-footer-bg:
    linear-gradient(180deg, rgba(13, 17, 23, 0.96), rgba(9, 12, 17, 0.98));
  --dashboard-footer-border: rgba(255, 255, 255, 0.08);
  --dashboard-border: rgba(255, 255, 255, 0.07);
  --dashboard-shell-muted-strong: #bbc3cf;
  --dashboard-shell-chip-bg: rgba(255, 255, 255, 0.025);
  --dashboard-shell-chip-border: rgba(255, 255, 255, 0.06);
  --dashboard-shell-accent-text: #9eb7ff;
  --dashboard-shadow: 0 18px 36px -28px rgba(0, 0, 0, 0.72);
  --dashboard-sidebar-shadow: 18px 0 40px -34px rgba(0, 0, 0, 0.9);
  --dashboard-topbar-shadow: 0 18px 34px -32px rgba(0, 0, 0, 0.7);
}

@media (min-width: 1200px) {
  html:has(body.page-dashboard),
  html:has(body.page-auth) {
    font-size: 12px;
  }

  :root {
    --dashboard-sidebar-width: 240px;
    --dashboard-sidebar-collapsed-width: 88px;
    --dashboard-topbar-height: 60px;
    --dashboard-footer-height: 64px;
    --dashboard-content-gutter-x: 18px;
    --dashboard-content-gutter-y: 16px;
    --dashboard-content-gutter-bottom: 14px;
  }
}

html[data-app-theme="light"] {
  --dashboard-shell-bg: #f6f9fc;
  --dashboard-panel-bg: rgba(255, 255, 255, 0.96);
  --dashboard-panel-bg-soft: rgba(42, 53, 71, 0.04);
  --dashboard-sidebar-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 252, 0.98)),
    radial-gradient(circle at top left, rgba(var(--dashboard-portal-accent-rgb), 0.1), transparent 38%);
  --dashboard-topbar-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(247, 250, 253, 0.64)),
    linear-gradient(90deg, rgba(var(--dashboard-portal-accent-rgb), 0.08), transparent 28%);
  --dashboard-page-wrapper-bg:
    radial-gradient(circle at top right, rgba(var(--dashboard-portal-accent-rgb), 0.1), transparent 22%),
    radial-gradient(circle at bottom left, rgba(83, 155, 255, 0.06), transparent 26%),
    linear-gradient(135deg, rgba(248, 250, 253, 0.99), rgba(239, 244, 250, 0.98) 50%, rgba(232, 239, 247, 0.99));
  --dashboard-body-pane-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.22) 44%, rgba(255, 255, 255, 0));
  --dashboard-footer-bg:
    linear-gradient(180deg, rgba(246, 249, 252, 0.98), rgba(239, 244, 249, 0.99));
  --dashboard-footer-border: rgba(42, 53, 71, 0.1);
  --dashboard-border: rgba(42, 53, 71, 0.12);
  --dashboard-shell-muted-strong: #6f809a;
  --dashboard-shell-chip-bg: rgba(42, 53, 71, 0.05);
  --dashboard-shell-chip-border: rgba(42, 53, 71, 0.08);
  --dashboard-shell-accent-text: #4164e3;
  --dashboard-shadow: 0 20px 40px -30px rgba(15, 23, 42, 0.18);
  --dashboard-sidebar-shadow: 12px 0 34px -28px rgba(15, 23, 42, 0.18);
  --dashboard-topbar-shadow: 0 16px 30px -28px rgba(15, 23, 42, 0.16);
}

body.theme-dark.page-dashboard {
  min-height: 100vh;
  color: var(--bs-body-color);
  background:
    radial-gradient(circle at top left, rgba(var(--dashboard-portal-accent-rgb), 0.18), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(73, 190, 255, 0.11), transparent 20%),
    radial-gradient(circle at 50% 100%, rgba(15, 23, 42, 0.42), transparent 34%),
    linear-gradient(135deg, #0d1218 0%, #141a23 46%, #0f141c 100%);
}

body.page-dashboard {
  overflow: hidden;
}

body.page-dashboard.page-admin {
  --dashboard-portal-accent-rgb: var(--bs-primary-rgb);
}

body.page-dashboard.page-customer {
  --dashboard-portal-accent-rgb: var(--bs-success-rgb);
}

body.theme-dark.page-dashboard .text-muted,
body.theme-dark.page-dashboard .text-secondary,
body.theme-dark.page-dashboard .form-text {
  color: var(--bs-body-color) !important;
}

body.theme-dark.page-dashboard a {
  text-decoration: none;
}

body.theme-dark.page-dashboard code {
  color: #9eb7ff;
  background: transparent;
  padding: 0;
}

#main-wrapper.dashboard-layout {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--dashboard-page-wrapper-bg);
}

#main-wrapper.dashboard-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 0%, rgba(var(--dashboard-portal-accent-rgb), 0.08), transparent 26%),
    radial-gradient(circle at 100% 100%, rgba(73, 190, 255, 0.06), transparent 20%);
  pointer-events: none;
  z-index: 0;
}

html[data-layout="vertical"] body.page-dashboard .page-wrapper {
  margin-left: 0 !important;
  width: auto !important;
}

html[data-layout="vertical"] body.page-dashboard .topbar {
  width: auto !important;
}

.dashboard-sidebar {
  width: var(--dashboard-sidebar-width);
  min-height: 100vh;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--dashboard-sidebar-bg);
  border-right: 1px solid var(--bs-border-color);
  padding: 0 16px 20px;
  z-index: 1045;
  box-shadow: var(--dashboard-sidebar-shadow);
  backdrop-filter: blur(14px);
  transition: width 0.22s ease, padding 0.22s ease;
}

.dashboard-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(var(--dashboard-portal-accent-rgb), 0.34),
    rgba(255, 255, 255, 0.06) 28%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
}

.dashboard-sidebar .brand-logo {
  height: 76px;
  padding: 0 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0));
}

.dashboard-sidebar .logo-img {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dashboard-sidebar .sidebar-brand-logo {
  height: 30px;
  width: auto;
  display: block;
}

.dashboard-sidebar .sidebar-brand-mark {
  display: none;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.dashboard-sidebar .sidebartoggler {
  color: var(--bs-body-color);
}

.dashboard-sidebar .hide-menu {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.18s ease, max-width 0.18s ease;
}

.dashboard-sidebar .sidebar-nav {
  height: calc(100vh - 92px);
  padding: 18px 4px 16px;
}

.dashboard-sidebar .nav-small-cap {
  margin: 18px 0 12px;
  padding: 0 14px;
  color: var(--bs-body-color);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-sidebar .nav-small-cap-icon {
  margin-right: 10px;
  color: var(--bs-primary);
}

.dashboard-sidebar .sidebar-item {
  margin-bottom: 6px;
}

.dashboard-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 0 !important;
  border: 1px solid transparent;
  color: var(--bs-body-color);
  background: rgba(255, 255, 255, 0.02);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.dashboard-sidebar .sidebar-link span:first-child {
  width: 18px;
  display: inline-flex;
  justify-content: center;
  color: inherit;
}

.dashboard-sidebar .sidebar-link:hover,
.dashboard-sidebar .sidebar-link.active,
.dashboard-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link,
.dashboard-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link.active,
.dashboard-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active {
  color: var(--bs-emphasis-color);
}

.dashboard-sidebar .sidebar-link:hover,
.dashboard-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link:hover {
  background: rgba(255, 255, 255, 0.015) !important;
  background-color: rgba(255, 255, 255, 0.015) !important;
  border-color: rgba(var(--dashboard-portal-accent-rgb), 0.04) !important;
  box-shadow: inset 2px 0 0 rgba(var(--dashboard-portal-accent-rgb), 0.54) !important;
}

.dashboard-sidebar .sidebar-link.active,
.dashboard-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link,
.dashboard-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link.active,
.dashboard-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active {
  background: rgba(var(--dashboard-portal-accent-rgb), 0.018) !important;
  background-color: rgba(var(--dashboard-portal-accent-rgb), 0.018) !important;
  background-image: none !important;
  border-color: rgba(var(--dashboard-portal-accent-rgb), 0.05) !important;
  box-shadow: inset 2px 0 0 rgba(var(--dashboard-portal-accent-rgb), 0.68) !important;
  color: var(--bs-emphasis-color) !important;
}

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

@media (min-width: 1200px) {
  #main-wrapper.sidebar-collapsed .dashboard-sidebar {
    width: 88px;
    padding-left: 10px;
    padding-right: 10px;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .brand-logo {
    justify-content: center !important;
    padding-left: 0;
    padding-right: 0;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .logo-img {
    width: 100%;
    justify-content: center;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .sidebar-brand-logo {
    display: none;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .sidebar-brand-mark {
    display: block;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .sidebar-nav {
    padding-left: 0;
    padding-right: 0;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .nav-small-cap {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .nav-small-cap .hide-menu {
    opacity: 0;
    max-width: 0;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .nav-small-cap-icon {
    margin-right: 0;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .sidebar-link {
    justify-content: center;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .sidebar-link .hide-menu {
    opacity: 0;
    max-width: 0;
  }

  #main-wrapper.sidebar-collapsed .dashboard-sidebar .sidebar-link span:first-child {
    width: auto;
    font-size: 18px;
  }
}

.dashboard-page-wrapper {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
  scroll-padding-top: var(--dashboard-topbar-height);
  position: relative;
  z-index: 1;
  background: var(--dashboard-page-wrapper-bg);
}

.dashboard-body-wrapper {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-top: 0 !important;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--dashboard-body-pane-bg);
}

.dashboard-page-wrapper .dashboard-body-wrapper > .container-fluid {
  max-width: none;
  width: 100%;
  height: auto;
  min-height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 0 var(--dashboard-content-gutter-bottom)
    var(--dashboard-content-gutter-x) !important;
}

@media (min-width: 1400px) {
  .dashboard-page-wrapper .dashboard-body-wrapper > .container-fluid {
    max-width: 1540px;
    margin: 0 auto;
  }
}

.dashboard-page-content {
  flex: 1 0 auto;
  min-height: auto;
  min-width: 0;
  width: 100%;
  position: relative;
  overflow: visible;
  margin-top: 0;
  padding-top: var(--dashboard-content-gutter-y);
  padding-right: var(--dashboard-content-gutter-x);
  padding-bottom: var(--dashboard-content-gutter-bottom);
}

@media (min-width: 1200px) {
  .dashboard-page-content {
    padding-bottom: calc(var(--dashboard-content-gutter-bottom) + 8px);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1035;
  isolation: isolate;
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--dashboard-topbar-bg);
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  box-shadow:
    var(--dashboard-topbar-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  overflow: visible;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02) 32%, rgba(255, 255, 255, 0)),
    radial-gradient(circle at top right, rgba(var(--dashboard-portal-accent-rgb), 0.12), transparent 34%);
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(var(--dashboard-portal-accent-rgb), 0),
    rgba(var(--dashboard-portal-accent-rgb), 0.34) 20%,
    rgba(var(--dashboard-portal-accent-rgb), 0.12) 80%,
    rgba(var(--dashboard-portal-accent-rgb), 0)
  );
  pointer-events: none;
}

.dashboard-topbar {
  min-height: var(--dashboard-topbar-height);
  gap: 16px;
  padding: 0 22px;
}

.dashboard-topbar .nav-link {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-body-color);
  border-radius: 999px;
}

.dashboard-topbar .nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--bs-emphasis-color);
}

.dashboard-topbar-copy {
  margin-left: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--dashboard-shell-chip-border);
  background: var(--dashboard-shell-chip-bg);
}

.dashboard-portal-badge,
.page-title-label,
.panel-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.dashboard-portal-badge.is-primary,
.page-title-label.is-primary,
.panel-chip.is-primary,
.status-pill.is-primary {
  background: rgba(var(--bs-primary-rgb), 0.16);
  border-color: rgba(var(--bs-primary-rgb), 0.22);
  color: var(--dashboard-shell-accent-text);
}

.dashboard-portal-badge.is-success,
.page-title-label.is-success,
.panel-chip.is-success,
.status-pill.is-success,
.status-pill.is-connected {
  background: rgba(var(--bs-success-rgb), 0.14);
  border-color: rgba(var(--bs-success-rgb), 0.2);
  color: #7cebd7;
}

.dashboard-portal-badge.is-warning,
.page-title-label.is-warning,
.panel-chip.is-warning,
.status-pill.is-warning,
.status-pill.is-qr-ready {
  background: rgba(var(--bs-warning-rgb), 0.16);
  border-color: rgba(var(--bs-warning-rgb), 0.24);
  color: #ffcf72;
}

.dashboard-portal-badge.is-info,
.page-title-label.is-info,
.panel-chip.is-info,
.status-pill.is-info {
  background: rgba(var(--bs-info-rgb), 0.16);
  border-color: rgba(var(--bs-info-rgb), 0.22);
  color: #9fc5ff;
}

.dashboard-portal-badge.is-danger,
.page-title-label.is-danger,
.panel-chip.is-danger,
.status-pill.is-danger,
.status-pill.is-error {
  background: rgba(var(--bs-danger-rgb), 0.14);
  border-color: rgba(var(--bs-danger-rgb), 0.2);
  color: #ffb7a7;
}

.panel-chip,
.status-pill {
  min-height: 30px;
  padding: 0 11px;
}

.panel-chip,
.page-title-label {
  gap: 8px;
}

.status-pill.is-connecting,
.status-pill.is-disconnected {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--dashboard-border);
  color: #c7d2e5;
}

.dashboard-topbar-note {
  margin: 0;
  color: var(--bs-body-color);
  font-size: 13px;
  font-weight: 600;
}

.theme-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none !important;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle-button .ti {
  font-size: 16px;
}

.theme-toggle-button.is-icon-only {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  gap: 0;
  justify-content: center;
}

.theme-toggle-button.is-icon-only [data-theme-toggle-label] {
  display: none;
}

.theme-toggle-button:hover {
  transform: translateY(-1px);
}

.theme-toggle-button:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), 0.38);
  outline-offset: 2px;
}

.theme-toggle-button.is-dashboard {
  background: rgba(255, 255, 255, 0.05);
  color: var(--bs-body-color);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-toggle-button.is-dashboard:hover,
.theme-toggle-button.is-dashboard:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--bs-emphasis-color);
}

.topbar-user-dropdown .dropdown-toggle::after {
  margin-left: 10px;
  color: var(--bs-body-color);
}

.topbar-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  box-shadow: none !important;
}

.topbar-profile-trigger:hover,
.topbar-profile-trigger.show {
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
}

.topbar-profile-trigger:focus,
.topbar-profile-trigger:active {
  color: inherit !important;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #5d87ff, #7aa2ff);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.topbar-profile-copy {
  min-width: 0;
}

.topbar-profile-name {
  color: var(--bs-emphasis-color);
  font-size: 13px;
  font-weight: 700;
}

.topbar-profile-role {
  color: var(--bs-body-color);
  font-size: 11px;
  text-transform: capitalize;
}

.topbar-dropdown-menu {
  min-width: 190px;
  margin-top: 12px !important;
  padding: 8px;
  z-index: 1045;
  border-radius: 16px;
  background: var(--dashboard-surface-elevated);
  border: 1px solid var(--bs-border-color) !important;
  box-shadow: 0 20px 40px -26px rgba(0, 0, 0, 0.78) !important;
}

.topbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--bs-emphasis-color);
  font-size: 13px;
  font-weight: 600;
}

.topbar-dropdown-item i {
  color: #9eb7ff;
  font-size: 16px;
}

.topbar-dropdown-item:hover,
.topbar-dropdown-item:focus {
  color: var(--bs-emphasis-color);
  background: rgba(var(--bs-primary-rgb), 0.14);
}

.topbar-dropdown-button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.page-title-wrap {
  margin-bottom: 24px;
}

.page-title-card {
  border: 1px solid var(--bs-border-color) !important;
  border-radius: 20px;
  background:
    linear-gradient(135deg, var(--dashboard-surface-gradient-start), var(--dashboard-surface-gradient-end)),
    url("/modernize/assets/images/backgrounds/line-bg.svg");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right -80px bottom -84px;
  background-size: auto, 320px;
  box-shadow: none;
}

.page-title-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-title-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.page-title-context {
  color: var(--dashboard-shell-muted-strong);
  font-size: 13px;
  font-weight: 600;
}

.page-title-heading {
  color: var(--bs-emphasis-color);
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 700;
}

.page-title-copy {
  max-width: 68ch;
  color: var(--bs-body-color);
  line-height: 1.7;
}

.page-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.page-title-actions .btn {
  min-height: 40px;
  padding-inline: 18px;
  border-radius: 10px;
  font-weight: 600;
}

.dashboard-card,
.metric-card {
  border: 1px solid var(--bs-border-color) !important;
  border-radius: 20px;
  background: var(--dashboard-panel-bg);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-card:hover,
.metric-card:hover,
.quick-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--bs-primary-rgb), 0.28) !important;
  box-shadow: var(--dashboard-shadow);
}

.workspace-card {
  background:
    linear-gradient(135deg, var(--dashboard-surface-gradient-start), var(--dashboard-surface-gradient-end)),
    url("/modernize/assets/images/backgrounds/welcome-bg.svg");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right bottom;
  background-size: auto, 250px;
}

.workspace-title {
  color: var(--bs-emphasis-color);
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  line-height: 1.14;
  max-width: 15ch;
}

.workspace-copy {
  max-width: 58ch;
  color: #d6dce5;
  font-size: 14px;
  line-height: 1.8;
}

.workspace-meta-list {
  display: grid;
  gap: 14px;
}

.workspace-meta-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--dashboard-border);
  background: rgba(255, 255, 255, 0.028);
}

.workspace-meta-label {
  color: #c3cad6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-meta-value {
  color: var(--bs-emphasis-color);
  font-size: 14px;
  line-height: 1.6;
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.metric-card .card-body {
  height: 100%;
}

.metric-card.tone-primary {
  background: linear-gradient(180deg, rgba(93, 135, 255, 0.14), rgba(24, 29, 36, 0.96));
}

.metric-card.tone-success {
  background: linear-gradient(180deg, rgba(19, 222, 185, 0.12), rgba(24, 29, 36, 0.96));
}

.metric-card.tone-warning {
  background: linear-gradient(180deg, rgba(255, 174, 31, 0.12), rgba(24, 29, 36, 0.96));
}

.metric-card.tone-info {
  background: linear-gradient(180deg, rgba(73, 190, 255, 0.12), rgba(24, 29, 36, 0.96));
}

.metric-card.tone-danger {
  background: linear-gradient(180deg, rgba(250, 137, 107, 0.12), rgba(24, 29, 36, 0.96));
}

.metric-label {
  color: #c3cad6;
  font-size: 13px;
  font-weight: 600;
}

.metric-note {
  color: var(--bs-body-color);
  font-size: 13px;
  line-height: 1.7;
}

.billing-package-price {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--bs-emphasis-color);
  letter-spacing: -0.02em;
}

.billing-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--dashboard-shell-muted-strong);
  font-size: 12px;
}

.billing-inline-meta strong {
  color: var(--bs-emphasis-color);
  font-weight: 700;
}

.billing-access-strip {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(119, 132, 180, 0.24);
  background:
    linear-gradient(135deg, rgba(43, 61, 106, 0.22), rgba(24, 31, 49, 0.08)),
    rgba(10, 16, 28, 0.24);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-bs-theme='light'] .billing-access-strip {
  border-color: rgba(82, 112, 173, 0.18);
  background:
    linear-gradient(135deg, rgba(133, 173, 255, 0.14), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.72);
}

.round-48,
.metric-pill {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  flex-shrink: 0;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.metric-pill.is-primary {
  background: rgba(var(--bs-primary-rgb), 0.16);
  border-color: rgba(var(--bs-primary-rgb), 0.24);
  color: #9eb7ff;
}

.metric-pill.is-success {
  background: rgba(var(--bs-success-rgb), 0.14);
  border-color: rgba(var(--bs-success-rgb), 0.22);
  color: #7cebd7;
}

.metric-pill.is-warning {
  background: rgba(var(--bs-warning-rgb), 0.16);
  border-color: rgba(var(--bs-warning-rgb), 0.24);
  color: #ffcf72;
}

.metric-pill.is-info {
  background: rgba(var(--bs-info-rgb), 0.16);
  border-color: rgba(var(--bs-info-rgb), 0.22);
  color: #9fc5ff;
}

.metric-pill.is-danger {
  background: rgba(var(--bs-danger-rgb), 0.14);
  border-color: rgba(var(--bs-danger-rgb), 0.2);
  color: #ffb7a7;
}

.quick-link-card {
  color: inherit;
  border: 1px solid var(--bs-border-color) !important;
  border-radius: 18px;
  background: var(--dashboard-panel-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.quick-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.quick-link-label {
  color: var(--bs-emphasis-color);
  font-size: 15px;
  font-weight: 700;
}

.quick-link-copy {
  color: var(--bs-body-color);
  font-size: 13px;
  line-height: 1.7;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.panel-header.is-compact {
  margin-bottom: 18px;
}

.panel-header-copy {
  min-width: 0;
}

.panel-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel-eyebrow.is-primary {
  color: #9eb7ff;
}

.panel-eyebrow.is-success {
  color: #7cebd7;
}

.panel-eyebrow.is-warning {
  color: #ffcf72;
}

.panel-eyebrow.is-info {
  color: #9fc5ff;
}

.panel-eyebrow.is-danger {
  color: #ffb7a7;
}

.panel-title {
  color: var(--bs-emphasis-color);
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  font-weight: 700;
}

.panel-description {
  color: var(--bs-body-color);
  font-size: 13px;
  line-height: 1.7;
}

.panel-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-list,
.endpoint-list,
.summary-list,
.qr-status-grid {
  display: grid;
  gap: 14px;
}

.stack-item,
.endpoint-item,
.summary-item,
.qr-status-item,
.qr-modal-meta-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--dashboard-border);
  background: var(--dashboard-panel-bg-soft);
}

.stack-copy {
  color: var(--bs-body-color);
  font-size: 13px;
  line-height: 1.7;
}

.stats-mini-chart {
  display: grid;
  gap: 14px;
}

.stats-mini-chart-item {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--dashboard-border);
  background: var(--dashboard-panel-bg-soft);
}

.stats-mini-chart-head,
.stats-mini-chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stats-mini-chart-head {
  margin-bottom: 10px;
  color: var(--bs-emphasis-color);
  font-size: 13px;
}

.stats-mini-chart-meta {
  margin-top: 10px;
  color: var(--bs-body-color);
  font-size: 12px;
  line-height: 1.6;
}

.stats-mini-chart-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stats-mini-chart-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--bs-primary-rgb), 0.78), rgba(var(--bs-primary-rgb), 0.34));
}

.stats-mini-chart-fill.is-primary {
  background: linear-gradient(90deg, rgba(var(--bs-primary-rgb), 0.88), rgba(var(--bs-primary-rgb), 0.36));
}

.stats-mini-chart-fill.is-success {
  background: linear-gradient(90deg, rgba(var(--bs-success-rgb), 0.88), rgba(var(--bs-success-rgb), 0.32));
}

.stats-mini-chart-fill.is-warning {
  background: linear-gradient(90deg, rgba(var(--bs-warning-rgb), 0.88), rgba(var(--bs-warning-rgb), 0.3));
}

.stats-mini-chart-fill.is-info {
  background: linear-gradient(90deg, rgba(var(--bs-info-rgb), 0.88), rgba(var(--bs-info-rgb), 0.32));
}

.stats-mini-chart-fill.is-danger {
  background: linear-gradient(90deg, rgba(var(--bs-danger-rgb), 0.88), rgba(var(--bs-danger-rgb), 0.3));
}

.stack-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.cs-conversation-actions {
  width: min(320px, 100%);
  min-width: min(320px, 100%);
}

.cs-action-grid {
  display: grid;
  gap: 10px;
  width: 100%;
}

.cs-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.device-stack-item {
  align-items: flex-start;
  gap: 20px;
}

.device-stack-copy {
  flex: 1;
  min-width: 0;
}

.device-stack-actions {
  min-width: 180px;
}

.device-stack-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.device-stack-feedback {
  max-width: 220px;
  text-align: right;
}

.endpoint-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.empty-state {
  padding: 20px;
  border-radius: 16px;
  border: 1px dashed rgba(var(--bs-primary-rgb), 0.4);
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-body-color);
}

.response-status {
  font-weight: 600;
  border: 1px solid var(--bs-border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--bs-emphasis-color);
}

.response-panel {
  min-height: 300px;
  margin: 0;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--bs-border-color);
  background: var(--dashboard-surface-deep);
  color: #d6dde7;
  overflow: auto;
  font-size: 13px;
  line-height: 1.7;
}

.api-doc-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.api-doc-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.api-doc-nav-wrap {
  position: sticky;
  top: calc(var(--dashboard-topbar-height, 68px) + 20px);
}

.api-doc-nav {
  display: grid;
  gap: 10px;
}

.api-doc-nav-button {
  position: relative;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 16px 18px 16px 20px;
  border: 1px solid var(--dashboard-border);
  border-radius: 18px;
  background: var(--dashboard-panel-bg-soft);
  color: var(--bs-body-color);
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.api-doc-nav-button::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.api-doc-nav-button:hover,
.api-doc-nav-button:focus-visible {
  border-color: rgba(var(--bs-primary-rgb), 0.28);
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-emphasis-color);
}

.api-doc-nav-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.15);
}

.api-doc-nav-button.is-active {
  border-color: rgba(var(--bs-primary-rgb), 0.28);
  background: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-emphasis-color);
}

.api-doc-nav-button.is-active::before {
  opacity: 1;
  background: rgba(var(--bs-primary-rgb), 0.86);
}

.api-doc-nav-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--bs-primary-rgb), 0.88);
}

.api-doc-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: inherit;
}

.api-doc-nav-copy {
  font-size: 12px;
  line-height: 1.65;
  color: var(--bs-secondary-color);
}

.api-doc-panel-wrap {
  min-width: 0;
}

.api-doc-panel {
  display: none;
}

.api-doc-panel.is-active {
  display: block;
}

.api-doc-panel-grid {
  display: grid;
  gap: 16px;
}

.api-doc-panel-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.api-doc-surface {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--dashboard-border);
  background: var(--dashboard-panel-bg-soft);
}

.api-doc-section-head {
  margin-bottom: 18px;
}

.api-doc-section-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(var(--bs-primary-rgb), 0.88);
}

.api-doc-section-title {
  margin: 0;
  color: var(--bs-emphasis-color);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.api-doc-section-copy {
  margin: 10px 0 0;
  color: var(--bs-secondary-color);
  line-height: 1.7;
}

.api-doc-note {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(var(--bs-info-rgb), 0.18);
  background: rgba(var(--bs-info-rgb), 0.08);
  color: var(--bs-body-color);
  line-height: 1.7;
}

.api-doc-code {
  min-height: auto;
  margin: 16px 0 0;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--bs-border-color);
  background: rgba(10, 14, 20, 0.74);
  color: var(--bs-emphasis-color);
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.api-doc-code code {
  color: inherit;
  white-space: inherit;
}

.api-doc-code.is-monaco {
  padding: 0;
  overflow: hidden;
  white-space: normal;
}

.api-doc-code.is-monaco .monaco-editor,
.api-doc-code.is-monaco .overflow-guard {
  border-radius: inherit;
}

.api-doc-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--bs-body-color);
  line-height: 1.7;
}

.api-doc-list li code {
  color: var(--bs-emphasis-color);
}

.message-intent-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.message-intent-item {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--dashboard-border);
  background: var(--dashboard-panel-bg-soft);
}

.message-attachment-details {
  border: 1px dashed rgba(var(--bs-primary-rgb), 0.38);
  border-radius: 16px;
  padding: 16px 18px;
  background: rgba(var(--bs-primary-rgb), 0.06);
}

.message-attachment-details summary {
  cursor: pointer;
  color: var(--bs-emphasis-color);
  font-weight: 700;
}

.message-log-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--bs-emphasis-color);
  --bs-table-border-color: var(--bs-border-color);
  margin-bottom: 0;
}

.message-log-table thead th {
  color: #c7ced9;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom-color: var(--bs-border-color);
}

.message-log-table td,
.message-log-table th {
  padding: 16px 14px;
  vertical-align: top;
}

.message-log-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.history-table .status-pill,
.history-table .status-pill.is-connected,
.history-table .status-pill.is-connecting,
.history-table .status-pill.is-disconnected,
.history-table .status-pill.is-qr-ready,
.history-table .status-pill.is-error,
.history-table .status-pill.is-warning,
.history-table .status-pill.is-info,
.history-table .status-pill.is-danger,
.history-table .status-pill.is-primary,
.history-table .status-pill.is-success {
  border: 0 !important;
  border-color: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.message-log-preview {
  max-width: 420px;
  color: var(--bs-emphasis-color);
  line-height: 1.7;
}

.history-text-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-text-tag.is-inbound {
  color: #18e7c7;
}

.history-text-tag.is-outbound {
  color: #9eb7ff;
}

.history-text-tag.is-warning {
  color: #ffcf72;
}

.history-text-tag.is-error {
  color: #ffb7a7;
}

.history-text-tag.is-muted {
  color: #c7d2e5;
}

.qr-status-card {
  border: 1px solid var(--bs-border-color) !important;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(27, 32, 40, 0.98), rgba(19, 24, 30, 0.98));
}

.qr-preview-wrap {
  min-height: 300px;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 18px;
  border: 0;
  background: transparent;
}

.qr-status-label {
  display: block;
  margin-bottom: 8px;
  color: #c3cad6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qr-status-value {
  display: block;
  color: var(--bs-emphasis-color);
  font-size: 15px;
  line-height: 1.6;
}

.qr-image-card {
  width: min(100%, 340px);
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 40px -26px rgba(0, 0, 0, 0.7);
  display: grid;
  place-items: center;
}

.qr-image-card-expired {
  opacity: 0.55;
  filter: grayscale(0.18);
}

.qr-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.qr-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 240px;
  text-align: center;
}

.qr-loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid rgba(var(--bs-primary-rgb), 0.16);
  border-top-color: rgba(var(--bs-primary-rgb), 0.92);
  animation: qr-spin 0.8s linear infinite;
}

.qr-loading-text {
  color: #aab5c8;
  font-size: 13px;
  font-weight: 600;
}

@keyframes qr-spin {
  to {
    transform: rotate(360deg);
  }
}

.qr-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.qr-modal-dialog {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--bs-border-color);
  background: var(--dashboard-surface-elevated);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.82);
}

.qr-modal-header,
.qr-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 24px 0;
}

.qr-modal-header {
  position: relative;
  text-align: center;
}

.qr-modal-header-copy {
  width: 100%;
}

.qr-modal-header .panel-eyebrow {
  justify-content: center;
}

.qr-modal-header h4 {
  font-size: 1.05rem;
  font-weight: 700;
}

.qr-preview-wrap-modal {
  min-height: 340px;
  margin: 18px 20px 0;
}

.qr-modal-timing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 14px 20px 0;
  text-align: center;
}

.qr-modal-timing-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qr-modal-timing-label {
  color: #aab5c8;
  font-size: 12px;
  font-weight: 600;
}

.qr-modal-timing-value {
  color: var(--bs-emphasis-color);
  font-size: 13px;
  font-weight: 700;
}

.qr-modal-footer {
  justify-content: center;
  padding: 18px 20px 20px;
}

.qr-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--bs-emphasis-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.modal-open {
  overflow: hidden;
}

.app-toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1600;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 28px));
}

.app-toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--bs-border-color);
  background: var(--dashboard-surface-elevated);
  color: var(--bs-emphasis-color);
  box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.78);
  animation: app-toast-in 0.18s ease;
}

.app-toast.is-success {
  border-color: rgba(var(--bs-success-rgb), 0.34);
}

.app-toast.is-danger {
  border-color: rgba(var(--bs-danger-rgb), 0.34);
}

.app-toast.is-warning {
  border-color: rgba(var(--bs-warning-rgb), 0.34);
}

.app-toast.is-info {
  border-color: rgba(var(--bs-info-rgb), 0.34);
}

.app-toast-body {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.app-toast-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--bs-body-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--bs-emphasis-color);
}

.app-toast.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-confirm {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 18px;
}

.app-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.app-confirm-dialog {
  position: relative;
  width: min(420px, calc(100vw - 36px));
  border-radius: 16px;
  border: 1px solid var(--bs-border-color);
  background: var(--dashboard-surface-elevated);
  padding: 18px 18px 16px;
  box-shadow: 0 32px 70px -42px rgba(0, 0, 0, 0.82);
}

.app-confirm-title {
  margin: 0;
  color: var(--bs-emphasis-color);
  font-size: 1rem;
  font-weight: 700;
}

.app-confirm-message {
  margin-top: 10px;
  color: var(--bs-body-color);
  font-size: 13px;
  line-height: 1.6;
}

.app-confirm-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.qr-note {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(var(--bs-warning-rgb), 0.24);
  background: rgba(var(--bs-warning-rgb), 0.12);
  color: #ffcf72;
}

.mini-feedback {
  font-size: 13px;
  font-weight: 600;
}

.mini-feedback.is-empty {
  display: none;
}

.mini-feedback.text-success,
body.theme-dark.page-dashboard .text-success {
  color: #7cebd7 !important;
}

.mini-feedback.text-danger,
body.theme-dark.page-dashboard .text-danger {
  color: #ffb7a7 !important;
}

.mini-feedback.text-warning,
body.theme-dark.page-dashboard .text-warning {
  color: #ffcf72 !important;
}

.mini-feedback.text-info,
body.theme-dark.page-dashboard .text-info {
  color: #9fc5ff !important;
}

body.theme-dark.page-dashboard .form-control,
body.theme-dark.page-dashboard .form-select,
body.theme-dark.page-dashboard .form-check-input {
  color: var(--bs-emphasis-color);
  background-color: rgba(16, 21, 27, 0.72);
  border-color: var(--bs-border-color);
  border-radius: 10px;
}

body.theme-dark.page-dashboard .form-control::placeholder,
body.theme-dark.page-dashboard .form-select::placeholder {
  color: #8ea1c2;
}

body.theme-dark.page-dashboard .form-control:focus,
body.theme-dark.page-dashboard .form-select:focus,
body.theme-dark.page-dashboard .form-check-input:focus {
  color: var(--bs-emphasis-color);
  background-color: rgba(16, 21, 27, 0.82);
  border-color: rgba(var(--bs-primary-rgb), 0.5);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.16);
}

body.theme-dark.page-dashboard .form-select option {
  background: var(--dashboard-surface-deep);
  color: var(--bs-emphasis-color);
}

body.theme-dark.page-dashboard textarea.form-control {
  resize: vertical;
}

body.theme-dark.page-dashboard .btn-primary {
  box-shadow: none;
}

body.theme-dark.page-dashboard .btn-outline-primary {
  color: #9eb7ff;
  border-color: rgba(var(--bs-primary-rgb), 0.4);
  background: transparent;
}

body.theme-dark.page-dashboard .btn-outline-primary:hover {
  color: #ffffff;
  background: rgba(var(--bs-primary-rgb), 0.16);
  border-color: rgba(var(--bs-primary-rgb), 0.54);
}

body.theme-dark.page-dashboard .btn-outline-light,
body.theme-dark.page-dashboard .btn-outline-info,
body.theme-dark.page-dashboard .btn-outline-danger {
  border-radius: 10px;
}

.dashboard-footer {
  flex-shrink: 0;
  min-width: 0;
  width: 100%;
  position: relative;
  margin-top: 0;
  margin-left: 0;
  margin-bottom: 0;
  padding: 0 var(--dashboard-content-gutter-x);
  border-top: 1px solid var(--dashboard-footer-border);
  background: var(--dashboard-topbar-bg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.dashboard-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 42%, rgba(255, 255, 255, 0)),
    radial-gradient(circle at bottom left, rgba(var(--dashboard-portal-accent-rgb), 0.08), transparent 32%);
  pointer-events: none;
}

.dashboard-footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(var(--dashboard-portal-accent-rgb), 0),
    rgba(var(--dashboard-portal-accent-rgb), 0.24) 18%,
    rgba(var(--dashboard-portal-accent-rgb), 0.08) 82%,
    rgba(var(--dashboard-portal-accent-rgb), 0)
  );
  pointer-events: none;
}

.dashboard-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  min-height: 56px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

@media (min-width: 1400px) {
  .dashboard-footer-inner {
    max-width: 1540px;
    margin: 0 auto;
  }
}

.dashboard-footer-copy-group {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.dashboard-footer-label,
.dashboard-footer-meta-label {
  color: var(--dashboard-shell-muted-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-footer-meta {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-copy {
  min-width: 0;
  max-width: 100%;
  color: var(--bs-body-color);
  font-size: 13px;
  line-height: 1.6;
}

.dashboard-footer code,
.footer-copy code {
  display: inline;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--bs-emphasis-color);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

html[data-app-theme="light"] body.page-dashboard {
  color: #2a3547;
  background:
    radial-gradient(circle at top right, rgba(var(--dashboard-portal-accent-rgb), 0.11), transparent 22%),
    radial-gradient(circle at bottom left, rgba(83, 155, 255, 0.06), transparent 24%),
    linear-gradient(135deg, #f9fbfe 0%, #eef4fb 52%, #e7eef7 100%);
}

html[data-app-theme="light"] body.page-dashboard .text-muted,
html[data-app-theme="light"] body.page-dashboard .text-secondary,
html[data-app-theme="light"] body.page-dashboard .form-text {
  color: #5a6a85 !important;
}

html[data-app-theme="light"] body.page-dashboard code {
  color: #4164e3;
}

html[data-app-theme="light"] body.page-dashboard .dashboard-sidebar {
  background: var(--dashboard-sidebar-bg);
  border-right-color: var(--dashboard-border);
  box-shadow: var(--dashboard-sidebar-shadow);
}

html[data-app-theme="light"] body.page-dashboard .dashboard-sidebar .nav-small-cap {
  color: #5a6a85;
}

html[data-app-theme="light"] body.page-dashboard .dashboard-sidebar .sidebar-link {
  color: #5a6a85;
}

html[data-app-theme="light"] body.page-dashboard .dashboard-sidebar .sidebar-link:hover,
html[data-app-theme="light"] body.page-dashboard .dashboard-sidebar .sidebar-link.active {
  color: #2a3547;
}

html[data-app-theme="light"] body.page-dashboard .topbar {
  background: var(--dashboard-topbar-bg);
  border-bottom-color: var(--dashboard-border);
  box-shadow:
    var(--dashboard-topbar-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 -1px 0 rgba(255, 255, 255, 0.26);
}

html[data-app-theme="light"] body.page-dashboard .dashboard-topbar .nav-link:hover {
  background: rgba(42, 53, 71, 0.06);
}

html[data-app-theme="light"] body.page-dashboard .theme-toggle-button.is-dashboard {
  background: rgba(42, 53, 71, 0.05);
  color: #5a6a85;
}

html[data-app-theme="light"] body.page-dashboard .theme-toggle-button.is-dashboard:hover,
html[data-app-theme="light"] body.page-dashboard .theme-toggle-button.is-dashboard:focus-visible {
  background: rgba(42, 53, 71, 0.1);
  color: #2a3547;
}

html[data-app-theme="light"] body.page-dashboard .status-pill.is-connecting,
html[data-app-theme="light"] body.page-dashboard .status-pill.is-disconnected {
  background: rgba(42, 53, 71, 0.05);
  color: #5a6a85;
}

html[data-app-theme="light"] body.page-dashboard .topbar-profile-trigger {
  background: rgba(42, 53, 71, 0.05);
}

html[data-app-theme="light"] body.page-dashboard .topbar-profile-trigger:hover,
html[data-app-theme="light"] body.page-dashboard .topbar-profile-trigger.show {
  background: rgba(42, 53, 71, 0.1);
}

html[data-app-theme="light"] body.page-dashboard .topbar-dropdown-menu {
  background: #ffffff;
  border-color: var(--dashboard-border) !important;
  box-shadow: 0 20px 40px -30px rgba(15, 23, 42, 0.2) !important;
}

html[data-app-theme="light"] body.page-dashboard .topbar-dropdown-item:hover,
html[data-app-theme="light"] body.page-dashboard .topbar-dropdown-item:focus {
  background: rgba(var(--bs-primary-rgb), 0.1);
}

html[data-app-theme="light"] body.page-dashboard .page-title-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.98)),
    url("/modernize/assets/images/backgrounds/line-bg.svg");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right -80px bottom -84px;
  background-size: auto, 320px;
}

html[data-app-theme="light"] body.page-dashboard .workspace-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 253, 0.98)),
    url("/modernize/assets/images/backgrounds/welcome-bg.svg");
  background-repeat: no-repeat, no-repeat;
  background-position: center, right bottom;
  background-size: auto, 250px;
}

html[data-app-theme="light"] body.page-dashboard .workspace-copy,
html[data-app-theme="light"] body.page-dashboard .workspace-meta-label,
html[data-app-theme="light"] body.page-dashboard .metric-label,
html[data-app-theme="light"] body.page-dashboard .message-log-table thead th,
html[data-app-theme="light"] body.page-dashboard .qr-status-label {
  color: #5a6a85;
}

html[data-app-theme="light"] body.page-dashboard .workspace-meta-item,
html[data-app-theme="light"] body.page-dashboard .stack-item,
html[data-app-theme="light"] body.page-dashboard .endpoint-item,
html[data-app-theme="light"] body.page-dashboard .summary-item,
html[data-app-theme="light"] body.page-dashboard .stats-mini-chart-item,
html[data-app-theme="light"] body.page-dashboard .message-intent-item,
html[data-app-theme="light"] body.page-dashboard .response-status {
  background: rgba(42, 53, 71, 0.03);
}

html[data-app-theme="light"] body.page-dashboard .stats-mini-chart-track {
  background: rgba(42, 53, 71, 0.08);
  border-color: rgba(42, 53, 71, 0.06);
}

html[data-app-theme="light"] body.page-dashboard .metric-card.tone-primary {
  background: linear-gradient(180deg, rgba(93, 135, 255, 0.12), rgba(255, 255, 255, 0.96));
}

html[data-app-theme="light"] body.page-dashboard .metric-card.tone-success {
  background: linear-gradient(180deg, rgba(19, 222, 185, 0.14), rgba(255, 255, 255, 0.96));
}

html[data-app-theme="light"] body.page-dashboard .metric-card.tone-warning {
  background: linear-gradient(180deg, rgba(255, 174, 31, 0.14), rgba(255, 255, 255, 0.96));
}

html[data-app-theme="light"] body.page-dashboard .metric-card.tone-info {
  background: linear-gradient(180deg, rgba(73, 190, 255, 0.14), rgba(255, 255, 255, 0.96));
}

html[data-app-theme="light"] body.page-dashboard .metric-card.tone-danger {
  background: linear-gradient(180deg, rgba(250, 137, 107, 0.14), rgba(255, 255, 255, 0.96));
}

html[data-app-theme="light"] body.page-dashboard .response-panel {
  background: #f8fbff;
  color: #2a3547;
}

html[data-app-theme="light"] body.page-dashboard .api-doc-note {
  background: rgba(var(--bs-info-rgb), 0.08);
  border-color: rgba(var(--bs-info-rgb), 0.18);
}

html[data-app-theme="light"] body.page-dashboard .api-doc-nav-button {
  background: rgba(255, 255, 255, 0.8);
}

html[data-app-theme="light"] body.page-dashboard .api-doc-nav-button:hover,
html[data-app-theme="light"] body.page-dashboard .api-doc-nav-button:focus-visible,
html[data-app-theme="light"] body.page-dashboard .api-doc-nav-button.is-active {
  background: rgba(var(--bs-primary-rgb), 0.08);
}

html[data-app-theme="light"] body.page-dashboard .api-doc-surface {
  background: rgba(255, 255, 255, 0.78);
}

html[data-app-theme="light"] body.page-dashboard .api-doc-code {
  background: rgba(42, 53, 71, 0.035);
  color: #2a3547;
}

html[data-app-theme="light"] body.page-dashboard .message-log-table tbody tr:hover {
  background: rgba(var(--bs-primary-rgb), 0.05);
}

html[data-app-theme="light"] body.page-dashboard .qr-status-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.98));
}

html[data-app-theme="light"] body.page-dashboard .qr-preview-wrap {
  background: transparent;
}

html[data-app-theme="light"] body.page-dashboard .qr-modal-dialog {
  background: #ffffff;
  box-shadow: 0 40px 80px -44px rgba(15, 23, 42, 0.24);
}

html[data-app-theme="light"] body.page-dashboard .qr-modal-timing-label {
  color: #5a6a85;
}

html[data-app-theme="light"] body.page-dashboard .qr-loading-text {
  color: #5a6a85;
}

html[data-app-theme="light"] body.page-dashboard .qr-modal-backdrop {
  background: rgba(15, 23, 42, 0.46);
}

html[data-app-theme="light"] body.page-dashboard .qr-modal-close {
  background: rgba(42, 53, 71, 0.06);
}

html[data-app-theme="light"] body.page-dashboard .app-toast {
  background: #ffffff;
  box-shadow: 0 24px 40px -28px rgba(15, 23, 42, 0.26);
}

html[data-app-theme="light"] body.page-dashboard .app-toast-close {
  background: rgba(42, 53, 71, 0.06);
}

html[data-app-theme="light"] body.page-dashboard .app-confirm-backdrop {
  background: rgba(15, 23, 42, 0.42);
}

html[data-app-theme="light"] body.page-dashboard .app-confirm-dialog {
  background: #ffffff;
  box-shadow: 0 32px 70px -40px rgba(15, 23, 42, 0.26);
}

html[data-app-theme="light"] body.page-dashboard .form-control,
html[data-app-theme="light"] body.page-dashboard .form-select,
html[data-app-theme="light"] body.page-dashboard .form-check-input {
  background-color: #ffffff;
  border-color: var(--dashboard-border);
}

html[data-app-theme="light"] body.page-dashboard .form-control::placeholder,
html[data-app-theme="light"] body.page-dashboard .form-select::placeholder {
  color: #8aa0ba;
}

html[data-app-theme="light"] body.page-dashboard .form-select option {
  background: #ffffff;
  color: #2a3547;
}

html[data-app-theme="light"] body.page-dashboard .btn-outline-primary {
  background: transparent;
}

html[data-app-theme="light"] body.page-dashboard .dashboard-footer {
  background: var(--dashboard-topbar-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22);
}

@media (max-width: 1199.98px) {
  :root {
    --dashboard-content-gutter-x: 18px;
    --dashboard-content-gutter-y: 20px;
    --dashboard-content-gutter-bottom: 18px;
  }

  body.page-dashboard {
    overflow: auto;
  }

  #main-wrapper.dashboard-layout,
  .dashboard-page-wrapper,
  .dashboard-body-wrapper,
  .dashboard-page-wrapper .dashboard-body-wrapper > .container-fluid {
    height: auto;
    overflow: visible;
  }

  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(292px, 85vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.72);
  }

  #main-wrapper.sidebar-open .dashboard-sidebar {
    transform: translateX(0);
  }

  .dashboard-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 25, 0.58);
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1040;
  }

  #main-wrapper.sidebar-open .dashboard-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .dashboard-topbar {
    padding: 0 14px;
  }

  .dashboard-page-content {
    overflow: visible;
    padding-bottom: 0;
  }

  .workspace-title {
    max-width: none;
  }

  .dashboard-footer {
    position: relative;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .dashboard-topbar-copy {
    display: none !important;
  }

  .page-title-grid,
  .panel-header,
  .workspace-meta-item,
  .stack-item,
  .endpoint-item,
  .summary-item,
  .qr-status-item {
    flex-direction: column;
  }

  .page-title-actions,
  .panel-tools,
  .stack-item-actions {
    justify-content: flex-start;
    align-items: flex-start;
  }

  .stack-item-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cs-conversation-actions {
    width: 100%;
    min-width: 0;
  }

  .cs-action-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .device-stack-actions,
  .device-stack-buttons,
  .device-stack-feedback {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .message-intent-card,
  .qr-modal-meta {
    grid-template-columns: 1fr;
  }

  .api-doc-steps {
    grid-template-columns: 1fr;
  }

  .api-doc-workspace {
    grid-template-columns: 1fr;
  }

  .api-doc-nav-wrap {
    position: static;
  }

  .api-doc-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .api-doc-panel-grid-3 {
    grid-template-columns: 1fr;
  }

  .dashboard-card,
  .metric-card,
  .page-title-card,
  .quick-link-card,
  .qr-modal-dialog {
    border-radius: 18px;
  }

  .qr-modal {
    padding: 16px;
  }

  .qr-modal-header,
  .qr-modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .qr-modal-footer .d-flex {
    width: auto;
    flex-direction: row;
  }

  .qr-modal-footer .btn {
    width: auto;
  }

  .qr-preview-wrap {
    min-height: 240px;
  }

  .qr-preview-wrap-modal {
    min-height: 280px;
  }

  .topbar-profile-trigger {
    max-width: 100%;
  }

  .workspace-actions .btn,
  .page-title-actions .btn {
    width: 100%;
  }

  .dashboard-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
    padding: 12px 0;
  }

  .dashboard-footer-meta {
    justify-content: flex-start;
  }
}
