body.saas-modal-open {
  overflow: hidden;
}

body.saas-ui .saas-modal-layout {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

body.saas-ui .saas-workflow-launcher {
  position: sticky;
  top: 126px;
  padding: 22px;
  border-radius: var(--saas-radius-xl);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}

body.saas-ui .saas-launch-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.saas-ui .saas-launch-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--saas-primary-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.saas-ui .saas-launch-title-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

body.saas-ui .saas-launch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 118, 110, 0.12));
  font-size: 20px;
}

body.saas-ui .saas-launch-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--saas-text);
}

body.saas-ui .saas-launch-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--saas-muted);
}

body.saas-ui .saas-launch-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

body.saas-ui .saas-launch-state.is-ready {
  background: rgba(34, 197, 94, 0.12);
  color: var(--saas-success);
}

body.saas-ui .saas-launch-state.is-pending {
  background: rgba(245, 158, 11, 0.12);
  color: var(--saas-warning);
}

body.saas-ui .saas-launch-copy {
  font-size: 13px;
  line-height: 1.7;
  color: var(--saas-muted);
}

body.saas-ui .saas-launch-chips {
  display: grid;
  gap: 10px;
}

body.saas-ui .saas-launch-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

body.saas-ui .saas-launch-chip-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saas-muted);
}

body.saas-ui .saas-launch-chip-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--saas-text);
}

body.saas-ui .saas-panel-open-btn {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #1d4ed8 0%, #0f766e 100%);
  color: white;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(29, 78, 216, 0.2);
}

body.saas-ui .saas-panel-open-btn:hover {
  transform: translateY(-1px);
}

body.saas-ui .saas-panel-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 16, 31, 0.6);
  backdrop-filter: blur(14px);
  z-index: 5000;
}

body.saas-ui .saas-panel-modal.active {
  display: flex;
}

body.saas-ui .saas-panel-sheet {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 40px 90px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.saas-ui .saas-panel-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 118, 110, 0.08));
}

body.saas-ui .saas-panel-modal-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saas-primary-strong);
  margin-bottom: 6px;
}

body.saas-ui .saas-panel-modal-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--saas-text);
}

body.saas-ui .saas-panel-modal-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--saas-muted);
}

body.saas-ui .saas-panel-modal-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--saas-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

body.saas-ui .saas-panel-modal-body {
  overflow: auto;
  padding: 0;
}

body.saas-ui .saas-panel-modal .config-panel {
  position: static;
  top: auto;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 24px 24px 138px;
}

body.saas-ui .saas-panel-modal .config-panel::-webkit-scrollbar {
  width: 0;
}

body.saas-ui .saas-panel-modal .saas-action-dock {
  bottom: 0;
  margin: 26px -24px -24px;
  padding: 18px 24px 24px;
}

@media (max-width: 1200px) {
  body.saas-ui .saas-modal-layout {
    grid-template-columns: 1fr;
  }

  body.saas-ui .saas-workflow-launcher {
    position: static;
    min-height: auto;
  }
}

@media (max-width: 900px) {
  body.saas-ui .saas-panel-modal {
    padding: 12px;
  }

  body.saas-ui .saas-panel-sheet {
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }

  body.saas-ui .saas-panel-modal-header {
    padding: 16px 18px;
  }

  body.saas-ui .saas-panel-modal .config-panel {
    padding: 18px 18px 118px;
  }

  body.saas-ui .saas-panel-modal .saas-action-dock {
    margin: 22px -18px -18px;
    padding: 16px 18px 18px;
  }
}
