#acceso-gate {
  position: fixed;
  inset: 0;
  background: #10231a;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI", system-ui, sans-serif;
}
.acceso-caja { text-align: center; padding: 2rem; max-width: 340px; }
.acceso-emoji { font-size: 2.5rem; }
.acceso-caja h1 { font-size: 1.4rem; color: #a9e0b8; margin: 0.5rem 0; font-weight: 600; }
.acceso-caja p { color: #8fae9c; margin: 0.3rem 0 1.2rem; font-size: 0.95rem; }
#acceso-form { display: flex; gap: 0.5rem; }
#acceso-input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #274839;
  background: #16281f;
  color: #ecf5ef;
  font-size: 1rem;
}
#acceso-form button {
  background: #4caf7d;
  color: #0b1912;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
.acceso-error { color: #e0855a; font-size: 0.85rem; min-height: 1.2em; margin-top: 0.6rem; }

:root {
  --color-bg: #0f1f17;
  --color-surface: #16281f;
  --color-surface-raised: #1e3327;
  --color-text: #ecf5ef;
  --color-muted: #8fae9c;
  --color-accent: #4caf7d;
  --color-accent-soft: #a9e0b8;
  --color-border: #274839;
  --color-warn: #e0855a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a { color: var(--color-accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: linear-gradient(160deg, #14281d, #0f1f17 70%);
  border-bottom: 1px solid var(--color-border);
  padding: 2.4rem 1.5rem 2.6rem;
  text-align: center;
}

.site-header h1 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  letter-spacing: 0.01em;
  color: var(--color-accent-soft);
  font-weight: 700;
}

.site-header p {
  margin: 0 0 1.2rem;
  color: var(--color-muted);
  font-size: 1rem;
}

main {
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

section.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem;
  margin: 1.4rem 0;
}

section.panel h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--color-accent-soft);
  font-weight: 600;
}

section.panel h3 {
  font-size: 0.95rem;
  color: var(--color-text);
  margin: 1.1rem 0 0.6rem;
}
section.panel h3:first-child { margin-top: 0; }

.hint {
  color: var(--color-muted);
  font-size: 0.82rem;
  margin: 0.2rem 0 0.8rem;
}

.nav-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-btn {
  background: var(--color-surface-raised);
  color: var(--color-muted) !important;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  text-decoration: none !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-btn:hover { color: var(--color-text) !important; }
.nav-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #0b1912 !important;
  font-weight: 700;
}

/* --- Paso 1: tabla de asistencia (desayuno/almuerzo/cena) --- */
.tabla-asistencia {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
}
.tabla-asistencia th {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  padding: 0 0.3rem 0.5rem;
}
.tabla-asistencia th:first-child { text-align: left; }
.tabla-asistencia td {
  padding: 0.4rem 0.3rem;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}
.tabla-asistencia tr:last-child td { border-bottom: none; }
.tabla-asistencia-nombre {
  text-align: left !important;
  font-weight: 600;
  white-space: nowrap;
}
.tabla-asistencia input[type="checkbox"] { width: 18px; height: 18px; }

/* --- Paso 2: menús --- */
.menu-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}
.menu-pick { display: flex; flex-direction: column; gap: 0.3rem; }
.menu-pick label { font-size: 0.82rem; color: var(--color-muted); }
.menu-pick select {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  font-size: 0.92rem;
}

/* --- Paso 3: fin de semana --- */
.weekend-picks { display: flex; flex-direction: column; gap: 0.7rem; }
.weekend-pick {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  background: var(--color-surface-raised);
  flex-wrap: wrap;
}
.weekend-pick--fixed { opacity: 0.75; }
.weekend-day { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--color-muted); }
.weekend-label { font-weight: 600; }

.switch { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.switch input { width: 18px; height: 18px; }

/* --- Tabla semana --- */
.tabla-scroll { overflow-x: auto; }
.tabla-semana { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tabla-semana th {
  text-align: left;
  color: var(--color-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  padding: 0 0.6rem 0.6rem;
}
.tabla-semana td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--color-border); }
.tabla-semana tr:last-child td { border-bottom: none; }

.btn-secundario {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
  cursor: pointer;
}
.btn-secundario:hover { border-color: var(--color-accent); color: var(--color-accent-soft); }

/* --- Stock (despensa/limpieza) --- */
.stock-categoria { margin-bottom: 0.4rem; }
.stock-fila {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.stock-categoria .stock-fila:last-child { border-bottom: none; }
.stock-fila--check { justify-content: space-between; }
.stock-nombre { flex: 1 1 180px; font-weight: 600; font-size: 0.92rem; }
.stock-campo { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.stock-label { font-size: 0.68rem; color: var(--color-muted); text-transform: uppercase; }
.input-cantidad {
  width: 60px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 6px;
  padding: 0.35rem;
}
.stock-falta { font-weight: 700; font-size: 1rem; color: var(--color-muted); min-width: 24px; text-align: center; }
.stock-falta--si { color: var(--color-warn); }

/* --- Lista de compras --- */
.lista-acciones { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.lista-compras { list-style: none; margin: 0; padding: 0; }
.lista-item { padding: 0.15rem 0; }
.lista-item label { display: flex; align-items: center; gap: 0.7rem; cursor: pointer; }
.lista-item input { width: 20px; height: 20px; flex-shrink: 0; }
.lista-nombre { flex: 1; font-size: 0.95rem; }
.lista-qty { font-weight: 700; color: var(--color-accent-soft); font-size: 0.9rem; }
.lista-item--tachado .lista-nombre,
.lista-item--tachado .lista-qty { text-decoration: line-through; color: var(--color-muted); }

.empty-state { color: var(--color-muted); font-style: italic; }

.site-footer {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  padding: 1.5rem 1rem 2.5rem;
}

@media (max-width: 560px) {
  section.panel { padding: 1.2rem 1.1rem; }
  .stock-fila { gap: 0.6rem; }
  .stock-nombre { flex-basis: 100%; }
}

@media print {
  .site-header, .site-footer, .nav-bar, .lista-acciones, input[type="checkbox"] { display: none !important; }
  body { background: white; color: black; }
  section.panel { box-shadow: none; border: none; background: white; }
  .lista-item--tachado { display: none; }
}
