/* ===== PANEL DE ADMINISTRACIÓN (letra más grande y botones cómodos) ===== */
body.admin { background: var(--crema); font-size: 17px; }
[hidden] { display: none !important; }
.admin__main { padding: 2rem 0 7rem; }
.admin h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.admin__usuario { display: flex; align-items: center; gap: .8rem; }
.boton--texto { background: none; border: 0; color: var(--verde); text-decoration: underline; cursor: pointer; font: inherit; font-size: .95rem; padding: .4rem; }
.boton--grande { padding: 1rem 1.8rem; font-size: 1.05rem; font-weight: 600; }
.boton--exito { background: #2e7d4f; border-color: #2e7d4f; }
.boton--exito:hover { background: #24653f; border-color: #24653f; }
.boton--borrar { background: none; border-color: transparent; color: #a33; }
.boton--borrar:hover { background: #fdecea; border-color: #f3c2bd; color: #a33; }
.boton--peligro { background: #b3261e; border-color: #b3261e; }
.boton--peligro:hover { background: #8c1d17; border-color: #8c1d17; }
.boton:disabled { opacity: .6; cursor: wait; }
.error { color: #9b1c15; font-size: .95rem; background: #fdecea; padding: .8rem 1rem; border-radius: 10px; border-left: 4px solid #d93025; }
.nota.centro { text-align: center; }
.obligatorio { color: #c0392b; }

/* Cargando */
.cargando { text-align: center; padding: 5rem 0; color: var(--gris); }
.girando { width: 42px; height: 42px; border: 4px solid #e5dccb; border-top-color: var(--verde); border-radius: 50%; margin: 0 auto 1rem; animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* Contraseña */
.login { max-width: 440px; margin: 2rem auto; text-align: center; }
.login__icono { width: 100px; margin: 0 auto 1rem; border-radius: 50%; }
.login > p { color: var(--gris); margin: .5rem 0 1.5rem; }
.tarjeta-blanca { background: #fff; border-radius: 18px; padding: 2rem; display: grid; gap: 1rem; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,.05); }
.tarjeta-blanca label { font-weight: 600; color: var(--verde-oscuro); }
.clave { display: flex; border: 2px solid #ddd; border-radius: 12px; overflow: hidden; background: #fff; }
.clave:focus-within { border-color: var(--dorado); }
.clave input { flex: 1; min-width: 0; border: 0; padding: 1rem; font: inherit; font-size: 1.1rem; outline: none; }
.clave__ver { border: 0; background: #f5f1e8; padding: 0 1rem; font: inherit; font-size: .85rem; color: var(--verde); cursor: pointer; }

/* Listado */
.admin__titulo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pestanas { display: flex; gap: .4rem; border-bottom: 2px solid #e5dccb; margin-bottom: 1.2rem; flex-wrap: wrap; }
.pestana { border: 0; background: none; padding: .8rem 1.1rem; font: inherit; font-size: 1rem; cursor: pointer; color: var(--gris); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.pestana.activa { color: var(--verde-oscuro); font-weight: 600; border-bottom-color: var(--dorado); }
#buscar { width: 100%; max-width: 480px; font: inherit; padding: .8rem 1.1rem; border: 1px solid #ddd; border-radius: 12px; margin-bottom: 1rem; }

.lista-admin { display: grid; gap: 1rem; }
.tarjeta-prop {
  display: grid; grid-template-columns: 180px 1fr; gap: 1.3rem;
  background: #fff; border: 1px solid #ece6d8; border-radius: 18px; padding: 1rem;
}
.tarjeta-prop--cerrada img { filter: grayscale(.8); opacity: .7; }
.tarjeta-prop img { width: 180px; height: 135px; object-fit: cover; border-radius: 12px; grid-row: span 2; }
.tarjeta-prop__info { min-width: 0; }
.tarjeta-prop h3 { font-size: 1.5rem; margin: .4rem 0 .2rem; }
.tarjeta-prop__info p { color: var(--gris); font-size: .92rem; }
.tarjeta-prop__precio strong { color: var(--verde-oscuro); }
.codigo { font-size: .75rem; color: #a99a78; margin-left: .3rem; }
.estado { display: inline-block; font-size: .8rem; font-weight: 600; padding: .2rem .7rem; border-radius: 999px; }
.estado--si { background: #e3f1e6; color: #24653f; }
.estado--reservada { background: #fbf1d9; color: #7a5c17; }
.estado--no { background: #eee; color: #555; }
.tarjeta-prop__acciones { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tarjeta-prop__acciones .boton { padding: .65rem 1.1rem; font-size: .95rem; }
.tarjeta-prop__acciones .boton--borrar { margin-left: auto; }
.lista-vacia { background: #fff; border: 2px dashed #e2dccd; border-radius: 18px; padding: 3rem 1.5rem; text-align: center; color: var(--gris); display: grid; gap: 1.2rem; justify-items: center; }

/* Editor */
.volver { margin-bottom: .5rem; padding-left: 0; }
.admin__ayuda { color: var(--gris); margin: .4rem 0 1.5rem; }
.editor { display: grid; gap: 1.2rem; max-width: 780px; }
.bloque { border: 2px solid #ece6d8; background: #fff; border-radius: 18px; padding: 1.5rem; display: grid; gap: 1rem; min-width: 0; transition: border-color .2s; }
.bloque.falta { border-color: #e06b62; background: #fffafa; }
.bloque legend { font-size: 1.15rem; font-weight: 600; color: var(--verde-oscuro); padding: 0 .5rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.paso { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--verde); color: #fff; font-size: .95rem; }
.pista { color: var(--gris); font-size: .9rem; margin-top: -.4rem; }
.bloque label { display: grid; gap: .4rem; font-size: .95rem; font-weight: 600; color: var(--verde-oscuro); min-width: 0; }
.bloque label small { font-weight: 400; color: var(--gris); }
.bloque input:not([type=checkbox]):not([type=radio]):not([type=file]), .bloque textarea {
  font: inherit; font-weight: 400; padding: .9rem 1rem; border: 2px solid #e2ddd0; border-radius: 12px; background: #fff; width: 100%; min-width: 0;
}
.bloque input:focus, .bloque textarea:focus { outline: none; border-color: var(--dorado); }
.fila-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.fila-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }

.casilla { display: flex !important; align-items: flex-start; gap: .7rem; font-weight: 400 !important; color: var(--texto) !important; cursor: pointer; }
.casilla input { width: 22px; height: 22px; margin-top: .1rem; accent-color: var(--verde); flex-shrink: 0; }

.opciones { display: flex; gap: .7rem; flex-wrap: wrap; }
.opcion { cursor: pointer; display: block !important; }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion span { display: block; text-align: center; padding: .8rem 1.2rem; border: 2px solid #e2ddd0; border-radius: 12px; font-weight: 600; color: var(--gris); background: #fff; transition: all .15s; }
.opcion:hover span { border-color: var(--dorado-claro); }
.opcion input:checked + span { border-color: var(--verde); background: #eef3ec; color: var(--verde-oscuro); box-shadow: inset 0 0 0 1px var(--verde); }
.opcion input:focus-visible + span { outline: 3px solid var(--dorado); outline-offset: 2px; }
.opciones--grandes .opcion { flex: 1; }
.opciones--grandes span { padding: 1.3rem 1rem; font-size: 1.1rem; }
.opciones--grandes b { display: block; font-size: 2rem; margin-bottom: .3rem; }


.precio { display: flex; align-items: center; border: 2px solid #e2ddd0; border-radius: 12px; overflow: hidden; max-width: 340px; }
.precio:focus-within { border-color: var(--dorado); }
.precio__moneda { padding: 0 1rem; font-weight: 700; color: var(--verde-oscuro); background: #f5f1e8; align-self: stretch; display: grid; place-items: center; font-size: 1.1rem; }
.bloque .precio input { border: 0 !important; font-size: 1.4rem !important; font-weight: 600 !important; }

.contadores { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.contador { display: grid !important; gap: .5rem; background: #faf8f3; border-radius: 12px; padding: .8rem; font-size: .88rem; font-weight: 600; color: var(--verde-oscuro); }
.contador > div { display: flex; align-items: center; gap: .3rem; }
.contador button { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--verde); background: #fff; color: var(--verde); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.contador button:active { background: var(--verde); color: #fff; }
.bloque .contador input { text-align: center; padding: .5rem .2rem !important; font-size: 1.15rem !important; font-weight: 600 !important; -moz-appearance: textfield; }
.contador input::-webkit-inner-spin-button { -webkit-appearance: none; }


.zona-fotos { border: 2px dashed #d9cfb8; border-radius: 14px; padding: 1.8rem 1rem; text-align: center; cursor: pointer; background: #fcfaf5; display: grid !important; gap: .4rem; justify-items: center; transition: background .2s; }
.zona-fotos:hover, .zona-fotos.encima { background: #f5efe0; border-color: var(--dorado); }
.zona-fotos input { display: none; }
.zona-fotos .boton { font-size: 1.05rem; pointer-events: none; }
.zona-fotos small { color: var(--gris); font-weight: 400; }
.fotos-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.fotos-admin:empty { display: none; }
.foto-admin { position: relative; border-radius: 12px; overflow: hidden; background: #eee; aspect-ratio: 4 / 3; }
.foto-admin img { width: 100%; height: 100%; object-fit: cover; }
.foto-admin__portada { position: absolute; top: 6px; left: 6px; background: var(--dorado); color: #fff; font-size: .72rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; }
.foto-admin__acciones { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: .4rem; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.foto-admin__acciones button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); cursor: pointer; font-size: .85rem; }
.foto-admin__acciones button:disabled { opacity: .3; cursor: default; }
.foto-admin--cargando { display: grid; place-items: center; font-size: .85rem; color: var(--gris); animation: pulso 1.2s infinite; }
@keyframes pulso { 50% { opacity: .5; } }

.editor__pie {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: 1rem 0 1.2rem; background: linear-gradient(transparent, var(--crema) 25%);
}
.editor__pie .error { flex-basis: 100%; }
.editor__pie .boton { padding: 1rem 1.8rem; font-size: 1.05rem; font-weight: 600; }

/* Pantalla de "¡Listo!" */
.listo { max-width: 560px; margin: 2rem auto; text-align: center; }
.listo__icono { font-size: 4rem; }
.listo p { color: var(--gris); margin: .8rem 0 1.5rem; font-size: 1.05rem; }
.listo img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 18px; margin-bottom: 1.5rem; }
.listo__botones { display: grid; gap: .8rem; }

/* Diálogos */
.dialogo { border: 0; border-radius: 20px; padding: 1.8rem; max-width: 500px; width: calc(100% - 32px); margin: auto; }
.dialogo::backdrop { background: rgba(30, 40, 30, .55); }
.dialogo h3 { font-size: 1.6rem; margin-bottom: .8rem; }
.dialogo p { color: var(--gris); margin-bottom: .7rem; }
.dialogo .nota { background: #f6f3ea; padding: .8rem; border-radius: 10px; font-size: .9rem; }
.dialogo .clave { margin: .5rem 0; }
.dialogo__botones { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin-top: 1.2rem; }
.dialogo__botones .boton { padding: .8rem 1.2rem; }

/* Avisos */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.3rem; border-radius: 14px; color: #fff; font-size: .98rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); width: max-content; max-width: calc(100% - 32px); }
.toast--ok { background: var(--verde-oscuro); }
.toast--error { background: #b3261e; }
.toast__deshacer { background: #fff; color: var(--verde-oscuro); border: 0; border-radius: 999px; padding: .5rem 1rem; font: inherit; font-weight: 700; cursor: pointer; flex-shrink: 0; }

@media (max-width: 760px) {
  .tarjeta-prop { grid-template-columns: 1fr; }
  .tarjeta-prop img { width: 100%; height: 190px; grid-row: auto; }
  .tarjeta-prop__acciones .boton { flex: 1 1 auto; }
  .tarjeta-prop__acciones .boton--borrar { margin-left: 0; }
  .contadores { grid-template-columns: 1fr 1fr; }
  .admin__titulo .boton--grande { width: 100%; }
}
@media (max-width: 560px) {
  .admin__main { padding-top: 1.2rem; }
  .fila-2, .fila-3 { grid-template-columns: 1fr; }
  .bloque { padding: 1.2rem 1rem; }
  .editor__pie .boton { flex: 1; padding: .9rem .6rem; }
  .admin__usuario .boton--chico { padding: .45rem .8rem; font-size: .82rem; }
  .marca__texto { font-size: 1.4rem; }
  .fotos-admin { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .pestanas { flex-wrap: nowrap; }
  .pestana { flex: 1; padding: .7rem .4rem; font-size: .88rem; }
}

/* Mapa del editor con punto arrastrable */
.mapa-editor { height: 320px; border-radius: 14px; border: 2px solid #e2ddd0; z-index: 0; }
.mapa-estado { font-size: .95rem; padding: .7rem .9rem; border-radius: 10px; background: #f5f2ea; color: var(--gris); }
.mapa-estado--ok { background: #e3f1e6; color: #24653f; }
.mapa-estado--aviso { background: #fbf1d9; color: #7a5c17; }
.alfiler { background: none; border: 0; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }

/* Comodidades: botones que se marcan al tocarlos */
.comodidades-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .6rem; }
.comodidad { cursor: pointer; display: block !important; }
.comodidad input { position: absolute; opacity: 0; pointer-events: none; }
.comodidad span { display: flex; align-items: center; gap: .55rem; padding: .75rem .8rem; border: 2px solid #e2ddd0; border-radius: 12px; font-weight: 500; font-size: .92rem; color: var(--texto); background: #fff; transition: all .15s; }
.comodidad b { font-size: 1.25rem; font-weight: 400; }
.comodidad:hover span { border-color: var(--dorado-claro); }
.comodidad input:checked + span { border-color: var(--verde); background: #eef3ec; color: var(--verde-oscuro); font-weight: 600; box-shadow: inset 0 0 0 1px var(--verde); }
.comodidad input:checked + span::after { content: "✓"; margin-left: auto; color: var(--verde); font-weight: 700; }
.comodidad input:focus-visible + span { outline: 3px solid var(--dorado); outline-offset: 2px; }
@media (max-width: 560px) { .comodidades-admin { grid-template-columns: 1fr 1fr; } .comodidad span { font-size: .85rem; padding: .7rem .6rem; } }

/* Lo que hay cerca (se calcula solo) */
.cerca-admin { background: #f7f5ef; border-radius: 12px; padding: .9rem 1rem; font-size: .95rem; }
.cerca-admin h4 { font-size: 1rem; margin: 0 0 .5rem; color: var(--verde-oscuro); }
.cerca-admin ul { list-style: none; display: grid; gap: .3rem; margin: 0; padding: 0; }
.cerca-admin li { display: flex; gap: .5rem; }
.cerca-admin li b { margin-left: auto; color: var(--verde-oscuro); white-space: nowrap; }
.cerca-admin p { margin: .5rem 0 0; color: var(--gris); font-size: .88rem; }

/* Sugerencias de dirección */
.direccion-buscador { position: relative; display: grid; gap: .4rem; }
.direccion-buscador > label { font-weight: 600; }
.sugerencias { list-style: none; margin: 0; padding: .3rem; position: absolute; left: 0; right: 0; top: 100%; z-index: 500;
  background: #fff; border: 2px solid var(--dorado); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.15); }
.sugerencias li { padding: .75rem .9rem; border-radius: 8px; cursor: pointer; display: flex; gap: .7rem; align-items: center; }
.sugerencias li:hover, .sugerencias li.activa { background: #f3efe4; }
.sugerencias li > span:first-child { font-size: 1.2rem; }
.sugerencias b { display: block; font-size: 1.05rem; color: var(--texto); }
.sugerencias small { color: var(--gris); font-size: .88rem; }
.sugerencias .sugerencias__otra { border-top: 1px solid #eee; border-radius: 0 0 8px 8px; color: var(--verde-oscuro); }
.sugerencias .sugerencias__info { cursor: default; color: var(--gris); font-size: .95rem; }
.sugerencias .sugerencias__info:hover { background: none; }
.sugerencias .sugerencias__google { cursor: default; justify-content: flex-end; font-size: .78rem; color: #888; padding: .3rem .9rem; }
.sugerencias .sugerencias__google:hover { background: none; }
.mapa-falla { height: 100%; display: grid; place-items: center; text-align: center; padding: 1rem; color: var(--gris); background: #f5f2ea; }
