/* Buzón de sugerencias (/sugerencias) */
.sg { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.sg__main { min-width: 0; }

/* ---------- Formulario ---------- */
.sg-form { background: var(--blanco); border-radius: 22px; padding: 34px; display: flex; flex-direction: column; gap: 26px; border-top: 6px solid var(--granate); box-shadow: 0 18px 40px rgba(19,33,63,.06); }
.sg-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.sg-step + .sg-step { border-top: 1px solid #EEE9EC; padding-top: 26px; }
/* La leyenda flota para que no se monte sobre la línea de separación del fieldset. */
.sg-step legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; padding: 0; margin: 0 0 18px; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; }
.sg-step > :not(legend) { clear: both; }
.sg-step > :not(legend) + :not(legend) { margin-top: 16px; }
.sg-step__num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--granate); color: var(--oro); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }

.sg-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sg-kind { position: relative; cursor: pointer; }
.sg-kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sg-kind__box { height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 16px; border-radius: 16px; border: 1.5px solid var(--linea); background: var(--blanco); transition: border-color .15s, background .15s, color .15s, transform .15s; }
.sg-kind__icon { width: 30px; height: 30px; fill: none; stroke: var(--granate); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
.sg-kind__box strong { font-size: 17px; line-height: 1.2; }
.sg-kind__box small { font-size: 14px; color: var(--suave); line-height: 1.3; }
.sg-kind:hover .sg-kind__box { border-color: var(--granate); transform: translateY(-2px); }
.sg-kind input:checked + .sg-kind__box { border-color: var(--granate); background: var(--granate); color: var(--blanco); }
.sg-kind input:checked + .sg-kind__box small { color: var(--rosa-2); }
.sg-kind input:checked + .sg-kind__box .sg-kind__icon { stroke: var(--oro); }
.sg-kind input:focus-visible + .sg-kind__box { outline: 3px solid var(--oro); outline-offset: 2px; }
.sg-kinds.is-bad .sg-kind__box { border-color: #B42318; }

.sg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sg-field { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: 16px; position: relative; }
.sg-field > span small { font-weight: 400; color: var(--suave); margin-left: 4px; }
.sg-field input, .sg-field select, .sg-field textarea { width: 100%; min-height: 50px; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--blanco); color: var(--texto); font: inherit; font-weight: 400; font-size: 16px; }
.sg-field textarea { min-height: 170px; resize: vertical; line-height: 1.5; padding-bottom: 30px; }
.sg-field input:focus, .sg-field select:focus, .sg-field textarea:focus { outline: none; border-color: var(--granate); box-shadow: 0 0 0 3px rgba(107,21,38,.12); }
.sg-field.is-bad input, .sg-field.is-bad select, .sg-field.is-bad textarea { border-color: #B42318; }
.sg-field--half { max-width: calc(50% - 8px); }
.sg-count { position: absolute; right: 14px; bottom: 10px; font-size: 13px; font-weight: 500; color: var(--suave); pointer-events: none; }
.sg-field.is-bad .sg-count { bottom: 34px; }
.sg-error { display: block; color: #B42318; font-size: 14px; font-weight: 600; }

.sg-switch { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--fondo); cursor: pointer; }
.sg-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sg-switch__track { flex: none; width: 48px; height: 28px; border-radius: 999px; background: var(--linea); position: relative; transition: background .15s; }
.sg-switch__track span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--blanco); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.sg-switch input:checked + .sg-switch__track { background: var(--granate); }
.sg-switch input:checked + .sg-switch__track span { transform: translateX(20px); }
.sg-switch input:focus-visible + .sg-switch__track { outline: 3px solid var(--oro); outline-offset: 2px; }
.sg-switch__text { display: flex; flex-direction: column; }
.sg-switch__text small { color: var(--suave); font-size: 14px; }
.sg-who { display: flex; flex-direction: column; gap: 16px; }

.sg-check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--suave); cursor: pointer; }
.sg-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--granate); }
.sg-check.is-bad { color: #B42318; }

.sg-form__btn { align-self: flex-start; gap: 10px; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 17px; min-height: 54px; padding: 14px 30px; }
.sg-form__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.sg-form__btn:hover svg { transform: translateX(3px); }
.sg-form__btn:disabled { opacity: .7; cursor: wait; }

.sg-alert { margin: 0; padding: 14px 16px; border-radius: 12px; background: #FDECEA; color: #8A1C12; font-weight: 600; }
.sg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Enviado ---------- */
.sg-done { background: var(--blanco); border-radius: 22px; padding: 40px 34px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; border-top: 6px solid #1F9D55; }
.sg-done__icon { width: 58px; height: 58px; border-radius: 50%; background: #1F9D55; display: inline-flex; align-items: center; justify-content: center; }
.sg-done__icon svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sg-done__title { font-family: var(--display); font-weight: 900; font-size: 46px; line-height: .95; }
.sg-done p { max-width: 620px; }
.sg-done__list { margin: 0; width: 100%; max-width: 520px; display: flex; flex-direction: column; }
.sg-done__list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #EEE9EC; }
.sg-done__list dt { color: var(--suave); }
.sg-done__list dd { margin: 0; font-weight: 700; text-align: right; }
.sg-done__small { font-size: 14px; color: var(--suave); }
.sg-done__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.sg-done .pill--line { border: 1.5px solid var(--granate); color: var(--granate); background: transparent; }
.sg-done .pill--line:hover { background: var(--granate); color: var(--blanco); }

/* ---------- Lateral ---------- */
.sg__side { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 22px; background: var(--azul); color: var(--blanco); border-radius: 22px; padding: 30px 28px; }
.sg__body, .sg__body p { color: #DCE1EC; font-size: 16px; }
.sg__body a, .sg__note a { color: var(--oro); }
.sg-how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.sg-how li { display: flex; gap: 14px; align-items: flex-start; }
.sg-how li > span { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--oro); color: var(--azul); font-family: var(--display); font-weight: 900; font-size: 22px; display: inline-flex; align-items: center; justify-content: center; }
.sg-how strong { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.1; }
.sg-how p { font-size: 15px; color: #C6CCDA; margin-top: 2px; }
.sg__note { font-size: 14px; color: #C6CCDA; border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; }

@media (max-width: 1100px) {
  .sg { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sg__side { position: static; }
  .sg-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sg-form, .sg-done { padding: 24px 18px; border-radius: 18px; }
  .sg-grid { grid-template-columns: minmax(0, 1fr); }
  .sg-field--half { max-width: none; }
  .sg-step legend { font-size: 26px; }
  .sg-kind__box { padding: 14px 12px; }
  .sg-kind__box small { display: none; }
  .sg-form__btn { align-self: stretch; justify-content: center; }
  .sg-done__title { font-size: 38px; }
}
