/* =====================================================
   QUICK CONFIG — Smart Quick Setup Page (v2)
   ===================================================== */

/* ─────────────────────────────────────────────────────
   Global Panel
───────────────────────────────────────────────────── */

.qc-global-panel {
  background: var(--black-muted);
  border: 1px solid var(--white-a10);
  border-top: 2px solid var(--white-a20);
  border-radius: var(--radius-xl);
  margin-bottom: 28px;
  /*overflow: visible — required so dropdown-content can escape this panel;*/
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  position: relative;
  z-index: 2;
}

.qc-global-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  background: linear-gradient(135deg, var(--black-light) 0%, #0f0f0f 100%);
  border-bottom: 1px solid var(--white-faint);
  border-radius: calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px) 0 0;
  flex-wrap: wrap;
}

.qc-global-panel-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qc-global-panel-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--white-ghost);
  border: 1px solid var(--white-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--white-muted);
}

.qc-global-panel-title {
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white);
  margin: 0 0 2px;
}

.qc-global-panel-subtitle {
  font-family: var(--font-family);
  font-size: 0.75rem;
  color: var(--white-dim);
  margin: 0;
}

.qc-global-apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-muted);
  background: var(--white-a08);
  border: 1px solid var(--white-a12);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.qc-global-apply-btn:hover {
  background: var(--white-a15);
  border-color: var(--white-a20);
  color: var(--white);
}

.qc-global-apply-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.qc-global-panel-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 22px;
}

.qc-global-field {
}

.qc-global-field-label {
  display: block;
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.qc-global-field-hint {
  font-family: var(--font-family);
  font-size: 0.7rem;
  color: var(--white-dim);
  opacity: 0.7;
  margin-top: 5px;
  margin-bottom: 0;
}

.qc-global-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qc-global-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--white-faint);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.qc-global-color-swatch input[type="color"] {
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
  position: absolute;
}

.qc-global-color-swatch-preview {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}

.qc-global-footer-input {
  width: 100%;
  background: var(--black-light);
  border: 1px solid var(--white-faint);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-family: var(--font-family);
  font-size: 0.875rem;
  color: var(--white);
  transition: border-color 0.15s ease;
}

.qc-global-footer-input::placeholder {
  color: var(--white-dim);
}

.qc-global-footer-input:focus {
  outline: none;
  border-color: var(--white-a20);
}

/* ─────────────────────────────────────────────────────
   Detection Bar
───────────────────────────────────────────────────── */

.qc-detection-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(109, 213, 255, 0.04) 0%, rgba(255, 158, 228, 0.03) 100%);
  border: 1px solid var(--white-a10);
  border-left: 3px solid var(--blue-bright);
  border-radius: var(--radius-xl);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.qc-detection-bar-label {
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-muted);
  white-space: nowrap;
  margin-right: 4px;
}

.qc-detection-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  border: 1px solid transparent;
}

.qc-detection-stat.is-auto {
  background: var(--success-faint);
  color: var(--success-light);
  border-color: var(--success-a15);
}

.qc-detection-stat.is-pending {
  background: rgba(250, 190, 40, 0.08);
  color: #fabe28;
  border-color: rgba(250, 190, 40, 0.2);
}

.qc-detection-stat.is-create {
  background: var(--blue-faint);
  color: var(--blue-light);
  border-color: var(--blue-a15);
}

.qc-detection-stat::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.qc-detect-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-muted);
  background: var(--white-ghost);
  border: 1px solid var(--white-faint);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  margin-left: auto;
}

.qc-detect-btn:hover {
  background: var(--white-a10);
  border-color: var(--white-a20);
  color: var(--white);
}

.qc-detect-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.qc-detection-bar-spacer {
  flex: 1;
}

/* ─────────────────────────────────────────────────────
   Suggestion Chips
───────────────────────────────────────────────────── */

.qc-suggest-area {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  transition: min-height 0.2s ease;
}

