/* =====================================================================
   Pujalot.com — hoja de estilo única. Pensada primero para el móvil:
   casi todo el mundo sube las piezas y puja desde el teléfono.
   ===================================================================== */

:root {
  --tinta: #1c1815;
  --tinta-suave: #5d5750;
  --tenue: #8b847c;
  --fondo: #f7f4ef;
  --papel: #fff;
  --borde: #e3ddd3;
  --oro: #b28c2f;
  --oro-claro: #f3e9d2;
  --oro-oscuro: #8a6d2f;
  --negro: #14110e;
  --verde: #2f7a4f;
  --rojo: #b3261e;
  --ambar: #9a6a10;
  --sombra: 0 1px 2px rgba(28,24,21,.06), 0 8px 24px rgba(28,24,21,.06);
  --radio: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--tinta);
  background: var(--fondo);
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; margin-top: 1.4rem; }
h3 { font-size: 1.05rem; margin-top: 1rem; }
p { margin: 0 0 .8rem; }
a { color: var(--oro-oscuro); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--tinta); }
img { max-width: 100%; height: auto; display: block; }

.pequena { font-size: .85rem; }
.tenue { color: var(--tenue); }
.der { text-align: right; }
.ok-texto { color: var(--verde); }
.entradilla { font-size: 1.05rem; color: var(--tinta-suave); }

.saltar { position: absolute; left: -9999px; }
.saltar:focus { left: 8px; top: 8px; background: var(--papel); padding: .6rem 1rem; z-index: 50; border-radius: 8px; }

