/* Panel de administración: pensado primero para celular. */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #eef1f5;
  color: #17202c;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[hidden] { display: none !important; }

h1 { margin: 0; font-size: 26px; }
h2 { margin: 0 0 12px; font-size: 18px; }
p { margin: 0 0 12px; }
.suave { color: #5b6878; }
.chico { font-size: 14px; }
.error { color: #b3261e; font-weight: 600; }

.centrado {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.centrado .tarjeta { width: 100%; max-width: 360px; }

.barra {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #0b1626;
  color: #fff;
}
.barra strong { font-size: 18px; }
.quien { flex: 1; color: #ffd34d; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra .enlace { color: #fff; }

.contenido { max-width: 640px; margin: 0 auto; padding: 12px 12px 80px; }

.tarjeta {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15, 30, 50, .12);
}

.ahora { border-left: 6px solid #9aa6b5; }
.ahora.activo { border-left-color: #1f8a4c; }
.ahora.ocupado { border-left-color: #c77700; }
.ahora .estado { font-size: 18px; font-weight: 700; margin-bottom: 4px; }

label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 14px; }

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

input[type="text"], input[type="password"], input[type="number"], input[type="date"],
input[type="time"], input[type="datetime-local"], input[type="file"], select, textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #b6c0cc;
  border-radius: 8px;
  background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #7fb2ff; outline-offset: 1px; }

button {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid #b6c0cc;
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: default; }
button.primario { background: #0b5fd6; border-color: #0b5fd6; color: #fff; }
button.peligro { color: #b3261e; border-color: #e3b1ad; }
button.enlace { min-height: 0; padding: 6px 8px; border: 0; background: none; text-decoration: underline; font-weight: 500; }
button.icono { min-width: 46px; padding: 10px; }

form .primario { width: 100%; margin-top: 16px; }

.fila { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.fila > .campo { flex: 1 1 130px; min-width: 0; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.acciones .empuja { margin-left: auto; }

.opciones { display: flex; gap: 8px; margin-top: 4px; }
.opciones label {
  flex: 1;
  margin: 0;
  padding: 10px;
  border: 1px solid #b6c0cc;
  border-radius: 8px;
  text-align: center;
  font-size: 15px;
  cursor: pointer;
}
.opciones input { position: absolute; opacity: 0; }
.opciones label.elegida { background: #e3eeff; border-color: #0b5fd6; color: #0b3f91; }

.pestanas { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.pestanas button { flex: 1 0 auto; border-radius: 999px; padding: 10px 12px; font-size: 15px; }
.pestanas button.elegida { background: #0b1626; border-color: #0b1626; color: #fff; }

details.tarjeta > summary { font-weight: 700; font-size: 17px; cursor: pointer; min-height: 30px; }
details.tarjeta[open] > summary { margin-bottom: 4px; }

.anuncio { display: flex; gap: 12px; align-items: flex-start; }
.anuncio .mini {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border-radius: 8px;
  border: 1px solid #d5dbe3;
  background: #0b1626;
  color: #ffd34d;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.anuncio .mini img { width: 100%; height: 100%; object-fit: cover; object-position: top; background: #fff; }
.anuncio .datos { flex: 1; min-width: 0; }
.anuncio .titulo { font-weight: 700; overflow-wrap: anywhere; }
.anuncio .extracto { color: #5b6878; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.etiqueta { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #fde7c2; color: #7a4a00; font-size: 13px; font-weight: 600; }

.franja { border-top: 1px solid #e3e7ec; padding: 10px 0; }
.franja:first-of-type { border-top: 0; }

.vacio { text-align: center; color: #5b6878; padding: 24px 8px; }

.aviso {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 16px;
  z-index: 10;
  max-width: 616px;
  margin: 0 auto;
  padding: 12px 16px;
  border-radius: 10px;
  background: #17202c;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.aviso.mal { background: #b3261e; }
