/* Apart Hotel Mamore: letras grandes, botones grandes, pensado para celular. */
:root {
  --fondo: #f4f6f7;
  --superficie: #ffffff;
  --texto: #1b2429;
  --texto-suave: #4d5a61;
  --marca: #1d4f6e;
  --borde: #d5dde1;

  --libre: #1e7a3c;        --libre-fondo: #e3f4e8;
  --ocupada: #1f5fa8;      --ocupada-fondo: #e2ecf8;
  --limpiar: #8a5a00;      --limpiar-fondo: #fdf0d2;
  --arreglo: #b3261e;      --arreglo-fondo: #fbe3e1;

  --radio: 12px;
  font-size: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.4;
}
h1, h2 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }

.cargando { padding: 2rem 1rem; text-align: center; color: var(--texto-suave); }

/* ---------- Botones y formularios ---------- */
.btn {
  display: block; width: 100%; min-height: 52px; padding: .7rem 1rem; margin-top: .6rem;
  font: inherit; font-weight: 600; color: var(--marca);
  background: var(--superficie); border: 2px solid var(--marca); border-radius: var(--radio); cursor: pointer;
}
.btn-principal { background: var(--marca); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-chico { width: auto; min-height: 44px; margin: 0; padding: .4rem .9rem; font-size: .9rem; }
.btn-enlace {
  display: block; width: 100%; min-height: 44px; margin-top: .4rem;
  font: inherit; color: var(--marca); background: none; border: 0; text-decoration: underline; cursor: pointer;
}
.btn-enlace.claro { width: auto; color: #fff; margin: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #f2a900; outline-offset: 2px;
}

label { display: block; margin-top: .8rem; font-weight: 600; }
input, select, textarea {
  display: block; width: 100%; min-height: 48px; margin-top: .3rem; padding: .6rem .7rem;
  font: inherit; color: var(--texto); background: #fff; border: 2px solid var(--borde); border-radius: 10px;
}
.casilla { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.casilla input { width: 26px; min-height: 26px; height: 26px; margin: 0; }

.tarjeta {
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 1rem; margin-bottom: 1rem;
}
.ayuda { color: var(--texto-suave); font-size: .9rem; }

/* ---------- Ingreso ---------- */
.ingreso { max-width: 420px; margin: 0 auto; padding: 2.5rem 1rem; }
.ingreso h1 { color: var(--marca); text-align: center; }
.ingreso .sub { text-align: center; color: var(--texto-suave); margin-bottom: 1.2rem; }

/* ---------- Estructura ---------- */
.barra {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1rem; padding-top: max(.7rem, env(safe-area-inset-top));
  background: var(--marca); color: #fff;
}
.barra .quien { display: block; font-size: .8rem; opacity: .9; }
.vista { max-width: 1100px; margin: 0 auto; padding: 1rem 1rem 6.5rem; }

.menu {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
  display: flex; overflow-x: auto;
  background: var(--superficie); border-top: 1px solid var(--borde);
  padding-bottom: env(safe-area-inset-bottom);
}
.menu button {
  flex: 1 0 auto; min-width: 76px; min-height: 60px; padding: .4rem .5rem;
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--texto-suave);
  background: none; border: 0; border-top: 4px solid transparent; cursor: pointer;
}
.menu button.activo { color: var(--marca); border-top-color: var(--marca); }

.pronto { text-align: center; padding: 2rem 1rem; }

/* ---------- Tablero ---------- */
.resumen { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip { padding: .35rem .7rem; border-radius: 999px; font-size: .9rem; border: 2px solid currentColor; }

.estado-libre   { color: var(--libre);   background: var(--libre-fondo); }
.estado-ocupada { color: var(--ocupada); background: var(--ocupada-fondo); }
.estado-limpiar { color: var(--limpiar); background: var(--limpiar-fondo); }
.estado-arreglo { color: var(--arreglo); background: var(--arreglo-fondo); }

.piso h2 { margin-top: .5rem; }
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }

.hab {
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
  min-height: 130px; padding: .8rem; text-align: left;
  font: inherit; border: 3px solid currentColor; border-radius: var(--radio); cursor: pointer;
}
.hab > span { color: var(--texto); }
.hab .hab-num { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.hab .hab-estado { font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .03em; color: inherit; }
.hab .hab-info { font-size: .85rem; color: var(--texto-suave); }
.hab .hab-huesped { font-weight: 600; margin-top: .2rem; }
.hab .hab-debe { font-weight: 700; color: var(--arreglo); }

/* ---------- Hoja (diálogo desde abajo) ---------- */
dialog.hoja {
  width: 100%; max-width: 560px; max-height: 90vh; margin: auto auto 0; padding: 1.2rem 1rem 1.5rem;
  border: 0; border-radius: 18px 18px 0 0; background: var(--superficie); color: var(--texto);
  overflow-y: auto;
}
dialog.hoja::backdrop { background: rgb(0 0 0 / .45); }
@media (min-width: 700px) { dialog.hoja { margin: auto; border-radius: 18px; } }

.estado-texto { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-weight: 700; border: 2px solid currentColor; }
.datos { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: 1rem 0; }
.datos dt { color: var(--texto-suave); }
.datos dd { margin: 0; font-weight: 600; }

/* ---------- Listas de ajustes ---------- */
.pestanas { display: flex; gap: .5rem; margin-bottom: 1rem; }
.pestanas button {
  flex: 1; min-height: 48px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--superficie); color: var(--marca); border: 2px solid var(--marca); border-radius: var(--radio);
}
.pestanas button[aria-selected="true"] { background: var(--marca); color: #fff; }
.lista { list-style: none; margin: 0; padding: 0; }
.fila {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem; margin-bottom: .5rem; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
}
.fila .detalle { display: block; font-size: .85rem; color: var(--texto-suave); }

/* ---------- Avisos ---------- */
#avisos { position: fixed; left: 0; right: 0; bottom: 5rem; z-index: 50; display: grid; gap: .5rem; padding: 0 1rem; pointer-events: none; }
.aviso { max-width: 520px; margin: 0 auto; padding: .8rem 1rem; border-radius: var(--radio); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgb(0 0 0 / .2); }
.aviso-ok { background: var(--libre); }
.aviso-error { background: var(--arreglo); }