.qc-suggest-area:empty {
  display: none;
}

.qc-suggest-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-family: var(--font-family);
  font-size: 0.72rem;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: default;
  transition: opacity 0.2s ease;
}

/* auto — auto-filled (green) */

.qc-suggest-chip.is-auto {
  background: var(--success-faint);
  color: var(--success-light);
  border-color: var(--success-a15);
}

.qc-suggest-chip.is-auto::before {
  content: '✓';
  font-size: 0.68rem;
}

/* pending — suggestion to accept (yellow) */

.qc-suggest-chip.is-pending {
  background: rgba(250, 190, 40, 0.08);
  color: #fabe28;
  border-color: rgba(250, 190, 40, 0.2);
}

.qc-suggest-chip.is-pending::before {
  content: '?';
  font-weight: bold;
  font-size: 0.68rem;
}

/* create — no match, create new (blue dashed) */

.qc-suggest-chip.is-create {
  background: var(--blue-faint);
  color: var(--blue-light);
  border: 1px dashed var(--blue-a30);
  cursor: pointer;
}

/* creating — in progress spinner */

.qc-suggest-chip.is-creating {
  background: var(--blue-faint);
  color: var(--blue-light);
  border-color: var(--blue-a15);
  opacity: 0.7;
}

.qc-suggest-chip.is-creating::before {
  content: '';
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: qc-spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* created — success */

.qc-suggest-chip.is-created {
  background: var(--success-faint);
  color: var(--success-light);
  border-color: var(--success-a15);
}

.qc-suggest-chip.is-created::before {
  content: '✓';
  font-size: 0.68rem;
}

/* failed */

.qc-suggest-chip.is-failed {
  background: rgba(235, 80, 80, 0.08);
  color: #f38ba8;
  border-color: rgba(235, 80, 80, 0.2);
}

.qc-suggest-chip-action {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0 2px;
  font-family: var(--font-family);
  font-size: 0.72rem;
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  line-height: 1;
  transition: opacity 0.15s ease;
}

.qc-suggest-chip-action:hover {
  opacity: 0.8;
}

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

/* ─────────────────────────────────────────────────────
   Module Enable Toggle
───────────────────────────────────────────────────── */

.qc-module-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 99px;
  font-family: var(--font-family);
  font-size: 0.72rem;
  font-weight: var(--font-weight-semibold);
  border: 1px solid var(--white-faint);
  background: var(--white-ghost);
  color: var(--white-dim);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.qc-module-toggle:hover {
  background: var(--white-a10);
  border-color: var(--white-a20);
}

.qc-module-toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white-dim);
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.qc-module-toggle.is-enabled {
  background: var(--success-faint);
  color: var(--success-light);
  border-color: var(--success-a15);
}

.qc-module-toggle.is-enabled .qc-module-toggle-dot {
  background: var(--success);
}

.qc-module-toggle.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.qc-module-toggle.is-loading .qc-module-toggle-dot {
  background: none;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: qc-spin 0.7s linear infinite;
}

/* disabled overlay on card */

.quickConfig-card[data-enabled="false"] .quickConfig-card-body {
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

/* ---- Page Header ---- */

.quickConfig-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.quickConfig-header-text h1 {
  font-family: var(--font-family);
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--white);
  margin: 0 0 6px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.quickConfig-header-text p {
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: var(--white-dim);
  margin: 0;
}

/* ---- Progress Bar ---- */

.quickConfig-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 220px;
}

.quickConfig-progress-track {
  width: 100%;
  height: 6px;
  background: var(--white-ghost);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--white-faint);
}

.quickConfig-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink-bright), var(--pink-light));
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--pink-a20);
}

.quickConfig-progress-label {
  font-family: var(--font-family);
  font-size: 0.8rem;
  color: var(--white-dim);
  white-space: nowrap;
}

