/* Estilos del panel. Tokens de docs/DESIGN.md: no agregar colores, radios ni sombras que no estén ahí.
   Primero celular; los cortes son los de DESIGN.md (sm 480, md 768, lg 1060). */
:root {
  --brand-primary: #54BD95;
  --brand-primary-strong: #3EA06E;
  --brand-accent: #E87008;
  --ink: #1B1B1B;
  --ink-body: #2A2A2A;
  --ink-muted: #555555;
  --canvas: #FFFFFF;
  --surface-1: #F7F7F8;
  --border-soft: #ECECEC;
  --border: #E5E5E5;
  --border-strong: #D0D0D0;
  --info: #0E91A5;

  --rounded-md: 10px;
  --rounded-lg: 12px;
  --rounded-2xl: 20px;
  --rounded-pill: 999px;

  --elevation-card: 0 4px 18px rgba(0, 0, 0, 0.06);
  --elevation-pop: 0 10px 24px rgba(0, 0, 0, 0.06);
  --focus-ring: 0 0 0 3px rgba(84, 189, 149, 0.18);

  /* Gate (titular) se sirve desde acá, como en la web v1. Poppins e Inter no se cargan de otro dominio:
     si no están instaladas, se ve la fuente del sistema (ver AGENTS.md). */
  --font-ui: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Gate, Poppins, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* El único archivo de Gate que hay es la itálica; así se ve también el titular de la web v1. */
@font-face { font-family: Gate; src: url("/assets/fonts/Gate-Italic.woff2") format("woff2"); font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink-body); font-family: var(--font-ui); font-size: 1rem; line-height: 1.55; overflow-wrap: break-word; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

/* Foco visible en todo lo que se puede tocar (DESIGN.md: anillo verde; el contorno oscuro es para que se vea sobre cualquier fondo). */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: var(--focus-ring); }

.ancho { width: 100%; max-width: 1060px; margin: 0 auto; padding: 0 16px; }

.saltar { position: absolute; left: 16px; top: -64px; z-index: 2; padding: 12px 16px; background: var(--canvas); border: 1px solid var(--border-strong); border-radius: var(--rounded-md); }
.saltar:focus { top: 8px; }

/* Cabecera */
.cabecera { border-bottom: 1px solid var(--border-soft); }
.cabecera__fila { display: flex; align-items: center; min-height: 64px; }
.marca { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; text-decoration: none; }
.marca__logo { display: block; height: 40px; width: auto; }
.marca__nombre { font-size: 1.375rem; font-weight: 700; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink); }
.marca__para { font-size: 0.8125rem; color: var(--ink-muted); }

/* Hero */
.hero { padding: 40px 0 48px; }
.sobretitulo { display: flex; align-items: baseline; gap: 8px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-muted); margin-bottom: 12px; }
/* El naranja de la marca, solo como acento (DESIGN.md: nunca en un botón). */
.sobretitulo::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: var(--rounded-pill); background: var(--brand-accent); }
h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); max-width: 20ch; }
/* Titular en dos tonos, como el de la web v1. Este verde llega al contraste de texto grande (3:1); no usarlo en texto chico. */
h1 .verde { color: var(--brand-primary-strong); }
.bajada { margin-top: 16px; max-width: 60ch; }
.acciones { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }

.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: var(--rounded-md); border: 1px solid transparent; font-size: 1rem; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; }
/* DESIGN.md pide texto blanco sobre el verde, pero ese par no llega al contraste AA; se usa `ink`, que sí. */
.boton--primario { background: var(--brand-primary); color: var(--ink); }
.boton--primario:hover { background: var(--brand-primary-strong); box-shadow: 0 4px 12px rgba(84, 189, 149, 0.30); }
.boton--secundario { background: var(--canvas); color: var(--ink-body); border-color: var(--border-strong); }
.boton--secundario:hover { background: var(--surface-1); }

.recorrido { display: flex; flex-direction: column; gap: 8px; margin-top: 32px; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.recorrido li { display: flex; align-items: center; gap: 8px; }
.recorrido li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: var(--rounded-pill); background: var(--brand-primary); }

