/* Asistente de nuevo proyecto (project-wizard.js). Mismo lenguaje de la web: crema, tinta café, dorado de VACAR,
   bordes suaves y sombras discretas. Todo se mueve con transiciones; nada se redibuja de golpe. */
.pw-overlay {
  --pw-ease: cubic-bezier(.22, 1, .36, 1);
  --pw-oro: #c49a50; --pw-oro-osc: #7a5813; --pw-tinta: #1f1b16; --pw-gris: #6f6458; --pw-linea: #e6d9c5;
  --pw-crema: #fbf4ec; --pw-arena: #f4eadb; --pw-papel: #fffaf5;
  position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 20px;
  font-family: 'Plus Jakarta Sans', sans-serif; color: var(--pw-tinta);
}
.pw-fondo { position: absolute; inset: 0; background: rgba(31, 27, 22, .38); backdrop-filter: blur(6px); opacity: 0; transition: opacity .32s var(--pw-ease); }
.pw-panel {
  position: relative; display: grid; grid-template-columns: 300px 1fr; width: min(1180px, 100%); height: min(820px, calc(100dvh - 40px));
  background: var(--pw-papel); border-radius: 28px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(42, 29, 14, .28), 0 0 0 1px rgba(122, 88, 19, .06);
  opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .36s var(--pw-ease), transform .46s var(--pw-ease);
}
.pw-overlay.abierto .pw-fondo { opacity: 1; }
.pw-overlay.abierto .pw-panel { opacity: 1; transform: none; }
.pw-overlay.cerrando .pw-panel { opacity: 0; transform: translateY(10px) scale(.99); transition-duration: .24s; }
.pw-overlay.creado .pw-panel { transform: scale(.975); opacity: .0; transition: opacity .4s var(--pw-ease), transform .4s var(--pw-ease); }
.material-symbols-outlined { font-variation-settings: 'wght' 400; }