.quickConfig-progress-label strong {
  color: var(--white-muted);
  font-weight: var(--font-weight-semibold);
}

/* ---- Category Section ---- */

.quickConfig-section {
  margin-bottom: 32px;
}

.quickConfig-section-title {
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: var(--font-weight-bold);
  color: var(--white);
  margin: 0 0 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white-ghost);
  border: 1px solid var(--white-faint);
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  letter-spacing: 0.01em;
}

.quickConfig-section-title i {
  color: var(--pink);
  font-size: 0.875rem;
  opacity: 0.9;
  flex-shrink: 0;
}

/* ---- Card Grid → vertical accordion stack ---- */

.quickConfig-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- Module Card (collapsible row) ---- */

.quickConfig-card {
  background: var(--black-muted);
  border: 1px solid var(--white-a08);
  border-left: 3px solid transparent;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  /*overflow: visible — required so dropdowns render outside card bounds;*/
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  transition: border-color 0.2s ease, border-left-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  z-index: 1;
}

.quickConfig-card[data-configured="true"] {
  border-left-color: var(--success);
}

/* Lift card above siblings when a dropdown inside it is focused/open */

.quickConfig-card:focus-within {
  z-index: 20;
}

.quickConfig-card.is-expanded {
  background: var(--black);
  border-color: var(--white-a15);
  box-shadow: 0 6px 28px rgba(0,0,0,0.45);
  z-index: 5;
}

.quickConfig-card:not(.is-expanded):hover {
  border-color: var(--white-a12);
  background: #131313;
}

/* ---- Card Header (clickable accordion handle) ---- */

.quickConfig-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: transparent;
  border-bottom: 1px solid transparent;
  border-radius: calc(var(--radius-lg) - 1px);
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  transition: border-bottom-color 0.2s ease, background 0.2s ease;
}

.quickConfig-card.is-expanded .quickConfig-card-header {
  border-bottom-color: var(--white-faint);
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
  background: linear-gradient(135deg, #0e0e0e 0%, var(--black-muted) 100%);
}

.quickConfig-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--white-a06);
  border: 1px solid var(--white-a12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white-muted);
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quickConfig-card[data-configured="true"] .quickConfig-card-icon {
  background: var(--success-faint);
  border-color: var(--success-a20);
  color: var(--success-light);
  box-shadow: 0 0 14px var(--success-dim);
}

.quickConfig-card-info {
  flex: 1;
  min-width: 0;
}

.quickConfig-card-title {
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white);
  margin: 0 0 2px;
  line-height: 1.3;
}