/* Secciones */
.seccion { padding: 48px 0; }
.seccion--gris { background: var(--surface-1); }
h2 { font-size: 1.375rem; font-weight: 600; line-height: 1.3; color: var(--ink); max-width: 28ch; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.entrada { margin-top: 12px; max-width: 60ch; }

.grilla { display: grid; gap: 16px; margin-top: 24px; }
.tarjeta { padding: 20px; background: var(--canvas); border: 1px solid var(--border-soft); border-radius: var(--rounded-lg); box-shadow: var(--elevation-card); }
.tarjeta p { margin-top: 8px; font-size: 0.9375rem; line-height: 1.5; }

/* Pasos: el número lo pone CSS (el HTML no lleva cifras). */
.pasos { counter-reset: paso; display: grid; gap: 24px; margin-top: 24px; }
.paso { counter-increment: paso; position: relative; padding-left: 52px; min-height: 36px; }
.paso::before { content: counter(paso); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--rounded-pill); background: var(--brand-primary); color: var(--ink); font-family: Inter, var(--font-ui); font-weight: 600; font-variant-numeric: tabular-nums; }
.paso p { margin-top: 4px; font-size: 0.9375rem; line-height: 1.5; max-width: 60ch; }

/* Informe de ejemplo */
.lista { display: grid; gap: 12px; margin-top: 20px; }
.lista li { position: relative; padding-left: 20px; }
.lista li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: var(--rounded-pill); background: var(--brand-primary); }
.aviso { margin-top: 20px; padding: 12px 16px; max-width: 60ch; background: var(--canvas); border: 1px solid var(--border); border-left: 4px solid var(--info); border-radius: var(--rounded-lg); font-size: 0.8125rem; line-height: 1.5; }
/* Aviso de estado del producto, en el hero: tiene que verse sin bajar. */
.estado { margin-top: 20px; padding: 12px 16px; max-width: 60ch; background: var(--surface-1); border: 1px solid var(--border); border-left: 4px solid var(--brand-accent); border-radius: var(--rounded-lg); font-size: 0.8125rem; line-height: 1.5; }
.estado a { font-weight: 600; white-space: nowrap; }
/* En el celular el informe se abre en su propia página: un marco con scroll adentro de otro scroll es incómodo. */
.informe__vista { display: none; }

/* Cierre */
.cierre h2, .cierre p { max-width: 40ch; }
.cierre p { margin-top: 12px; }

.pie { padding: 32px 0 40px; border-top: 1px solid var(--border-soft); font-size: 0.8125rem; line-height: 1.5; color: var(--ink-muted); }
.pie p { max-width: 70ch; }

/* ---------------------------------------------------------------------------
   Pantallas del asesor (ingreso, clientes, ficha, perfil). Mismos tokens; sin JavaScript.
   --------------------------------------------------------------------------- */
.cabecera__fila { justify-content: space-between; gap: 16px; }
.cabecera__entrar { font-weight: 600; text-decoration: none; color: var(--ink); padding: 8px 0; }
.cabecera__entrar:hover { text-decoration: underline; }
.nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; font-size: 0.875rem; }
.nav__link { font-weight: 600; text-decoration: none; color: var(--ink); }
.nav__quien { display: none; color: var(--ink-muted); }
.nav__salir { margin: 0; }

