/* ==========================================================
   _wizard.css — Wizard de criação de projeto
   Usado em: novo-projeto, projeto-definicoes, projeto-equipe,
   projeto-participacao, projeto-revisao
   ========================================================== */

.page-wizard {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background: var(--bg);
}

/* --- Header fixo do wizard -------------------------------- */
.wizard-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.wizard-title-area { display: flex; flex-direction: column; gap: 4px; }

.wizard-project-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wizard-project-name h1 { font-size: 1.375rem; }

.wizard-title-input {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  border: none;
  border-bottom: 2px solid var(--brand);
  background: transparent;
  outline: none;
  width: 320px;
  max-width: 100%;
  padding: 0 2px;
  line-height: 1.3;
}

.wizard-org-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  color: var(--text-muted);
}

.wizard-org-avatar {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.btn-edit-inline {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  display: inline-flex;
  align-items: center;
  opacity: 0.45;
  transition: opacity var(--t);
  line-height: 1;
}
.btn-edit-inline:hover { opacity: 1; }

/* --- Step navigator --------------------------------------- */
.wizard-steps {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-step__bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  background: var(--line-dark);
  color: var(--text-muted);
  flex-shrink: 0;
}

.wizard-step--active .wizard-step__bubble {
  background: var(--brand);
  color: #fff;
}

.wizard-step__label {
  font-size: .8125rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.wizard-step--active .wizard-step__label {
  color: var(--text);
  font-weight: 600;
}

.wizard-step-connector {
  width: 36px;
  height: 2px;
  background: var(--line-dark);
  margin: 0 6px;
  flex-shrink: 0;
}

/* --- Corpo scrollável ------------------------------------- */
.wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  padding-bottom: 88px;
}

.wizard-2col {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}

/* --- Card de imagem --------------------------------------- */
.wizard-image-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  cursor: pointer;
  border: 2px dashed var(--line-dark);
  transition: border-color var(--t), background var(--t);
  position: sticky;
  top: 88px;
  align-self: start;
}

.wizard-image-card:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.wizard-image-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.wizard-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wizard-image-card h3 { font-size: .9rem; }

.wizard-image-card p {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* --- Campos de texto -------------------------------------- */
.wizard-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wizard-field-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px 16px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.wizard-field-card__header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.wizard-field-card__num {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .06em;
}

.wizard-field-card__label {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text);
}

.wizard-field-card__ai {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 1rem;
  color: var(--brand);
  opacity: 0.6;
  line-height: 1;
  pointer-events: none;
}

.wizard-textarea {
  width: 100%;
  border: none;
  resize: none;
  font-family: inherit;
  font-size: .875rem;
  line-height: 1.65;
  color: var(--text);
  background: transparent;
  outline: none;
  overflow: hidden;
}

.wizard-textarea::placeholder { color: var(--text-light); }

.wizard-char-count {
  display: block;
  text-align: right;
  font-size: .65rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 6px;
  user-select: none;
}

.wizard-char-count--warn { color: var(--warning); }
.wizard-char-count--over { color: var(--danger); }

/* --- Rodapé fixo ------------------------------------------ */
.wizard-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.btn-nav {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  transition: color var(--t);
  color: var(--text-muted);
}

.btn-nav:hover { color: var(--text); }

.btn-nav--next {
  color: var(--brand);
}

.btn-nav--next:hover { color: var(--brand-dark); }

.btn-nav--next:only-child { margin-left: auto; }

/* --- Wizard dentro de page-auth (coluna direita) ---------- */
.wizard-panel {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.wizard-panel .wizard-body {
  flex: 1;
  overflow-y: auto;
}

.wizard-panel .wizard-footer {
  position: static;
}

/* --- Responsivo ------------------------------------------- */
@media (max-width: 767px) {
  .wizard-header { padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .wizard-steps .wizard-step__label { display: none; }
  .wizard-step--active .wizard-step__label { display: block; }
  .wizard-body { padding: 20px 16px 80px; }
  .wizard-2col { grid-template-columns: 1fr; }
  .wizard-image-card { position: static; text-align: left; padding: 16px; }
  .wizard-image-preview { flex-shrink: 0; }
  .wizard-footer { padding: 12px 16px; }
}