.quickConfig-card-description {
  font-family: var(--font-family);
  font-size: 0.74rem;
  color: var(--white-dim);
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Chevron indicator on accordion header ---- */

.quickConfig-card-chevron {
  color: var(--white-dim);
  font-size: 0.78rem;
  flex-shrink: 0;
  margin-left: 4px;
  transition: transform 0.25s ease, color 0.2s ease;
}

.quickConfig-card.is-expanded .quickConfig-card-chevron {
  transform: rotate(180deg);
  color: var(--white);
}

.quickConfig-card-header:hover .quickConfig-card-chevron {
  color: var(--white-muted);
}

/* ---- Status Badge ---- */

.quickConfig-card-status {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.quickConfig-card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-family: var(--font-family);
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  background: var(--white-ghost);
  color: var(--white-dim);
  border: 1px solid var(--white-faint);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.quickConfig-card-status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white-dim);
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.quickConfig-card-status-badge.is-configured {
  background: var(--success-faint);
  color: var(--success-light);
  border-color: var(--success-a15);
}

.quickConfig-card-status-badge.is-configured::before {
  background: var(--success);
}

/* ---- Card Body ---- */

.quickConfig-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

/* Collapsed state: body + footer are hidden */

.quickConfig-card:not(.is-expanded) > .quickConfig-card-body, .quickConfig-card:not(.is-expanded) > .quickConfig-card-footer {
  display: none !important;
}

/* Tighten standard inputs inside card body */

.quickConfig-card-body .dashboardInput-text-wrapper, .quickConfig-card-body .dashboardInput-number-wrapper {
  margin-bottom: 0;
  max-width: 100%;
}

.quickConfig-card-body .input-group.dashboardInput-dropdown-wrapper {
  flex-direction: column;
  gap: 4px;
}

.quickConfig-card-body .dashboardInput-dropdown-label {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: none;
}

.quickConfig-card-body .dashboard-dropdown {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border-top: none;
}

.quickConfig-card-body .dashboardInputs-switch-group {
  padding: 10px 12px;
  border-bottom: none;
  border-radius: var(--radius-md);
  background: var(--white-ghost);
  border: 1px solid var(--white-faint);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.quickConfig-card-body .dashboardInputs-switch-group:hover {
  background: var(--white-a06);
  border-color: var(--white-a12);
}

/* ---- Panel Summary (panel-type cards) ---- */

.quickConfig-panel-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 8px;
  text-align: center;
  flex: 1;
}

.quickConfig-panel-count {
  font-family: var(--font-family);
  font-size: 2rem;
  font-weight: var(--font-weight-bold);
  color: var(--white);
  line-height: 1;
}

.quickConfig-panel-count-label {
  font-family: var(--font-family);
  font-size: 0.8125rem;
  color: var(--white-dim);
}

.quickConfig-panel-hint {
  font-family: var(--font-family);
  font-size: 0.75rem;
  color: var(--white-dim);
  opacity: 0.7;
  max-width: 260px;
  line-height: 1.5;
}

/* ---- Card Footer ---- */

.quickConfig-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--white-faint);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  background: transparent;
  border-radius: 0 0 calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px);
}

.quickConfig-card-navBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: 0.78rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-dim);
  background: var(--white-ghost);
  border: 1px solid var(--white-faint);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.quickConfig-card-navBtn:hover {
  background: var(--white-a08);
  border-color: var(--white-a15);
  color: var(--white);
}

.quickConfig-card-navBtn i {
  font-size: 0.72rem;
  opacity: 0.6;
}

/* ---- Divider inside card body ---- */

.quickConfig-card-body .dashboardLayout-divider {
  margin: 6px 0;
}

/* ---- Section label inside card body ---- */

.quickConfig-field-label {
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white-dim);
  margin-bottom: 10px;
  display: block;
}

/* ---- Responsive ---- */

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

@media (max-width: 900px) {
  .quickConfig-header {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 900px) {
  .quickConfig-progress {
    align-items: stretch;
    min-width: unset;
  }
}

@media (max-width: 600px) {
  .quickConfig-header-text h1 {
    font-size: 1.375rem;
  }
}

/* =====================================================
   QUICK CONFIG WIZARD (v3) - Step-by-step setup
   ===================================================== */

/* ---- Wizard root overlay ---- */

.qc-wizard-root {
  background: var(--black-muted);
  border: 1px solid var(--white-a10);
  border-top: 3px solid var(--pink);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--pink-a08);
  padding: 28px 32px 24px;
  margin-bottom: 28px;
  position: relative;
  z-index: 3;
}

.qc-wizard-root[hidden] {
  display: none !important;
}

.qc-wizard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.qc-wizard-header h2 {
  font-family: var(--font-family);
  font-size: 1.4rem;
  font-weight: var(--font-weight-bold);
  color: var(--white);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.qc-wizard-header p {
  font-family: var(--font-family);
  font-size: 0.85rem;
  color: var(--white-dim);
  margin: 0;
  max-width: 540px;
}

.qc-wizard-exit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-dim);
  background: var(--white-ghost);
  border: 1px solid var(--white-faint);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.qc-wizard-exit:hover {
  background: var(--white-a10);
  color: var(--white);
}

/* ---- Progress rail ---- */

