/* ==========================================================================
   components.css — botones, chips, badges, cards, dashboard y formulario
   ========================================================================== */

/* ==========================================================================
   Botones y CTAs
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--r-lg);
  min-height: var(--tap);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--teal-dark);
  color: #FFFFFF;
  border: 1px solid var(--teal-dark);
}
.btn--primary:hover { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }

.btn--secondary {
  background: var(--surface);
  color: var(--navy);
  border: 1px solid var(--line-input);
}
.btn--secondary:hover { border-color: var(--teal); color: var(--teal-deep); }

.btn--navy {
  background: var(--navy);
  color: #FFFFFF;
  border: 1px solid var(--navy);
}
.btn--navy:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #FFFFFF; }

.btn--lg   { font-size: 17px; padding: 16px 26px; }
.btn--md   { font-size: 16px; padding: 14px 22px; }
.btn--sm   { font-size: 15px; padding: 11px 18px; }
.btn--pill { border-radius: var(--r-pill); }
.btn--block { width: 100%; }

.btn[disabled],
.btn[aria-busy="true"] { cursor: progress; opacity: .85; }

/* CTA del header: no debe empujar al hamburguesa */
.btn--header {
  font-size: 15px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  box-shadow: 0 16px 34px -20px rgba(11, 31, 51, .6);
  animation: islandIn .55s cubic-bezier(.2, .8, .2, 1) .1s both;
  min-width: 0;
}

/* Fila de CTAs del hero */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.cta-row .btn { flex: 1 1 240px; }

.hero__note {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 26px;
}

/* ==========================================================================
   Chips (selección) y badges (riesgo)
   ========================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  padding: 11px 15px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 600;
  min-height: var(--tap);
  cursor: pointer;
  background: var(--surface);
  color: var(--slate);
  border: 1px solid var(--line-input);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
  /* Nunca desborda: si el texto es largo, el chip se ajusta */
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
}
.chip:hover { border-color: var(--teal); color: var(--teal-deep); }
.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--navy);
  color: #FFFFFF;
  border-color: var(--navy);
}
.chip--sm { padding: 9px 13px; font-size: 14px; }

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  line-height: 1.25;
  text-align: left;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
}
.badge--sm { font-size: 11.5px; }

.badge--danger { background: var(--risk-danger-bg); border: 1px solid var(--risk-danger-line); color: var(--risk-danger-ink); }
.badge--warn   { background: var(--risk-warn-bg);   border: 1px solid var(--risk-warn-line);   color: var(--risk-warn-ink); }
.badge--info   { background: var(--risk-info-bg);   border: 1px solid var(--risk-info-line);   color: var(--risk-info-ink); }
.badge--ok     { background: var(--risk-ok-bg);     border: 1px solid var(--risk-ok-line);     color: var(--risk-ok-ink); }

.status-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.status-tag--ok     { background: var(--risk-ok-bg);   border: 1px solid var(--risk-ok-line);   color: var(--risk-ok-ink); }
.status-tag--warn   { background: var(--risk-warn-bg); border: 1px solid var(--risk-warn-line); color: var(--risk-warn-ink); }
.status-tag--info   { background: var(--risk-info-bg); border: 1px solid var(--risk-info-line); color: var(--risk-info-ink); }

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--r-pill);
}
.pill-tag--teal { background: var(--teal-soft); color: var(--teal-deep); border: 1px solid var(--teal-line); }
.pill-tag--gray { background: var(--surface); color: var(--navy-2); border: 1px solid var(--line-strong); }

/* ==========================================================================
   Hero — mockup del producto
   ========================================================================== */
.hero__visual { position: relative; min-width: 0; }

.mock {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-mock);
  overflow: hidden;
}
.mock__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--navy);
}
.mock__bar span {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: .2px;
}

.kpi-row {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.kpi {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  min-width: 0;
}
.kpi__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.kpi__value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}
.kpi--danger { background: var(--risk-danger-bg); border-color: var(--risk-danger-line); }
.kpi--danger .kpi__label, .kpi--danger .kpi__value { color: var(--risk-danger-ink); }
.kpi--warn { background: var(--risk-warn-bg); border-color: var(--risk-warn-line); }
.kpi--warn .kpi__label, .kpi--warn .kpi__value { color: var(--risk-warn-ink); }
.kpi--teal { background: var(--teal-wash); border-color: var(--teal-line); }
.kpi--teal .kpi__label, .kpi--teal .kpi__value { color: var(--teal-deep); }

.chart-block { padding: 16px 16px 6px; }
.chart-block__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.chart-block__head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.chart-block__head span { font-size: 12px; color: var(--muted); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}
.legend i.is-band { height: 8px; }
.legend i.is-dashed { height: 0; border-top: 2px dashed var(--amber); border-radius: 0; }

