/* ===============================
   Case Wizard (scoped)
================================ */
.wizard .wizard-shell {
  overflow: hidden;
}

.wizard .wizard-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: 640px;
}

/* Sidebar */
.wizard .wizard-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.1);
  padding: 16px 14px;
}

.wizard .wizard-side-hd {
  padding: 8px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}

.wizard .wizard-title {
  font-weight: 950;
  letter-spacing: 0.2px;
  font-size: 15px;
}

.wizard .wizard-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted2);
  font-weight: 650;
}

.wizard .step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.wizard .step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  user-select: none;
  font-size: 14px;
}

.wizard .step-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.wizard .step-item.active {
  border-color: rgba(64, 255, 192, 0.26);
  background: rgba(64, 255, 192, 0.08);
}

.wizard .step-dot {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.wizard .step-item.active .step-dot {
  background: rgba(64, 255, 192, 0.16);
  border-color: rgba(64, 255, 192, 0.34);
  color: rgba(255, 255, 255, 0.95);
}

/* Content */
.wizard .wizard-content {
  padding: 16px;
}

.wizard .wizard-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
  margin-bottom: 14px;
}

.wizard .wizard-top-title {
  font-weight: 950;
  letter-spacing: 0.2px;
  font-size: 16px;
}

.wizard .wizard-top-hint {
  margin-top: 4px;
  color: var(--muted2);
  font-size: 12.5px;
  font-weight: 650;
}

.wizard .wizard-top-right {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.wizard .wizard-step-meta {
  color: var(--muted2);
  font-weight: 800;
  font-size: 12.5px;
}

.wizard .wizard-progress {
  width: 280px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.wizard .wizard-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, var(--teal2), var(--teal));
}

/* Cards */
.wizard .wizard-card {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.wizard .wizard-card-hd {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wizard .wizard-card-title {
  font-weight: 950;
  letter-spacing: 0.2px;
}

.wizard .wizard-card-bd {
  padding: 16px;
}

.wizard .wizard-card-sub {
  margin-top: 4px;
  font-size: 12.5px;
}

/* Grid helpers */
.wizard .wizard-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wizard .span-2 {
  grid-column: 1 / -1;
}

.wizard .input-like {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.wizard .wizard-date-range {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wizard .wizard-date-range input {
  flex: 1;
}

/* Make wizard fields match settings fields */
.wizard .field input,
.wizard .field select,
.wizard .field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.92);
  outline: none;
  font-weight: 100;
}

.wizard .field input:focus,
.wizard .field select:focus,
.wizard .field textarea:focus {
  border-color: rgba(64, 255, 192, 0.35);
  box-shadow: 0 0 0 4px rgba(64, 255, 192, 0.12);
}

.wizard input[type="date"],
.wizard input[type="datetime-local"] {
  color-scheme: dark;
}

/* Actions */
.wizard .wizard-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.wizard .wizard-actions.split {
  justify-content: space-between;
}

/* Dechefr file upload */
.file-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-weight: 700;
}

.file-btn:hover {
  border-color: rgba(64, 255, 192, 0.9);
  background: rgba(64, 255, 192, 0.08);
}

.file-btn svg {
  width: 18px;
  height: 18px;
}

.file-list {
  font-size: 13px;
  line-height: 1.4;
}

.file-list .file-item {
  display: block;
}

/* Radios (theme) */
.wizard .wizard-radio-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wizard .radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 750;
  color: rgba(255, 255, 255, 0.86);
  user-select: none;
}

.wizard .radio input {
  display: none;
}

.wizard .radio span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.wizard .radio input:checked + span {
  border-color: rgba(64, 255, 192, 0.45);
  background: rgba(64, 255, 192, 0.1);
}

.wizard .radio input:checked + span::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: rgba(64, 255, 192, 0.85);
}

/* Allow dropdown menus to extend outside panel/card in the wizard only */
.wizard .wizard-shell {
  overflow: visible; /* overrides .panel overflow:hidden */
}

.wizard .wizard-card {
  overflow: visible; /* so the dropdown menu isn't clipped */
}

/* Keep nice rounded corners even without overflow clipping */
.wizard .wizard-card-hd {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.wizard .wizard-card-bd {
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

/* Ensure menu is above everything */
.wizard .dropdown-menu {
  z-index: 9999;
}

/* Loading */
/* Fullscreen overlay, centered content */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

/* Card matches your panel aesthetic */
.loading-card {
  width: min(640px, calc(100vw - 32px));
  border-radius: 16px;
  padding: 18px 18px 16px;
  background: rgba(24, 24, 24, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.55);
}

.loading-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.loading-sub {
  font-size: 13px;
  margin-bottom: 14px;
}

/* Steps row */
.loading-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.loading-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.55;
}

.loading-step .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.loading-step .label {
  font-size: 13px;
  font-weight: 700;
}

/* Active step pulse */
.loading-step.active {
  opacity: 1;
}

.loading-step.active .dot {
  background: rgba(80, 200, 255, 0.95);
  animation: dechefrPulse 1s ease-in-out infinite;
}

.loading-step.done {
  opacity: 0.9;
}

.loading-step.done .dot {
  background: rgba(100, 255, 180, 0.95);
  animation: none;
}

@keyframes dechefrPulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(80, 200, 255, 0));
  }
  50% {
    transform: scale(1.35);
    filter: drop-shadow(0 0 10px rgba(80, 200, 255, 0.55));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(80, 200, 255, 0));
  }
}

/* Progress bar */
.loading-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  /* background: rgba(80, 200, 255, 0.95); */
  background: rgba(64, 255, 192, 0.9);
  transition: width 450ms ease;
}

/* Responsive */
@media (max-width: 980px) {
  .wizard .wizard-grid {
    grid-template-columns: 1fr;
  }
  .wizard .wizard-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .wizard .wizard-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .wizard .wizard-top-right {
    justify-items: start;
  }
  .wizard .wizard-progress {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .wizard .wizard-form-grid {
    grid-template-columns: 1fr;
  }
  .wizard .span-2 {
    grid-column: auto;
  }
}
