:root {
  /* Aparejo PRO: gris grafito en lugar del azul marino de la app de autónomos.
     La variable sigue llamándose --azul para no tocar el resto del código. */
  --azul: #1F2226;
  --amarillo: #F5B517;
  --fondo: #ECEDEF;
  --borde: #D2D5DA;
}

* { box-sizing: border-box; }

/* Que el atributo hidden mande siempre, aunque el elemento tenga display propio */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--fondo);
  color: var(--azul);
}

header {
  background: linear-gradient(180deg, #25282D 0%, #16181B 100%);
  border-bottom: 3px solid var(--amarillo);
  color: #fff;
  padding: 18px 24px;
  position: relative;
}

.btn-header {
  position: absolute;
  top: 18px;
  right: 16px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
}

.btn-header:hover { border-color: var(--amarillo); color: var(--amarillo); }

#mis-datos, #zona-logo, #zona-firma, #zona-colores, #mi-sesion, #mi-suscripcion, #mis-clientes {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

#mis-datos h3, #zona-logo h3, #zona-firma h3, #zona-colores h3, #mi-sesion h3, #mi-suscripcion h3, #mis-clientes h3 { margin-top: 0; }

.btn-nuevo-grande {
  width: 100%;
  padding: 18px;
  font-size: 1.15rem;
  margin: 6px 0 10px;
}

#logo-actual {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  background: var(--fondo);
  max-width: 280px;
}

#logo-actual img, #logo-svg-cont svg { max-width: 100%; max-height: 90px; }

/* La firma se enseña sobre cuadros grises: así se ve si el PNG tiene el fondo
   transparente (como debe) o si trae un rectángulo blanco pegado. */
#firma-actual {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  max-width: 280px;
  background-color: #fff;
  background-image: linear-gradient(45deg, #EDEDE8 25%, transparent 25%, transparent 75%, #EDEDE8 75%),
                    linear-gradient(45deg, #EDEDE8 25%, transparent 25%, transparent 75%, #EDEDE8 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}

#firma-actual img, #firma-svg-cont svg { max-width: 100%; max-height: 90px; }

header h1 {
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Logotipo oficial (PNG del kit de marca): nunca se deforma, solo se escala */
.marca-logo { height: 30px; width: auto; display: block; }

.lema {
  margin: 4px 0 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.rotulo {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--borde);
  border-radius: 6px;
  resize: vertical;
}

textarea:focus {
  outline: 2px solid var(--amarillo);
  border-color: var(--amarillo);
}

.foto-zona {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px dashed var(--borde);
  border-radius: 6px;
  color: #888;
  background: #fff;
}

.foto-zona input { display: none; }

.foto-zona.activa {
  color: var(--azul);
  cursor: pointer;
}

.foto-zona.activa:hover { border-color: var(--amarillo); }

#lista-adjuntos {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.adjunto {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
}

.adjunto img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--borde);
}

.adjunto-icono { font-size: 1.6rem; width: 54px; text-align: center; }

.adjunto-nombre {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.btn-principal {
  background: var(--amarillo);
  color: var(--azul);
  border: none;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}

.btn-principal:hover { filter: brightness(1.05); }
.btn-principal:disabled { opacity: 0.6; cursor: wait; }

.estado { color: var(--azul); font-style: italic; }
.estado.error { color: #B3261E; font-style: normal; font-weight: 600; }

#resultados h2 { margin-top: 36px; }

#mis-presupuestos { margin-top: 30px; }

#lista-presupuestos {
  list-style: none;
  margin: 0;
  padding: 0;
}

.presupuesto-guardado {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 6px;
  margin-bottom: 8px;
  padding: 4px 8px;
}

.presupuesto-guardado.abierto { border-color: var(--amarillo); border-width: 2px; }

.abrir-presupuesto {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 10px 4px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--azul);
}

.abrir-presupuesto span { color: #777; font-size: 0.9rem; white-space: nowrap; }

.capitulo { margin-bottom: 28px; }

.capitulo h3 {
  background: var(--azul);
  color: #fff;
  padding: 8px 12px;
  margin: 0 0 0;
  border-radius: 6px 6px 0 0;
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--borde);
}