.chart-wrap { position: relative; }
.chart-wrap svg { overflow: visible; }

.chart-tip {
  position: absolute;
  transform: translate(-50%, -125%);
  background: var(--navy);
  color: #FFFFFF;
  padding: 8px 11px;
  border-radius: var(--r-md);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px -12px rgba(11, 31, 51, .6);
  z-index: 2;
}
.chart-tip strong {
  font-family: var(--font-display);
  display: block;
  font-size: 12.5px;
}
.chart-tip span { color: var(--on-dark); font-size: 11.5px; }

.hero__recs { padding: 6px 16px 18px; display: grid; gap: 8px; }
.rec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.rec-row__main { min-width: 0; flex: 1 1 170px; }
.rec-row__sku {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .3px;
}
.rec-row__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rec-row__cover { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rec-row__action { font-size: 13px; font-weight: 600; color: var(--navy-2); white-space: nowrap; }

.hero__float {
  position: absolute;
  right: 10px;
  bottom: -20px;
  background: var(--navy);
  border-radius: var(--r-md);
  box-shadow: 0 14px 30px -16px rgba(11, 31, 51, .5);
  padding: 10px 14px;
  animation: riseCard .6s ease-out 1.15s both;
}
.hero__float span { font-size: 13px; font-weight: 600; color: #FFFFFF; }

/* ==========================================================================
   Sección "El problema"
   ========================================================================== */
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  background: var(--surface);
}
.card--danger { background: var(--risk-danger-bg); border-color: var(--risk-danger-line); }

.card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.card__icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  background: var(--risk-danger-ink);
}
.card__head h3 { font-size: 22px; font-weight: 700; }

.bullet-list { display: grid; gap: 12px; }
.bullet-list li {
  display: flex;
  gap: 10px;
  font-size: 16px;
  color: var(--slate);
}
.bullet-list li b { flex: none; color: var(--risk-danger-ink); font-weight: 700; }

.panel-navy {
  margin-top: 20px;
  background: var(--navy);
  border-radius: var(--r-xl);
  padding: clamp(24px, 3vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px;
  align-items: center;
}
.panel-navy__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.25;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 12px;
  letter-spacing: -.6px;
}
.panel-navy__text { font-size: 16px; color: var(--on-dark); }

.meter-list { display: grid; gap: 14px; }
.meter {
  display: grid;
  grid-template-columns: 92px 1fr 78px;
  gap: 12px;
  align-items: center;
}
.meter__label { font-size: 13px; font-weight: 600; color: #FFFFFF; }
.meter__track {
  height: 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .12);
  display: block;
  position: relative;
  overflow: hidden;
}
.meter__fill {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  display: block;
}
.meter__value { font-size: 12px; color: var(--on-dark-2); text-align: right; }
.meter-note { font-size: 12px; color: var(--on-dark-2); margin-top: 14px; }

/* ==========================================================================
   Sección "Cómo funcionaría" — pasos
   ========================================================================== */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.steps__line {
  position: absolute;
  left: 28px; right: 28px;
  top: 46px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--sky));
  opacity: .35;
}
.step {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 24px;
  min-width: 0;
}
.step__num {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--navy);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  display: grid;
  place-items: center;
}
.step__num--teal { background: var(--teal); color: #05292A; }
.step h3 { font-size: 18px; font-weight: 700; margin: 16px 0 8px; }
.step p { font-size: 15px; line-height: 1.55; color: var(--muted); margin-bottom: 18px; }

.file-list { display: grid; gap: 8px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}
.file-item span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-item__tag {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
}
.file-item__tag--csv  { color: var(--teal-deep); background: var(--teal-soft); }
.file-item__tag--xlsx { color: var(--success-ink); background: var(--success-bg); }
.file-item__tag--erp  { color: var(--navy-2); background: var(--line-soft); }

.mini-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
}
.mini-panel__head {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.mini-panel__head b { color: var(--teal-deep); font-weight: 600; }
.progress {
  display: block;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--line-soft);
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress > span {
  position: absolute;
  inset: 0;
  background: var(--teal);
  border-radius: var(--r-pill);
  display: block;
}
.check-list { display: grid; gap: 7px; font-size: 12.5px; }
.check-list div { display: flex; gap: 8px; align-items: center; }
.check-list .is-ok { color: var(--success-ink); }
.check-list .is-warn { color: var(--risk-danger-ink); }

.priority-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
}
.priority-card--high {
  background: var(--risk-danger-bg);
  border-color: var(--risk-danger-line);
}
.priority-card__level {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--muted);
}
.priority-card--high .priority-card__level { color: var(--risk-danger-ink); }
.priority-card__title { font-size: 13px; font-weight: 600; color: var(--ink); }
.priority-card__note { font-size: 12px; color: #5E7590; }

/* ==========================================================================
   Dashboard del producto
   ========================================================================== */
.dashboard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.dashboard__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--navy);
  flex-wrap: wrap;
}
.dashboard__bar span {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
}
.dashboard__body { display: flex; min-width: 0; }