.qc-wizard-rail {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  padding: 0;
}

.qc-wizard-rail-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white-dim);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
}

.qc-wizard-rail-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--white-a06);
  border: 1px solid var(--white-a12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--white-dim);
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.qc-wizard-rail-step.is-active .qc-wizard-rail-step-num {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--black);
  box-shadow: 0 0 14px var(--pink-a30);
}

.qc-wizard-rail-step.is-done .qc-wizard-rail-step-num {
  background: var(--success-faint);
  border-color: var(--success-a30);
  color: var(--success-light);
}

.qc-wizard-rail-step.is-done .qc-wizard-rail-step-num::before {
  content: '?';
}

.qc-wizard-rail-step.is-active {
  color: var(--white);
}

.qc-wizard-rail-connector {
  flex: 1;
  height: 2px;
  background: var(--white-faint);
  margin: 0 14px;
  border-radius: 99px;
}

.qc-wizard-rail-step.is-done + .qc-wizard-rail-connector, .qc-wizard-rail-step.is-active + .qc-wizard-rail-connector {
  background: var(--white-a20);
}

/* ---- Step container ---- */

.qc-wizard-step {
  display: none;
}

.qc-wizard-step.is-active {
  display: block;
}

.qc-wizard-step-title {
  font-family: var(--font-family);
  font-size: 1.05rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white);
  margin: 0 0 6px;
}

.qc-wizard-step-subtitle {
  font-family: var(--font-family);
  font-size: 0.82rem;
  color: var(--white-dim);
  margin: 0 0 20px;
}

/* ---- Palette generator (Step 1) ---- */

.qc-palette-card {
  background: var(--black-light);
  border: 1px solid var(--white-a10);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.qc-palette-base-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.qc-palette-base-row label {
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-muted);
}

.qc-palette-base-input {
  width: 44px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--white-faint);
  border-radius: var(--radius-sm);
  background: var(--black);
  cursor: pointer;
}

.qc-palette-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.78rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-muted);
  background: var(--white-a08);
  border: 1px solid var(--white-a12);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.qc-palette-generate-btn:hover {
  background: var(--white-a15);
  color: var(--white);
}

.qc-palette-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.qc-palette-swatch {
  background: var(--black);
  border: 1px solid var(--white-faint);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qc-palette-swatch-label {
  font-family: var(--font-family);
  font-size: 0.7rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.qc-palette-swatch-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qc-palette-swatch input[type="color"] {
  width: 36px;
  height: 28px;
  padding: 1px;
  border: 1px solid var(--white-faint);
  border-radius: var(--radius-sm);
  background: var(--black);
  cursor: pointer;
}

.qc-palette-swatch-hex {
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--white-muted);
}

.qc-palette-swatch-bar {
  height: 6px;
  border-radius: 99px;
  background: #B4E4FF;
  transition: background 0.2s ease;
}

/* ---- Scope cards (Step 2) ---- */

.qc-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.qc-scope-card {
  background: var(--black-light);
  border: 1px solid var(--white-a10);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}

.qc-scope-card:hover {
  border-color: var(--white-a20);
  background: var(--white-a06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.qc-scope-card.is-selected {
  border-color: var(--pink);
  background: var(--pink-a08);
  box-shadow: 0 0 0 1px var(--pink), 0 4px 20px var(--pink-a12);
}

.qc-scope-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--white-a06);
  border: 1px solid var(--white-a12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-muted);
  font-size: 1rem;
  margin-bottom: 12px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.qc-scope-card.is-selected .qc-scope-card-icon {
  background: var(--pink-faint);
  border-color: var(--pink-a20);
  color: var(--pink);
}

.qc-scope-card-title {
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white);
  margin: 0 0 4px;
}

.qc-scope-card-desc {
  font-family: var(--font-family);
  font-size: 0.78rem;
  color: var(--white-dim);
  margin: 0;
  line-height: 1.4;
}

/* ---- Run-mode row (Guided vs Auto-setup) ---- */

.qc-runmode-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--white-faint);
}

