/* Formularios. Solo lo que el sistema de la casa no trae ya:
   la tarjeta de formulario, la barra de objetivo, las barras de distribución
   en CSS y la tabla. Todo lo demás (view-header, .card, .ch, .row, .ebtn, .sb)
   viene del portal y no se toca. */

/* minmax(340px) caia en la franja muerta: la fila de cuatro mini KPI necesita
   383px y .card lleva overflow:hidden, asi que el cuarto bloque se cortaba sin
   error ni scroll en 1440, 1024, 768 y 390. */
.fm .fm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 14px; }
@media (max-width: 480px) {
  .fm .fm-card .kpi-mini { flex-wrap: wrap; }
  .fm .fm-card .kpi-mini .km { flex: 1 1 calc(50% - 5px); }
}
.fm .fm-card { display: flex; flex-direction: column; gap: 13px; }
.fm .fm-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.fm .fm-top h3 { font-size: 15px; line-height: 1.3; margin: 0 0 4px; }
.fm .fm-meta { font-size: 12px; color: var(--t3); }

.fm .fm-goal-b { height: 6px; background: var(--s2); border-radius: 99px; overflow: hidden; }
.fm .fm-goal-b i { display: block; height: 100%; background: #D9A441; border-radius: 99px; transition: width .5s ease; }
.fm .fm-goal-l { font-family: 'Noto Sans Mono', monospace; font-size: 11px; color: var(--t3); margin-top: 6px; }

.fm .fm-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fm .fm-last { font-family: 'Noto Sans Mono', monospace; font-size: 11px; color: var(--t4); margin-left: auto; }

.fm .fm-warn { font-size: 12.5px; line-height: 1.5; color: var(--t2);
  background: rgba(217, 164, 65, .09); border-left: 2px solid #D9A441;
  border-radius: 0 8px 8px 0; padding: 10px 13px; }
.fm .fm-warn.big { margin-bottom: 16px; }

.fm .fm-empty { color: var(--t4); font-size: 13px; padding: 34px 0; text-align: center; }

/* distribuciones: etiqueta, cifra y barra. Sin lienzo. */
.fm .fm-bars { margin-top: 12px; }
.fm .fm-b { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px;
  padding: 8px 0; border-bottom: 1px solid var(--b1); }
.fm .fm-b:last-child { border-bottom: 0; }
.fm .fm-l { font-size: 13px; line-height: 1.3; min-width: 0; }
.fm .fm-n { font-family: 'Noto Sans Mono', monospace; font-size: 12px; font-weight: 600;
  text-align: right; white-space: nowrap; }
.fm .fm-n s { color: var(--t4); text-decoration: none; font-weight: 400; }
.fm .fm-t { grid-column: 1 / -1; height: 5px; background: var(--s2); border-radius: 99px; }
.fm .fm-t i { display: block; height: 100%; background: #D9A441; border-radius: 99px; }

.fm .fm-quotes { margin-top: 12px; }
.fm .fm-quotes p { border-left: 2px solid #D9A441; padding: 8px 0 8px 13px; margin-bottom: 8px;
  color: var(--t2); font-size: 13px; line-height: 1.5; }
.fm .fm-quotes p:last-child { margin-bottom: 0; }

.fm .tablewrap { overflow-x: auto; margin-top: 12px; }
.fm .fm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fm .fm-table th { text-align: left; font-family: 'Noto Sans Mono', monospace; font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--t4); font-weight: 600;
  padding: 0 14px 9px 0; border-bottom: 1px solid var(--b2); white-space: nowrap; }
.fm .fm-table td { padding: 9px 14px 9px 0; border-bottom: 1px solid var(--b1);
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--t2);
  /* La global de components.css alinea td a la derecha. Yo solo habia pisado th,
     asi que cabecera y dato acababan en extremos opuestos de la columna. */
  text-align: left; }