.contenedor { max-width: 1140px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.contenedor.estrecho { max-width: 780px; }

/* ---- cabecera ----------------------------------------------------- */
.cabecera { background: var(--negro); color: #f3ece2; position: sticky; top: 0; z-index: 30; }
.cabecera .interior {
  max-width: 1140px; margin: 0 auto; padding: .7rem 1rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.marca { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; margin-right: auto; }
.marca-logo {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--oro), var(--oro-oscuro));
  color: #fff; font-family: Georgia, serif; font-size: 1.3rem; font-weight: 700;
}
.marca-texto { display: flex; flex-direction: column; line-height: 1.1; }
.marca-texto strong { font-family: Georgia, serif; font-size: 1.15rem; letter-spacing: .01em; }
.marca-texto small { color: #a89a86; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }

.hamburguesa { display: none; background: none; border: 0; color: inherit; font-size: 1.5rem; cursor: pointer; padding: .2rem .4rem; }

.nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.nav a { color: #e7ded1; text-decoration: none; font-size: .95rem; }
.nav a:hover { color: #fff; text-decoration: underline; }
.nav a.btn { color: #fff; }
.nav .nav-cuenta { color: var(--oro); }

@media (max-width: 820px) {
  .hamburguesa { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-top: .5rem; }
  .nav.abierto { display: flex; }
  .nav a { padding: .7rem .2rem; border-top: 1px solid #2a241e; }
  .nav a.btn { margin-top: .6rem; text-align: center; border-top: 0; }
}

/* ---- franja de aviso ---------------------------------------------- */
.franja-aviso { background: var(--oro-claro); border-bottom: 1px solid #e6d8b8; }
.franja-aviso .interior { max-width: 1140px; margin: 0 auto; padding: .7rem 1rem; font-size: .92rem; }
.franja-aviso.error { background: #fbe9e7; border-color: #f2c9c4; color: #7c1d16; }
.franja-aviso.info { background: #eef3f8; border-color: #d4e0ec; }

/* ---- portada ------------------------------------------------------- */
.heroe {
  background: linear-gradient(160deg, var(--negro) 0%, #2b241b 100%);
  color: #f6f0e6;
}
.heroe .interior { max-width: 1140px; margin: 0 auto; padding: 2.6rem 1rem 2.8rem; }
.heroe h1 { font-size: 2.1rem; max-width: 18ch; }
.heroe p { color: #cfc4b3; max-width: 52ch; }
.heroe-botones { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.2rem; }

/* ---- botones -------------------------------------------------------- */
.btn {
  display: inline-block; padding: .62rem 1.1rem; border-radius: 999px;
  background: var(--oro-oscuro); color: #fff; border: 1px solid var(--oro-oscuro);
  font: inherit; font-size: .95rem; text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: #755c26; color: #fff; }
.btn.primario { background: var(--negro); border-color: var(--negro); }
.btn.primario:hover { background: #2d2720; }
.btn.fantasma { background: transparent; color: var(--tinta); border-color: var(--borde); }
.btn.fantasma:hover { background: var(--papel); color: var(--tinta); }
.heroe .btn.fantasma { color: #f6f0e6; border-color: #6a5c48; }
.btn.peligro { background: transparent; color: var(--rojo); border-color: #e8c4c1; }
.btn.peligro:hover { background: #fbe9e7; color: var(--rojo); }
.btn.pequeno { padding: .35rem .8rem; font-size: .85rem; }
.btn.grande { padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn.ancho { display: block; width: 100%; }
button.btn { font-family: inherit; }

/* ---- tarjetas ------------------------------------------------------- */
.tarjeta {
  background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 1.2rem; margin-bottom: 1.2rem; box-shadow: var(--sombra);
}
.tarjeta > h1:first-child, .tarjeta > h2:first-child { margin-top: 0; }
.vacio { text-align: center; padding: 2.5rem 1.2rem; }
.nota-aviso { background: var(--oro-claro); border: 1px solid #e6d8b8; border-radius: var(--radio); padding: .9rem 1rem; margin-bottom: 1.2rem; font-size: .92rem; }

.titulo-fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.titulo-fila h1 { margin: 0; }

/* ---- filtros -------------------------------------------------------- */
.filtros { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.filtros .buscador { flex: 1 1 240px; }
.filtros select, .filtros input {
  padding: .55rem .7rem; border: 1px solid var(--borde); border-radius: 10px;
  font: inherit; background: var(--papel); color: var(--tinta);
}
.resultados { margin: 0 0 1rem; }

/* ---- rejilla de piezas ---------------------------------------------- */
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
@media (max-width: 520px) { .rejilla { grid-template-columns: repeat(2, 1fr); gap: .7rem; } }

.pieza {
  background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--sombra);
}
.pieza.destacada { border-color: var(--oro); box-shadow: 0 0 0 1px var(--oro), var(--sombra); }
.pieza-foto { display: block; position: relative; aspect-ratio: 1 / 1; background: #ece6dc; }
.pieza-foto img { width: 100%; height: 100%; object-fit: cover; }
.sin-foto { display: grid; place-items: center; width: 100%; height: 100%; color: var(--tenue); font-size: .85rem; }
.sello {
  position: absolute; top: .5rem; left: .5rem; background: var(--oro); color: #fff;
  font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 6px;
}
.pieza-cuerpo { padding: .7rem .8rem .8rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.pieza-cuerpo h2, .pieza-cuerpo h3 { font-size: .98rem; margin: 0; font-family: inherit; font-weight: 600; line-height: 1.3; }
.pieza-cuerpo h2 a, .pieza-cuerpo h3 a { color: var(--tinta); text-decoration: none; }
.pieza-cuerpo h2 a:hover { text-decoration: underline; }
.etiqueta { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--tenue); }
.precio { margin: .2rem 0 0; font-size: 1.15rem; font-weight: 700; font-family: Georgia, serif; }
.precio small { display: block; font-size: .75rem; font-weight: 400; color: var(--tenue); font-family: inherit; }
.pie-pieza { display: flex; justify-content: space-between; gap: .5rem; margin: auto 0 0; padding-top: .5rem; font-size: .8rem; }
.reloj { color: var(--tinta-suave); font-variant-numeric: tabular-nums; }
.reloj.urge { color: var(--rojo); font-weight: 600; }
.reloj.grande { font-size: 1.05rem; font-weight: 600; }

.paginas { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; margin-top: 1.6rem; }
.paginas a { padding: .4rem .75rem; border: 1px solid var(--borde); border-radius: 8px; background: var(--papel); text-decoration: none; }
.paginas a.actual { background: var(--negro); color: #fff; border-color: var(--negro); }

.tiras { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.tira { background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.1rem; }
.tira h3 { margin-top: 0; }

/* ---- ficha de la pieza ---------------------------------------------- */
.migas { margin-bottom: .8rem; }
.migas a { color: var(--tenue); }
.ficha { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .85fr); gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .ficha { grid-template-columns: 1fr; } }

.foto-grande {
  margin: 0 0 .7rem; background: #ece6dc; border-radius: var(--radio); overflow: hidden;
  border: 1px solid var(--borde); aspect-ratio: 4 / 3;
}
.foto-grande img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.tiras-fotos { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.miniatura { width: 76px; height: 76px; padding: 0; border: 2px solid var(--borde); border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.miniatura.activa { border-color: var(--oro); }
.miniatura img { width: 100%; height: 100%; object-fit: cover; }

.datos { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 1rem 0; font-size: .92rem; }
.datos dt { color: var(--tenue); }
.datos dd { margin: 0; }
.datos.compactos { font-size: .85rem; gap: .15rem .8rem; margin: .6rem 0; }

.aviso-legalidad { border-top: 1px solid var(--borde); padding-top: .8rem; margin-top: 1rem; }
.lista-docs { list-style: none; padding: 0; margin: .5rem 0; }
.lista-docs li { padding: .4rem 0; border-bottom: 1px solid var(--borde); display: flex; justify-content: space-between; gap: .5rem; }
.lista-limpia { list-style: none; padding: 0; margin: .4rem 0; }
.lista-limpia li { padding: .12rem 0; }

.puja-caja h1 { font-size: 1.35rem; margin: .2rem 0 .6rem; }
.estado-subasta { font-size: .9rem; color: var(--tinta-suave); }
.precio-actual { margin: .8rem 0; padding: .8rem; background: var(--oro-claro); border-radius: 10px; }
.precio-actual .cifra { font-family: Georgia, serif; font-size: 1.8rem; font-weight: 700; display: block; line-height: 1.1; }
.precio-actual small { color: var(--oro-oscuro); }
.form-puja { margin-top: .8rem; }
.form-directa { margin-top: .5rem; }
.resultado { font-size: 1.05rem; padding: .8rem; background: #f0ece5; border-radius: 10px; }
.resultado.vendida { background: #e8f3ec; color: #205238; }
.verificado { color: var(--verde); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.vendedor-nombre { font-weight: 600; margin-bottom: .3rem; }
.referencias { background: #faf7f1; border-left: 3px solid var(--oro-claro); padding: .5rem .7rem; }
.trato { border-color: var(--oro); }
.historial .tabla td { padding: .25rem .3rem; }

details.tarjeta summary { cursor: pointer; font-weight: 600; }
details.tarjeta[open] summary { margin-bottom: .8rem; }

/* ---- formularios ----------------------------------------------------- */
.f { display: block; margin-bottom: .9rem; font-size: .9rem; color: var(--tinta-suave); }
.f input, .f select, .f textarea {
  display: block; width: 100%; margin-top: .25rem; padding: .62rem .7rem;
  border: 1px solid var(--borde); border-radius: 10px; font: inherit; font-size: 1rem;
  background: var(--papel); color: var(--tinta);
}
.f input:focus, .f select:focus, .f textarea:focus { outline: 2px solid var(--oro); outline-offset: 1px; border-color: var(--oro); }
.f input[readonly] { background: #f2efe9; color: var(--tenue); }
.f small { display: block; margin-top: .25rem; font-size: .78rem; }
.f input[type="file"] { padding: .45rem; font-size: .85rem; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
@media (max-width: 620px) { .dos, .tres { grid-template-columns: 1fr; } }
.form-largo h2 { border-top: 1px solid var(--borde); padding-top: 1.1rem; margin-top: 1.6rem; }
.form-largo h2:first-of-type { border-top: 0; padding-top: 0; margin-top: .5rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0; font-size: .9rem; }
.check input { margin-top: .25rem; flex: 0 0 auto; width: 18px; height: 18px; }
.en-linea { display: inline; }
.en-linea.destacar { display: inline-flex; gap: .3rem; align-items: center; }
.en-linea.destacar input { width: 68px; padding: .3rem .4rem; border: 1px solid var(--borde); border-radius: 8px; font: inherit; font-size: .85rem; }

.rejilla-fotos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.ranura { border: 1px solid var(--borde); border-radius: 10px; padding: .7rem; background: #fbf9f6; }
.ranura strong { display: block; font-size: .85rem; margin-bottom: .4rem; }
.ranura img, .ranura .hueco { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; background: #ece6dc; }
.ranura .hueco { display: grid; place-items: center; color: var(--tenue); font-size: .8rem; }
.ranura input[type="file"] { width: 100%; margin: .5rem 0 .3rem; font-size: .78rem; }
.ranura small { font-size: .75rem; }

.fila-borrar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--borde); font-size: .9rem; }

/* ---- pestañas y gestión ---------------------------------------------- */
.pestanas { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1.2rem; border-bottom: 1px solid var(--borde); }
.pestanas a { padding: .5rem .9rem; text-decoration: none; color: var(--tinta-suave); border-bottom: 2px solid transparent; }
.pestanas a.actual { color: var(--tinta); border-bottom-color: var(--oro); font-weight: 600; }

.gestion {
  display: grid; grid-template-columns: 150px 1fr; gap: 1.1rem;
  background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 1rem; margin-bottom: 1rem; box-shadow: var(--sombra);
}
@media (max-width: 620px) { .gestion { grid-template-columns: 90px 1fr; gap: .7rem; padding: .8rem; } }
.gestion-foto img, .gestion-foto .sin-foto { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; background: #ece6dc; }
.gestion-cabeza { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.gestion-cabeza h2 { font-size: 1.1rem; margin: 0; }
.gestion-cabeza h2 a { color: var(--tinta); text-decoration: none; }
.gestion-botones { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.notas { background: #faf7f1; padding: .5rem .7rem; border-radius: 8px; }

.chip { font-size: .76rem; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.chip.activa { background: #e8f3ec; color: #205238; border-color: #c6e2d1; }
.chip.vendida { background: var(--oro-claro); color: var(--oro-oscuro); border-color: #e6d8b8; }
.chip.aviso { background: #fdf3e0; color: var(--ambar); border-color: #f0dcb5; }
.chip.retirada { background: #fbe9e7; color: #7c1d16; border-color: #f2c9c4; }
.chip.neutra { background: #f0ece5; color: var(--tinta-suave); border-color: var(--borde); }

.relanzar { display: inline-block; }
.relanzar summary { list-style: none; display: inline-block; }
.relanzar summary::-webkit-details-marker { display: none; }
.form-relanzar { margin-top: .8rem; padding: .9rem; background: #faf7f1; border-radius: 10px; border: 1px solid var(--borde); }

.resumen-cuenta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.resumen-cuenta strong { display: block; font-size: 1.05rem; }

/* ---- tablas ---------------------------------------------------------- */
.tabla-envoltura { overflow-x: auto; background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio); }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { padding: .55rem .6rem; text-align: left; border-bottom: 1px solid var(--borde); vertical-align: top; }
.tabla th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tenue); font-weight: 600; }
.tabla tr:last-child td { border-bottom: 0; }

.rejilla-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.cifra-caja { background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem; text-align: center; }
.cifra-caja strong { display: block; font-family: Georgia, serif; font-size: 1.6rem; }
.cifra-caja span { font-size: .8rem; color: var(--tenue); }

.denuncia { border-left: 3px solid var(--ambar); }

/* ---- textos legales --------------------------------------------------- */
.texto-legal { line-height: 1.65; }
.texto-legal h2 { margin-top: 1.8rem; }
.texto-legal li { margin-bottom: .35rem; }
.texto-legal code { background: #f0ece5; padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }
.pasos { padding-left: 1.2rem; }
.pasos li { margin-bottom: .6rem; }
.perfil h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* ---- pie -------------------------------------------------------------- */
.pie { background: var(--negro); color: #cfc4b3; margin-top: 3rem; }
.pie .interior {
  max-width: 1140px; margin: 0 auto; padding: 2rem 1rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.6rem;
}
.pie-col { display: flex; flex-direction: column; gap: .3rem; }
.pie-col strong { color: #f6f0e6; font-family: Georgia, serif; margin-bottom: .2rem; }
.pie-col a { color: #cfc4b3; text-decoration: none; font-size: .9rem; }
.pie-col a:hover { color: #fff; text-decoration: underline; }
.pie-col p { color: #a89a86; }
.pie-fin { border-top: 1px solid #2a241e; padding: 1rem; display: block; text-align: center; }
.pie-fin .tenue { color: #8b8072; }

/* =====================================================================
   Reforma 01
   ===================================================================== */
.error-texto { color: var(--rojo); }

/* ---- administración siempre a mano ----------------------------------- */
.nav .nav-admin {
  background: var(--oro); color: #fff; padding: .3rem .8rem; border-radius: 999px; font-weight: 600;
}
.nav .nav-admin:hover { background: var(--oro-oscuro); color: #fff; text-decoration: none; }
@media (max-width: 820px) { .nav .nav-admin { margin: .5rem 0; text-align: center; border-top: 0; } }
.boton-admin {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; text-decoration: none;
  color: var(--tinta); border-color: var(--oro); background: var(--oro-claro);
}
.boton-admin:hover { color: var(--tinta); background: #efe1c0; }

/* ---- ficha de la pieza a pantalla completa ---------------------------- */
.contenedor.completo { max-width: none; padding-left: clamp(1rem, 3vw, 2.5rem); padding-right: clamp(1rem, 3vw, 2.5rem); }
.contenedor.completo .ficha { grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr); }
@media (max-width: 900px) { .contenedor.completo .ficha { grid-template-columns: 1fr; } }
.contenedor.completo .foto-grande { aspect-ratio: auto; height: min(78vh, 900px); position: relative; }
@media (max-width: 900px) { .contenedor.completo .foto-grande { height: min(70vh, 560px); } }
.foto-grande { position: relative; }
.foto-grande img[data-visor] { cursor: zoom-in; }
.boton-pantalla {
  position: absolute; right: .7rem; bottom: .7rem; border: 0; border-radius: 999px;
  background: rgba(20,17,14,.78); color: #fff; font: inherit; font-size: .85rem; padding: .45rem .9rem; cursor: pointer;
}
.boton-pantalla:hover { background: var(--negro); }
.contenedor.completo .miniatura { width: 92px; height: 92px; }
.ficha-tecnica { margin-top: .4rem; }

.visor {
  position: fixed; inset: 0; z-index: 100; background: #0c0a08;
  display: flex; align-items: center; justify-content: center; touch-action: pan-y;
}
.visor[hidden] { display: none; }
.visor img { max-width: 100vw; max-height: 100vh; width: auto; height: auto; object-fit: contain; background: #fff; }
.visor button {
  position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.6rem;
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
}
.visor button:hover { background: rgba(255,255,255,.28); }
.visor .visor-cerrar { top: 14px; right: 14px; }
.visor .visor-ant { left: 14px; top: 50%; transform: translateY(-50%); }
.visor .visor-sig { right: 14px; top: 50%; transform: translateY(-50%); }
.visor .visor-cuenta { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #cfc4b3; font-size: .9rem; }

/* ---- fotos: hacer foto / subir archivo, con vista previa ------------- */
.ranura .archivo-oculto, .archivo-oculto { position: absolute; margin: 0; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.ranura-botones { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 .3rem; }
.ranura-botones .btn { position: relative; flex: 1 1 auto; padding: .45rem .6rem; }
.ranura-vista img { cursor: zoom-in; }
.ranura-estado { margin: .2rem 0; min-height: 1.2em; }
.ranura-estado.ok { color: var(--verde); }
.ranura-estado.aviso { color: var(--ambar); }
.ranura-estado.mal { color: var(--rojo); font-weight: 600; }
.ranura.nueva { border-color: var(--oro); background: #fffaf0; }
.rejilla-fotos.dni { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rejilla-fotos.dni .ranura img, .rejilla-fotos.dni .ranura .hueco { aspect-ratio: 3 / 2; object-fit: contain; background: #ece6dc; }
button[disabled].btn { opacity: .65; cursor: progress; }

/* ---- casa de subastas (agenda privada) ------------------------------- */
.casa-bloque { background: #faf7f1; border: 1px solid var(--borde); border-radius: 10px; padding: .9rem .9rem .1rem; margin-bottom: .9rem; }
.casa-bloque .encontrada { color: var(--verde); }
h2 .chip { font-family: system-ui, sans-serif; font-size: .7rem; vertical-align: middle; font-weight: 400; }

.agenda td { vertical-align: middle; }
.agenda-foto { width: 64px; }
.agenda-foto img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #ece6dc; }

/* ---- pagos ------------------------------------------------------------ */
.caja-pago { border: 1px solid var(--borde); border-radius: 10px; padding: .8rem .9rem; margin-bottom: .7rem; background: #fbf9f6; }
.caja-pago p { margin-bottom: .5rem; }
.botones-pago { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.bizum { background: #eef3f8; border-radius: 8px; padding: .45rem .6rem; }
.selector-pequeno { padding: .3rem .4rem; border: 1px solid var(--borde); border-radius: 8px; font: inherit; font-size: .82rem; }

@media print {
  .cabecera, .pie, .titulo-fila .btn, .titulo-fila button, .franja-aviso { display: none !important; }
  body { background: #fff; }
  .tabla-envoltura { border: 0; }
}

/* En el móvil el menú va plegado: el acceso a administración queda fuera, a la vista. */
.admin-rapido { display: none; background: var(--oro); color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; }
.admin-rapido:hover { color: #fff; background: var(--oro-oscuro); }
@media (max-width: 820px) { .admin-rapido { display: inline-block; } }

/* ---- alta: ver la contraseña y comprobación de datos ---------------- */
.con-ojo { position: relative; display: block; }
.con-ojo input { padding-right: 2.8rem; }
.f[hidden] { display: none; }
.con-ojo .ojo { position: absolute; right: .35rem; top: calc(50% + .125rem); transform: translateY(-50%); border: 0; background: none;
  font-size: 1.1rem; line-height: 1; padding: .35rem; cursor: pointer; opacity: .55; }
.con-ojo .ojo.activo { opacity: 1; }
.comprueba-estado { min-height: 1em; }
.comprueba-estado.ok { color: var(--verde); }
.comprueba-estado.mal { color: var(--rojo); font-weight: 600; }

/* ---- reforma 05 ------------------------------------------------------ */
[hidden] { display: none !important; }
/* Errores: el campo que impide guardar va rodeado en rojo, con el motivo debajo. */
.obligatorio { color: var(--rojo); font-weight: 700; }
.campo-error input, .campo-error select, .campo-error textarea {
  border-color: var(--rojo) !important; box-shadow: 0 0 0 3px rgba(179, 38, 30, .22); background: #fff8f7;
}
.f.campo-error, .check.campo-error { color: var(--rojo); }
.ranura.campo-error, .check.campo-error { border: 2px solid var(--rojo); border-radius: 12px; box-shadow: 0 0 0 3px rgba(179, 38, 30, .18); }
.check.campo-error { padding: .5rem; }
.msg-error { display: block; margin-top: .3rem; color: var(--rojo); font-weight: 600; font-size: .8rem; }
.msg-error::before { content: "⬤ "; font-size: .6rem; vertical-align: middle; }
.resumen-errores { border: 2px solid var(--rojo); background: #fdf1f0; color: var(--rojo); border-radius: var(--radio); padding: .8rem 1rem; margin-bottom: 1rem; }
.resumen-errores ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.resumen-errores a { color: var(--rojo); }

/* DNI opcional: bien visible que no hace falta para publicar. */
.dni-opcional { background: #eef6f0; border: 1px solid #cfe3d6; border-radius: var(--radio); padding: .9rem 1rem; margin-bottom: .8rem; }
.dni-opcional p { margin: .2rem 0; font-size: 1rem; }
.dni-opcional-titulo { font-size: 1.15rem !important; font-weight: 600; color: var(--verde); }
.dni-desplegable { margin-bottom: 1.2rem; }
.dni-desplegable > summary { cursor: pointer; font-weight: 600; color: var(--oro-oscuro); margin-bottom: .6rem; }

/* Dirección: calle ancha, número estrecho. */
.calle-numero { display: grid; grid-template-columns: 3fr 1fr; gap: 0 1rem; }
.calle-numero-cp { display: grid; grid-template-columns: 3fr 1fr 1fr; gap: 0 1rem; }
@media (max-width: 620px) { .calle-numero { grid-template-columns: 2fr 1fr; } .calle-numero-cp { grid-template-columns: 1fr 1fr; } .calle-numero-cp > :first-child { grid-column: 1 / -1; } }

/* Listado de casas de subastas. */
.casa-nombre-fila { display: flex; gap: .5rem; align-items: stretch; }
.casa-nombre-fila input { flex: 1 1 auto; min-width: 0; }
.casa-nombre-fila .btn { white-space: nowrap; }
.casa-listado { border: 1px solid var(--borde); border-radius: var(--radio); background: #fbf9f6; padding: .8rem; margin-bottom: 1rem; }
.casa-listado input[type="search"] { width: 100%; padding: .55rem .7rem; border: 1px solid var(--borde); border-radius: 10px; font: inherit; margin-bottom: .6rem; }
.casa-listado-cuerpo { max-height: 380px; overflow: auto; }
.casa-pais { margin-bottom: .4rem; }
.casa-pais > summary { cursor: pointer; font-weight: 700; padding: .3rem 0; }
.casa-prov { margin: .2rem 0 .5rem .8rem; font-size: .88rem; }
.casa-prov ul { list-style: none; margin: .2rem 0 0; padding: 0; }
.casa-opcion { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: .35rem .5rem; font: inherit; color: var(--tinta); cursor: pointer; }
.casa-opcion:hover, .casa-opcion:focus { background: var(--oro-claro); }
.casa-opcion small { color: var(--tenue); }

/* Estrellas de valoración. */
.estrellas { color: var(--oro); letter-spacing: .05em; white-space: nowrap; }
.estrellas .vacias { color: #d9d2c5; }
.elige-estrellas { border: 0; padding: 0; margin: 0 0 .6rem; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.elige-estrellas legend { width: 100%; margin-bottom: .2rem; }
.elige-estrellas input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.elige-estrellas label { font-size: 1.9rem; line-height: 1; color: #d9d2c5; cursor: pointer; padding: 0 .08rem; }
.elige-estrellas input:checked ~ label, .elige-estrellas label:hover, .elige-estrellas label:hover ~ label { color: var(--oro); }
.elige-estrellas input:focus-visible + label { outline: 2px solid var(--oro); border-radius: 4px; }
.lista-resenas { list-style: none; margin: 0; padding: 0; }
.lista-resenas li { padding: .6rem 0; border-bottom: 1px solid var(--borde); }
.lista-resenas li:last-child { border-bottom: 0; }
.lista-resenas p { margin: .3rem 0 0; }

/* Caja del trato. */
.trato .en-linea { margin: .2rem .3rem .2rem 0; }
.envio-caja { margin: .5rem 0; }

/* Poner en subasta en un paso: estado de la pieza y botones de guardar. */
.estado-pieza { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem;
  border-radius: var(--radio); padding: .8rem 1rem; margin-bottom: 1rem; background: var(--papel); border: 1px solid var(--borde); }
.estado-pieza.borrador { background: var(--oro-claro); border-color: #e6d8b8; }
.estado-pieza.en-subasta { background: #eef6f0; border-color: #cfe3d6; color: var(--verde); }
.estado-pieza.revision { background: #fff6e5; border-color: #f0dcb0; }
.botones-guardar { display: grid; gap: .6rem; margin-top: 1rem; }