th, td {
  border: 1px solid var(--borde);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
}

th { background: #E3E5E8; font-weight: 600; }

td.num { width: 90px; text-align: right; }
td.unidad { width: 50px; text-align: center; }

td.num input {
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  text-align: right;
  padding: 2px;
}

td.num input:focus { outline: 2px solid var(--amarillo); background: #fff; }

td.importe { font-variant-numeric: tabular-nums; background: #F6F7F8; }

td.vacio { color: #999; font-style: italic; text-align: center; }

tr.subtotal td { background: #E3E5E8; font-weight: 600; }

td.acciones { width: 150px; white-space: nowrap; }

.btn-icono {
  border: 1px solid var(--borde);
  background: #fff;
  border-radius: 4px;
  padding: 2px 7px;
  margin: 0 1px;
  cursor: pointer;
  font-family: inherit;
}

.btn-icono:hover { border-color: var(--azul); }

td.acciones select {
  max-width: 46px;
  border: 1px solid var(--borde);
  border-radius: 4px;
  background: #fff;
  padding: 2px;
  margin: 0 1px;
  cursor: pointer;
}

.cabecera-capitulo {
  display: flex;
  align-items: center;
  background: var(--azul);
  border-radius: 6px 6px 0 0;
}

.cabecera-capitulo h3 {
  flex: 1;
  background: none;
  border-radius: 0;
  margin: 0;
}

.btn-borrar-capitulo {
  background: none;
  border: none;
  color: #fff;
  opacity: 0.6;
  margin-right: 8px;
}

.btn-borrar-capitulo:hover { opacity: 1; color: #ffb4ac; }

.btn-secundario {
  border: 1px dashed var(--borde);
  background: #fff;
  border-radius: 6px;
  padding: 6px 14px;
  margin-top: 6px;
  cursor: pointer;
  font-family: inherit;
  color: var(--azul);
}

.btn-secundario:hover { border-color: var(--amarillo); }

.pie-presupuesto {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.total-general {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--azul);
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 1.05rem;
}

.total-general strong { font-size: 1.2rem; }

#datos-presupuesto {
  margin-top: 26px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 6px;
}

#datos-presupuesto h3 { margin: 0 0 10px; font-size: 1rem; }

.rejilla-datos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.rejilla-datos label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.rejilla-datos input, .rejilla-datos select {
  border: 1px solid var(--borde);
  border-radius: 4px;
  padding: 8px;
  font: inherit;
  font-weight: 400;
}

.rejilla-datos input:focus, .rejilla-datos select:focus {
  outline: 2px solid var(--amarillo);
}

.zona-descargas {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.zona-descargas .btn-principal { flex: 1; }

#btn-pdf { background: var(--azul); color: #fff; }

/* ---------- Móvil: cada partida pasa de fila a ficha ---------- */
@media (max-width: 700px) {
  main { padding: 16px 10px 50px; }

  .btn-principal { width: 100%; padding: 14px; }

  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }

  tbody tr:not(.subtotal) {
    padding: 10px 12px;
    border: none;
    border-bottom: 2px solid var(--borde);
    background: #fff;
  }

  table { border: 1px solid var(--borde); border-radius: 0 0 6px 6px; }

  td { border: none; padding: 4px 0; }

  /* Etiquetas pequeñas encima de cada casilla numérica */
  td.unidad::before, td.num::before {
    content: attr(data-etiqueta);
    display: block;
    font-size: 0.72rem;
    color: #777;
    margin-bottom: 2px;
  }

  td.unidad {
    display: inline-block;
    width: 18%;
    text-align: left;
    vertical-align: top;
  }

  td.num {
    display: inline-block;
    width: 26%;
    text-align: left;
    vertical-align: top;
  }

  td.num input {
    text-align: left;
    border: 1px solid var(--borde);
    border-radius: 4px;
    padding: 6px;
    background: #fff;
  }

  td.importe { background: none; padding-top: 4px; }

  td.acciones {
    width: 100%;
    padding-top: 8px;
    white-space: normal;
  }

  .btn-icono { padding: 6px 14px; margin-right: 6px; }

  td.acciones select { max-width: 130px; padding: 6px; }

  tr.subtotal {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: #E3E5E8;
  }

  tr.subtotal td { width: auto; padding: 0; }
  tr.subtotal td:last-child { display: none; }

  .pie-presupuesto {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .total-general { justify-content: space-between; }

  #foto-previa { max-width: 140px; max-height: 140px; }

  .zona-descargas { flex-direction: column; }
}

.modo {
  margin: 14px 0;
  padding: 10px 14px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  background: #fff;
}

.modo legend { font-weight: 600; padding: 0 6px; }

.modo label {
  display: block;
  margin: 6px 0;
  cursor: pointer;
}

mark {
  background: #FDE68A;
  padding: 0 2px;
  border-radius: 2px;
}

.titulo-partida { font-weight: 700; }

.descripcion-partida { margin-top: 3px; }

[contenteditable]:hover { outline: 1px dashed var(--borde); }
[contenteditable]:focus { outline: 2px solid var(--amarillo); background: #fff; }

.aviso {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #8a6d00;
  background: #FDF3D7;
  border-left: 3px solid var(--amarillo);
  padding: 3px 8px;
}

#no-entendido-zona, #pendientes-zona {
  margin-top: 30px;
  padding: 14px;
  background: #FDF3D7;
  border: 1px solid var(--amarillo);
  border-radius: 6px;
}

#no-entendido-zona h3, #pendientes-zona h3 { margin: 0 0 6px; }

.explicacion { margin: 0 0 8px; font-size: 0.9rem; }

/* ---------- Ajustes: colores corporativos ---------- */
.fila-colores { display: flex; gap: 16px; flex-wrap: wrap; }

.fila-colores label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.fila-colores input[type="color"] {
  width: 120px;
  height: 52px;
  padding: 2px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

#muestra-colores {
  border: 1px solid var(--borde);
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.85rem;
  max-width: 420px;
}

#muestra-colores div { padding: 8px 10px; }
#muestra-cabecera, #muestra-capitulo { font-weight: 700; }
#muestra-partida { background: #fff; }

/* ---------- Precio cerrado: un solo total, sin precios por partida ---------- */
.opcion-cerrado {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 18px;
  cursor: pointer;
}

.opcion-cerrado input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }

/* Caja del contrato: aparece debajo de su casilla, sangrada para que se vea
   que depende de ella. */
#zona-contrato { margin: -8px 0 18px; padding-left: 30px; }
@media (max-width: 700px) { #zona-contrato { padding-left: 0; } }

.precio-cerrado th.col-precio, .precio-cerrado th.col-importe,
.precio-cerrado td.col-precio, .precio-cerrado td.col-importe,
.precio-cerrado tr.subtotal { display: none; }

.input-total-cerrado {
  width: 130px;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: right;
  padding: 6px 8px;
  border: none;
  border-radius: 4px;
}

/* Cuentas de prueba: cuántos presupuestos gratis quedan */
.aviso-prueba {
  background: #FFF6D9;
  border: 1px solid var(--amarillo, #F5B517);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 0 14px;
  font-weight: 600;
  text-align: center;
}

/* ---------- Revisión general (sept 2026) ---------- */

/* Aviso de guardado: siempre a la vista mientras se edita */
.estado-guardado {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 20;
  margin: 0;
  max-width: calc(100vw - 24px);
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--borde);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}
.estado-guardado.ok { color: #1E6B34; border-color: #9CCBA8; }
.estado-guardado.error { color: #B3261E; border-color: #B3261E; background: #FDECEA; font-weight: 600; border-radius: 10px; }

.total-general { flex-wrap: wrap; }
.eco-total { flex-basis: 100%; text-align: right; color: #fff; opacity: 0.85; font-size: 0.9rem; }

@media (max-width: 700px) {
  /* Por debajo de 16 px el iPhone hace zoom al tocar una casilla y descoloca la pantalla */
  input, select, textarea, [contenteditable] { font-size: 16px !important; }
  /* Botones que se puedan pulsar con el dedo */
  .btn-icono { min-width: 44px; min-height: 44px; }
  .presupuesto-guardado .btn-icono { margin-left: 8px; }
  #pantalla-editor { padding-bottom: 56px; } /* sitio para el aviso de guardado */
}

/* ---------- Suscripción y textos legales ---------- */
.botones-suscripcion { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.botones-suscripcion button { flex: 1; min-width: 220px; padding: 14px; font-size: 1rem; }
.btn-enlace { background: none; border: none; padding: 0; color: var(--azul); text-decoration: underline; font: inherit; font-weight: 700; cursor: pointer; }
.pie-legal { text-align: center; padding: 18px 16px 70px; font-size: 0.85rem; color: #777; }
.pie-legal a { color: #555; }

/* El logotipo es el botón de "inicio" */
header h1 a { display: inline-flex; align-items: center; gap: 10px; line-height: 0; text-decoration: none; }

/* Sello PRO junto al logotipo (el logotipo no se toca: va aparte) */
.marca-pro {
  display: inline-block;
  background: var(--amarillo);
  color: #16181B;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 2px;
  padding: 6px 7px 5px 9px;
  border-radius: 4px;
}

/* ---------- Barra de progreso al generar ---------- */
.progreso { margin: 18px 0; padding: 16px; background: #fff; border: 1px solid var(--borde); border-radius: 8px; }
.progreso-texto { margin: 0 0 10px; font-weight: 700; color: var(--azul); }
.progreso-barra { height: 12px; background: #DDE0E4; border-radius: 999px; overflow: hidden; }
.progreso-relleno { height: 100%; width: 3%; background: var(--amarillo); border-radius: 999px; transition: width 0.5s linear; }
.progreso-nota { margin: 10px 0 0; font-size: 0.85rem; color: #777; }

/* Presupuesto a mano, sin pasar por la IA */
.separador-o {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 10px;
  color: #888;
  font-size: 0.9rem;
}
.separador-o::before, .separador-o::after { content: ""; flex: 1; border-top: 1px solid var(--borde); }
.btn-a-mano {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  border-style: solid;
}
.nota-a-mano { margin-top: 6px; text-align: center; font-size: 0.85rem; }

/* Casillas de texto vacías: se dice qué va dentro */
[data-vacio]:empty::before { content: attr(data-vacio); color: #aaa; font-weight: 400; font-style: italic; }

/* ---------- Desglose de mediciones de una partida ---------- */
.btn-desglose {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--borde);
  border-radius: 4px;
  background: #fff;
  padding: 3px 4px;
  font: inherit;
  font-size: 0.75rem;
  color: var(--azul);
  cursor: pointer;
  white-space: nowrap;
}
.btn-desglose:hover, .btn-desglose.activo { border-color: var(--amarillo); background: #FFF8E1; }
td.num input.medida-calculada { background: #FFF8E1; font-weight: 600; cursor: pointer; }

tr.fila-desglose > td { background: #FAFAF7; padding: 10px 14px 12px; }
.desglose-titulo { margin: 0; font-weight: 700; font-size: 0.9rem; }
.desglose-ayuda { margin: 2px 0 8px; font-size: 0.8rem; color: #666; }

.desglose-linea {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) repeat(4, 72px) 84px 34px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.desglose-cabecera { font-size: 0.75rem; color: #666; margin-bottom: 2px; }
.desglose-cabecera .d-parcial, .desglose-cabecera .d-num { text-align: right; }
.desglose-linea input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--borde);
  border-radius: 4px;
  padding: 6px;
  font: inherit;
  background: #fff;
}
.desglose-linea input.d-num { text-align: right; }
.desglose-linea input:focus { outline: 2px solid var(--amarillo); }
.desglose-linea .d-parcial { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.desglose-cabecera span.d-uds, .desglose-cabecera span.d-largo, .desglose-cabecera span.d-ancho, .desglose-cabecera span.d-alto { text-align: right; }
.desglose-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.desglose-pie strong { font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
  /* En el móvil cada línea ocupa dos renglones: comentario arriba, números debajo */
  .desglose-linea {
    grid-template-columns: repeat(4, 1fr) 1.15fr;
    grid-template-areas: "texto texto texto texto borrar" "uds largo ancho alto parcial";
    padding-bottom: 8px;
    border-bottom: 1px solid var(--borde);
  }
  .desglose-cabecera {
    grid-template-areas: "uds largo ancho alto parcial";
    border-bottom: none;
    padding-bottom: 0;
  }
  .desglose-cabecera .d-texto, .desglose-cabecera .d-borrar { display: none; }
  .desglose-linea .d-texto { grid-area: texto; }
  .desglose-linea .d-uds { grid-area: uds; }
  .desglose-linea .d-largo { grid-area: largo; }
  .desglose-linea .d-ancho { grid-area: ancho; }
  .desglose-linea .d-alto { grid-area: alto; }
  .desglose-linea .d-parcial { grid-area: parcial; }
  .desglose-linea .d-borrar { grid-area: borrar; justify-self: end; margin: 0; }
  .desglose-linea input.d-num { text-align: left; padding: 6px 4px; }
  tr.fila-desglose > td { padding: 10px 0 4px; background: none; }
  tbody tr.fila-desglose { background: #FAFAF7; }
  .btn-desglose { font-size: 0.8rem; padding: 6px 8px; width: auto; min-width: 100%; }
  .desglose-cabecera span.d-uds, .desglose-cabecera span.d-largo, .desglose-cabecera span.d-ancho, .desglose-cabecera span.d-alto { text-align: left; padding-left: 4px; }
}

/* Nota de una partida: en rojo y negrita, igual que saldrá en el PDF */
.nota-partida {
  margin-top: 6px;
  padding: 4px 6px;
  border-left: 3px solid #C62828;
  background: #FDECEA;
  color: #C62828;
  font-weight: 700;
  font-size: 0.9rem;
}
.btn-nota {
  display: inline-block;
  margin-top: 6px;
  border: 1px dashed var(--borde);
  border-radius: 4px;
  background: #fff;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.78rem;
  color: #C62828;
  cursor: pointer;
}
.btn-nota:hover { border-color: #C62828; }
/* Nota interna de una partida: gris azulado, con candado; solo en pantalla */
.nota-interna {
  margin-top: 6px;
  padding: 4px 6px;
  border-left: 3px solid #5B6B82;
  background: #EEF1F5;
}
.nota-interna-etiqueta { display: block; font-size: 0.72rem; color: #5B6B82; margin-bottom: 2px; }
.nota-interna-texto { font-size: 0.88rem; color: #33404F; font-style: italic; white-space: pre-wrap; }
.btn-nota-interna {
  display: inline-block;
  margin-top: 6px;
  margin-left: 6px;
  border: 1px dashed var(--borde);
  border-radius: 4px;
  background: #fff;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.78rem;
  color: #5B6B82;
  cursor: pointer;
}
.btn-nota-interna:hover { border-color: #5B6B82; }
@media (max-width: 700px) { .btn-nota, .btn-nota-interna { padding: 7px 10px; font-size: 0.85rem; } }

/* ---------- Agenda de clientes ---------- */
.elegir-cliente, .buscar-cliente {
  display: block;
  width: 100%;
  margin: 4px 0 8px;
  padding: 10px;
  border: 1px solid var(--borde);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  color: var(--azul);
}
.elegir-cliente { border-color: var(--amarillo); font-weight: 600; cursor: pointer; }
.elegir-cliente:disabled { border-color: var(--borde); font-weight: 400; color: #888; cursor: default; }
#btn-guardar-cliente { margin-top: 10px; }

#lista-clientes { list-style: none; padding: 0; margin: 8px 0; }
#lista-clientes li { display: flex; gap: 6px; align-items: stretch; margin-bottom: 6px; }
.abrir-cliente {
  flex: 1;
  text-align: left;
  border: 1px solid var(--borde);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  font: inherit;
  color: var(--azul);
  cursor: pointer;
}
.abrir-cliente:hover { border-color: var(--amarillo); }
.abrir-cliente strong { display: block; }
.abrir-cliente span { display: block; font-size: 0.8rem; color: #666; margin-top: 2px; }
.form-cliente { margin: 10px 0; padding: 12px; border: 1px solid var(--amarillo); border-radius: 8px; background: #FFFCF2; }
.form-cliente .btn-principal { margin-top: 10px; }