.app__main { padding-top: 32px; padding-bottom: 64px; }
.hoja { max-width: 960px; }
.hoja--angosta { max-width: 560px; }
.titulo { font-family: var(--font-ui); font-size: 1.625rem; line-height: 1.25; letter-spacing: 0; max-width: none; }
.encabezado { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.miga { font-size: 0.875rem; margin-bottom: 12px; }
.miga a { color: var(--ink-muted); text-decoration: none; }
.miga a:hover { text-decoration: underline; }
.hoja .bajada { margin-top: 8px; color: var(--ink-muted); }
.nota { margin-top: 16px; font-size: 0.8125rem; color: var(--ink-muted); }
.vacio { color: var(--ink-muted); }

.formulario { display: grid; gap: 16px; margin-top: 24px; }
.formulario .boton { justify-self: start; }
.campo { display: grid; gap: 6px; }
.campo__etiqueta { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.campo__opcional { font-weight: 400; color: var(--ink-muted); }
.campo__error { display: block; margin-top: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="month"], select {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--canvas);
  border: 1px solid var(--border-strong); border-radius: var(--rounded-md);
}
input:focus-visible, select:focus-visible { border-color: var(--brand-primary); }
input[type="file"] { font: inherit; max-width: 100%; }
fieldset { min-width: 0; }
.formulario__apagado { display: grid; gap: 16px; margin: 0; padding: 16px; border: 1px dashed var(--border-strong); border-radius: var(--rounded-lg); opacity: 0.6; }

.pregunta { margin: 0; padding: 16px; border: 1px solid var(--border-soft); border-radius: var(--rounded-lg); }
.pregunta legend { padding: 0 4px; margin-bottom: 8px; }
.pregunta--error { border-color: var(--brand-accent); border-left-width: 4px; }
.opcion { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; }
.opcion input { margin-top: 4px; accent-color: var(--brand-primary-strong); }

.boton { cursor: pointer; font-family: inherit; }
.boton--chico { min-height: 36px; padding: 6px 14px; font-size: 0.875rem; }

.alerta { margin-top: 16px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--rounded-lg); font-size: 0.875rem; line-height: 1.5; }
.alerta--error { border-left: 4px solid var(--brand-accent); background: var(--canvas); }
.alerta--aviso { border-left: 4px solid var(--info); background: var(--surface-1); }
ul.alerta { padding-left: 32px; list-style: disc; }

.tabla-envoltura { overflow-x: auto; margin-top: 16px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.tabla th, .tabla td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.tabla th { font-size: 0.8125rem; font-weight: 600; color: var(--ink-muted); }
.tabla a { font-weight: 600; color: var(--ink); }

.bloques { display: grid; gap: 16px; margin-top: 24px; }
.bloque { padding: 20px; background: var(--canvas); border: 1px solid var(--border-soft); border-radius: var(--rounded-lg); box-shadow: var(--elevation-card); }
.bloque h2 { font-size: 1.125rem; margin-bottom: 8px; }
.bloque--revisar { border-left: 4px solid var(--brand-accent); }
.hoja > .bloque { margin-top: 16px; }
.marca-revisar { font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--brand-accent); }
.agregar, .historial { margin-top: 16px; }
.agregar summary, .historial summary { cursor: pointer; font-weight: 600; font-size: 0.875rem; color: var(--ink); }
.historial ul { margin-top: 8px; display: grid; gap: 6px; font-size: 0.875rem; }

.resultado { margin-top: 24px; padding: 20px; background: var(--surface-1); border-radius: var(--rounded-lg); }
.resultado__categoria { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.legajo { margin: 8px 0 0; padding: 16px; white-space: pre-wrap; font-family: var(--font-ui); font-size: 0.875rem; line-height: 1.55; background: var(--surface-1); border-radius: var(--rounded-md); }

@media (min-width: 480px) {
  .nav__quien { display: inline; }
  .acciones { flex-direction: row; flex-wrap: wrap; }
  .recorrido { flex-direction: row; flex-wrap: wrap; gap: 8px 24px; }
}

@media (min-width: 768px) {
  .bloques { grid-template-columns: repeat(2, 1fr); }
  .ancho { padding: 0 32px; }
  .hero { padding: 64px 0 80px; }
  h1 { font-size: 2.5rem; line-height: 1.15; }
  .seccion { padding: 64px 0; }
  .grilla { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .tarjeta { padding: 24px; }
  .informe { display: grid; grid-template-columns: 1fr 375px; gap: 48px; align-items: center; }
  .informe__vista { display: block; }
  .telefono { display: block; width: 100%; height: 640px; background: var(--canvas); border: 1px solid var(--border-strong); border-radius: var(--rounded-2xl); box-shadow: var(--elevation-pop); }
}

@media (min-width: 1060px) {
  .pasos { grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