.qc-runmode-label {
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.qc-runmode-row {
  display: flex;
  gap: 10px;
}

.qc-runmode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--black-muted);
  border: 1px solid var(--white-faint);
  border-radius: var(--radius-lg);
  color: var(--white);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.qc-runmode-btn > i {
  font-size: 1.2rem;
  color: var(--white-dim);
  flex-shrink: 0;
  transition: color 0.15s;
}

.qc-runmode-btn > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qc-runmode-btn strong {
  font-size: 0.9rem;
  font-weight: var(--font-weight-semibold);
}

.qc-runmode-btn span {
  font-size: 0.77rem;
  color: var(--white-dim);
  line-height: 1.35;
}

.qc-runmode-btn:hover {
  background: var(--white-a06);
  border-color: var(--white-a12);
}

.qc-runmode-btn.is-selected {
  border-color: var(--pink);
  background: var(--pink-a08, rgba(255,105,180,0.08));
  box-shadow: 0 0 0 1px var(--pink);
}

.qc-runmode-btn.is-selected > i {
  color: var(--pink);
}

@media (max-width: 520px) {
  .qc-runmode-row {
    flex-direction: column;
  }
}

/* ---- Module checkbox grid (when "Configure specific" is chosen) ---- */

.qc-scope-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--white-faint);
}

.qc-scope-module-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--black-light);
  border: 1px solid var(--white-faint);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  font-family: var(--font-family);
  font-size: 0.78rem;
  color: var(--white-muted);
}

.qc-scope-module-pill:hover {
  background: var(--white-a08);
}

.qc-scope-module-pill input {
  accent-color: var(--pink);
  cursor: pointer;
}

.qc-scope-module-pill.is-checked {
  border-color: var(--pink);
  background: var(--white-a08);
  color: var(--white);
}

/* ---- Per-module step (Step 3) ---- */

.qc-wizard-module-progress {
  font-family: var(--font-family);
  font-size: 0.74rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.qc-wizard-module-card {
  background: var(--black-light);
  border: 1px solid var(--white-a10);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.qc-wizard-module-card .qc-suggest-area {
  margin-top: -8px;
  margin-bottom: 6px;
}

.qc-proposal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--white-ghost);
  font-family: var(--font-family);
  font-size: 0.82rem;
}

.qc-proposal-row:last-child {
  border-bottom: none;
}

.qc-proposal-row-label {
  color: var(--white-dim);
}

.qc-proposal-row-value {
  color: var(--white);
  font-weight: var(--font-weight-semibold);
}

.qc-proposal-row-value.is-create {
  color: var(--blue-light);
  border: 1px dashed var(--blue-a30);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.74rem;
}

/* Level-roles widget */

.qc-level-roles-widget {
  margin-top: 14px;
}

.qc-level-roles-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.qc-level-roles-controls label {
  font-family: var(--font-family);
  font-size: 0.78rem;
  color: var(--white-muted);
}

.qc-level-roles-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.qc-level-role-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 99px;
  background: var(--black);
  border: 1px solid var(--white-faint);
  font-family: var(--font-family);
  font-size: 0.74rem;
  color: var(--white-muted);
}

.qc-level-role-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---- Wizard actions footer ---- */

.qc-wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--white-faint);
}

.qc-wizard-actions-left, .qc-wizard-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qc-wizard-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.83rem;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.qc-wizard-btn-secondary {
  color: var(--white-dim);
  background: var(--white-ghost);
  border: 1px solid var(--white-faint);
}

.qc-wizard-btn-secondary:hover {
  background: var(--white-a10);
  color: var(--white);
}

.qc-wizard-btn-primary {
  color: var(--black);
  background: var(--pink);
  border: 1px solid var(--pink);
  box-shadow: 0 0 14px var(--pink-a20);
}