.dashboard__nav {
  flex: none;
  width: 178px;
  border-right: 1px solid var(--line-soft);
  padding: 16px 12px;
  display: grid;
  gap: 4px;
  align-content: start;
  background: var(--surface-2);
}
.dashboard__nav button {
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--slate);
  transition: background .16s ease, color .16s ease;
}
.dashboard__nav button:hover { background: var(--line-mid); }
.dashboard__nav button[aria-current="true"] { background: var(--navy); color: #FFFFFF; }

.dashboard__main { flex: 1; min-width: 0; padding: 18px; }

/* Riel de tabs para pantallas angostas */
.tab-rail {
  display: none;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 12px;
  margin-bottom: 6px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  /* Sangrado hasta el borde de la card para que se note que hay más tabs */
  margin-inline: -18px;
  padding-inline: 18px;
}
.tab-rail button {
  flex: none;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  min-height: var(--tap);
  background: var(--surface);
  color: var(--slate);
  border: 1px solid var(--line-input);
}
.tab-rail button[aria-selected="true"] {
  background: var(--navy);
  color: #FFFFFF;
  border-color: var(--navy);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.panel-head h3 { font-size: 19px; font-weight: 700; }

.range-switch {
  margin-left: auto;
  display: flex;
  gap: 6px;
  background: var(--line-mid);
  padding: 4px;
  border-radius: 10px;
}
.range-switch button {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
  color: var(--muted);
  white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}
.range-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(11, 31, 51, .16);
}

/* --- Tabla (pantallas anchas) ------------------------------------------- */
.repo-table {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.repo-table__row {
  display: grid;
  grid-template-columns: 46px 100px minmax(0, 1.4fr) 68px 86px 88px 134px minmax(0, 1.1fr) 100px;
  gap: 8px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-mid);
  background: var(--surface);
  cursor: pointer;
  transition: background .16s ease;
}
.repo-table__row:last-child { border-bottom: 0; }
.repo-table__row:hover { background: var(--surface-3); }
.repo-table__row.is-active {
  background: var(--teal-wash);
  box-shadow: inset 3px 0 0 var(--teal);
}
.repo-table__head {
  padding: 11px 14px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .4px;
  text-transform: uppercase;
  cursor: default;
}
.repo-table__head:hover { background: var(--surface-3); }

.cell-pri  { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--navy); }
.cell-sku  { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cell-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-num  { font-size: 13.5px; color: var(--slate); }
.cell-rec  { font-size: 13px; font-weight: 600; color: var(--navy-2); }

.hint {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  cursor: help;
}

/* --- Cards (pantallas angostas) ----------------------------------------- */
.repo-cards { display: none; gap: 10px; }
.repo-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.repo-card.is-active { background: var(--teal-wash); border-color: var(--teal); }
.repo-card__top {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}
.repo-card__sku { font-size: 12px; font-weight: 700; color: var(--muted); }
.repo-card__name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 6px 0 10px;
}
.repo-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.repo-card__stats > span { display: block; min-width: 0; }
.repo-card__stats b {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.repo-card__stats i {
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.repo-card__foot {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
  flex-wrap: wrap;
}
.repo-card__foot > span:first-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-2);
}

/* --- Detalle del producto seleccionado ---------------------------------- */
.detail {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  padding: 18px;
}
.detail__head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 14px;
}
.detail__head h4 { font-size: 17px; font-weight: 700; }
.detail__sku { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.detail__horizon { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.detail__chart {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 12px;
}
.detail__note { font-size: 13px; color: var(--muted); margin-top: 12px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  gap: 12px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 10px 12px;
  min-width: 0;
}
.stat dt { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat dd {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
}

.suggested {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--teal-line);
  border-radius: var(--r-md);
  padding: 14px;
}
.suggested__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--teal-deep);
  text-transform: uppercase;
}
.suggested__value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 4px 0 8px;
}
.suggested__why { font-size: 13.5px; color: var(--slate); }

