/* Paleta de las propuestas de Novara (skills/venta-diagnostico/06-propuesta.md).
   El panel y los documentos que entrega deben sentirse de la misma casa. */
:root {
  --bg: #0d0f13;
  --panel: #151920;
  --panel2: #1b2029;
  --line: #2a313d;
  --txt: #e6e9ee;
  --dim: #98a2b3;
  --faint: #6b7684;
  --red: #ff5f56;
  --amber: #ffb020;
  --green: #3ddc97;
  --blue: #5b9dff;
  --violet: #a78bfa;
  --radio: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* El atributo `hidden` del navegador aplica `display:none` con la prioridad más
   baja que existe, así que CUALQUIER regla propia con `display` lo pisa: el
   elemento queda oculto para JavaScript y a la vista del usuario. Pasó con
   `.chat { display: flex }`, que mantenía el chat dibujado sobre la vista de
   pedidos. Esta línea lo cierra de una vez para todo el panel. (2026-09-22) */
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--txt);
  font: 15px/1.6 ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------------------------------------------------------------- entrada */
.entrada {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tarjeta {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radio);
  padding: 32px 28px;
}

.marca {
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: center;
}

h1 {
  font-size: 27px;
  font-weight: 640;
  letter-spacing: -.02em;
  text-align: center;
  margin: 10px 0 26px;
}

label {
  display: block;
  font-size: 12px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 7px;
}

input {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--txt);
  font: inherit;
  padding: 12px 14px;
  margin-bottom: 18px;
}
input:focus { outline: none; border-color: var(--blue); }

button {
  width: 100%;
  background: var(--blue);
  color: #08101f;
  border: none;
  border-radius: 9px;
  font: inherit;
  font-weight: 640;
  padding: 13px;
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .55; cursor: default; filter: none; }

.aviso {
  border-radius: 9px;
  padding: 11px 14px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
}
.aviso.error { background: rgba(255, 95, 86, .1); border-left: 2px solid var(--red); color: #f0d5d3; }
.aviso.bien  { background: rgba(61, 220, 151, .09); border-left: 2px solid var(--green); color: #c8e8d8; }
.aviso[hidden] { display: none; }

.pie {
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  margin-top: 22px;
}

/* ---------------------------------------------------------------- panel */
.barra {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
}
.barra .marca { text-align: left; flex: 1; }
.barra .quien { font-size: 13px; color: var(--dim); }

.enlace {
  background: none;
  border: none;
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  width: auto;
  padding: 4px 2px;
  cursor: pointer;
}
.enlace:hover { text-decoration: underline; filter: none; }

.contenido { max-width: 860px; margin: 0 auto; padding: 24px 18px 60px; }

.bloque {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radio);
  padding: 22px 24px;
  margin-bottom: 16px;
}
.bloque h2 {
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.bloque p { color: var(--dim); font-size: 14.5px; margin-bottom: 10px; }
.bloque p:last-child { margin-bottom: 0; }
.bloque b { color: var(--txt); font-weight: 620; }

.etapa {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(255, 176, 32, .35);
  background: rgba(255, 176, 32, .07);
  border-radius: 99px;
  padding: 4px 11px;
  margin-bottom: 14px;
}

.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.acciones button { width: auto; padding: 11px 18px; }
.secundario { background: var(--panel2); color: var(--txt); border: 1px solid var(--line); }

/* ---------------------------------------------------------------- chat */
/* Altura fija con la lista desplazándose por dentro: en el móvil, el redactor
   tiene que quedarse abajo aunque la conversación crezca. 100dvh y no 100vh
   porque la barra del navegador móvil se mueve y vh se queda mal medido. */
body.con-chat { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.mensajes {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px 8px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

.cargando, .vacio { color: var(--faint); text-align: center; padding: 40px 12px; }
.vacio p { margin-bottom: 8px; }
.vacio .tenue { font-size: 14px; color: var(--faint); }

.mensaje {
  border: 1px solid var(--line);
  border-radius: var(--radio);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--panel);
}
.mensaje.mio { background: var(--panel2); border-color: rgba(91, 157, 255, .22); }

.meta { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.autor { font-size: 12px; font-weight: 660; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.mensaje.suyo .autor { color: var(--green); }
.hora { font-size: 11.5px; color: var(--faint); }

.estado {
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 99px;
  padding: 3px 9px;
}
.estado.pendiente { color: var(--amber); background: rgba(255, 176, 32, .1); }
.estado.listo { color: var(--green); background: rgba(61, 220, 151, .1); }

.cuerpo { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.6; }

.sugerencias {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.sugerencias-titulo {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 9px;
}
.sugerencia { margin-bottom: 10px; }
.sug-ruta { font-size: 13px; color: var(--txt); font-weight: 620; }
.sug-texto { font-size: 13px; color: var(--dim); line-height: 1.5; margin-top: 3px; }

.fuentes { margin-top: 11px; font-size: 12.5px; color: var(--faint); }

.redactor {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
}
.redactor form { max-width: 860px; margin: 0 auto; }

textarea {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--txt);
  font: inherit;
  padding: 11px 13px;
  resize: none;
  line-height: 1.5;
}
textarea:focus { outline: none; border-color: var(--blue); }

.acciones-chat { display: flex; justify-content: flex-end; margin-top: 9px; }
.acciones-chat button { width: auto; padding: 10px 24px; }

.aviso-fase {
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.5;
  margin-bottom: 10px;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}


/* ---------------------------------------------------------------- pedidos */
/* Sin `style=` en el HTML: la CSP del panel prohíbe estilos inline (style-src
   'self'), y esa regla es la que protege si algún día se cuela contenido ajeno
   en la página. Vale para el propio código también. */
.acciones-cabecera { margin-bottom: 16px; }
.pedido .meta { justify-content: space-between; margin-bottom: 10px; }
.negocio { font-size: 17px; font-weight: 640; letter-spacing: -.01em; }
.detalle { font-size: 13.5px; color: var(--dim); }
.detalle.tenue { color: var(--faint); margin-top: 10px; }
.estado.proceso { color: var(--blue); background: rgba(91, 157, 255, .1); }
.estado.rechazado { color: var(--red); background: rgba(255, 95, 86, .1); }

.nota-rechazo {
  margin-top: 11px;
  background: rgba(255, 95, 86, .08);
  border-left: 2px solid var(--red);
  border-radius: 0 7px 7px 0;
  padding: 10px 13px;
  font-size: 14px;
  color: #f0d5d3;
}

.entregables { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.entregable {
  display: block;
  color: var(--blue);
  text-decoration: none;
  font-size: 14px;
  padding: 7px 0;
}
.entregable:hover { text-decoration: underline; }

select {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--txt);
  font: inherit;
  padding: 12px 14px;
  margin-bottom: 18px;
}
select:focus { outline: none; border-color: var(--blue); }

.pista { font-size: 12.5px; color: var(--faint); margin: -10px 0 18px; }

#vista-form textarea, #vista-pedidos textarea { margin-bottom: 6px; }

@media (max-width: 560px) {
  .contenido { padding: 18px 14px 50px; }
  .bloque { padding: 18px 16px; }
  h1 { font-size: 23px; }
  .barra { gap: 10px; padding: 12px 14px; }
  .barra .quien { display: none; }
  .mensajes { padding: 14px 13px 6px; }
  .redactor { padding: 10px 13px calc(10px + env(safe-area-inset-bottom)); }
}