.qc-wizard-btn-primary:hover {
  opacity: 0.9;
  box-shadow: 0 0 20px var(--pink-a30);
}

.qc-wizard-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ---- Header CTA: "Run Setup Wizard" ---- */

.qc-launch-wizard-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.78rem;
  font-weight: var(--font-weight-semibold);
  color: var(--black);
  background: var(--pink);
  border: 1px solid var(--pink);
  cursor: pointer;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  margin-left: 10px;
}

.qc-launch-wizard-btn:hover {
  opacity: 0.9;
}

/* ---- Per-card "Smart Configure" button ---- */

.qc-smart-config-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.72rem;
  font-weight: var(--font-weight-semibold);
  color: var(--white-muted);
  background: var(--white-a08);
  border: 1px solid var(--white-a12);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  margin-right: 8px;
}

.qc-smart-config-btn:hover {
  background: var(--white-a15);
  color: var(--white);
}

/* =====================================================
   Panel-module card body (Tickets / Self Roles)
   ===================================================== */

.qc-panel-module-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qc-panel-module-count-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.qc-panel-module-count {
  font-family: var(--font-family);
  font-size: 1.75rem;
  font-weight: var(--font-weight-bold);
  color: var(--white);
  line-height: 1;
}

.qc-panel-module-count-label {
  font-family: var(--font-family);
  font-size: 0.8rem;
  color: var(--white-dim);
}

.qc-panel-module-desc {
  font-family: var(--font-family);
  font-size: 0.8rem;
  color: var(--white-dim);
  line-height: 1.5;
  margin: 0;
  background: var(--white-ghost);
  border: 1px solid var(--white-faint);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.qc-panel-module-desc strong {
  color: var(--white-muted);
  font-weight: var(--font-weight-semibold);
}

/* Quick Setup button — per-card CTA */

.qc-module-quick-setup {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: var(--font-weight-semibold);
  color: var(--black);
  background: var(--pink);
  border: 1px solid var(--pink);
  cursor: pointer;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  align-self: flex-start;
  box-shadow: 0 0 12px var(--pink-a20);
}

.qc-module-quick-setup:hover {
  opacity: 0.9;
  box-shadow: 0 0 20px var(--pink-a30);
}

/* =====================================================
   Wizard visual overhaul
   ===================================================== */

/* Give the wizard a strong top accent line */

.qc-wizard-root {
  border-top: 2px solid var(--pink) !important;
}

/* Step container body — add light inner background */

.qc-wizard-step.is-active > .qc-palette-card, .qc-wizard-step.is-active > .qc-scope-grid {
  animation: qc-fade-in 0.18s ease;
}

@keyframes qc-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scope card — stronger selected ring */

.qc-scope-card.is-selected {
  border-color: var(--pink);
  box-shadow: 0 0 0 1px var(--pink);
}

/* Proposal rows — left accent by type */

.qc-proposal-row {
  border-left: 2px solid transparent;
  padding-left: 10px;
  border-bottom: 1px solid var(--white-ghost);
}

.qc-proposal-row:has(.is-create) {
  border-left-color: var(--blue-light);
}

.qc-proposal-row:not(:has(.is-create)):not(:last-child) {
  border-left-color: var(--white-a12);
}

/* Proposal value for creates — clearer */

.qc-proposal-row-value.is-create {
  color: var(--blue-light);
  border: 1px dashed var(--blue-a30);
  background: var(--blue-faint);
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: var(--font-weight-semibold);
}

/* Module card header inside wizard — icon row */

.qc-wizard-module-card .qc-wizard-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--white-faint);
  margin-bottom: 14px;
  font-size: 1rem;
}

.qc-wizard-module-card .qc-wizard-step-title i {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--white-ghost);
  border: 1px solid var(--white-faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  color: var(--white-muted);
  margin-right: 0;
}

/* Palette swatch bar — taller */

.qc-palette-swatch-bar {
  height: 10px;
}