.decision { margin-top: 14px; }
.decision__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.decision__options { display: flex; flex-wrap: wrap; gap: 8px; }
.decision__options button {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  min-height: 42px;
  background: var(--surface);
  color: var(--slate);
  border: 1px solid var(--line-input);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.decision__options button[aria-pressed="true"] {
  background: var(--navy);
  color: #FFFFFF;
  border-color: var(--navy);
}

.tab-placeholder {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}
.tab-placeholder h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.tab-placeholder p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 18px;
}

.value-props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  margin-top: 28px;
}
.value-prop { display: flex; gap: 12px; align-items: flex-start; }
.value-prop__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-weight: 700;
}
.value-prop__icon--danger { background: var(--risk-danger-bg); border: 1px solid var(--risk-danger-line); color: var(--risk-danger-ink); }
.value-prop__icon--teal   { background: var(--teal-wash); border: 1px solid var(--teal-line); color: var(--teal-deep); }
.value-prop__icon--info   { background: var(--risk-info-bg); border: 1px solid var(--risk-info-line); color: var(--risk-info-ink); }
.value-prop p { font-size: 15.5px; line-height: 1.55; color: var(--slate); }
.value-prop strong { color: var(--navy); }

/* ==========================================================================
   Sección "Experiencia previa"
   ========================================================================== */
.section--navy .eyebrow { color: var(--teal); }
.section--navy .h2 { color: #FFFFFF; margin: 12px 0 18px; }
.section--navy p { font-size: 17px; line-height: 1.65; color: var(--on-dark); text-wrap: pretty; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
  width: 100%;
  min-width: 0;
}
.stat-card {
  flex: 1 1 150px;
  min-width: 0;
  border: 1px solid #61D4D7;
  border-radius: var(--r-lg);
  padding: 22px;
  background: var(--teal-dark);
}
.stat-card--wide { flex: 1 1 320px; }
.stat-card__value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -1px;
}
.stat-card__value--sm { font-size: 18px; font-weight: 700; letter-spacing: 0; }
.stat-card__label { font-size: 14px; color: #FFFFFF; margin-top: 6px; }

/* ==========================================================================
   Formulario de contacto
   ========================================================================== */
.contact__list {
  display: grid;
  gap: 12px;
  font-size: 15.5px;
  color: var(--slate);
}
.contact__list li { display: flex; gap: 10px; }
.contact__list b { flex: none; color: var(--teal-deep); font-weight: 700; }

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-card);
  padding: clamp(20px, 3vw, 34px);
  min-width: 0;
}

.form-steps {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}
.form-steps span {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--line-mid);
  color: var(--muted);
  min-width: 0;
  overflow-wrap: break-word;
}
.form-steps span.is-active { background: var(--navy); color: #FFFFFF; }

.form-step { display: grid; gap: 16px; }
.form-step[hidden] { display: none; }

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px;
}
.field { min-width: 0; }
.field > label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field > label .opt { font-weight: 400; color: var(--muted); }

.input,
.select,
.textarea {
  width: 100%;
  padding: 14px;
  /* 16px evita el zoom automático de iOS al enfocar */
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-input);
  border-radius: var(--r-md);
  min-height: 50px;
  transition: border-color .16s ease, background .16s ease;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); }
.input.is-filled, .select.is-filled { border-color: var(--teal); }
.input.is-invalid, .select.is-invalid {
  border-color: var(--danger);
  background: #FFF9F9;
}
.textarea { resize: vertical; min-height: 96px; }
.select { appearance: auto; }

.field-error {
  display: block;
  font-size: 13px;
  color: var(--risk-danger-ink);
  margin-top: 6px;
}
.field-error[hidden] { display: none; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  padding: 0;
}
legend .opt { font-weight: 400; color: var(--muted); }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.45;
}
.consent input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--teal-dark);
  flex: none;
}
.form-note { font-size: 13px; color: var(--muted); }

.form-alert {
  background: var(--risk-danger-bg);
  border: 1px solid var(--risk-danger-line);
  border-radius: var(--r-md);
  padding: 14px;
  font-size: 14px;
  color: var(--risk-danger-ink);
}
.form-alert[hidden] { display: none; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.form-actions .btn--back { flex: 0 1 140px; }
.form-actions .btn--submit { flex: 1 1 240px; }

.btn--submit[aria-busy="true"] { background: #5C8A8C; border-color: #5C8A8C; }
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex: none;
}
.spinner[hidden] { display: none; }

.form-success { text-align: center; padding: 20px 4px; }
.form-success[hidden] { display: none; }
.form-success__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: var(--r-pill);
  background: var(--success-bg);
  color: var(--success-ink);
  font-size: 26px;
  font-weight: 700;
}
.form-success h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -.6px;
}
.form-success p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate);
  margin: 0 auto 24px;
  max-width: 46ch;
}

/* Honeypot antispam: invisible para personas, visible para bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