/* Riel izquierdo: pasos y la ficha que se arma sola */
.pw-riel { display: flex; flex-direction: column; gap: 26px; padding: 34px 28px; background: linear-gradient(180deg, #f8efe3, #f3e7d6); border-right: 1px solid var(--pw-linea); min-height: 0; }
.pw-eyebrow { margin: 0; font: 700 10.5px/1 'Plus Jakarta Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--pw-oro-osc); }
.pw-riel-titulo { margin: 8px 0 0; font: 700 26px/1.12 'Plus Jakarta Sans', sans-serif; letter-spacing: -.02em; }
.pw-pasos { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pw-pasos-linea { position: absolute; left: 17px; top: 20px; bottom: 20px; width: 2px; background: var(--pw-linea); border-radius: 2px; overflow: hidden; }
.pw-pasos-linea i { position: absolute; inset: 0; background: var(--pw-oro); transform-origin: top; transform: scaleY(0); transition: transform .5s var(--pw-ease); }
.pw-paso { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 6px 0; cursor: pointer; color: var(--pw-gris); font-weight: 600; font-size: 14px; transition: color .25s; }
.pw-paso-n { position: relative; display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--pw-papel); border: 1.5px solid var(--pw-linea); transition: background .3s var(--pw-ease), border-color .3s, box-shadow .3s; }
.pw-paso-n b { font-size: 13px; transition: opacity .2s, transform .3s var(--pw-ease); }
.pw-paso-ok { position: absolute; font-size: 18px; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--pw-ease); }
.pw-paso.activo { color: var(--pw-tinta); }
.pw-paso.activo .pw-paso-n { border-color: var(--pw-oro); box-shadow: 0 0 0 5px rgba(196, 154, 80, .16); color: var(--pw-oro-osc); }
.pw-paso.hecho .pw-paso-n { background: var(--pw-oro); border-color: var(--pw-oro); }
.pw-paso.hecho .pw-paso-n b { opacity: 0; transform: scale(.4); }
.pw-paso.hecho .pw-paso-ok { opacity: 1; transform: none; }
.pw-paso.hecho { color: var(--pw-tinta); }

.pw-ficha { margin-top: auto; padding: 18px; border-radius: 20px; background: rgba(255, 252, 247, .78); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 10px 30px rgba(96, 70, 30, .08); }
.pw-ficha-rot { margin: 0 0 10px; font: 700 9.5px/1 'Plus Jakarta Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--pw-gris); }
.pw-ficha-nombre { margin: 0; font-weight: 700; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; transition: color .25s; }
.pw-ficha-nombre.vacio { color: #b3a690; }
.pw-ficha-cliente { margin: 3px 0 0; font-size: 12.5px; color: var(--pw-gris); overflow-wrap: anywhere; }
.pw-ficha-cliente:empty { display: none; }
.pw-ficha-disc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pw-ficha-disc:empty { display: none; }
.pw-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--pw-arena); color: var(--pw-oro-osc); font-size: 11.5px; font-weight: 700; transition: opacity .18s, transform .25s var(--pw-ease); }
.pw-chip .material-symbols-outlined { font-size: 15px; }
.pw-chip.entra { animation: pw-entra .32s var(--pw-ease) both; }
.pw-chip.sale { opacity: 0; transform: scale(.8); }
.pw-ficha-equipo { margin-top: 12px; }
@keyframes pw-entra { from { opacity: 0; transform: scale(.85); } }

/* Cuerpo */
.pw-cuerpo { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 34px 40px 26px; }
.pw-x { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--pw-gris); cursor: pointer; transition: background .2s, color .2s; }
.pw-x:hover { background: var(--pw-arena); color: var(--pw-tinta); }
.pw-cabeza { padding-right: 50px; }
.pw-cabeza h3 { margin: 8px 0 4px; font: 700 30px/1.1 'Plus Jakarta Sans', sans-serif; letter-spacing: -.025em; }
.pw-cabeza p:last-child { margin: 0; color: var(--pw-gris); font-size: 14px; }
.pw-escena { position: relative; flex: 1; min-height: 0; margin-top: 24px; overflow: hidden; }
.pw-vista { position: absolute; inset: 0; overflow-y: auto; padding: 6px 8px 12px 4px; transition: opacity .22s var(--pw-ease), transform .32s var(--pw-ease); }
.pw-vista.entra-der { opacity: 0; transform: translateX(28px); transition: none; }
.pw-vista.entra-izq { opacity: 0; transform: translateX(-28px); transition: none; }
.pw-vista.sale-izq { opacity: 0; transform: translateX(-22px); pointer-events: none; }
.pw-vista.sale-der { opacity: 0; transform: translateX(22px); pointer-events: none; }
.pw-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: #fbe4dc; color: #8a2e14; font-size: 13px; font-weight: 600; animation: pw-entra .25s var(--pw-ease); }
.pw-pie { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 20px; margin-top: 16px; border-top: 1px solid var(--pw-linea); }
.pw-btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: 700 14px 'Plus Jakarta Sans', sans-serif; cursor: pointer; transition: background .2s, box-shadow .25s, transform .15s var(--pw-ease), opacity .2s; }
.pw-btn .material-symbols-outlined { font-size: 19px; transition: transform .25s var(--pw-ease); }
.pw-btn:active { transform: scale(.97); }
.pw-btn-sec { background: transparent; color: var(--pw-gris); }
.pw-btn-sec:hover { background: var(--pw-arena); color: var(--pw-tinta); }
.pw-btn-sec.oculto { opacity: 0; pointer-events: none; }
.pw-btn-pri { margin-left: auto; background: var(--pw-tinta); color: #fff; box-shadow: 0 10px 24px rgba(31, 27, 22, .18); }
.pw-btn-pri:hover .material-symbols-outlined { transform: translateX(3px); }
.pw-btn-pri.final { background: linear-gradient(135deg, #c49a50, #a77b2c); box-shadow: 0 12px 28px rgba(167, 123, 44, .32); }
.pw-btn-pri.ocupado { opacity: .75; cursor: progress; }

/* Paso 1 */
.pw-identidad { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; min-height: 100%; }
.pw-campos { display: flex; flex-direction: column; gap: 18px; }
.pw-campo { display: flex; flex-direction: column; gap: 7px; }
.pw-campo > span { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--pw-gris); }
.pw-campo > span em { font-style: normal; font-weight: 500; color: #a2957f; margin-left: 4px; }
.pw-campo input, .pw-campo textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--pw-linea); border-radius: 16px; background: #fff; padding: 13px 16px; font: 500 15px/1.4 'Plus Jakarta Sans', sans-serif; color: var(--pw-tinta); transition: border-color .2s, box-shadow .25s; }
.pw-campo input[name=nombre] { font-size: 18px; font-weight: 700; padding: 15px 18px; }
.pw-campo textarea { resize: none; flex: 1; min-height: 120px; font-size: 13.5px; line-height: 1.6; color: #4e4538; }
.pw-campo-crece { flex: 1; }
.pw-campo input:focus, .pw-campo textarea:focus { outline: none; border-color: var(--pw-oro); box-shadow: 0 0 0 4px rgba(196, 154, 80, .16); }
.pw-mapa { display: flex; flex-direction: column; min-height: 320px; }
.pw-mapa .ds-input { border-radius: 16px; }

/* Paso 2: disciplinas */
.pw-disciplinas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pw-disc {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 178px; padding: 20px 20px 18px; text-align: left;
  border: 1.5px solid var(--pw-linea); border-radius: 22px; background: #fff; cursor: pointer; font-family: inherit; color: inherit;
  transition: border-color .25s, box-shadow .3s var(--pw-ease), transform .3s var(--pw-ease), background .3s;
}
.pw-disc:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(96, 70, 30, .1); }
.pw-disc:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(196, 154, 80, .25); }
.pw-disc-ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 16px; background: var(--pw-crema); color: var(--pw-oro-osc); transition: background .3s var(--pw-ease), color .3s, transform .4s var(--pw-ease); }
.pw-disc-ico .material-symbols-outlined { font-size: 28px; }
.pw-disc-nombre { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.pw-disc-frase { font-size: 12.5px; line-height: 1.45; color: var(--pw-gris); }
.pw-disc-estado { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; padding-top: 10px; font-size: 11px; font-weight: 700; color: #a2957f; }
.pw-disc-estado::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #d6c9b4; }
.pw-disc-estado.lista { color: #3f6b3a; }
.pw-disc-estado.lista::before { background: #5d9a52; box-shadow: 0 0 0 3px rgba(93, 154, 82, .18); }
.pw-disc-check { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--pw-linea); color: #fff; transition: background .25s, border-color .25s, transform .35s var(--pw-ease); }
.pw-disc-check .material-symbols-outlined { font-size: 17px; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--pw-ease); }
.pw-disc.activa { border-color: var(--pw-oro); background: linear-gradient(180deg, #fffaf1, #fff); box-shadow: 0 16px 34px rgba(167, 123, 44, .14); }
.pw-disc.activa .pw-disc-ico { background: var(--pw-oro); color: #fff; transform: scale(1.04); }
.pw-disc.activa .pw-disc-check { background: var(--pw-oro); border-color: var(--pw-oro); }
.pw-disc.activa .pw-disc-check .material-symbols-outlined { opacity: 1; transform: none; }
.pw-nota { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--pw-gris); }
.pw-nota .material-symbols-outlined { font-size: 17px; color: var(--pw-oro); flex: none; }

/* Paso 3: equipo */
.pw-equipo { display: flex; flex-direction: column; gap: 26px; max-width: 760px; }
.pw-bloque-rot { margin: 0 0 12px; font: 700 11px/1 'Plus Jakarta Sans', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--pw-gris); }
.pw-bloque-rot em { font-style: normal; font-weight: 600; letter-spacing: 0; text-transform: none; color: #a2957f; margin-left: 6px; }
.pw-avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #e9d3a6, #c49a50); color: #4b3300; font-size: 12px; font-weight: 800; overflow: hidden; box-shadow: 0 0 0 2px var(--pw-papel); }
.pw-avatar.grande { width: 48px; height: 48px; font-size: 15px; }
.pw-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pw-responsable { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: #fff; border: 1.5px solid var(--pw-linea); }
.pw-responsable > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pw-responsable b { font-size: 15px; }
.pw-responsable small, .pw-miembro-n small { font-size: 12px; color: var(--pw-gris); }
.pw-select { position: relative; display: inline-flex; align-items: center; }
.pw-select select { appearance: none; height: 38px; padding: 0 36px 0 14px; border: 1.5px solid var(--pw-linea); border-radius: 999px; background: var(--pw-papel); font: 600 13px 'Plus Jakarta Sans', sans-serif; color: var(--pw-tinta); cursor: pointer; max-width: 220px; transition: border-color .2s; }
.pw-select select:focus { outline: none; border-color: var(--pw-oro); }
.pw-select > .material-symbols-outlined { position: absolute; right: 10px; font-size: 18px; color: var(--pw-gris); pointer-events: none; }
.pw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pw-miembros { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pw-miembro { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--pw-linea); transition: opacity .2s, transform .25s var(--pw-ease); }
.pw-miembro.entra { animation: pw-entra .3s var(--pw-ease) both; }
.pw-miembro.sale { opacity: 0; transform: translateX(10px); }
.pw-miembro-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pw-miembro-n b { font-size: 14px; }
.pw-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--pw-arena); }
.pw-seg button { height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font: 700 12px 'Plus Jakarta Sans', sans-serif; color: var(--pw-gris); cursor: pointer; transition: background .25s var(--pw-ease), color .2s, box-shadow .25s; }
.pw-seg button[aria-pressed=true] { background: #fff; color: var(--pw-tinta); box-shadow: 0 2px 8px rgba(96, 70, 30, .12); }
.pw-seg button:disabled { opacity: .45; cursor: not-allowed; }
.pw-quitar { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--pw-gris); cursor: pointer; transition: background .2s; }
.pw-quitar:hover { background: var(--pw-arena); }
.pw-quitar .material-symbols-outlined { font-size: 18px; }
.pw-buscar { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 16px; border: 1.5px dashed #d8c7a8; background: var(--pw-papel); color: var(--pw-gris); transition: border-color .2s, background .2s; }
.pw-buscar:focus-within { border-style: solid; border-color: var(--pw-oro); background: #fff; }
.pw-buscar input { flex: 1; border: 0; background: transparent; font: 500 14px 'Plus Jakarta Sans', sans-serif; color: var(--pw-tinta); outline: none; }
.pw-sugerencias { list-style: none; margin: 8px 0 0; padding: 6px; border-radius: 18px; background: #fff; box-shadow: 0 18px 40px rgba(60, 44, 20, .16); animation: pw-entra .2s var(--pw-ease); }
.pw-sugerencias button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; font-family: inherit; cursor: pointer; color: inherit; transition: background .15s; }
.pw-sugerencias button:hover { background: var(--pw-crema); }
.pw-sugerencias button > span:not(.pw-avatar) { flex: 1; display: flex; flex-direction: column; }
.pw-sugerencias small { font-size: 12px; color: var(--pw-gris); }
.pw-sugerencias button > .material-symbols-outlined { color: var(--pw-oro-osc); }
.pw-vacio { padding: 10px; font-size: 13px; color: var(--pw-gris); }
.pw-disc-resp { display: flex; flex-direction: column; gap: 8px; }
.pw-disc-fila { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--pw-linea); }
.pw-disc-fila > span:not(.pw-disc-mini) { flex: 1; font-weight: 600; font-size: 14px; }
.pw-disc-mini { font-size: 20px; color: var(--pw-oro-osc); }
.pw-pila { display: flex; }
.pw-pila .pw-avatar { width: 30px; height: 30px; font-size: 10.5px; margin-left: -5px; }
.pw-pila .pw-avatar:first-child { margin-left: 0; }

/* Paso 4: la estructura del proyecto */
.pw-arbol { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 10px 0 6px; }
.pw-nodo-proyecto { display: flex; align-items: center; gap: 14px; padding: 16px 22px 16px 16px; border-radius: 22px; background: var(--pw-tinta); color: #fff; box-shadow: 0 18px 40px rgba(31, 27, 22, .22); animation: pw-entra .4s var(--pw-ease) both; max-width: 100%; }
.pw-nodo-proyecto > div { display: flex; flex-direction: column; min-width: 0; }
.pw-nodo-proyecto b { font-size: 18px; overflow-wrap: anywhere; }
.pw-nodo-proyecto small { color: #d9c9ad; font-size: 12.5px; }
.pw-nodo-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--pw-oro); color: #fff; }
.pw-ramas { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 14px; width: 100%; margin-top: 34px; }
.pw-ramas::before { content: ''; position: absolute; top: -18px; left: calc(50% / var(--n)); right: calc(50% / var(--n)); height: 2px; background: var(--pw-linea); }
.pw-ramas::after { content: ''; position: absolute; top: -34px; left: 50%; width: 2px; height: 16px; background: var(--pw-linea); }
.pw-rama { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px 14px; border-radius: 20px; background: #fff; border: 1.5px solid var(--pw-linea); text-align: center; animation: pw-entra .4s var(--pw-ease) both; animation-delay: calc(var(--i) * 70ms + 120ms); min-width: 0; }
.pw-rama::before { content: ''; position: absolute; top: -18px; left: 50%; width: 2px; height: 18px; background: var(--pw-linea); }
.pw-rama b { font-size: 14px; }
.pw-rama small { font-size: 11.5px; color: var(--pw-gris); }
.pw-nodo-disc { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 6px; border-radius: 13px; background: var(--pw-crema); color: var(--pw-oro-osc); }
.pw-rama-resp { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: var(--pw-arena); font-size: 11.5px; font-weight: 700; color: var(--pw-oro-osc); max-width: 100%; overflow-wrap: anywhere; }
.pw-rama-resp .material-symbols-outlined { font-size: 15px; }
.pw-arbol-equipo { display: flex; align-items: center; gap: 12px; margin-top: 26px; font-size: 13px; color: var(--pw-gris); animation: pw-entra .4s var(--pw-ease) both; animation-delay: .3s; }
.pw-incluye { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 30px 0 0; padding: 0; }
.pw-incluye li { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 16px; background: var(--pw-crema); font-size: 12.5px; line-height: 1.45; color: #4e4538; }
.pw-incluye .material-symbols-outlined { font-size: 20px; color: var(--pw-oro-osc); }

/* Pantallas angostas: el riel se vuelve una franja arriba */
@media (max-width: 860px) {
  .pw-overlay { padding: 0; }
  .pw-panel { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: 100dvh; border-radius: 0; }
  .pw-riel { flex-direction: row; align-items: center; gap: 14px; padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--pw-linea); }
  .pw-riel > .pw-eyebrow, .pw-riel-titulo, .pw-ficha { display: none; }
  .pw-pasos { flex-direction: row; gap: 4px; }
  .pw-pasos-linea { display: none; }
  .pw-paso-t { display: none; }
  .pw-cuerpo { padding: 20px 18px 16px; }
  .pw-cabeza h3 { font-size: 24px; }
  .pw-identidad { grid-template-columns: 1fr; }
  .pw-ramas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pw-ramas::before, .pw-ramas::after, .pw-rama::before { display: none; }
  .pw-incluye { grid-template-columns: 1fr; }
  .pw-btn { height: 46px; padding: 0 18px; }
  .pw-miembro { flex-wrap: wrap; row-gap: 8px; }
  .pw-miembro .pw-seg { order: 3; margin-left: 46px; }
  .pw-disc-fila { flex-wrap: wrap; }
  .pw-disc-fila .pw-select { margin-left: 32px; }
  .pw-responsable { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-overlay *, .pw-overlay *::before, .pw-overlay *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
