/* ═══════════════════════════════════════════════════════════
   CONFIRM DIALOG
   ═══════════════════════════════════════════════════════════ */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.confirm-overlay.visible {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.confirm-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 380px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: dialogSlideIn 0.25s ease;
}

.confirm-dialog h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.confirm-dialog p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.confirm-actions button {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-confirm-cancel {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-confirm-cancel:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.btn-confirm-delete {
  background: var(--danger);
  border: 1px solid var(--danger);
  color: #fff;
}

.btn-confirm-delete:hover {
  background: var(--danger-hover);
}

/* ═══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  max-width: 360px;
}

.toast.error {
  border-color: rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.1);
}

.toast.success {
  border-color: rgba(33,194,94,0.4);
  background: rgba(33,194,94,0.1);
}

/* ═══════════════════════════════════════════════════════════
   FIRST-BOOT WIZARD
   ═══════════════════════════════════════════════════════════ */
.wizard-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.wizard-overlay.visible {
  display: flex;
  animation: fadeIn 0.4s ease;
}

.wizard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: dialogSlideIn 0.35s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.wizard-icon {
  font-size: 64px;
  margin-bottom: 20px;
  display: block;
  animation: wolfBounce 2s ease infinite;
}

.wizard-card h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--accent), #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wizard-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.wizard-card p.wizard-subtle {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.wizard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 8px;
}

.wizard-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.wizard-btn:active {
  transform: translateY(0);
}

.wizard-btn.secondary {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.wizard-btn.secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.wizard-btn.link {
  background: none;
  color: var(--accent);
  padding: 8px 16px;
  font-size: 13px;
  border: none;
}

.wizard-btn.link:hover {
  text-decoration: underline;
  transform: none;
}

.wizard-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.wizard-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-dim-border);
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.wizard-check .check-icon {
  font-size: 22px;
}

.wizard-offline-instructions {
  text-align: left;
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.wizard-offline-instructions p {
  margin-bottom: 12px;
  font-size: 13px;
}

.wizard-offline-instructions .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
}

/* Wizard: Model cards */
.wizard-model-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
  text-align: left;
}

.wizard-model-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wizard-model-card:hover {
  border-color: var(--accent-dim-border);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.wizard-model-card.pulling {
  border-color: var(--accent-dim-border);
  background: var(--accent-dim);
  cursor: default;
  transform: none;
}

.wizard-model-card .model-emoji {
  font-size: 28px;
  flex-shrink: 0;
}

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

.wizard-model-card .model-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.wizard-model-card .model-desc {
  font-size: 12px;
  color: var(--text-tertiary);
}

.wizard-model-card .model-size {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 3px 8px;
  border-radius: 12px;
  flex-shrink: 0;
}

.wizard-pull-progress {
  margin-top: 16px;
  display: none;
}

.wizard-pull-progress.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.wizard-pull-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.wizard-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #4ade80);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

/* Wizard: dots indicator */
.wizard-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.wizard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-light);
  transition: all var(--transition-fast);
}

.wizard-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

.wizard-dot.done {
  background: var(--accent);
}

/* Plan modal */
.plan-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-modal {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
}

.plan-modal h3 {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--text-primary);
}

.plan-modal-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.plan-modal-step .step-icon {
  flex-shrink: 0;
}

.plan-modal-step .step-text {
  flex: 1;
}

.plan-modal-step .step-result {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.plan-modal-close {
  display: block;
  margin-top: 16px;
  width: 100%;
  padding: 8px;
  background: var(--border);
  border: none;
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
}

.plan-modal-close:hover {
  background: rgba(255,255,255,0.1);
}