.fm .fm-flag { font-family: 'Noto Sans Mono', monospace; font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--b2); }
.fm .fm-flag.bad { color: var(--red); border-color: rgba(255, 90, 90, .3); }
.fm .fm-flag.ok { color: var(--green); border-color: rgba(76, 209, 122, .28); }

.fm .fm-spend { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--t3); }
.fm .fm-spend input { width: 96px; background: var(--s2); border: 1px solid var(--b2);
  border-radius: 7px; color: var(--t1); font-family: 'Noto Sans Mono', ui-monospace, monospace;
  font-size: 12px; padding: 6px 9px; }
.fm .fm-spend input:focus { outline: 0; border-color: rgba(217, 164, 65, .4); }


/* .card.gold existe en la casa pero su regla del valor esta bajo .enc, asi que
   las dos tarjetas doradas salian en blanco. */
.fm .card.gold .val { color: #D9A441; }
.fm .kpi-mini .kmv { font-variant-numeric: tabular-nums; }
/* Los <button>.ebtn heredaban Arial: el <a> hermano no, y se veian distintos. */
.fm .ebtn, .fm .back { font-family: inherit; }
/* Botones, insignias y etiquetas de sección.
   encuestas.css las define bajo `.enc`, así que dentro de `.fm` no existían
   y los botones salían con el estilo por defecto del navegador. Se copian
   aquí con el mismo valor, en vez de tocar el CSS del otro módulo. */
.fm .back { background: none; border: 0; color: var(--t3); cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 4px 0; margin-bottom: 10px; letter-spacing: .01em; }
.fm .back:hover { color: var(--t1); }
.fm .ebtns { display: flex; gap: 8px; flex-wrap: wrap; }
.fm .ebtn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--b2); background: var(--s1); color: var(--t1); font-weight: 600; font-size: 12.5px; cursor: pointer; text-decoration: none; transition: border-color .15s, color .15s, background .15s; white-space: nowrap; }
.fm .ebtn:hover { border-color: var(--brand, #D9A441); color: var(--brand, #D9A441); }
.fm .ebtn.primary { background: var(--brand, #D9A441); border-color: var(--brand, #D9A441); color: #000; }
.fm .ebtn.primary:hover { filter: brightness(1.06); color: #000; }
.fm .ebtn.sm { padding: 6px 10px; font-size: 11.5px; }
.fm .sb { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 100px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fm .sb .dot { width: 7px; height: 7px; border-radius: 50%; }
.fm .sb.active { background: rgba(63, 185, 128,.12); color: var(--green); }
.fm .sb.active .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.fm .sb.draft { background: rgba(217, 164, 65,.12); color: #D9A441; }
.fm .sb.draft .dot { background: #D9A441; }
.fm .sb.closed { background: rgba(224, 87, 91,.12); color: var(--red); }
.fm .sb.closed .dot { background: var(--red); }
.fm .sec-label { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--t3); margin: 6px 0 12px; }

/* Tres columnas de preguntas a todo lo ancho, dos en portatil, una en tablet. */
@media (max-width: 1500px) { .fm .row.fm-dist { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1000px) { .fm .row.fm-dist { grid-template-columns: 1fr; } }
/* Los paneles de texto libre iban pegados sin aire entre ellos. */
.fm .ch + .ch { margin-top: 12px; }

/* Contactos del sorteo. Bloque aparte, con buscador y export propio. */
.fm .fm-part-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.fm .fm-part-bar input { flex: 1 1 260px; min-width: 0; background: var(--s2);
  border: 1px solid var(--b2); border-radius: 8px; color: var(--t1);
  font-size: 13px; padding: 8px 12px; }
.fm .fm-part-bar input:focus { outline: 0; border-color: rgba(217, 164, 65, .4); }
.fm .fm-part-n { font-family: 'Noto Sans Mono', ui-monospace, monospace; font-size: 11.5px;
  color: var(--t3); white-space: nowrap; }
.fm .fm-code { font-family: 'Noto Sans Mono', ui-monospace, monospace; letter-spacing: .06em; color: var(--t1); }