/* Palette card — subtle inner border */

.qc-palette-card {
  border: 1px solid var(--white-a12);
  background: var(--black-light);
}

/* Rail connector fills for done steps */

.qc-wizard-rail-step.is-done + .qc-wizard-rail-connector {
  background: var(--success-a30);
}

/* Scope module pills — grid tighter on small screens */

@media (max-width: 520px) {
  .qc-scope-modules {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .qc-palette-preview {
    grid-template-columns: 1fr 1fr;
  }
}

/* =====================================================
   VISUAL OVERHAUL ADDITIONS (v3.1)
   ===================================================== */

/* Page header � stronger h1 */

.quickConfig-header-text h1 {
  font-size: 1.875rem;
  letter-spacing: -0.03em;
}

/* Section spacing */

.quickConfig-section {
  margin-bottom: 52px;
}

/* Status badge � cleaner "Enabled" chip */

.quickConfig-card-status-badge.is-enabled {
  background: var(--pink-faint);
  color: var(--pink-light);
  border-color: var(--pink-a20);
}

.quickConfig-card-status-badge.is-enabled::before {
  background: var(--pink);
}

/* Panel summary (customCommands / stickyMessages) � better centered */

.quickConfig-panel-summary {
  gap: 6px;
  padding: 20px 12px;
}

.quickConfig-panel-count {
  font-size: 2.25rem;
  background: linear-gradient(135deg, var(--white), var(--white-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Detection bar label */

.qc-detection-bar-label {
  color: var(--blue-light);
}

/* Wizard actions border */

.qc-wizard-actions {
  border-top-color: var(--white-a12);
}

/* Wizard rail connector when step done */

.qc-wizard-rail-step.is-done + .qc-wizard-rail-connector {
  background: var(--success-a30);
}

.qc-wizard-rail-step.is-active + .qc-wizard-rail-connector {
  background: var(--pink-a20);
}

/* Wizard done checkmark */

.qc-wizard-rail-step.is-done .qc-wizard-rail-step-num::before {
  content: '\2713';
}

/* Proposal rows � left-accent by type */

.qc-proposal-row {
  padding-left: 12px;
  border-left: 2px solid var(--white-ghost);
}

.qc-proposal-row:has(.is-create) {
  border-left-color: var(--blue-a30);
}

.qc-proposal-row-value.is-create {
  color: var(--blue-light);
  border: 1px dashed var(--blue-a30);
  background: var(--blue-faint);
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: var(--font-weight-semibold);
}

/* Module pill checked highlight */

.qc-scope-module-pill.is-checked {
  background: var(--pink-a08);
  border-color: var(--pink);
  color: var(--pink-light);
}

/* Palette swatch bar taller */

.qc-palette-swatch-bar {
  height: 10px;
}

/* Palette swatch � subtler background */

.qc-palette-swatch {
  background: var(--black-muted);
  border-color: var(--white-a10);
}

/* Card body input wrappers � remove extra bottom margin that creates uneven gaps */

.quickConfig-card-body .dashboardInput-text-wrapper, .quickConfig-card-body .dashboardInput-number-wrapper {
  margin-bottom: 0;
}

/* Quick setup btn in voiceHubs card body � override inline margin */

.quickConfig-card-body .qc-module-quick-setup {
  margin-top: 2px !important;
}

/* Heading font smoothing */

.quickConfig-header-text h1, .qc-wizard-header h2, .quickConfig-section-title {
  -webkit-font-smoothing: antialiased;
}

/* Smaller screens */

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

@media (max-width: 900px) {
  .quickConfig-card:hover {
    transform: none;
  }
}

@media (max-width: 600px) {
  .quickConfig-header-text h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .qc-wizard-root {
    padding: 20px 18px 18px;
  }
}

@media (max-width: 600px) {
  .qc-scope-grid {
    grid-template-columns: 1fr;
  }
}

