:root {
  --navy: #0d1935;
  --navy-2: #081226;
  --navy-3: #18294c;
  --green: #2f8f3b;
  --green-dark: #246f2f;
  --lime: #7dc242;
  --sky: #e9f5ec;
  --bg: #f3f6fa;
  --white: #fff;
  --text: #101b35;
  --gray: #5d6981;
  --muted: #7c879c;
  --border: #dbe2ec;
  --warning: #fff7e8;
  --warning-border: #f0d6a8;
  --danger: #b22b2b;
  --shadow: 0 14px 40px rgba(13, 25, 53, .1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, sans-serif;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

/*
  Alto de la cabecera. Vive en una variable porque el botón flotante de los
  accesos internos tiene que colocarse justo debajo: la cabecera es `sticky`,
  así que nunca desaparece y taparla no es un problema de un momento, es
  permanente.
*/
:root {
  --top-height: 88px;
}

.top {
  background: var(--navy-2);
  box-shadow: 0 3px 20px rgba(0, 0, 0, .25);
  position: sticky;
  top: 0;
  z-index: 50;
}

.top-inner {
  align-items: center;
  display: flex;
  gap: 22px;
  height: var(--top-height);
  justify-content: space-between;
  margin: auto;
  max-width: 1380px;
  padding: 0 24px;
}

.logo {
  background: linear-gradient(145deg, #fff, #f4f7fb);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
  display: flex;
  padding: 5px 9px;
}

.logo img {
  display: block;
  height: 54px;
  width: auto;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.top-actions a {
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 9px;
  color: #fff;
  font-size: .84rem;
  font-weight: 700;
  padding: 10px 15px;
  text-decoration: none;
}

.top-actions .catalog {
  background: var(--green);
  border-color: var(--green);
}

/*
  Barra de accesos internos.

  Deliberadamente distinta del resto de la página: es una herramienta del
  equipo, no parte de lo que se le enseña al cliente, y quien la vea tiene que
  saber de un vistazo que está en modo interno. El atributo `hidden` del HTML
  la mantiene oculta hasta que se confirme la sesión; no se estiliza en
  `display` para no pisarlo.
*/
/*
  Flota arriba a la derecha y acompaña al scroll: el vendedor salta al
  cotizador desde donde esté trabajando, sin volver al principio.

  `hidden` del HTML la mantiene oculta hasta confirmar la sesión, así que el
  display solo se define cuando NO está oculta. Si se pusiera `display:flex`
  a secas se dibujaría también para los clientes.
*/
.internal-bar:not([hidden]) {
  display: flex;
}

.internal-bar {
  align-items: center;
  background: var(--navy);
  border: 1px solid var(--lime);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(13, 25, 53, .28);
  color: #fff;
  flex-wrap: wrap;
  gap: 10px;
  max-width: calc(100vw - 24px);
  padding: 9px 12px;
  position: fixed;
  right: 12px;
  /*
    Justo DEBAJO de la cabecera, no encima. La cabecera es `sticky` y no se va
    nunca, así que un botón flotante sobre ella tapa el logo y los accesos de
    forma permanente, no mientras se hace scroll.
  */
  top: calc(var(--top-height) + 10px);
  /* Por encima del contenido, por debajo de los diálogos de la página. */
  z-index: 60;
}

.internal-bar-tag {
  background: var(--lime);
  border-radius: 6px;
  color: var(--navy);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 4px 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.internal-bar-user {
  color: rgba(255, 255, 255, .82);
  font-size: .8rem;
  white-space: nowrap;
}

.internal-bar-link {
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 8px;
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  padding: 7px 13px;
  text-decoration: none;
  white-space: nowrap;
}

.internal-bar-link:hover,
.internal-bar-link:focus-visible {
  background: var(--green-dark);
}

/*
  Acciones del equipo sobre el proyecto, junto a los botones de envío.

  `hidden` las mantiene ocultas hasta confirmar la sesión, por eso el display
  se define solo cuando NO lo llevan: a secas se dibujarían para el cliente.
*/
.project-actions:not([hidden]) {
  display: grid;
}

.project-actions {
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.project-actions button {
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  padding: 12px 14px;
}

/* Sobrescribe lo que ya existe: color sobrio, no de acción principal. */
.project-save {
  background: var(--white);
  border: 1px solid var(--navy);
  color: var(--navy);
}

.project-save:hover:not(:disabled) {
  background: var(--sky);
}

.project-save:disabled {
  background: #f1f4f8;
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

/* Crea algo nuevo: no destruye nada, por eso va en el verde de la marca. */
.project-new {
  background: var(--green);
  border: 1px solid var(--green);
  color: #fff;
}

.project-new:hover:not(:disabled) {
  background: var(--green-dark);
}

.project-actions-note {
  color: var(--gray);
  font-size: .82rem;
  grid-column: 1 / -1;
  margin: 0;
}

.project-actions-note:empty {
  display: none;
}

@media (max-width: 560px) {
  .project-actions {
    grid-template-columns: 1fr;
  }
}

/* El código de la cotización que abrirá el botón, para no ir a ciegas. */
.internal-bar-hint {
  color: rgba(255, 255, 255, .62);
  flex-basis: 100%;
  font-size: .7rem;
  text-align: right;
}

.internal-bar-hint:empty {
  display: none;
}

/*
  En pantallas estrechas la barra ocuparía media pantalla sobre el contenido.
  Se reduce a lo imprescindible: la etiqueta y el botón.
*/
@media (max-width: 640px) {
  .internal-bar {
    gap: 8px;
    padding: 7px 10px;
  }

  .internal-bar-user {
    display: none;
  }
}

.hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(125, 194, 66, .2), transparent 26%),
    linear-gradient(145deg, var(--navy), #14264d);
  color: #fff;
  overflow: hidden;
  padding: 58px 24px 76px;
}

.hero-inner {
  margin: auto;
  max-width: 1080px;
  text-align: center;
}

.eyebrow {
  align-items: center;
  color: var(--lime);
  display: inline-flex;
  font-size: .75rem;
  font-weight: 800;
  gap: 8px;
  letter-spacing: .1em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.eyebrow::before {
  background: var(--lime);
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

h1,
h2,
.metric strong,
.result-kicker {
  font-family: "Exo 2", sans-serif;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.08;
  margin-bottom: 16px;
}

h1 span {
  color: var(--lime);
}

.hero p {
  color: rgba(255, 255, 255, .76);
  margin: auto;
  max-width: 780px;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.steps a {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  display: inline-flex;
  font-size: .75rem;
  gap: 7px;
  padding: 8px 13px;
  text-decoration: none;
}

.steps b {
  align-items: center;
  background: var(--lime);
  border-radius: 50%;
  color: var(--navy);
  display: inline-flex;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.55fr) minmax(350px, .72fr);
  margin: -34px auto 72px;
  max-width: 1380px;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.section-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.section-number {
  align-items: center;
  background: var(--sky);
  border-radius: 10px;
  color: var(--green-dark);
  display: inline-flex;
  flex: 0 0 36px;
  font-family: "Exo 2", sans-serif;
  font-weight: 800;
  height: 36px;
  justify-content: center;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
}

.section-sub {
  color: var(--gray);
  font-size: .84rem;
}

.grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  color: #3d4960;
  font-size: .76rem;
  font-weight: 700;
}

input,
select,
textarea {
  background: #fbfcfe;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  outline: none;
  padding: 11px 12px;
  width: 100%;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 143, 59, .12);
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--danger);
}

input[readonly],
select:disabled {
  background: #eef2f6;
  color: #596579;
  cursor: not-allowed;
}

.hint {
  color: var(--muted);
  font-size: .7rem;
}

.bill-calculation-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.bill-calculation-status {
  color: var(--muted);
  flex: 1 1 320px;
  font-size: .76rem;
  font-weight: 700;
}

.bill-calculation-status.ok { color: #276232; }
.bill-calculation-status.warning { color: #8a6114; }
.bill-calculation-status.error { color: var(--danger); }

.choice-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice {
  position: relative;
}

.choice input {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.choice label {
  background: #fbfcfe;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: block;
  height: 100%;
  padding: 13px;
}

.choice label strong {
  display: block;
  font-size: .82rem;
  margin-bottom: 2px;
}

.choice label span {
  color: var(--gray);
  font-size: .7rem;
}

.choice input:checked + label {
  background: var(--sky);
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(47, 143, 59, .08);
}

.bill-panel,
.appliances-panel,
.autonomy-panel {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 18px;
  padding: 18px;
}

.compatible-note {
  background: var(--sky);
  border: 1px solid #cfe4d3;
  border-radius: 10px;
  color: #315a37;
  font-size: .74rem;
  padding: 12px;
}

.inverter-status {
  background: #f4f7fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--gray);
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.55;
  padding: 12px;
}

.inverter-status.ok {
  background: #edf8ef;
  border-color: #b8ddbf;
  color: #276232;
}

.inverter-status.warning {
  background: #fff8e8;
  border-color: #edcf86;
  color: #805a11;
}

.inverter-status.error {
  background: #fff1f1;
  border-color: #efaaaa;
  color: #b42318;
}

.inverter-status ul {
  margin: 5px 0 0 18px;
  padding: 0;
}

.inverter-status p {
  margin: 7px 0 0;
}

.metric-validation {
  display: block;
  font-weight: 700;
  margin-top: 4px;
}

.metric-validation.error {
  color: #b42318;
}

.metric-validation.warning {
  color: #8a6114;
}

.metric-validation.ok {
  color: #276232;
}

.print-only {
  display: none;
}

.panel-title {
  font-size: .9rem;
  margin-bottom: 12px;
}

.location-line {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
}

.btn {
  border: 0;
  border-radius: 9px;
  font-weight: 800;
  padding: 11px 16px;
  transition: transform .2s, background .2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
.send:focus-visible,
.remove:focus-visible {
  outline: 3px solid rgba(47, 143, 59, .28);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-secondary {
  background: #edf2f7;
  color: var(--text);
}

.btn-dark {
  background: var(--navy-3);
  color: #fff;
}

.btn-danger {
  background: #fff0f0;
  border: 1px solid #e6a5a5;
  color: #a12727;
}

.btn-danger:hover {
  background: #ffe3e3;
}

.project-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-tool-status {
  color: var(--green-dark);
  font-size: .88rem;
  font-weight: 700;
  margin: 9px 0 0;
  min-height: 1.25em;
}

.addbar {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 16px;
}

.loads {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--gray);
  padding: 28px 16px;
  text-align: center;
}

.load {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.load-main {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1.35fr) 62px 88px 88px 74px 74px 78px 42px;
}

/* Los equipos con compresor llevan una columna más para el factor de uso.
   Sin esta variante, el botón de eliminar cae a una fila nueva. */
.load-main.with-duty {
  grid-template-columns: minmax(140px, 1.2fr) 62px 88px 88px 74px 74px 74px 76px 42px;
}

.load .field label {
  font-size: .66rem;
}

.load-meta {
  align-items: center;
  border-top: 1px solid #edf0f5;
  color: var(--gray);
  display: flex;
  flex-wrap: wrap;
  font-size: .7rem;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
}

.load-meta-left {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.load-auto-note {
  background: #fff8e8;
  border: 1px solid #efd48d;
  border-radius: 8px;
  color: #74551b;
  font-size: .7rem;
  line-height: 1.5;
  margin: 10px 0 0;
  padding: 9px 11px;
}

.check {
  align-items: center;
  color: #3d4960;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 700;
  gap: 7px;
}

.check input {
  accent-color: var(--green);
  height: 17px;
  padding: 0;
  width: 17px;
}

.remove {
  background: #fff;
  border: 1px solid #f0c8c8;
  border-radius: 8px;
  color: var(--danger);
  font-size: 1.1rem;
  height: 42px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 17px;
}

.results {
  position: sticky;
  top: 106px;
}

.results-head {
  background: linear-gradient(135deg, var(--navy-3), var(--navy));
  border-radius: 14px;
  color: #fff;
  margin-bottom: 17px;
  padding: 20px;
}

.result-kicker {
  color: var(--lime);
  display: block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.results-head strong {
  display: block;
  font-family: "Exo 2", sans-serif;
  font-size: 1.45rem;
  line-height: 1.2;
}

.results-head p {
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
  margin-top: 5px;
}

.confidence {
  align-items: center;
  display: flex;
  font-size: .68rem;
  gap: 7px;
  margin-top: 10px;
}

.confidence-dot {
  background: #f5b942;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.confidence-dot.high {
  background: var(--lime);
}

.metric-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.metric {
  background: #f6f8fb;
  border: 1px solid var(--border);
  border-radius: 11px;
  min-width: 0;
  padding: 13px;
}

.metric.wide {
  grid-column: 1 / -1;
}

.metric span {
  color: var(--gray);
  display: block;
  font-size: .68rem;
  margin-bottom: 3px;
}

.metric strong {
  display: block;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.metric small {
  color: var(--muted);
  display: block;
  font-size: .64rem;
  margin-top: 3px;
}

.independent-systems {
  border-top: 1px solid var(--border);
  margin-top: 18px;
  padding-top: 17px;
}

.savings-summary {
  background: linear-gradient(135deg, #edf8ee, #f7fbf3);
  border: 1px solid #cfe6d1;
  border-radius: 12px;
  margin-top: 18px;
  padding: 14px;
}

.savings-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.savings-head h2 {
  font-size: .95rem;
  margin-top: 3px;
}

.savings-head > strong {
  color: var(--green-dark);
  font-size: 1.45rem;
}

.savings-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 11px;
}

.savings-grid div {
  background: rgba(255, 255, 255, .86);
  border-radius: 8px;
  padding: 8px 9px;
}

.savings-grid span {
  color: var(--muted);
  display: block;
  font-size: .61rem;
}

.savings-grid strong {
  display: block;
  font-size: .76rem;
  margin-top: 2px;
}

.savings-summary > p {
  color: var(--gray);
  font-size: .65rem;
  line-height: 1.5;
  margin-top: 9px;
}

.savings-scenario-note {
  color: var(--gray);
  font-size: .7rem;
  line-height: 1.45;
  margin: 6px 0 0;
}

/* Bloque del beneficio tributario: preguntas en el formulario y resultado. */
.tax-panel {
  background: rgba(15, 42, 71, .03);
  border: 1px solid rgba(15, 42, 71, .1);
  border-radius: 12px;
  margin-top: 14px;
  padding: 14px 16px;
}

.tax-panel .panel-sub {
  color: var(--gray);
  font-size: .72rem;
  line-height: 1.45;
  margin: 0 0 12px;
}

/* Diagnóstico de capacidad: por qué la carga no cabe y cómo resolverlo. */
.capacity-diagnosis {
  border-left: 4px solid #b8860b;
  border-radius: 12px;
  background: rgba(245, 166, 35, .1);
  margin-top: 16px;
  padding: 14px 18px;
}

.capacity-diagnosis.level-b,
.capacity-diagnosis.level-c {
  background: rgba(200, 40, 40, .08);
  border-left-color: #c82828;
}

.capacity-diagnosis h3 {
  font-size: .86rem;
  line-height: 1.45;
  margin: 0 0 6px;
}

.capacity-diagnosis p {
  color: var(--gray);
  font-size: .74rem;
  line-height: 1.5;
  margin: 0 0 8px;
}

.capacity-diagnosis ul {
  font-size: .74rem;
  line-height: 1.55;
  margin: 0;
  padding-left: 18px;
}

.capacity-diagnosis li {
  margin-bottom: 4px;
}

.quote-blocked {
  background: rgba(200, 40, 40, .08);
  border-left: 4px solid #c82828;
  border-radius: 8px;
  font-size: .76rem;
  line-height: 1.5;
  margin: 0 0 12px;
  padding: 10px 14px;
}

/* Cuadro de cargas en formato de norma. */
.load-schedule {
  background: var(--card, #fff);
  border: 1px solid rgba(15, 42, 71, .1);
  border-radius: 16px;
  margin-top: 16px;
  padding: 18px 20px;
}

.load-schedule-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.load-schedule-head h2 {
  font-size: 1rem;
  margin: 2px 0 0;
}

.load-schedule-scroll {
  overflow-x: auto;
}

.load-schedule-table {
  border-collapse: collapse;
  font-size: .72rem;
  min-width: 560px;
  width: 100%;
}

.load-schedule-table th,
.load-schedule-table td {
  border-bottom: 1px solid rgba(15, 42, 71, .08);
  padding: 6px 8px;
  text-align: right;
}

.load-schedule-table th:nth-child(2),
.load-schedule-table td:nth-child(2) {
  text-align: left;
}

.load-schedule-table thead th {
  color: var(--gray);
  font-weight: 600;
  white-space: nowrap;
}

.load-schedule-table tbody tr.adjusted {
  background: rgba(245, 166, 35, .1);
}

.load-schedule-table tfoot td {
  border-bottom: 0;
  border-top: 2px solid rgba(15, 42, 71, .18);
  font-weight: 700;
}

.load-schedule-table .fs-input {
  border: 1px solid rgba(15, 42, 71, .2);
  border-radius: 6px;
  font-size: .72rem;
  padding: 3px 4px;
  text-align: right;
  width: 58px;
}

.load-schedule-coincidence {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.load-schedule-coincidence li {
  border-bottom: 1px solid rgba(15, 42, 71, .08);
  display: flex;
  font-size: .74rem;
  gap: 8px;
  justify-content: space-between;
  padding: 5px 0;
}

.load-schedule-coincidence li:last-child {
  border-bottom: 0;
}

.load-schedule-note {
  color: var(--gray);
  font-size: .68rem;
  line-height: 1.5;
  margin: 10px 0 0;
}

/* Tecnología del equipo de climatización, dentro de la meta de cada carga. */
.ac-tech {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

/* display: inline-flex gana a [hidden], así que hay que apagarlo a mano: sin
   esto, el selector de tablero se vería en proyectos de un solo tablero. */
.ac-tech[hidden] {
  display: none;
}

/* El tablero es la decisión que más cambia la cotización de las que caben en
   esta fila, así que se distingue del resto de selectores. */
.load-board > span {
  color: var(--green-dark);
  font-weight: 700;
}

.load-board select {
  border-color: rgba(47, 143, 59, .45);
}

.ac-tech > span {
  color: var(--gray);
  font-size: .7rem;
}

.ac-tech select {
  border: 1px solid rgba(15, 42, 71, .2);
  border-radius: 6px;
  font-size: .7rem;
  padding: 2px 4px;
}

.service-capacity {
  display: block;
  font-size: .95rem;
  padding-top: 6px;
}

.tax-regime-note {
  border-left: 3px solid var(--brand, #f5a623);
  line-height: 1.5;
  margin-top: 10px;
  padding-left: 10px;
}

.tax-incentive {
  border-top: 1px solid rgba(15, 42, 71, .12);
  margin-top: 14px;
  padding-top: 12px;
}

.tax-incentive h3 {
  font-size: .82rem;
  margin: 0 0 4px;
}

.tax-incentive-lead {
  color: var(--gray);
  font-size: .74rem;
  line-height: 1.5;
  margin: 0 0 8px;
}

.tax-incentive-detail {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tax-incentive-detail li {
  border-bottom: 1px solid rgba(15, 42, 71, .08);
  display: flex;
  font-size: .74rem;
  gap: 8px;
  justify-content: space-between;
  padding: 5px 0;
}

.tax-incentive-detail li:last-child {
  border-bottom: 0;
}

.tax-legal {
  margin-top: 10px;
}

.tax-legal summary {
  cursor: pointer;
  font-size: .74rem;
  font-weight: 600;
}

.tax-legal-source {
  color: var(--gray);
  font-size: .7rem;
  line-height: 1.45;
  margin: 8px 0 4px;
}

.tax-legal-quote {
  border-left: 3px solid rgba(15, 42, 71, .18);
  color: var(--gray);
  font-size: .7rem;
  font-style: italic;
  line-height: 1.55;
  margin: 0;
  padding-left: 12px;
}

.tax-legal-links {
  font-size: .72rem;
  margin: 10px 0 0;
}

.tax-legal-disclaimer {
  color: var(--gray);
  font-size: .68rem;
  line-height: 1.45;
  margin: 8px 0 0;
}

/* Las dos planillas posibles según cómo use la casa de noche. */
.savings-scenarios {
  border-collapse: collapse;
  margin-top: 10px;
  width: 100%;
}

.savings-scenarios caption {
  color: var(--gray);
  font-size: .7rem;
  padding-bottom: 6px;
  text-align: left;
}

.savings-scenarios th,
.savings-scenarios td {
  border-bottom: 1px solid rgba(15, 42, 71, .08);
  font-size: .74rem;
  padding: 6px 0;
  text-align: left;
}

.savings-scenarios th {
  color: var(--gray);
  font-weight: 500;
  padding-right: 10px;
}

.savings-scenarios td {
  font-weight: 700;
  white-space: nowrap;
}

.savings-scenarios td:last-child {
  color: var(--gray);
  font-weight: 500;
  text-align: right;
}

.savings-scenarios tr:last-child th,
.savings-scenarios tr:last-child td {
  border-bottom: 0;
}

.savings-scenarios .scenario-base td:first-of-type {
  color: #a05a00;
}

.savings-scenarios .scenario-essential td:first-of-type {
  color: #1d7a33;
}

/* De dónde sale cada kWh del mes: lo verde lo aporta el sistema, lo gris
   sigue viniendo de la red y se paga. */
.savings-balance {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.savings-balance li {
  border-bottom: 1px solid rgba(15, 42, 71, .08);
  display: flex;
  font-size: .74rem;
  gap: 8px;
  justify-content: space-between;
  padding: 5px 0;
}

.savings-balance li:last-child {
  border-bottom: 0;
}

.savings-balance li span {
  color: var(--gray);
}

.savings-balance li.from-solar strong {
  color: #1d7a33;
}

.savings-balance li.from-grid strong {
  color: #a05a00;
}

/* Avisos que corrigen una expectativa de ahorro: deben leerse, no pasar
   desapercibidos como la nota legal de abajo. */
.savings-summary > p.savings-warning {
  background: #fff8e6;
  border-left: 3px solid #e0a800;
  border-radius: 0 8px 8px 0;
  color: #6b4e00;
  font-size: .72rem;
  padding: 8px 10px;
}

.independent-systems-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.independent-systems-head h2 {
  font-size: 1rem;
  margin-top: 3px;
}

.independent-systems-note,
.allocation-editor > p {
  color: var(--gray);
  font-size: .72rem;
  line-height: 1.5;
  margin-top: 8px;
}

.independent-system-cards {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.independent-system-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px;
}

.independent-system-card.warning {
  background: #fff9ed;
  border-color: var(--warning-border);
}

.independent-system-title {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.independent-system-title strong {
  font-size: .86rem;
}

.independent-system-title span {
  color: var(--gray);
  font-size: .68rem;
}

.independent-system-metrics {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 9px;
}

.independent-system-metrics div {
  background: #fff;
  border-radius: 7px;
  padding: 7px 8px;
}

.independent-system-metrics span {
  color: var(--muted);
  display: block;
  font-size: .61rem;
}

.independent-system-metrics strong {
  display: block;
  font-size: .73rem;
  margin-top: 2px;
}

.independent-system-loads {
  color: var(--gray);
  font-size: .68rem;
  line-height: 1.5;
  margin-top: 9px;
}

.independent-system-alert {
  color: #9a3412;
  font-size: .67rem;
  font-weight: 700;
  margin-top: 7px;
}

.allocation-editor {
  border-top: 1px solid var(--border);
  margin-top: 13px;
  padding-top: 12px;
}

.allocation-editor h3 {
  font-size: .82rem;
}

.allocation-scroll {
  margin-top: 9px;
  overflow-x: auto;
}

.allocation-table {
  border-collapse: collapse;
  font-size: .68rem;
  min-width: 100%;
}

.allocation-table th,
.allocation-table td {
  border: 1px solid var(--border);
  padding: 6px;
  text-align: left;
}

.allocation-table th {
  background: #edf3f8;
  white-space: nowrap;
}

.allocation-table input {
  min-width: 58px;
  padding: 7px;
  width: 64px;
}

.allocation-status {
  min-height: 1.2em;
}

.allocation-status.error {
  color: var(--danger);
  font-weight: 700;
}

.independent-system-total {
  background: #edf8ee;
  border: 1px solid #cfe6d1;
  border-radius: 10px;
  color: #244d2b;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.55;
  margin-top: 12px;
  padding: 11px 12px;
}

.recommend,
.assumptions,
.contact-data {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 15px;
}

.recommend h3,
.assumptions h3,
.contact-data h3 {
  font-size: .9rem;
  margin-bottom: 10px;
}

.recommend ul,
.assumptions ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.recommend li,
.assumptions li {
  color: var(--gray);
  font-size: .76rem;
  padding-left: 18px;
  position: relative;
}

.recommend li::before {
  color: var(--green);
  content: "✓";
  font-weight: 900;
  left: 0;
  position: absolute;
}

.assumptions li::before {
  color: var(--muted);
  content: "•";
  left: 4px;
  position: absolute;
}

.warning {
  background: var(--warning);
  border: 1px solid var(--warning-border);
  border-radius: 10px;
  color: #76501b;
  font-size: .72rem;
  margin-top: 15px;
  padding: 12px;
}

.contact-data .grid {
  grid-template-columns: 1fr;
}

.consent {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.consent input {
  accent-color: var(--green);
  flex: 0 0 17px;
  height: 17px;
  margin-top: 2px;
  padding: 0;
}

.consent label {
  color: var(--gray);
  font-size: .68rem;
}

.send-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.send {
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: .76rem;
  font-weight: 800;
  padding: 12px 9px;
}

.sales {
  background: var(--green);
}

.technical {
  background: #1769aa;
}

.send:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.outside-note {
  background: #edf4ff;
  border: 1px solid #cfe0f6;
  border-radius: 10px;
  color: #34516f;
  font-size: .72rem;
  margin-top: 12px;
  padding: 12px;
}

.privacy {
  color: var(--muted);
  font-size: .65rem;
  margin-top: 9px;
}

.quote-code-panel {
  background: #edf4ff;
  border: 1px solid #cfe0f6;
  border-radius: 10px;
  margin-top: 12px;
  padding: 11px;
}

.quote-code-panel span,
.quote-code-panel small {
  color: #4a617b;
  display: block;
  font-size: .65rem;
}

.quote-code-panel strong {
  color: var(--navy);
  display: block;
  font-size: 1.1rem;
  letter-spacing: .06em;
  margin: 3px 0;
}

.quote-action-status {
  color: var(--gray);
  font-size: .68rem;
  min-height: 1.2em;
  margin-top: 9px;
}

.quote-action-status.error {
  color: var(--danger);
  font-weight: 700;
}

.powered {
  align-items: center;
  background: #f7faf5;
  border: 1px solid #dcebd4;
  border-radius: 11px;
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 13px;
}

.powered img {
  height: 52px;
  object-fit: contain;
  width: 52px;
}

.powered p {
  color: var(--gray);
  font-size: .68rem;
}

.powered strong {
  color: var(--text);
  display: block;
  font-size: .76rem;
}

.footer {
  background: var(--navy-2);
  color: rgba(255, 255, 255, .65);
  font-size: .78rem;
  padding: 32px 24px;
  text-align: center;
}

.footer a {
  color: var(--lime);
}

.sr {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 1120px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .results {
    position: static;
  }
}

@media (max-width: 900px) {
  .load-main {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .load-main .field:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --top-height: 76px;
  }

  .top-inner {
    padding: 0 14px;
  }

  .logo img {
    height: 42px;
  }

  .top-actions a {
    padding: 9px 10px;
  }

  .top-actions a:first-child {
    display: none;
  }

  .hero {
    padding: 44px 16px 65px;
  }

  .steps a {
    font-size: .68rem;
  }

  .layout {
    padding: 0 14px;
  }

  .card {
    padding: 20px;
  }

  .grid,
  .grid.three,
  .choice-row {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .location-line,
  .addbar {
    grid-template-columns: 1fr;
  }

  .load-main {
    grid-template-columns: 1fr 1fr;
  }

  .load-main .field:first-child {
    grid-column: 1 / -1;
  }

  .send-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric.wide {
    grid-column: auto;
  }

  .load-main {
    grid-template-columns: 1fr;
  }

  .load-main .field:first-child {
    grid-column: auto;
  }

  .remove {
    width: 100%;
  }
}

@page {
  margin: 10mm;
  size: letter portrait;
}

@media print {
  .top,
  .hero,
  .actions,
  .addbar,
  .send-grid,
  .privacy,
  .footer,
  .form-column,
  .contact-data,
  .outside-note,
  .powered {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .layout {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .card {
    border: 0;
    box-shadow: none;
  }

  .results {
    margin: 0;
    padding: 0;
    position: static;
  }

  /* Imprimir resumen debe imprimir solamente el documento compacto. Antes se
     imprimían primero las tarjetas visibles de resultados y luego este bloque,
     por eso el logotipo recién aparecía en la segunda página. */
  .results > :not(.print-summary) {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .print-summary {
    border-bottom: 1px solid #d9e1eb;
    margin: 18px 0;
    padding-bottom: 14px;
  }

  .print-brand {
    align-items: center;
    border-bottom: 2px solid #78b72a;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }

  .print-brand img {
    height: auto;
    width: 190px;
  }

  .print-brand div {
    color: #10294f;
    text-align: right;
  }

  .print-brand strong,
  .print-brand span {
    display: block;
  }

  .print-brand strong {
    font-size: 13pt;
  }

  .print-brand span {
    font-size: 8.5pt;
    margin-top: 4px;
  }

  .print-summary h2 {
    font-size: 12pt;
    margin: 12px 0 7px;
  }

  .print-project-grid {
    display: grid;
    font-size: 8.5pt;
    gap: 5px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .print-project-grid div {
    border-bottom: 1px solid #edf0f4;
    padding-bottom: 3px;
  }

  .print-equipment-table {
    border-collapse: collapse;
    font-size: 8pt;
    width: 100%;
  }

  .print-equipment-table th,
  .print-equipment-table td {
    border: 1px solid #d9e1eb;
    padding: 4px 5px;
    text-align: left;
  }

  .print-equipment-table th {
    background: #edf3f8;
  }

  .print-load-note {
    color: #9a5b00;
    display: block;
    font-size: 6.5pt;
    line-height: 1.15;
    margin-top: 2px;
  }

  .print-load-explanation {
    background: #eef5fb;
    border-left: 3px solid #2477b3;
    font-size: 7.5pt;
    line-height: 1.35;
    margin: 6px 0 0;
    padding: 5px 7px;
  }

  .print-quote-table th:first-child,
  .print-quote-table td:first-child {
    text-align: center;
    width: 9%;
  }

  .print-quote-table th:nth-child(2),
  .print-quote-table td:nth-child(2) {
    width: 30%;
  }

  .print-system-table {
    font-size: 6.7pt;
  }

  .independent-systems,
  .metric-grid,
  .recommend,
  .warning,
  .assumptions {
    display: none !important;
  }

  .metric,
  .print-equipment-table tr {
    break-inside: avoid;
  }
}

/* Ventanas emergentes de datos de contacto */
.optional {
  color: var(--muted);
  font-weight: 400;
}

.app-dialog {
  background: var(--white);
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: var(--text);
  max-width: 420px;
  padding: 22px;
  width: calc(100% - 32px);
}

.suggestions-dialog {
  max-width: 760px;
}

.suggestions-summary {
  background: #eef8f0;
  border: 1px solid #b7dcbc;
  border-radius: 10px;
  color: var(--navy);
  line-height: 1.45;
  margin: 14px 0;
  padding: 12px 14px;
}

.suggestions-list {
  display: grid;
  gap: 12px;
  max-height: 55vh;
  overflow: auto;
  padding-right: 3px;
}

.suggestion-card {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px;
}

.suggestion-card.recommended {
  border-color: #8ecb96;
  box-shadow: inset 4px 0 0 var(--green);
}

.suggestion-card h4 {
  color: var(--navy);
  font-size: 1rem;
  margin: 0 0 7px;
}

.suggestion-card p {
  color: var(--gray);
  font-size: .9rem;
  margin: 5px 0;
}

.suggestion-impact {
  background: #f4f7fb;
  border-radius: 8px;
  color: var(--navy) !important;
  font-weight: 700;
  padding: 9px 10px;
}

.suggestion-warning {
  color: #9b5b00 !important;
  font-weight: 700;
}

.suggestion-apply {
  background: var(--green);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  margin-top: 8px;
  padding: 9px 13px;
}

.suggestion-apply:hover {
  background: var(--green-dark);
}

.app-dialog::backdrop {
  background: rgba(13, 25, 53, .55);
}

.app-dialog h3 {
  color: var(--navy);
  font-size: 1.12rem;
  margin: 0 0 10px;
}

.app-dialog p {
  line-height: 1.45;
  margin: 0 0 10px;
}

.dialog-hint {
  color: var(--gray);
  font-size: .9rem;
}

.dialog-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.dialog-field label {
  color: var(--navy);
  font-size: .88rem;
  font-weight: 600;
}

.dialog-field input {
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  padding: 11px 12px;
  width: 100%;
}

.dialog-field input:focus-visible {
  border-color: var(--green);
  outline: 2px solid var(--sky);
}

.dialog-field input:invalid:not(:placeholder-shown) {
  border-color: var(--danger);
}

.dialog-consent {
  align-items: flex-start;
  display: flex;
  gap: 9px;
  margin-top: 14px;
}

.dialog-consent input {
  flex: 0 0 auto;
  height: 19px;
  margin-top: 2px;
  width: 19px;
}

.dialog-consent label {
  color: var(--gray);
  font-size: .86rem;
  line-height: 1.4;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin: 18px 0 0;
  padding: 0;
}

.dialog-btn {
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 11px 18px;
}

.dialog-btn.primary {
  background: var(--green);
  color: var(--white);
}

.dialog-btn.primary:hover {
  background: var(--green-dark);
}

.dialog-btn.light {
  background: var(--white);
  border-color: var(--border);
  color: var(--navy);
}

.dialog-btn.light:hover {
  border-color: var(--navy);
}

@media (max-width: 480px) {
  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-btn {
    width: 100%;
  }
}

@media print {
  .app-dialog {
    display: none !important;
  }
}

/* Cuadrícula de Preferencias de la solución */
.bidirectional-choice small {
  display: block;
  margin-top: 0.4rem;
  color: #52627a;
  line-height: 1.35;
}
.preference-grid {
  display: grid;
  gap: 14px 12px;
  grid-template-columns: minmax(0, 2fr) auto minmax(0, 2fr) auto;
}

.preference-grid .field {
  min-width: 0;
}

.preference-grid .field.narrow {
  width: auto;
}

.preference-grid .field.wide {
  grid-column: span 2;
}

.preference-grid .metric-box {
  background: var(--sky);
  border-radius: 10px;
  padding: 10px 12px;
}

.preference-grid .metric-box span {
  color: var(--gray);
  display: block;
  font-size: .8rem;
}

.preference-grid .metric-box strong {
  color: var(--navy);
  display: block;
  font-size: 1.05rem;
  margin-top: 3px;
}

/* La autonomía sin apagar nada. Va dentro del recuadro de autonomía, no como
   celda de la rejilla: si fuera celda, desbarataría las columnas. */
.autonomy-frank {
  border-top: 1px solid rgba(15, 42, 71, .12);
  color: #6b4e00;
  font-size: .72rem;
  line-height: 1.45;
  margin: 8px 0 0;
  padding-top: 8px;
}

/* Autonomía detallada por tablero cuando el proyecto usa varios inversores. */
.autonomy-by-system {
  border-top: 1px solid rgba(15, 42, 71, .12);
  list-style: none;
  margin: 8px 0 0;
  padding: 8px 0 0;
}

.autonomy-by-system li {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 3px 0;
}

.autonomy-by-system li span {
  display: inline;
  flex: 1 1 auto;
  font-size: .78rem;
}

.autonomy-by-system li strong {
  display: inline;
  font-size: .88rem;
  margin-top: 0;
}

.autonomy-by-system li small {
  color: var(--gray);
  flex: 1 0 100%;
  font-size: .72rem;
}

.qty-control {
  align-items: center;
  display: flex;
  gap: 4px;
}

.qty-control input {
  -moz-appearance: textfield;
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  padding: 10px 4px;
  text-align: center;
  width: 60px;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-control button {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  height: 30px;
  line-height: 1;
  width: 30px;
}

.qty-control button:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.qty-control input:disabled,
.qty-control input[readonly] {
  background: var(--bg);
  color: var(--gray);
}

/* Cantidad que solo se lee. Sin botones a los lados, se centra en el hueco que
   ocupaban para que no quede descuadrada respecto de las que sí se editan. */
.qty-control.qty-readout {
  justify-content: center;
}

.qty-control.qty-readout input {
  cursor: default;
  font-weight: 700;
}

/* Datos del cliente en la sección 1. Se distinguen del resto porque no son
   parámetros del cálculo: son de quién es el proyecto. */
.client-data {
  background: var(--sky);
  border-radius: 12px;
  margin-bottom: 14px;
  padding: 12px;
}

.quote-client-recap {
  color: #3d4960;
  font-size: .82rem;
  line-height: 1.5;
  margin: 0 0 12px;
}

.quote-client-recap.missing {
  color: #7a5400;
  font-weight: 600;
}

/* Modo cotización. Va arriba de la sección porque cambia el significado de
   todo lo que hay debajo: deja de haber dimensionamiento y pasa a haber
   precio. */
.quote-mode {
  background: #fff8e6;
  border: 1px solid #f0d9a0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
}

.quote-mode .check {
  align-items: flex-start;
  cursor: pointer;
  display: flex;
  font-size: .84rem;
  gap: 8px;
  line-height: 1.35;
}

.quote-mode .check[hidden] {
  display: none;
}

.quote-mode .check input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.quote-mode .hint {
  margin: 0;
}

.quote-mode .hint[hidden] {
  display: none;
}

/* Resumen del proyecto. Es lo que hay que pedir al proveedor, así que se
   enumera por modelo: un total con una sola potencia describiría un arreglo
   que no existe. */
.project-summary {
  background: var(--sky);
  border-radius: 12px;
  margin-bottom: 14px;
  padding: 12px;
}

.project-summary[hidden] {
  display: none;
}

.project-summary-title {
  color: var(--navy);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.project-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.project-summary-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 0;
  padding: 10px 12px;
}

.project-summary-box > span {
  color: var(--gray);
  display: block;
  font-size: .76rem;
  font-weight: 700;
}

.project-summary-box ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.project-summary-box ul li {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0;
}

.project-summary-box ul li span {
  color: var(--text);
  flex: 1 1 auto;
  font-size: .78rem;
}

.project-summary-box ul li strong {
  font-size: .82rem;
  white-space: nowrap;
}

.project-summary-box ul li small {
  color: var(--gray);
  flex: 1 0 100%;
  font-size: .7rem;
}

.project-summary-box > strong {
  border-top: 1px solid var(--border);
  color: var(--navy);
  display: block;
  font-size: .92rem;
  margin-top: 8px;
  padding-top: 8px;
}

/* Pestañas de sistema. El color identifica cuál está activo: sin esa señal,
   editar el tablero B creyendo que es el A pasa desapercibido hasta la
   cotización. */
.system-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.system-tabs[hidden] {
  display: none;
}

.system-tabs-label {
  color: #3d4960;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.system-tabs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.system-tab {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #3d4960;
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  padding: 6px 16px;
}

.system-tab:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.system-tab[aria-selected="true"] {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.system-panel {
  background: rgba(47, 143, 59, .06);
  border: 1px solid rgba(47, 143, 59, .28);
  border-radius: 12px;
  margin-bottom: 14px;
  padding: 12px;
}

.system-panel-title {
  color: var(--green-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.compatible-note.warning {
  background: var(--warning);
  border-color: var(--warning-border);
  color: #7a5400;
}

@media (max-width: 720px) {
  .preference-grid {
    grid-template-columns: 1fr auto;
  }

  .preference-grid .field.wide {
    grid-column: span 2;
  }
}

.approximate-investment {
  color: var(--gray);
  font-size: .85rem;
  line-height: 1.4;
  margin: 6px 0 0;
}

.approximate-investment.ready {
  background: var(--sky);
  border-left: 3px solid var(--green);
  border-radius: 0 7px 7px 0;
  color: var(--text);
  padding: 8px 10px;
}

.inverter-filter-note {
  color: var(--gray);
  font-size: .85rem;
  line-height: 1.4;
  margin: 6px 0 0;
}

.inverter-filter-note.filtered {
  background: var(--sky);
  border-left: 3px solid var(--green);
  border-radius: 0 7px 7px 0;
  color: var(--text);
  padding: 7px 10px;
}

/* Asistente guiado */
.wizard-launch {
  background: var(--white);
  border: 2px solid var(--lime);
  border-radius: 12px;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 18px;
  padding: 13px 18px;
  text-align: left;
  transition: background .15s, border-color .15s;
}

.wizard-launch:hover {
  background: var(--sky);
  border-color: var(--green);
}

.wizard-launch span {
  color: var(--green-dark);
  display: block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.wizard-dialog {
  max-width: 540px;
}

.wizard-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.wizard-head h3 {
  margin: 2px 0 0;
}

.wizard-step {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin: 0;
  text-transform: uppercase;
}

.wizard-skip {
  background: none;
  border: 0;
  color: var(--gray);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: .88rem;
  padding: 4px 6px;
  text-decoration: underline;
}

.wizard-skip:hover {
  color: var(--navy);
}

.wizard-progress {
  background: var(--border);
  border-radius: 3px;
  height: 5px;
  margin: 14px 0 16px;
  overflow: hidden;
}

.wizard-progress span {
  background: var(--green);
  border-radius: 3px;
  display: block;
  height: 100%;
  transition: width .2s;
  width: 0;
}

.wizard-body {
  max-height: 58vh;
  overflow-y: auto;
}

.wizard-hint {
  color: var(--gray);
  font-size: .9rem;
  margin: 0 0 12px;
}

.wizard-option {
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  margin-bottom: 9px;
  padding: 12px 13px;
  transition: border-color .15s, background .15s;
}

.wizard-option:hover {
  border-color: var(--green);
}

.wizard-option.selected {
  background: var(--sky);
  border-color: var(--green);
}

.wizard-option input {
  flex: 0 0 auto;
  height: 18px;
  margin-top: 2px;
  width: 18px;
}

.wizard-option strong {
  color: var(--navy);
  display: block;
  font-size: .96rem;
}

.wizard-option small {
  color: var(--gray);
  display: block;
  font-size: .84rem;
  line-height: 1.35;
  margin-top: 3px;
}

.wizard-extra {
  display: block;
  margin-top: 12px;
}

.wizard-extra span {
  color: var(--navy);
  display: block;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.wizard-extra select,
.wizard-extra input {
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

.wizard-help {
  background: var(--sky);
  border-radius: 9px;
  margin-top: 14px;
  padding: 10px 12px;
}

.wizard-help summary {
  color: var(--green-dark);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
}

.wizard-help p {
  color: var(--text);
  font-size: .88rem;
  line-height: 1.45;
  margin: 9px 0 0;
}

.wizard-error {
  color: var(--danger);
  font-size: .88rem;
  font-weight: 600;
  margin: 10px 0 0;
}

.wizard-result {
  display: grid;
  gap: 8px;
}

.wizard-result div {
  background: var(--bg);
  border-radius: 9px;
  padding: 10px 12px;
}

.wizard-result span {
  color: var(--muted);
  display: block;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.wizard-result strong {
  color: var(--navy);
  display: block;
  font-size: .95rem;
  line-height: 1.35;
  margin-top: 3px;
}

.wizard-review {
  background: var(--warning);
  border: 1px solid var(--warning-border);
  border-radius: 9px;
  margin-top: 12px;
  padding: 11px 13px;
}

.wizard-review ul {
  font-size: .88rem;
  line-height: 1.45;
  margin: 7px 0 0;
  padding-left: 18px;
}

.wizard-note {
  color: var(--gray);
  font-size: .88rem;
  margin: 14px 0 0;
}
